; LLVM IR from tangjz/acm-icpc :: codeforces/complete (491B)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@c = external dso_local global i32, align 4
@h = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@d = external dso_local global [4 x i32], align 16
@ans = external dso_local global i32, align 4
@pos = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @c)
  br label %17

17:                                               ; preds = %21, %0
  %18 = load i32, ptr @c, align 4, !tbaa !5
  %19 = add nsw i32 %18, -1
  store i32 %19, ptr @c, align 4, !tbaa !5
  %20 = icmp ne i32 %18, 0
  br i1 %20, label %21, label %45

21:                                               ; preds = %17
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @x, ptr noundef @y)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %23 = load i32, ptr @x, align 4, !tbaa !5
  %24 = load i32, ptr @y, align 4, !tbaa !5
  %25 = add nsw i32 %23, %24
  store i32 %25, ptr %2, align 4, !tbaa !5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @d, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %27, ptr @d, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %28 = load i32, ptr @x, align 4, !tbaa !5
  %29 = load i32, ptr @y, align 4, !tbaa !5
  %30 = sub nsw i32 %28, %29
  store i32 %30, ptr %3, align 4, !tbaa !5
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 1), ptr noundef nonnull align 4 dereferenceable(4) %3)
  %32 = load i32, ptr %31, align 4, !tbaa !5
  store i32 %32, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %33 = load i32, ptr @x, align 4, !tbaa !5
  %34 = sub nsw i32 0, %33
  %35 = load i32, ptr @y, align 4, !tbaa !5
  %36 = add nsw i32 %34, %35
  store i32 %36, ptr %4, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 2), ptr noundef nonnull align 4 dereferenceable(4) %4)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 2), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %39 = load i32, ptr @x, align 4, !tbaa !5
  %40 = sub nsw i32 0, %39
  %41 = load i32, ptr @y, align 4, !tbaa !5
  %42 = sub nsw i32 %40, %41
  store i32 %42, ptr %5, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 3), ptr noundef nonnull align 4 dereferenceable(4) %5)
  %44 = load i32, ptr %43, align 4, !tbaa !5
  store i32 %44, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 3), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %17, !llvm.loop !9

45:                                               ; preds = %17
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @h)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %89, %45
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = load i32, ptr @h, align 4, !tbaa !5
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %92

52:                                               ; preds = %47
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @x, ptr noundef @y)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %54 = load i32, ptr @d, align 16, !tbaa !5
  %55 = load i32, ptr @x, align 4, !tbaa !5
  %56 = sub nsw i32 %54, %55
  %57 = load i32, ptr @y, align 4, !tbaa !5
  %58 = sub nsw i32 %56, %57
  store i32 %58, ptr %9, align 4, !tbaa !5
  %59 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i32 %59, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %60 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 1), align 4, !tbaa !5
  %61 = load i32, ptr @x, align 4, !tbaa !5
  %62 = sub nsw i32 %60, %61
  %63 = load i32, ptr @y, align 4, !tbaa !5
  %64 = add nsw i32 %62, %63
  store i32 %64, ptr %11, align 4, !tbaa !5
  %65 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %11)
  store i32 %65, ptr %10, align 4, !tbaa !5
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %67 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 2), align 8, !tbaa !5
  %68 = load i32, ptr @x, align 4, !tbaa !5
  %69 = add nsw i32 %67, %68
  %70 = load i32, ptr @y, align 4, !tbaa !5
  %71 = sub nsw i32 %69, %70
  store i32 %71, ptr %13, align 4, !tbaa !5
  %72 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %13)
  store i32 %72, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %73 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @d, i64 0, i64 3), align 4, !tbaa !5
  %74 = load i32, ptr @x, align 4, !tbaa !5
  %75 = add nsw i32 %73, %74
  %76 = load i32, ptr @y, align 4, !tbaa !5
  %77 = add nsw i32 %75, %76
  store i32 %77, ptr %15, align 4, !tbaa !5
  %78 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 %78, ptr %14, align 4, !tbaa !5
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef nonnull align 4 dereferenceable(4) %79)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  store i32 %81, ptr %7, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr @ans, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %88

85:                                               ; preds = %52
  %86 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %86, ptr @ans, align 4, !tbaa !5
  %87 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %87, ptr @pos, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %85, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %6, align 4, !tbaa !5
  br label %47, !llvm.loop !11

92:                                               ; preds = %51
  %93 = load i32, ptr @ans, align 4, !tbaa !5
  %94 = load i32, ptr @pos, align 4, !tbaa !5
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %93, i32 noundef %94)
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4)) #2

declare i32 @printf(ptr noundef, ...) #1

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@c = external dso_local global i32, align 4
@h = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@d = external dso_local global [4 x i32], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@pos = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @c)
  %14 = load i32, ptr @c, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr @c, align 4, !tbaa !5
  %.not11 = icmp eq i32 %14, 0
  br i1 %.not11, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x, ptr noundef nonnull @y)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %17 = load i32, ptr @x, align 4, !tbaa !5
  %18 = load i32, ptr @y, align 4, !tbaa !5
  %19 = add nsw i32 %18, %17
  store i32 %19, ptr %1, align 4, !tbaa !5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @d, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %21 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %21, ptr @d, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %22 = load i32, ptr @x, align 4, !tbaa !5
  %23 = load i32, ptr @y, align 4, !tbaa !5
  %24 = sub nsw i32 %22, %23
  store i32 %24, ptr %2, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @d, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %2)
  %26 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %26, ptr getelementptr inbounds (i8, ptr @d, i64 4), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %27 = load i32, ptr @x, align 4, !tbaa !5
  %28 = load i32, ptr @y, align 4, !tbaa !5
  %29 = sub i32 %28, %27
  store i32 %29, ptr %3, align 4, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @d, i64 8), ptr noundef nonnull align 4 dereferenceable(4) %3)
  %31 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %31, ptr getelementptr inbounds (i8, ptr @d, i64 8), align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %32 = load i32, ptr @x, align 4, !tbaa !5
  %33 = load i32, ptr @y, align 4, !tbaa !5
  %34 = add i32 %32, %33
  %35 = sub i32 0, %34
  store i32 %35, ptr %4, align 4, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @d, i64 12), ptr noundef nonnull align 4 dereferenceable(4) %4)
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr getelementptr inbounds (i8, ptr @d, i64 12), align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  %38 = load i32, ptr @c, align 4, !tbaa !5
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr @c, align 4, !tbaa !5
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %0
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @h)
  %41 = load i32, ptr @h, align 4, !tbaa !5
  %.not612 = icmp slt i32 %41, 1
  br i1 %.not612, label %._crit_edge.._crit_edge16_crit_edge, label %.lr.ph15

._crit_edge.._crit_edge16_crit_edge:              ; preds = %._crit_edge
  %.pre = load i32, ptr @ans, align 4, !tbaa !5
  br label %._crit_edge16

._crit_edge16:                                    ; preds = %77, %._crit_edge.._crit_edge16_crit_edge
  %42 = phi i32 [ %.pre, %._crit_edge.._crit_edge16_crit_edge ], [ %78, %77 ]
  %43 = load i32, ptr @pos, align 4, !tbaa !5
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %42, i32 noundef %43)
  ret i32 0

.lr.ph15:                                         ; preds = %._crit_edge, %77
  %.013 = phi i32 [ %79, %77 ], [ 1, %._crit_edge ]
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x, ptr noundef nonnull @y)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %46 = load i32, ptr @d, align 16, !tbaa !5
  %47 = load i32, ptr @x, align 4, !tbaa !5
  %48 = load i32, ptr @y, align 4, !tbaa !5
  %49 = add i32 %47, %48
  %50 = sub i32 %46, %49
  store i32 %50, ptr %6, align 4, !tbaa !5
  %51 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i32 %51, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 4), align 4, !tbaa !5
  %53 = load i32, ptr @x, align 4, !tbaa !5
  %54 = sub i32 %52, %53
  %55 = load i32, ptr @y, align 4, !tbaa !5
  %56 = add nsw i32 %54, %55
  store i32 %56, ptr %8, align 4, !tbaa !5
  %57 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i32 %57, ptr %7, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 8), align 8, !tbaa !5
  %60 = load i32, ptr @x, align 4, !tbaa !5
  %61 = add nsw i32 %60, %59
  %62 = load i32, ptr @y, align 4, !tbaa !5
  %63 = sub i32 %61, %62
  store i32 %63, ptr %10, align 4, !tbaa !5
  %64 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i32 %64, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @d, i64 12), align 4, !tbaa !5
  %66 = load i32, ptr @x, align 4, !tbaa !5
  %67 = add nsw i32 %66, %65
  %68 = load i32, ptr @y, align 4, !tbaa !5
  %69 = add nsw i32 %67, %68
  store i32 %69, ptr %12, align 4, !tbaa !5
  %70 = call noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %12)
  store i32 %70, ptr %11, align 4, !tbaa !5
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %71)
  %73 = load i32, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %74 = load i32, ptr @ans, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %76, label %77

76:                                               ; preds = %.lr.ph15
  store i32 %73, ptr @ans, align 4, !tbaa !5
  store i32 %.013, ptr @pos, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %76, %.lr.ph15
  %78 = phi i32 [ %73, %76 ], [ %74, %.lr.ph15 ]
  %79 = add nuw nsw i32 %.013, 1
  %80 = load i32, ptr @h, align 4, !tbaa !5
  %.not6.not = icmp slt i32 %.013, %80
  br i1 %.not6.not, label %.lr.ph15, label %._crit_edge16, !llvm.loop !11
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3absIiET_RKS0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass