; LLVM IR from caryll/otfcc :: lib/table/meta (dump)

; 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.otfcc_Options = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, ptr }
%struct.otfcc_ILogger = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.table_meta = type { i32, i32, %struct.meta_Entries }
%struct.meta_Entries = type { i64, i64, ptr }
%struct.meta_Entry = type { i32, ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

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

20:                                               ; preds = %3
  br label %158

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.otfcc_Options, ptr %22, i32 0, i32 24
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.otfcc_ILogger, ptr %24, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !12
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.otfcc_Options, ptr %27, i32 0, i32 24
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call ptr @sdsempty()
  %31 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %30, ptr noundef @.str)
  call void %26(ptr noundef %29, ptr noundef %31)
  store i8 1, ptr %7, align 1, !tbaa !14
  br label %32

32:                                               ; preds = %149, %21
  %33 = load i8, ptr %7, align 1, !tbaa !14, !range !15, !noundef !16
  %34 = trunc i8 %33 to i1
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  br label %158

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %37 = call ptr @json_object_new(i64 noundef 3)
  store ptr %37, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.table_meta, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = zext i32 %41 to i64
  %43 = call ptr @json_integer_new(i64 noundef %42)
  %44 = call ptr @json_object_push(ptr noundef %38, ptr noundef @.str.1, ptr noundef %43)
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.table_meta, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !22
  %49 = zext i32 %48 to i64
  %50 = call ptr @json_integer_new(i64 noundef %49)
  %51 = call ptr @json_object_push(ptr noundef %45, ptr noundef @.str.2, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.table_meta, ptr %52, i32 0, i32 2
  %54 = getelementptr inbounds %struct.meta_Entries, ptr %53, i32 0, i32 0
  %55 = load i64, ptr %54, align 8, !tbaa !23
  %56 = call ptr @json_array_new(i64 noundef %55)
  store ptr %56, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = call ptr @json_object_push(ptr noundef %57, ptr noundef @.str.3, ptr noundef %58)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 1, ptr %12, align 8, !tbaa !24
  br label %60

60:                                               ; preds = %137, %36
  %61 = load i64, ptr %12, align 8, !tbaa !24
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %63, label %70

63:                                               ; preds = %60
  %64 = load i64, ptr %11, align 8, !tbaa !24
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.table_meta, ptr %65, i32 0, i32 2
  %67 = getelementptr inbounds %struct.meta_Entries, ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !23
  %69 = icmp ult i64 %64, %68
  br label %70

70:                                               ; preds = %63, %60
  %71 = phi i1 [ false, %60 ], [ %69, %63 ]
  br i1 %71, label %73, label %72

72:                                               ; preds = %70
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %145

73:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.table_meta, ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %struct.meta_Entries, ptr %75, i32 0, i32 2
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %78 = load i64, ptr %11, align 8, !tbaa !24
  %79 = getelementptr inbounds %struct.meta_Entry, ptr %77, i64 %78
  store ptr %79, ptr %13, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %130, %73
  %81 = load i64, ptr %12, align 8, !tbaa !24
  %82 = icmp ne i64 %81, 0
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %136

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %85 = call ptr @json_object_new(i64 noundef 2)
  store ptr %85, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.meta_Entry, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !26
  %89 = getelementptr inbounds [4 x i8], ptr %15, i64 0, i64 0
  call void @tag2str(i32 noundef %88, ptr noundef %89)
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = getelementptr inbounds [4 x i8], ptr %15, i64 0, i64 0
  %92 = call ptr @json_string_new_length(i32 noundef 4, ptr noundef %91)
  %93 = call ptr @json_object_push(ptr noundef %90, ptr noundef @.str.4, ptr noundef %92)
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.meta_Entry, ptr %94, i32 0, i32 0
  %96 = load i32, ptr %95, align 8, !tbaa !26
  %97 = call zeroext i1 @isStringTag(i32 noundef %96)
  br i1 %97, label %98, label %110

98:                                               ; preds = %84
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.meta_Entry, ptr %100, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !28
  %103 = call i64 @sdslen(ptr noundef %102)
  %104 = trunc i64 %103 to i32
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.meta_Entry, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !28
  %108 = call ptr @json_string_new_length(i32 noundef %104, ptr noundef %107)
  %109 = call ptr @json_object_push(ptr noundef %99, ptr noundef @.str.5, ptr noundef %108)
  br label %126

110:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.meta_Entry, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !28
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.meta_Entry, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !28
  %117 = call i64 @sdslen(ptr noundef %116)
  %118 = call ptr @base64_encode(ptr noundef %113, i64 noundef %117, ptr noundef %16)
  store ptr %118, ptr %17, align 8, !tbaa !5
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = load i64, ptr %16, align 8, !tbaa !24
  %121 = trunc i64 %120 to i32
  %122 = load ptr, ptr %17, align 8, !tbaa !5
  %123 = call ptr @json_string_new_length(i32 noundef %121, ptr noundef %122)
  %124 = call ptr @json_object_push(ptr noundef %119, ptr noundef @.str.6, ptr noundef %123)
  %125 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %125) #5
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %126

126:                                              ; preds = %110, %98
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = call ptr @json_array_push(ptr noundef %127, ptr noundef %128)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %130

130:                                              ; preds = %126
  %131 = load i64, ptr %12, align 8, !tbaa !24
  %132 = icmp ne i64 %131, 0
  %133 = xor i1 %132, true
  %134 = zext i1 %133 to i32
  %135 = sext i32 %134 to i64
  store i64 %135, ptr %12, align 8, !tbaa !24
  br label %80, !llvm.loop !29

136:                                              ; preds = %83
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %12, align 8, !tbaa !24
  %139 = icmp ne i64 %138, 0
  %140 = xor i1 %139, true
  %141 = zext i1 %140 to i32
  %142 = sext i32 %141 to i64
  store i64 %142, ptr %12, align 8, !tbaa !24
  %143 = load i64, ptr %11, align 8, !tbaa !24
  %144 = add i64 %143, 1
  store i64 %144, ptr %11, align 8, !tbaa !24
  br label %60, !llvm.loop !31

145:                                              ; preds = %72
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = call ptr @json_object_push(ptr noundef %146, ptr noundef @.str, ptr noundef %147)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %149

149:                                              ; preds = %145
  store i8 0, ptr %7, align 1, !tbaa !14
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.otfcc_Options, ptr %150, i32 0, i32 24
  %152 = load ptr, ptr %151, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.otfcc_ILogger, ptr %152, i32 0, i32 8
  %154 = load ptr, ptr %153, align 8, !tbaa !32
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.otfcc_Options, ptr %155, i32 0, i32 24
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  call void %154(ptr noundef %157)
  br label %32, !llvm.loop !33

158:                                              ; preds = %35, %20
  ret void
}

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

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) #2

declare ptr @sdsempty() #2

declare ptr @json_object_new(i64 noundef) #2

declare ptr @json_object_push(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @json_integer_new(i64 noundef) #2

declare ptr @json_array_new(i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tag2str(i32 noundef, ptr noundef) #3

declare ptr @json_string_new_length(i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @isStringTag(i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @sdslen(ptr noundef) #3

declare ptr @base64_encode(ptr noundef, i64 noundef, ptr noundef) #2

; 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

declare ptr @json_array_push(ptr noundef, ptr noundef) #2

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 = { "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 = { inlinehint 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !11, i64 6, !11, i64 7, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !11, i64 12, !11, i64 13, !11, i64 14, !11, i64 15, !11, i64 16, !11, i64 17, !11, i64 18, !11, i64 19, !11, i64 20, !11, i64 21, !11, i64 22, !6, i64 24, !6, i64 32}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!13, !6, i64 32}
!13 = !{!"otfcc_ILogger", !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, !6, i64 80, !6, i64 88}
!14 = !{!11, !11, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !19, i64 4, !20, i64 8}
!19 = !{!"int", !7, i64 0}
!20 = !{!"", !21, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!18, !19, i64 4}
!23 = !{!18, !21, i64 8}
!24 = !{!21, !21, i64 0}
!25 = !{!18, !6, i64 24}
!26 = !{!27, !19, i64 0}
!27 = !{!"", !19, i64 0, !6, i64 8}
!28 = !{!27, !6, i64 8}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!13, !6, i64 64}
!33 = distinct !{!33, !30}


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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpMeta(ptr noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = alloca [4 x i8], align 1
  %5 = alloca i64, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %62, label %.critedge41

.critedge41:                                      ; preds = %3
  %6 = getelementptr inbounds i8, ptr %2, i64 32
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 32
  %9 = load ptr, ptr %8, align 8, !tbaa !11
  %10 = tail call ptr @sdsempty() #5
  %11 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %10, ptr noundef nonnull @.str) #5
  tail call void %9(ptr noundef %7, ptr noundef %11) #5
  %12 = tail call ptr @json_object_new(i64 noundef 3) #5
  %13 = load i32, ptr %0, align 8, !tbaa !13
  %14 = zext i32 %13 to i64
  %15 = tail call ptr @json_integer_new(i64 noundef %14) #5
  %16 = tail call ptr @json_object_push(ptr noundef %12, ptr noundef nonnull @.str.1, ptr noundef %15) #5
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !18
  %19 = zext i32 %18 to i64
  %20 = tail call ptr @json_integer_new(i64 noundef %19) #5
  %21 = tail call ptr @json_object_push(ptr noundef %12, ptr noundef nonnull @.str.2, ptr noundef %20) #5
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !19
  %24 = tail call ptr @json_array_new(i64 noundef %23) #5
  %25 = tail call ptr @json_object_push(ptr noundef %12, ptr noundef nonnull @.str.3, ptr noundef %24) #5
  %26 = load i64, ptr %22, align 8, !tbaa !19
  %.not45 = icmp eq i64 %26, 0
  br i1 %.not45, label %.critedge, label %.critedge43.lr.ph

.critedge43.lr.ph:                                ; preds = %.critedge41
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  br label %.critedge43

.critedge:                                        ; preds = %57, %.critedge41
  %28 = call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str, ptr noundef %12) #5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 64
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  call void %31(ptr noundef %29) #5
  br label %62

.critedge43:                                      ; preds = %.critedge43.lr.ph, %57
  %.03644 = phi i64 [ 0, %.critedge43.lr.ph ], [ %59, %57 ]
  %32 = load ptr, ptr %27, align 8, !tbaa !21
  %33 = getelementptr inbounds %struct.meta_Entry, ptr %32, i64 %.03644
  %34 = call ptr @json_object_new(i64 noundef 2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %35 = load i32, ptr %33, align 8, !tbaa !22
  call void @tag2str(i32 noundef %35, ptr noundef nonnull %4)
  %36 = call ptr @json_string_new_length(i32 noundef 4, ptr noundef nonnull %4) #5
  %37 = call ptr @json_object_push(ptr noundef %34, ptr noundef nonnull @.str.4, ptr noundef %36) #5
  %38 = load i32, ptr %33, align 8, !tbaa !22
  %39 = call zeroext i1 @isStringTag(i32 noundef %38)
  br i1 %39, label %40, label %48

40:                                               ; preds = %.critedge43
  %41 = getelementptr inbounds i8, ptr %33, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = call i64 @sdslen(ptr noundef %42)
  %44 = trunc i64 %43 to i32
  %45 = load ptr, ptr %41, align 8, !tbaa !24
  %46 = call ptr @json_string_new_length(i32 noundef %44, ptr noundef %45) #5
  %47 = call ptr @json_object_push(ptr noundef %34, ptr noundef nonnull @.str.5, ptr noundef %46) #5
  br label %57

48:                                               ; preds = %.critedge43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %33, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !24
  %51 = call i64 @sdslen(ptr noundef %50)
  %52 = call ptr @base64_encode(ptr noundef %50, i64 noundef %51, ptr noundef nonnull %5) #5
  %53 = load i64, ptr %5, align 8, !tbaa !25
  %54 = trunc i64 %53 to i32
  %55 = call ptr @json_string_new_length(i32 noundef %54, ptr noundef %52) #5
  %56 = call ptr @json_object_push(ptr noundef %34, ptr noundef nonnull @.str.6, ptr noundef %55) #5
  call void @free(ptr noundef %52) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %57

57:                                               ; preds = %48, %40
  %58 = call ptr @json_array_push(ptr noundef %24, ptr noundef %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %59 = add nuw i64 %.03644, 1
  %60 = load i64, ptr %22, align 8, !tbaa !19
  %61 = icmp ult i64 %59, %60
  br i1 %61, label %.critedge43, label %.critedge, !llvm.loop !26

62:                                               ; preds = %3, %.critedge
  ret void
}

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

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @sdsempty() local_unnamed_addr #2

declare ptr @json_object_new(i64 noundef) local_unnamed_addr #2

declare ptr @json_object_push(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @json_integer_new(i64 noundef) local_unnamed_addr #2

declare ptr @json_array_new(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @tag2str(i32 noundef, ptr noundef) local_unnamed_addr #3

declare ptr @json_string_new_length(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @isStringTag(i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @sdslen(ptr noundef) local_unnamed_addr #3

declare ptr @base64_encode(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

declare ptr @json_array_push(ptr noundef, ptr noundef) local_unnamed_addr #2

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 = { "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 = { inlinehint 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("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 #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, !10, i64 32}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22, !10, i64 24, !10, i64 32}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"otfcc_ILogger", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88}
!13 = !{!14, !15, i64 0}
!14 = !{!"", !15, i64 0, !15, i64 4, !16, i64 8}
!15 = !{!"int", !8, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 8, !10, i64 16}
!17 = !{!"long", !8, i64 0}
!18 = !{!14, !15, i64 4}
!19 = !{!14, !17, i64 8}
!20 = !{!12, !10, i64 64}
!21 = !{!14, !10, i64 24}
!22 = !{!23, !15, i64 0}
!23 = !{!"", !15, i64 0, !10, i64 8}
!24 = !{!23, !10, i64 8}
!25 = !{!17, !17, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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