blob: 6f99e9fc78bba0ee15626a0abb7b54328575e172 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 470
; Schema: 0
OpCapability Shader
%254 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %data "data"
OpName %temp "temp"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_28 "x_28"
OpName %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %merge_i1_i1_i1_ "merge_i1_i1_i1_"
OpName %from "from"
OpName %mid "mid"
OpName %to "to"
OpName %k "k"
OpName %i "i"
OpName %j "j"
OpName %i_1 "i_1"
OpName %main_1 "main_1"
OpName %x_85 "x_85"
OpName %x_86 "x_86"
OpName %x_87 "x_87"
OpName %x_88 "x_88"
OpName %x_89 "x_89"
OpName %x_90 "x_90"
OpName %x_91 "x_91"
OpName %x_92 "x_92"
OpName %x_93 "x_93"
OpName %x_94 "x_94"
OpName %i_3 "i_3"
OpName %j_1 "j_1"
OpName %grey "grey"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpName %mergeSort_ "mergeSort_"
OpName %low "low"
OpName %high "high"
OpName %m "m"
OpName %i_2 "i_2"
OpName %from_1 "from_1"
OpName %mid_1 "mid_1"
OpName %to_1 "to_1"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpDecorate %_arr_int_uint_10 ArrayStride 4
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_28 NonWritable
OpDecorate %x_28 DescriptorSet 0
OpDecorate %x_28 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_int_uint_10 = OpTypeArray %int %uint_10
%_ptr_Private__arr_int_uint_10 = OpTypePointer Private %_arr_int_uint_10
%7 = OpConstantNull %_arr_int_uint_10
%data = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
%temp = OpVariable %_ptr_Private__arr_int_uint_10 Private %7
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_28 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %17
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%_ptr_Function_int = OpTypePointer Function %int
%23 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
%32 = OpConstantNull %int
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%_ptr_Private_int = OpTypePointer Private %int
%int_10 = OpConstant %int 10
%132 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%149 = OpConstantNull %float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_n5 = OpConstant %int -5
%int_n4 = OpConstant %int -4
%int_n3 = OpConstant %int -3
%int_n2 = OpConstant %int -2
%int_n1 = OpConstant %int -1
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%int_9 = OpConstant %int 9
%247 = OpConstantComposite %_arr_int_uint_10 %int_0 %int_0 %int_0 %int_0 %int_0 %int_0 %int_0 %int_0 %int_0 %int_0
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%int_30 = OpConstant %int 30
%float_0_5 = OpConstant %float 0.5
%float_10 = OpConstant %float 10
%int_60 = OpConstant %int 60
%int_90 = OpConstant %int 90
%int_120 = OpConstant %int 120
%int_150 = OpConstant %int 150
%int_180 = OpConstant %int 180
%int_5 = OpConstant %int 5
%int_210 = OpConstant %int 210
%int_6 = OpConstant %int 6
%int_240 = OpConstant %int 240
%int_7 = OpConstant %int 7
%int_270 = OpConstant %int 270
%int_8 = OpConstant %int 8
%v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%main_out = OpTypeStruct %v4float
%399 = OpTypeFunction %void %main_out
%merge_i1_i1_i1_ = OpFunction %void None %23
%from = OpFunctionParameter %_ptr_Function_int
%mid = OpFunctionParameter %_ptr_Function_int
%to = OpFunctionParameter %_ptr_Function_int
%30 = OpLabel
%k = OpVariable %_ptr_Function_int Function %32
%i = OpVariable %_ptr_Function_int Function %32
%j = OpVariable %_ptr_Function_int Function %32
%i_1 = OpVariable %_ptr_Function_int Function %32
%37 = OpLoad %int %from
OpStore %k %37
%39 = OpLoad %int %from
OpStore %i %39
%41 = OpLoad %int %mid
%43 = OpIAdd %int %41 %int_1
OpStore %j %43
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%48 = OpLoad %int %i
%50 = OpLoad %int %mid
%51 = OpLoad %int %j
%53 = OpLoad %int %to
%54 = OpSLessThanEqual %bool %48 %50
OpSelectionMerge %56 None
OpBranchConditional %54 %57 %56
%57 = OpLabel
%58 = OpSLessThanEqual %bool %51 %53
OpBranch %56
%56 = OpLabel
%59 = OpPhi %bool %54 %47 %58 %57
OpSelectionMerge %60 None
OpBranchConditional %59 %61 %62
%61 = OpLabel
OpBranch %60
%62 = OpLabel
OpBranch %45
%60 = OpLabel
%63 = OpLoad %int %i
%65 = OpAccessChain %_ptr_Private_int %data %63
%66 = OpLoad %int %65
%67 = OpLoad %int %j
%68 = OpAccessChain %_ptr_Private_int %data %67
%69 = OpLoad %int %68
%70 = OpSLessThan %bool %66 %69
OpSelectionMerge %71 None
OpBranchConditional %70 %72 %73
%72 = OpLabel
%74 = OpLoad %int %k
%75 = OpIAdd %int %74 %int_1
OpStore %k %75
%76 = OpLoad %int %i
%77 = OpIAdd %int %76 %int_1
OpStore %i %77
%78 = OpAccessChain %_ptr_Private_int %data %76
%79 = OpLoad %int %78
%80 = OpAccessChain %_ptr_Private_int %temp %74
OpStore %80 %79
OpBranch %71
%73 = OpLabel
%81 = OpLoad %int %k
%82 = OpIAdd %int %81 %int_1
OpStore %k %82
%83 = OpLoad %int %j
%84 = OpIAdd %int %83 %int_1
OpStore %j %84
%85 = OpAccessChain %_ptr_Private_int %data %83
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Private_int %temp %81
OpStore %87 %86
OpBranch %71
%71 = OpLabel
OpBranch %46
%46 = OpLabel
OpBranch %44
%45 = OpLabel
OpBranch %88
%88 = OpLabel
OpLoopMerge %89 %90 None
OpBranch %91
%91 = OpLabel
%92 = OpLoad %int %i
%93 = OpLoad %int %i
%95 = OpLoad %int %mid
%97 = OpSLessThan %bool %92 %int_10
OpSelectionMerge %98 None
OpBranchConditional %97 %99 %98
%99 = OpLabel
%100 = OpSLessThanEqual %bool %93 %95
OpBranch %98
%98 = OpLabel
%101 = OpPhi %bool %97 %91 %100 %99
OpSelectionMerge %102 None
OpBranchConditional %101 %103 %104
%103 = OpLabel
OpBranch %102
%104 = OpLabel
OpBranch %89
%102 = OpLabel
%105 = OpLoad %int %k
%106 = OpIAdd %int %105 %int_1
OpStore %k %106
%107 = OpLoad %int %i
%108 = OpIAdd %int %107 %int_1
OpStore %i %108
%109 = OpAccessChain %_ptr_Private_int %data %107
%110 = OpLoad %int %109
%111 = OpAccessChain %_ptr_Private_int %temp %105
OpStore %111 %110
OpBranch %90
%90 = OpLabel
OpBranch %88
%89 = OpLabel
%113 = OpLoad %int %from
OpStore %i_1 %113
OpBranch %114
%114 = OpLabel
OpLoopMerge %115 %116 None
OpBranch %117
%117 = OpLabel
%118 = OpLoad %int %i_1
%120 = OpLoad %int %to
%121 = OpSLessThanEqual %bool %118 %120
OpSelectionMerge %122 None
OpBranchConditional %121 %123 %124
%123 = OpLabel
OpBranch %122
%124 = OpLabel
OpBranch %115
%122 = OpLabel
%125 = OpLoad %int %i_1
%126 = OpLoad %int %i_1
%127 = OpAccessChain %_ptr_Private_int %temp %126
%128 = OpLoad %int %127
%129 = OpAccessChain %_ptr_Private_int %data %125
OpStore %129 %128
OpBranch %116
%116 = OpLabel
%130 = OpLoad %int %i_1
%131 = OpIAdd %int %130 %int_1
OpStore %i_1 %131
OpBranch %114
%115 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %132
%134 = OpLabel
%x_85 = OpVariable %_ptr_Function_int Function %32
%x_86 = OpVariable %_ptr_Function_int Function %32
%x_87 = OpVariable %_ptr_Function_int Function %32
%x_88 = OpVariable %_ptr_Function_int Function %32
%x_89 = OpVariable %_ptr_Function_int Function %32
%x_90 = OpVariable %_ptr_Function_int Function %32
%x_91 = OpVariable %_ptr_Function_int Function %32
%x_92 = OpVariable %_ptr_Function_int Function %32
%x_93 = OpVariable %_ptr_Function_int Function %32
%x_94 = OpVariable %_ptr_Function_int Function %32
%i_3 = OpVariable %_ptr_Function_int Function %32
%j_1 = OpVariable %_ptr_Function_int Function %32
%grey = OpVariable %_ptr_Function_float Function %149
%152 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
%153 = OpLoad %float %152
%154 = OpConvertFToS %int %153
OpStore %i_3 %154
OpBranch %155
%155 = OpLabel
OpLoopMerge %156 %157 None
OpBranch %158
%158 = OpLabel
%159 = OpLoad %int %i_3
OpSelectionMerge %160 None
OpSwitch %159 %161 9 %162 8 %163 7 %164 6 %165 5 %166 4 %167 3 %168 2 %169 1 %170 0 %171
%162 = OpLabel
%172 = OpLoad %int %i_3
%173 = OpAccessChain %_ptr_Private_int %data %172
OpStore %173 %int_n5
OpBranch %160
%163 = OpLabel
%175 = OpLoad %int %i_3
%176 = OpAccessChain %_ptr_Private_int %data %175
OpStore %176 %int_n4
OpBranch %160
%164 = OpLabel
%178 = OpLoad %int %i_3
%179 = OpAccessChain %_ptr_Private_int %data %178
OpStore %179 %int_n3
OpBranch %160
%165 = OpLabel
%181 = OpLoad %int %i_3
%182 = OpAccessChain %_ptr_Private_int %data %181
OpStore %182 %int_n2
OpBranch %160
%166 = OpLabel
%184 = OpLoad %int %i_3
%185 = OpAccessChain %_ptr_Private_int %data %184
OpStore %185 %int_n1
OpBranch %160
%167 = OpLabel
%187 = OpLoad %int %i_3
%188 = OpAccessChain %_ptr_Private_int %data %187
OpStore %188 %int_0
OpBranch %160
%168 = OpLabel
%190 = OpLoad %int %i_3
%191 = OpAccessChain %_ptr_Private_int %data %190
OpStore %191 %int_1
OpBranch %160
%169 = OpLabel
%192 = OpLoad %int %i_3
%193 = OpAccessChain %_ptr_Private_int %data %192
OpStore %193 %int_2
OpBranch %160
%170 = OpLabel
%195 = OpLoad %int %i_3
%196 = OpAccessChain %_ptr_Private_int %data %195
OpStore %196 %int_3
OpBranch %160
%171 = OpLabel
%198 = OpLoad %int %i_3
%199 = OpAccessChain %_ptr_Private_int %data %198
OpStore %199 %int_4
OpBranch %160
%161 = OpLabel
OpBranch %160
%160 = OpLabel
%201 = OpLoad %int %i_3
%202 = OpIAdd %int %201 %int_1
OpStore %i_3 %202
OpBranch %157
%157 = OpLabel
%203 = OpLoad %int %i_3
%204 = OpSLessThan %bool %203 %int_10
OpBranchConditional %204 %155 %156
%156 = OpLabel
OpStore %j_1 %int_0
OpBranch %205
%205 = OpLabel
OpLoopMerge %206 %207 None
OpBranch %208
%208 = OpLabel
%209 = OpLoad %int %j_1
%210 = OpSLessThan %bool %209 %int_10
OpSelectionMerge %211 None
OpBranchConditional %210 %212 %213
%212 = OpLabel
OpBranch %211
%213 = OpLabel
OpBranch %206
%211 = OpLabel
%214 = OpLoad %int %j_1
%215 = OpLoad %int %j_1
%216 = OpAccessChain %_ptr_Private_int %data %215
%217 = OpLoad %int %216
%218 = OpAccessChain %_ptr_Private_int %temp %214
OpStore %218 %217
OpBranch %207
%207 = OpLabel
%219 = OpLoad %int %j_1
%220 = OpIAdd %int %219 %int_1
OpStore %j_1 %220
OpBranch %205
%206 = OpLabel
OpStore %x_94 %int_0
OpStore %x_93 %int_9
OpStore %x_92 %int_1
OpBranch %222
%222 = OpLabel
OpLoopMerge %223 %224 None
OpBranch %225
%225 = OpLabel
%226 = OpLoad %int %x_92
%227 = OpLoad %int %x_93
%228 = OpSLessThanEqual %bool %226 %227
OpSelectionMerge %229 None
OpBranchConditional %228 %230 %231
%230 = OpLabel
OpBranch %229
%231 = OpLabel
OpBranch %223
%229 = OpLabel
%232 = OpLoad %int %x_94
OpStore %x_91 %232
OpBranch %233
%233 = OpLabel
OpLoopMerge %234 %235 None
OpBranch %236
%236 = OpLabel
%237 = OpLoad %int %x_91
%238 = OpLoad %int %x_93
%239 = OpSLessThan %bool %237 %238
OpSelectionMerge %240 None
OpBranchConditional %239 %241 %242
%241 = OpLabel
OpBranch %240
%242 = OpLabel
OpBranch %234
%240 = OpLabel
%243 = OpLoad %int %x_91
OpStore %x_90 %243
%244 = OpLoad %int %x_91
%245 = OpLoad %int %x_92
%246 = OpLoad %_arr_int_uint_10 %data
OpStore %data %247
OpStore %data %246
%248 = OpIAdd %int %244 %245
%249 = OpISub %int %248 %int_1
OpStore %x_89 %249
%250 = OpLoad %int %x_91
%251 = OpLoad %int %x_92
%252 = OpLoad %int %x_93
%255 = OpIMul %int %int_2 %251
%256 = OpIAdd %int %250 %255
%257 = OpISub %int %256 %int_1
%253 = OpExtInst %int %254 SMin %257 %252
OpStore %x_88 %253
%258 = OpLoad %int %x_90
OpStore %x_87 %258
%259 = OpLoad %int %x_89
OpStore %x_86 %259
%260 = OpLoad %int %x_88
OpStore %x_85 %260
%261 = OpFunctionCall %void %merge_i1_i1_i1_ %x_87 %x_86 %x_85
OpBranch %235
%235 = OpLabel
%265 = OpLoad %int %x_92
%266 = OpLoad %int %x_91
%267 = OpIMul %int %int_2 %265
%268 = OpIAdd %int %266 %267
OpStore %x_91 %268
OpBranch %233
%234 = OpLabel
OpBranch %224
%224 = OpLabel
%269 = OpLoad %int %x_92
%270 = OpIMul %int %int_2 %269
OpStore %x_92 %270
OpBranch %222
%223 = OpLabel
%273 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%274 = OpLoad %float %273
%275 = OpConvertFToS %int %274
%277 = OpSLessThan %bool %275 %int_30
OpSelectionMerge %278 None
OpBranchConditional %277 %279 %280
%279 = OpLabel
%281 = OpAccessChain %_ptr_Private_int %data %int_0
%282 = OpLoad %int %281
%284 = OpConvertSToF %float %282
%286 = OpFDiv %float %284 %float_10
%287 = OpFAdd %float %float_0_5 %286
OpStore %grey %287
OpBranch %278
%280 = OpLabel
%288 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%289 = OpLoad %float %288
%290 = OpConvertFToS %int %289
%292 = OpSLessThan %bool %290 %int_60
OpSelectionMerge %293 None
OpBranchConditional %292 %294 %295
%294 = OpLabel
%296 = OpAccessChain %_ptr_Private_int %data %int_1
%297 = OpLoad %int %296
%298 = OpConvertSToF %float %297
%299 = OpFDiv %float %298 %float_10
%300 = OpFAdd %float %float_0_5 %299
OpStore %grey %300
OpBranch %293
%295 = OpLabel
%301 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%302 = OpLoad %float %301
%303 = OpConvertFToS %int %302
%305 = OpSLessThan %bool %303 %int_90
OpSelectionMerge %306 None
OpBranchConditional %305 %307 %308
%307 = OpLabel
%309 = OpAccessChain %_ptr_Private_int %data %int_2
%310 = OpLoad %int %309
%311 = OpConvertSToF %float %310
%312 = OpFDiv %float %311 %float_10
%313 = OpFAdd %float %float_0_5 %312
OpStore %grey %313
OpBranch %306
%308 = OpLabel
%314 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%315 = OpLoad %float %314
%316 = OpConvertFToS %int %315
%318 = OpSLessThan %bool %316 %int_120
OpSelectionMerge %319 None
OpBranchConditional %318 %320 %321
%320 = OpLabel
%322 = OpAccessChain %_ptr_Private_int %data %int_3
%323 = OpLoad %int %322
%324 = OpConvertSToF %float %323
%325 = OpFDiv %float %324 %float_10
%326 = OpFAdd %float %float_0_5 %325
OpStore %grey %326
OpBranch %319
%321 = OpLabel
%327 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%328 = OpLoad %float %327
%329 = OpConvertFToS %int %328
%331 = OpSLessThan %bool %329 %int_150
OpSelectionMerge %332 None
OpBranchConditional %331 %333 %334
%333 = OpLabel
OpKill
%334 = OpLabel
%335 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%336 = OpLoad %float %335
%337 = OpConvertFToS %int %336
%339 = OpSLessThan %bool %337 %int_180
OpSelectionMerge %340 None
OpBranchConditional %339 %341 %342
%341 = OpLabel
%344 = OpAccessChain %_ptr_Private_int %data %int_5
%345 = OpLoad %int %344
%346 = OpConvertSToF %float %345
%347 = OpFDiv %float %346 %float_10
%348 = OpFAdd %float %float_0_5 %347
OpStore %grey %348
OpBranch %340
%342 = OpLabel
%349 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%350 = OpLoad %float %349
%351 = OpConvertFToS %int %350
%353 = OpSLessThan %bool %351 %int_210
OpSelectionMerge %354 None
OpBranchConditional %353 %355 %356
%355 = OpLabel
%358 = OpAccessChain %_ptr_Private_int %data %int_6
%359 = OpLoad %int %358
%360 = OpConvertSToF %float %359
%361 = OpFDiv %float %360 %float_10
%362 = OpFAdd %float %float_0_5 %361
OpStore %grey %362
OpBranch %354
%356 = OpLabel
%363 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%364 = OpLoad %float %363
%365 = OpConvertFToS %int %364
%367 = OpSLessThan %bool %365 %int_240
OpSelectionMerge %368 None
OpBranchConditional %367 %369 %370
%369 = OpLabel
%372 = OpAccessChain %_ptr_Private_int %data %int_7
%373 = OpLoad %int %372
%374 = OpConvertSToF %float %373
%375 = OpFDiv %float %374 %float_10
%376 = OpFAdd %float %float_0_5 %375
OpStore %grey %376
OpBranch %368
%370 = OpLabel
%377 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%378 = OpLoad %float %377
%379 = OpConvertFToS %int %378
%381 = OpSLessThan %bool %379 %int_270
OpSelectionMerge %382 None
OpBranchConditional %381 %383 %384
%383 = OpLabel
%386 = OpAccessChain %_ptr_Private_int %data %int_8
%387 = OpLoad %int %386
%388 = OpConvertSToF %float %387
%389 = OpFDiv %float %388 %float_10
%390 = OpFAdd %float %float_0_5 %389
OpStore %grey %390
OpBranch %382
%384 = OpLabel
OpKill
%382 = OpLabel
OpBranch %368
%368 = OpLabel
OpBranch %354
%354 = OpLabel
OpBranch %340
%340 = OpLabel
OpBranch %332
%332 = OpLabel
OpBranch %319
%319 = OpLabel
OpBranch %306
%306 = OpLabel
OpBranch %293
%293 = OpLabel
OpBranch %278
%278 = OpLabel
%391 = OpLoad %float %grey
%393 = OpCompositeConstruct %v3float %391 %391 %391
%394 = OpCompositeExtract %float %393 0
%395 = OpCompositeExtract %float %393 1
%396 = OpCompositeExtract %float %393 2
%398 = OpCompositeConstruct %v4float %394 %395 %396 %float_1
OpStore %x_GLF_color %398
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %399
%tint_symbol_1 = OpFunctionParameter %main_out
%403 = OpLabel
%404 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %404
OpReturn
OpFunctionEnd
%main = OpFunction %void None %132
%406 = OpLabel
%407 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %407
%408 = OpFunctionCall %void %main_1
%410 = OpLoad %v4float %x_GLF_color
%411 = OpCompositeConstruct %main_out %410
%409 = OpFunctionCall %void %tint_symbol_3 %411
OpReturn
OpFunctionEnd
%mergeSort_ = OpFunction %void None %132
%413 = OpLabel
%low = OpVariable %_ptr_Function_int Function %32
%high = OpVariable %_ptr_Function_int Function %32
%m = OpVariable %_ptr_Function_int Function %32
%i_2 = OpVariable %_ptr_Function_int Function %32
%from_1 = OpVariable %_ptr_Function_int Function %32
%mid_1 = OpVariable %_ptr_Function_int Function %32
%to_1 = OpVariable %_ptr_Function_int Function %32
%param = OpVariable %_ptr_Function_int Function %32
%param_1 = OpVariable %_ptr_Function_int Function %32
%param_2 = OpVariable %_ptr_Function_int Function %32
OpStore %low %int_0
OpStore %high %int_9
OpStore %m %int_1
OpBranch %424
%424 = OpLabel
OpLoopMerge %425 %426 None
OpBranch %427
%427 = OpLabel
%428 = OpLoad %int %m
%429 = OpLoad %int %high
%430 = OpSLessThanEqual %bool %428 %429
OpSelectionMerge %431 None
OpBranchConditional %430 %432 %433
%432 = OpLabel
OpBranch %431
%433 = OpLabel
OpBranch %425
%431 = OpLabel
%434 = OpLoad %int %low
OpStore %i_2 %434
OpBranch %435
%435 = OpLabel
OpLoopMerge %436 %437 None
OpBranch %438
%438 = OpLabel
%439 = OpLoad %int %i_2
%440 = OpLoad %int %high
%441 = OpSLessThan %bool %439 %440
OpSelectionMerge %442 None
OpBranchConditional %441 %443 %444
%443 = OpLabel
OpBranch %442
%444 = OpLabel
OpBranch %436
%442 = OpLabel
%445 = OpLoad %int %i_2
OpStore %from_1 %445
%446 = OpLoad %int %i_2
%447 = OpLoad %int %m
%448 = OpIAdd %int %446 %447
%449 = OpISub %int %448 %int_1
OpStore %mid_1 %449
%450 = OpLoad %int %i_2
%451 = OpLoad %int %m
%452 = OpLoad %int %high
%454 = OpIMul %int %int_2 %451
%455 = OpIAdd %int %450 %454
%456 = OpISub %int %455 %int_1
%453 = OpExtInst %int %254 SMin %456 %452
OpStore %to_1 %453
%457 = OpLoad %int %from_1
OpStore %param %457
%458 = OpLoad %int %mid_1
OpStore %param_1 %458
%459 = OpLoad %int %to_1
OpStore %param_2 %459
%460 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_1 %param_2
OpBranch %437
%437 = OpLabel
%464 = OpLoad %int %m
%465 = OpLoad %int %i_2
%466 = OpIMul %int %int_2 %464
%467 = OpIAdd %int %465 %466
OpStore %i_2 %467
OpBranch %435
%436 = OpLabel
OpBranch %426
%426 = OpLabel
%468 = OpLoad %int %m
%469 = OpIMul %int %int_2 %468
OpStore %m %469
OpBranch %424
%425 = OpLabel
OpReturn
OpFunctionEnd