; LLVM IR from shellphish/how2heap :: glibc_2.31 (house_of_einherjar)

; 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"

@stdin = external global ptr, align 8
@stdout = external global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [146 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [217 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [193 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [4 x i64], align 16
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca [7 x ptr], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  %15 = load ptr, ptr @stdin, align 8, !tbaa !5
  call void @setbuf(ptr noundef %15, ptr noundef null) #6
  %16 = load ptr, ptr @stdout, align 8, !tbaa !5
  call void @setbuf(ptr noundef %16, ptr noundef null) #6
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %19 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #6
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %2)
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %23 = call noalias ptr @malloc(i64 noundef 56) #7
  store ptr %23, ptr %3, align 8, !tbaa !5
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds i64, ptr %26, i64 0
  store i64 0, ptr %27, align 8, !tbaa !9
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds i64, ptr %28, i64 1
  store i64 96, ptr %29, align 8, !tbaa !9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds i64, ptr %32, i64 2
  store i64 %31, ptr %33, align 8, !tbaa !9
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = ptrtoint ptr %34 to i64
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds i64, ptr %36, i64 3
  store i64 %35, ptr %37, align 8, !tbaa !9
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %38)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds i64, ptr %40, i64 0
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i64 noundef %42)
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds i64, ptr %44, i64 1
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i64 noundef %46)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %48, i64 2
  %50 = load i64, ptr %49, align 8, !tbaa !9
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i64 noundef %50)
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds i64, ptr %52, i64 3
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i64 noundef %54)
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %57 = call noalias ptr @malloc(i64 noundef 40) #7
  store ptr %57, ptr %4, align 8, !tbaa !5
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %58)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = call i64 @malloc_usable_size(ptr noundef %60) #6
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %5, align 4, !tbaa !11
  %63 = load i32, ptr %5, align 4, !tbaa !11
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %63)
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %66 = call noalias ptr @malloc(i64 noundef 248) #7
  store ptr %66, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 -8
  store ptr %70, ptr %7, align 8, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i64 noundef %72)
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  store i8 0, ptr %79, align 1, !tbaa !13
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = load i64, ptr %80, align 8, !tbaa !9
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i64 noundef %81)
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i64 noundef 8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 -16
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = ptrtoint ptr %86 to i64
  %89 = ptrtoint ptr %87 to i64
  %90 = sub i64 %88, %89
  store i64 %90, ptr %8, align 8, !tbaa !9
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i64 -16
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = load i64, ptr %8, align 8, !tbaa !9
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, ptr noundef %92, ptr noundef %93, i64 noundef %94)
  %96 = load i64, ptr %8, align 8, !tbaa !9
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !11
  %99 = sext i32 %98 to i64
  %100 = sub i64 %99, 8
  %101 = getelementptr inbounds i8, ptr %97, i64 %100
  store i64 %96, ptr %101, align 8, !tbaa !9
  %102 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %103 = load i64, ptr %8, align 8, !tbaa !9
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds i64, ptr %104, i64 1
  store i64 %103, ptr %105, align 8, !tbaa !9
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds i64, ptr %106, i64 1
  %108 = load i64, ptr %107, align 8, !tbaa !9
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i64 noundef %108)
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  call void @llvm.lifetime.start.p0(i64 56, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !11
  br label %111

111:                                              ; preds = %121, %0
  %112 = load i32, ptr %10, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = icmp ult i64 %113, 7
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %124

116:                                              ; preds = %111
  %117 = call noalias ptr @malloc(i64 noundef 248) #7
  %118 = load i32, ptr %10, align 4, !tbaa !11
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [7 x ptr], ptr %9, i64 0, i64 %119
  store ptr %117, ptr %120, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %116
  %122 = load i32, ptr %10, align 4, !tbaa !11
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !11
  br label %111, !llvm.loop !14

124:                                              ; preds = %115
  %125 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %126

126:                                              ; preds = %136, %124
  %127 = load i32, ptr %11, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = icmp ult i64 %128, 7
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %139

131:                                              ; preds = %126
  %132 = load i32, ptr %11, align 4, !tbaa !11
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [7 x ptr], ptr %9, i64 0, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  call void @free(ptr noundef %135) #6
  br label %136

136:                                              ; preds = %131
  %137 = load i32, ptr %11, align 4, !tbaa !11
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %11, align 4, !tbaa !11
  br label %126, !llvm.loop !16

139:                                              ; preds = %130
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.29)
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %141) #6
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds i64, ptr %142, i64 1
  %144 = load i64, ptr %143, align 8, !tbaa !9
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.30, i64 noundef %144)
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %147 = call noalias ptr @malloc(i64 noundef 344) #7
  store ptr %147, ptr %12, align 8, !tbaa !5
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, ptr noundef %148)
  %150 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %151 = call noalias ptr @malloc(i64 noundef 40) #7
  store ptr %151, ptr %13, align 8, !tbaa !5
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  call void @free(ptr noundef %152) #6
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.34)
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %154) #6
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.35, ptr noundef %155, ptr noundef %156)
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.36)
  %159 = getelementptr inbounds [4 x i64], ptr %2, i64 0, i64 0
  %160 = ptrtoint ptr %159 to i64
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = getelementptr inbounds i64, ptr %161, i64 6
  store i64 %160, ptr %162, align 8, !tbaa !9
  %163 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %164 = call noalias ptr @malloc(i64 noundef 40) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %165 = call noalias ptr @malloc(i64 noundef 40) #7
  store ptr %165, ptr %14, align 8, !tbaa !5
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef %166)
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = getelementptr inbounds [4 x i64], ptr %2, i64 0, i64 0
  %170 = icmp eq ptr %168, %169
  br i1 %170, label %171, label %172

171:                                              ; preds = %139
  br label %173

172:                                              ; preds = %139
  call void @__assert_fail(ptr noundef @.str.39, ptr noundef @.str.40, i32 noundef 136, ptr noundef @__PRETTY_FUNCTION__.main) #8
  unreachable

173:                                              ; preds = %171
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.41)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #6
  %175 = load i32, ptr %1, align 4
  ret i32 %175
}

; Function Attrs: nounwind
declare void @setbuf(ptr noundef, ptr noundef) #1

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind
declare i64 @malloc_usable_size(ptr noundef) #1

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

attributes #0 = { 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 = { 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 = { "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 allocsize(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 #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { noreturn 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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"

@stdin = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [34 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [146 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [217 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [193 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [4 x i64], align 16
  %2 = load ptr, ptr @stdin, align 8, !tbaa !5
  tail call void @setbuf(ptr noundef %2, ptr noundef null) #7
  %3 = load ptr, ptr @stdout, align 8, !tbaa !5
  tail call void @setbuf(ptr noundef %3, ptr noundef null) #7
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %1)
  %9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %10 = call noalias dereferenceable_or_null(56) ptr @malloc(i64 noundef 56) #8
  %11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  store i64 0, ptr %10, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %10, i64 8
  store i64 96, ptr %13, align 8, !tbaa !9
  %14 = ptrtoint ptr %10 to i64
  %15 = getelementptr inbounds i8, ptr %10, i64 16
  store i64 %14, ptr %15, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %10, i64 24
  store i64 %14, ptr %16, align 8, !tbaa !9
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull %10)
  %18 = load i64, ptr %10, align 8, !tbaa !9
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef %18)
  %20 = load i64, ptr %13, align 8, !tbaa !9
  %21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i64 noundef %20)
  %22 = load i64, ptr %15, align 8, !tbaa !9
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i64 noundef %22)
  %24 = load i64, ptr %16, align 8, !tbaa !9
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i64 noundef %24)
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %27 = call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #8
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef %27)
  %29 = call i64 @malloc_usable_size(ptr noundef %27) #7
  %30 = trunc i64 %29 to i32
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %30)
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %33 = call noalias dereferenceable_or_null(248) ptr @malloc(i64 noundef 248) #8
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef %33)
  %35 = getelementptr inbounds i8, ptr %33, i64 -8
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, i64 noundef %36)
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  %sext = shl i64 %29, 32
  %40 = ashr exact i64 %sext, 32
  %41 = getelementptr inbounds i8, ptr %27, i64 %40
  store i8 0, ptr %41, align 1, !tbaa !11
  %42 = load i64, ptr %35, align 8, !tbaa !9
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, i64 noundef %42)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i64 noundef 8)
  %46 = getelementptr inbounds i8, ptr %33, i64 -16
  %47 = ptrtoint ptr %46 to i64
  %48 = sub i64 %47, %14
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, ptr noundef nonnull %46, ptr noundef nonnull %10, i64 noundef %48)
  %50 = getelementptr i8, ptr %41, i64 -8
  store i64 %48, ptr %50, align 8, !tbaa !9
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  store i64 %48, ptr %13, align 8, !tbaa !9
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i64 noundef %48)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29)
  call void @free(ptr noundef %33) #7
  %56 = load i64, ptr %13, align 8, !tbaa !9
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30, i64 noundef %56)
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31)
  %59 = call noalias dereferenceable_or_null(344) ptr @malloc(i64 noundef 344) #8
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, ptr noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  %62 = call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #8
  call void @free(ptr noundef %62) #7
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.34)
  call void @free(ptr noundef %27) #7
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35, ptr noundef %27, ptr noundef %62)
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36)
  %66 = ptrtoint ptr %1 to i64
  %67 = getelementptr inbounds i8, ptr %59, i64 48
  store i64 %66, ptr %67, align 8, !tbaa !9
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %69 = call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #8
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38, ptr noundef %69)
  call void @__assert_fail(ptr noundef nonnull @.str.39, ptr noundef nonnull @.str.40, i32 noundef 136, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable
}

; Function Attrs: nofree nounwind
declare void @setbuf(ptr nocapture noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @malloc_usable_size(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

attributes #0 = { noreturn 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #4 = { 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 #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { noreturn 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 #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass