; LLVM IR from shellphish/how2heap :: glibc_2.23 (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 [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1

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

; 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: nounwind
declare void @free(ptr noundef) #1

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

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 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}


; 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 [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [29 x i8], align 1

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

; 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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 = { 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 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass