; LLVM IR from humz2k/sugaryc :: ext/bdwgc/cord/cordbscs.ll_CORD (next)

; 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.CORD_Pos = type { i64, i32, ptr, i64, i64, [49 x %struct.CORD_pe], [8 x i8] }
%struct.CORD_pe = type { ptr, i64 }
%struct.CordRep = type { %struct.Generic, %union.ConcatOrFunc }
%struct.Generic = type { i8, i8, i8, i8, i64 }
%union.ConcatOrFunc = type { %struct.Concatenation }
%struct.Concatenation = type { ptr, ptr }
%struct.Function = type { ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @abort() #2

; 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 @CORD__next(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.CORD_Pos, ptr %14, i64 0
  %16 = getelementptr inbounds %struct.CORD_Pos, ptr %15, i32 0, i32 0
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = add i64 %17, 1
  store i64 %18, ptr %3, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.CORD_Pos, ptr %19, i64 0
  %21 = getelementptr inbounds %struct.CORD_Pos, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 8, !tbaa !14
  %23 = icmp ne i32 %22, 1431655765
  br i1 %23, label %27, label %24

24:                                               ; preds = %1
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str, ptr noundef @.str.6) #4
  call void @abort() #5
  unreachable

27:                                               ; preds = %1
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.CORD_Pos, ptr %28, i64 0
  %30 = getelementptr inbounds %struct.CORD_Pos, ptr %29, i32 0, i32 5
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.CORD_Pos, ptr %31, i64 0
  %33 = getelementptr inbounds %struct.CORD_Pos, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !14
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [49 x %struct.CORD_pe], ptr %30, i64 0, i64 %35
  store ptr %36, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.CORD_pe, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  store ptr %39, ptr %5, align 8, !tbaa !5
  %40 = load i64, ptr %3, align 8, !tbaa !13
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.CORD_Pos, ptr %41, i64 0
  %43 = getelementptr inbounds %struct.CORD_Pos, ptr %42, i32 0, i32 0
  store i64 %40, ptr %43, align 8, !tbaa !9
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = load i8, ptr %44, align 1, !tbaa !17
  %46 = sext i8 %45 to i32
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %122, label %48

48:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.CordRep, ptr %49, i32 0, i32 1
  store ptr %50, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.CORD_pe, ptr %51, i32 0, i32 1
  %53 = load i64, ptr %52, align 8, !tbaa !18
  store i64 %53, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %54 = load i64, ptr %7, align 8, !tbaa !13
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.CordRep, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.Generic, ptr %56, i32 0, i32 4
  %58 = load i64, ptr %57, align 8, !tbaa !19
  %59 = add i64 %54, %58
  store i64 %59, ptr %8, align 8, !tbaa !13
  %60 = load i64, ptr %3, align 8, !tbaa !13
  %61 = load i64, ptr %8, align 8, !tbaa !13
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %63, label %118

63:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 8, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.Function, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !22
  store ptr %66, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.Function, ptr %67, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !24
  store ptr %69, ptr %12, align 8, !tbaa !5
  %70 = load i64, ptr %8, align 8, !tbaa !13
  %71 = load i64, ptr %3, align 8, !tbaa !13
  %72 = sub i64 %70, %71
  %73 = icmp ult i64 %72, 8
  br i1 %73, label %74, label %78

74:                                               ; preds = %63
  %75 = load i64, ptr %8, align 8, !tbaa !13
  %76 = load i64, ptr %3, align 8, !tbaa !13
  %77 = sub i64 %75, %76
  store i64 %77, ptr %10, align 8, !tbaa !13
  br label %78

78:                                               ; preds = %74, %63
  store i64 0, ptr %9, align 8, !tbaa !13
  br label %79

79:                                               ; preds = %97, %78
  %80 = load i64, ptr %9, align 8, !tbaa !13
  %81 = load i64, ptr %10, align 8, !tbaa !13
  %82 = icmp ult i64 %80, %81
  br i1 %82, label %83, label %100

83:                                               ; preds = %79
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = load i64, ptr %9, align 8, !tbaa !13
  %86 = load i64, ptr %3, align 8, !tbaa !13
  %87 = add i64 %85, %86
  %88 = load i64, ptr %7, align 8, !tbaa !13
  %89 = sub i64 %87, %88
  %90 = load ptr, ptr %12, align 8, !tbaa !5
  %91 = call signext i8 %84(i64 noundef %89, ptr noundef %90)
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.CORD_Pos, ptr %92, i64 0
  %94 = getelementptr inbounds %struct.CORD_Pos, ptr %93, i32 0, i32 6
  %95 = load i64, ptr %9, align 8, !tbaa !13
  %96 = getelementptr inbounds [8 x i8], ptr %94, i64 0, i64 %95
  store i8 %91, ptr %96, align 1, !tbaa !17
  br label %97

97:                                               ; preds = %83
  %98 = load i64, ptr %9, align 8, !tbaa !13
  %99 = add i64 %98, 1
  store i64 %99, ptr %9, align 8, !tbaa !13
  br label %79, !llvm.loop !25

100:                                              ; preds = %79
  %101 = load i64, ptr %3, align 8, !tbaa !13
  %102 = load ptr, ptr %2, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.CORD_Pos, ptr %102, i64 0
  %104 = getelementptr inbounds %struct.CORD_Pos, ptr %103, i32 0, i32 3
  store i64 %101, ptr %104, align 8, !tbaa !27
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.CORD_Pos, ptr %105, i64 0
  %107 = getelementptr inbounds %struct.CORD_Pos, ptr %106, i32 0, i32 6
  %108 = getelementptr inbounds [8 x i8], ptr %107, i64 0, i64 0
  %109 = load ptr, ptr %2, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.CORD_Pos, ptr %109, i64 0
  %111 = getelementptr inbounds %struct.CORD_Pos, ptr %110, i32 0, i32 2
  store ptr %108, ptr %111, align 8, !tbaa !28
  %112 = load i64, ptr %3, align 8, !tbaa !13
  %113 = load i64, ptr %10, align 8, !tbaa !13
  %114 = add i64 %112, %113
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.CORD_Pos, ptr %115, i64 0
  %117 = getelementptr inbounds %struct.CORD_Pos, ptr %116, i32 0, i32 4
  store i64 %114, ptr %117, align 8, !tbaa !29
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %119

118:                                              ; preds = %48
  store i32 0, ptr %13, align 4
  br label %119

119:                                              ; preds = %118, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %120 = load i32, ptr %13, align 4
  switch i32 %120, label %166 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  br label %122

122:                                              ; preds = %121, %27
  br label %123

123:                                              ; preds = %141, %122
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.CORD_Pos, ptr %124, i64 0
  %126 = getelementptr inbounds %struct.CORD_Pos, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 8, !tbaa !14
  %128 = icmp sgt i32 %127, 0
  br i1 %128, label %129, label %139

129:                                              ; preds = %123
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.CORD_pe, ptr %130, i64 0
  %132 = getelementptr inbounds %struct.CORD_pe, ptr %131, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !18
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.CORD_pe, ptr %134, i64 -1
  %136 = getelementptr inbounds %struct.CORD_pe, ptr %135, i32 0, i32 1
  %137 = load i64, ptr %136, align 8, !tbaa !18
  %138 = icmp ne i64 %133, %137
  br label %139

139:                                              ; preds = %129, %123
  %140 = phi i1 [ false, %123 ], [ %138, %129 ]
  br i1 %140, label %141, label %149

141:                                              ; preds = %139
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.CORD_Pos, ptr %142, i64 0
  %144 = getelementptr inbounds %struct.CORD_Pos, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 8, !tbaa !14
  %146 = add nsw i32 %145, -1
  store i32 %146, ptr %144, align 8, !tbaa !14
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.CORD_pe, ptr %147, i32 -1
  store ptr %148, ptr %4, align 8, !tbaa !5
  br label %123, !llvm.loop !30

149:                                              ; preds = %139
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.CORD_Pos, ptr %150, i64 0
  %152 = getelementptr inbounds %struct.CORD_Pos, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 8, !tbaa !14
  %154 = icmp eq i32 %153, 0
  br i1 %154, label %155, label %159

155:                                              ; preds = %149
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.CORD_Pos, ptr %156, i64 0
  %158 = getelementptr inbounds %struct.CORD_Pos, ptr %157, i32 0, i32 1
  store i32 1431655765, ptr %158, align 8, !tbaa !14
  store i32 1, ptr %13, align 4
  br label %166

159:                                              ; preds = %149
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.CORD_Pos, ptr %160, i64 0
  %162 = getelementptr inbounds %struct.CORD_Pos, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 8, !tbaa !14
  %164 = add nsw i32 %163, -1
  store i32 %164, ptr %162, align 8, !tbaa !14
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  call void @CORD_extend_path(ptr noundef %165)
  store i32 0, ptr %13, align 4
  br label %166

166:                                              ; preds = %159, %155, %119
  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
  %167 = load i32, ptr %13, align 4
  switch i32 %167, label %169 [
    i32 0, label %168
    i32 1, label %168
  ]

168:                                              ; preds = %166, %166
  ret void

169:                                              ; preds = %166
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden void @CORD_extend_path(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn 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 = { 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 }
attributes #5 = { noreturn 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 = !{!"CORD_Pos", !11, i64 0, !12, i64 8, !6, i64 16, !11, i64 24, !11, i64 32, !7, i64 40, !7, i64 824}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !12, i64 8}
!15 = !{!16, !6, i64 0}
!16 = !{!"CORD_pe", !6, i64 0, !11, i64 8}
!17 = !{!7, !7, i64 0}
!18 = !{!16, !11, i64 8}
!19 = !{!20, !11, i64 8}
!20 = !{!"", !21, i64 0, !7, i64 16}
!21 = !{!"Generic", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 8}
!22 = !{!23, !6, i64 0}
!23 = !{!"Function", !6, i64 0, !6, i64 8}
!24 = !{!23, !6, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 24}
!28 = !{!10, !6, i64 16}
!29 = !{!10, !11, i64 32}
!30 = distinct !{!30, !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.CORD_pe = type { ptr, i64 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @CORD__next(ptr noundef %0) local_unnamed_addr #2 {
  %2 = load i64, ptr %0, align 8, !tbaa !5
  %3 = add i64 %2, 1
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !12
  %.not = icmp eq i32 %5, 1431655765
  br i1 %.not, label %6, label %9

6:                                                ; preds = %1
  %7 = load ptr, ptr @stderr, align 8, !tbaa !13
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str, ptr noundef nonnull @.str.6) #4
  tail call void @abort() #5
  unreachable

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = sext i32 %5 to i64
  %12 = getelementptr inbounds [49 x %struct.CORD_pe], ptr %10, i64 0, i64 %11
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  store i64 %3, ptr %0, align 8, !tbaa !5
  %14 = load i8, ptr %13, align 1, !tbaa !16
  %.not55 = icmp eq i8 %14, 0
  br i1 %.not55, label %15, label %.critedge59

15:                                               ; preds = %9
  %16 = getelementptr inbounds i8, ptr %12, i64 8
  %17 = load i64, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %13, i64 8
  %19 = load i64, ptr %18, align 8, !tbaa !18
  %20 = add i64 %19, %17
  %.not56 = icmp ult i64 %3, %20
  br i1 %.not56, label %.lr.ph63, label %.critedge59

.lr.ph63:                                         ; preds = %15
  %21 = getelementptr inbounds i8, ptr %13, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !21
  %23 = getelementptr inbounds i8, ptr %13, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !23
  %25 = sub i64 %20, %3
  %spec.select = tail call i64 @llvm.umin.i64(i64 %25, i64 8)
  %26 = sub i64 %3, %17
  %27 = getelementptr inbounds i8, ptr %0, i64 824
  %umax = tail call i64 @llvm.umax.i64(i64 %spec.select, i64 1)
  br label %28

28:                                               ; preds = %.lr.ph63, %28
  %.04762 = phi i64 [ 0, %.lr.ph63 ], [ %32, %28 ]
  %29 = add i64 %26, %.04762
  %30 = tail call signext i8 %22(i64 noundef %29, ptr noundef %24) #6
  %31 = getelementptr inbounds [8 x i8], ptr %27, i64 0, i64 %.04762
  store i8 %30, ptr %31, align 1, !tbaa !16
  %32 = add nuw nsw i64 %.04762, 1
  %exitcond.not = icmp eq i64 %32, %umax
  br i1 %exitcond.not, label %._crit_edge, label %28, !llvm.loop !24

._crit_edge:                                      ; preds = %28
  %33 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 %3, ptr %33, align 8, !tbaa !26
  %34 = getelementptr inbounds i8, ptr %0, i64 824
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %34, ptr %35, align 8, !tbaa !27
  %36 = add i64 %spec.select, %3
  %37 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %36, ptr %37, align 8, !tbaa !28
  br label %51

.critedge59:                                      ; preds = %15, %9
  %38 = icmp sgt i32 %5, 0
  br i1 %38, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %.critedge59, %44
  %.04661 = phi ptr [ %45, %44 ], [ %12, %.critedge59 ]
  %39 = phi i32 [ %46, %44 ], [ %5, %.critedge59 ]
  %40 = getelementptr inbounds i8, ptr %.04661, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %.04661, i64 -8
  %43 = load i64, ptr %42, align 8, !tbaa !17
  %.not57 = icmp eq i64 %41, %43
  br i1 %.not57, label %.critedge.thread, label %44

44:                                               ; preds = %.lr.ph
  %45 = getelementptr inbounds i8, ptr %.04661, i64 -16
  %46 = add nsw i32 %39, -1
  %47 = icmp sgt i32 %39, 1
  br i1 %47, label %.lr.ph, label %.critedge.thread68, !llvm.loop !29

.critedge:                                        ; preds = %.critedge59
  %48 = icmp eq i32 %5, 0
  br i1 %48, label %.critedge.thread68, label %.critedge.thread

.critedge.thread68:                               ; preds = %44, %.critedge
  store i32 1431655765, ptr %4, align 8, !tbaa !12
  br label %51

.critedge.thread:                                 ; preds = %.lr.ph, %.critedge
  %49 = phi i32 [ %5, %.critedge ], [ %39, %.lr.ph ]
  %50 = add nsw i32 %49, -1
  store i32 %50, ptr %4, align 8, !tbaa !12
  tail call void @CORD_extend_path(ptr noundef nonnull %0)
  br label %51

51:                                               ; preds = %._crit_edge, %.critedge.thread, %.critedge.thread68
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #3

attributes #0 = { nofree 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 #1 = { noreturn 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { cold nounwind }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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 = !{!"CORD_Pos", !7, i64 0, !10, i64 8, !11, i64 16, !7, i64 24, !7, i64 32, !8, i64 40, !8, i64 824}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"CORD_pe", !11, i64 0, !7, i64 8}
!16 = !{!8, !8, i64 0}
!17 = !{!15, !7, i64 8}
!18 = !{!19, !7, i64 8}
!19 = !{!"", !20, i64 0, !8, i64 16}
!20 = !{!"Generic", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !7, i64 8}
!21 = !{!22, !11, i64 0}
!22 = !{!"Function", !11, i64 0, !11, i64 8}
!23 = !{!22, !11, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!6, !7, i64 24}
!27 = !{!6, !11, i64 16}
!28 = !{!6, !7, i64 32}
!29 = distinct !{!29, !25}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass