; LLVM IR from 0xilis/libNeoAppleArchive :: libNeoAppleArchive (neo_aa_header)

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

%struct.neo_aa_header_impl = type { i32, ptr, ptr, ptr, ptr, ptr, i64, ptr }

@stderr = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@__FUNCTION__.neo_aa_header_add_field_string = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [72 x i8], align 1

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

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

; 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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #4

declare i32 @internal_do_not_call_flip_edian_32(i32 noundef) #5

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @neo_aa_header_add_field_string(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr noundef %3) #6 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i16, align 2
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %27, label %24

24:                                               ; preds = %4
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.11, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string) #8
  call void @exit(i32 noundef 1) #9
  unreachable

27:                                               ; preds = %4
  %28 = load i64, ptr %7, align 8, !tbaa !11
  %29 = icmp ugt i64 %28, 65535
  br i1 %29, label %30, label %34

30:                                               ; preds = %27
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = load i64, ptr %7, align 8, !tbaa !11
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.12, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, i64 noundef %32) #8
  br label %208

34:                                               ; preds = %27
  %35 = load i32, ptr %6, align 4, !tbaa !9
  call void @internal_do_not_call_is_field_key_available(i32 noundef %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %36, i32 0, i32 6
  %38 = load i64, ptr %37, align 8, !tbaa !13
  store i64 %38, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %39 = load i64, ptr %9, align 8, !tbaa !11
  %40 = add i64 %39, 6
  %41 = load i64, ptr %7, align 8, !tbaa !11
  %42 = add i64 %40, %41
  store i64 %42, ptr %10, align 8, !tbaa !11
  %43 = load i64, ptr %10, align 8, !tbaa !11
  %44 = icmp ugt i64 %43, 65535
  br i1 %44, label %45, label %49

45:                                               ; preds = %34
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = load i64, ptr %10, align 8, !tbaa !11
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.13, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, i64 noundef %47) #8
  store i32 1, ptr %11, align 4
  br label %206

49:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !15
  store ptr %52, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !16
  store i32 %55, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load i64, ptr %10, align 8, !tbaa !11
  %58 = call ptr @realloc(ptr noundef %56, i64 noundef %57) #10
  store ptr %58, ptr %14, align 8, !tbaa !5
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %64, label %61

61:                                               ; preds = %49
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef @.str.7, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef @.str.10) #8
  store i32 1, ptr %11, align 4
  br label %205

64:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !17
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = add i32 %68, 1
  %70 = zext i32 %69 to i64
  %71 = mul i64 %70, 4
  %72 = call ptr @realloc(ptr noundef %67, i64 noundef %71) #10
  store ptr %72, ptr %15, align 8, !tbaa !5
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = icmp ne ptr %73, null
  br i1 %74, label %78, label %75

75:                                               ; preds = %64
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.7, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef @.str.10) #8
  store i32 1, ptr %11, align 4
  br label %204

78:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = load i32, ptr %13, align 4, !tbaa !9
  %83 = add i32 %82, 1
  %84 = zext i32 %83 to i64
  %85 = call ptr @realloc(ptr noundef %81, i64 noundef %84) #10
  store ptr %85, ptr %16, align 8, !tbaa !5
  %86 = load ptr, ptr %16, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %91, label %88

88:                                               ; preds = %78
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.7, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef @.str.10) #8
  store i32 1, ptr %11, align 4
  br label %203

91:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %92, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !19
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = add i32 %95, 1
  %97 = zext i32 %96 to i64
  %98 = mul i64 %97, 8
  %99 = call ptr @realloc(ptr noundef %94, i64 noundef %98) #10
  store ptr %99, ptr %17, align 8, !tbaa !5
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %105, label %102

102:                                              ; preds = %91
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.7, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef @.str.10) #8
  store i32 1, ptr %11, align 4
  br label %202

105:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %106, i32 0, i32 5
  %108 = load ptr, ptr %107, align 8, !tbaa !20
  %109 = load i32, ptr %13, align 4, !tbaa !9
  %110 = add i32 %109, 1
  %111 = zext i32 %110 to i64
  %112 = mul i64 %111, 8
  %113 = call ptr @realloc(ptr noundef %108, i64 noundef %112) #10
  store ptr %113, ptr %18, align 8, !tbaa !5
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = icmp ne ptr %114, null
  br i1 %115, label %119, label %116

116:                                              ; preds = %105
  %117 = load ptr, ptr @stderr, align 8, !tbaa !5
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str.7, ptr noundef @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef @.str.10) #8
  store i32 1, ptr %11, align 4
  br label %201

119:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #8
  %120 = load i64, ptr %10, align 8, !tbaa !11
  %121 = trunc i64 %120 to i16
  store i16 %121, ptr %19, align 2, !tbaa !21
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %123, ptr align 2 %19, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %124 = load i32, ptr %6, align 4, !tbaa !9
  %125 = call i32 @internal_do_not_call_flip_edian_32(i32 noundef %124)
  store i32 %125, ptr %20, align 4, !tbaa !9
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = load i64, ptr %9, align 8, !tbaa !11
  %128 = getelementptr inbounds i8, ptr %126, i64 %127
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %128, ptr align 4 %20, i64 4, i1 false)
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = load i64, ptr %9, align 8, !tbaa !11
  %131 = add i64 %130, 3
  %132 = getelementptr inbounds i8, ptr %129, i64 %131
  store i8 80, ptr %132, align 1, !tbaa !23
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = load i64, ptr %9, align 8, !tbaa !11
  %135 = getelementptr inbounds i8, ptr %133, i64 %134
  %136 = getelementptr inbounds i8, ptr %135, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %136, ptr align 8 %7, i64 2, i1 false)
  %137 = load i64, ptr %7, align 8, !tbaa !11
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %147

139:                                              ; preds = %119
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = load i64, ptr %9, align 8, !tbaa !11
  %142 = getelementptr inbounds i8, ptr %140, i64 %141
  %143 = getelementptr inbounds i8, ptr %142, i64 6
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = load i64, ptr %7, align 8, !tbaa !11
  %146 = call ptr @strncpy(ptr noundef %143, ptr noundef %144, i64 noundef %145) #8
  br label %147

147:                                              ; preds = %139, %119
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %149, i32 0, i32 1
  store ptr %148, ptr %150, align 8, !tbaa !15
  %151 = load i64, ptr %10, align 8, !tbaa !11
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %152, i32 0, i32 6
  store i64 %151, ptr %153, align 8, !tbaa !13
  %154 = load i64, ptr %7, align 8, !tbaa !11
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = load i32, ptr %13, align 4, !tbaa !9
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds i64, ptr %155, i64 %157
  store i64 %154, ptr %158, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %159 = load i64, ptr %7, align 8, !tbaa !11
  %160 = icmp ne i64 %159, 0
  br i1 %160, label %161, label %169

161:                                              ; preds = %147
  %162 = load i64, ptr %7, align 8, !tbaa !11
  %163 = add i64 %162, 1
  %164 = call noalias ptr @malloc(i64 noundef %163) #11
  store ptr %164, ptr %21, align 8, !tbaa !5
  %165 = load ptr, ptr %21, align 8, !tbaa !5
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = load i64, ptr %7, align 8, !tbaa !11
  %168 = call ptr @strncpy(ptr noundef %165, ptr noundef %166, i64 noundef %167) #8
  br label %170

169:                                              ; preds = %147
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %170

170:                                              ; preds = %169, %161
  %171 = load ptr, ptr %21, align 8, !tbaa !5
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds ptr, ptr %172, i64 %174
  store ptr %171, ptr %175, align 8, !tbaa !5
  %176 = load ptr, ptr %16, align 8, !tbaa !5
  %177 = load i32, ptr %13, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds i8, ptr %176, i64 %178
  store i8 2, ptr %179, align 1, !tbaa !23
  %180 = load i32, ptr %6, align 4, !tbaa !9
  %181 = load ptr, ptr %15, align 8, !tbaa !5
  %182 = load i32, ptr %13, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %181, i64 %183
  store i32 %180, ptr %184, align 4, !tbaa !9
  %185 = load i32, ptr %13, align 4, !tbaa !9
  %186 = add i32 %185, 1
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %187, i32 0, i32 0
  store i32 %186, ptr %188, align 8, !tbaa !16
  %189 = load ptr, ptr %17, align 8, !tbaa !5
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %190, i32 0, i32 4
  store ptr %189, ptr %191, align 8, !tbaa !19
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %193, i32 0, i32 2
  store ptr %192, ptr %194, align 8, !tbaa !17
  %195 = load ptr, ptr %16, align 8, !tbaa !5
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %196, i32 0, i32 3
  store ptr %195, ptr %197, align 8, !tbaa !18
  %198 = load ptr, ptr %18, align 8, !tbaa !5
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.neo_aa_header_impl, ptr %199, i32 0, i32 5
  store ptr %198, ptr %200, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #8
  store i32 0, ptr %11, align 4
  br label %201

201:                                              ; preds = %170, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %202

202:                                              ; preds = %201, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %203

203:                                              ; preds = %202, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %204

204:                                              ; preds = %203, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %205

205:                                              ; preds = %204, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %206

206:                                              ; preds = %205, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  %207 = load i32, ptr %11, align 4
  switch i32 %207, label %209 [
    i32 0, label %208
    i32 1, label %208
  ]

208:                                              ; preds = %206, %206, %30
  ret void

209:                                              ; preds = %206
  unreachable
}

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

declare void @internal_do_not_call_is_field_key_available(i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind allocsize(1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 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 #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 = { noreturn nounwind }
attributes #10 = { nounwind allocsize(1) }
attributes #11 = { 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 = !{!14, !12, i64 48}
!14 = !{!"neo_aa_header_impl", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !10, i64 0}
!17 = !{!14, !6, i64 16}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !6, i64 32}
!20 = !{!14, !6, i64 40}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@__FUNCTION__.neo_aa_header_add_field_string = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [72 x i8], align 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 #0

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #2

declare i32 @internal_do_not_call_flip_edian_32(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @neo_aa_header_add_field_string(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #5 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %5, label %8

5:                                                ; preds = %4
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.11, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string) #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

8:                                                ; preds = %4
  %9 = icmp ugt i64 %2, 65535
  br i1 %9, label %10, label %13

10:                                               ; preds = %8
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.12, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, i64 noundef %2) #7
  br label %84

13:                                               ; preds = %8
  tail call void @internal_do_not_call_is_field_key_available(i32 noundef %1) #9
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = add nuw nsw i64 %2, 6
  %17 = add i64 %16, %15
  %18 = icmp ugt i64 %17, 65535
  br i1 %18, label %19, label %22

19:                                               ; preds = %13
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.13, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, i64 noundef %17) #7
  br label %84

22:                                               ; preds = %13
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = load i32, ptr %0, align 8, !tbaa !14
  %26 = tail call ptr @realloc(ptr noundef %24, i64 noundef %17) #10
  %.not80 = icmp eq ptr %26, null
  br i1 %.not80, label %27, label %30

27:                                               ; preds = %22
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.7, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef nonnull @.str.10) #7
  br label %84

30:                                               ; preds = %22
  %31 = getelementptr inbounds i8, ptr %0, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = add i32 %25, 1
  %34 = zext i32 %33 to i64
  %35 = shl nuw nsw i64 %34, 2
  %36 = tail call ptr @realloc(ptr noundef %32, i64 noundef %35) #10
  %.not81 = icmp eq ptr %36, null
  br i1 %.not81, label %37, label %40

37:                                               ; preds = %30
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.7, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef nonnull @.str.10) #7
  br label %84

40:                                               ; preds = %30
  %41 = getelementptr inbounds i8, ptr %0, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = tail call ptr @realloc(ptr noundef %42, i64 noundef %34) #10
  %.not82 = icmp eq ptr %43, null
  br i1 %.not82, label %44, label %47

44:                                               ; preds = %40
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.7, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef nonnull @.str.10) #7
  br label %84

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %0, i64 32
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = shl nuw nsw i64 %34, 3
  %51 = tail call ptr @realloc(ptr noundef %49, i64 noundef %50) #10
  %.not83 = icmp eq ptr %51, null
  br i1 %.not83, label %52, label %55

52:                                               ; preds = %47
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.7, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef nonnull @.str.10) #7
  br label %84

55:                                               ; preds = %47
  %56 = getelementptr inbounds i8, ptr %0, i64 40
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = tail call ptr @realloc(ptr noundef %57, i64 noundef %50) #10
  %.not84 = icmp eq ptr %58, null
  br i1 %.not84, label %59, label %62

59:                                               ; preds = %55
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.7, ptr noundef nonnull @__FUNCTION__.neo_aa_header_add_field_string, ptr noundef nonnull @.str.10) #7
  br label %84

62:                                               ; preds = %55
  %63 = trunc nuw i64 %17 to i16
  %64 = getelementptr inbounds i8, ptr %26, i64 4
  store i16 %63, ptr %64, align 1
  %65 = tail call i32 @internal_do_not_call_flip_edian_32(i32 noundef %1) #9
  %66 = getelementptr inbounds i8, ptr %26, i64 %15
  store i32 %65, ptr %66, align 1
  %67 = getelementptr i8, ptr %66, i64 3
  store i8 80, ptr %67, align 1, !tbaa !19
  %68 = getelementptr inbounds i8, ptr %66, i64 4
  %.0.extract.trunc = trunc nuw i64 %2 to i16
  store i16 %.0.extract.trunc, ptr %68, align 1
  %.not85 = icmp eq i64 %2, 0
  br i1 %.not85, label %.thread, label %71

.thread:                                          ; preds = %62
  store ptr %26, ptr %23, align 8, !tbaa !13
  store i64 %17, ptr %14, align 8, !tbaa !9
  %69 = zext i32 %25 to i64
  %70 = getelementptr inbounds i64, ptr %58, i64 %69
  store i64 0, ptr %70, align 8, !tbaa !20
  br label %79

71:                                               ; preds = %62
  %72 = getelementptr inbounds i8, ptr %66, i64 6
  %73 = tail call ptr @strncpy(ptr noundef nonnull %72, ptr noundef %3, i64 noundef %2) #9
  store ptr %26, ptr %23, align 8, !tbaa !13
  store i64 %17, ptr %14, align 8, !tbaa !9
  %74 = zext i32 %25 to i64
  %75 = getelementptr inbounds i64, ptr %58, i64 %74
  store i64 %2, ptr %75, align 8, !tbaa !20
  %76 = add nuw nsw i64 %2, 1
  %77 = tail call noalias ptr @malloc(i64 noundef %76) #11
  %78 = tail call ptr @strncpy(ptr noundef %77, ptr noundef %3, i64 noundef %2) #9
  br label %79

79:                                               ; preds = %.thread, %71
  %80 = phi i64 [ %74, %71 ], [ %69, %.thread ]
  %.0 = phi ptr [ %77, %71 ], [ null, %.thread ]
  %81 = getelementptr inbounds ptr, ptr %51, i64 %80
  store ptr %.0, ptr %81, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %43, i64 %80
  store i8 2, ptr %82, align 1, !tbaa !19
  %83 = getelementptr inbounds i32, ptr %36, i64 %80
  store i32 %1, ptr %83, align 4, !tbaa !21
  store i32 %33, ptr %0, align 8, !tbaa !14
  store ptr %51, ptr %48, align 8, !tbaa !17
  store ptr %36, ptr %31, align 8, !tbaa !15
  store ptr %43, ptr %41, align 8, !tbaa !16
  store ptr %58, ptr %56, align 8, !tbaa !18
  br label %84

84:                                               ; preds = %19, %37, %52, %79, %59, %44, %27, %10
  ret void
}

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

declare void @internal_do_not_call_is_field_key_available(i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) 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 #3 = { "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 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 #5 = { 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 #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 = { cold nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind }
attributes #10 = { nounwind allocsize(1) }
attributes #11 = { 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, !12, i64 48}
!10 = !{!"neo_aa_header_impl", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !6, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !11, i64 0}
!15 = !{!10, !6, i64 16}
!16 = !{!10, !6, i64 24}
!17 = !{!10, !6, i64 32}
!18 = !{!10, !6, i64 40}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!11, !11, i64 0}


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