; LLVM IR from caryll/otfcc :: dep/extern (json-builder)

; 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._json_value = type { ptr, i32, %union.anon, %union.anon.2 }
%union.anon = type { %struct.anon }
%struct.anon = type { i32, ptr }
%union.anon.2 = type { ptr }
%struct.anon.0 = type { i32, ptr }
%struct.json_builder_value = type { %struct._json_value, i32, i64, i64 }
%struct._json_object_entry = type { ptr, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.json_object_merge = external hidden unnamed_addr constant [58 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1

; 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) #0

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @builderize(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local ptr @json_object_merge(ptr noundef %0, ptr noundef %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._json_value, ptr %11, i32 0, i32 1
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = icmp eq i32 %13, 1
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %17

16:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 344, ptr noundef @__PRETTY_FUNCTION__.json_object_merge) #7
  unreachable

17:                                               ; preds = %15
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._json_value, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp eq i32 %20, 1
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %24

23:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 345, ptr noundef @__PRETTY_FUNCTION__.json_object_merge) #7
  unreachable

24:                                               ; preds = %22
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = icmp ne ptr %25, %26
  br i1 %27, label %28, label %29

28:                                               ; preds = %24
  br label %30

29:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 346, ptr noundef @__PRETTY_FUNCTION__.json_object_merge) #7
  unreachable

30:                                               ; preds = %28
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call i32 @builderize(ptr noundef %31)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %38

34:                                               ; preds = %30
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = call i32 @builderize(ptr noundef %35)
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %39, label %38

38:                                               ; preds = %34, %30
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %147

39:                                               ; preds = %34
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._json_value, ptr %40, i32 0, i32 2
  %42 = getelementptr inbounds %struct.anon.0, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !12
  %44 = zext i32 %43 to i64
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.json_builder_value, ptr %45, i32 0, i32 2
  %47 = load i64, ptr %46, align 8, !tbaa !13
  %48 = icmp ule i64 %44, %47
  br i1 %48, label %49, label %59

49:                                               ; preds = %39
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._json_value, ptr %50, i32 0, i32 2
  %52 = getelementptr inbounds %struct.anon.0, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !12
  %54 = zext i32 %53 to i64
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.json_builder_value, ptr %55, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = sub i64 %57, %54
  store i64 %58, ptr %56, align 8, !tbaa !13
  br label %94

59:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._json_value, ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %struct.anon.0, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !12
  %64 = zext i32 %63 to i64
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.json_builder_value, ptr %65, i32 0, i32 2
  %67 = load i64, ptr %66, align 8, !tbaa !13
  %68 = add i64 %64, %67
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._json_value, ptr %69, i32 0, i32 2
  %71 = getelementptr inbounds %struct.anon.0, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !12
  %73 = zext i32 %72 to i64
  %74 = add i64 %68, %73
  %75 = trunc i64 %74 to i32
  store i32 %75, ptr %9, align 4, !tbaa !16
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._json_value, ptr %76, i32 0, i32 2
  %78 = getelementptr inbounds %struct.anon.0, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !12
  %80 = load i32, ptr %9, align 4, !tbaa !16
  %81 = zext i32 %80 to i64
  %82 = mul i64 24, %81
  %83 = call ptr @realloc(ptr noundef %79, i64 noundef %82) #8
  store ptr %83, ptr %8, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %86, label %85

85:                                               ; preds = %59
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %91

86:                                               ; preds = %59
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._json_value, ptr %88, i32 0, i32 2
  %90 = getelementptr inbounds %struct.anon.0, ptr %89, i32 0, i32 1
  store ptr %87, ptr %90, align 8, !tbaa !12
  store i32 0, ptr %7, align 4
  br label %91

91:                                               ; preds = %86, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %92 = load i32, ptr %7, align 4
  switch i32 %92, label %147 [
    i32 0, label %93
  ]

93:                                               ; preds = %91
  br label %94

94:                                               ; preds = %93, %49
  store i32 0, ptr %6, align 4, !tbaa !16
  br label %95

95:                                               ; preds = %128, %94
  %96 = load i32, ptr %6, align 4, !tbaa !16
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._json_value, ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds %struct.anon.0, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !12
  %101 = icmp ult i32 %96, %100
  br i1 %101, label %102, label %131

102:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._json_value, ptr %103, i32 0, i32 2
  %105 = getelementptr inbounds %struct.anon.0, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !12
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._json_value, ptr %107, i32 0, i32 2
  %109 = getelementptr inbounds %struct.anon.0, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !12
  %111 = load i32, ptr %6, align 4, !tbaa !16
  %112 = add i32 %110, %111
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds %struct._json_object_entry, ptr %106, i64 %113
  store ptr %114, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._json_value, ptr %116, i32 0, i32 2
  %118 = getelementptr inbounds %struct.anon.0, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !12
  %120 = load i32, ptr %6, align 4, !tbaa !16
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds %struct._json_object_entry, ptr %119, i64 %121
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %115, ptr align 8 %122, i64 24, i1 false), !tbaa.struct !17
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._json_object_entry, ptr %124, i32 0, i32 2
  %126 = load ptr, ptr %125, align 8, !tbaa !18
  %127 = getelementptr inbounds %struct._json_value, ptr %126, i32 0, i32 0
  store ptr %123, ptr %127, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %128

128:                                              ; preds = %102
  %129 = load i32, ptr %6, align 4, !tbaa !16
  %130 = add i32 %129, 1
  store i32 %130, ptr %6, align 4, !tbaa !16
  br label %95, !llvm.loop !21

131:                                              ; preds = %95
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._json_value, ptr %132, i32 0, i32 2
  %134 = getelementptr inbounds %struct.anon.0, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !12
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._json_value, ptr %136, i32 0, i32 2
  %138 = getelementptr inbounds %struct.anon.0, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !12
  %140 = add i32 %139, %135
  store i32 %140, ptr %138, align 8, !tbaa !12
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._json_value, ptr %141, i32 0, i32 2
  %143 = getelementptr inbounds %struct.anon.0, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !12
  call void @free(ptr noundef %144) #6
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %145) #6
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %146, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %147

147:                                              ; preds = %131, %91, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %148 = load ptr, ptr %3, align 8
  ret ptr %148
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind allocsize(1) }

!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, !11, i64 8}
!10 = !{!"_json_value", !6, i64 0, !11, i64 8, !7, i64 16, !7, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !15, i64 48}
!14 = !{!"json_builder_value", !10, i64 0, !11, i64 40, !15, i64 48, !15, i64 56}
!15 = !{!"long", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{i64 0, i64 8, !5, i64 8, i64 4, !16, i64 16, i64 8, !5}
!18 = !{!19, !6, i64 16}
!19 = !{!"_json_object_entry", !6, i64 0, !11, i64 8, !6, i64 16}
!20 = !{!10, !6, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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

%struct._json_object_entry = type { ptr, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.json_object_merge = external hidden unnamed_addr constant [58 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1

; 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) #0

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @builderize(ptr noundef) local_unnamed_addr #3

; 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 #4

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @json_object_merge(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i32 %4, 1
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 344, ptr noundef nonnull @__PRETTY_FUNCTION__.json_object_merge) #5
  unreachable

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %12, label %11

11:                                               ; preds = %7
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 345, ptr noundef nonnull @__PRETTY_FUNCTION__.json_object_merge) #5
  unreachable

12:                                               ; preds = %7
  %.not = icmp eq ptr %0, %1
  br i1 %.not, label %13, label %14

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 346, ptr noundef nonnull @__PRETTY_FUNCTION__.json_object_merge) #5
  unreachable

14:                                               ; preds = %12
  %15 = tail call i32 @builderize(ptr noundef nonnull %0)
  %.not43 = icmp eq i32 %15, 0
  br i1 %.not43, label %.critedge, label %16

16:                                               ; preds = %14
  %17 = tail call i32 @builderize(ptr noundef nonnull %1)
  %.not44 = icmp eq i32 %17, 0
  br i1 %.not44, label %.critedge, label %18

18:                                               ; preds = %16
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = load i32, ptr %19, align 8, !tbaa !11
  %21 = zext i32 %20 to i64
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = load i64, ptr %22, align 8, !tbaa !12
  %.not45 = icmp ult i64 %23, %21
  br i1 %.not45, label %26, label %24

24:                                               ; preds = %18
  %25 = sub i64 %23, %21
  store i64 %25, ptr %22, align 8, !tbaa !12
  br label %38

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %0, i64 16
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = trunc i64 %23 to i32
  %30 = add i32 %20, %29
  %31 = add i32 %30, %28
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = zext i32 %31 to i64
  %35 = mul nuw nsw i64 %34, 24
  %36 = tail call ptr @realloc(ptr noundef %33, i64 noundef %35) #6
  %.not46.not = icmp eq ptr %36, null
  br i1 %.not46.not, label %.critedge, label %37

37:                                               ; preds = %26
  store ptr %36, ptr %32, align 8, !tbaa !11
  br label %38

38:                                               ; preds = %37, %24
  %39 = load i32, ptr %19, align 8, !tbaa !11
  %.not48 = icmp eq i32 %39, 0
  br i1 %.not48, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %38
  %40 = getelementptr inbounds i8, ptr %0, i64 16
  %41 = getelementptr inbounds i8, ptr %0, i64 24
  %42 = getelementptr inbounds i8, ptr %1, i64 24
  br label %43

43:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %44 = load ptr, ptr %41, align 8, !tbaa !11
  %45 = load i32, ptr %40, align 8, !tbaa !11
  %46 = trunc nuw i64 %indvars.iv to i32
  %47 = add i32 %45, %46
  %48 = zext i32 %47 to i64
  %49 = getelementptr inbounds %struct._json_object_entry, ptr %44, i64 %48
  %50 = load ptr, ptr %42, align 8, !tbaa !11
  %51 = getelementptr inbounds %struct._json_object_entry, ptr %50, i64 %indvars.iv
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 8 dereferenceable(24) %51, i64 24, i1 false), !tbaa.struct !15
  %52 = getelementptr inbounds i8, ptr %49, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  store ptr %0, ptr %53, align 8, !tbaa !20
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %54 = load i32, ptr %19, align 8, !tbaa !11
  %55 = zext i32 %54 to i64
  %56 = icmp ult i64 %indvars.iv.next, %55
  br i1 %56, label %43, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %43, %38
  %.lcssa = phi i32 [ 0, %38 ], [ %54, %43 ]
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = add i32 %58, %.lcssa
  store i32 %59, ptr %57, align 8, !tbaa !11
  %60 = getelementptr inbounds i8, ptr %1, i64 24
  %61 = load ptr, ptr %60, align 8, !tbaa !11
  tail call void @free(ptr noundef %61) #7
  tail call void @free(ptr noundef nonnull %1) #7
  br label %.critedge

.critedge:                                        ; preds = %26, %14, %16, %._crit_edge
  %.1 = phi ptr [ %0, %._crit_edge ], [ null, %16 ], [ null, %14 ], [ null, %26 ]
  ret ptr %.1
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind allocsize(1) }
attributes #7 = { 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, !10, i64 8}
!6 = !{!"_json_value", !7, i64 0, !10, i64 8, !8, i64 16, !8, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!13, !14, i64 48}
!13 = !{!"json_builder_value", !6, i64 0, !10, i64 40, !14, i64 48, !14, i64 56}
!14 = !{!"long", !8, i64 0}
!15 = !{i64 0, i64 8, !16, i64 8, i64 4, !17, i64 16, i64 8, !16}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !10, i64 0}
!18 = !{!19, !7, i64 16}
!19 = !{!"_json_object_entry", !7, i64 0, !10, i64 8, !7, i64 16}
!20 = !{!6, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass