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

; 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.table_post = type { i32, i32, i16, i16, i32, i32, i32, i32, i32, ptr }
%struct.otfcc_GlyphOrder = type { ptr, ptr }
%struct.otfcc_GlyphOrderEntry = type { i16, ptr, i8, i32, %struct.UT_hash_handle, %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 }

; 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 @otfcc_buildPost(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  br label %162

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %15 = call ptr (...) @bufnew()
  store ptr %15, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.table_post, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !9
  call void @bufwrite32b(ptr noundef %16, i32 noundef %19)
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.table_post, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !13
  call void @bufwrite32b(ptr noundef %20, i32 noundef %23)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.table_post, ptr %25, i32 0, i32 2
  %27 = load i16, ptr %26, align 8, !tbaa !14
  call void @bufwrite16b(ptr noundef %24, i16 noundef zeroext %27)
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.table_post, ptr %29, i32 0, i32 3
  %31 = load i16, ptr %30, align 2, !tbaa !15
  call void @bufwrite16b(ptr noundef %28, i16 noundef zeroext %31)
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.table_post, ptr %33, i32 0, i32 4
  %35 = load i32, ptr %34, align 4, !tbaa !16
  call void @bufwrite32b(ptr noundef %32, i32 noundef %35)
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.table_post, ptr %37, i32 0, i32 5
  %39 = load i32, ptr %38, align 8, !tbaa !17
  call void @bufwrite32b(ptr noundef %36, i32 noundef %39)
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.table_post, ptr %41, i32 0, i32 6
  %43 = load i32, ptr %42, align 4, !tbaa !18
  call void @bufwrite32b(ptr noundef %40, i32 noundef %43)
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.table_post, ptr %45, i32 0, i32 7
  %47 = load i32, ptr %46, align 8, !tbaa !19
  call void @bufwrite32b(ptr noundef %44, i32 noundef %47)
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.table_post, ptr %49, i32 0, i32 8
  %51 = load i32, ptr %50, align 4, !tbaa !20
  call void @bufwrite32b(ptr noundef %48, i32 noundef %51)
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.table_post, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !9
  %55 = icmp eq i32 %54, 131072
  br i1 %55, label %56, label %160

56:                                               ; preds = %14
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !21
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %71

62:                                               ; preds = %56
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !21
  %66 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %65, i32 0, i32 5
  %67 = getelementptr inbounds %struct.UT_hash_handle, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds %struct.UT_hash_table, ptr %68, i32 0, i32 3
  %70 = load i32, ptr %69, align 8, !tbaa !26
  br label %72

71:                                               ; preds = %56
  br label %72

72:                                               ; preds = %71, %62
  %73 = phi i32 [ %70, %62 ], [ 0, %71 ]
  %74 = trunc i32 %73 to i16
  call void @bufwrite16b(ptr noundef %57, i16 noundef zeroext %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  store ptr %77, ptr %9, align 8, !tbaa !5
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %89

82:                                               ; preds = %72
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %83, i32 0, i32 1
  %85 = load ptr, ptr %84, align 8, !tbaa !21
  %86 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %85, i32 0, i32 5
  %87 = getelementptr inbounds %struct.UT_hash_handle, ptr %86, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !29
  br label %90

89:                                               ; preds = %72
  br label %90

90:                                               ; preds = %89, %82
  %91 = phi ptr [ %88, %82 ], [ null, %89 ]
  store ptr %91, ptr %10, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %113, %90
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %115

95:                                               ; preds = %92
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %97, i32 0, i32 0
  %99 = load i16, ptr %98, align 8, !tbaa !30
  %100 = zext i16 %99 to i32
  %101 = add nsw i32 258, %100
  %102 = trunc i32 %101 to i16
  call void @bufwrite16b(ptr noundef %96, i16 noundef zeroext %102)
  br label %103

103:                                              ; preds = %95
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %104, ptr %9, align 8, !tbaa !5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %112

107:                                              ; preds = %103
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %108, i32 0, i32 5
  %110 = getelementptr inbounds %struct.UT_hash_handle, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !29
  br label %113

112:                                              ; preds = %103
  br label %113

113:                                              ; preds = %112, %107
  %114 = phi ptr [ %111, %107 ], [ null, %112 ]
  store ptr %114, ptr %10, align 8, !tbaa !5
  br label %92, !llvm.loop !31

115:                                              ; preds = %92
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !21
  store ptr %118, ptr %9, align 8, !tbaa !5
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !21
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %130

123:                                              ; preds = %115
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.otfcc_GlyphOrder, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !21
  %127 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %126, i32 0, i32 5
  %128 = getelementptr inbounds %struct.UT_hash_handle, ptr %127, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !29
  br label %131

130:                                              ; preds = %115
  br label %131

131:                                              ; preds = %130, %123
  %132 = phi ptr [ %129, %123 ], [ null, %130 ]
  store ptr %132, ptr %10, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %157, %131
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %159

136:                                              ; preds = %133
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !33
  %141 = call i64 @sdslen(ptr noundef %140)
  %142 = trunc i64 %141 to i8
  call void @bufwrite8(ptr noundef %137, i8 noundef zeroext %142)
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !33
  call void @bufwrite_sds(ptr noundef %143, ptr noundef %146)
  br label %147

147:                                              ; preds = %136
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %148, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %156

151:                                              ; preds = %147
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.otfcc_GlyphOrderEntry, ptr %152, i32 0, i32 5
  %154 = getelementptr inbounds %struct.UT_hash_handle, ptr %153, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !29
  br label %157

156:                                              ; preds = %147
  br label %157

157:                                              ; preds = %156, %151
  %158 = phi ptr [ %155, %151 ], [ null, %156 ]
  store ptr %158, ptr %10, align 8, !tbaa !5
  br label %133, !llvm.loop !34

159:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %160

160:                                              ; preds = %159, %14
  %161 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %161, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %162

162:                                              ; preds = %160, %13
  %163 = load ptr, ptr %4, align 8
  ret ptr %163
}

declare ptr @bufnew(...) #2

declare void @bufwrite32b(ptr noundef, i32 noundef) #2

declare void @bufwrite16b(ptr noundef, i16 noundef zeroext) #2

declare void @bufwrite8(ptr noundef, i8 noundef zeroext) #2

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

declare void @bufwrite_sds(ptr noundef, ptr noundef) #2

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, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 10, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!10, !12, i64 8}
!15 = !{!10, !12, i64 10}
!16 = !{!10, !11, i64 12}
!17 = !{!10, !11, i64 16}
!18 = !{!10, !11, i64 20}
!19 = !{!10, !11, i64 24}
!20 = !{!10, !11, i64 28}
!21 = !{!22, !6, i64 8}
!22 = !{!"", !6, i64 0, !6, i64 8}
!23 = !{!24, !6, i64 80}
!24 = !{!"", !12, i64 0, !6, i64 8, !7, i64 16, !11, i64 20, !25, i64 24, !25, i64 80}
!25 = !{!"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}
!26 = !{!27, !11, i64 16}
!27 = !{!"UT_hash_table", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !28, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56}
!28 = !{!"long", !7, i64 0}
!29 = !{!24, !6, i64 96}
!30 = !{!24, !12, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!24, !6, i64 8}
!34 = distinct !{!34, !32}


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

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

4:                                                ; preds = %3
  %5 = tail call ptr (...) @bufnew() #3
  %6 = load i32, ptr %0, align 8, !tbaa !5
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %6) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !12
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %8) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i16, ptr %9, align 8, !tbaa !13
  tail call void @bufwrite16b(ptr noundef %5, i16 noundef zeroext %10) #3
  %11 = getelementptr inbounds i8, ptr %0, i64 10
  %12 = load i16, ptr %11, align 2, !tbaa !14
  tail call void @bufwrite16b(ptr noundef %5, i16 noundef zeroext %12) #3
  %13 = getelementptr inbounds i8, ptr %0, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !15
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %14) #3
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load i32, ptr %15, align 8, !tbaa !16
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %16) #3
  %17 = getelementptr inbounds i8, ptr %0, i64 20
  %18 = load i32, ptr %17, align 4, !tbaa !17
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %18) #3
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = load i32, ptr %19, align 8, !tbaa !18
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %20) #3
  %21 = getelementptr inbounds i8, ptr %0, i64 28
  %22 = load i32, ptr %21, align 4, !tbaa !19
  tail call void @bufwrite32b(ptr noundef %5, i32 noundef %22) #3
  %23 = load i32, ptr %0, align 8, !tbaa !5
  %24 = icmp eq i32 %23, 131072
  br i1 %24, label %25, label %.loopexit

25:                                               ; preds = %4
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !20
  %.not52 = icmp eq ptr %27, null
  br i1 %.not52, label %34, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %27, i64 80
  %30 = load ptr, ptr %29, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load i32, ptr %31, align 8, !tbaa !25
  %33 = trunc i32 %32 to i16
  br label %34

34:                                               ; preds = %25, %28
  %35 = phi i16 [ %33, %28 ], [ 0, %25 ]
  tail call void @bufwrite16b(ptr noundef %5, i16 noundef zeroext %35) #3
  %36 = load ptr, ptr %26, align 8, !tbaa !20
  %.not53 = icmp eq ptr %36, null
  br i1 %.not53, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %34, %.lr.ph
  %.sink73 = phi ptr [ %38, %.lr.ph ], [ %36, %34 ]
  %37 = getelementptr inbounds i8, ptr %.sink73, i64 96
  %38 = load ptr, ptr %37, align 8, !tbaa !28
  %39 = load i16, ptr %.sink73, align 8, !tbaa !29
  %40 = add i16 %39, 258
  tail call void @bufwrite16b(ptr noundef %5, i16 noundef zeroext %40) #3
  %.not58 = icmp eq ptr %38, null
  br i1 %.not58, label %._crit_edge, label %.lr.ph, !llvm.loop !30

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load ptr, ptr %26, align 8, !tbaa !20
  %.not55 = icmp eq ptr %.pre, null
  br i1 %.not55, label %.loopexit, label %.lr.ph66

.lr.ph66:                                         ; preds = %._crit_edge, %.lr.ph66
  %.sink74 = phi ptr [ %42, %.lr.ph66 ], [ %.pre, %._crit_edge ]
  %41 = getelementptr inbounds i8, ptr %.sink74, i64 96
  %42 = load ptr, ptr %41, align 8, !tbaa !28
  %43 = getelementptr inbounds i8, ptr %.sink74, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !32
  %45 = tail call i64 @sdslen(ptr noundef %44)
  %46 = trunc i64 %45 to i8
  tail call void @bufwrite8(ptr noundef %5, i8 noundef zeroext %46) #3
  %47 = load ptr, ptr %43, align 8, !tbaa !32
  tail call void @bufwrite_sds(ptr noundef %5, ptr noundef %47) #3
  %.not57 = icmp eq ptr %42, null
  br i1 %.not57, label %.loopexit, label %.lr.ph66, !llvm.loop !33

.loopexit:                                        ; preds = %.lr.ph66, %34, %._crit_edge, %4, %3
  %.047 = phi ptr [ null, %3 ], [ %5, %4 ], [ %5, %._crit_edge ], [ %5, %34 ], [ %5, %.lr.ph66 ]
  ret ptr %.047
}

declare ptr @bufnew(...) local_unnamed_addr #1

declare void @bufwrite32b(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @bufwrite16b(ptr noundef, i16 noundef zeroext) local_unnamed_addr #1

declare void @bufwrite8(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

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

declare void @bufwrite_sds(ptr noundef, ptr noundef) local_unnamed_addr #1

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


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