; LLVM IR from VAR-solutions/Algorithms :: Greedy Algorithms/Job_Sequencing.ll (Z14job_SequencingP3JOBi)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.JOB = type { i8, i32, i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11comparision3JOBS_(i64, i32, i64, i32) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14job_SequencingP3JOBi(ptr noundef %0, i32 noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds %struct.JOB, ptr %14, i64 %16
  call void @_ZSt4sortIP3JOBPFbS0_S0_EEvT_S4_T0_(ptr noundef %13, ptr noundef %17, ptr noundef @_Z11comparision3JOBS_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %40, %2
  %19 = load i32, ptr %6, align 4, !tbaa !9
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %43

23:                                               ; preds = %18
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds %struct.JOB, ptr %24, i64 %26
  %28 = getelementptr inbounds %struct.JOB, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = icmp sgt i32 %29, %30
  br i1 %31, label %32, label %39

32:                                               ; preds = %23
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds %struct.JOB, ptr %33, i64 %35
  %37 = getelementptr inbounds %struct.JOB, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !11
  store i32 %38, ptr %5, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %32, %23
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !13

43:                                               ; preds = %22
  %44 = load i32, ptr %5, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  %46 = zext i32 %45 to i64
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %7, align 8
  %48 = alloca i8, i64 %46, align 16
  store i64 %46, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %58, %43
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = icmp sle i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %61

54:                                               ; preds = %49
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i8, ptr %48, i64 %56
  store i8 63, ptr %57, align 1, !tbaa !15
  br label %58

58:                                               ; preds = %54
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %9, align 4, !tbaa !9
  br label %49, !llvm.loop !16

61:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %127, %61
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %130

67:                                               ; preds = %62
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %struct.JOB, ptr %68, i64 %70
  %72 = getelementptr inbounds %struct.JOB, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !11
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %48, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !15
  %77 = sext i8 %76 to i32
  %78 = icmp eq i32 %77, 63
  br i1 %78, label %79, label %94

79:                                               ; preds = %67
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.JOB, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.JOB, ptr %83, i32 0, i32 0
  %85 = load i8, ptr %84, align 4, !tbaa !17
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds %struct.JOB, ptr %86, i64 %88
  %90 = getelementptr inbounds %struct.JOB, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %48, i64 %92
  store i8 %85, ptr %93, align 1, !tbaa !15
  br label %126

94:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %struct.JOB, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.JOB, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = sub nsw i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %109, %94
  %103 = load i32, ptr %11, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %48, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !15
  %107 = sext i8 %106 to i32
  %108 = icmp ne i32 %107, 63
  br i1 %108, label %109, label %112

109:                                              ; preds = %102
  %110 = load i32, ptr %11, align 4, !tbaa !9
  %111 = add nsw i32 %110, -1
  store i32 %111, ptr %11, align 4, !tbaa !9
  br label %102, !llvm.loop !18

112:                                              ; preds = %102
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = icmp sge i32 %113, 1
  br i1 %114, label %115, label %125

115:                                              ; preds = %112
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.JOB, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.JOB, ptr %119, i32 0, i32 0
  %121 = load i8, ptr %120, align 4, !tbaa !17
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i8, ptr %48, i64 %123
  store i8 %121, ptr %124, align 1, !tbaa !15
  br label %125

125:                                              ; preds = %115, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %126

126:                                              ; preds = %125, %79
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %10, align 4, !tbaa !9
  br label %62, !llvm.loop !19

130:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %151, %130
  %132 = load i32, ptr %12, align 4, !tbaa !9
  %133 = load i32, ptr %5, align 4, !tbaa !9
  %134 = icmp sle i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %154

136:                                              ; preds = %131
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %48, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !15
  %141 = sext i8 %140 to i32
  %142 = icmp ne i32 %141, 63
  br i1 %142, label %143, label %150

143:                                              ; preds = %136
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %48, i64 %145
  %147 = load i8, ptr %146, align 1, !tbaa !15
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %147)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %148, i8 noundef signext 32)
  br label %150

150:                                              ; preds = %143, %136
  br label %151

151:                                              ; preds = %150
  %152 = load i32, ptr %12, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %12, align 4, !tbaa !9
  br label %131, !llvm.loop !20

154:                                              ; preds = %135
  %155 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %155)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP3JOBPFbS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) #2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

attributes #0 = { mustprogress 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 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 = { inlinehint mustprogress 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 willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_ZTS3JOB", !7, i64 0, !10, i64 4, !10, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = !{!12, !7, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.JOB = type { i8, i32, i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z11comparision3JOBS_(i64, i32, i64, i32) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14job_SequencingP3JOBi(ptr noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = sext i32 %1 to i64
  %4 = getelementptr inbounds %struct.JOB, ptr %0, i64 %3
  tail call void @_ZSt4sortIP3JOBPFbS0_S0_EEvT_S4_T0_(ptr noundef %0, ptr noundef %4, ptr noundef nonnull @_Z11comparision3JOBS_)
  %5 = icmp sgt i32 %1, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge62

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 9
  br i1 %min.iters.check, label %.lr.ph.preheader88, label %vector.ph

.lr.ph.preheader88:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.04151.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %42, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %wide.trip.count, 7
  %6 = icmp eq i64 %n.mod.vf, 0
  %7 = select i1 %6, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count, %7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %39, %vector.body ]
  %vec.phi87 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %40, %vector.body ]
  %8 = or disjoint i64 %index, 1
  %9 = or disjoint i64 %index, 2
  %10 = or disjoint i64 %index, 3
  %11 = or disjoint i64 %index, 4
  %12 = or disjoint i64 %index, 5
  %13 = or disjoint i64 %index, 6
  %14 = or disjoint i64 %index, 7
  %15 = getelementptr inbounds %struct.JOB, ptr %0, i64 %index, i32 1
  %16 = getelementptr inbounds %struct.JOB, ptr %0, i64 %8, i32 1
  %17 = getelementptr inbounds %struct.JOB, ptr %0, i64 %9, i32 1
  %18 = getelementptr inbounds %struct.JOB, ptr %0, i64 %10, i32 1
  %19 = getelementptr inbounds %struct.JOB, ptr %0, i64 %11, i32 1
  %20 = getelementptr inbounds %struct.JOB, ptr %0, i64 %12, i32 1
  %21 = getelementptr inbounds %struct.JOB, ptr %0, i64 %13, i32 1
  %22 = getelementptr inbounds %struct.JOB, ptr %0, i64 %14, i32 1
  %23 = load i32, ptr %15, align 4, !tbaa !5
  %24 = load i32, ptr %16, align 4, !tbaa !5
  %25 = load i32, ptr %17, align 4, !tbaa !5
  %26 = load i32, ptr %18, align 4, !tbaa !5
  %27 = insertelement <4 x i32> poison, i32 %23, i64 0
  %28 = insertelement <4 x i32> %27, i32 %24, i64 1
  %29 = insertelement <4 x i32> %28, i32 %25, i64 2
  %30 = insertelement <4 x i32> %29, i32 %26, i64 3
  %31 = load i32, ptr %19, align 4, !tbaa !5
  %32 = load i32, ptr %20, align 4, !tbaa !5
  %33 = load i32, ptr %21, align 4, !tbaa !5
  %34 = load i32, ptr %22, align 4, !tbaa !5
  %35 = insertelement <4 x i32> poison, i32 %31, i64 0
  %36 = insertelement <4 x i32> %35, i32 %32, i64 1
  %37 = insertelement <4 x i32> %36, i32 %33, i64 2
  %38 = insertelement <4 x i32> %37, i32 %34, i64 3
  %39 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %30, <4 x i32> %vec.phi)
  %40 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %38, <4 x i32> %vec.phi87)
  %index.next = add nuw i64 %index, 8
  %41 = icmp eq i64 %index.next, %n.vec
  br i1 %41, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %39, <4 x i32> %40)
  %42 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  br label %.lr.ph.preheader88

._crit_edge:                                      ; preds = %.lr.ph
  %43 = add nuw i32 %spec.select, 1
  %44 = zext i32 %43 to i64
  %45 = alloca i8, i64 %44, align 16
  %.not52 = icmp slt i32 %spec.select, 1
  br i1 %.not52, label %.preheader49, label %.lr.ph55.preheader

.lr.ph55.preheader:                               ; preds = %._crit_edge
  %scevgep = getelementptr i8, ptr %45, i64 1
  %46 = zext nneg i32 %spec.select to i64
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 63, i64 %46, i1 false), !tbaa !14
  br label %.preheader49

.lr.ph:                                           ; preds = %.lr.ph.preheader88, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader88 ]
  %.04151 = phi i32 [ %spec.select, %.lr.ph ], [ %.04151.ph, %.lr.ph.preheader88 ]
  %47 = getelementptr inbounds %struct.JOB, ptr %0, i64 %indvars.iv, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %48, i32 %.04151)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

.preheader49:                                     ; preds = %.lr.ph55.preheader, %._crit_edge
  br i1 %5, label %.lr.ph58.preheader, label %.preheader

.lr.ph58.preheader:                               ; preds = %.preheader49
  %wide.trip.count73 = zext nneg i32 %1 to i64
  br label %.lr.ph58

.preheader:                                       ; preds = %62, %.preheader49
  br i1 %.not52, label %._crit_edge62, label %.lr.ph61

.lr.ph58:                                         ; preds = %.lr.ph58.preheader, %62
  %indvars.iv70 = phi i64 [ 0, %.lr.ph58.preheader ], [ %indvars.iv.next71, %62 ]
  %49 = getelementptr inbounds %struct.JOB, ptr %0, i64 %indvars.iv70
  %50 = getelementptr inbounds i8, ptr %49, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %45, i64 %52
  %54 = load i8, ptr %53, align 1, !tbaa !14
  %55 = icmp eq i8 %54, 63
  br i1 %55, label %.sink.split, label %.preheader48

.preheader48:                                     ; preds = %.lr.ph58, %.preheader48
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.preheader48 ], [ %52, %.lr.ph58 ]
  %indvars.iv.next68 = add nsw i64 %indvars.iv67, -1
  %56 = getelementptr inbounds i8, ptr %45, i64 %indvars.iv.next68
  %57 = load i8, ptr %56, align 1, !tbaa !14
  %.not47 = icmp eq i8 %57, 63
  br i1 %.not47, label %58, label %.preheader48, !llvm.loop !16

58:                                               ; preds = %.preheader48
  %59 = getelementptr inbounds i8, ptr %45, i64 %indvars.iv.next68
  %60 = icmp sgt i64 %indvars.iv67, 1
  br i1 %60, label %.sink.split, label %62

.sink.split:                                      ; preds = %58, %.lr.ph58
  %.sink86 = phi ptr [ %53, %.lr.ph58 ], [ %59, %58 ]
  %61 = load i8, ptr %49, align 4, !tbaa !17
  store i8 %61, ptr %.sink86, align 1, !tbaa !14
  br label %62

62:                                               ; preds = %.sink.split, %58
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %.preheader, label %.lr.ph58, !llvm.loop !18

._crit_edge62:                                    ; preds = %68, %2, %.preheader
  ret void

.lr.ph61:                                         ; preds = %.preheader, %68
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %68 ], [ 1, %.preheader ]
  %63 = getelementptr inbounds i8, ptr %45, i64 %indvars.iv75
  %64 = load i8, ptr %63, align 1, !tbaa !14
  %.not46 = icmp eq i8 %64, 63
  br i1 %.not46, label %68, label %65

65:                                               ; preds = %.lr.ph61
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %64)
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %66, i8 noundef signext 32)
  br label %68

68:                                               ; preds = %.lr.ph61, %65
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next76, %44
  br i1 %exitcond79.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !19
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP3JOBPFbS0_S0_EEvT_S4_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #3

attributes #0 = { mustprogress 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 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 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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, !9, i64 4}
!6 = !{!"_ZTS3JOB", !7, i64 0, !9, i64 4, !9, i64 8}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !11, !13, !12}
!16 = distinct !{!16, !11}
!17 = !{!6, !7, i64 0}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}


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