; LLVM IR from BrunoLevy/learn-fpga :: LiteX/software/Doom/mc1-doom/src (am_map)

; 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.mline_t = type { %struct.mpoint_t, %struct.mpoint_t }
%struct.mpoint_t = type { i32, i32 }
%struct.line_s = type { ptr, ptr, i32, i32, i16, i16, i16, [2 x i16], [4 x i32], i32, ptr, ptr, i32, ptr }
%struct.vertex_t = type { i32, i32 }
%struct.sector_t = type { i32, i32, i16, i16, i16, i16, i16, i32, ptr, [4 x i32], %struct.degenmobj_t, i32, ptr, ptr, i32, ptr }
%struct.degenmobj_t = type { %struct.thinker_s, i32, i32, i32 }
%struct.thinker_s = type { ptr, ptr, %union.actionf_t }
%union.actionf_t = type { ptr }
%struct.player_s = type { ptr, i32, %struct.ticcmd_t, i32, i32, i32, i32, i32, i32, i32, [6 x i32], [6 x i32], i32, [4 x i32], i32, i32, [9 x i32], [4 x i32], [4 x i32], i32, i32, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, i32, i32, i32, [2 x %struct.pspdef_t], i32 }
%struct.ticcmd_t = type { i8, i8, i16, i16, i8, i8 }
%struct.pspdef_t = type { ptr, i32, i32, i32 }

@plr = external hidden global ptr, align 8
@lightlev = external hidden global i32, align 4
@cheating = external hidden global i32, align 4
@AM_drawWalls.l = external hidden global %struct.mline_t, align 4
@numlines = external global i32, align 4
@lines = external global ptr, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @AM_drawWalls() #1 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #2
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %2

2:                                                ; preds = %180, %0
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = load i32, ptr @numlines, align 4, !tbaa !5
  %5 = icmp slt i32 %3, %4
  br i1 %5, label %6, label %183

6:                                                ; preds = %2
  %7 = load ptr, ptr @lines, align 8, !tbaa !9
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = getelementptr inbounds %struct.line_s, ptr %7, i64 %9
  %11 = getelementptr inbounds %struct.line_s, ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = getelementptr inbounds %struct.vertex_t, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 4, !tbaa !14
  store i32 %14, ptr @AM_drawWalls.l, align 4, !tbaa !16
  %15 = load ptr, ptr @lines, align 8, !tbaa !9
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds %struct.line_s, ptr %15, i64 %17
  %19 = getelementptr inbounds %struct.line_s, ptr %18, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.vertex_t, ptr %20, i32 0, i32 1
  %22 = load i32, ptr %21, align 4, !tbaa !18
  store i32 %22, ptr getelementptr inbounds (%struct.mpoint_t, ptr @AM_drawWalls.l, i32 0, i32 1), align 4, !tbaa !19
  %23 = load ptr, ptr @lines, align 8, !tbaa !9
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds %struct.line_s, ptr %23, i64 %25
  %27 = getelementptr inbounds %struct.line_s, ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !20
  %29 = getelementptr inbounds %struct.vertex_t, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 4, !tbaa !14
  store i32 %30, ptr getelementptr inbounds (%struct.mline_t, ptr @AM_drawWalls.l, i32 0, i32 1), align 4, !tbaa !21
  %31 = load ptr, ptr @lines, align 8, !tbaa !9
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds %struct.line_s, ptr %31, i64 %33
  %35 = getelementptr inbounds %struct.line_s, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = getelementptr inbounds %struct.vertex_t, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !18
  store i32 %38, ptr getelementptr inbounds (%struct.mpoint_t, ptr getelementptr inbounds (%struct.mline_t, ptr @AM_drawWalls.l, i32 0, i32 1), i32 0, i32 1), align 4, !tbaa !22
  %39 = load i32, ptr @cheating, align 4, !tbaa !5
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %51, label %41

41:                                               ; preds = %6
  %42 = load ptr, ptr @lines, align 8, !tbaa !9
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds %struct.line_s, ptr %42, i64 %44
  %46 = getelementptr inbounds %struct.line_s, ptr %45, i32 0, i32 4
  %47 = load i16, ptr %46, align 8, !tbaa !23
  %48 = sext i16 %47 to i32
  %49 = and i32 %48, 256
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %160

51:                                               ; preds = %41, %6
  %52 = load ptr, ptr @lines, align 8, !tbaa !9
  %53 = load i32, ptr %1, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds %struct.line_s, ptr %52, i64 %54
  %56 = getelementptr inbounds %struct.line_s, ptr %55, i32 0, i32 4
  %57 = load i16, ptr %56, align 8, !tbaa !23
  %58 = sext i16 %57 to i32
  %59 = and i32 %58, 128
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %65

61:                                               ; preds = %51
  %62 = load i32, ptr @cheating, align 4, !tbaa !5
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  br label %180

65:                                               ; preds = %61, %51
  %66 = load ptr, ptr @lines, align 8, !tbaa !9
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds %struct.line_s, ptr %66, i64 %68
  %70 = getelementptr inbounds %struct.line_s, ptr %69, i32 0, i32 11
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = icmp ne ptr %71, null
  br i1 %72, label %76, label %73

73:                                               ; preds = %65
  %74 = load i32, ptr @lightlev, align 4, !tbaa !5
  %75 = add nsw i32 176, %74
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %75)
  br label %159

76:                                               ; preds = %65
  %77 = load ptr, ptr @lines, align 8, !tbaa !9
  %78 = load i32, ptr %1, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.line_s, ptr %77, i64 %79
  %81 = getelementptr inbounds %struct.line_s, ptr %80, i32 0, i32 5
  %82 = load i16, ptr %81, align 2, !tbaa !25
  %83 = sext i16 %82 to i32
  %84 = icmp eq i32 %83, 39
  br i1 %84, label %85, label %86

85:                                               ; preds = %76
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef 184)
  br label %158

86:                                               ; preds = %76
  %87 = load ptr, ptr @lines, align 8, !tbaa !9
  %88 = load i32, ptr %1, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.line_s, ptr %87, i64 %89
  %91 = getelementptr inbounds %struct.line_s, ptr %90, i32 0, i32 4
  %92 = load i16, ptr %91, align 8, !tbaa !23
  %93 = sext i16 %92 to i32
  %94 = and i32 %93, 32
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %106

96:                                               ; preds = %86
  %97 = load i32, ptr @cheating, align 4, !tbaa !5
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %102

99:                                               ; preds = %96
  %100 = load i32, ptr @lightlev, align 4, !tbaa !5
  %101 = add nsw i32 176, %100
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %101)
  br label %105

102:                                              ; preds = %96
  %103 = load i32, ptr @lightlev, align 4, !tbaa !5
  %104 = add nsw i32 176, %103
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %104)
  br label %105

105:                                              ; preds = %102, %99
  br label %157

106:                                              ; preds = %86
  %107 = load ptr, ptr @lines, align 8, !tbaa !9
  %108 = load i32, ptr %1, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds %struct.line_s, ptr %107, i64 %109
  %111 = getelementptr inbounds %struct.line_s, ptr %110, i32 0, i32 11
  %112 = load ptr, ptr %111, align 8, !tbaa !24
  %113 = getelementptr inbounds %struct.sector_t, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !26
  %115 = load ptr, ptr @lines, align 8, !tbaa !9
  %116 = load i32, ptr %1, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %struct.line_s, ptr %115, i64 %117
  %119 = getelementptr inbounds %struct.line_s, ptr %118, i32 0, i32 10
  %120 = load ptr, ptr %119, align 8, !tbaa !30
  %121 = getelementptr inbounds %struct.sector_t, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !26
  %123 = icmp ne i32 %114, %122
  br i1 %123, label %124, label %127

124:                                              ; preds = %106
  %125 = load i32, ptr @lightlev, align 4, !tbaa !5
  %126 = add nsw i32 64, %125
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %126)
  br label %156

127:                                              ; preds = %106
  %128 = load ptr, ptr @lines, align 8, !tbaa !9
  %129 = load i32, ptr %1, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds %struct.line_s, ptr %128, i64 %130
  %132 = getelementptr inbounds %struct.line_s, ptr %131, i32 0, i32 11
  %133 = load ptr, ptr %132, align 8, !tbaa !24
  %134 = getelementptr inbounds %struct.sector_t, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !31
  %136 = load ptr, ptr @lines, align 8, !tbaa !9
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.line_s, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.line_s, ptr %139, i32 0, i32 10
  %141 = load ptr, ptr %140, align 8, !tbaa !30
  %142 = getelementptr inbounds %struct.sector_t, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !31
  %144 = icmp ne i32 %135, %143
  br i1 %144, label %145, label %148

145:                                              ; preds = %127
  %146 = load i32, ptr @lightlev, align 4, !tbaa !5
  %147 = add nsw i32 231, %146
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %147)
  br label %155

148:                                              ; preds = %127
  %149 = load i32, ptr @cheating, align 4, !tbaa !5
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %154

151:                                              ; preds = %148
  %152 = load i32, ptr @lightlev, align 4, !tbaa !5
  %153 = add nsw i32 96, %152
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef %153)
  br label %154

154:                                              ; preds = %151, %148
  br label %155

155:                                              ; preds = %154, %145
  br label %156

156:                                              ; preds = %155, %124
  br label %157

157:                                              ; preds = %156, %105
  br label %158

158:                                              ; preds = %157, %85
  br label %159

159:                                              ; preds = %158, %73
  br label %179

160:                                              ; preds = %41
  %161 = load ptr, ptr @plr, align 8, !tbaa !9
  %162 = getelementptr inbounds %struct.player_s, ptr %161, i32 0, i32 10
  %163 = getelementptr inbounds [6 x i32], ptr %162, i64 0, i64 4
  %164 = load i32, ptr %163, align 8, !tbaa !5
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %178

166:                                              ; preds = %160
  %167 = load ptr, ptr @lines, align 8, !tbaa !9
  %168 = load i32, ptr %1, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.line_s, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.line_s, ptr %170, i32 0, i32 4
  %172 = load i16, ptr %171, align 8, !tbaa !23
  %173 = sext i16 %172 to i32
  %174 = and i32 %173, 128
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %177, label %176

176:                                              ; preds = %166
  call void @AM_drawMline(ptr noundef @AM_drawWalls.l, i32 noundef 99)
  br label %177

177:                                              ; preds = %176, %166
  br label %178

178:                                              ; preds = %177, %160
  br label %179

179:                                              ; preds = %178, %159
  br label %180

180:                                              ; preds = %179, %64
  %181 = load i32, ptr %1, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %1, align 4, !tbaa !5
  br label %2, !llvm.loop !32

183:                                              ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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, !10, i64 0}
!12 = !{!"line_s", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 26, !13, i64 28, !7, i64 30, !7, i64 36, !6, i64 52, !10, i64 56, !10, i64 64, !6, i64 72, !10, i64 80}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"", !6, i64 0, !6, i64 4}
!16 = !{!17, !6, i64 0}
!17 = !{!"", !15, i64 0, !15, i64 8}
!18 = !{!15, !6, i64 4}
!19 = !{!17, !6, i64 4}
!20 = !{!12, !10, i64 8}
!21 = !{!17, !6, i64 8}
!22 = !{!17, !6, i64 12}
!23 = !{!12, !13, i64 24}
!24 = !{!12, !10, i64 64}
!25 = !{!12, !13, i64 26}
!26 = !{!27, !6, i64 0}
!27 = !{!"", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 10, !13, i64 12, !13, i64 14, !13, i64 16, !6, i64 20, !10, i64 24, !7, i64 32, !28, i64 48, !6, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !10, i64 120}
!28 = !{!"", !29, i64 0, !6, i64 24, !6, i64 28, !6, i64 32}
!29 = !{!"thinker_s", !10, i64 0, !10, i64 8, !7, i64 16}
!30 = !{!12, !10, i64 56}
!31 = !{!27, !6, i64 4}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


; 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.mline_t = type { %struct.mpoint_t, %struct.mpoint_t }
%struct.mpoint_t = type { i32, i32 }
%struct.line_s = type { ptr, ptr, i32, i32, i16, i16, i16, [2 x i16], [4 x i32], i32, ptr, ptr, i32, ptr }

@plr = external hidden local_unnamed_addr global ptr, align 8
@lightlev = external hidden local_unnamed_addr global i32, align 4
@cheating = external hidden local_unnamed_addr global i32, align 4
@AM_drawWalls.l = external hidden global %struct.mline_t, align 4
@numlines = external local_unnamed_addr global i32, align 4
@lines = external local_unnamed_addr global ptr, align 8

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

; Function Attrs: nounwind uwtable
define dso_local void @AM_drawWalls() local_unnamed_addr #0 {
  %1 = load i32, ptr @numlines, align 4, !tbaa !5
  %2 = icmp sgt i32 %1, 0
  br i1 %2, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %63
  %indvars.iv = phi i64 [ %indvars.iv.next, %63 ], [ 0, %0 ]
  %3 = load ptr, ptr @lines, align 8, !tbaa !9
  %4 = getelementptr inbounds %struct.line_s, ptr %3, i64 %indvars.iv
  %5 = load ptr, ptr %4, align 8, !tbaa !11
  %6 = load <2 x i32>, ptr %5, align 4, !tbaa !5
  store <2 x i32> %6, ptr @AM_drawWalls.l, align 4, !tbaa !5
  %7 = getelementptr inbounds %struct.line_s, ptr %3, i64 %indvars.iv, i32 1
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = load <2 x i32>, ptr %8, align 4, !tbaa !5
  store <2 x i32> %9, ptr getelementptr inbounds (i8, ptr @AM_drawWalls.l, i64 8), align 4, !tbaa !5
  %10 = load i32, ptr @cheating, align 4
  %.not.not = icmp eq i32 %10, 0
  br i1 %.not.not, label %14, label %.thread

.thread:                                          ; preds = %.lr.ph
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  %12 = load i16, ptr %11, align 8, !tbaa !15
  %13 = zext i16 %12 to i32
  br label %22

14:                                               ; preds = %.lr.ph
  %15 = getelementptr inbounds %struct.line_s, ptr %3, i64 %indvars.iv, i32 4
  %16 = load i16, ptr %15, align 8, !tbaa !15
  %17 = zext i16 %16 to i32
  %18 = and i32 %17, 256
  %.not18 = icmp eq i32 %18, 0
  br i1 %.not18, label %58, label %19

19:                                               ; preds = %14
  %20 = and i32 %17, 128
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %63

22:                                               ; preds = %.thread, %19
  %23 = phi i32 [ %13, %.thread ], [ %17, %19 ]
  %24 = getelementptr inbounds i8, ptr %4, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %.not21 = icmp eq ptr %25, null
  br i1 %.not21, label %26, label %29

26:                                               ; preds = %22
  %27 = load i32, ptr @lightlev, align 4, !tbaa !5
  %28 = add nsw i32 %27, 176
  br label %.sink.split

29:                                               ; preds = %22
  %30 = getelementptr inbounds i8, ptr %4, i64 26
  %31 = load i16, ptr %30, align 2, !tbaa !17
  %32 = icmp eq i16 %31, 39
  br i1 %32, label %.sink.split, label %33

33:                                               ; preds = %29
  %34 = and i32 %23, 32
  %.not22 = icmp eq i32 %34, 0
  br i1 %.not22, label %38, label %35

35:                                               ; preds = %33
  %36 = load i32, ptr @lightlev, align 4, !tbaa !5
  %37 = add nsw i32 %36, 176
  br label %.sink.split

38:                                               ; preds = %33
  %39 = load i32, ptr %25, align 8, !tbaa !18
  %40 = getelementptr inbounds i8, ptr %4, i64 56
  %41 = load ptr, ptr %40, align 8, !tbaa !22
  %42 = load i32, ptr %41, align 8, !tbaa !18
  %.not23 = icmp eq i32 %39, %42
  br i1 %.not23, label %46, label %43

43:                                               ; preds = %38
  %44 = load i32, ptr @lightlev, align 4, !tbaa !5
  %45 = add nsw i32 %44, 64
  br label %.sink.split

46:                                               ; preds = %38
  %47 = getelementptr inbounds i8, ptr %25, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !23
  %49 = getelementptr inbounds i8, ptr %41, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !23
  %.not24 = icmp eq i32 %48, %50
  br i1 %.not24, label %54, label %51

51:                                               ; preds = %46
  %52 = load i32, ptr @lightlev, align 4, !tbaa !5
  %53 = add nsw i32 %52, 231
  br label %.sink.split

54:                                               ; preds = %46
  br i1 %.not.not, label %63, label %55

55:                                               ; preds = %54
  %56 = load i32, ptr @lightlev, align 4, !tbaa !5
  %57 = add nsw i32 %56, 96
  br label %.sink.split

58:                                               ; preds = %14
  %59 = load ptr, ptr @plr, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %59, i64 64
  %61 = load i32, ptr %60, align 8, !tbaa !5
  %.not19 = icmp ne i32 %61, 0
  %62 = and i32 %17, 128
  %.not20 = icmp eq i32 %62, 0
  %or.cond25 = and i1 %.not20, %.not19
  br i1 %or.cond25, label %.sink.split, label %63

.sink.split:                                      ; preds = %58, %29, %26, %51, %55, %43, %35
  %.sink = phi i32 [ %37, %35 ], [ %45, %43 ], [ %57, %55 ], [ %53, %51 ], [ %28, %26 ], [ 184, %29 ], [ 99, %58 ]
  tail call void @AM_drawMline(ptr noundef nonnull @AM_drawWalls.l, i32 noundef %.sink)
  br label %63

63:                                               ; preds = %.sink.split, %54, %58, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %64 = load i32, ptr @numlines, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = icmp slt i64 %indvars.iv.next, %65
  br i1 %66, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %63, %0
  ret void
}

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

!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, !10, i64 0}
!12 = !{!"line_s", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !13, i64 24, !13, i64 26, !13, i64 28, !7, i64 30, !7, i64 36, !6, i64 52, !10, i64 56, !10, i64 64, !6, i64 72, !10, i64 80}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !13, i64 24}
!16 = !{!12, !10, i64 64}
!17 = !{!12, !13, i64 26}
!18 = !{!19, !6, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 4, !13, i64 8, !13, i64 10, !13, i64 12, !13, i64 14, !13, i64 16, !6, i64 20, !10, i64 24, !7, i64 32, !20, i64 48, !6, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !10, i64 120}
!20 = !{!"", !21, i64 0, !6, i64 24, !6, i64 28, !6, i64 32}
!21 = !{!"thinker_s", !10, i64 0, !10, i64 8, !7, i64 16}
!22 = !{!12, !10, i64 56}
!23 = !{!19, !6, i64 4}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass