; LLVM IR from mbheinen/bpa-ipf-tsp :: ipf (getenvir)

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

; Function Attrs: nounwind uwtable
define dso_local void @getenvir(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %10, ptr %9, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %26, %4
  %12 = load ptr, ptr %9, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = load i32, ptr %7, align 4, !tbaa !9
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds i8, ptr %13, i64 %15
  %17 = icmp ult ptr %12, %16
  br i1 %17, label %18, label %29

18:                                               ; preds = %11
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = sext i8 %20 to i32
  %22 = icmp eq i32 %21, 32
  br i1 %22, label %23, label %25

23:                                               ; preds = %18
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 0, ptr %24, align 1, !tbaa !11
  br label %25

25:                                               ; preds = %23, %18
  br label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i32 1
  store ptr %28, ptr %9, align 8, !tbaa !5
  br label %11, !llvm.loop !12

29:                                               ; preds = %11
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = call ptr @getenv(ptr noundef %30) #4
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %44

34:                                               ; preds = %29
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call i64 @strlen(ptr noundef %35) #5
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = icmp ult i64 %36, %38
  br i1 %39, label %40, label %44

40:                                               ; preds = %34
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call ptr @strcpy(ptr noundef %41, ptr noundef %42) #4
  br label %56

44:                                               ; preds = %34, %29
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %53

47:                                               ; preds = %44
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call ptr @strncpy(ptr noundef %48, ptr noundef %49, i64 noundef %51) #4
  br label %55

53:                                               ; preds = %44
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %54, align 1, !tbaa !11
  br label %55

55:                                               ; preds = %53, %47
  br label %56

56:                                               ; preds = %55, %40
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %57, ptr %9, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %73, %56
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %60, i64 %62
  %64 = icmp ult ptr %59, %63
  br i1 %64, label %65, label %70

65:                                               ; preds = %58
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load i8, ptr %66, align 1, !tbaa !11
  %68 = sext i8 %67 to i32
  %69 = icmp sgt i32 %68, 0
  br label %70

70:                                               ; preds = %65, %58
  %71 = phi i1 [ false, %58 ], [ %69, %65 ]
  br i1 %71, label %72, label %76

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i32 1
  store ptr %75, ptr %9, align 8, !tbaa !5
  br label %58, !llvm.loop !14

76:                                               ; preds = %70
  br label %77

77:                                               ; preds = %86, %76
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i8, ptr %79, i64 %81
  %83 = icmp ult ptr %78, %82
  br i1 %83, label %84, label %89

84:                                               ; preds = %77
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 32, ptr %85, align 1, !tbaa !11
  br label %86

86:                                               ; preds = %84
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i32 1
  store ptr %88, ptr %9, align 8, !tbaa !5
  br label %77, !llvm.loop !15

89:                                               ; preds = %77
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %90, ptr %9, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %106, %89
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %93, i64 %95
  %97 = icmp ult ptr %92, %96
  br i1 %97, label %98, label %103

98:                                               ; preds = %91
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load i8, ptr %99, align 1, !tbaa !11
  %101 = sext i8 %100 to i32
  %102 = icmp sgt i32 %101, 0
  br label %103

103:                                              ; preds = %98, %91
  %104 = phi i1 [ false, %91 ], [ %102, %98 ]
  br i1 %104, label %105, label %109

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i32 1
  store ptr %108, ptr %9, align 8, !tbaa !5
  br label %91, !llvm.loop !16

109:                                              ; preds = %103
  br label %110

110:                                              ; preds = %119, %109
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %112, i64 %114
  %116 = icmp ult ptr %111, %115
  br i1 %116, label %117, label %122

117:                                              ; preds = %110
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 32, ptr %118, align 1, !tbaa !11
  br label %119

119:                                              ; preds = %117
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %120, i32 1
  store ptr %121, ptr %9, align 8, !tbaa !5
  br label %110, !llvm.loop !17

122:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind willreturn memory(read) "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 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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: nofree nounwind memory(readwrite, inaccessiblemem: read) uwtable
define dso_local void @getenvir(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = ptrtoint ptr %1 to i64
  %6 = ptrtoint ptr %0 to i64
  %7 = sext i32 %2 to i64
  %8 = getelementptr inbounds i8, ptr %0, i64 %7
  %9 = icmp sgt i32 %2, 0
  br i1 %9, label %iter.check, label %._crit_edge

iter.check:                                       ; preds = %4
  %10 = ptrtoint ptr %0 to i64
  %11 = add i64 %10, %7
  %12 = add i64 %10, 1
  %umax = tail call i64 @llvm.umax.i64(i64 %11, i64 %12)
  %13 = sub i64 %umax, %10
  %min.iters.check = icmp ult i64 %13, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check69 = icmp ult i64 %13, 32
  br i1 %min.iters.check69, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %13, -32
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue163, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue163 ]
  %next.gep = getelementptr i8, ptr %0, i64 %index
  %14 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load = load <16 x i8>, ptr %next.gep, align 1, !tbaa !5
  %wide.load101 = load <16 x i8>, ptr %14, align 1, !tbaa !5
  %15 = icmp eq <16 x i8> %wide.load, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %16 = icmp eq <16 x i8> %wide.load101, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %17 = extractelement <16 x i1> %15, i64 0
  br i1 %17, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  store i8 0, ptr %next.gep, align 1, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %18 = extractelement <16 x i1> %15, i64 1
  br i1 %18, label %pred.store.if102, label %pred.store.continue103

pred.store.if102:                                 ; preds = %pred.store.continue
  %19 = or disjoint i64 %index, 1
  %next.gep70 = getelementptr i8, ptr %0, i64 %19
  store i8 0, ptr %next.gep70, align 1, !tbaa !5
  br label %pred.store.continue103

pred.store.continue103:                           ; preds = %pred.store.if102, %pred.store.continue
  %20 = extractelement <16 x i1> %15, i64 2
  br i1 %20, label %pred.store.if104, label %pred.store.continue105

pred.store.if104:                                 ; preds = %pred.store.continue103
  %21 = or disjoint i64 %index, 2
  %next.gep71 = getelementptr i8, ptr %0, i64 %21
  store i8 0, ptr %next.gep71, align 1, !tbaa !5
  br label %pred.store.continue105

pred.store.continue105:                           ; preds = %pred.store.if104, %pred.store.continue103
  %22 = extractelement <16 x i1> %15, i64 3
  br i1 %22, label %pred.store.if106, label %pred.store.continue107

pred.store.if106:                                 ; preds = %pred.store.continue105
  %23 = or disjoint i64 %index, 3
  %next.gep72 = getelementptr i8, ptr %0, i64 %23
  store i8 0, ptr %next.gep72, align 1, !tbaa !5
  br label %pred.store.continue107

pred.store.continue107:                           ; preds = %pred.store.if106, %pred.store.continue105
  %24 = extractelement <16 x i1> %15, i64 4
  br i1 %24, label %pred.store.if108, label %pred.store.continue109

pred.store.if108:                                 ; preds = %pred.store.continue107
  %25 = or disjoint i64 %index, 4
  %next.gep73 = getelementptr i8, ptr %0, i64 %25
  store i8 0, ptr %next.gep73, align 1, !tbaa !5
  br label %pred.store.continue109

pred.store.continue109:                           ; preds = %pred.store.if108, %pred.store.continue107
  %26 = extractelement <16 x i1> %15, i64 5
  br i1 %26, label %pred.store.if110, label %pred.store.continue111

pred.store.if110:                                 ; preds = %pred.store.continue109
  %27 = or disjoint i64 %index, 5
  %next.gep74 = getelementptr i8, ptr %0, i64 %27
  store i8 0, ptr %next.gep74, align 1, !tbaa !5
  br label %pred.store.continue111

pred.store.continue111:                           ; preds = %pred.store.if110, %pred.store.continue109
  %28 = extractelement <16 x i1> %15, i64 6
  br i1 %28, label %pred.store.if112, label %pred.store.continue113

pred.store.if112:                                 ; preds = %pred.store.continue111
  %29 = or disjoint i64 %index, 6
  %next.gep75 = getelementptr i8, ptr %0, i64 %29
  store i8 0, ptr %next.gep75, align 1, !tbaa !5
  br label %pred.store.continue113

pred.store.continue113:                           ; preds = %pred.store.if112, %pred.store.continue111
  %30 = extractelement <16 x i1> %15, i64 7
  br i1 %30, label %pred.store.if114, label %pred.store.continue115

pred.store.if114:                                 ; preds = %pred.store.continue113
  %31 = or disjoint i64 %index, 7
  %next.gep76 = getelementptr i8, ptr %0, i64 %31
  store i8 0, ptr %next.gep76, align 1, !tbaa !5
  br label %pred.store.continue115

pred.store.continue115:                           ; preds = %pred.store.if114, %pred.store.continue113
  %32 = extractelement <16 x i1> %15, i64 8
  br i1 %32, label %pred.store.if116, label %pred.store.continue117

pred.store.if116:                                 ; preds = %pred.store.continue115
  %33 = or disjoint i64 %index, 8
  %next.gep77 = getelementptr i8, ptr %0, i64 %33
  store i8 0, ptr %next.gep77, align 1, !tbaa !5
  br label %pred.store.continue117

pred.store.continue117:                           ; preds = %pred.store.if116, %pred.store.continue115
  %34 = extractelement <16 x i1> %15, i64 9
  br i1 %34, label %pred.store.if118, label %pred.store.continue119

pred.store.if118:                                 ; preds = %pred.store.continue117
  %35 = or disjoint i64 %index, 9
  %next.gep78 = getelementptr i8, ptr %0, i64 %35
  store i8 0, ptr %next.gep78, align 1, !tbaa !5
  br label %pred.store.continue119

pred.store.continue119:                           ; preds = %pred.store.if118, %pred.store.continue117
  %36 = extractelement <16 x i1> %15, i64 10
  br i1 %36, label %pred.store.if120, label %pred.store.continue121

pred.store.if120:                                 ; preds = %pred.store.continue119
  %37 = or disjoint i64 %index, 10
  %next.gep79 = getelementptr i8, ptr %0, i64 %37
  store i8 0, ptr %next.gep79, align 1, !tbaa !5
  br label %pred.store.continue121

pred.store.continue121:                           ; preds = %pred.store.if120, %pred.store.continue119
  %38 = extractelement <16 x i1> %15, i64 11
  br i1 %38, label %pred.store.if122, label %pred.store.continue123

pred.store.if122:                                 ; preds = %pred.store.continue121
  %39 = or disjoint i64 %index, 11
  %next.gep80 = getelementptr i8, ptr %0, i64 %39
  store i8 0, ptr %next.gep80, align 1, !tbaa !5
  br label %pred.store.continue123

pred.store.continue123:                           ; preds = %pred.store.if122, %pred.store.continue121
  %40 = extractelement <16 x i1> %15, i64 12
  br i1 %40, label %pred.store.if124, label %pred.store.continue125

pred.store.if124:                                 ; preds = %pred.store.continue123
  %41 = or disjoint i64 %index, 12
  %next.gep81 = getelementptr i8, ptr %0, i64 %41
  store i8 0, ptr %next.gep81, align 1, !tbaa !5
  br label %pred.store.continue125

pred.store.continue125:                           ; preds = %pred.store.if124, %pred.store.continue123
  %42 = extractelement <16 x i1> %15, i64 13
  br i1 %42, label %pred.store.if126, label %pred.store.continue127

pred.store.if126:                                 ; preds = %pred.store.continue125
  %43 = or disjoint i64 %index, 13
  %next.gep82 = getelementptr i8, ptr %0, i64 %43
  store i8 0, ptr %next.gep82, align 1, !tbaa !5
  br label %pred.store.continue127

pred.store.continue127:                           ; preds = %pred.store.if126, %pred.store.continue125
  %44 = extractelement <16 x i1> %15, i64 14
  br i1 %44, label %pred.store.if128, label %pred.store.continue129

pred.store.if128:                                 ; preds = %pred.store.continue127
  %45 = or disjoint i64 %index, 14
  %next.gep83 = getelementptr i8, ptr %0, i64 %45
  store i8 0, ptr %next.gep83, align 1, !tbaa !5
  br label %pred.store.continue129

pred.store.continue129:                           ; preds = %pred.store.if128, %pred.store.continue127
  %46 = extractelement <16 x i1> %15, i64 15
  br i1 %46, label %pred.store.if130, label %pred.store.continue131

pred.store.if130:                                 ; preds = %pred.store.continue129
  %47 = or disjoint i64 %index, 15
  %next.gep84 = getelementptr i8, ptr %0, i64 %47
  store i8 0, ptr %next.gep84, align 1, !tbaa !5
  br label %pred.store.continue131

pred.store.continue131:                           ; preds = %pred.store.if130, %pred.store.continue129
  %48 = extractelement <16 x i1> %16, i64 0
  br i1 %48, label %pred.store.if132, label %pred.store.continue133

pred.store.if132:                                 ; preds = %pred.store.continue131
  %49 = or disjoint i64 %index, 16
  %next.gep85 = getelementptr i8, ptr %0, i64 %49
  store i8 0, ptr %next.gep85, align 1, !tbaa !5
  br label %pred.store.continue133

pred.store.continue133:                           ; preds = %pred.store.if132, %pred.store.continue131
  %50 = extractelement <16 x i1> %16, i64 1
  br i1 %50, label %pred.store.if134, label %pred.store.continue135

pred.store.if134:                                 ; preds = %pred.store.continue133
  %51 = or disjoint i64 %index, 17
  %next.gep86 = getelementptr i8, ptr %0, i64 %51
  store i8 0, ptr %next.gep86, align 1, !tbaa !5
  br label %pred.store.continue135

pred.store.continue135:                           ; preds = %pred.store.if134, %pred.store.continue133
  %52 = extractelement <16 x i1> %16, i64 2
  br i1 %52, label %pred.store.if136, label %pred.store.continue137

pred.store.if136:                                 ; preds = %pred.store.continue135
  %53 = or disjoint i64 %index, 18
  %next.gep87 = getelementptr i8, ptr %0, i64 %53
  store i8 0, ptr %next.gep87, align 1, !tbaa !5
  br label %pred.store.continue137

pred.store.continue137:                           ; preds = %pred.store.if136, %pred.store.continue135
  %54 = extractelement <16 x i1> %16, i64 3
  br i1 %54, label %pred.store.if138, label %pred.store.continue139

pred.store.if138:                                 ; preds = %pred.store.continue137
  %55 = or disjoint i64 %index, 19
  %next.gep88 = getelementptr i8, ptr %0, i64 %55
  store i8 0, ptr %next.gep88, align 1, !tbaa !5
  br label %pred.store.continue139

pred.store.continue139:                           ; preds = %pred.store.if138, %pred.store.continue137
  %56 = extractelement <16 x i1> %16, i64 4
  br i1 %56, label %pred.store.if140, label %pred.store.continue141

pred.store.if140:                                 ; preds = %pred.store.continue139
  %57 = or disjoint i64 %index, 20
  %next.gep89 = getelementptr i8, ptr %0, i64 %57
  store i8 0, ptr %next.gep89, align 1, !tbaa !5
  br label %pred.store.continue141

pred.store.continue141:                           ; preds = %pred.store.if140, %pred.store.continue139
  %58 = extractelement <16 x i1> %16, i64 5
  br i1 %58, label %pred.store.if142, label %pred.store.continue143

pred.store.if142:                                 ; preds = %pred.store.continue141
  %59 = or disjoint i64 %index, 21
  %next.gep90 = getelementptr i8, ptr %0, i64 %59
  store i8 0, ptr %next.gep90, align 1, !tbaa !5
  br label %pred.store.continue143

pred.store.continue143:                           ; preds = %pred.store.if142, %pred.store.continue141
  %60 = extractelement <16 x i1> %16, i64 6
  br i1 %60, label %pred.store.if144, label %pred.store.continue145

pred.store.if144:                                 ; preds = %pred.store.continue143
  %61 = or disjoint i64 %index, 22
  %next.gep91 = getelementptr i8, ptr %0, i64 %61
  store i8 0, ptr %next.gep91, align 1, !tbaa !5
  br label %pred.store.continue145

pred.store.continue145:                           ; preds = %pred.store.if144, %pred.store.continue143
  %62 = extractelement <16 x i1> %16, i64 7
  br i1 %62, label %pred.store.if146, label %pred.store.continue147

pred.store.if146:                                 ; preds = %pred.store.continue145
  %63 = or disjoint i64 %index, 23
  %next.gep92 = getelementptr i8, ptr %0, i64 %63
  store i8 0, ptr %next.gep92, align 1, !tbaa !5
  br label %pred.store.continue147

pred.store.continue147:                           ; preds = %pred.store.if146, %pred.store.continue145
  %64 = extractelement <16 x i1> %16, i64 8
  br i1 %64, label %pred.store.if148, label %pred.store.continue149

pred.store.if148:                                 ; preds = %pred.store.continue147
  %65 = or disjoint i64 %index, 24
  %next.gep93 = getelementptr i8, ptr %0, i64 %65
  store i8 0, ptr %next.gep93, align 1, !tbaa !5
  br label %pred.store.continue149

pred.store.continue149:                           ; preds = %pred.store.if148, %pred.store.continue147
  %66 = extractelement <16 x i1> %16, i64 9
  br i1 %66, label %pred.store.if150, label %pred.store.continue151

pred.store.if150:                                 ; preds = %pred.store.continue149
  %67 = or disjoint i64 %index, 25
  %next.gep94 = getelementptr i8, ptr %0, i64 %67
  store i8 0, ptr %next.gep94, align 1, !tbaa !5
  br label %pred.store.continue151

pred.store.continue151:                           ; preds = %pred.store.if150, %pred.store.continue149
  %68 = extractelement <16 x i1> %16, i64 10
  br i1 %68, label %pred.store.if152, label %pred.store.continue153

pred.store.if152:                                 ; preds = %pred.store.continue151
  %69 = or disjoint i64 %index, 26
  %next.gep95 = getelementptr i8, ptr %0, i64 %69
  store i8 0, ptr %next.gep95, align 1, !tbaa !5
  br label %pred.store.continue153

pred.store.continue153:                           ; preds = %pred.store.if152, %pred.store.continue151
  %70 = extractelement <16 x i1> %16, i64 11
  br i1 %70, label %pred.store.if154, label %pred.store.continue155

pred.store.if154:                                 ; preds = %pred.store.continue153
  %71 = or disjoint i64 %index, 27
  %next.gep96 = getelementptr i8, ptr %0, i64 %71
  store i8 0, ptr %next.gep96, align 1, !tbaa !5
  br label %pred.store.continue155

pred.store.continue155:                           ; preds = %pred.store.if154, %pred.store.continue153
  %72 = extractelement <16 x i1> %16, i64 12
  br i1 %72, label %pred.store.if156, label %pred.store.continue157

pred.store.if156:                                 ; preds = %pred.store.continue155
  %73 = or disjoint i64 %index, 28
  %next.gep97 = getelementptr i8, ptr %0, i64 %73
  store i8 0, ptr %next.gep97, align 1, !tbaa !5
  br label %pred.store.continue157

pred.store.continue157:                           ; preds = %pred.store.if156, %pred.store.continue155
  %74 = extractelement <16 x i1> %16, i64 13
  br i1 %74, label %pred.store.if158, label %pred.store.continue159

pred.store.if158:                                 ; preds = %pred.store.continue157
  %75 = or disjoint i64 %index, 29
  %next.gep98 = getelementptr i8, ptr %0, i64 %75
  store i8 0, ptr %next.gep98, align 1, !tbaa !5
  br label %pred.store.continue159

pred.store.continue159:                           ; preds = %pred.store.if158, %pred.store.continue157
  %76 = extractelement <16 x i1> %16, i64 14
  br i1 %76, label %pred.store.if160, label %pred.store.continue161

pred.store.if160:                                 ; preds = %pred.store.continue159
  %77 = or disjoint i64 %index, 30
  %next.gep99 = getelementptr i8, ptr %0, i64 %77
  store i8 0, ptr %next.gep99, align 1, !tbaa !5
  br label %pred.store.continue161

pred.store.continue161:                           ; preds = %pred.store.if160, %pred.store.continue159
  %78 = extractelement <16 x i1> %16, i64 15
  br i1 %78, label %pred.store.if162, label %pred.store.continue163

pred.store.if162:                                 ; preds = %pred.store.continue161
  %79 = or disjoint i64 %index, 31
  %next.gep100 = getelementptr i8, ptr %0, i64 %79
  store i8 0, ptr %next.gep100, align 1, !tbaa !5
  br label %pred.store.continue163

pred.store.continue163:                           ; preds = %pred.store.if162, %pred.store.continue161
  %index.next = add nuw i64 %index, 32
  %80 = icmp eq i64 %index.next, %n.vec
  br i1 %80, label %middle.block, label %vector.body, !llvm.loop !8

middle.block:                                     ; preds = %pred.store.continue163
  %cmp.n = icmp eq i64 %13, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end166 = getelementptr i8, ptr %0, i64 %n.vec
  %n.vec.remaining = and i64 %13, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec165 = and i64 %13, -8
  %ind.end = getelementptr i8, ptr %0, i64 %n.vec165
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %pred.store.continue192, %vec.epilog.ph
  %index167 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next193, %pred.store.continue192 ]
  %next.gep168 = getelementptr i8, ptr %0, i64 %index167
  %wide.load176 = load <8 x i8>, ptr %next.gep168, align 1, !tbaa !5
  %81 = icmp eq <8 x i8> %wide.load176, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %82 = extractelement <8 x i1> %81, i64 0
  br i1 %82, label %pred.store.if177, label %pred.store.continue178

pred.store.if177:                                 ; preds = %vec.epilog.vector.body
  store i8 0, ptr %next.gep168, align 1, !tbaa !5
  br label %pred.store.continue178

pred.store.continue178:                           ; preds = %pred.store.if177, %vec.epilog.vector.body
  %83 = extractelement <8 x i1> %81, i64 1
  br i1 %83, label %pred.store.if179, label %pred.store.continue180

pred.store.if179:                                 ; preds = %pred.store.continue178
  %84 = or disjoint i64 %index167, 1
  %next.gep169 = getelementptr i8, ptr %0, i64 %84
  store i8 0, ptr %next.gep169, align 1, !tbaa !5
  br label %pred.store.continue180

pred.store.continue180:                           ; preds = %pred.store.if179, %pred.store.continue178
  %85 = extractelement <8 x i1> %81, i64 2
  br i1 %85, label %pred.store.if181, label %pred.store.continue182

pred.store.if181:                                 ; preds = %pred.store.continue180
  %86 = or disjoint i64 %index167, 2
  %next.gep170 = getelementptr i8, ptr %0, i64 %86
  store i8 0, ptr %next.gep170, align 1, !tbaa !5
  br label %pred.store.continue182

pred.store.continue182:                           ; preds = %pred.store.if181, %pred.store.continue180
  %87 = extractelement <8 x i1> %81, i64 3
  br i1 %87, label %pred.store.if183, label %pred.store.continue184

pred.store.if183:                                 ; preds = %pred.store.continue182
  %88 = or disjoint i64 %index167, 3
  %next.gep171 = getelementptr i8, ptr %0, i64 %88
  store i8 0, ptr %next.gep171, align 1, !tbaa !5
  br label %pred.store.continue184

pred.store.continue184:                           ; preds = %pred.store.if183, %pred.store.continue182
  %89 = extractelement <8 x i1> %81, i64 4
  br i1 %89, label %pred.store.if185, label %pred.store.continue186

pred.store.if185:                                 ; preds = %pred.store.continue184
  %90 = or disjoint i64 %index167, 4
  %next.gep172 = getelementptr i8, ptr %0, i64 %90
  store i8 0, ptr %next.gep172, align 1, !tbaa !5
  br label %pred.store.continue186

pred.store.continue186:                           ; preds = %pred.store.if185, %pred.store.continue184
  %91 = extractelement <8 x i1> %81, i64 5
  br i1 %91, label %pred.store.if187, label %pred.store.continue188

pred.store.if187:                                 ; preds = %pred.store.continue186
  %92 = or disjoint i64 %index167, 5
  %next.gep173 = getelementptr i8, ptr %0, i64 %92
  store i8 0, ptr %next.gep173, align 1, !tbaa !5
  br label %pred.store.continue188

pred.store.continue188:                           ; preds = %pred.store.if187, %pred.store.continue186
  %93 = extractelement <8 x i1> %81, i64 6
  br i1 %93, label %pred.store.if189, label %pred.store.continue190

pred.store.if189:                                 ; preds = %pred.store.continue188
  %94 = or disjoint i64 %index167, 6
  %next.gep174 = getelementptr i8, ptr %0, i64 %94
  store i8 0, ptr %next.gep174, align 1, !tbaa !5
  br label %pred.store.continue190

pred.store.continue190:                           ; preds = %pred.store.if189, %pred.store.continue188
  %95 = extractelement <8 x i1> %81, i64 7
  br i1 %95, label %pred.store.if191, label %pred.store.continue192

pred.store.if191:                                 ; preds = %pred.store.continue190
  %96 = or disjoint i64 %index167, 7
  %next.gep175 = getelementptr i8, ptr %0, i64 %96
  store i8 0, ptr %next.gep175, align 1, !tbaa !5
  br label %pred.store.continue192

pred.store.continue192:                           ; preds = %pred.store.if191, %pred.store.continue190
  %index.next193 = add nuw i64 %index167, 8
  %97 = icmp eq i64 %index.next193, %n.vec165
  br i1 %97, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !12

vec.epilog.middle.block:                          ; preds = %pred.store.continue192
  %cmp.n194 = icmp eq i64 %13, %n.vec165
  br i1 %cmp.n194, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %.047.ph = phi ptr [ %0, %iter.check ], [ %ind.end166, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %101
  %.047 = phi ptr [ %102, %101 ], [ %.047.ph, %.lr.ph.preheader ]
  %98 = load i8, ptr %.047, align 1, !tbaa !5
  %99 = icmp eq i8 %98, 32
  br i1 %99, label %100, label %101

100:                                              ; preds = %.lr.ph
  store i8 0, ptr %.047, align 1, !tbaa !5
  br label %101

101:                                              ; preds = %.lr.ph, %100
  %102 = getelementptr inbounds i8, ptr %.047, i64 1
  %103 = icmp ult ptr %102, %8
  br i1 %103, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %101, %middle.block, %vec.epilog.middle.block, %4
  %104 = tail call ptr @getenv(ptr noundef %0) #6
  %.not = icmp eq ptr %104, null
  br i1 %.not, label %.critedge45, label %105

105:                                              ; preds = %._crit_edge
  %106 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %104) #7
  %107 = sext i32 %3 to i64
  %108 = icmp ult i64 %106, %107
  br i1 %108, label %109, label %111

109:                                              ; preds = %105
  %110 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) %104) #6
  br label %113

111:                                              ; preds = %105
  %112 = tail call ptr @strncpy(ptr noundef %1, ptr noundef nonnull %104, i64 noundef %107) #6
  br label %113

.critedge45:                                      ; preds = %._crit_edge
  store i8 0, ptr %1, align 1, !tbaa !5
  br label %113

113:                                              ; preds = %111, %.critedge45, %109
  br i1 %9, label %.lr.ph50, label %.critedge

.lr.ph50:                                         ; preds = %113, %116
  %.148 = phi ptr [ %117, %116 ], [ %0, %113 ]
  %114 = load i8, ptr %.148, align 1, !tbaa !5
  %115 = icmp sgt i8 %114, 0
  br i1 %115, label %116, label %.critedge.loopexit

116:                                              ; preds = %.lr.ph50
  %117 = getelementptr inbounds i8, ptr %.148, i64 1
  %118 = icmp ult ptr %117, %8
  br i1 %118, label %.lr.ph50, label %.critedge.loopexit, !llvm.loop !14

.critedge.loopexit:                               ; preds = %116, %.lr.ph50
  %.1.lcssa.ph = phi ptr [ %.148, %.lr.ph50 ], [ %117, %116 ]
  %.pre = ptrtoint ptr %.1.lcssa.ph to i64
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %113
  %.1.lcssa66.pre-phi = phi i64 [ %.pre, %.critedge.loopexit ], [ %6, %113 ]
  %.1.lcssa = phi ptr [ %.1.lcssa.ph, %.critedge.loopexit ], [ %0, %113 ]
  %119 = icmp ult ptr %.1.lcssa, %8
  br i1 %119, label %.lr.ph55.preheader, label %.preheader

.lr.ph55.preheader:                               ; preds = %.critedge
  %120 = add i64 %6, %7
  %121 = sub i64 %120, %.1.lcssa66.pre-phi
  tail call void @llvm.memset.p0.i64(ptr align 1 %.1.lcssa, i8 32, i64 %121, i1 false), !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph55.preheader, %.critedge
  %122 = sext i32 %3 to i64
  %123 = getelementptr inbounds i8, ptr %1, i64 %122
  %124 = icmp sgt i32 %3, 0
  br i1 %124, label %.lr.ph57, label %.critedge2

.lr.ph57:                                         ; preds = %.preheader, %127
  %.356 = phi ptr [ %128, %127 ], [ %1, %.preheader ]
  %125 = load i8, ptr %.356, align 1, !tbaa !5
  %126 = icmp sgt i8 %125, 0
  br i1 %126, label %127, label %.critedge2.loopexit

127:                                              ; preds = %.lr.ph57
  %128 = getelementptr inbounds i8, ptr %.356, i64 1
  %129 = icmp ult ptr %128, %123
  br i1 %129, label %.lr.ph57, label %.critedge2.loopexit, !llvm.loop !15

.critedge2.loopexit:                              ; preds = %127, %.lr.ph57
  %.3.lcssa.ph = phi ptr [ %.356, %.lr.ph57 ], [ %128, %127 ]
  %.pre68 = ptrtoint ptr %.3.lcssa.ph to i64
  br label %.critedge2

.critedge2:                                       ; preds = %.critedge2.loopexit, %.preheader
  %.3.lcssa67.pre-phi = phi i64 [ %.pre68, %.critedge2.loopexit ], [ %5, %.preheader ]
  %.3.lcssa = phi ptr [ %.3.lcssa.ph, %.critedge2.loopexit ], [ %1, %.preheader ]
  %130 = icmp ult ptr %.3.lcssa, %123
  br i1 %130, label %.lr.ph64.preheader, label %._crit_edge65

.lr.ph64.preheader:                               ; preds = %.critedge2
  %131 = add i64 %5, %122
  %132 = sub i64 %131, %.3.lcssa67.pre-phi
  tail call void @llvm.memset.p0.i64(ptr align 1 %.3.lcssa, i8 32, i64 %132, i1 false), !tbaa !5
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %.lr.ph64.preheader, %.critedge2
  ret void
}

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #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 i64 @llvm.umax.i64(i64, i64) #5

attributes #0 = { nofree nounwind memory(readwrite, inaccessiblemem: read) 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 = { nofree nounwind memory(read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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


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