; LLVM IR from cruppstahl/upscaledb :: 3rdparty/json (JSON_parser)

; 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_config = type { ptr, ptr, i32, i32, i32, i32 }
%struct.JSON_parser_struct = type { ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i16, i64, i64, ptr, i64, i8, ptr, i64, i64, i64, [128 x i8], [3500 x i8] }
%struct.lconv = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }

; Function Attrs: nounwind uwtable
define dso_local ptr @new_JSON_parser(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %struct.JSON_config, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %6 = call noalias ptr @malloc(i64 noundef 3736) #6
  store ptr %6, ptr %5, align 8, !tbaa !5
  %7 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 3736, i1 false)
  call void @init_JSON_config(ptr noundef %4)
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %1
  store ptr %4, ptr %2, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %10, %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.JSON_config, ptr %12, i32 0, i32 2
  %14 = load i32, ptr %13, align 8, !tbaa !11
  store i32 %14, ptr %3, align 4, !tbaa !9
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %11
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %17, %11
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.JSON_parser_struct, ptr %19, i32 0, i32 2
  store i8 0, ptr %20, align 8, !tbaa !13
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.JSON_parser_struct, ptr %21, i32 0, i32 12
  store i64 -1, ptr %22, align 8, !tbaa !17
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %25, label %51

25:                                               ; preds = %18
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.JSON_parser_struct, ptr %28, i32 0, i32 14
  store i64 %27, ptr %29, align 8, !tbaa !18
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.JSON_parser_struct, ptr %32, i32 0, i32 11
  store i64 %31, ptr %33, align 8, !tbaa !19
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = icmp sle i32 %34, 128
  br i1 %35, label %36, label %42

36:                                               ; preds = %25
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.JSON_parser_struct, ptr %37, i32 0, i32 20
  %39 = getelementptr inbounds [128 x i8], ptr %38, i64 0, i64 0
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.JSON_parser_struct, ptr %40, i32 0, i32 13
  store ptr %39, ptr %41, align 8, !tbaa !20
  br label %50

42:                                               ; preds = %25
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.JSON_parser_struct, ptr %43, i32 0, i32 14
  %45 = load i64, ptr %44, align 8, !tbaa !18
  %46 = mul i64 %45, 1
  %47 = call noalias ptr @malloc(i64 noundef %46) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.JSON_parser_struct, ptr %48, i32 0, i32 13
  store ptr %47, ptr %49, align 8, !tbaa !20
  br label %50

50:                                               ; preds = %42, %36
  br label %61

51:                                               ; preds = %18
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.JSON_parser_struct, ptr %52, i32 0, i32 14
  store i64 128, ptr %53, align 8, !tbaa !18
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.JSON_parser_struct, ptr %54, i32 0, i32 11
  store i64 -1, ptr %55, align 8, !tbaa !19
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.JSON_parser_struct, ptr %56, i32 0, i32 20
  %58 = getelementptr inbounds [128 x i8], ptr %57, i64 0, i64 0
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.JSON_parser_struct, ptr %59, i32 0, i32 13
  store ptr %58, ptr %60, align 8, !tbaa !20
  br label %61

61:                                               ; preds = %51, %50
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call i32 @push(ptr noundef %62, i32 noundef 2)
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.JSON_parser_struct, ptr %64, i32 0, i32 21
  %66 = getelementptr inbounds [3500 x i8], ptr %65, i64 0, i64 0
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.JSON_parser_struct, ptr %67, i32 0, i32 16
  store ptr %66, ptr %68, align 8, !tbaa !21
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.JSON_parser_struct, ptr %69, i32 0, i32 17
  store i64 3500, ptr %70, align 8, !tbaa !22
  br label %71

71:                                               ; preds = %61
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.JSON_parser_struct, ptr %72, i32 0, i32 18
  store i64 0, ptr %73, align 8, !tbaa !23
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.JSON_parser_struct, ptr %74, i32 0, i32 16
  %76 = load ptr, ptr %75, align 8, !tbaa !21
  %77 = getelementptr inbounds i8, ptr %76, i64 0
  store i8 0, ptr %77, align 1, !tbaa !24
  br label %78

78:                                               ; preds = %71
  br label %79

79:                                               ; preds = %78
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.JSON_config, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.JSON_parser_struct, ptr %83, i32 0, i32 0
  store ptr %82, ptr %84, align 8, !tbaa !26
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.JSON_config, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !27
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.JSON_parser_struct, ptr %88, i32 0, i32 1
  store ptr %87, ptr %89, align 8, !tbaa !28
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.JSON_config, ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 4, !tbaa !29
  %93 = icmp ne i32 %92, 0
  %94 = zext i1 %93 to i32
  %95 = trunc i32 %94 to i8
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.JSON_parser_struct, ptr %96, i32 0, i32 7
  store i8 %95, ptr %97, align 1, !tbaa !30
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.JSON_config, ptr %98, i32 0, i32 4
  %100 = load i32, ptr %99, align 8, !tbaa !31
  %101 = icmp ne i32 %100, 0
  %102 = zext i1 %101 to i32
  %103 = trunc i32 %102 to i8
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.JSON_parser_struct, ptr %104, i32 0, i32 8
  store i8 %103, ptr %105, align 2, !tbaa !32
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.JSON_config, ptr %106, i32 0, i32 5
  %108 = load i32, ptr %107, align 4, !tbaa !33
  %109 = icmp ne i32 %108, 0
  %110 = zext i1 %109 to i32
  %111 = trunc i32 %110 to i8
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.JSON_parser_struct, ptr %112, i32 0, i32 9
  store i8 %111, ptr %113, align 1, !tbaa !34
  %114 = call ptr @localeconv() #5
  %115 = getelementptr inbounds %struct.lconv, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !35
  %117 = load i8, ptr %116, align 1, !tbaa !24
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.JSON_parser_struct, ptr %118, i32 0, i32 15
  store i8 %117, ptr %119, align 8, !tbaa !37
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret ptr %120
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @init_JSON_config(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @push(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind
declare ptr @localeconv() #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!14, !7, i64 16}
!14 = !{!"JSON_parser_struct", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22, !7, i64 23, !15, i64 24, !16, i64 32, !16, i64 40, !6, i64 48, !16, i64 56, !7, i64 64, !6, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !7, i64 104, !7, i64 232}
!15 = !{!"short", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!14, !16, i64 40}
!18 = !{!14, !16, i64 56}
!19 = !{!14, !16, i64 32}
!20 = !{!14, !6, i64 48}
!21 = !{!14, !6, i64 72}
!22 = !{!14, !16, i64 80}
!23 = !{!14, !16, i64 88}
!24 = !{!7, !7, i64 0}
!25 = !{!12, !6, i64 0}
!26 = !{!14, !6, i64 0}
!27 = !{!12, !6, i64 8}
!28 = !{!14, !6, i64 8}
!29 = !{!12, !10, i64 20}
!30 = !{!14, !7, i64 21}
!31 = !{!12, !10, i64 24}
!32 = !{!14, !7, i64 22}
!33 = !{!12, !10, i64 28}
!34 = !{!14, !7, i64 23}
!35 = !{!36, !6, i64 0}
!36 = !{!"lconv", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 83, !7, i64 84, !7, i64 85, !7, i64 86, !7, i64 87, !7, i64 88, !7, i64 89, !7, i64 90, !7, i64 91, !7, i64 92, !7, i64 93}
!37 = !{!14, !7, i64 64}


; 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_config = type { ptr, ptr, i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @new_JSON_parser(ptr noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca %struct.JSON_config, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  %calloc = tail call dereferenceable_or_null(3736) ptr @calloc(i64 1, i64 3736)
  call void @init_JSON_config(ptr noundef nonnull %2)
  %3 = icmp eq ptr %0, null
  %spec.store.select.sroa.sel.v.sroa.sel.v.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %spec.store.select.sroa.sel.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select.sroa.sel.v.sroa.sel.v.sroa.sel.v, i64 16
  %4 = load i32, ptr %spec.store.select.sroa.sel.v.sroa.sel.v.sroa.sel, align 8, !tbaa !5
  %spec.store.select1 = call i32 @llvm.umax.i32(i32 %4, i32 1)
  %5 = getelementptr inbounds i8, ptr %calloc, i64 40
  store i64 -1, ptr %5, align 8, !tbaa !11
  %6 = icmp sgt i32 %spec.store.select1, 0
  br i1 %6, label %7, label %17

7:                                                ; preds = %1
  %8 = zext nneg i32 %spec.store.select1 to i64
  %9 = getelementptr inbounds i8, ptr %calloc, i64 56
  store i64 %8, ptr %9, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %calloc, i64 32
  store i64 %8, ptr %10, align 8, !tbaa !16
  %11 = icmp ult i32 %4, 129
  %12 = getelementptr inbounds i8, ptr %calloc, i64 48
  br i1 %11, label %13, label %15

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %calloc, i64 104
  store ptr %14, ptr %12, align 8, !tbaa !17
  br label %22

15:                                               ; preds = %7
  %16 = call noalias ptr @malloc(i64 noundef %8) #7
  store ptr %16, ptr %12, align 8, !tbaa !17
  br label %22

17:                                               ; preds = %1
  %18 = getelementptr inbounds i8, ptr %calloc, i64 56
  store i64 128, ptr %18, align 8, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %calloc, i64 32
  store i64 -1, ptr %19, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %calloc, i64 104
  %21 = getelementptr inbounds i8, ptr %calloc, i64 48
  store ptr %20, ptr %21, align 8, !tbaa !17
  br label %22

22:                                               ; preds = %13, %15, %17
  %spec.store.select.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %23 = call i32 @push(ptr noundef nonnull %calloc, i32 noundef 2)
  %24 = getelementptr inbounds i8, ptr %calloc, i64 232
  %25 = getelementptr inbounds i8, ptr %calloc, i64 72
  store ptr %24, ptr %25, align 8, !tbaa !18
  %26 = getelementptr inbounds i8, ptr %calloc, i64 80
  store i64 3500, ptr %26, align 8, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %calloc, i64 88
  store i64 0, ptr %27, align 8, !tbaa !20
  store i8 0, ptr %24, align 1, !tbaa !21
  %28 = load ptr, ptr %spec.store.select.sroa.sel.v, align 8, !tbaa !22
  store ptr %28, ptr %calloc, align 8, !tbaa !23
  %spec.store.select.sroa.sel41.v.sroa.sel.v.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %spec.store.select.sroa.sel41.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select.sroa.sel41.v.sroa.sel.v.sroa.sel.v, i64 8
  %29 = load ptr, ptr %spec.store.select.sroa.sel41.v.sroa.sel.v.sroa.sel, align 8, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %calloc, i64 8
  store ptr %29, ptr %30, align 8, !tbaa !25
  %spec.store.select.sroa.sel44.v.sroa.sel.v.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %spec.store.select.sroa.sel44.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select.sroa.sel44.v.sroa.sel.v.sroa.sel.v, i64 20
  %31 = load i32, ptr %spec.store.select.sroa.sel44.v.sroa.sel.v.sroa.sel, align 4, !tbaa !26
  %32 = icmp ne i32 %31, 0
  %33 = zext i1 %32 to i8
  %34 = getelementptr inbounds i8, ptr %calloc, i64 21
  store i8 %33, ptr %34, align 1, !tbaa !27
  %spec.store.select.sroa.sel47.v.sroa.sel.v.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %spec.store.select.sroa.sel47.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select.sroa.sel47.v.sroa.sel.v.sroa.sel.v, i64 24
  %35 = load i32, ptr %spec.store.select.sroa.sel47.v.sroa.sel.v.sroa.sel, align 8, !tbaa !28
  %36 = icmp ne i32 %35, 0
  %37 = zext i1 %36 to i8
  %38 = getelementptr inbounds i8, ptr %calloc, i64 22
  store i8 %37, ptr %38, align 2, !tbaa !29
  %spec.store.select.sroa.sel50.v.sroa.sel.v.sroa.sel.v = select i1 %3, ptr %2, ptr %0
  %spec.store.select.sroa.sel50.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select.sroa.sel50.v.sroa.sel.v.sroa.sel.v, i64 28
  %39 = load i32, ptr %spec.store.select.sroa.sel50.v.sroa.sel.v.sroa.sel, align 4, !tbaa !30
  %40 = icmp ne i32 %39, 0
  %41 = zext i1 %40 to i8
  %42 = getelementptr inbounds i8, ptr %calloc, i64 23
  store i8 %41, ptr %42, align 1, !tbaa !31
  %43 = call ptr @localeconv() #6
  %44 = load ptr, ptr %43, align 8, !tbaa !32
  %45 = load i8, ptr %44, align 1, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %calloc, i64 64
  store i8 %45, ptr %46, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  ret ptr %calloc
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @init_JSON_config(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @push(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare ptr @localeconv() local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #4

; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !14, i64 40}
!12 = !{!"JSON_parser_struct", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !8, i64 18, !8, i64 19, !8, i64 20, !8, i64 21, !8, i64 22, !8, i64 23, !13, i64 24, !14, i64 32, !14, i64 40, !7, i64 48, !14, i64 56, !8, i64 64, !7, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !8, i64 104, !8, i64 232}
!13 = !{!"short", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!12, !14, i64 56}
!16 = !{!12, !14, i64 32}
!17 = !{!12, !7, i64 48}
!18 = !{!12, !7, i64 72}
!19 = !{!12, !14, i64 80}
!20 = !{!12, !14, i64 88}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !7, i64 0}
!23 = !{!12, !7, i64 0}
!24 = !{!6, !7, i64 8}
!25 = !{!12, !7, i64 8}
!26 = !{!6, !10, i64 20}
!27 = !{!12, !8, i64 21}
!28 = !{!6, !10, i64 24}
!29 = !{!12, !8, i64 22}
!30 = !{!6, !10, i64 28}
!31 = !{!12, !8, i64 23}
!32 = !{!33, !7, i64 0}
!33 = !{!"lconv", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !8, i64 80, !8, i64 81, !8, i64 82, !8, i64 83, !8, i64 84, !8, i64 85, !8, i64 86, !8, i64 87, !8, i64 88, !8, i64 89, !8, i64 90, !8, i64 91, !8, i64 92, !8, i64 93}
!34 = !{!12, !8, i64 64}


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