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

; 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_SVG = type { i64, i64, ptr }
%struct.svg_Assignment = type { i16, i16, ptr }
%struct.caryll_Buffer = type { i64, i64, i64, ptr }

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpSVG(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %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 i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = 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
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %19, label %18

18:                                               ; preds = %3
  br label %153

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

30:                                               ; preds = %144, %19
  %31 = load i8, ptr %7, align 1, !tbaa !14, !range !15, !noundef !16
  %32 = trunc i8 %31 to i1
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.table_SVG, ptr %35, i32 0, i32 0
  %37 = load i64, ptr %36, align 8, !tbaa !17
  %38 = call ptr @json_array_new(i64 noundef %37)
  store ptr %38, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 1, ptr %11, align 8, !tbaa !20
  br label %39

39:                                               ; preds = %132, %34
  %40 = load i64, ptr %11, align 8, !tbaa !20
  %41 = icmp ne i64 %40, 0
  br i1 %41, label %42, label %48

42:                                               ; preds = %39
  %43 = load i64, ptr %10, align 8, !tbaa !20
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.table_SVG, ptr %44, i32 0, i32 0
  %46 = load i64, ptr %45, align 8, !tbaa !17
  %47 = icmp ult i64 %43, %46
  br label %48

48:                                               ; preds = %42, %39
  %49 = phi i1 [ false, %39 ], [ %47, %42 ]
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %140

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.table_SVG, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !21
  %55 = load i64, ptr %10, align 8, !tbaa !20
  %56 = getelementptr inbounds %struct.svg_Assignment, ptr %54, i64 %55
  store ptr %56, ptr %12, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %125, %51
  %58 = load i64, ptr %11, align 8, !tbaa !20
  %59 = icmp ne i64 %58, 0
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %131

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %62 = call ptr @json_object_new(i64 noundef 4)
  store ptr %62, ptr %13, align 8, !tbaa !5
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.svg_Assignment, ptr %64, i32 0, i32 0
  %66 = load i16, ptr %65, align 8, !tbaa !22
  %67 = zext i16 %66 to i64
  %68 = call ptr @json_integer_new(i64 noundef %67)
  %69 = call ptr @json_object_push(ptr noundef %63, ptr noundef @.str.1, ptr noundef %68)
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.svg_Assignment, ptr %71, i32 0, i32 1
  %73 = load i16, ptr %72, align 2, !tbaa !25
  %74 = zext i16 %73 to i64
  %75 = call ptr @json_integer_new(i64 noundef %74)
  %76 = call ptr @json_object_push(ptr noundef %70, ptr noundef @.str.2, ptr noundef %75)
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.svg_Assignment, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !26
  %80 = call zeroext i1 @canUsePlainFormat(ptr noundef %79)
  br i1 %80, label %81, label %99

81:                                               ; preds = %61
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = call ptr @json_string_new(ptr noundef @.str.4)
  %84 = call ptr @json_object_push(ptr noundef %82, ptr noundef @.str.3, ptr noundef %83)
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.svg_Assignment, ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !26
  %89 = getelementptr inbounds %struct.caryll_Buffer, ptr %88, i32 0, i32 1
  %90 = load i64, ptr %89, align 8, !tbaa !27
  %91 = trunc i64 %90 to i32
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.svg_Assignment, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !26
  %95 = getelementptr inbounds %struct.caryll_Buffer, ptr %94, i32 0, i32 3
  %96 = load ptr, ptr %95, align 8, !tbaa !29
  %97 = call ptr @json_string_new_length(i32 noundef %91, ptr noundef %96)
  %98 = call ptr @json_object_push(ptr noundef %85, ptr noundef @.str.5, ptr noundef %97)
  br label %121

99:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 0, ptr %14, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.svg_Assignment, ptr %100, i32 0, i32 2
  %102 = load ptr, ptr %101, align 8, !tbaa !26
  %103 = getelementptr inbounds %struct.caryll_Buffer, ptr %102, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !29
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.svg_Assignment, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !26
  %108 = getelementptr inbounds %struct.caryll_Buffer, ptr %107, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !27
  %110 = call ptr @base64_encode(ptr noundef %104, i64 noundef %109, ptr noundef %14)
  store ptr %110, ptr %15, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = call ptr @json_string_new(ptr noundef @.str.6)
  %113 = call ptr @json_object_push(ptr noundef %111, ptr noundef @.str.3, ptr noundef %112)
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load i64, ptr %14, align 8, !tbaa !20
  %116 = trunc i64 %115 to i32
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = call ptr @json_string_new_length(i32 noundef %116, ptr noundef %117)
  %119 = call ptr @json_object_push(ptr noundef %114, ptr noundef @.str.5, ptr noundef %118)
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %120) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %121

121:                                              ; preds = %99, %81
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = call ptr @json_array_push(ptr noundef %122, ptr noundef %123)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %125

125:                                              ; preds = %121
  %126 = load i64, ptr %11, align 8, !tbaa !20
  %127 = icmp ne i64 %126, 0
  %128 = xor i1 %127, true
  %129 = zext i1 %128 to i32
  %130 = sext i32 %129 to i64
  store i64 %130, ptr %11, align 8, !tbaa !20
  br label %57, !llvm.loop !30

131:                                              ; preds = %60
  br label %132

132:                                              ; preds = %131
  %133 = load i64, ptr %11, align 8, !tbaa !20
  %134 = icmp ne i64 %133, 0
  %135 = xor i1 %134, true
  %136 = zext i1 %135 to i32
  %137 = sext i32 %136 to i64
  store i64 %137, ptr %11, align 8, !tbaa !20
  %138 = load i64, ptr %10, align 8, !tbaa !20
  %139 = add i64 %138, 1
  store i64 %139, ptr %10, align 8, !tbaa !20
  br label %39, !llvm.loop !32

140:                                              ; preds = %50
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = call ptr @json_object_push(ptr noundef %141, ptr noundef @.str.7, ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %144

144:                                              ; preds = %140
  store i8 0, ptr %7, align 1, !tbaa !14
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.otfcc_Options, ptr %145, i32 0, i32 24
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.otfcc_ILogger, ptr %147, i32 0, i32 8
  %149 = load ptr, ptr %148, align 8, !tbaa !33
  %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
  call void %149(ptr noundef %152)
  br label %30, !llvm.loop !34

153:                                              ; preds = %33, %18
  ret void
}

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

declare ptr @sdsempty() #2

declare ptr @json_array_new(i64 noundef) #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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @canUsePlainFormat(ptr noundef) #1

declare ptr @json_string_new(ptr noundef) #2

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

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

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

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

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

!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 8, !6, i64 16}
!19 = !{!"long", !7, i64 0}
!20 = !{!19, !19, i64 0}
!21 = !{!18, !6, i64 16}
!22 = !{!23, !24, i64 0}
!23 = !{!"", !24, i64 0, !24, i64 2, !6, i64 8}
!24 = !{!"short", !7, i64 0}
!25 = !{!23, !24, i64 2}
!26 = !{!23, !6, i64 8}
!27 = !{!28, !19, i64 8}
!28 = !{!"caryll_Buffer", !19, i64 0, !19, i64 8, !19, i64 16, !6, i64 24}
!29 = !{!28, !6, i64 24}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!13, !6, i64 64}
!34 = distinct !{!34, !31}


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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpSVG(ptr noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #1 {
  %4 = alloca i64, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %63, label %.critedge39

.critedge39:                                      ; preds = %3
  %5 = getelementptr inbounds i8, ptr %2, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = tail call ptr @sdsempty() #4
  %10 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %9, ptr noundef nonnull @.str) #4
  tail call void %8(ptr noundef %6, ptr noundef %10) #4
  %11 = load i64, ptr %0, align 8, !tbaa !13
  %12 = tail call ptr @json_array_new(i64 noundef %11) #4
  %13 = load i64, ptr %0, align 8, !tbaa !13
  %.not43 = icmp eq i64 %13, 0
  br i1 %.not43, label %.critedge, label %.critedge41.lr.ph

.critedge41.lr.ph:                                ; preds = %.critedge39
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.critedge41

.critedge:                                        ; preds = %58, %.critedge39
  %15 = call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str.7, ptr noundef %12) #4
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 64
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  call void %18(ptr noundef %16) #4
  br label %63

.critedge41:                                      ; preds = %.critedge41.lr.ph, %58
  %.03442 = phi i64 [ 0, %.critedge41.lr.ph ], [ %60, %58 ]
  %19 = load ptr, ptr %14, align 8, !tbaa !17
  %20 = getelementptr inbounds %struct.svg_Assignment, ptr %19, i64 %.03442
  %21 = call ptr @json_object_new(i64 noundef 4) #4
  %22 = load i16, ptr %20, align 8, !tbaa !18
  %23 = zext i16 %22 to i64
  %24 = call ptr @json_integer_new(i64 noundef %23) #4
  %25 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.1, ptr noundef %24) #4
  %26 = getelementptr inbounds i8, ptr %20, i64 2
  %27 = load i16, ptr %26, align 2, !tbaa !21
  %28 = zext i16 %27 to i64
  %29 = call ptr @json_integer_new(i64 noundef %28) #4
  %30 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.2, ptr noundef %29) #4
  %31 = getelementptr inbounds i8, ptr %20, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = call zeroext i1 @canUsePlainFormat(ptr noundef %32)
  br i1 %33, label %34, label %45

34:                                               ; preds = %.critedge41
  %35 = call ptr @json_string_new(ptr noundef nonnull @.str.4) #4
  %36 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.3, ptr noundef %35) #4
  %37 = load ptr, ptr %31, align 8, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load i64, ptr %38, align 8, !tbaa !23
  %40 = trunc i64 %39 to i32
  %41 = getelementptr inbounds i8, ptr %37, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %43 = call ptr @json_string_new_length(i32 noundef %40, ptr noundef %42) #4
  %44 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.5, ptr noundef %43) #4
  br label %58

45:                                               ; preds = %.critedge41
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store i64 0, ptr %4, align 8, !tbaa !26
  %46 = load ptr, ptr %31, align 8, !tbaa !22
  %47 = getelementptr inbounds i8, ptr %46, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %46, i64 8
  %50 = load i64, ptr %49, align 8, !tbaa !23
  %51 = call ptr @base64_encode(ptr noundef %48, i64 noundef %50, ptr noundef nonnull %4) #4
  %52 = call ptr @json_string_new(ptr noundef nonnull @.str.6) #4
  %53 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.3, ptr noundef %52) #4
  %54 = load i64, ptr %4, align 8, !tbaa !26
  %55 = trunc i64 %54 to i32
  %56 = call ptr @json_string_new_length(i32 noundef %55, ptr noundef %51) #4
  %57 = call ptr @json_object_push(ptr noundef %21, ptr noundef nonnull @.str.5, ptr noundef %56) #4
  call void @free(ptr noundef %51) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %58

58:                                               ; preds = %45, %34
  %59 = call ptr @json_array_push(ptr noundef %12, ptr noundef %21) #4
  %60 = add nuw i64 %.03442, 1
  %61 = load i64, ptr %0, align 8, !tbaa !13
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %.critedge41, label %.critedge, !llvm.loop !27

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

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

declare ptr @sdsempty() local_unnamed_addr #2

declare ptr @json_array_new(i64 noundef) 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

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @canUsePlainFormat(ptr noundef) local_unnamed_addr #1

declare ptr @json_string_new(ptr noundef) local_unnamed_addr #2

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

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 #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 8, !10, i64 16}
!15 = !{!"long", !8, i64 0}
!16 = !{!12, !10, i64 64}
!17 = !{!14, !10, i64 16}
!18 = !{!19, !20, i64 0}
!19 = !{!"", !20, i64 0, !20, i64 2, !10, i64 8}
!20 = !{!"short", !8, i64 0}
!21 = !{!19, !20, i64 2}
!22 = !{!19, !10, i64 8}
!23 = !{!24, !15, i64 8}
!24 = !{!"caryll_Buffer", !15, i64 0, !15, i64 8, !15, i64 16, !10, i64 24}
!25 = !{!24, !10, i64 24}
!26 = !{!15, !15, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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