; LLVM IR from shellphish/how2heap :: glibc_2.32 (safe_link_double_protect)

; 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
@stderr = external global ptr, align 8
@__const.main.goal = external hidden unnamed_addr constant [12 x i8], align 1
@.str = external hidden unnamed_addr constant [61 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1

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

121:                                              ; preds = %0
  br label %123

122:                                              ; preds = %0
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.33, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

123:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %1) #8
  ret i32 0
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare i32 @puts(ptr noundef) #4

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #6

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

; Function Attrs: 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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 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 #6 = { nounwind willreturn memory(read) "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 = { 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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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}


; 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
@stderr = external local_unnamed_addr global ptr, align 8
@__const.main.goal = external hidden unnamed_addr constant [12 x i8], align 1
@.str = external hidden unnamed_addr constant [61 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [12 x i8], align 1
  %2 = load ptr, ptr @stdin, align 8, !tbaa !5
  tail call void @setbuf(ptr noundef %2, ptr noundef null) #9
  %3 = load ptr, ptr @stdout, align 8, !tbaa !5
  tail call void @setbuf(ptr noundef %3, ptr noundef null) #9
  %4 = load ptr, ptr @stderr, align 8, !tbaa !5
  tail call void @setbuf(ptr noundef %4, ptr noundef null) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(12) %1, ptr noundef nonnull align 1 dereferenceable(12) @__const.main.goal, i64 12, i1 false)
  %5 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  %6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %1)
  %7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %1)
  %8 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  %9 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %10 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  %11 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  %12 = call noalias dereferenceable_or_null(56) ptr @malloc(i64 noundef 56) #10
  %13 = call noalias dereferenceable_or_null(56) ptr @malloc(i64 noundef 56) #10
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef %12)
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, ptr noundef %13)
  %16 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #10
  %17 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #10
  %18 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.8)
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef %16)
  %20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, ptr noundef %17)
  %21 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %22 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.12)
  %23 = call noalias dereferenceable_or_null(40) ptr @malloc(i64 noundef 40) #10
  %24 = ptrtoint ptr %1 to i64
  %25 = and i64 %24, -16
  store i64 %25, ptr %23, align 8, !tbaa !9
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef %25, ptr noundef nonnull %23)
  %27 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %28 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.14)
  %29 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.15)
  call void @free(ptr noundef %12) #9
  call void @free(ptr noundef %13) #9
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, ptr noundef %13, ptr noundef %12)
  %31 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.17)
  call void @free(ptr noundef %16) #9
  call void @free(ptr noundef %17) #9
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, ptr noundef %17, ptr noundef %16)
  %33 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %34 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.19)
  %35 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.20)
  %36 = ptrtoint ptr %23 to i64
  %37 = and i64 %36, -4096
  %38 = inttoptr i64 %37 to ptr
  %39 = trunc i64 %36 to i32
  %40 = getelementptr inbounds i8, ptr %38, i64 160
  store i32 %39, ptr %40, align 32, !tbaa !11
  %41 = load i64, ptr %23, align 8, !tbaa !9
  %42 = ashr i64 %36, 12
  %43 = xor i64 %41, %42
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, ptr noundef nonnull %23, i64 noundef %43)
  %45 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %46 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.22)
  %47 = load i64, ptr %40, align 32, !tbaa !9
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i64 noundef %47)
  %49 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %50 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.24)
  %51 = or disjoint i64 %37, 160
  %52 = trunc i64 %51 to i32
  %53 = getelementptr inbounds i8, ptr %38, i64 144
  store i32 %52, ptr %53, align 16, !tbaa !11
  %54 = load i64, ptr %23, align 8, !tbaa !9
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, i64 noundef %51, i64 noundef %54)
  %56 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %57 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.26)
  %58 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #10
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, ptr noundef %58)
  %60 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #10
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, ptr noundef %60)
  %62 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.11)
  %63 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %60, ptr noundef nonnull dereferenceable(1) @.str.29) #9
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30, ptr noundef nonnull %1)
  %65 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str.31) #11
  %.not = icmp eq i32 %65, 0
  br i1 %.not, label %66, label %67

66:                                               ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.33, i32 noundef 127, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #12
  unreachable

67:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #9
  ret i32 0
}

; Function Attrs: nofree nounwind
declare void @setbuf(ptr nocapture noundef, ptr noundef) 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 nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 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 nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7

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

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind willreturn memory(read) }
attributes #12 = { 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}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass