; LLVM IR from Water-Melon/Melon :: t (json)

; 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.mln_json_s = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.mln_json_call_attr = type { ptr, ptr }
%struct.mln_string_t = type { ptr, i64, i32 }

@__const.main.exp = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8
@__const.main.tmp = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.mln_json_s, align 8
  %8 = alloca %struct.mln_json_s, align 8
  %9 = alloca %struct.mln_json_call_attr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.mln_string_t, align 8
  %12 = alloca %struct.mln_string_t, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1024, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 @__const.main.exp, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 @__const.main.tmp, i64 24, i1 false)
  %15 = call i32 @mln_json_decode(ptr noundef %12, ptr noundef %7, ptr noundef null)
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %17, label %20

17:                                               ; preds = %2
  %18 = load ptr, ptr @stderr, align 8, !tbaa !9
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str.2) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %109

20:                                               ; preds = %2
  %21 = call i32 @mln_json_parse(ptr noundef %7, ptr noundef %11, ptr noundef @handler, ptr noundef null)
  %22 = getelementptr inbounds %struct.mln_json_call_attr, ptr %9, i32 0, i32 0
  store ptr @callback, ptr %22, align 8, !tbaa !11
  %23 = getelementptr inbounds %struct.mln_json_call_attr, ptr %9, i32 0, i32 1
  store ptr %6, ptr %23, align 8, !tbaa !13
  %24 = getelementptr inbounds %struct.mln_json_s, ptr %8, i32 0, i32 0
  store i32 0, ptr %24, align 8, !tbaa !14
  %25 = call i32 (ptr, ptr, ...) @mln_json_generate(ptr noundef %8, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 1, ptr noundef @.str.5, i32 noundef 3, ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 4, i32 noundef 5, ptr noundef %7, ptr noundef %9)
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %30

27:                                               ; preds = %20
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.8) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %109

30:                                               ; preds = %20
  %31 = call i32 (ptr, ptr, ...) @mln_json_generate(ptr noundef %8, ptr noundef @.str.9, ptr noundef @.str.10, i32 noundef 99)
  %32 = call ptr @mln_json_encode(ptr noundef %8)
  store ptr %32, ptr %10, align 8, !tbaa !9
  call void @mln_json_destroy(ptr noundef %8)
  %33 = load ptr, ptr %10, align 8, !tbaa !9
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %38

35:                                               ; preds = %30
  %36 = load ptr, ptr @stderr, align 8, !tbaa !9
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.11) #5
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %109

38:                                               ; preds = %30
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.mln_string_t, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.mln_string_t, ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !19
  %45 = call i64 @write(i32 noundef 1, ptr noundef %41, i64 noundef %44)
  %46 = call i64 @write(i32 noundef 1, ptr noundef @.str.12, i64 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %47 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %47, ptr %14, align 8, !tbaa !9
  %48 = load ptr, ptr %14, align 8, !tbaa !9
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %108

50:                                               ; preds = %38
  %51 = load ptr, ptr %14, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.mln_string_t, ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 8
  %54 = lshr i32 %53, 2
  %55 = zext i32 %54 to i64
  %56 = add i64 %55, -1
  %57 = trunc i64 %56 to i32
  %58 = load i32, ptr %52, align 8
  %59 = and i32 %57, 1073741823
  %60 = shl i32 %59, 2
  %61 = and i32 %58, 3
  %62 = or i32 %61, %60
  store i32 %62, ptr %52, align 8
  %63 = zext i32 %59 to i64
  %64 = icmp ule i64 %55, 1
  br i1 %64, label %65, label %107

65:                                               ; preds = %50
  %66 = load ptr, ptr %14, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.mln_string_t, ptr %66, i32 0, i32 2
  %68 = load i32, ptr %67, align 8
  %69 = and i32 %68, 1
  %70 = zext i32 %69 to i64
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %94, label %72

72:                                               ; preds = %65
  %73 = load ptr, ptr %14, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.mln_string_t, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !16
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %94

77:                                               ; preds = %72
  %78 = load ptr, ptr %14, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.mln_string_t, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8
  %81 = lshr i32 %80, 1
  %82 = and i32 %81, 1
  %83 = zext i32 %82 to i64
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %85, label %89

85:                                               ; preds = %77
  %86 = load ptr, ptr %14, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.mln_string_t, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !16
  call void @mln_alloc_free(ptr noundef %88)
  br label %93

89:                                               ; preds = %77
  %90 = load ptr, ptr %14, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.mln_string_t, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !16
  call void @free(ptr noundef %92) #5
  br label %93

93:                                               ; preds = %89, %85
  br label %94

94:                                               ; preds = %93, %72, %65
  %95 = load ptr, ptr %14, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct.mln_string_t, ptr %95, i32 0, i32 2
  %97 = load i32, ptr %96, align 8
  %98 = lshr i32 %97, 1
  %99 = and i32 %98, 1
  %100 = zext i32 %99 to i64
  %101 = icmp ne i64 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %94
  %103 = load ptr, ptr %14, align 8, !tbaa !9
  call void @mln_alloc_free(ptr noundef %103)
  br label %106

104:                                              ; preds = %94
  %105 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %105) #5
  br label %106

106:                                              ; preds = %104, %102
  br label %107

107:                                              ; preds = %106, %50
  br label %108

108:                                              ; preds = %107, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  store i32 0, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %109

109:                                              ; preds = %108, %35, %27, %17
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %110 = load i32, ptr %3, align 4
  ret i32 %110
}

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

declare i32 @mln_json_decode(ptr noundef, ptr noundef, ptr noundef) #3

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

declare i32 @mln_json_parse(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

declare i32 @mln_json_generate(ptr noundef, ptr noundef, ...) #3

declare ptr @mln_json_encode(ptr noundef) #3

declare void @mln_json_destroy(ptr noundef) #3

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #3

declare void @mln_alloc_free(ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"mln_json_call_attr", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !6, i64 0}
!15 = !{!"mln_json_s", !6, i64 0, !7, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !18, i64 8, !18, i64 16, !18, i64 16, !18, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !18, i64 8}


; 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.mln_json_s = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.mln_json_call_attr = type { ptr, ptr }
%struct.mln_string_t = type { ptr, i64, i32 }

@__const.main.exp = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8
@__const.main.tmp = external hidden unnamed_addr constant { ptr, i64, i8, i8, i8, i8 }, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca %struct.mln_json_s, align 8
  %5 = alloca %struct.mln_json_s, align 8
  %6 = alloca %struct.mln_json_call_attr, align 8
  %7 = alloca %struct.mln_string_t, align 8
  %8 = alloca %struct.mln_string_t, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1024, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) @__const.main.exp, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) @__const.main.tmp, i64 24, i1 false)
  %9 = call i32 @mln_json_decode(ptr noundef nonnull %8, ptr noundef nonnull %4, ptr noundef null) #7
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %11, label %14

11:                                               ; preds = %2
  %12 = load ptr, ptr @stderr, align 8, !tbaa !9
  %13 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.2) #8
  br label %55

14:                                               ; preds = %2
  %15 = call i32 @mln_json_parse(ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull @handler, ptr noundef null) #7
  store ptr @callback, ptr %6, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %3, ptr %16, align 8, !tbaa !13
  store i32 0, ptr %5, align 8, !tbaa !14
  %17 = call i32 (ptr, ptr, ...) @mln_json_generate(ptr noundef nonnull %5, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 1, ptr noundef nonnull @.str.5, i32 noundef 3, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 4, i32 noundef 5, ptr noundef nonnull %4, ptr noundef nonnull %6) #7
  %18 = icmp slt i32 %17, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %14
  %20 = load ptr, ptr @stderr, align 8, !tbaa !9
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.8) #8
  br label %55

22:                                               ; preds = %14
  %23 = call i32 (ptr, ptr, ...) @mln_json_generate(ptr noundef nonnull %5, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i32 noundef 99) #7
  %24 = call ptr @mln_json_encode(ptr noundef nonnull %5) #7
  call void @mln_json_destroy(ptr noundef nonnull %5) #7
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %29

26:                                               ; preds = %22
  %27 = load ptr, ptr @stderr, align 8, !tbaa !9
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.11) #8
  br label %55

29:                                               ; preds = %22
  %30 = load ptr, ptr %24, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %24, i64 8
  %32 = load i64, ptr %31, align 8, !tbaa !19
  %33 = call i64 @write(i32 noundef 1, ptr noundef %30, i64 noundef %32) #7
  %34 = call i64 @write(i32 noundef 1, ptr noundef nonnull @.str.12, i64 noundef 1) #7
  %35 = getelementptr inbounds i8, ptr %24, i64 16
  %36 = load i32, ptr %35, align 8
  %37 = and i32 %36, -4
  %38 = add i32 %37, -4
  %39 = and i32 %36, 3
  %40 = or disjoint i32 %38, %39
  store i32 %40, ptr %35, align 8
  %41 = icmp ult i32 %36, 8
  br i1 %41, label %42, label %55

42:                                               ; preds = %29
  %43 = and i32 %36, 1
  %.not = icmp eq i32 %43, 0
  br i1 %.not, label %44, label %50

44:                                               ; preds = %42
  %45 = load ptr, ptr %24, align 8, !tbaa !16
  %.not16 = icmp eq ptr %45, null
  br i1 %.not16, label %50, label %46

46:                                               ; preds = %44
  %47 = and i32 %36, 2
  %.not17 = icmp eq i32 %47, 0
  br i1 %.not17, label %49, label %48

48:                                               ; preds = %46
  call void @mln_alloc_free(ptr noundef nonnull %45) #7
  br label %50

49:                                               ; preds = %46
  call void @free(ptr noundef nonnull %45) #7
  br label %50

50:                                               ; preds = %48, %49, %44, %42
  %51 = load i32, ptr %35, align 8
  %52 = and i32 %51, 2
  %.not18 = icmp eq i32 %52, 0
  br i1 %.not18, label %54, label %53

53:                                               ; preds = %50
  call void @mln_alloc_free(ptr noundef nonnull %24) #7
  br label %55

54:                                               ; preds = %50
  call void @free(ptr noundef nonnull %24) #7
  br label %55

55:                                               ; preds = %53, %54, %29, %26, %19, %11
  %.0 = phi i32 [ -1, %11 ], [ -1, %19 ], [ -1, %26 ], [ 0, %29 ], [ 0, %54 ], [ 0, %53 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i32 %.0
}

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

declare i32 @mln_json_decode(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i32 @mln_json_parse(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare i32 @mln_json_generate(ptr noundef, ptr noundef, ...) local_unnamed_addr #3

declare ptr @mln_json_encode(ptr noundef) local_unnamed_addr #3

declare void @mln_json_destroy(ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #5

declare void @mln_alloc_free(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nofree "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 = { cold 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"mln_json_call_attr", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !6, i64 0}
!15 = !{!"mln_json_s", !6, i64 0, !7, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !18, i64 8, !18, i64 16, !18, i64 16, !18, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!17, !18, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass