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

; 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_COLR = type { i64, i64, ptr }
%struct.colr_Mapping = type { %struct.otfcc_Handle, %struct.colr_LayerList }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.colr_LayerList = type { i64, i64, ptr }
%struct.colr_Layer = type { %struct.otfcc_Handle, i16 }

@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 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_dumpCOLR(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 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 ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = 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
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %22, label %21

21:                                               ; preds = %3
  br label %172

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

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

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

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.table_COLR, ptr %38, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !17
  %41 = call ptr @json_array_new(i64 noundef %40)
  store ptr %41, 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 %42

42:                                               ; preds = %151, %37
  %43 = load i64, ptr %11, align 8, !tbaa !20
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %51

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

51:                                               ; preds = %45, %42
  %52 = phi i1 [ false, %42 ], [ %50, %45 ]
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  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 %159

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

60:                                               ; preds = %144, %54
  %61 = load i64, ptr %11, align 8, !tbaa !20
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %65 = call ptr @json_object_new(i64 noundef 2)
  store ptr %65, ptr %13, align 8, !tbaa !5
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.colr_Mapping, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.otfcc_Handle, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %71 = call ptr @json_string_new(ptr noundef %70)
  %72 = call ptr @json_object_push(ptr noundef %66, ptr noundef @.str.2, ptr noundef %71)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.colr_Mapping, ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds %struct.colr_LayerList, ptr %74, i32 0, i32 0
  %76 = load i64, ptr %75, align 8, !tbaa !27
  %77 = call ptr @json_array_new(i64 noundef %76)
  store ptr %77, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store i64 0, ptr %15, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i64 1, ptr %16, align 8, !tbaa !20
  br label %78

78:                                               ; preds = %128, %64
  %79 = load i64, ptr %16, align 8, !tbaa !20
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %88

81:                                               ; preds = %78
  %82 = load i64, ptr %15, align 8, !tbaa !20
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.colr_Mapping, ptr %83, i32 0, i32 1
  %85 = getelementptr inbounds %struct.colr_LayerList, ptr %84, i32 0, i32 0
  %86 = load i64, ptr %85, align 8, !tbaa !27
  %87 = icmp ult i64 %82, %86
  br label %88

88:                                               ; preds = %81, %78
  %89 = phi i1 [ false, %78 ], [ %87, %81 ]
  br i1 %89, label %91, label %90

90:                                               ; preds = %88
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %136

91:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.colr_Mapping, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds %struct.colr_LayerList, ptr %93, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !28
  %96 = load i64, ptr %15, align 8, !tbaa !20
  %97 = getelementptr inbounds %struct.colr_Layer, ptr %95, i64 %96
  store ptr %97, ptr %17, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %121, %91
  %99 = load i64, ptr %16, align 8, !tbaa !20
  %100 = icmp ne i64 %99, 0
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %127

102:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %103 = call ptr @json_object_new(i64 noundef 2)
  store ptr %103, ptr %18, align 8, !tbaa !5
  %104 = load ptr, ptr %18, align 8, !tbaa !5
  %105 = load ptr, ptr %17, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.colr_Layer, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds %struct.otfcc_Handle, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !29
  %109 = call ptr @json_string_new(ptr noundef %108)
  %110 = call ptr @json_object_push(ptr noundef %104, ptr noundef @.str.3, ptr noundef %109)
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.colr_Layer, ptr %112, i32 0, i32 1
  %114 = load i16, ptr %113, align 8, !tbaa !31
  %115 = zext i16 %114 to i64
  %116 = call ptr @json_integer_new(i64 noundef %115)
  %117 = call ptr @json_object_push(ptr noundef %111, ptr noundef @.str.4, ptr noundef %116)
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load ptr, ptr %18, align 8, !tbaa !5
  %120 = call ptr @json_array_push(ptr noundef %118, ptr noundef %119)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %121

121:                                              ; preds = %102
  %122 = load i64, ptr %16, align 8, !tbaa !20
  %123 = icmp ne i64 %122, 0
  %124 = xor i1 %123, true
  %125 = zext i1 %124 to i32
  %126 = sext i32 %125 to i64
  store i64 %126, ptr %16, align 8, !tbaa !20
  br label %98, !llvm.loop !32

127:                                              ; preds = %101
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %16, align 8, !tbaa !20
  %130 = icmp ne i64 %129, 0
  %131 = xor i1 %130, true
  %132 = zext i1 %131 to i32
  %133 = sext i32 %132 to i64
  store i64 %133, ptr %16, align 8, !tbaa !20
  %134 = load i64, ptr %15, align 8, !tbaa !20
  %135 = add i64 %134, 1
  store i64 %135, ptr %15, align 8, !tbaa !20
  br label %78, !llvm.loop !34

136:                                              ; preds = %90
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = call ptr @preserialize(ptr noundef %138)
  %140 = call ptr @json_object_push(ptr noundef %137, ptr noundef @.str.5, ptr noundef %139)
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load ptr, ptr %13, align 8, !tbaa !5
  %143 = call ptr @json_array_push(ptr noundef %141, ptr noundef %142)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %144

144:                                              ; preds = %136
  %145 = load i64, ptr %11, align 8, !tbaa !20
  %146 = icmp ne i64 %145, 0
  %147 = xor i1 %146, true
  %148 = zext i1 %147 to i32
  %149 = sext i32 %148 to i64
  store i64 %149, ptr %11, align 8, !tbaa !20
  br label %60, !llvm.loop !35

150:                                              ; preds = %63
  br label %151

151:                                              ; preds = %150
  %152 = load i64, ptr %11, align 8, !tbaa !20
  %153 = icmp ne i64 %152, 0
  %154 = xor i1 %153, true
  %155 = zext i1 %154 to i32
  %156 = sext i32 %155 to i64
  store i64 %156, ptr %11, align 8, !tbaa !20
  %157 = load i64, ptr %10, align 8, !tbaa !20
  %158 = add i64 %157, 1
  store i64 %158, ptr %10, align 8, !tbaa !20
  br label %42, !llvm.loop !36

159:                                              ; preds = %53
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = call ptr @json_object_push(ptr noundef %160, ptr noundef @.str.1, ptr noundef %161)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %163

163:                                              ; preds = %159
  store i8 0, ptr %7, align 1, !tbaa !14
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.otfcc_Options, ptr %164, i32 0, i32 24
  %166 = load ptr, ptr %165, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.otfcc_ILogger, ptr %166, i32 0, i32 8
  %168 = load ptr, ptr %167, align 8, !tbaa !37
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.otfcc_Options, ptr %169, i32 0, i32 24
  %171 = load ptr, ptr %170, align 8, !tbaa !9
  call void %168(ptr noundef %171)
  br label %33, !llvm.loop !38

172:                                              ; preds = %36, %21
  ret void
}

declare ptr @json_array_new(i64 noundef) #1

declare ptr @json_object_new(i64 noundef) #1

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

declare ptr @json_string_new(ptr noundef) #1

declare ptr @json_integer_new(i64 noundef) #1

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

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

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, !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, !6, i64 8}
!23 = !{!"", !24, i64 0, !18, i64 16}
!24 = !{!"otfcc_Handle", !25, i64 0, !26, i64 4, !6, i64 8}
!25 = !{!"int", !7, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = !{!23, !19, i64 16}
!28 = !{!23, !6, i64 32}
!29 = !{!30, !6, i64 8}
!30 = !{!"", !24, i64 0, !26, i64 16}
!31 = !{!30, !26, i64 16}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !33}
!37 = !{!13, !6, i64 64}
!38 = distinct !{!38, !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"

%struct.colr_Mapping = type { %struct.otfcc_Handle, %struct.colr_LayerList }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.colr_LayerList = type { i64, i64, ptr }
%struct.colr_Layer = type { %struct.otfcc_Handle, i16 }

@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 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_dumpCOLR(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 %52, label %.critedge50

.critedge50:                                      ; 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 i64, ptr %0, align 8, !tbaa !13
  %11 = tail call ptr @json_array_new(i64 noundef %10) #3
  %12 = load i64, ptr %0, align 8, !tbaa !13
  %.not57 = icmp eq i64 %12, 0
  br i1 %.not57, label %.critedge, label %.critedge52.lr.ph

.critedge52.lr.ph:                                ; preds = %.critedge50
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  br label %.critedge52

.critedge:                                        ; preds = %.critedge2, %.critedge50
  %14 = tail call ptr @json_object_push(ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef %11) #3
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 64
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  tail call void %17(ptr noundef %15) #3
  br label %52

.critedge52:                                      ; preds = %.critedge52.lr.ph, %.critedge2
  %.04356 = phi i64 [ 0, %.critedge52.lr.ph ], [ %33, %.critedge2 ]
  %18 = load ptr, ptr %13, align 8, !tbaa !17
  %19 = getelementptr inbounds %struct.colr_Mapping, ptr %18, i64 %.04356
  %20 = tail call ptr @json_object_new(i64 noundef 2) #3
  %21 = getelementptr inbounds i8, ptr %19, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !18
  %23 = tail call ptr @json_string_new(ptr noundef %22) #3
  %24 = tail call ptr @json_object_push(ptr noundef %20, ptr noundef nonnull @.str.2, ptr noundef %23) #3
  %25 = getelementptr inbounds i8, ptr %19, i64 16
  %26 = load i64, ptr %25, align 8, !tbaa !23
  %27 = tail call ptr @json_array_new(i64 noundef %26) #3
  %28 = load i64, ptr %25, align 8, !tbaa !23
  %.not58 = icmp eq i64 %28, 0
  br i1 %.not58, label %.critedge2, label %.critedge54.lr.ph

.critedge54.lr.ph:                                ; preds = %.critedge52
  %29 = getelementptr inbounds i8, ptr %19, i64 32
  br label %.critedge54

.critedge2:                                       ; preds = %.critedge54, %.critedge52
  %30 = tail call ptr @preserialize(ptr noundef %27)
  %31 = tail call ptr @json_object_push(ptr noundef %20, ptr noundef nonnull @.str.5, ptr noundef %30) #3
  %32 = tail call ptr @json_array_push(ptr noundef %11, ptr noundef %20) #3
  %33 = add nuw i64 %.04356, 1
  %34 = load i64, ptr %0, align 8, !tbaa !13
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %.critedge52, label %.critedge, !llvm.loop !24

.critedge54:                                      ; preds = %.critedge54.lr.ph, %.critedge54
  %.04255 = phi i64 [ 0, %.critedge54.lr.ph ], [ %49, %.critedge54 ]
  %36 = load ptr, ptr %29, align 8, !tbaa !26
  %37 = getelementptr inbounds %struct.colr_Layer, ptr %36, i64 %.04255
  %38 = tail call ptr @json_object_new(i64 noundef 2) #3
  %39 = getelementptr inbounds i8, ptr %37, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !27
  %41 = tail call ptr @json_string_new(ptr noundef %40) #3
  %42 = tail call ptr @json_object_push(ptr noundef %38, ptr noundef nonnull @.str.3, ptr noundef %41) #3
  %43 = getelementptr inbounds i8, ptr %37, i64 16
  %44 = load i16, ptr %43, align 8, !tbaa !29
  %45 = zext i16 %44 to i64
  %46 = tail call ptr @json_integer_new(i64 noundef %45) #3
  %47 = tail call ptr @json_object_push(ptr noundef %38, ptr noundef nonnull @.str.4, ptr noundef %46) #3
  %48 = tail call ptr @json_array_push(ptr noundef %27, ptr noundef %38) #3
  %49 = add nuw i64 %.04255, 1
  %50 = load i64, ptr %25, align 8, !tbaa !23
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %.critedge54, label %.critedge2, !llvm.loop !30

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

declare ptr @json_array_new(i64 noundef) local_unnamed_addr #0

declare ptr @json_object_new(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(ptr noundef) local_unnamed_addr #0

declare ptr @json_integer_new(i64 noundef) local_unnamed_addr #0

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

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

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, !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, !10, i64 8}
!19 = !{!"", !20, i64 0, !14, i64 16}
!20 = !{!"otfcc_Handle", !21, i64 0, !22, i64 4, !10, i64 8}
!21 = !{!"int", !8, i64 0}
!22 = !{!"short", !8, i64 0}
!23 = !{!19, !15, i64 16}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!19, !10, i64 32}
!27 = !{!28, !10, i64 8}
!28 = !{!"", !20, i64 0, !22, i64 16}
!29 = !{!28, !22, i64 16}
!30 = distinct !{!30, !25}


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