; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 27
; Schema: 0
               OpCapability Addresses
               OpCapability Linkage
               OpCapability Kernel
               OpCapability Int64
          %1 = OpExtInstImport "OpenCL.std"
               OpMemoryModel Physical64 OpenCL
               OpEntryPoint Kernel %2 "fmath_spv" %gl_GlobalInvocationID
               OpName %res "res"
               OpName %lhs "lhs"
               OpName %rhs "rhs"
               OpName %entry "entry"
               OpDecorate %7 FuncParamAttr NoCapture
          %7 = OpDecorationGroup
               OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
               OpDecorate %gl_GlobalInvocationID Constant
               OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
               OpGroupDecorate %7 %res %lhs %rhs
      %ulong = OpTypeInt 64 0
    %v3ulong = OpTypeVector %ulong 3
%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong
       %void = OpTypeVoid
      %float = OpTypeFloat 32
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
         %15 = OpTypeFunction %void %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float
   %ulong_32 = OpConstant %ulong 32
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
          %2 = OpFunction %void None %15
        %res = OpFunctionParameter %_ptr_CrossWorkgroup_float
        %lhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
        %rhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
      %entry = OpLabel
         %17 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
         %18 = OpCompositeExtract %ulong %17 0
         %19 = OpShiftLeftLogical %ulong %18 %ulong_32
         %20 = OpShiftRightArithmetic %ulong %19 %ulong_32
         %21 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %lhs %20
         %22 = OpLoad %float %21 Aligned 4
         %23 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %rhs %20
         %24 = OpLoad %float %23 Aligned 4
         %25 = OpFRem %float %22 %24
         %26 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %res %20
               OpStore %26 %25 Aligned 4
               OpReturn
               OpFunctionEnd
