; LLVM IR from GGiecold-zz/Cluster_Ensembles :: src/Cluster_Ensembles/Hypergraph_Partitioning/metis-5.1.0/programs (cmdline)

; 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.gk_option = type { ptr, i32, ptr, i32 }
%struct.gk_StringMap_t = type { ptr, i32 }
%struct.params_t = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, float, float, float, i64 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@long_options = external hidden global [5 x %struct.gk_option], align 16
@gk_optarg = external global ptr, align 8
@gtype_options = external hidden global [3 x %struct.gk_StringMap_t], align 16
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 x i8], align 1
@helpstr = external hidden global [24 x [100 x i8]], align 16
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@gk_optind = external global i32, align 4
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@shorthelpstr = external hidden global [4 x [100 x i8]], align 16

; Function Attrs: nounwind uwtable
define dso_local ptr @parse_cmdline(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %11 = call ptr @gk_malloc(i64 noundef 176, ptr noundef @.str)
  store ptr %11, ptr %10, align 8, !tbaa !9
  %12 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 1 %12, i8 0, i64 176, i1 false)
  %13 = load ptr, ptr %10, align 8, !tbaa !9
  %14 = getelementptr inbounds %struct.params_t, ptr %13, i32 0, i32 12
  store i32 0, ptr %14, align 8, !tbaa !11
  %15 = load ptr, ptr %10, align 8, !tbaa !9
  %16 = getelementptr inbounds %struct.params_t, ptr %15, i32 0, i32 13
  store i32 1, ptr %16, align 4, !tbaa !15
  %17 = load ptr, ptr %10, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct.params_t, ptr %17, i32 0, i32 15
  store i32 0, ptr %18, align 4, !tbaa !16
  %19 = load ptr, ptr %10, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct.params_t, ptr %19, i32 0, i32 22
  store ptr null, ptr %20, align 8, !tbaa !17
  %21 = load ptr, ptr %10, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.params_t, ptr %21, i32 0, i32 23
  store ptr null, ptr %22, align 8, !tbaa !18
  %23 = load ptr, ptr %10, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.params_t, ptr %23, i32 0, i32 31
  store float 0.000000e+00, ptr %24, align 8, !tbaa !19
  %25 = load ptr, ptr %10, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct.params_t, ptr %25, i32 0, i32 32
  store float 0.000000e+00, ptr %26, align 4, !tbaa !20
  %27 = load ptr, ptr %10, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.params_t, ptr %27, i32 0, i32 33
  store float 0.000000e+00, ptr %28, align 8, !tbaa !21
  br label %29

29:                                               ; preds = %101, %2
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  %32 = call i32 @gk_getopt_long_only(i32 noundef %30, ptr noundef %31, ptr noundef @.str.1, ptr noundef @long_options, ptr noundef %9)
  store i32 %32, ptr %8, align 4, !tbaa !5
  %33 = icmp ne i32 %32, -1
  br i1 %33, label %34, label %102

34:                                               ; preds = %29
  %35 = load i32, ptr %8, align 4, !tbaa !5
  switch i32 %35, label %97 [
    i32 23, label %36
    i32 20, label %54
    i32 5, label %69
    i32 18, label %78
    i32 63, label %96
  ]

36:                                               ; preds = %34
  %37 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %53

39:                                               ; preds = %36
  %40 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %41 = call i32 @gk_GetStringID(ptr noundef @gtype_options, ptr noundef %40)
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.params_t, ptr %42, i32 0, i32 12
  store i32 %41, ptr %43, align 8, !tbaa !11
  %44 = icmp eq i32 %41, -1
  br i1 %44, label %45, label %52

45:                                               ; preds = %39
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [5 x %struct.gk_option], ptr @long_options, i64 0, i64 %47
  %49 = getelementptr inbounds %struct.gk_option, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 16, !tbaa !22
  %51 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  call void (ptr, ...) @errexit(ptr noundef @.str.2, ptr noundef %50, ptr noundef %51)
  br label %52

52:                                               ; preds = %45, %39
  br label %53

53:                                               ; preds = %52, %36
  br label %101

54:                                               ; preds = %34
  %55 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %62

57:                                               ; preds = %54
  %58 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %59 = call i32 @atoi(ptr noundef %58) #8
  %60 = load ptr, ptr %10, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.params_t, ptr %60, i32 0, i32 13
  store i32 %59, ptr %61, align 4, !tbaa !15
  br label %62

62:                                               ; preds = %57, %54
  %63 = load ptr, ptr %10, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.params_t, ptr %63, i32 0, i32 13
  %65 = load i32, ptr %64, align 4, !tbaa !15
  %66 = icmp slt i32 %65, 1
  br i1 %66, label %67, label %68

67:                                               ; preds = %62
  call void (ptr, ...) @errexit(ptr noundef @.str.3)
  br label %68

68:                                               ; preds = %67, %62
  br label %101

69:                                               ; preds = %34
  %70 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %77

72:                                               ; preds = %69
  %73 = load ptr, ptr @gk_optarg, align 8, !tbaa !9
  %74 = call i32 @atoi(ptr noundef %73) #8
  %75 = load ptr, ptr %10, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.params_t, ptr %75, i32 0, i32 15
  store i32 %74, ptr %76, align 4, !tbaa !16
  br label %77

77:                                               ; preds = %72, %69
  br label %101

78:                                               ; preds = %34
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %92, %78
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [24 x [100 x i8]], ptr @helpstr, i64 0, i64 %81
  %83 = getelementptr inbounds [100 x i8], ptr %82, i64 0, i64 0
  %84 = call i64 @strlen(ptr noundef %83) #8
  %85 = icmp ugt i64 %84, 0
  br i1 %85, label %86, label %95

86:                                               ; preds = %79
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [24 x [100 x i8]], ptr @helpstr, i64 0, i64 %88
  %90 = getelementptr inbounds [100 x i8], ptr %89, i64 0, i64 0
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %90)
  br label %92

92:                                               ; preds = %86
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %79, !llvm.loop !24

95:                                               ; preds = %79
  call void @exit(i32 noundef 0) #9
  unreachable

96:                                               ; preds = %34
  br label %97

97:                                               ; preds = %96, %34
  %98 = load ptr, ptr %4, align 8, !tbaa !9
  %99 = getelementptr inbounds ptr, ptr %98, i64 0
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  call void (ptr, ...) @errexit(ptr noundef @.str.5, ptr noundef %100)
  br label %101

101:                                              ; preds = %97, %77, %68, %53
  br label %29, !llvm.loop !26

102:                                              ; preds = %29
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = load i32, ptr @gk_optind, align 4, !tbaa !5
  %105 = sub nsw i32 %103, %104
  %106 = icmp ne i32 %105, 2
  br i1 %106, label %107, label %126

107:                                              ; preds = %102
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %122, %107
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [4 x [100 x i8]], ptr @shorthelpstr, i64 0, i64 %111
  %113 = getelementptr inbounds [100 x i8], ptr %112, i64 0, i64 0
  %114 = call i64 @strlen(ptr noundef %113) #8
  %115 = icmp ugt i64 %114, 0
  br i1 %115, label %116, label %125

116:                                              ; preds = %109
  %117 = load i32, ptr %5, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [4 x [100 x i8]], ptr @shorthelpstr, i64 0, i64 %118
  %120 = getelementptr inbounds [100 x i8], ptr %119, i64 0, i64 0
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %120)
  br label %122

122:                                              ; preds = %116
  %123 = load i32, ptr %5, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %5, align 4, !tbaa !5
  br label %109, !llvm.loop !27

125:                                              ; preds = %109
  call void @exit(i32 noundef 0) #9
  unreachable

126:                                              ; preds = %102
  %127 = load ptr, ptr %4, align 8, !tbaa !9
  %128 = load i32, ptr @gk_optind, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr @gk_optind, align 4, !tbaa !5
  %130 = sext i32 %128 to i64
  %131 = getelementptr inbounds ptr, ptr %127, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !9
  %133 = call ptr @gk_strdup(ptr noundef %132)
  %134 = load ptr, ptr %10, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.params_t, ptr %134, i32 0, i32 22
  store ptr %133, ptr %135, align 8, !tbaa !17
  %136 = load ptr, ptr %4, align 8, !tbaa !9
  %137 = load i32, ptr @gk_optind, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr @gk_optind, align 4, !tbaa !5
  %139 = sext i32 %137 to i64
  %140 = getelementptr inbounds ptr, ptr %136, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = call ptr @gk_strdup(ptr noundef %141)
  %143 = load ptr, ptr %10, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.params_t, ptr %143, i32 0, i32 23
  store ptr %142, ptr %144, align 8, !tbaa !18
  %145 = load ptr, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret ptr %145
}

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

