; LLVM IR from caryll/otfcc :: lib/table/otl/subtables (gpos-pair)

; 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_IClassDef = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.subtable_gpos_pair = type { ptr, ptr, ptr, ptr }
%struct.otl_ClassDef = type { i16, i32, i16, ptr, ptr }
%struct.otl_PositionValue = type { double, double, double, double }

@otl_iClassDef = external constant %struct.__otfcc_IClassDef, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@FORMAT_DWIDTH = external constant i8, align 1
@.str.2 = external hidden unnamed_addr constant [7 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 ptr @otl_gpos_dump_pair(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i16, align 2
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %13, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %14 = call ptr @json_object_new(i64 noundef 3)
  store ptr %14, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_IClassDef, ptr @otl_iClassDef, i32 0, i32 11), align 8, !tbaa !9
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = call ptr %16(ptr noundef %19)
  %21 = call ptr @json_object_push(ptr noundef %15, ptr noundef @.str, ptr noundef %20)
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_IClassDef, ptr @otl_iClassDef, i32 0, i32 11), align 8, !tbaa !9
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = call ptr %23(ptr noundef %26)
  %28 = call ptr @json_object_push(ptr noundef %22, ptr noundef @.str.1, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = getelementptr inbounds %struct.otl_ClassDef, ptr %31, i32 0, i32 2
  %33 = load i16, ptr %32, align 8, !tbaa !14
  %34 = zext i16 %33 to i32
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = call ptr @json_array_new(i64 noundef %36)
  store ptr %37, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #4
  store i16 0, ptr %6, align 2, !tbaa !18
  br label %38

38:                                               ; preds = %178, %1
  %39 = load i16, ptr %6, align 2, !tbaa !18
  %40 = zext i16 %39 to i32
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct.otl_ClassDef, ptr %43, i32 0, i32 2
  %45 = load i16, ptr %44, align 8, !tbaa !14
  %46 = zext i16 %45 to i32
  %47 = icmp sle i32 %40, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %38
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  br label %181

49:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %50, i32 0, i32 1
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.otl_ClassDef, ptr %52, i32 0, i32 2
  %54 = load i16, ptr %53, align 8, !tbaa !14
  %55 = zext i16 %54 to i32
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = call ptr @json_array_new(i64 noundef %57)
  store ptr %58, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #4
  store i16 0, ptr %9, align 2, !tbaa !18
  br label %59

59:                                               ; preds = %170, %49
  %60 = load i16, ptr %9, align 2, !tbaa !18
  %61 = zext i16 %60 to i32
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = getelementptr inbounds %struct.otl_ClassDef, ptr %64, i32 0, i32 2
  %66 = load i16, ptr %65, align 8, !tbaa !14
  %67 = zext i16 %66 to i32
  %68 = icmp sle i32 %61, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %59
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #4
  br label %173

70:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = load i16, ptr %6, align 2, !tbaa !18
  %75 = zext i16 %74 to i64
  %76 = getelementptr inbounds ptr, ptr %73, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = load i16, ptr %9, align 2, !tbaa !18
  %79 = zext i16 %78 to i64
  %80 = getelementptr inbounds %struct.otl_PositionValue, ptr %77, i64 %79
  %81 = call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %80)
  store i8 %81, ptr %10, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %82, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = load i16, ptr %6, align 2, !tbaa !18
  %86 = zext i16 %85 to i64
  %87 = getelementptr inbounds ptr, ptr %84, i64 %86
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = load i16, ptr %9, align 2, !tbaa !18
  %90 = zext i16 %89 to i64
  %91 = getelementptr inbounds %struct.otl_PositionValue, ptr %88, i64 %90
  %92 = call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %91)
  store i8 %92, ptr %11, align 1, !tbaa !20
  %93 = load i8, ptr %10, align 1, !tbaa !20
  %94 = zext i8 %93 to i32
  %95 = load i8, ptr %11, align 1, !tbaa !20
  %96 = zext i8 %95 to i32
  %97 = or i32 %94, %96
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %165

99:                                               ; preds = %70
  %100 = load i8, ptr %10, align 1, !tbaa !20
  %101 = zext i8 %100 to i32
  %102 = load i8, ptr @FORMAT_DWIDTH, align 1, !tbaa !20
  %103 = zext i8 %102 to i32
  %104 = icmp eq i32 %101, %103
  br i1 %104, label %105, label %125

105:                                              ; preds = %99
  %106 = load i8, ptr %11, align 1, !tbaa !20
  %107 = zext i8 %106 to i32
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %125

109:                                              ; preds = %105
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = load i16, ptr %6, align 2, !tbaa !18
  %115 = zext i16 %114 to i64
  %116 = getelementptr inbounds ptr, ptr %113, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !5
  %118 = load i16, ptr %9, align 2, !tbaa !18
  %119 = zext i16 %118 to i64
  %120 = getelementptr inbounds %struct.otl_PositionValue, ptr %117, i64 %119
  %121 = getelementptr inbounds %struct.otl_PositionValue, ptr %120, i32 0, i32 2
  %122 = load double, ptr %121, align 8, !tbaa !22
  %123 = call ptr @json_new_position(double noundef %122)
  %124 = call ptr @json_array_push(ptr noundef %110, ptr noundef %123)
  br label %164

125:                                              ; preds = %105, %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %126 = call ptr @json_object_new(i64 noundef 2)
  store ptr %126, ptr %12, align 8, !tbaa !5
  %127 = load i8, ptr %10, align 1, !tbaa !20
  %128 = icmp ne i8 %127, 0
  br i1 %128, label %129, label %143

129:                                              ; preds = %125
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = load i16, ptr %6, align 2, !tbaa !18
  %135 = zext i16 %134 to i64
  %136 = getelementptr inbounds ptr, ptr %133, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = load i16, ptr %9, align 2, !tbaa !18
  %139 = zext i16 %138 to i64
  %140 = getelementptr inbounds %struct.otl_PositionValue, ptr %137, i64 %139
  %141 = call ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %140)
  %142 = call ptr @json_object_push(ptr noundef %130, ptr noundef @.str, ptr noundef %141)
  br label %143

143:                                              ; preds = %129, %125
  %144 = load i8, ptr %11, align 1, !tbaa !20
  %145 = icmp ne i8 %144, 0
  br i1 %145, label %146, label %160

146:                                              ; preds = %143
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %148, i32 0, i32 3
  %150 = load ptr, ptr %149, align 8, !tbaa !21
  %151 = load i16, ptr %6, align 2, !tbaa !18
  %152 = zext i16 %151 to i64
  %153 = getelementptr inbounds ptr, ptr %150, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  %155 = load i16, ptr %9, align 2, !tbaa !18
  %156 = zext i16 %155 to i64
  %157 = getelementptr inbounds %struct.otl_PositionValue, ptr %154, i64 %156
  %158 = call ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %157)
  %159 = call ptr @json_object_push(ptr noundef %147, ptr noundef @.str.1, ptr noundef %158)
  br label %160

160:                                              ; preds = %146, %143
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = call ptr @json_array_push(ptr noundef %161, ptr noundef %162)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %164

164:                                              ; preds = %160, %109
  br label %169

165:                                              ; preds = %70
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = call ptr @json_new_position(double noundef 0.000000e+00)
  %168 = call ptr @json_array_push(ptr noundef %166, ptr noundef %167)
  br label %169

169:                                              ; preds = %165, %164
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %170

170:                                              ; preds = %169
  %171 = load i16, ptr %9, align 2, !tbaa !18
  %172 = add i16 %171, 1
  store i16 %172, ptr %9, align 2, !tbaa !18
  br label %59, !llvm.loop !25

173:                                              ; preds = %69
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = call ptr @preserialize(ptr noundef %175)
  %177 = call ptr @json_array_push(ptr noundef %174, ptr noundef %176)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %178

178:                                              ; preds = %173
  %179 = load i16, ptr %6, align 2, !tbaa !18
  %180 = add i16 %179, 1
  store i16 %180, ptr %6, align 2, !tbaa !18
  br label %38, !llvm.loop !27

181:                                              ; preds = %48
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = call ptr @json_object_push(ptr noundef %182, ptr noundef @.str.2, ptr noundef %183)
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret ptr %185
}

declare ptr @json_object_new(i64 noundef) #2

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

declare ptr @json_array_new(i64 noundef) #2

declare zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8) #2

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

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

declare ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @preserialize(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 88}
!10 = !{!"__otfcc_IClassDef", !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, !6, i64 96, !6, i64 104, !6, i64 112}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !16, i64 8}
!15 = !{!"", !16, i64 0, !17, i64 4, !16, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"short", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!16, !16, i64 0}
!19 = !{!12, !6, i64 16}
!20 = !{!7, !7, i64 0}
!21 = !{!12, !6, i64 24}
!22 = !{!23, !24, i64 16}
!23 = !{!"", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24}
!24 = !{!"double", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; 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.__otfcc_IClassDef = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otl_PositionValue = type { double, double, double, double }

@otl_iClassDef = external local_unnamed_addr constant %struct.__otfcc_IClassDef, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@FORMAT_DWIDTH = external local_unnamed_addr constant i8, align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otl_gpos_dump_pair(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = tail call ptr @json_object_new(i64 noundef 3) #3
  %3 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iClassDef, i64 88), align 8, !tbaa !5
  %4 = load ptr, ptr %0, align 8, !tbaa !10
  %5 = tail call ptr %3(ptr noundef %4) #3
  %6 = tail call ptr @json_object_push(ptr noundef %2, ptr noundef nonnull @.str, ptr noundef %5) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  %9 = tail call ptr %3(ptr noundef %8) #3
  %10 = tail call ptr @json_object_push(ptr noundef %2, ptr noundef nonnull @.str.1, ptr noundef %9) #3
  %11 = load ptr, ptr %0, align 8, !tbaa !10
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load i16, ptr %12, align 8, !tbaa !13
  %14 = zext i16 %13 to i64
  %15 = add nuw nsw i64 %14, 1
  %16 = tail call ptr @json_array_new(i64 noundef %15) #3
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = load i8, ptr @FORMAT_DWIDTH, align 1
  br label %22

20:                                               ; preds = %30
  %21 = tail call ptr @json_object_push(ptr noundef %2, ptr noundef nonnull @.str.2, ptr noundef %16) #3
  ret ptr %2

22:                                               ; preds = %1, %30
  %.052 = phi i16 [ 0, %1 ], [ %33, %30 ]
  %23 = load ptr, ptr %7, align 8, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i16, ptr %24, align 8, !tbaa !13
  %26 = zext i16 %25 to i64
  %27 = add nuw nsw i64 %26, 1
  %28 = tail call ptr @json_array_new(i64 noundef %27) #3
  %29 = zext i16 %.052 to i64
  br label %37

30:                                               ; preds = %79
  %31 = tail call ptr @preserialize(ptr noundef %28)
  %32 = tail call ptr @json_array_push(ptr noundef %16, ptr noundef %31) #3
  %33 = add i16 %.052, 1
  %34 = load ptr, ptr %0, align 8, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load i16, ptr %35, align 8, !tbaa !13
  %.not = icmp ugt i16 %33, %36
  br i1 %.not, label %20, label %22, !llvm.loop !17

37:                                               ; preds = %22, %79
  %.04651 = phi i16 [ 0, %22 ], [ %81, %79 ]
  %38 = load ptr, ptr %17, align 8, !tbaa !19
  %39 = getelementptr inbounds ptr, ptr %38, i64 %29
  %40 = load ptr, ptr %39, align 8, !tbaa !20
  %41 = zext i16 %.04651 to i64
  %42 = getelementptr inbounds %struct.otl_PositionValue, ptr %40, i64 %41
  %43 = tail call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %42) #3
  %44 = load ptr, ptr %18, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %44, i64 %29
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = getelementptr inbounds %struct.otl_PositionValue, ptr %46, i64 %41
  %48 = tail call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %47) #3
  %49 = or i8 %48, %43
  %.not48 = icmp eq i8 %49, 0
  br i1 %.not48, label %77, label %50

50:                                               ; preds = %37
  %51 = icmp eq i8 %43, %19
  %52 = icmp eq i8 %48, 0
  %or.cond = and i1 %52, %51
  br i1 %or.cond, label %53, label %60

53:                                               ; preds = %50
  %54 = load ptr, ptr %17, align 8, !tbaa !19
  %55 = getelementptr inbounds ptr, ptr %54, i64 %29
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %57 = getelementptr inbounds %struct.otl_PositionValue, ptr %56, i64 %41, i32 2
  %58 = load double, ptr %57, align 8, !tbaa !22
  %59 = tail call ptr @json_new_position(double noundef %58)
  br label %79

60:                                               ; preds = %50
  %61 = tail call ptr @json_object_new(i64 noundef 2) #3
  %.not49 = icmp eq i8 %43, 0
  br i1 %.not49, label %69, label %62

62:                                               ; preds = %60
  %63 = load ptr, ptr %17, align 8, !tbaa !19
  %64 = getelementptr inbounds ptr, ptr %63, i64 %29
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  %66 = getelementptr inbounds %struct.otl_PositionValue, ptr %65, i64 %41
  %67 = tail call ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %66) #3
  %68 = tail call ptr @json_object_push(ptr noundef %61, ptr noundef nonnull @.str, ptr noundef %67) #3
  br label %69

69:                                               ; preds = %62, %60
  br i1 %52, label %79, label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %18, align 8, !tbaa !21
  %72 = getelementptr inbounds ptr, ptr %71, i64 %29
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  %74 = getelementptr inbounds %struct.otl_PositionValue, ptr %73, i64 %41
  %75 = tail call ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %74) #3
  %76 = tail call ptr @json_object_push(ptr noundef %61, ptr noundef nonnull @.str.1, ptr noundef %75) #3
  br label %79

77:                                               ; preds = %37
  %78 = tail call ptr @json_new_position(double noundef 0.000000e+00)
  br label %79

79:                                               ; preds = %69, %70, %53, %77
  %.sink = phi ptr [ %59, %53 ], [ %78, %77 ], [ %61, %70 ], [ %61, %69 ]
  %80 = tail call ptr @json_array_push(ptr noundef %28, ptr noundef %.sink) #3
  %81 = add i16 %.04651, 1
  %82 = load ptr, ptr %7, align 8, !tbaa !12
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load i16, ptr %83, align 8, !tbaa !13
  %.not47 = icmp ugt i16 %81, %84
  br i1 %.not47, label %30, label %37, !llvm.loop !25
}

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_array_new(i64 noundef) local_unnamed_addr #1

declare zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8) local_unnamed_addr #1

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

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

declare ptr @gpos_dump_value(ptr noundef byval(%struct.otl_PositionValue) align 8) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @preserialize(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, !7, i64 88}
!6 = !{!"__otfcc_IClassDef", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!12 = !{!11, !7, i64 8}
!13 = !{!14, !15, i64 8}
!14 = !{!"", !15, i64 0, !16, i64 4, !15, i64 8, !7, i64 16, !7, i64 24}
!15 = !{!"short", !8, i64 0}
!16 = !{!"int", !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!11, !7, i64 16}
!20 = !{!7, !7, i64 0}
!21 = !{!11, !7, i64 24}
!22 = !{!23, !24, i64 16}
!23 = !{!"", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24}
!24 = !{!"double", !8, i64 0}
!25 = distinct !{!25, !18}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass