; LLVM IR from holzschu/ios_system :: text_cmds/rs (rs)

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

@orows = external dso_local global i32, align 4
@ocols = external dso_local global i32, align 4
@isep = external dso_local global i8, align 1
@osep = external dso_local global i8, align 1
@owidth = external dso_local global i32, align 4
@gutter = external dso_local global i32, align 4
@flags = external dso_local global i64, align 8
@skip = external dso_local global i32, align 4
@propgutter = external dso_local global i32, align 4
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@cord = external dso_local global ptr, align 8
@icbd = external dso_local global ptr, align 8
@ocbd = external dso_local global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @getargs(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = 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 8, ptr %5) #4
  %6 = load i32, ptr %3, align 4, !tbaa !5
  %7 = icmp eq i32 %6, 1
  br i1 %7, label %8, label %11

8:                                                ; preds = %2
  %9 = load i64, ptr @flags, align 8, !tbaa !11
  %10 = or i64 %9, 65537
  store i64 %10, ptr @flags, align 8, !tbaa !11
  br label %11

11:                                               ; preds = %8, %2
  br label %12

12:                                               ; preds = %143, %11
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %3, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %16, label %27

16:                                               ; preds = %12
  %17 = load ptr, ptr %4, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %17, i32 1
  store ptr %18, ptr %4, align 8, !tbaa !9
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %27

21:                                               ; preds = %16
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = load i8, ptr %23, align 1, !tbaa !13
  %25 = sext i8 %24 to i32
  %26 = icmp eq i32 %25, 45
  br label %27

27:                                               ; preds = %21, %16, %12
  %28 = phi i1 [ false, %16 ], [ false, %12 ], [ %26, %21 ]
  br i1 %28, label %29, label %144

29:                                               ; preds = %27
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %31, i64 1
  store ptr %32, ptr %5, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %140, %29
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = icmp ne i8 %35, 0
  br i1 %36, label %37, label %143

37:                                               ; preds = %33
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = sext i8 %39 to i32
  switch i32 %40, label %138 [
    i32 84, label %41
    i32 116, label %44
    i32 99, label %47
    i32 115, label %50
    i32 67, label %61
    i32 83, label %64
    i32 119, label %75
    i32 75, label %82
    i32 107, label %85
    i32 109, label %92
    i32 103, label %95
    i32 71, label %98
    i32 101, label %101
    i32 69, label %104
    i32 106, label %107
    i32 110, label %110
    i32 121, label %113
    i32 72, label %116
    i32 104, label %119
    i32 122, label %122
    i32 111, label %125
    i32 98, label %128
    i32 66, label %133
  ]

41:                                               ; preds = %37
  %42 = load i64, ptr @flags, align 8, !tbaa !11
  %43 = or i64 %42, 2
  store i64 %43, ptr @flags, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %41, %37
  %45 = load i64, ptr @flags, align 8, !tbaa !11
  %46 = or i64 %45, 1
  store i64 %46, ptr @flags, align 8, !tbaa !11
  br label %139

47:                                               ; preds = %37
  %48 = load i64, ptr @flags, align 8, !tbaa !11
  %49 = or i64 %48, 8
  store i64 %49, ptr @flags, align 8, !tbaa !11
  br label %50

50:                                               ; preds = %47, %37
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = icmp ne i8 %53, 0
  br i1 %54, label %55, label %59

55:                                               ; preds = %50
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %56, i32 1
  store ptr %57, ptr %5, align 8, !tbaa !9
  %58 = load i8, ptr %57, align 1, !tbaa !13
  store i8 %58, ptr @isep, align 1, !tbaa !13
  br label %60

59:                                               ; preds = %50
  store i8 9, ptr @isep, align 1, !tbaa !13
  br label %60

60:                                               ; preds = %59, %55
  br label %139

61:                                               ; preds = %37
  %62 = load i64, ptr @flags, align 8, !tbaa !11
  %63 = or i64 %62, 16
  store i64 %63, ptr @flags, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %61, %37
  %65 = load ptr, ptr %5, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i64 1
  %67 = load i8, ptr %66, align 1, !tbaa !13
  %68 = icmp ne i8 %67, 0
  br i1 %68, label %69, label %73

69:                                               ; preds = %64
  %70 = load ptr, ptr %5, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i32 1
  store ptr %71, ptr %5, align 8, !tbaa !9
  %72 = load i8, ptr %71, align 1, !tbaa !13
  store i8 %72, ptr @osep, align 1, !tbaa !13
  br label %74

73:                                               ; preds = %64
  store i8 9, ptr @osep, align 1, !tbaa !13
  br label %74

74:                                               ; preds = %73, %69
  br label %139

75:                                               ; preds = %37
  %76 = load ptr, ptr %5, align 8, !tbaa !9
  %77 = call ptr @getnum(ptr noundef @owidth, ptr noundef %76, i32 noundef 0)
  store ptr %77, ptr %5, align 8, !tbaa !9
  %78 = load i32, ptr @owidth, align 4, !tbaa !5
  %79 = icmp sle i32 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %75
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.7) #5
  unreachable

81:                                               ; preds = %75
  br label %139

82:                                               ; preds = %37
  %83 = load i64, ptr @flags, align 8, !tbaa !11
  %84 = or i64 %83, 4096
  store i64 %84, ptr @flags, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %82, %37
  %86 = load ptr, ptr %5, align 8, !tbaa !9
  %87 = call ptr @getnum(ptr noundef @skip, ptr noundef %86, i32 noundef 0)
  store ptr %87, ptr %5, align 8, !tbaa !9
  %88 = load i32, ptr @skip, align 4, !tbaa !5
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %91, label %90

90:                                               ; preds = %85
  store i32 1, ptr @skip, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %90, %85
  br label %139

92:                                               ; preds = %37
  %93 = load i64, ptr @flags, align 8, !tbaa !11
  %94 = or i64 %93, 32
  store i64 %94, ptr @flags, align 8, !tbaa !11
  br label %139

95:                                               ; preds = %37
  %96 = load ptr, ptr %5, align 8, !tbaa !9
  %97 = call ptr @getnum(ptr noundef @gutter, ptr noundef %96, i32 noundef 0)
  store ptr %97, ptr %5, align 8, !tbaa !9
  br label %139

98:                                               ; preds = %37
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = call ptr @getnum(ptr noundef @propgutter, ptr noundef %99, i32 noundef 0)
  store ptr %100, ptr %5, align 8, !tbaa !9
  br label %139

101:                                              ; preds = %37
  %102 = load i64, ptr @flags, align 8, !tbaa !11
  %103 = or i64 %102, 4
  store i64 %103, ptr @flags, align 8, !tbaa !11
  br label %139

104:                                              ; preds = %37
  %105 = load i64, ptr @flags, align 8, !tbaa !11
  %106 = or i64 %105, 32768
  store i64 %106, ptr @flags, align 8, !tbaa !11
  br label %139

107:                                              ; preds = %37
  %108 = load i64, ptr @flags, align 8, !tbaa !11
  %109 = or i64 %108, 512
  store i64 %109, ptr @flags, align 8, !tbaa !11
  br label %139

110:                                              ; preds = %37
  %111 = load i64, ptr @flags, align 8, !tbaa !11
  %112 = or i64 %111, 1024
  store i64 %112, ptr @flags, align 8, !tbaa !11
  br label %139

113:                                              ; preds = %37
  %114 = load i64, ptr @flags, align 8, !tbaa !11
  %115 = or i64 %114, 2048
  store i64 %115, ptr @flags, align 8, !tbaa !11
  br label %139

116:                                              ; preds = %37
  %117 = load i64, ptr @flags, align 8, !tbaa !11
  %118 = or i64 %117, 256
  store i64 %118, ptr @flags, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %116, %37
  %120 = load i64, ptr @flags, align 8, !tbaa !11
  %121 = or i64 %120, 128
  store i64 %121, ptr @flags, align 8, !tbaa !11
  br label %139

122:                                              ; preds = %37
  %123 = load i64, ptr @flags, align 8, !tbaa !11
  %124 = or i64 %123, 64
  store i64 %124, ptr @flags, align 8, !tbaa !11
  br label %139

125:                                              ; preds = %37
  %126 = load ptr, ptr %5, align 8, !tbaa !9
  %127 = call ptr @getlist(ptr noundef @cord, ptr noundef %126)
  store ptr %127, ptr %5, align 8, !tbaa !9
  br label %139

128:                                              ; preds = %37
  %129 = load i64, ptr @flags, align 8, !tbaa !11
  %130 = or i64 %129, 8192
  store i64 %130, ptr @flags, align 8, !tbaa !11
  %131 = load ptr, ptr %5, align 8, !tbaa !9
  %132 = call ptr @getlist(ptr noundef @icbd, ptr noundef %131)
  store ptr %132, ptr %5, align 8, !tbaa !9
  br label %139

133:                                              ; preds = %37
  %134 = load i64, ptr @flags, align 8, !tbaa !11
  %135 = or i64 %134, 16384
  store i64 %135, ptr @flags, align 8, !tbaa !11
  %136 = load ptr, ptr %5, align 8, !tbaa !9
  %137 = call ptr @getlist(ptr noundef @ocbd, ptr noundef %136)
  store ptr %137, ptr %5, align 8, !tbaa !9
  br label %139

138:                                              ; preds = %37
  call void @usage()
  br label %139

139:                                              ; preds = %138, %133, %128, %125, %122, %119, %113, %110, %107, %104, %101, %98, %95, %92, %91, %81, %74, %60, %44
  br label %140

140:                                              ; preds = %139
  %141 = load ptr, ptr %5, align 8, !tbaa !9
  %142 = getelementptr inbounds i8, ptr %141, i32 1
  store ptr %142, ptr %5, align 8, !tbaa !9
  br label %33, !llvm.loop !14

143:                                              ; preds = %33
  br label %12, !llvm.loop !16

144:                                              ; preds = %27
  %145 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %145, label %162 [
    i32 2, label %146
    i32 1, label %154
    i32 0, label %163
  ]

146:                                              ; preds = %144
  %147 = load ptr, ptr %4, align 8, !tbaa !9
  %148 = getelementptr inbounds ptr, ptr %147, i64 1
  %149 = load ptr, ptr %148, align 8, !tbaa !9
  %150 = call i32 @atoi(ptr noundef %149) #6
  store i32 %150, ptr @ocols, align 4, !tbaa !5
  %151 = icmp slt i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %146
  store i32 0, ptr @ocols, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %152, %146
  br label %154

154:                                              ; preds = %153, %144
  %155 = load ptr, ptr %4, align 8, !tbaa !9
  %156 = getelementptr inbounds ptr, ptr %155, i64 0
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = call i32 @atoi(ptr noundef %157) #6
  store i32 %158, ptr @orows, align 4, !tbaa !5
  %159 = icmp slt i32 %158, 0
  br i1 %159, label %160, label %161

160:                                              ; preds = %154
  store i32 0, ptr @orows, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %160, %154
  br label %163

162:                                              ; preds = %144
  call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef @.str.8) #5
  unreachable

163:                                              ; preds = %161, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: noreturn
declare void @errx(i32 noundef, ptr noundef, ...) #2

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

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

; Function Attrs: nounwind uwtable
declare hidden void @usage() #0

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn "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 = { 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 #4 = { nounwind }
attributes #5 = { noreturn }
attributes #6 = { 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 = !{!"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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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

@orows = external dso_local local_unnamed_addr global i32, align 4
@ocols = external dso_local local_unnamed_addr global i32, align 4
@isep = external dso_local local_unnamed_addr global i8, align 1
@osep = external dso_local local_unnamed_addr global i8, align 1
@owidth = external dso_local global i32, align 4
@gutter = external dso_local global i32, align 4
@flags = external dso_local local_unnamed_addr global i64, align 8
@skip = external dso_local global i32, align 4
@propgutter = external dso_local global i32, align 4
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@cord = external dso_local global ptr, align 8
@icbd = external dso_local global ptr, align 8
@ocbd = external dso_local global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @getargs(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = icmp eq i32 %0, 1
  br i1 %3, label %.thread, label %6

.thread:                                          ; preds = %2
  %4 = load i64, ptr @flags, align 8, !tbaa !5
  %5 = or i64 %4, 65537
  store i64 %5, ptr @flags, align 8, !tbaa !5
  br label %.critedge.thread

6:                                                ; preds = %2
  %7 = icmp sgt i32 %0, 1
  br i1 %7, label %.lr.ph, label %.critedge

.loopexit:                                        ; preds = %.preheader
  %8 = icmp sgt i32 %.02435, 2
  br i1 %8, label %.lr.ph, label %.critedge.thread

.lr.ph:                                           ; preds = %6, %.loopexit
  %.02236 = phi ptr [ %10, %.loopexit ], [ %1, %6 ]
  %.02435 = phi i32 [ %9, %.loopexit ], [ %0, %6 ]
  %9 = add nsw i32 %.02435, -1
  %10 = getelementptr inbounds i8, ptr %.02236, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %.critedge, label %12

12:                                               ; preds = %.lr.ph
  %13 = load i8, ptr %11, align 1, !tbaa !11
  %14 = icmp eq i8 %13, 45
  br i1 %14, label %.preheader, label %.critedge

.preheader:                                       ; preds = %12, %.preheader.backedge
  %.pn = phi ptr [ %.pn.be, %.preheader.backedge ], [ %11, %12 ]
  %.0 = getelementptr inbounds i8, ptr %.pn, i64 1
  %15 = load i8, ptr %.0, align 1, !tbaa !11
  switch i8 %15, label %91 [
    i8 0, label %.loopexit
    i8 84, label %16
    i8 116, label %.preheader._crit_edge45
    i8 99, label %22
    i8 115, label %25
    i8 67, label %30
    i8 83, label %33
    i8 119, label %38
    i8 75, label %43
    i8 107, label %46
    i8 109, label %50
    i8 103, label %53
    i8 71, label %55
    i8 101, label %57
    i8 69, label %60
    i8 106, label %63
    i8 110, label %66
    i8 121, label %69
    i8 72, label %72
    i8 104, label %.preheader._crit_edge
    i8 122, label %78
    i8 111, label %81
    i8 98, label %83
    i8 66, label %87
  ]

.preheader._crit_edge45:                          ; preds = %.preheader
  %.pre46 = load i64, ptr @flags, align 8, !tbaa !5
  br label %19

.preheader._crit_edge:                            ; preds = %.preheader
  %.pre = load i64, ptr @flags, align 8, !tbaa !5
  br label %75

16:                                               ; preds = %.preheader
  %17 = load i64, ptr @flags, align 8, !tbaa !5
  %18 = or i64 %17, 2
  br label %19

19:                                               ; preds = %.preheader._crit_edge45, %16
  %20 = phi i64 [ %.pre46, %.preheader._crit_edge45 ], [ %18, %16 ]
  %21 = or i64 %20, 1
  store i64 %21, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

.preheader.backedge:                              ; preds = %19, %50, %53, %55, %57, %60, %63, %66, %69, %75, %78, %81, %83, %87, %91, %29, %28, %37, %36, %38, %49, %46
  %.pn.be = phi ptr [ %.0, %91 ], [ %90, %87 ], [ %86, %83 ], [ %82, %81 ], [ %.0, %78 ], [ %.0, %75 ], [ %.0, %69 ], [ %.0, %66 ], [ %.0, %63 ], [ %.0, %60 ], [ %.0, %57 ], [ %56, %55 ], [ %54, %53 ], [ %.0, %50 ], [ %47, %46 ], [ %47, %49 ], [ %39, %38 ], [ %34, %36 ], [ %.0, %37 ], [ %26, %28 ], [ %.0, %29 ], [ %.0, %19 ]
  br label %.preheader, !llvm.loop !12

22:                                               ; preds = %.preheader
  %23 = load i64, ptr @flags, align 8, !tbaa !5
  %24 = or i64 %23, 8
  store i64 %24, ptr @flags, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %.preheader, %22
  %26 = getelementptr inbounds i8, ptr %.pn, i64 2
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %.not33 = icmp eq i8 %27, 0
  br i1 %.not33, label %29, label %28

28:                                               ; preds = %25
  store i8 %27, ptr @isep, align 1, !tbaa !11
  br label %.preheader.backedge

29:                                               ; preds = %25
  store i8 9, ptr @isep, align 1, !tbaa !11
  br label %.preheader.backedge

30:                                               ; preds = %.preheader
  %31 = load i64, ptr @flags, align 8, !tbaa !5
  %32 = or i64 %31, 16
  store i64 %32, ptr @flags, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %.preheader, %30
  %34 = getelementptr inbounds i8, ptr %.pn, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %.not32 = icmp eq i8 %35, 0
  br i1 %.not32, label %37, label %36

36:                                               ; preds = %33
  store i8 %35, ptr @osep, align 1, !tbaa !11
  br label %.preheader.backedge

37:                                               ; preds = %33
  store i8 9, ptr @osep, align 1, !tbaa !11
  br label %.preheader.backedge

38:                                               ; preds = %.preheader
  %39 = tail call ptr @getnum(ptr noundef nonnull @owidth, ptr noundef nonnull %.0, i32 noundef 0)
  %40 = load i32, ptr @owidth, align 4, !tbaa !14
  %41 = icmp slt i32 %40, 1
  br i1 %41, label %42, label %.preheader.backedge

42:                                               ; preds = %38
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.7) #4
  unreachable

43:                                               ; preds = %.preheader
  %44 = load i64, ptr @flags, align 8, !tbaa !5
  %45 = or i64 %44, 4096
  store i64 %45, ptr @flags, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %.preheader, %43
  %47 = tail call ptr @getnum(ptr noundef nonnull @skip, ptr noundef nonnull %.0, i32 noundef 0)
  %48 = load i32, ptr @skip, align 4, !tbaa !14
  %.not31 = icmp eq i32 %48, 0
  br i1 %.not31, label %49, label %.preheader.backedge

49:                                               ; preds = %46
  store i32 1, ptr @skip, align 4, !tbaa !14
  br label %.preheader.backedge

50:                                               ; preds = %.preheader
  %51 = load i64, ptr @flags, align 8, !tbaa !5
  %52 = or i64 %51, 32
  store i64 %52, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

53:                                               ; preds = %.preheader
  %54 = tail call ptr @getnum(ptr noundef nonnull @gutter, ptr noundef nonnull %.0, i32 noundef 0)
  br label %.preheader.backedge

55:                                               ; preds = %.preheader
  %56 = tail call ptr @getnum(ptr noundef nonnull @propgutter, ptr noundef nonnull %.0, i32 noundef 0)
  br label %.preheader.backedge

57:                                               ; preds = %.preheader
  %58 = load i64, ptr @flags, align 8, !tbaa !5
  %59 = or i64 %58, 4
  store i64 %59, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

60:                                               ; preds = %.preheader
  %61 = load i64, ptr @flags, align 8, !tbaa !5
  %62 = or i64 %61, 32768
  store i64 %62, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

63:                                               ; preds = %.preheader
  %64 = load i64, ptr @flags, align 8, !tbaa !5
  %65 = or i64 %64, 512
  store i64 %65, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

66:                                               ; preds = %.preheader
  %67 = load i64, ptr @flags, align 8, !tbaa !5
  %68 = or i64 %67, 1024
  store i64 %68, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

69:                                               ; preds = %.preheader
  %70 = load i64, ptr @flags, align 8, !tbaa !5
  %71 = or i64 %70, 2048
  store i64 %71, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

72:                                               ; preds = %.preheader
  %73 = load i64, ptr @flags, align 8, !tbaa !5
  %74 = or i64 %73, 256
  br label %75

75:                                               ; preds = %.preheader._crit_edge, %72
  %76 = phi i64 [ %.pre, %.preheader._crit_edge ], [ %74, %72 ]
  %77 = or i64 %76, 128
  store i64 %77, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

78:                                               ; preds = %.preheader
  %79 = load i64, ptr @flags, align 8, !tbaa !5
  %80 = or i64 %79, 64
  store i64 %80, ptr @flags, align 8, !tbaa !5
  br label %.preheader.backedge

81:                                               ; preds = %.preheader
  %82 = tail call ptr @getlist(ptr noundef nonnull @cord, ptr noundef nonnull %.0)
  br label %.preheader.backedge

83:                                               ; preds = %.preheader
  %84 = load i64, ptr @flags, align 8, !tbaa !5
  %85 = or i64 %84, 8192
  store i64 %85, ptr @flags, align 8, !tbaa !5
  %86 = tail call ptr @getlist(ptr noundef nonnull @icbd, ptr noundef nonnull %.0)
  br label %.preheader.backedge

87:                                               ; preds = %.preheader
  %88 = load i64, ptr @flags, align 8, !tbaa !5
  %89 = or i64 %88, 16384
  store i64 %89, ptr @flags, align 8, !tbaa !5
  %90 = tail call ptr @getlist(ptr noundef nonnull @ocbd, ptr noundef nonnull %.0)
  br label %.preheader.backedge

91:                                               ; preds = %.preheader
  tail call void @usage()
  br label %.preheader.backedge

.critedge:                                        ; preds = %12, %.lr.ph, %6
  %.024.lcssa = phi i32 [ %0, %6 ], [ %.02435, %.lr.ph ], [ %.02435, %12 ]
  %.123 = phi ptr [ %1, %6 ], [ %10, %.lr.ph ], [ %10, %12 ]
  switch i32 %.024.lcssa, label %99 [
    i32 3, label %92
    i32 2, label %96
  ]

92:                                               ; preds = %.critedge
  %93 = getelementptr inbounds i8, ptr %.123, i64 8
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = tail call i32 @atoi(ptr nocapture noundef %94) #5
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %95, i32 0)
  store i32 %spec.store.select, ptr @ocols, align 4
  br label %96

96:                                               ; preds = %92, %.critedge
  %97 = load ptr, ptr %.123, align 8, !tbaa !9
  %98 = tail call i32 @atoi(ptr nocapture noundef %97) #5
  %spec.store.select1 = tail call i32 @llvm.smax.i32(i32 %98, i32 0)
  store i32 %spec.store.select1, ptr @orows, align 4
  br label %.critedge.thread

99:                                               ; preds = %.critedge
  tail call void (i32, ptr, ...) @errx(i32 noundef 1, ptr noundef nonnull @.str.8) #4
  unreachable

.critedge.thread:                                 ; preds = %.loopexit, %.thread, %96
  ret void
}

; Function Attrs: noreturn
declare void @errx(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare hidden void @usage() local_unnamed_addr #0

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { noreturn "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 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { noreturn 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 = !{!"long", !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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}


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