declare ptr @gk_malloc(i64 noundef, ptr noundef) #2

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

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

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

declare void @errexit(ptr noundef, ...) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #6

declare ptr @gk_strdup(ptr 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 = { "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 nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint nounwind willreturn memory(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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !6, i64 84, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !6, i64 128, !6, i64 132, !10, i64 136, !10, i64 144, !13, i64 152, !13, i64 156, !13, i64 160, !14, i64 168}
!13 = !{!"float", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !6, i64 52}
!16 = !{!12, !6, i64 60}
!17 = !{!12, !10, i64 88}
!18 = !{!12, !10, i64 96}
!19 = !{!12, !13, i64 152}
!20 = !{!12, !13, i64 156}
!21 = !{!12, !13, i64 160}
!22 = !{!23, !10, i64 0}
!23 = !{!"gk_option", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}


; 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.gk_option = type { ptr, i32, ptr, i32 }
%struct.gk_StringMap_t = type { ptr, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [1 x i8], align 1
@long_options = external hidden global [5 x %struct.gk_option], align 16
@gk_optarg = external local_unnamed_addr global ptr, align 8
@gtype_options = external hidden global [3 x %struct.gk_StringMap_t], align 16
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 x i8], align 1
@helpstr = external hidden global [24 x [100 x i8]], align 16
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [75 x i8], align 1
@gk_optind = external local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@shorthelpstr = external hidden global [4 x [100 x i8]], align 16

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @parse_cmdline(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %4 = tail call ptr @gk_malloc(i64 noundef 176, ptr noundef nonnull @.str) #7
  %5 = getelementptr inbounds i8, ptr %4, i64 48
  %6 = getelementptr inbounds i8, ptr %4, i64 52
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(176) %4, i8 0, i64 176, i1 false)
  store i32 1, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %4, i64 60
  %8 = getelementptr inbounds i8, ptr %4, i64 88
  %9 = getelementptr inbounds i8, ptr %4, i64 152
  store float 0.000000e+00, ptr %9, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %4, i64 160
  store float 0.000000e+00, ptr %10, align 8, !tbaa !14
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  br label %11

11:                                               ; preds = %.backedge, %2
  %12 = call i32 @gk_getopt_long_only(i32 noundef %0, ptr noundef %1, ptr noundef nonnull @.str.1, ptr noundef nonnull @long_options, ptr noundef nonnull %3) #7
  switch i32 %12, label %39 [
    i32 -1, label %41
    i32 23, label %13
    i32 20, label %24
    i32 5, label %32
    i32 18, label %.preheader
  ]

.preheader:                                       ; preds = %11
  %char03439 = load i8, ptr @helpstr, align 16
  %.not3540 = icmp eq i8 %char03439, 0
  br i1 %.not3540, label %._crit_edge, label %.lr.ph

13:                                               ; preds = %11
  %14 = load ptr, ptr @gk_optarg, align 8, !tbaa !15
  %.not38 = icmp eq ptr %14, null
  br i1 %.not38, label %.backedge, label %15

15:                                               ; preds = %13
  %16 = call i32 @gk_GetStringID(ptr noundef nonnull @gtype_options, ptr noundef nonnull %14) #7
  store i32 %16, ptr %5, align 8, !tbaa !16
  %17 = icmp eq i32 %16, -1
  br i1 %17, label %18, label %.backedge

18:                                               ; preds = %15
  %19 = load i32, ptr %3, align 4, !tbaa !17
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [5 x %struct.gk_option], ptr @long_options, i64 0, i64 %20
  %22 = load ptr, ptr %21, align 16, !tbaa !18
  %23 = load ptr, ptr @gk_optarg, align 8, !tbaa !15
  call void (ptr, ...) @errexit(ptr noundef nonnull @.str.2, ptr noundef %22, ptr noundef %23) #7
  br label %.backedge

24:                                               ; preds = %11
  %25 = load ptr, ptr @gk_optarg, align 8, !tbaa !15
  %.not37 = icmp eq ptr %25, null
  br i1 %.not37, label %thread-pre-split, label %26

26:                                               ; preds = %24
  %27 = call i32 @atoi(ptr nocapture noundef %25) #8
  store i32 %27, ptr %6, align 4, !tbaa !5
  br label %28

thread-pre-split:                                 ; preds = %24
  %.pr = load i32, ptr %6, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %thread-pre-split, %26
  %29 = phi i32 [ %.pr, %thread-pre-split ], [ %27, %26 ]
  %30 = icmp slt i32 %29, 1
  br i1 %30, label %31, label %.backedge

31:                                               ; preds = %28
  call void (ptr, ...) @errexit(ptr noundef nonnull @.str.3) #7
  br label %.backedge

32:                                               ; preds = %11
  %33 = load ptr, ptr @gk_optarg, align 8, !tbaa !15
  %.not36 = icmp eq ptr %33, null
  br i1 %.not36, label %.backedge, label %34

.backedge:                                        ; preds = %32, %34, %28, %31, %13, %18, %15, %39
  br label %11, !llvm.loop !20

34:                                               ; preds = %32
  %35 = call i32 @atoi(ptr nocapture noundef %33) #8
  store i32 %35, ptr %7, align 4, !tbaa !22
  br label %.backedge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader ]
  %36 = phi ptr [ %38, %.lr.ph ], [ @helpstr, %.preheader ]
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %36)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = getelementptr inbounds [24 x [100 x i8]], ptr @helpstr, i64 0, i64 %indvars.iv.next
  %char034 = load i8, ptr %38, align 4
  %.not35 = icmp eq i8 %char034, 0
  br i1 %.not35, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @exit(i32 noundef 0) #9
  unreachable

39:                                               ; preds = %11
  %40 = load ptr, ptr %1, align 8, !tbaa !15
  call void (ptr, ...) @errexit(ptr noundef nonnull @.str.5, ptr noundef %40) #7
  br label %.backedge

41:                                               ; preds = %11
  %42 = load i32, ptr @gk_optind, align 4, !tbaa !17
  %43 = sub nsw i32 %0, %42
  %.not32 = icmp eq i32 %43, 2
  br i1 %.not32, label %49, label %44

44:                                               ; preds = %41
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %char042 = load i8, ptr @shorthelpstr, align 16
  %.not3343 = icmp eq i8 %char042, 0
  br i1 %.not3343, label %._crit_edge47, label %.lr.ph46

.lr.ph46:                                         ; preds = %44, %.lr.ph46
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %.lr.ph46 ], [ 0, %44 ]
  %46 = phi ptr [ %48, %.lr.ph46 ], [ @shorthelpstr, %44 ]
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef nonnull %46)
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %48 = getelementptr inbounds [4 x [100 x i8]], ptr @shorthelpstr, i64 0, i64 %indvars.iv.next50
  %char0 = load i8, ptr %48, align 4
  %.not33 = icmp eq i8 %char0, 0
  br i1 %.not33, label %._crit_edge47, label %.lr.ph46, !llvm.loop !24

._crit_edge47:                                    ; preds = %.lr.ph46, %44
  call void @exit(i32 noundef 0) #9
  unreachable

49:                                               ; preds = %41
  %50 = getelementptr inbounds i8, ptr %4, i64 96
  %51 = add nsw i32 %42, 1
  store i32 %51, ptr @gk_optind, align 4, !tbaa !17
  %52 = sext i32 %42 to i64
  %53 = getelementptr inbounds ptr, ptr %1, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !15
  %55 = call ptr @gk_strdup(ptr noundef %54) #7
  store ptr %55, ptr %8, align 8, !tbaa !25
  %56 = load i32, ptr @gk_optind, align 4, !tbaa !17
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr @gk_optind, align 4, !tbaa !17
  %58 = sext i32 %56 to i64
  %59 = getelementptr inbounds ptr, ptr %1, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = call ptr @gk_strdup(ptr noundef %60) #7
  store ptr %61, ptr %50, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret ptr %4
}

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

declare ptr @gk_malloc(i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

declare void @errexit(ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #6

declare ptr @gk_strdup(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint mustprogress nofree nounwind willreturn memory(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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !7, i64 52}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !7, i64 128, !7, i64 132, !10, i64 136, !10, i64 144, !11, i64 152, !11, i64 156, !11, i64 160, !12, i64 168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!6, !11, i64 152}
!14 = !{!6, !11, i64 160}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !7, i64 48}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"gk_option", !10, i64 0, !7, i64 8, !10, i64 16, !7, i64 24}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !7, i64 60}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!6, !10, i64 88}
!26 = !{!6, !10, i64 96}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass