; LLVM IR from caryll/otfcc :: lib/font (caryll-sfnt-builder)

; 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_SFNTBuilder = type { i32, i32, ptr, ptr }
%struct.otfcc_SFNTTableEntry = type { i32, i32, i32, ptr, %struct.UT_hash_handle }
%struct.UT_hash_handle = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.UT_hash_table = type { ptr, i32, i32, i32, ptr, i64, i32, i32, i32, i32, i32 }
%struct.UT_hash_bucket = type { ptr, i32, i32 }

; 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_deleteSFNTBuilder(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 i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %11, label %10

10:                                               ; preds = %1
  br label %249

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %14, ptr %3, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %15, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %26

19:                                               ; preds = %11
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %20, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %22, i32 0, i32 4
  %24 = getelementptr inbounds %struct.UT_hash_handle, ptr %23, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !12
  br label %27

26:                                               ; preds = %11
  br label %27

27:                                               ; preds = %26, %19
  %28 = phi ptr [ %25, %19 ], [ null, %26 ]
  store ptr %28, ptr %4, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %245, %27
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %247

32:                                               ; preds = %29
  br label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %34, i32 0, i32 4
  store ptr %35, ptr %5, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.UT_hash_handle, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = icmp eq ptr %38, null
  br i1 %39, label %40, label %62

40:                                               ; preds = %33
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.UT_hash_handle, ptr %41, i32 0, i32 2
  %43 = load ptr, ptr %42, align 8, !tbaa !16
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %62

45:                                               ; preds = %40
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %48, i32 0, i32 4
  %50 = getelementptr inbounds %struct.UT_hash_handle, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = getelementptr inbounds %struct.UT_hash_table, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !18
  call void @free(ptr noundef %53) #4
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %56, i32 0, i32 4
  %58 = getelementptr inbounds %struct.UT_hash_handle, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  call void @free(ptr noundef %59) #4
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %60, i32 0, i32 2
  store ptr null, ptr %61, align 8, !tbaa !9
  br label %228

62:                                               ; preds = %40, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %66, i32 0, i32 4
  %68 = getelementptr inbounds %struct.UT_hash_handle, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = getelementptr inbounds %struct.UT_hash_table, ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !21
  %72 = icmp eq ptr %63, %71
  br i1 %72, label %73, label %93

73:                                               ; preds = %62
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.UT_hash_handle, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !15
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %79, i32 0, i32 4
  %81 = getelementptr inbounds %struct.UT_hash_handle, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds %struct.UT_hash_table, ptr %82, i32 0, i32 5
  %84 = load i64, ptr %83, align 8, !tbaa !22
  %85 = getelementptr inbounds i8, ptr %76, i64 %84
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %88, i32 0, i32 4
  %90 = getelementptr inbounds %struct.UT_hash_handle, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !17
  %92 = getelementptr inbounds %struct.UT_hash_table, ptr %91, i32 0, i32 4
  store ptr %85, ptr %92, align 8, !tbaa !21
  br label %93

93:                                               ; preds = %73, %62
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.UT_hash_handle, ptr %94, i32 0, i32 1
  %96 = load ptr, ptr %95, align 8, !tbaa !15
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %115

98:                                               ; preds = %93
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.UT_hash_handle, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !16
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.UT_hash_handle, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !15
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %107, i32 0, i32 4
  %109 = getelementptr inbounds %struct.UT_hash_handle, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !17
  %111 = getelementptr inbounds %struct.UT_hash_table, ptr %110, i32 0, i32 5
  %112 = load i64, ptr %111, align 8, !tbaa !22
  %113 = getelementptr inbounds i8, ptr %104, i64 %112
  %114 = getelementptr inbounds %struct.UT_hash_handle, ptr %113, i32 0, i32 2
  store ptr %101, ptr %114, align 8, !tbaa !16
  br label %124

115:                                              ; preds = %93
  br label %116

116:                                              ; preds = %115
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.UT_hash_handle, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !16
  %120 = load ptr, ptr %2, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %120, i32 0, i32 2
  store ptr %119, ptr %121, align 8, !tbaa !9
  br label %122

122:                                              ; preds = %116
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123, %98
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.UT_hash_handle, ptr %125, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !16
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %146

129:                                              ; preds = %124
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.UT_hash_handle, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !15
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.UT_hash_handle, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !16
  %136 = load ptr, ptr %2, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %136, i32 0, i32 2
  %138 = load ptr, ptr %137, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %138, i32 0, i32 4
  %140 = getelementptr inbounds %struct.UT_hash_handle, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !17
  %142 = getelementptr inbounds %struct.UT_hash_table, ptr %141, i32 0, i32 5
  %143 = load i64, ptr %142, align 8, !tbaa !22
  %144 = getelementptr inbounds i8, ptr %135, i64 %143
  %145 = getelementptr inbounds %struct.UT_hash_handle, ptr %144, i32 0, i32 1
  store ptr %132, ptr %145, align 8, !tbaa !15
  br label %146

146:                                              ; preds = %129, %124
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.UT_hash_handle, ptr %148, i32 0, i32 7
  %150 = load i32, ptr %149, align 4, !tbaa !23
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %151, i32 0, i32 2
  %153 = load ptr, ptr %152, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %153, i32 0, i32 4
  %155 = getelementptr inbounds %struct.UT_hash_handle, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !17
  %157 = getelementptr inbounds %struct.UT_hash_table, ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 8, !tbaa !24
  %159 = sub i32 %158, 1
  %160 = and i32 %150, %159
  store i32 %160, ptr %6, align 4, !tbaa !25
  br label %161

161:                                              ; preds = %147
  br label %162

162:                                              ; preds = %161
  br label %163

163:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %164, i32 0, i32 2
  %166 = load ptr, ptr %165, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %166, i32 0, i32 4
  %168 = getelementptr inbounds %struct.UT_hash_handle, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  %170 = getelementptr inbounds %struct.UT_hash_table, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !18
  %172 = load i32, ptr %6, align 4, !tbaa !25
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds %struct.UT_hash_bucket, ptr %171, i64 %173
  store ptr %174, ptr %7, align 8, !tbaa !5
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.UT_hash_bucket, ptr %175, i32 0, i32 1
  %177 = load i32, ptr %176, align 8, !tbaa !26
  %178 = add i32 %177, -1
  store i32 %178, ptr %176, align 8, !tbaa !26
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.UT_hash_bucket, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !28
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = icmp eq ptr %181, %182
  br i1 %183, label %184, label %190

184:                                              ; preds = %163
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.UT_hash_handle, ptr %185, i32 0, i32 4
  %187 = load ptr, ptr %186, align 8, !tbaa !29
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.UT_hash_bucket, ptr %188, i32 0, i32 0
  store ptr %187, ptr %189, align 8, !tbaa !28
  br label %190

190:                                              ; preds = %184, %163
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.UT_hash_handle, ptr %191, i32 0, i32 3
  %193 = load ptr, ptr %192, align 8, !tbaa !30
  %194 = icmp ne ptr %193, null
  br i1 %194, label %195, label %203

195:                                              ; preds = %190
  %196 = load ptr, ptr %5, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.UT_hash_handle, ptr %196, i32 0, i32 4
  %198 = load ptr, ptr %197, align 8, !tbaa !29
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.UT_hash_handle, ptr %199, i32 0, i32 3
  %201 = load ptr, ptr %200, align 8, !tbaa !30
  %202 = getelementptr inbounds %struct.UT_hash_handle, ptr %201, i32 0, i32 4
  store ptr %198, ptr %202, align 8, !tbaa !29
  br label %203

203:                                              ; preds = %195, %190
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.UT_hash_handle, ptr %204, i32 0, i32 4
  %206 = load ptr, ptr %205, align 8, !tbaa !29
  %207 = icmp ne ptr %206, null
  br i1 %207, label %208, label %216

208:                                              ; preds = %203
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.UT_hash_handle, ptr %209, i32 0, i32 3
  %211 = load ptr, ptr %210, align 8, !tbaa !30
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.UT_hash_handle, ptr %212, i32 0, i32 4
  %214 = load ptr, ptr %213, align 8, !tbaa !29
  %215 = getelementptr inbounds %struct.UT_hash_handle, ptr %214, i32 0, i32 3
  store ptr %211, ptr %215, align 8, !tbaa !30
  br label %216

216:                                              ; preds = %208, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217
  %219 = load ptr, ptr %2, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.otfcc_SFNTBuilder, ptr %219, i32 0, i32 2
  %221 = load ptr, ptr %220, align 8, !tbaa !9
  %222 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %221, i32 0, i32 4
  %223 = getelementptr inbounds %struct.UT_hash_handle, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !17
  %225 = getelementptr inbounds %struct.UT_hash_table, ptr %224, i32 0, i32 3
  %226 = load i32, ptr %225, align 8, !tbaa !31
  %227 = add i32 %226, -1
  store i32 %227, ptr %225, align 8, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %228

228:                                              ; preds = %218, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %231, i32 0, i32 3
  %233 = load ptr, ptr %232, align 8, !tbaa !32
  call void @buffree(ptr noundef %233)
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %234) #4
  store ptr null, ptr %3, align 8, !tbaa !5
  br label %235

235:                                              ; preds = %230
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %236, ptr %3, align 8, !tbaa !5
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = icmp ne ptr %237, null
  br i1 %238, label %239, label %244

239:                                              ; preds = %235
  %240 = load ptr, ptr %4, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.otfcc_SFNTTableEntry, ptr %240, i32 0, i32 4
  %242 = getelementptr inbounds %struct.UT_hash_handle, ptr %241, i32 0, i32 2
  %243 = load ptr, ptr %242, align 8, !tbaa !12
  br label %245

244:                                              ; preds = %235
  br label %245

245:                                              ; preds = %244, %239
  %246 = phi ptr [ %243, %239 ], [ null, %244 ]
  store ptr %246, ptr %4, align 8, !tbaa !5
  br label %29, !llvm.loop !33

247:                                              ; preds = %29
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %248) #4
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %249

249:                                              ; preds = %247, %10
  ret void
}

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

declare void @buffree(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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 8}
!10 = !{!"", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 40}
!13 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !14, i64 24}
!14 = !{!"UT_hash_handle", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 16}
!17 = !{!13, !6, i64 24}
!18 = !{!19, !6, i64 0}
!19 = !{!"UT_hash_table", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !20, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56}
!20 = !{!"long", !7, i64 0}
!21 = !{!19, !6, i64 24}
!22 = !{!19, !20, i64 32}
!23 = !{!14, !11, i64 52}
!24 = !{!19, !11, i64 8}
!25 = !{!11, !11, i64 0}
!26 = !{!27, !11, i64 8}
!27 = !{!"UT_hash_bucket", !6, i64 0, !11, i64 8, !11, i64 12}
!28 = !{!27, !6, i64 0}
!29 = !{!14, !6, i64 32}
!30 = !{!14, !6, i64 24}
!31 = !{!19, !11, i64 16}
!32 = !{!13, !6, i64 16}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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

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

2:                                                ; preds = %1
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not55 = icmp eq ptr %4, null
  br i1 %.not55, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %76
  %.sink72 = phi ptr [ %6, %76 ], [ %4, %2 ]
  %5 = getelementptr inbounds i8, ptr %.sink72, i64 40
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %.sink72, i64 24
  %8 = getelementptr inbounds i8, ptr %.sink72, i64 32
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %22

11:                                               ; preds = %.lr.ph
  %12 = getelementptr inbounds i8, ptr %.sink72, i64 40
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = icmp eq ptr %13, null
  %.pre65 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %14, label %15, label %22

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %.pre65, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = load ptr, ptr %17, align 8, !tbaa !17
  tail call void @free(ptr noundef %18) #3
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  tail call void @free(ptr noundef %21) #3
  store ptr null, ptr %3, align 8, !tbaa !5
  br label %76

22:                                               ; preds = %.lr.ph._crit_edge, %11
  %23 = phi ptr [ %.pre, %.lr.ph._crit_edge ], [ %.pre65, %11 ]
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %25, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !20
  %28 = icmp eq ptr %7, %27
  br i1 %28, label %29, label %33

29:                                               ; preds = %22
  %30 = getelementptr inbounds i8, ptr %25, i64 32
  %31 = load i64, ptr %30, align 8, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %9, i64 %31
  store ptr %32, ptr %26, align 8, !tbaa !20
  br label %33

33:                                               ; preds = %29, %22
  %34 = getelementptr inbounds i8, ptr %.sink72, i64 40
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  br i1 %10, label %41, label %36

36:                                               ; preds = %33
  %37 = getelementptr inbounds i8, ptr %25, i64 32
  %38 = load i64, ptr %37, align 8, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %9, i64 %38
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  br label %41

41:                                               ; preds = %33, %36
  %.sink = phi ptr [ %40, %36 ], [ %3, %33 ]
  %42 = phi ptr [ %23, %36 ], [ %35, %33 ]
  store ptr %35, ptr %.sink, align 8, !tbaa !22
  %.not58 = icmp eq ptr %35, null
  %.phi.trans.insert = getelementptr inbounds i8, ptr %42, i64 24
  %.pre67 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !16
  br i1 %.not58, label %._crit_edge66, label %43

43:                                               ; preds = %41
  %44 = getelementptr inbounds i8, ptr %.pre67, i64 32
  %45 = load i64, ptr %44, align 8, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %35, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  store ptr %9, ptr %47, align 8, !tbaa !14
  br label %._crit_edge66

._crit_edge66:                                    ; preds = %41, %43
  %48 = getelementptr inbounds i8, ptr %.sink72, i64 76
  %49 = load i32, ptr %48, align 4, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %.pre67, i64 8
  %51 = load i32, ptr %50, align 8, !tbaa !24
  %52 = add i32 %51, -1
  %53 = and i32 %52, %49
  %54 = load ptr, ptr %.pre67, align 8, !tbaa !17
  %55 = zext i32 %53 to i64
  %56 = getelementptr inbounds %struct.UT_hash_bucket, ptr %54, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 8
  %58 = load i32, ptr %57, align 8, !tbaa !25
  %59 = add i32 %58, -1
  store i32 %59, ptr %57, align 8, !tbaa !25
  %60 = load ptr, ptr %56, align 8, !tbaa !27
  %61 = icmp eq ptr %60, %7
  br i1 %61, label %62, label %65

62:                                               ; preds = %._crit_edge66
  %63 = getelementptr inbounds i8, ptr %.sink72, i64 56
  %64 = load ptr, ptr %63, align 8, !tbaa !28
  store ptr %64, ptr %56, align 8, !tbaa !27
  br label %65

65:                                               ; preds = %62, %._crit_edge66
  %66 = getelementptr inbounds i8, ptr %.sink72, i64 48
  %67 = load ptr, ptr %66, align 8, !tbaa !29
  %.not59 = icmp eq ptr %67, null
  %.phi.trans.insert69 = getelementptr inbounds i8, ptr %.sink72, i64 56
  %.pre70 = load ptr, ptr %.phi.trans.insert69, align 8, !tbaa !28
  br i1 %.not59, label %._crit_edge68, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %67, i64 32
  store ptr %.pre70, ptr %69, align 8, !tbaa !28
  br label %._crit_edge68

._crit_edge68:                                    ; preds = %65, %68
  %.not60 = icmp eq ptr %.pre70, null
  br i1 %.not60, label %72, label %70

70:                                               ; preds = %._crit_edge68
  %71 = getelementptr inbounds i8, ptr %.pre70, i64 24
  store ptr %67, ptr %71, align 8, !tbaa !29
  br label %72

72:                                               ; preds = %70, %._crit_edge68
  %73 = getelementptr inbounds i8, ptr %.pre67, i64 16
  %74 = load i32, ptr %73, align 8, !tbaa !30
  %75 = add i32 %74, -1
  store i32 %75, ptr %73, align 8, !tbaa !30
  br label %76

76:                                               ; preds = %72, %15
  %77 = getelementptr inbounds i8, ptr %.sink72, i64 16
  %78 = load ptr, ptr %77, align 8, !tbaa !31
  tail call void @buffree(ptr noundef %78) #3
  tail call void @free(ptr noundef nonnull %.sink72) #3
  %.not61 = icmp eq ptr %6, null
  br i1 %.not61, label %._crit_edge, label %.lr.ph, !llvm.loop !32

._crit_edge:                                      ; preds = %76, %2
  tail call void @free(ptr noundef nonnull %0) #3
  br label %79

79:                                               ; preds = %1, %._crit_edge
  ret void
}

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

declare void @buffree(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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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 8}
!6 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !10, i64 40}
!12 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !13, i64 24}
!13 = !{!"UT_hash_handle", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 52}
!14 = !{!13, !10, i64 8}
!15 = !{!13, !10, i64 16}
!16 = !{!12, !10, i64 24}
!17 = !{!18, !10, i64 0}
!18 = !{!"UT_hash_table", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24, !19, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56}
!19 = !{!"long", !8, i64 0}
!20 = !{!18, !10, i64 24}
!21 = !{!18, !19, i64 32}
!22 = !{!10, !10, i64 0}
!23 = !{!13, !7, i64 52}
!24 = !{!18, !7, i64 8}
!25 = !{!26, !7, i64 8}
!26 = !{!"UT_hash_bucket", !10, i64 0, !7, i64 8, !7, i64 12}
!27 = !{!26, !10, i64 0}
!28 = !{!13, !10, i64 32}
!29 = !{!13, !10, i64 24}
!30 = !{!18, !7, i64 16}
!31 = !{!12, !10, i64 16}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass