; ModuleID = 'dxil_cleanup\dxilcleanup11.ll'

@g1 = external global i1, align 4
@g2 = external global i1, align 4

define void @main() {
entry:
  %c1 = load i1, i1* @g1
  %c2 = load i1, i1* @g2
  br i1 %c1, label %if0.then, label %if0.else

if0.then:                                         ; preds = %entry
  %v0 = call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 0, i32 undef)
  %v1 = add i32 %v0, 7
  br i1 %c2, label %if1.then, label %if1.end

if1.then:                                         ; preds = %if0.then
  %v3 = add i32 %v1, 4
  br label %if1.end

if1.end:                                          ; preds = %if1.then, %if0.then
  %dx.v32.r0.0 = phi i32 [ %v3, %if1.then ], [ %v1, %if0.then ]
  call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %dx.v32.r0.0)
  br label %if0.end

if0.else:                                         ; preds = %entry
  %v5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
  %0 = call i32 @dx.op.bitcastF32toI32(i32 127, float %v5)
  br label %if0.end

if0.end:                                          ; preds = %if0.else, %if1.end
  %dx.v32.r0.1 = phi i32 [ %dx.v32.r0.0, %if1.end ], [ %0, %if0.else ]
  call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %dx.v32.r0.1)
  ret void
}

; Function Attrs: nounwind readnone
declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #0

; Function Attrs: nounwind readnone
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0

; Function Attrs: nounwind
declare void @dx.op.tempRegStore.f32(i32, i32, float) #1

; Function Attrs: nounwind
declare void @dx.op.tempRegStore.i32(i32, i32, i32) #1

; Function Attrs: nounwind readonly
declare float @dx.op.tempRegLoad.f32(i32, i32) #2

; Function Attrs: nounwind readonly
declare i32 @dx.op.tempRegLoad.i32(i32, i32) #2

; Function Attrs: nounwind
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #1

; Function Attrs: nounwind
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1

; Function Attrs: nounwind readnone
declare i32 @dx.op.bitcastF32toI32(i32, float) #0

; Function Attrs: nounwind readnone
declare float @dx.op.bitcastI32toF32(i32, i32) #0

attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }
attributes #2 = { nounwind readonly }

!dx.version = !{!0}
!dx.shaderModel = !{!1}
!dx.entryPoints = !{!2}
!llvm.ident = !{!10}

!0 = !{i32 1, i32 0}
!1 = !{!"ps", i32 6, i32 0}
!2 = !{void ()* @main, !"main", !3, null, null}
!3 = !{!4, !8, null}
!4 = !{!5, !7}
!5 = !{i32 0, !"A", i8 9, i8 0, !6, i8 2, i32 1, i8 4, i32 0, i8 0, null}
!6 = !{i32 0}
!7 = !{i32 1, !"B", i8 9, i8 0, !6, i8 2, i32 1, i8 4, i32 1, i8 0, null}
!8 = !{!9}
!9 = !{i32 0, !"SV_Target", i8 9, i8 16, !6, i8 0, i32 1, i8 4, i32 0, i8 0, null}
!10 = !{!"dxbc2dxil 1.0"}
