
%dx.types.Handle = type { i8* }
%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
%dx.types.i8x16 = type { [16 x i8] }

define void @main() {
entry:
  %0 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false)
  %1 = call i16 @dx.op.loadInput.i16(i32 4, i32 0, i32 0, i8 0, i32 undef)
  %2 = add i16 %1, 2
  %3 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 0)
  %4 = extractvalue %dx.types.CBufRet.i32 %3, 0
  %5 = trunc i32 %4 to i16
  %6 = icmp eq i16 %2, %5
  br i1 %6, label %if0.then, label %if0.else

if0.then:                                         ; preds = %entry
  %7 = call i16 @dx.op.loadInput.i16(i32 4, i32 0, i32 0, i8 0, i32 undef)
  %8 = add i16 %7, -1
  %9 = sext i16 %8 to i32
  call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %9)
  ret void

if0.else:                                         ; preds = %entry
  call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 1)
  ret void
}

; Function Attrs: nounwind readonly
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #0

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

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

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

; Function Attrs: nounwind readonly
declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #0

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

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

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

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

!dx.version = !{!0}
!dx.valver = !{!0}
!dx.shaderModel = !{!1}
!dx.resources = !{!2}
!dx.entryPoints = !{!5}
!llvm.ident = !{!13}

!0 = !{i32 1, i32 0}
!1 = !{!"ps", i32 6, i32 0}
!2 = !{null, null, !3, null}
!3 = !{!4}
!4 = !{i32 0, %dx.types.i8x16 addrspace(2)* undef, !"CB0", i32 0, i32 0, i32 1, i32 16, null}
!5 = !{void ()* @main, !"main", !6, !2, !12}
!6 = !{!7, !10, null}
!7 = !{!8}
!8 = !{i32 0, !"A", i8 2, i8 0, !9, i8 1, i32 1, i8 1, i32 0, i8 0, null}
!9 = !{i32 0}
!10 = !{!11}
!11 = !{i32 0, !"SV_Target", i8 4, i8 16, !9, i8 0, i32 1, i8 1, i32 0, i8 0, null}
!12 = !{i32 0, i64 288}
!13 = !{!"dxbc2dxil 1.2"}
