blob: 06e5ba85086943512e776008371f960cf72e1e79 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 464
; Schema: 0
OpCapability Shader
%248 = 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
%128 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%145 = 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
%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
%393 = 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
%56 = OpSLessThanEqual %bool %51 %53
%57 = OpLogicalAnd %bool %54 %56
OpSelectionMerge %58 None
OpBranchConditional %57 %59 %60
%59 = OpLabel
OpBranch %58
%60 = OpLabel
OpBranch %45
%58 = OpLabel
%61 = OpLoad %int %i
%63 = OpAccessChain %_ptr_Private_int %data %61
%64 = OpLoad %int %63
%65 = OpLoad %int %j
%66 = OpAccessChain %_ptr_Private_int %data %65
%67 = OpLoad %int %66
%68 = OpSLessThan %bool %64 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
%72 = OpLoad %int %k
%73 = OpIAdd %int %72 %int_1
OpStore %k %73
%74 = OpLoad %int %i
%75 = OpIAdd %int %74 %int_1
OpStore %i %75
%76 = OpAccessChain %_ptr_Private_int %data %74
%77 = OpLoad %int %76
%78 = OpAccessChain %_ptr_Private_int %temp %72
OpStore %78 %77
OpBranch %69
%71 = OpLabel
%79 = OpLoad %int %k
%80 = OpIAdd %int %79 %int_1
OpStore %k %80
%81 = OpLoad %int %j
%82 = OpIAdd %int %81 %int_1
OpStore %j %82
%83 = OpAccessChain %_ptr_Private_int %data %81
%84 = OpLoad %int %83
%85 = OpAccessChain %_ptr_Private_int %temp %79
OpStore %85 %84
OpBranch %69
%69 = OpLabel
OpBranch %46
%46 = OpLabel
OpBranch %44
%45 = OpLabel
OpBranch %86
%86 = OpLabel
OpLoopMerge %87 %88 None
OpBranch %89
%89 = OpLabel
%90 = OpLoad %int %i
%91 = OpLoad %int %i
%93 = OpLoad %int %mid
%95 = OpSLessThan %bool %90 %int_10
%96 = OpSLessThanEqual %bool %91 %93
%97 = OpLogicalAnd %bool %95 %96
OpSelectionMerge %98 None
OpBranchConditional %97 %99 %100
%99 = OpLabel
OpBranch %98
%100 = OpLabel
OpBranch %87
%98 = OpLabel
%101 = OpLoad %int %k
%102 = OpIAdd %int %101 %int_1
OpStore %k %102
%103 = OpLoad %int %i
%104 = OpIAdd %int %103 %int_1
OpStore %i %104
%105 = OpAccessChain %_ptr_Private_int %data %103
%106 = OpLoad %int %105
%107 = OpAccessChain %_ptr_Private_int %temp %101
OpStore %107 %106
OpBranch %88
%88 = OpLabel
OpBranch %86
%87 = OpLabel
%109 = OpLoad %int %from
OpStore %i_1 %109
OpBranch %110
%110 = OpLabel
OpLoopMerge %111 %112 None
OpBranch %113
%113 = OpLabel
%114 = OpLoad %int %i_1
%116 = OpLoad %int %to
%117 = OpSLessThanEqual %bool %114 %116
OpSelectionMerge %118 None
OpBranchConditional %117 %119 %120
%119 = OpLabel
OpBranch %118
%120 = OpLabel
OpBranch %111
%118 = OpLabel
%121 = OpLoad %int %i_1
%122 = OpLoad %int %i_1
%123 = OpAccessChain %_ptr_Private_int %temp %122
%124 = OpLoad %int %123
%125 = OpAccessChain %_ptr_Private_int %data %121
OpStore %125 %124
OpBranch %112
%112 = OpLabel
%126 = OpLoad %int %i_1
%127 = OpIAdd %int %126 %int_1
OpStore %i_1 %127
OpBranch %110
%111 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %128
%130 = 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 %145
%148 = OpAccessChain %_ptr_Uniform_float %x_28 %uint_0 %uint_0
%149 = OpLoad %float %148
%150 = OpConvertFToS %int %149
OpStore %i_3 %150
OpBranch %151
%151 = OpLabel
OpLoopMerge %152 %153 None
OpBranch %154
%154 = OpLabel
%155 = OpLoad %int %i_3
OpSelectionMerge %156 None
OpSwitch %155 %157 9 %158 8 %159 7 %160 6 %161 5 %162 4 %163 3 %164 2 %165 1 %166 0 %167
%158 = OpLabel
%168 = OpLoad %int %i_3
%169 = OpAccessChain %_ptr_Private_int %data %168
OpStore %169 %int_n5
OpBranch %156
%159 = OpLabel
%171 = OpLoad %int %i_3
%172 = OpAccessChain %_ptr_Private_int %data %171
OpStore %172 %int_n4
OpBranch %156
%160 = OpLabel
%174 = OpLoad %int %i_3
%175 = OpAccessChain %_ptr_Private_int %data %174
OpStore %175 %int_n3
OpBranch %156
%161 = OpLabel
%177 = OpLoad %int %i_3
%178 = OpAccessChain %_ptr_Private_int %data %177
OpStore %178 %int_n2
OpBranch %156
%162 = OpLabel
%180 = OpLoad %int %i_3
%181 = OpAccessChain %_ptr_Private_int %data %180
OpStore %181 %int_n1
OpBranch %156
%163 = OpLabel
%183 = OpLoad %int %i_3
%184 = OpAccessChain %_ptr_Private_int %data %183
OpStore %184 %int_0
OpBranch %156
%164 = OpLabel
%186 = OpLoad %int %i_3
%187 = OpAccessChain %_ptr_Private_int %data %186
OpStore %187 %int_1
OpBranch %156
%165 = OpLabel
%188 = OpLoad %int %i_3
%189 = OpAccessChain %_ptr_Private_int %data %188
OpStore %189 %int_2
OpBranch %156
%166 = OpLabel
%191 = OpLoad %int %i_3
%192 = OpAccessChain %_ptr_Private_int %data %191
OpStore %192 %int_3
OpBranch %156
%167 = OpLabel
%194 = OpLoad %int %i_3
%195 = OpAccessChain %_ptr_Private_int %data %194
OpStore %195 %int_4
OpBranch %156
%157 = OpLabel
OpBranch %156
%156 = OpLabel
%197 = OpLoad %int %i_3
%198 = OpIAdd %int %197 %int_1
OpStore %i_3 %198
OpBranch %153
%153 = OpLabel
%199 = OpLoad %int %i_3
%200 = OpSLessThan %bool %199 %int_10
OpBranchConditional %200 %151 %152
%152 = OpLabel
OpStore %j_1 %int_0
OpBranch %201
%201 = OpLabel
OpLoopMerge %202 %203 None
OpBranch %204
%204 = OpLabel
%205 = OpLoad %int %j_1
%206 = OpSLessThan %bool %205 %int_10
OpSelectionMerge %207 None
OpBranchConditional %206 %208 %209
%208 = OpLabel
OpBranch %207
%209 = OpLabel
OpBranch %202
%207 = OpLabel
%210 = OpLoad %int %j_1
%211 = OpLoad %int %j_1
%212 = OpAccessChain %_ptr_Private_int %data %211
%213 = OpLoad %int %212
%214 = OpAccessChain %_ptr_Private_int %temp %210
OpStore %214 %213
OpBranch %203
%203 = OpLabel
%215 = OpLoad %int %j_1
%216 = OpIAdd %int %215 %int_1
OpStore %j_1 %216
OpBranch %201
%202 = OpLabel
OpStore %x_94 %int_0
OpStore %x_93 %int_9
OpStore %x_92 %int_1
OpBranch %218
%218 = OpLabel
OpLoopMerge %219 %220 None
OpBranch %221
%221 = OpLabel
%222 = OpLoad %int %x_92
%223 = OpLoad %int %x_93
%224 = OpSLessThanEqual %bool %222 %223
OpSelectionMerge %225 None
OpBranchConditional %224 %226 %227
%226 = OpLabel
OpBranch %225
%227 = OpLabel
OpBranch %219
%225 = OpLabel
%228 = OpLoad %int %x_94
OpStore %x_91 %228
OpBranch %229
%229 = OpLabel
OpLoopMerge %230 %231 None
OpBranch %232
%232 = OpLabel
%233 = OpLoad %int %x_91
%234 = OpLoad %int %x_93
%235 = OpSLessThan %bool %233 %234
OpSelectionMerge %236 None
OpBranchConditional %235 %237 %238
%237 = OpLabel
OpBranch %236
%238 = OpLabel
OpBranch %230
%236 = OpLabel
%239 = OpLoad %int %x_91
OpStore %x_90 %239
%240 = OpLoad %int %x_91
%241 = OpLoad %int %x_92
%242 = OpIAdd %int %240 %241
%243 = OpISub %int %242 %int_1
OpStore %x_89 %243
%244 = OpLoad %int %x_91
%245 = OpLoad %int %x_92
%246 = OpLoad %int %x_93
%249 = OpIMul %int %int_2 %245
%250 = OpIAdd %int %244 %249
%251 = OpISub %int %250 %int_1
%247 = OpExtInst %int %248 SMin %251 %246
OpStore %x_88 %247
%252 = OpLoad %int %x_90
OpStore %x_87 %252
%253 = OpLoad %int %x_89
OpStore %x_86 %253
%254 = OpLoad %int %x_88
OpStore %x_85 %254
%255 = OpFunctionCall %void %merge_i1_i1_i1_ %x_87 %x_86 %x_85
OpBranch %231
%231 = OpLabel
%259 = OpLoad %int %x_92
%260 = OpLoad %int %x_91
%261 = OpIMul %int %int_2 %259
%262 = OpIAdd %int %260 %261
OpStore %x_91 %262
OpBranch %229
%230 = OpLabel
OpBranch %220
%220 = OpLabel
%263 = OpLoad %int %x_92
%264 = OpIMul %int %int_2 %263
OpStore %x_92 %264
OpBranch %218
%219 = OpLabel
%267 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%268 = OpLoad %float %267
%269 = OpConvertFToS %int %268
%271 = OpSLessThan %bool %269 %int_30
OpSelectionMerge %272 None
OpBranchConditional %271 %273 %274
%273 = OpLabel
%275 = OpAccessChain %_ptr_Private_int %data %int_0
%276 = OpLoad %int %275
%278 = OpConvertSToF %float %276
%280 = OpFDiv %float %278 %float_10
%281 = OpFAdd %float %float_0_5 %280
OpStore %grey %281
OpBranch %272
%274 = OpLabel
%282 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%283 = OpLoad %float %282
%284 = OpConvertFToS %int %283
%286 = OpSLessThan %bool %284 %int_60
OpSelectionMerge %287 None
OpBranchConditional %286 %288 %289
%288 = OpLabel
%290 = OpAccessChain %_ptr_Private_int %data %int_1
%291 = OpLoad %int %290
%292 = OpConvertSToF %float %291
%293 = OpFDiv %float %292 %float_10
%294 = OpFAdd %float %float_0_5 %293
OpStore %grey %294
OpBranch %287
%289 = OpLabel
%295 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%296 = OpLoad %float %295
%297 = OpConvertFToS %int %296
%299 = OpSLessThan %bool %297 %int_90
OpSelectionMerge %300 None
OpBranchConditional %299 %301 %302
%301 = OpLabel
%303 = OpAccessChain %_ptr_Private_int %data %int_2
%304 = OpLoad %int %303
%305 = OpConvertSToF %float %304
%306 = OpFDiv %float %305 %float_10
%307 = OpFAdd %float %float_0_5 %306
OpStore %grey %307
OpBranch %300
%302 = OpLabel
%308 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%309 = OpLoad %float %308
%310 = OpConvertFToS %int %309
%312 = OpSLessThan %bool %310 %int_120
OpSelectionMerge %313 None
OpBranchConditional %312 %314 %315
%314 = OpLabel
%316 = OpAccessChain %_ptr_Private_int %data %int_3
%317 = OpLoad %int %316
%318 = OpConvertSToF %float %317
%319 = OpFDiv %float %318 %float_10
%320 = OpFAdd %float %float_0_5 %319
OpStore %grey %320
OpBranch %313
%315 = OpLabel
%321 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%322 = OpLoad %float %321
%323 = OpConvertFToS %int %322
%325 = OpSLessThan %bool %323 %int_150
OpSelectionMerge %326 None
OpBranchConditional %325 %327 %328
%327 = OpLabel
OpKill
%328 = OpLabel
%329 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%330 = OpLoad %float %329
%331 = OpConvertFToS %int %330
%333 = OpSLessThan %bool %331 %int_180
OpSelectionMerge %334 None
OpBranchConditional %333 %335 %336
%335 = OpLabel
%338 = OpAccessChain %_ptr_Private_int %data %int_5
%339 = OpLoad %int %338
%340 = OpConvertSToF %float %339
%341 = OpFDiv %float %340 %float_10
%342 = OpFAdd %float %float_0_5 %341
OpStore %grey %342
OpBranch %334
%336 = OpLabel
%343 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%344 = OpLoad %float %343
%345 = OpConvertFToS %int %344
%347 = OpSLessThan %bool %345 %int_210
OpSelectionMerge %348 None
OpBranchConditional %347 %349 %350
%349 = OpLabel
%352 = OpAccessChain %_ptr_Private_int %data %int_6
%353 = OpLoad %int %352
%354 = OpConvertSToF %float %353
%355 = OpFDiv %float %354 %float_10
%356 = OpFAdd %float %float_0_5 %355
OpStore %grey %356
OpBranch %348
%350 = OpLabel
%357 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%358 = OpLoad %float %357
%359 = OpConvertFToS %int %358
%361 = OpSLessThan %bool %359 %int_240
OpSelectionMerge %362 None
OpBranchConditional %361 %363 %364
%363 = OpLabel
%366 = OpAccessChain %_ptr_Private_int %data %int_7
%367 = OpLoad %int %366
%368 = OpConvertSToF %float %367
%369 = OpFDiv %float %368 %float_10
%370 = OpFAdd %float %float_0_5 %369
OpStore %grey %370
OpBranch %362
%364 = OpLabel
%371 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_1
%372 = OpLoad %float %371
%373 = OpConvertFToS %int %372
%375 = OpSLessThan %bool %373 %int_270
OpSelectionMerge %376 None
OpBranchConditional %375 %377 %378
%377 = OpLabel
%380 = OpAccessChain %_ptr_Private_int %data %int_8
%381 = OpLoad %int %380
%382 = OpConvertSToF %float %381
%383 = OpFDiv %float %382 %float_10
%384 = OpFAdd %float %float_0_5 %383
OpStore %grey %384
OpBranch %376
%378 = OpLabel
OpKill
%376 = OpLabel
OpBranch %362
%362 = OpLabel
OpBranch %348
%348 = OpLabel
OpBranch %334
%334 = OpLabel
OpBranch %326
%326 = OpLabel
OpBranch %313
%313 = OpLabel
OpBranch %300
%300 = OpLabel
OpBranch %287
%287 = OpLabel
OpBranch %272
%272 = OpLabel
%385 = OpLoad %float %grey
%387 = OpCompositeConstruct %v3float %385 %385 %385
%388 = OpCompositeExtract %float %387 0
%389 = OpCompositeExtract %float %387 1
%390 = OpCompositeExtract %float %387 2
%392 = OpCompositeConstruct %v4float %388 %389 %390 %float_1
OpStore %x_GLF_color %392
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %393
%tint_symbol_1 = OpFunctionParameter %main_out
%397 = OpLabel
%398 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %398
OpReturn
OpFunctionEnd
%main = OpFunction %void None %128
%400 = OpLabel
%401 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %401
%402 = OpFunctionCall %void %main_1
%404 = OpLoad %v4float %x_GLF_color
%405 = OpCompositeConstruct %main_out %404
%403 = OpFunctionCall %void %tint_symbol_3 %405
OpReturn
OpFunctionEnd
%mergeSort_ = OpFunction %void None %128
%407 = 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 %418
%418 = OpLabel
OpLoopMerge %419 %420 None
OpBranch %421
%421 = OpLabel
%422 = OpLoad %int %m
%423 = OpLoad %int %high
%424 = OpSLessThanEqual %bool %422 %423
OpSelectionMerge %425 None
OpBranchConditional %424 %426 %427
%426 = OpLabel
OpBranch %425
%427 = OpLabel
OpBranch %419
%425 = OpLabel
%428 = OpLoad %int %low
OpStore %i_2 %428
OpBranch %429
%429 = OpLabel
OpLoopMerge %430 %431 None
OpBranch %432
%432 = OpLabel
%433 = OpLoad %int %i_2
%434 = OpLoad %int %high
%435 = OpSLessThan %bool %433 %434
OpSelectionMerge %436 None
OpBranchConditional %435 %437 %438
%437 = OpLabel
OpBranch %436
%438 = OpLabel
OpBranch %430
%436 = OpLabel
%439 = OpLoad %int %i_2
OpStore %from_1 %439
%440 = OpLoad %int %i_2
%441 = OpLoad %int %m
%442 = OpIAdd %int %440 %441
%443 = OpISub %int %442 %int_1
OpStore %mid_1 %443
%444 = OpLoad %int %i_2
%445 = OpLoad %int %m
%446 = OpLoad %int %high
%448 = OpIMul %int %int_2 %445
%449 = OpIAdd %int %444 %448
%450 = OpISub %int %449 %int_1
%447 = OpExtInst %int %248 SMin %450 %446
OpStore %to_1 %447
%451 = OpLoad %int %from_1
OpStore %param %451
%452 = OpLoad %int %mid_1
OpStore %param_1 %452
%453 = OpLoad %int %to_1
OpStore %param_2 %453
%454 = OpFunctionCall %void %merge_i1_i1_i1_ %param %param_1 %param_2
OpBranch %431
%431 = OpLabel
%458 = OpLoad %int %m
%459 = OpLoad %int %i_2
%460 = OpIMul %int %int_2 %458
%461 = OpIAdd %int %459 %460
OpStore %i_2 %461
OpBranch %429
%430 = OpLabel
OpBranch %420
%420 = OpLabel
%462 = OpLoad %int %m
%463 = OpIMul %int %int_2 %462
OpStore %m %463
OpBranch %418
%419 = OpLabel
OpReturn
OpFunctionEnd