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

; 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_cmap = type { ptr, ptr }
%struct.cmap_Entry = type { %struct.UT_hash_handle, i32, %struct.otfcc_Handle }
%struct.UT_hash_handle = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.UT_hash_table = type { ptr, i32, i32, i32, ptr, i64, i32, i32, i32, i32, i32 }
%struct.cmap_UVS_Entry = type { %struct.UT_hash_handle, %struct.cmap_UVS_key, %struct.otfcc_Handle }
%struct.cmap_UVS_key = type { i32, i32 }

@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 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

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

declare ptr @sdsempty() #1

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

16:                                               ; preds = %3
  br label %210

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

28:                                               ; preds = %201, %17
  %29 = load i8, ptr %7, align 1, !tbaa !14, !range !15, !noundef !16
  %30 = trunc i8 %29 to i1
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  br label %210

32:                                               ; preds = %28
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.table_cmap, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %111

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.table_cmap, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %51

42:                                               ; preds = %37
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.table_cmap, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = getelementptr inbounds %struct.cmap_Entry, ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %struct.UT_hash_handle, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = getelementptr inbounds %struct.UT_hash_table, ptr %48, i32 0, i32 3
  %50 = load i32, ptr %49, align 8, !tbaa !25
  br label %52

51:                                               ; preds = %37
  br label %52

52:                                               ; preds = %51, %42
  %53 = phi i32 [ %50, %42 ], [ 0, %51 ]
  %54 = zext i32 %53 to i64
  %55 = call ptr @json_object_new(i64 noundef %54)
  store ptr %55, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.table_cmap, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  store ptr %58, ptr %9, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %102, %52
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %107

62:                                               ; preds = %59
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.cmap_Entry, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds %struct.otfcc_Handle, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !28
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %101

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.otfcc_Options, ptr %69, i32 0, i32 20
  %71 = load i8, ptr %70, align 4, !tbaa !29, !range !15, !noundef !16
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %79

73:                                               ; preds = %68
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.cmap_Entry, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !30
  %77 = sext i32 %76 to i64
  %78 = call ptr @sdsfromlonglong(i64 noundef %77)
  store ptr %78, ptr %10, align 8, !tbaa !5
  br label %85

79:                                               ; preds = %68
  %80 = call ptr @sdsempty()
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.cmap_Entry, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !30
  %84 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %80, ptr noundef @.str.2, i32 noundef %83)
  store ptr %84, ptr %10, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %79, %73
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.cmap_Entry, ptr %88, i32 0, i32 2
  %90 = getelementptr inbounds %struct.otfcc_Handle, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !28
  %92 = call i64 @sdslen(ptr noundef %91)
  %93 = trunc i64 %92 to i32
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.cmap_Entry, ptr %94, i32 0, i32 2
  %96 = getelementptr inbounds %struct.otfcc_Handle, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !28
  %98 = call ptr @json_string_new_length(i32 noundef %93, ptr noundef %97)
  %99 = call ptr @json_object_push(ptr noundef %86, ptr noundef %87, ptr noundef %98)
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  call void @sdsfree(ptr noundef %100)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %101

101:                                              ; preds = %85, %62
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.cmap_Entry, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.UT_hash_handle, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !31
  store ptr %106, ptr %9, align 8, !tbaa !5
  br label %59, !llvm.loop !32

107:                                              ; preds = %59
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = call ptr @json_object_push(ptr noundef %108, ptr noundef @.str.1, ptr noundef %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %111

111:                                              ; preds = %107, %32
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.table_cmap, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !34
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %200

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.table_cmap, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !34
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %130

121:                                              ; preds = %116
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.table_cmap, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !34
  %125 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds %struct.UT_hash_handle, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !35
  %128 = getelementptr inbounds %struct.UT_hash_table, ptr %127, i32 0, i32 3
  %129 = load i32, ptr %128, align 8, !tbaa !25
  br label %131

130:                                              ; preds = %116
  br label %131

131:                                              ; preds = %130, %121
  %132 = phi i32 [ %129, %121 ], [ 0, %130 ]
  %133 = zext i32 %132 to i64
  %134 = call ptr @json_object_new(i64 noundef %133)
  store ptr %134, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.table_cmap, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !34
  store ptr %137, ptr %12, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %191, %131
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %196

141:                                              ; preds = %138
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %142, i32 0, i32 2
  %144 = getelementptr inbounds %struct.otfcc_Handle, ptr %143, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !38
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %190

147:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.otfcc_Options, ptr %148, i32 0, i32 20
  %150 = load i8, ptr %149, align 4, !tbaa !29, !range !15, !noundef !16
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %163

152:                                              ; preds = %147
  %153 = call ptr @sdsempty()
  %154 = load ptr, ptr %12, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %154, i32 0, i32 1
  %156 = getelementptr inbounds %struct.cmap_UVS_key, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 8, !tbaa !39
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %158, i32 0, i32 1
  %160 = getelementptr inbounds %struct.cmap_UVS_key, ptr %159, i32 0, i32 1
  %161 = load i32, ptr %160, align 4, !tbaa !40
  %162 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %153, ptr noundef @.str.3, i32 noundef %157, i32 noundef %161)
  store ptr %162, ptr %13, align 8, !tbaa !5
  br label %174

163:                                              ; preds = %147
  %164 = call ptr @sdsempty()
  %165 = load ptr, ptr %12, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %165, i32 0, i32 1
  %167 = getelementptr inbounds %struct.cmap_UVS_key, ptr %166, i32 0, i32 0
  %168 = load i32, ptr %167, align 8, !tbaa !39
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %169, i32 0, i32 1
  %171 = getelementptr inbounds %struct.cmap_UVS_key, ptr %170, i32 0, i32 1
  %172 = load i32, ptr %171, align 4, !tbaa !40
  %173 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %164, ptr noundef @.str.4, i32 noundef %168, i32 noundef %172)
  store ptr %173, ptr %13, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %163, %152
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %177, i32 0, i32 2
  %179 = getelementptr inbounds %struct.otfcc_Handle, ptr %178, i32 0, i32 2
  %180 = load ptr, ptr %179, align 8, !tbaa !38
  %181 = call i64 @sdslen(ptr noundef %180)
  %182 = trunc i64 %181 to i32
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds %struct.otfcc_Handle, ptr %184, i32 0, i32 2
  %186 = load ptr, ptr %185, align 8, !tbaa !38
  %187 = call ptr @json_string_new_length(i32 noundef %182, ptr noundef %186)
  %188 = call ptr @json_object_push(ptr noundef %175, ptr noundef %176, ptr noundef %187)
  %189 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sdsfree(ptr noundef %189)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %190

190:                                              ; preds = %174, %141
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %12, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.cmap_UVS_Entry, ptr %192, i32 0, i32 0
  %194 = getelementptr inbounds %struct.UT_hash_handle, ptr %193, i32 0, i32 2
  %195 = load ptr, ptr %194, align 8, !tbaa !41
  store ptr %195, ptr %12, align 8, !tbaa !5
  br label %138, !llvm.loop !42

196:                                              ; preds = %138
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = call ptr @json_object_push(ptr noundef %197, ptr noundef @.str.5, ptr noundef %198)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %200

200:                                              ; preds = %196, %111
  br label %201

201:                                              ; preds = %200
  store i8 0, ptr %7, align 1, !tbaa !14
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.otfcc_Options, ptr %202, i32 0, i32 24
  %204 = load ptr, ptr %203, align 8, !tbaa !9
  %205 = getelementptr inbounds %struct.otfcc_ILogger, ptr %204, i32 0, i32 8
  %206 = load ptr, ptr %205, align 8, !tbaa !43
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.otfcc_Options, ptr %207, i32 0, i32 24
  %209 = load ptr, ptr %208, align 8, !tbaa !9
  call void %206(ptr noundef %209)
  br label %28, !llvm.loop !44

210:                                              ; preds = %31, %16
  ret void
}

declare ptr @json_object_new(i64 noundef) #1

declare ptr @sdsfromlonglong(i64 noundef) #1

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

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

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

declare void @sdsfree(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !6, i64 0}
!18 = !{!"", !6, i64 0, !6, i64 8}
!19 = !{!20, !6, i64 0}
!20 = !{!"", !21, i64 0, !22, i64 56, !23, i64 64}
!21 = !{!"UT_hash_handle", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !22, i64 48, !22, i64 52}
!22 = !{!"int", !7, i64 0}
!23 = !{!"otfcc_Handle", !22, i64 0, !24, i64 4, !6, i64 8}
!24 = !{!"short", !7, i64 0}
!25 = !{!26, !22, i64 16}
!26 = !{!"UT_hash_table", !6, i64 0, !22, i64 8, !22, i64 12, !22, i64 16, !6, i64 24, !27, i64 32, !22, i64 40, !22, i64 44, !22, i64 48, !22, i64 52, !22, i64 56}
!27 = !{!"long", !7, i64 0}
!28 = !{!20, !6, i64 72}
!29 = !{!10, !11, i64 20}
!30 = !{!20, !22, i64 56}
!31 = !{!20, !6, i64 16}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!18, !6, i64 8}
!35 = !{!36, !6, i64 0}
!36 = !{!"", !21, i64 0, !37, i64 56, !23, i64 64}
!37 = !{!"", !22, i64 0, !22, i64 4}
!38 = !{!36, !6, i64 72}
!39 = !{!36, !22, i64 56}
!40 = !{!36, !22, i64 60}
!41 = !{!36, !6, i64 16}
!42 = distinct !{!42, !33}
!43 = !{!13, !6, i64 64}
!44 = distinct !{!44, !33}


; 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"

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

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

declare ptr @sdsempty() local_unnamed_addr #0

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

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

11:                                               ; preds = %.critedge
  %12 = load ptr, ptr %10, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load i32, ptr %13, align 8, !tbaa !21
  %15 = zext i32 %14 to i64
  %16 = tail call ptr @json_object_new(i64 noundef %15) #3
  %.04454 = load ptr, ptr %0, align 8, !tbaa !24
  %.not4955 = icmp eq ptr %.04454, null
  br i1 %.not4955, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %17 = getelementptr inbounds i8, ptr %2, i64 20
  br label %18

18:                                               ; preds = %.lr.ph, %41
  %.04456 = phi ptr [ %.04454, %.lr.ph ], [ %.044, %41 ]
  %19 = getelementptr inbounds i8, ptr %.04456, i64 72
  %20 = load ptr, ptr %19, align 8, !tbaa !25
  %.not53 = icmp eq ptr %20, null
  br i1 %.not53, label %41, label %21

21:                                               ; preds = %18
  %22 = load i8, ptr %17, align 4, !tbaa !26, !range !27, !noundef !28
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %24, label %29

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %.04456, i64 56
  %26 = load i32, ptr %25, align 8, !tbaa !29
  %27 = sext i32 %26 to i64
  %28 = tail call ptr @sdsfromlonglong(i64 noundef %27) #3
  br label %34

29:                                               ; preds = %21
  %30 = tail call ptr @sdsempty() #3
  %31 = getelementptr inbounds i8, ptr %.04456, i64 56
  %32 = load i32, ptr %31, align 8, !tbaa !29
  %33 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %30, ptr noundef nonnull @.str.2, i32 noundef %32) #3
  br label %34

34:                                               ; preds = %29, %24
  %.043 = phi ptr [ %28, %24 ], [ %33, %29 ]
  %35 = load ptr, ptr %19, align 8, !tbaa !25
  %36 = tail call i64 @sdslen(ptr noundef %35)
  %37 = trunc i64 %36 to i32
  %38 = load ptr, ptr %19, align 8, !tbaa !25
  %39 = tail call ptr @json_string_new_length(i32 noundef %37, ptr noundef %38) #3
  %40 = tail call ptr @json_object_push(ptr noundef %16, ptr noundef %.043, ptr noundef %39) #3
  tail call void @sdsfree(ptr noundef %.043) #3
  br label %41

41:                                               ; preds = %18, %34
  %42 = getelementptr inbounds i8, ptr %.04456, i64 16
  %.044 = load ptr, ptr %42, align 8, !tbaa !24
  %.not49 = icmp eq ptr %.044, null
  br i1 %.not49, label %._crit_edge, label %18, !llvm.loop !30

._crit_edge:                                      ; preds = %41, %11
  %43 = tail call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef %16) #3
  br label %44

44:                                               ; preds = %._crit_edge, %.critedge
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !32
  %.not50 = icmp eq ptr %46, null
  br i1 %.not50, label %75, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr %46, align 8, !tbaa !33
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load i32, ptr %49, align 8, !tbaa !21
  %51 = zext i32 %50 to i64
  %52 = tail call ptr @json_object_new(i64 noundef %51) #3
  %.04157 = load ptr, ptr %45, align 8, !tbaa !24
  %.not5158 = icmp eq ptr %.04157, null
  br i1 %.not5158, label %._crit_edge62, label %.lr.ph61

.lr.ph61:                                         ; preds = %47
  %53 = getelementptr inbounds i8, ptr %2, i64 20
  br label %54

54:                                               ; preds = %.lr.ph61, %72
  %.04159 = phi ptr [ %.04157, %.lr.ph61 ], [ %.041, %72 ]
  %55 = getelementptr inbounds i8, ptr %.04159, i64 72
  %56 = load ptr, ptr %55, align 8, !tbaa !36
  %.not52 = icmp eq ptr %56, null
  br i1 %.not52, label %72, label %57

57:                                               ; preds = %54
  %58 = load i8, ptr %53, align 4, !tbaa !26, !range !27, !noundef !28
  %59 = trunc nuw i8 %58 to i1
  %60 = tail call ptr @sdsempty() #3
  %61 = getelementptr inbounds i8, ptr %.04159, i64 56
  %62 = load i32, ptr %61, align 8, !tbaa !37
  %63 = getelementptr inbounds i8, ptr %.04159, i64 60
  %64 = load i32, ptr %63, align 4, !tbaa !38
  %.str.3..str.4 = select i1 %59, ptr @.str.3, ptr @.str.4
  %65 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %60, ptr noundef nonnull %.str.3..str.4, i32 noundef %62, i32 noundef %64) #3
  %66 = load ptr, ptr %55, align 8, !tbaa !36
  %67 = tail call i64 @sdslen(ptr noundef %66)
  %68 = trunc i64 %67 to i32
  %69 = load ptr, ptr %55, align 8, !tbaa !36
  %70 = tail call ptr @json_string_new_length(i32 noundef %68, ptr noundef %69) #3
  %71 = tail call ptr @json_object_push(ptr noundef %52, ptr noundef %65, ptr noundef %70) #3
  tail call void @sdsfree(ptr noundef %65) #3
  br label %72

72:                                               ; preds = %54, %57
  %73 = getelementptr inbounds i8, ptr %.04159, i64 16
  %.041 = load ptr, ptr %73, align 8, !tbaa !24
  %.not51 = icmp eq ptr %.041, null
  br i1 %.not51, label %._crit_edge62, label %54, !llvm.loop !39

._crit_edge62:                                    ; preds = %72, %47
  %74 = tail call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str.5, ptr noundef %52) #3
  br label %75

75:                                               ; preds = %44, %._crit_edge62
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 64
  %78 = load ptr, ptr %77, align 8, !tbaa !40
  tail call void %78(ptr noundef %76) #3
  br label %79

79:                                               ; preds = %3, %75
  ret void
}

declare ptr @json_object_new(i64 noundef) local_unnamed_addr #0

declare ptr @sdsfromlonglong(i64 noundef) local_unnamed_addr #0

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

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

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

declare void @sdsfree(ptr noundef) local_unnamed_addr #0

attributes #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 = { 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 = { 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, !10, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 8}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !17, i64 0, !18, i64 56, !19, i64 64}
!17 = !{!"UT_hash_handle", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !18, i64 48, !18, i64 52}
!18 = !{!"int", !8, i64 0}
!19 = !{!"otfcc_Handle", !18, i64 0, !20, i64 4, !10, i64 8}
!20 = !{!"short", !8, i64 0}
!21 = !{!22, !18, i64 16}
!22 = !{!"UT_hash_table", !10, i64 0, !18, i64 8, !18, i64 12, !18, i64 16, !10, i64 24, !23, i64 32, !18, i64 40, !18, i64 44, !18, i64 48, !18, i64 52, !18, i64 56}
!23 = !{!"long", !8, i64 0}
!24 = !{!10, !10, i64 0}
!25 = !{!16, !10, i64 72}
!26 = !{!6, !7, i64 20}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!16, !18, i64 56}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!14, !10, i64 8}
!33 = !{!34, !10, i64 0}
!34 = !{!"", !17, i64 0, !35, i64 56, !19, i64 64}
!35 = !{!"", !18, i64 0, !18, i64 4}
!36 = !{!34, !10, i64 72}
!37 = !{!34, !18, i64 56}
!38 = !{!34, !18, i64 60}
!39 = distinct !{!39, !31}
!40 = !{!12, !10, i64 64}


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