; LLVM IR from jrl-umi3218/mc_rtc :: 3rd-party/qhull/src/testqset_r (testqset_r)

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

@stderr = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local void @testSetappendSet(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call ptr @qh_setnew(ptr noundef %14, i32 noundef 1)
  store ptr %15, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = sub nsw i32 %18, 1
  call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %16, ptr noundef %17, i32 noundef 8148, ptr noundef @.str.34, i32 noundef %19)
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %137, %4
  %21 = load i32, ptr %12, align 4, !tbaa !9
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %24, label %140

24:                                               ; preds = %20
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = load i32, ptr %12, align 4, !tbaa !9
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = call i32 @log_i(ptr noundef %25, ptr noundef %26, ptr noundef @.str.30, i32 noundef %27, i32 noundef %28, i32 noundef %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %136

32:                                               ; preds = %24
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = call i32 @qh_setsize(ptr noundef %33, ptr noundef %34)
  store i32 %35, ptr %11, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %46, %32
  %37 = load i32, ptr %11, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %40, label %49

40:                                               ; preds = %36
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %42, i64 %44
  call void @qh_setappend(ptr noundef %41, ptr noundef %9, ptr noundef %45)
  br label %46

46:                                               ; preds = %40
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %11, align 4, !tbaa !9
  br label %36, !llvm.loop !11

49:                                               ; preds = %36
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %56

52:                                               ; preds = %49
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %12, align 4, !tbaa !9
  call void @checkSetContents(ptr noundef %53, ptr noundef @.str.19, ptr noundef %54, i32 noundef %55, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  br label %56

56:                                               ; preds = %52, %49
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %56
  br label %64

61:                                               ; preds = %56
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = sub nsw i32 %62, 1
  br label %64

64:                                               ; preds = %61, %60
  %65 = phi i32 [ 0, %60 ], [ %63, %61 ]
  %66 = call ptr @qh_setnew(ptr noundef %57, i32 noundef %65)
  store ptr %66, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %131, %64
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %71, label %74

71:                                               ; preds = %67
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = icmp sle i32 %72, 20
  br label %74

74:                                               ; preds = %71, %67
  %75 = phi i1 [ false, %67 ], [ %73, %71 ]
  br i1 %75, label %76, label %134

76:                                               ; preds = %74
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = call i32 @log_i(ptr noundef %77, ptr noundef %78, ptr noundef @.str.31, i32 noundef %79, i32 noundef %80, i32 noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %130

84:                                               ; preds = %76
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = call i32 @qh_setsize(ptr noundef %85, ptr noundef %86)
  store i32 %87, ptr %13, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %98, %84
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %92, label %101

92:                                               ; preds = %88
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %94, i64 %96
  call void @qh_setappend(ptr noundef %93, ptr noundef %10, ptr noundef %97)
  br label %98

98:                                               ; preds = %92
  %99 = load i32, ptr %13, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %13, align 4, !tbaa !9
  br label %88, !llvm.loop !13

101:                                              ; preds = %88
  %102 = load i32, ptr %8, align 4, !tbaa !9
  %103 = icmp eq i32 %102, 1
  br i1 %103, label %104, label %108

104:                                              ; preds = %101
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = load i32, ptr %11, align 4, !tbaa !9
  call void @checkSetContents(ptr noundef %105, ptr noundef @.str.35, ptr noundef %106, i32 noundef %107, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  br label %108

108:                                              ; preds = %104, %101
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  call void @qh_setappend_set(ptr noundef %109, ptr noundef %9, ptr noundef %110)
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = add nsw i32 %113, %114
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 0
  %118 = zext i1 %117 to i64
  %119 = select i1 %117, i32 -1, i32 0
  call void @checkSetContents(ptr noundef %111, ptr noundef @.str.36, ptr noundef %112, i32 noundef %115, i32 noundef 0, i32 noundef %119, i32 noundef -1)
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = load i32, ptr %12, align 4, !tbaa !9
  call void @qh_settruncate(ptr noundef %120, ptr noundef %121, i32 noundef %122)
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %125, label %129

125:                                              ; preds = %108
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = load i32, ptr %12, align 4, !tbaa !9
  call void @checkSetContents(ptr noundef %126, ptr noundef @.str.23, ptr noundef %127, i32 noundef %128, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  br label %129

129:                                              ; preds = %125, %108
  br label %130

130:                                              ; preds = %129, %76
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %11, align 4, !tbaa !9
  br label %67, !llvm.loop !14

134:                                              ; preds = %74
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setfree(ptr noundef %135, ptr noundef %10)
  br label %136

136:                                              ; preds = %134, %24
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %12, align 4, !tbaa !9
  br label %20, !llvm.loop !15

140:                                              ; preds = %20
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_setfree(ptr noundef %141, ptr noundef %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

declare ptr @qh_setnew(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @log_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @checkSetContents(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

declare i32 @qh_setsize(ptr noundef, ptr noundef) #2

declare void @qh_setappend_set(ptr noundef, ptr noundef, ptr noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @qh_fprintf(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
define dso_local void @testSetappendSet(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %7 = tail call ptr @qh_setnew(ptr noundef %0, i32 noundef 1) #4
  store ptr %7, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = add nsw i32 %1, -1
  tail call void (ptr, ptr, i32, ptr, ...) @qh_fprintf(ptr noundef %0, ptr noundef %8, i32 noundef 8148, ptr noundef nonnull @.str.34, i32 noundef %9)
  %10 = icmp sgt i32 %1, 0
  br i1 %10, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %4
  %11 = icmp eq i32 %3, 1
  br label %12

12:                                               ; preds = %.lr.ph64, %50
  %.05262 = phi i32 [ 0, %.lr.ph64 ], [ %51, %50 ]
  %umin = call i32 @llvm.umin.i32(i32 %.05262, i32 20)
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call i32 @log_i(ptr noundef %0, ptr noundef %13, ptr noundef nonnull @.str.30, i32 noundef %.05262, i32 noundef %1, i32 noundef %1)
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %50, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call i32 @qh_setsize(ptr noundef %0, ptr noundef %16) #4
  %18 = icmp slt i32 %17, %.05262
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %15
  %19 = sext i32 %17 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %19, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %20 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv
  call void @qh_setappend(ptr noundef %0, ptr noundef nonnull %5, ptr noundef %20) #4
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %.05262, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %15
  br i1 %11, label %21, label %23

21:                                               ; preds = %._crit_edge
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  call void @checkSetContents(ptr noundef %0, ptr noundef nonnull @.str.19, ptr noundef %22, i32 noundef %.05262, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  br label %23

23:                                               ; preds = %21, %._crit_edge
  %24 = icmp eq i32 %.05262, 0
  %25 = call i32 @llvm.usub.sat.i32(i32 %.05262, i32 1)
  %26 = call ptr @qh_setnew(ptr noundef %0, i32 noundef %25) #4
  store ptr %26, ptr %6, align 8, !tbaa !5
  %27 = sext i1 %24 to i32
  br label %28

28:                                               ; preds = %23, %47
  %.161 = phi i32 [ 0, %23 ], [ %48, %47 ]
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call i32 @log_i(ptr noundef %0, ptr noundef %29, ptr noundef nonnull @.str.31, i32 noundef %.161, i32 noundef %1, i32 noundef %1)
  %.not55 = icmp eq i32 %30, 0
  br i1 %.not55, label %47, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call i32 @qh_setsize(ptr noundef %0, ptr noundef %32) #4
  %34 = icmp slt i32 %33, %.161
  br i1 %34, label %.lr.ph59.preheader, label %._crit_edge60

.lr.ph59.preheader:                               ; preds = %31
  %35 = sext i32 %33 to i64
  br label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %indvars.iv67 = phi i64 [ %35, %.lr.ph59.preheader ], [ %indvars.iv.next68, %.lr.ph59 ]
  %36 = getelementptr inbounds i32, ptr %2, i64 %indvars.iv67
  call void @qh_setappend(ptr noundef %0, ptr noundef nonnull %6, ptr noundef %36) #4
  %indvars.iv.next68 = add nsw i64 %indvars.iv67, 1
  %lftr.wideiv70 = trunc i64 %indvars.iv.next68 to i32
  %exitcond71.not = icmp eq i32 %.161, %lftr.wideiv70
  br i1 %exitcond71.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !11

._crit_edge60:                                    ; preds = %.lr.ph59, %31
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  br i1 %11, label %38, label %.critedge

38:                                               ; preds = %._crit_edge60
  call void @checkSetContents(ptr noundef %0, ptr noundef nonnull @.str.35, ptr noundef %37, i32 noundef %.161, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  call void @qh_setappend_set(ptr noundef %0, ptr noundef nonnull %5, ptr noundef %39) #4
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = add nuw nsw i32 %.161, %.05262
  call void @checkSetContents(ptr noundef %0, ptr noundef nonnull @.str.36, ptr noundef %40, i32 noundef %41, i32 noundef 0, i32 noundef %27, i32 noundef -1)
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_settruncate(ptr noundef %0, ptr noundef %42, i32 noundef %.05262) #4
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  call void @checkSetContents(ptr noundef %0, ptr noundef nonnull @.str.23, ptr noundef %43, i32 noundef %.05262, i32 noundef 0, i32 noundef -1, i32 noundef -1)
  br label %47

.critedge:                                        ; preds = %._crit_edge60
  call void @qh_setappend_set(ptr noundef %0, ptr noundef nonnull %5, ptr noundef %37) #4
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = add nuw nsw i32 %.161, %.05262
  call void @checkSetContents(ptr noundef %0, ptr noundef nonnull @.str.36, ptr noundef %44, i32 noundef %45, i32 noundef 0, i32 noundef %27, i32 noundef -1)
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  call void @qh_settruncate(ptr noundef %0, ptr noundef %46, i32 noundef %.05262) #4
  br label %47

47:                                               ; preds = %.critedge, %28, %38
  %48 = add nuw nsw i32 %.161, 1
  %exitcond72.not = icmp eq i32 %.161, %umin
  br i1 %exitcond72.not, label %49, label %28, !llvm.loop !12

49:                                               ; preds = %47
  call void @qh_setfree(ptr noundef %0, ptr noundef nonnull %6) #4
  br label %50

50:                                               ; preds = %12, %49
  %51 = add nuw nsw i32 %.05262, 1
  %exitcond73.not = icmp eq i32 %51, %1
  br i1 %exitcond73.not, label %._crit_edge65, label %12, !llvm.loop !13

._crit_edge65:                                    ; preds = %50, %4
  call void @qh_setfree(ptr noundef %0, ptr noundef nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret void
}

declare ptr @qh_setnew(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @log_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @qh_setappend(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @checkSetContents(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @qh_settruncate(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @qh_setfree(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @qh_setsize(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @qh_setappend_set(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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