; LLVM IR from caryll/otfcc :: lib/table_ (TSI)

; 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_TSI = type { i64, i64, ptr }
%struct.tsi_Entry = type { i32, %struct.otfcc_Handle, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 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_dumpTSI(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %4
  br label %194

24:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  %25 = load ptr, ptr %7, 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 = getelementptr inbounds %struct.otfcc_ILogger, ptr %27, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !12
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.otfcc_Options, ptr %30, i32 0, i32 24
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call ptr @sdsempty()
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %33, ptr noundef @.str, ptr noundef %34)
  call void %29(ptr noundef %32, ptr noundef %35)
  store i8 1, ptr %9, align 1, !tbaa !14
  br label %36

36:                                               ; preds = %185, %24
  %37 = load i8, ptr %9, align 1, !tbaa !14, !range !15, !noundef !16
  %38 = trunc i8 %37 to i1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  br label %194

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %41 = call ptr @json_object_new(i64 noundef 2)
  store ptr %41, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.table_TSI, ptr %42, i32 0, i32 0
  %44 = load i64, ptr %43, align 8, !tbaa !17
  %45 = call ptr @json_object_new(i64 noundef %44)
  store ptr %45, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store i64 1, ptr %14, align 8, !tbaa !20
  br label %46

46:                                               ; preds = %97, %40
  %47 = load i64, ptr %14, align 8, !tbaa !20
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %55

49:                                               ; preds = %46
  %50 = load i64, ptr %13, align 8, !tbaa !20
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.table_TSI, ptr %51, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !17
  %54 = icmp ult i64 %50, %53
  br label %55

55:                                               ; preds = %49, %46
  %56 = phi i1 [ false, %46 ], [ %54, %49 ]
  br i1 %56, label %58, label %57

57:                                               ; preds = %55
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %105

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.table_TSI, ptr %59, i32 0, i32 2
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = load i64, ptr %13, align 8, !tbaa !20
  %63 = getelementptr inbounds %struct.tsi_Entry, ptr %61, i64 %62
  store ptr %63, ptr %15, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %90, %58
  %65 = load i64, ptr %14, align 8, !tbaa !20
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %96

68:                                               ; preds = %64
  %69 = load ptr, ptr %15, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.tsi_Entry, ptr %69, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !22
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %68
  br label %90

74:                                               ; preds = %68
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.tsi_Entry, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct.otfcc_Handle, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !27
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.tsi_Entry, ptr %80, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !28
  %83 = call i64 @sdslen(ptr noundef %82)
  %84 = trunc i64 %83 to i32
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.tsi_Entry, ptr %85, i32 0, i32 2
  %87 = load ptr, ptr %86, align 8, !tbaa !28
  %88 = call ptr @json_string_new_length(i32 noundef %84, ptr noundef %87)
  %89 = call ptr @json_object_push(ptr noundef %75, ptr noundef %79, ptr noundef %88)
  br label %90

90:                                               ; preds = %74, %73
  %91 = load i64, ptr %14, align 8, !tbaa !20
  %92 = icmp ne i64 %91, 0
  %93 = xor i1 %92, true
  %94 = zext i1 %93 to i32
  %95 = sext i32 %94 to i64
  store i64 %95, ptr %14, align 8, !tbaa !20
  br label %64, !llvm.loop !29

96:                                               ; preds = %67
  br label %97

97:                                               ; preds = %96
  %98 = load i64, ptr %14, align 8, !tbaa !20
  %99 = icmp ne i64 %98, 0
  %100 = xor i1 %99, true
  %101 = zext i1 %100 to i32
  %102 = sext i32 %101 to i64
  store i64 %102, ptr %14, align 8, !tbaa !20
  %103 = load i64, ptr %13, align 8, !tbaa !20
  %104 = add i64 %103, 1
  store i64 %104, ptr %13, align 8, !tbaa !20
  br label %46, !llvm.loop !31

105:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.table_TSI, ptr %106, i32 0, i32 0
  %108 = load i64, ptr %107, align 8, !tbaa !17
  %109 = call ptr @json_object_new(i64 noundef %108)
  store ptr %109, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 1, ptr %18, align 8, !tbaa !20
  br label %110

110:                                              ; preds = %166, %105
  %111 = load i64, ptr %18, align 8, !tbaa !20
  %112 = icmp ne i64 %111, 0
  br i1 %112, label %113, label %119

113:                                              ; preds = %110
  %114 = load i64, ptr %17, align 8, !tbaa !20
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.table_TSI, ptr %115, i32 0, i32 0
  %117 = load i64, ptr %116, align 8, !tbaa !17
  %118 = icmp ult i64 %114, %117
  br label %119

119:                                              ; preds = %113, %110
  %120 = phi i1 [ false, %110 ], [ %118, %113 ]
  br i1 %120, label %122, label %121

121:                                              ; preds = %119
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %174

122:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.table_TSI, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !21
  %126 = load i64, ptr %17, align 8, !tbaa !20
  %127 = getelementptr inbounds %struct.tsi_Entry, ptr %125, i64 %126
  store ptr %127, ptr %19, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %159, %122
  %129 = load i64, ptr %18, align 8, !tbaa !20
  %130 = icmp ne i64 %129, 0
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %165

132:                                              ; preds = %128
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.tsi_Entry, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !22
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %138

137:                                              ; preds = %132
  br label %159

138:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %139 = load ptr, ptr %19, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.tsi_Entry, ptr %139, i32 0, i32 0
  %141 = load i32, ptr %140, align 8, !tbaa !22
  switch i32 %141, label %145 [
    i32 3, label %142
    i32 1, label %143
    i32 2, label %144
  ]

142:                                              ; preds = %138
  store ptr @.str.1, ptr %20, align 8, !tbaa !5
  br label %146

143:                                              ; preds = %138
  store ptr @.str.2, ptr %20, align 8, !tbaa !5
  br label %146

144:                                              ; preds = %138
  store ptr @.str.3, ptr %20, align 8, !tbaa !5
  br label %146

145:                                              ; preds = %138
  store ptr @.str.4, ptr %20, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %145, %144, %143, %142
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = load ptr, ptr %19, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.tsi_Entry, ptr %149, i32 0, i32 2
  %151 = load ptr, ptr %150, align 8, !tbaa !28
  %152 = call i64 @sdslen(ptr noundef %151)
  %153 = trunc i64 %152 to i32
  %154 = load ptr, ptr %19, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.tsi_Entry, ptr %154, i32 0, i32 2
  %156 = load ptr, ptr %155, align 8, !tbaa !28
  %157 = call ptr @json_string_new_length(i32 noundef %153, ptr noundef %156)
  %158 = call ptr @json_object_push(ptr noundef %147, ptr noundef %148, ptr noundef %157)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %159

159:                                              ; preds = %146, %137
  %160 = load i64, ptr %18, align 8, !tbaa !20
  %161 = icmp ne i64 %160, 0
  %162 = xor i1 %161, true
  %163 = zext i1 %162 to i32
  %164 = sext i32 %163 to i64
  store i64 %164, ptr %18, align 8, !tbaa !20
  br label %128, !llvm.loop !32

165:                                              ; preds = %131
  br label %166

166:                                              ; preds = %165
  %167 = load i64, ptr %18, align 8, !tbaa !20
  %168 = icmp ne i64 %167, 0
  %169 = xor i1 %168, true
  %170 = zext i1 %169 to i32
  %171 = sext i32 %170 to i64
  store i64 %171, ptr %18, align 8, !tbaa !20
  %172 = load i64, ptr %17, align 8, !tbaa !20
  %173 = add i64 %172, 1
  store i64 %173, ptr %17, align 8, !tbaa !20
  br label %110, !llvm.loop !33

174:                                              ; preds = %121
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = call ptr @json_object_push(ptr noundef %175, ptr noundef @.str.5, ptr noundef %176)
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = load ptr, ptr %16, align 8, !tbaa !5
  %180 = call ptr @json_object_push(ptr noundef %178, ptr noundef @.str.6, ptr noundef %179)
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  %184 = call ptr @json_object_push(ptr noundef %181, ptr noundef %182, ptr noundef %183)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %185

185:                                              ; preds = %174
  store i8 0, ptr %9, align 1, !tbaa !14
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.otfcc_Options, ptr %186, i32 0, i32 24
  %188 = load ptr, ptr %187, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.otfcc_ILogger, ptr %188, i32 0, i32 8
  %190 = load ptr, ptr %189, align 8, !tbaa !34
  %191 = load ptr, ptr %7, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.otfcc_Options, ptr %191, i32 0, i32 24
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  call void %190(ptr noundef %193)
  br label %36, !llvm.loop !35

194:                                              ; preds = %39, %23
  ret void
}

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_string_new_length(i32 noundef, ptr noundef) #2

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

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 = { 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 }

!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, !25, i64 8, !6, i64 24}
!24 = !{!"int", !7, i64 0}
!25 = !{!"otfcc_Handle", !24, i64 0, !26, i64 4, !6, i64 8}
!26 = !{!"short", !7, i64 0}
!27 = !{!23, !6, i64 16}
!28 = !{!23, !6, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}
!34 = !{!13, !6, i64 64}
!35 = distinct !{!35, !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.tsi_Entry = type { i32, %struct.otfcc_Handle, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }

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

; Function Attrs: nounwind uwtable
define dso_local void @otfcc_dumpTSI(ptr noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %62, label %.critedge58

.critedge58:                                      ; preds = %4
  %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() #3
  %10 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef %3) #3
  tail call void %8(ptr noundef %6, ptr noundef %10) #3
  %11 = tail call ptr @json_object_new(i64 noundef 2) #3
  %12 = load i64, ptr %0, align 8, !tbaa !13
  %13 = tail call ptr @json_object_new(i64 noundef %12) #3
  %14 = load i64, ptr %0, align 8, !tbaa !13
  %.not65 = icmp eq i64 %14, 0
  br i1 %.not65, label %.critedge, label %.critedge60.lr.ph

.critedge60.lr.ph:                                ; preds = %.critedge58
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.critedge60

.critedge:                                        ; preds = %33, %.critedge58
  %.lcssa = phi i64 [ 0, %.critedge58 ], [ %34, %33 ]
  %16 = tail call ptr @json_object_new(i64 noundef %.lcssa) #3
  %17 = load i64, ptr %0, align 8, !tbaa !13
  %.not66 = icmp eq i64 %17, 0
  br i1 %.not66, label %.critedge2, label %.critedge62.lr.ph

.critedge62.lr.ph:                                ; preds = %.critedge
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.critedge62

.critedge60:                                      ; preds = %.critedge60.lr.ph, %33
  %19 = phi i64 [ %14, %.critedge60.lr.ph ], [ %34, %33 ]
  %.04963 = phi i64 [ 0, %.critedge60.lr.ph ], [ %35, %33 ]
  %20 = load ptr, ptr %15, align 8, !tbaa !16
  %21 = getelementptr inbounds %struct.tsi_Entry, ptr %20, i64 %.04963
  %22 = load i32, ptr %21, align 8, !tbaa !17
  %.not56 = icmp eq i32 %22, 0
  br i1 %.not56, label %23, label %33

23:                                               ; preds = %.critedge60
  %24 = getelementptr inbounds i8, ptr %21, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %21, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !23
  %28 = tail call i64 @sdslen(ptr noundef %27)
  %29 = trunc i64 %28 to i32
  %30 = load ptr, ptr %26, align 8, !tbaa !23
  %31 = tail call ptr @json_string_new_length(i32 noundef %29, ptr noundef %30) #3
  %32 = tail call ptr @json_object_push(ptr noundef %13, ptr noundef %25, ptr noundef %31) #3
  %.pre = load i64, ptr %0, align 8, !tbaa !13
  br label %33

33:                                               ; preds = %.critedge60, %23
  %34 = phi i64 [ %19, %.critedge60 ], [ %.pre, %23 ]
  %35 = add nuw i64 %.04963, 1
  %36 = icmp ult i64 %35, %34
  br i1 %36, label %.critedge60, label %.critedge, !llvm.loop !24

.critedge2:                                       ; preds = %58, %.critedge
  %37 = tail call ptr @json_object_push(ptr noundef %11, ptr noundef nonnull @.str.5, ptr noundef %13) #3
  %38 = tail call ptr @json_object_push(ptr noundef %11, ptr noundef nonnull @.str.6, ptr noundef %16) #3
  %39 = tail call ptr @json_object_push(ptr noundef %1, ptr noundef %3, ptr noundef %11) #3
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 64
  %42 = load ptr, ptr %41, align 8, !tbaa !26
  tail call void %42(ptr noundef %40) #3
  br label %62

.critedge62:                                      ; preds = %.critedge62.lr.ph, %58
  %43 = phi i64 [ %17, %.critedge62.lr.ph ], [ %59, %58 ]
  %.04864 = phi i64 [ 0, %.critedge62.lr.ph ], [ %60, %58 ]
  %44 = load ptr, ptr %18, align 8, !tbaa !16
  %45 = getelementptr inbounds %struct.tsi_Entry, ptr %44, i64 %.04864
  %46 = load i32, ptr %45, align 8, !tbaa !17
  switch i32 %46, label %49 [
    i32 0, label %58
    i32 3, label %50
    i32 1, label %47
    i32 2, label %48
  ]

47:                                               ; preds = %.critedge62
  br label %50

48:                                               ; preds = %.critedge62
  br label %50

49:                                               ; preds = %.critedge62
  br label %50

50:                                               ; preds = %.critedge62, %49, %48, %47
  %.0 = phi ptr [ @.str.4, %49 ], [ @.str.3, %48 ], [ @.str.2, %47 ], [ @.str.1, %.critedge62 ]
  %51 = getelementptr inbounds i8, ptr %45, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = tail call i64 @sdslen(ptr noundef %52)
  %54 = trunc i64 %53 to i32
  %55 = load ptr, ptr %51, align 8, !tbaa !23
  %56 = tail call ptr @json_string_new_length(i32 noundef %54, ptr noundef %55) #3
  %57 = tail call ptr @json_object_push(ptr noundef %16, ptr noundef nonnull %.0, ptr noundef %56) #3
  %.pre68 = load i64, ptr %0, align 8, !tbaa !13
  br label %58

58:                                               ; preds = %.critedge62, %50
  %59 = phi i64 [ %43, %.critedge62 ], [ %.pre68, %50 ]
  %60 = add nuw i64 %.04864, 1
  %61 = icmp ult i64 %60, %59
  br i1 %61, label %.critedge62, label %.critedge2, !llvm.loop !27

62:                                               ; preds = %4, %.critedge2
  ret void
}

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

declare ptr @sdsempty() local_unnamed_addr #1

declare ptr @json_object_new(i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @sdslen(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 = { "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 = { 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 #3 = { 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 = !{!14, !10, i64 16}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !20, i64 8, !10, i64 24}
!19 = !{!"int", !8, i64 0}
!20 = !{!"otfcc_Handle", !19, i64 0, !21, i64 4, !10, i64 8}
!21 = !{!"short", !8, i64 0}
!22 = !{!18, !10, i64 16}
!23 = !{!18, !10, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!12, !10, i64 64}
!27 = distinct !{!27, !25}


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