; LLVM IR from shellphish/how2heap :: glibc_2.32 (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 [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [205 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [217 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [193 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.43 = 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 [16 x i64], align 16
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca [7 x ptr], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  %18 = load ptr, ptr @stdin, align 8, !tbaa !5
  call void @setbuf(ptr noundef %18, ptr noundef null) #6
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  call void @setbuf(ptr noundef %19, ptr noundef null) #6
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %24 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  call void @llvm.lifetime.start.p0(i64 128, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %41, %0
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 16
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 2, ptr %5, align 4
  br label %44

29:                                               ; preds = %25
  %30 = load i32, ptr %4, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [16 x i64], ptr %2, i64 0, i64 %31
  %33 = ptrtoint ptr %32 to i64
  %34 = and i64 %33, 15
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %29
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [16 x i64], ptr %2, i64 0, i64 %38
  store ptr %39, ptr %3, align 8, !tbaa !5
  store i32 2, ptr %5, align 4
  br label %44

40:                                               ; preds = %29
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !9
  br label %25, !llvm.loop !11

44:                                               ; preds = %36, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  br label %50

49:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 46, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

50:                                               ; preds = %48
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, ptr noundef %51)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %54 = call noalias ptr @malloc(i64 noundef 56) #8
  store ptr %54, ptr %6, align 8, !tbaa !5
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %57, i64 0
  store i64 0, ptr %58, align 8, !tbaa !13
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds i64, ptr %59, i64 1
  store i64 96, ptr %60, align 8, !tbaa !13
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = ptrtoint ptr %61 to i64
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds i64, ptr %63, i64 2
  store i64 %62, ptr %64, align 8, !tbaa !13
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = ptrtoint ptr %65 to i64
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds i64, ptr %67, i64 3
  store i64 %66, ptr %68, align 8, !tbaa !13
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef %69)
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds i64, ptr %71, i64 0
  %73 = load i64, ptr %72, align 8, !tbaa !13
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i64 noundef %73)
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds i64, ptr %75, i64 1
  %77 = load i64, ptr %76, align 8, !tbaa !13
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i64 noundef %77)
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds i64, ptr %79, i64 2
  %81 = load i64, ptr %80, align 8, !tbaa !13
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i64 noundef %81)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds i64, ptr %83, i64 3
  %85 = load i64, ptr %84, align 8, !tbaa !13
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i64 noundef %85)
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %88 = call noalias ptr @malloc(i64 noundef 40) #8
  store ptr %88, ptr %7, align 8, !tbaa !5
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, ptr noundef %89)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = call i64 @malloc_usable_size(ptr noundef %91) #6
  %93 = trunc i64 %92 to i32
  store i32 %93, ptr %8, align 4, !tbaa !9
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, i32 noundef %94)
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %97 = call noalias ptr @malloc(i64 noundef 248) #8
  store ptr %97, ptr %9, align 8, !tbaa !5
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.20, ptr noundef %98)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 -8
  store ptr %101, ptr %10, align 8, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i64, ptr %102, align 8, !tbaa !13
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, i64 noundef %103)
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %107, i64 %109
  store i8 0, ptr %110, align 1, !tbaa !15
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load i64, ptr %111, align 8, !tbaa !13
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, i64 noundef %112)
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i64 noundef 8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %116, i64 -16
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = ptrtoint ptr %117 to i64
  %120 = ptrtoint ptr %118 to i64
  %121 = sub i64 %119, %120
  store i64 %121, ptr %11, align 8, !tbaa !13
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i64 -16
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = load i64, ptr %11, align 8, !tbaa !13
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, ptr noundef %123, ptr noundef %124, i64 noundef %125)
  %127 = load i64, ptr %11, align 8, !tbaa !13
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load i32, ptr %8, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = sub i64 %130, 8
  %132 = getelementptr inbounds i8, ptr %128, i64 %131
  store i64 %127, ptr %132, align 8, !tbaa !13
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  %134 = load i64, ptr %11, align 8, !tbaa !13
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds i64, ptr %135, i64 1
  store i64 %134, ptr %136, align 8, !tbaa !13
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds i64, ptr %137, i64 1
  %139 = load i64, ptr %138, align 8, !tbaa !13
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.29, i64 noundef %139)
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.30)
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %152, %50
  %143 = load i32, ptr %13, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = icmp ult i64 %144, 7
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %155

147:                                              ; preds = %142
  %148 = call noalias ptr @malloc(i64 noundef 248) #8
  %149 = load i32, ptr %13, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [7 x ptr], ptr %12, i64 0, i64 %150
  store ptr %148, ptr %151, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %147
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %13, align 4, !tbaa !9
  br label %142, !llvm.loop !16

155:                                              ; preds = %146
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %167, %155
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = icmp ult i64 %159, 7
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %170

162:                                              ; preds = %157
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [7 x ptr], ptr %12, i64 0, i64 %164
  %166 = load ptr, ptr %165, align 8, !tbaa !5
  call void @free(ptr noundef %166) #6
  br label %167

167:                                              ; preds = %162
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %14, align 4, !tbaa !9
  br label %157, !llvm.loop !17

170:                                              ; preds = %161
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.32)
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %172) #6
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds i64, ptr %173, i64 1
  %175 = load i64, ptr %174, align 8, !tbaa !13
  %176 = call i32 (ptr, ...) @printf(ptr noundef @.str.33, i64 noundef %175)
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.34)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %178 = call noalias ptr @malloc(i64 noundef 344) #8
  store ptr %178, ptr %15, align 8, !tbaa !5
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str.35, ptr noundef %179)
  %181 = call i32 (ptr, ...) @printf(ptr noundef @.str.36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %182 = call noalias ptr @malloc(i64 noundef 40) #8
  store ptr %182, ptr %16, align 8, !tbaa !5
  %183 = load ptr, ptr %16, align 8, !tbaa !5
  call void @free(ptr noundef %183) #6
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %185) #6
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.38, ptr noundef %186, ptr noundef %187)
  %189 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = ptrtoint ptr %190 to i64
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = getelementptr inbounds i64, ptr %192, i64 6
  %194 = ptrtoint ptr %193 to i64
  %195 = ashr i64 %194, 12
  %196 = xor i64 %191, %195
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = getelementptr inbounds i64, ptr %197, i64 6
  store i64 %196, ptr %198, align 8, !tbaa !13
  %199 = call i32 (ptr, ...) @printf(ptr noundef @.str.40)
  %200 = call noalias ptr @malloc(i64 noundef 40) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %201 = call noalias ptr @malloc(i64 noundef 40) #8
  store ptr %201, ptr %17, align 8, !tbaa !5
  %202 = load ptr, ptr %17, align 8, !tbaa !5
  %203 = call i32 (ptr, ...) @printf(ptr noundef @.str.41, ptr noundef %202)
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = icmp eq ptr %204, %205
  br i1 %206, label %207, label %208

207:                                              ; preds = %170
  br label %209

208:                                              ; preds = %170
  call void @__assert_fail(ptr noundef @.str.42, ptr noundef @.str.6, i32 noundef 155, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

209:                                              ; preds = %207
  %210 = call i32 (ptr, ...) @printf(ptr noundef @.str.43)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %2) #6
  %211 = load i32, ptr %1, align 4
  ret i32 %211
}

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

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

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

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

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

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 = { 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 #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 }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; 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 [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [205 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [85 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [217 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [105 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [193 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [12 x i8], align 1

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

; 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: nounwind
declare i64 @malloc_usable_size(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture 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 = { 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 #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 = { 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 = { 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 #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: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass