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

; 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.drawseg_s = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.seg_t = type { ptr, ptr, i32, i32, ptr, ptr, ptr, ptr }
%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.side_t = type { i32, i32, i16, i16, i16, ptr }

@curline = external global ptr, align 8
@frontsector = external global ptr, align 8
@backsector = external global ptr, align 8
@texturetranslation = external global ptr, align 8
@extralight = external global i32, align 4
@scalelight = external global [16 x [48 x ptr]], align 16
@walllights = external dso_local global ptr, align 8
@maskedtexturecol = external dso_local global ptr, align 8
@rw_scalestep = external dso_local global i32, align 4
@textureheight = external global ptr, align 8
@viewz = external global i32, align 4
@fixedcolormap = external global ptr, align 8
@centeryfrac = external global i32, align 4
@rw_x = external dso_local global i32, align 4
@rw_stopx = external dso_local global i32, align 4
@topfrac = external dso_local global i32, align 4
@ceilingclip = external global [320 x i16], align 16
@markceiling = external dso_local global i32, align 4
@floorclip = external global [320 x i16], align 16
@ceilingplane = external global ptr, align 8
@bottomfrac = external dso_local global i32, align 4
@markfloor = external dso_local global i32, align 4
@floorplane = external global ptr, align 8
@segtextured = external dso_local global i32, align 4
@rw_centerangle = external dso_local global i32, align 4
@xtoviewangle = external global [321 x i32], align 16
@rw_offset = external dso_local global i32, align 4
@rw_distance = external dso_local global i32, align 4
@rw_scale = external dso_local global i32, align 4
@midtexture = external dso_local global i32, align 4
@rw_midtexturemid = external dso_local global i32, align 4
@toptexture = external dso_local global i32, align 4
@pixhigh = external dso_local global i32, align 4
@pixhighstep = external dso_local global i32, align 4
@rw_toptexturemid = external dso_local global i32, align 4
@bottomtexture = external dso_local global i32, align 4
@pixlow = external dso_local global i32, align 4
@pixlowstep = external dso_local global i32, align 4
@rw_bottomtexturemid = external dso_local global i32, align 4
@maskedtexture = external dso_local global i32, align 4
@topstep = external dso_local global i32, align 4
@bottomstep = external dso_local global i32, align 4
@ds_p = external global ptr, align 8
@drawsegs = external global [256 x %struct.drawseg_s], align 16
@viewwidth = external global i32, align 4
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@sidedef = external global ptr, align 8
@linedef = external global ptr, align 8
@rw_normalangle = external dso_local global i32, align 4
@rw_angle1 = external dso_local global i32, align 4
@finesine = external global [10240 x i32], align 16
@viewangle = external global i32, align 4
@worldtop = external dso_local global i32, align 4
@worldbottom = external dso_local global i32, align 4
@screenheightarray = external global [320 x i16], align 16
@negonearray = external global [320 x i16], align 16
@worldhigh = external dso_local global i32, align 4
@worldlow = external dso_local global i32, align 4
@skyflatnum = external global i32, align 4
@lastopening = 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: inlinehint nounwind uwtable
declare hidden i32 @FixedMul(i32 noundef, i32 noundef) #1

; 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 @R_RenderSegLoop() #2

; Function Attrs: nounwind uwtable
define dso_local void @R_StoreWallRange(i32 noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %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 i32, align 4
  %11 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  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 4, ptr %10) #7
  %12 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %13 = icmp eq ptr %12, getelementptr inbounds ([256 x %struct.drawseg_s], ptr @drawsegs, i64 0, i64 256)
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  store i32 1, ptr %11, align 4
  br label %787

15:                                               ; preds = %2
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = load i32, ptr @viewwidth, align 4, !tbaa !5
  %18 = icmp sge i32 %16, %17
  br i1 %18, label %23, label %19

19:                                               ; preds = %15
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = icmp sgt i32 %20, %21
  br i1 %22, label %23, label %26

23:                                               ; preds = %19, %15
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  call void (ptr, ...) @I_Error(ptr noundef @.str, i32 noundef %24, i32 noundef %25) #8
  unreachable

26:                                               ; preds = %19
  %27 = load ptr, ptr @curline, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct.seg_t, ptr %27, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  store ptr %29, ptr @sidedef, align 8, !tbaa !9
  %30 = load ptr, ptr @curline, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct.seg_t, ptr %30, i32 0, i32 5
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  store ptr %32, ptr @linedef, align 8, !tbaa !9
  %33 = load ptr, ptr @linedef, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.line_s, ptr %33, i32 0, i32 4
  %35 = load i16, ptr %34, align 8, !tbaa !14
  %36 = sext i16 %35 to i32
  %37 = or i32 %36, 256
  %38 = trunc i32 %37 to i16
  store i16 %38, ptr %34, align 8, !tbaa !14
  %39 = load ptr, ptr @curline, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.seg_t, ptr %39, i32 0, i32 3
  %41 = load i32, ptr %40, align 4, !tbaa !17
  %42 = add i32 %41, 1073741824
  store i32 %42, ptr @rw_normalangle, align 4, !tbaa !5
  %43 = load i32, ptr @rw_normalangle, align 4, !tbaa !5
  %44 = load i32, ptr @rw_angle1, align 4, !tbaa !5
  %45 = sub nsw i32 %43, %44
  %46 = call i32 @llvm.abs.i32(i32 %45, i1 true)
  store i32 %46, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = icmp ugt i32 %47, 1073741824
  br i1 %48, label %49, label %50

49:                                               ; preds = %26
  store i32 1073741824, ptr %8, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %49, %26
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sub i32 1073741824, %51
  store i32 %52, ptr %7, align 4, !tbaa !5
  %53 = load ptr, ptr @curline, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.seg_t, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = getelementptr inbounds %struct.vertex_t, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !19
  %58 = load ptr, ptr @curline, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.seg_t, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = getelementptr inbounds %struct.vertex_t, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !21
  %63 = call i32 @R_PointToDist(i32 noundef %57, i32 noundef %62)
  store i32 %63, ptr %5, align 4, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = lshr i32 %64, 19
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr %6, align 4, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = call i32 @FixedMul(i32 noundef %69, i32 noundef %70)
  store i32 %71, ptr @rw_distance, align 4, !tbaa !5
  %72 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %72, ptr @rw_x, align 4, !tbaa !5
  %73 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.drawseg_s, ptr %73, i32 0, i32 1
  store i32 %72, ptr %74, align 8, !tbaa !22
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.drawseg_s, ptr %76, i32 0, i32 2
  store i32 %75, ptr %77, align 4, !tbaa !24
  %78 = load ptr, ptr @curline, align 8, !tbaa !9
  %79 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.drawseg_s, ptr %79, i32 0, i32 0
  store ptr %78, ptr %80, align 8, !tbaa !25
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr @rw_stopx, align 4, !tbaa !5
  %83 = load i32, ptr @viewangle, align 4, !tbaa !5
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [321 x i32], ptr @xtoviewangle, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = add i32 %83, %87
  %89 = call i32 @R_ScaleFromGlobalAngle(i32 noundef %88)
  store i32 %89, ptr @rw_scale, align 4, !tbaa !5
  %90 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.drawseg_s, ptr %90, i32 0, i32 3
  store i32 %89, ptr %91, align 8, !tbaa !26
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = load i32, ptr %3, align 4, !tbaa !5
  %94 = icmp sgt i32 %92, %93
  br i1 %94, label %95, label %116

95:                                               ; preds = %50
  %96 = load i32, ptr @viewangle, align 4, !tbaa !5
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [321 x i32], ptr @xtoviewangle, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = add i32 %96, %100
  %102 = call i32 @R_ScaleFromGlobalAngle(i32 noundef %101)
  %103 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.drawseg_s, ptr %103, i32 0, i32 4
  store i32 %102, ptr %104, align 4, !tbaa !27
  %105 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.drawseg_s, ptr %105, i32 0, i32 4
  %107 = load i32, ptr %106, align 4, !tbaa !27
  %108 = load i32, ptr @rw_scale, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  %110 = load i32, ptr %4, align 4, !tbaa !5
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = sub nsw i32 %110, %111
  %113 = sdiv i32 %109, %112
  store i32 %113, ptr @rw_scalestep, align 4, !tbaa !5
  %114 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.drawseg_s, ptr %114, i32 0, i32 5
  store i32 %113, ptr %115, align 8, !tbaa !28
  br label %122

116:                                              ; preds = %50
  %117 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.drawseg_s, ptr %117, i32 0, i32 3
  %119 = load i32, ptr %118, align 8, !tbaa !26
  %120 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.drawseg_s, ptr %120, i32 0, i32 4
  store i32 %119, ptr %121, align 4, !tbaa !27
  br label %122

122:                                              ; preds = %116, %95
  %123 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.sector_t, ptr %123, i32 0, i32 1
  %125 = load i32, ptr %124, align 4, !tbaa !29
  %126 = load i32, ptr @viewz, align 4, !tbaa !5
  %127 = sub nsw i32 %125, %126
  store i32 %127, ptr @worldtop, align 4, !tbaa !5
  %128 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.sector_t, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !33
  %131 = load i32, ptr @viewz, align 4, !tbaa !5
  %132 = sub nsw i32 %130, %131
  store i32 %132, ptr @worldbottom, align 4, !tbaa !5
  store i32 0, ptr @maskedtexture, align 4, !tbaa !5
  store i32 0, ptr @bottomtexture, align 4, !tbaa !5
  store i32 0, ptr @toptexture, align 4, !tbaa !5
  store i32 0, ptr @midtexture, align 4, !tbaa !5
  %133 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.drawseg_s, ptr %133, i32 0, i32 11
  store ptr null, ptr %134, align 8, !tbaa !34
  %135 = load ptr, ptr @backsector, align 8, !tbaa !9
  %136 = icmp ne ptr %135, null
  br i1 %136, label %184, label %137

137:                                              ; preds = %122
  %138 = load ptr, ptr @texturetranslation, align 8, !tbaa !9
  %139 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.side_t, ptr %139, i32 0, i32 4
  %141 = load i16, ptr %140, align 4, !tbaa !35
  %142 = sext i16 %141 to i64
  %143 = getelementptr inbounds i32, ptr %138, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  store i32 %144, ptr @midtexture, align 4, !tbaa !5
  store i32 1, ptr @markceiling, align 4, !tbaa !5
  store i32 1, ptr @markfloor, align 4, !tbaa !5
  %145 = load ptr, ptr @linedef, align 8, !tbaa !9
  %146 = getelementptr inbounds %struct.line_s, ptr %145, i32 0, i32 4
  %147 = load i16, ptr %146, align 8, !tbaa !14
  %148 = sext i16 %147 to i32
  %149 = and i32 %148, 16
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %166

151:                                              ; preds = %137
  %152 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.sector_t, ptr %152, i32 0, i32 0
  %154 = load i32, ptr %153, align 8, !tbaa !33
  %155 = load ptr, ptr @textureheight, align 8, !tbaa !9
  %156 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.side_t, ptr %156, i32 0, i32 4
  %158 = load i16, ptr %157, align 4, !tbaa !35
  %159 = sext i16 %158 to i64
  %160 = getelementptr inbounds i32, ptr %155, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = add nsw i32 %154, %161
  store i32 %162, ptr %9, align 4, !tbaa !5
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = load i32, ptr @viewz, align 4, !tbaa !5
  %165 = sub nsw i32 %163, %164
  store i32 %165, ptr @rw_midtexturemid, align 4, !tbaa !5
  br label %168

166:                                              ; preds = %137
  %167 = load i32, ptr @worldtop, align 4, !tbaa !5
  store i32 %167, ptr @rw_midtexturemid, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %166, %151
  %169 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.side_t, ptr %169, i32 0, i32 1
  %171 = load i32, ptr %170, align 4, !tbaa !37
  %172 = load i32, ptr @rw_midtexturemid, align 4, !tbaa !5
  %173 = add nsw i32 %172, %171
  store i32 %173, ptr @rw_midtexturemid, align 4, !tbaa !5
  %174 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %175 = getelementptr inbounds %struct.drawseg_s, ptr %174, i32 0, i32 6
  store i32 3, ptr %175, align 4, !tbaa !38
  %176 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.drawseg_s, ptr %176, i32 0, i32 9
  store ptr @screenheightarray, ptr %177, align 8, !tbaa !39
  %178 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.drawseg_s, ptr %178, i32 0, i32 10
  store ptr @negonearray, ptr %179, align 8, !tbaa !40
  %180 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.drawseg_s, ptr %180, i32 0, i32 7
  store i32 2147483647, ptr %181, align 8, !tbaa !41
  %182 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %183 = getelementptr inbounds %struct.drawseg_s, ptr %182, i32 0, i32 8
  store i32 -2147483648, ptr %183, align 4, !tbaa !42
  br label %468

184:                                              ; preds = %122
  %185 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %186 = getelementptr inbounds %struct.drawseg_s, ptr %185, i32 0, i32 10
  store ptr null, ptr %186, align 8, !tbaa !40
  %187 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.drawseg_s, ptr %187, i32 0, i32 9
  store ptr null, ptr %188, align 8, !tbaa !39
  %189 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.drawseg_s, ptr %189, i32 0, i32 6
  store i32 0, ptr %190, align 4, !tbaa !38
  %191 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.sector_t, ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 8, !tbaa !33
  %194 = load ptr, ptr @backsector, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.sector_t, ptr %194, i32 0, i32 0
  %196 = load i32, ptr %195, align 8, !tbaa !33
  %197 = icmp sgt i32 %193, %196
  br i1 %197, label %198, label %206

198:                                              ; preds = %184
  %199 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %200 = getelementptr inbounds %struct.drawseg_s, ptr %199, i32 0, i32 6
  store i32 1, ptr %200, align 4, !tbaa !38
  %201 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %202 = getelementptr inbounds %struct.sector_t, ptr %201, i32 0, i32 0
  %203 = load i32, ptr %202, align 8, !tbaa !33
  %204 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %205 = getelementptr inbounds %struct.drawseg_s, ptr %204, i32 0, i32 7
  store i32 %203, ptr %205, align 8, !tbaa !41
  br label %218

206:                                              ; preds = %184
  %207 = load ptr, ptr @backsector, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct.sector_t, ptr %207, i32 0, i32 0
  %209 = load i32, ptr %208, align 8, !tbaa !33
  %210 = load i32, ptr @viewz, align 4, !tbaa !5
  %211 = icmp sgt i32 %209, %210
  br i1 %211, label %212, label %217

212:                                              ; preds = %206
  %213 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %214 = getelementptr inbounds %struct.drawseg_s, ptr %213, i32 0, i32 6
  store i32 1, ptr %214, align 4, !tbaa !38
  %215 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %216 = getelementptr inbounds %struct.drawseg_s, ptr %215, i32 0, i32 7
  store i32 2147483647, ptr %216, align 8, !tbaa !41
  br label %217

217:                                              ; preds = %212, %206
  br label %218

218:                                              ; preds = %217, %198
  %219 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.sector_t, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !29
  %222 = load ptr, ptr @backsector, align 8, !tbaa !9
  %223 = getelementptr inbounds %struct.sector_t, ptr %222, i32 0, i32 1
  %224 = load i32, ptr %223, align 4, !tbaa !29
  %225 = icmp slt i32 %221, %224
  br i1 %225, label %226, label %236

226:                                              ; preds = %218
  %227 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %228 = getelementptr inbounds %struct.drawseg_s, ptr %227, i32 0, i32 6
  %229 = load i32, ptr %228, align 4, !tbaa !38
  %230 = or i32 %229, 2
  store i32 %230, ptr %228, align 4, !tbaa !38
  %231 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %232 = getelementptr inbounds %struct.sector_t, ptr %231, i32 0, i32 1
  %233 = load i32, ptr %232, align 4, !tbaa !29
  %234 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.drawseg_s, ptr %234, i32 0, i32 8
  store i32 %233, ptr %235, align 4, !tbaa !42
  br label %250

236:                                              ; preds = %218
  %237 = load ptr, ptr @backsector, align 8, !tbaa !9
  %238 = getelementptr inbounds %struct.sector_t, ptr %237, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !29
  %240 = load i32, ptr @viewz, align 4, !tbaa !5
  %241 = icmp slt i32 %239, %240
  br i1 %241, label %242, label %249

242:                                              ; preds = %236
  %243 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.drawseg_s, ptr %243, i32 0, i32 6
  %245 = load i32, ptr %244, align 4, !tbaa !38
  %246 = or i32 %245, 2
  store i32 %246, ptr %244, align 4, !tbaa !38
  %247 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %248 = getelementptr inbounds %struct.drawseg_s, ptr %247, i32 0, i32 8
  store i32 -2147483648, ptr %248, align 4, !tbaa !42
  br label %249

249:                                              ; preds = %242, %236
  br label %250

250:                                              ; preds = %249, %226
  %251 = load ptr, ptr @backsector, align 8, !tbaa !9
  %252 = getelementptr inbounds %struct.sector_t, ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 4, !tbaa !29
  %254 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %255 = getelementptr inbounds %struct.sector_t, ptr %254, i32 0, i32 0
  %256 = load i32, ptr %255, align 8, !tbaa !33
  %257 = icmp sle i32 %253, %256
  br i1 %257, label %258, label %267

258:                                              ; preds = %250
  %259 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %260 = getelementptr inbounds %struct.drawseg_s, ptr %259, i32 0, i32 10
  store ptr @negonearray, ptr %260, align 8, !tbaa !40
  %261 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %262 = getelementptr inbounds %struct.drawseg_s, ptr %261, i32 0, i32 7
  store i32 2147483647, ptr %262, align 8, !tbaa !41
  %263 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %264 = getelementptr inbounds %struct.drawseg_s, ptr %263, i32 0, i32 6
  %265 = load i32, ptr %264, align 4, !tbaa !38
  %266 = or i32 %265, 1
  store i32 %266, ptr %264, align 4, !tbaa !38
  br label %267

267:                                              ; preds = %258, %250
  %268 = load ptr, ptr @backsector, align 8, !tbaa !9
  %269 = getelementptr inbounds %struct.sector_t, ptr %268, i32 0, i32 0
  %270 = load i32, ptr %269, align 8, !tbaa !33
  %271 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %272 = getelementptr inbounds %struct.sector_t, ptr %271, i32 0, i32 1
  %273 = load i32, ptr %272, align 4, !tbaa !29
  %274 = icmp sge i32 %270, %273
  br i1 %274, label %275, label %284

275:                                              ; preds = %267
  %276 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.drawseg_s, ptr %276, i32 0, i32 9
  store ptr @screenheightarray, ptr %277, align 8, !tbaa !39
  %278 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %279 = getelementptr inbounds %struct.drawseg_s, ptr %278, i32 0, i32 8
  store i32 -2147483648, ptr %279, align 4, !tbaa !42
  %280 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %281 = getelementptr inbounds %struct.drawseg_s, ptr %280, i32 0, i32 6
  %282 = load i32, ptr %281, align 4, !tbaa !38
  %283 = or i32 %282, 2
  store i32 %283, ptr %281, align 4, !tbaa !38
  br label %284

284:                                              ; preds = %275, %267
  %285 = load ptr, ptr @backsector, align 8, !tbaa !9
  %286 = getelementptr inbounds %struct.sector_t, ptr %285, i32 0, i32 1
  %287 = load i32, ptr %286, align 4, !tbaa !29
  %288 = load i32, ptr @viewz, align 4, !tbaa !5
  %289 = sub nsw i32 %287, %288
  store i32 %289, ptr @worldhigh, align 4, !tbaa !5
  %290 = load ptr, ptr @backsector, align 8, !tbaa !9
  %291 = getelementptr inbounds %struct.sector_t, ptr %290, i32 0, i32 0
  %292 = load i32, ptr %291, align 8, !tbaa !33
  %293 = load i32, ptr @viewz, align 4, !tbaa !5
  %294 = sub nsw i32 %292, %293
  store i32 %294, ptr @worldlow, align 4, !tbaa !5
  %295 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %296 = getelementptr inbounds %struct.sector_t, ptr %295, i32 0, i32 3
  %297 = load i16, ptr %296, align 2, !tbaa !43
  %298 = sext i16 %297 to i32
  %299 = load i32, ptr @skyflatnum, align 4, !tbaa !5
  %300 = icmp eq i32 %298, %299
  br i1 %300, label %301, label %310

301:                                              ; preds = %284
  %302 = load ptr, ptr @backsector, align 8, !tbaa !9
  %303 = getelementptr inbounds %struct.sector_t, ptr %302, i32 0, i32 3
  %304 = load i16, ptr %303, align 2, !tbaa !43
  %305 = sext i16 %304 to i32
  %306 = load i32, ptr @skyflatnum, align 4, !tbaa !5
  %307 = icmp eq i32 %305, %306
  br i1 %307, label %308, label %310

308:                                              ; preds = %301
  %309 = load i32, ptr @worldhigh, align 4, !tbaa !5
  store i32 %309, ptr @worldtop, align 4, !tbaa !5
  br label %310

310:                                              ; preds = %308, %301, %284
  %311 = load i32, ptr @worldlow, align 4, !tbaa !5
  %312 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %313 = icmp ne i32 %311, %312
  br i1 %313, label %334, label %314

314:                                              ; preds = %310
  %315 = load ptr, ptr @backsector, align 8, !tbaa !9
  %316 = getelementptr inbounds %struct.sector_t, ptr %315, i32 0, i32 2
  %317 = load i16, ptr %316, align 8, !tbaa !44
  %318 = sext i16 %317 to i32
  %319 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %320 = getelementptr inbounds %struct.sector_t, ptr %319, i32 0, i32 2
  %321 = load i16, ptr %320, align 8, !tbaa !44
  %322 = sext i16 %321 to i32
  %323 = icmp ne i32 %318, %322
  br i1 %323, label %334, label %324

324:                                              ; preds = %314
  %325 = load ptr, ptr @backsector, align 8, !tbaa !9
  %326 = getelementptr inbounds %struct.sector_t, ptr %325, i32 0, i32 4
  %327 = load i16, ptr %326, align 4, !tbaa !45
  %328 = sext i16 %327 to i32
  %329 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %330 = getelementptr inbounds %struct.sector_t, ptr %329, i32 0, i32 4
  %331 = load i16, ptr %330, align 4, !tbaa !45
  %332 = sext i16 %331 to i32
  %333 = icmp ne i32 %328, %332
  br i1 %333, label %334, label %335

334:                                              ; preds = %324, %314, %310
  store i32 1, ptr @markfloor, align 4, !tbaa !5
  br label %336

335:                                              ; preds = %324
  store i32 0, ptr @markfloor, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %335, %334
  %337 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %338 = load i32, ptr @worldtop, align 4, !tbaa !5
  %339 = icmp ne i32 %337, %338
  br i1 %339, label %360, label %340

340:                                              ; preds = %336
  %341 = load ptr, ptr @backsector, align 8, !tbaa !9
  %342 = getelementptr inbounds %struct.sector_t, ptr %341, i32 0, i32 3
  %343 = load i16, ptr %342, align 2, !tbaa !43
  %344 = sext i16 %343 to i32
  %345 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %346 = getelementptr inbounds %struct.sector_t, ptr %345, i32 0, i32 3
  %347 = load i16, ptr %346, align 2, !tbaa !43
  %348 = sext i16 %347 to i32
  %349 = icmp ne i32 %344, %348
  br i1 %349, label %360, label %350

350:                                              ; preds = %340
  %351 = load ptr, ptr @backsector, align 8, !tbaa !9
  %352 = getelementptr inbounds %struct.sector_t, ptr %351, i32 0, i32 4
  %353 = load i16, ptr %352, align 4, !tbaa !45
  %354 = sext i16 %353 to i32
  %355 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %356 = getelementptr inbounds %struct.sector_t, ptr %355, i32 0, i32 4
  %357 = load i16, ptr %356, align 4, !tbaa !45
  %358 = sext i16 %357 to i32
  %359 = icmp ne i32 %354, %358
  br i1 %359, label %360, label %361

360:                                              ; preds = %350, %340, %336
  store i32 1, ptr @markceiling, align 4, !tbaa !5
  br label %362

361:                                              ; preds = %350
  store i32 0, ptr @markceiling, align 4, !tbaa !5
  br label %362

362:                                              ; preds = %361, %360
  %363 = load ptr, ptr @backsector, align 8, !tbaa !9
  %364 = getelementptr inbounds %struct.sector_t, ptr %363, i32 0, i32 1
  %365 = load i32, ptr %364, align 4, !tbaa !29
  %366 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %367 = getelementptr inbounds %struct.sector_t, ptr %366, i32 0, i32 0
  %368 = load i32, ptr %367, align 8, !tbaa !33
  %369 = icmp sle i32 %365, %368
  br i1 %369, label %378, label %370

370:                                              ; preds = %362
  %371 = load ptr, ptr @backsector, align 8, !tbaa !9
  %372 = getelementptr inbounds %struct.sector_t, ptr %371, i32 0, i32 0
  %373 = load i32, ptr %372, align 8, !tbaa !33
  %374 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %375 = getelementptr inbounds %struct.sector_t, ptr %374, i32 0, i32 1
  %376 = load i32, ptr %375, align 4, !tbaa !29
  %377 = icmp sge i32 %373, %376
  br i1 %377, label %378, label %379

378:                                              ; preds = %370, %362
  store i32 1, ptr @markfloor, align 4, !tbaa !5
  store i32 1, ptr @markceiling, align 4, !tbaa !5
  br label %379

379:                                              ; preds = %378, %370
  %380 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %381 = load i32, ptr @worldtop, align 4, !tbaa !5
  %382 = icmp slt i32 %380, %381
  br i1 %382, label %383, label %415

383:                                              ; preds = %379
  %384 = load ptr, ptr @texturetranslation, align 8, !tbaa !9
  %385 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %386 = getelementptr inbounds %struct.side_t, ptr %385, i32 0, i32 2
  %387 = load i16, ptr %386, align 8, !tbaa !46
  %388 = sext i16 %387 to i64
  %389 = getelementptr inbounds i32, ptr %384, i64 %388
  %390 = load i32, ptr %389, align 4, !tbaa !5
  store i32 %390, ptr @toptexture, align 4, !tbaa !5
  %391 = load ptr, ptr @linedef, align 8, !tbaa !9
  %392 = getelementptr inbounds %struct.line_s, ptr %391, i32 0, i32 4
  %393 = load i16, ptr %392, align 8, !tbaa !14
  %394 = sext i16 %393 to i32
  %395 = and i32 %394, 8
  %396 = icmp ne i32 %395, 0
  br i1 %396, label %397, label %399

397:                                              ; preds = %383
  %398 = load i32, ptr @worldtop, align 4, !tbaa !5
  store i32 %398, ptr @rw_toptexturemid, align 4, !tbaa !5
  br label %414

399:                                              ; preds = %383
  %400 = load ptr, ptr @backsector, align 8, !tbaa !9
  %401 = getelementptr inbounds %struct.sector_t, ptr %400, i32 0, i32 1
  %402 = load i32, ptr %401, align 4, !tbaa !29
  %403 = load ptr, ptr @textureheight, align 8, !tbaa !9
  %404 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %405 = getelementptr inbounds %struct.side_t, ptr %404, i32 0, i32 2
  %406 = load i16, ptr %405, align 8, !tbaa !46
  %407 = sext i16 %406 to i64
  %408 = getelementptr inbounds i32, ptr %403, i64 %407
  %409 = load i32, ptr %408, align 4, !tbaa !5
  %410 = add nsw i32 %402, %409
  store i32 %410, ptr %9, align 4, !tbaa !5
  %411 = load i32, ptr %9, align 4, !tbaa !5
  %412 = load i32, ptr @viewz, align 4, !tbaa !5
  %413 = sub nsw i32 %411, %412
  store i32 %413, ptr @rw_toptexturemid, align 4, !tbaa !5
  br label %414

414:                                              ; preds = %399, %397
  br label %415

415:                                              ; preds = %414, %379
  %416 = load i32, ptr @worldlow, align 4, !tbaa !5
  %417 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %418 = icmp sgt i32 %416, %417
  br i1 %418, label %419, label %438

419:                                              ; preds = %415
  %420 = load ptr, ptr @texturetranslation, align 8, !tbaa !9
  %421 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %422 = getelementptr inbounds %struct.side_t, ptr %421, i32 0, i32 3
  %423 = load i16, ptr %422, align 2, !tbaa !47
  %424 = sext i16 %423 to i64
  %425 = getelementptr inbounds i32, ptr %420, i64 %424
  %426 = load i32, ptr %425, align 4, !tbaa !5
  store i32 %426, ptr @bottomtexture, align 4, !tbaa !5
  %427 = load ptr, ptr @linedef, align 8, !tbaa !9
  %428 = getelementptr inbounds %struct.line_s, ptr %427, i32 0, i32 4
  %429 = load i16, ptr %428, align 8, !tbaa !14
  %430 = sext i16 %429 to i32
  %431 = and i32 %430, 16
  %432 = icmp ne i32 %431, 0
  br i1 %432, label %433, label %435

433:                                              ; preds = %419
  %434 = load i32, ptr @worldtop, align 4, !tbaa !5
  store i32 %434, ptr @rw_bottomtexturemid, align 4, !tbaa !5
  br label %437

435:                                              ; preds = %419
  %436 = load i32, ptr @worldlow, align 4, !tbaa !5
  store i32 %436, ptr @rw_bottomtexturemid, align 4, !tbaa !5
  br label %437

437:                                              ; preds = %435, %433
  br label %438

438:                                              ; preds = %437, %415
  %439 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %440 = getelementptr inbounds %struct.side_t, ptr %439, i32 0, i32 1
  %441 = load i32, ptr %440, align 4, !tbaa !37
  %442 = load i32, ptr @rw_toptexturemid, align 4, !tbaa !5
  %443 = add nsw i32 %442, %441
  store i32 %443, ptr @rw_toptexturemid, align 4, !tbaa !5
  %444 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %445 = getelementptr inbounds %struct.side_t, ptr %444, i32 0, i32 1
  %446 = load i32, ptr %445, align 4, !tbaa !37
  %447 = load i32, ptr @rw_bottomtexturemid, align 4, !tbaa !5
  %448 = add nsw i32 %447, %446
  store i32 %448, ptr @rw_bottomtexturemid, align 4, !tbaa !5
  %449 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %450 = getelementptr inbounds %struct.side_t, ptr %449, i32 0, i32 4
  %451 = load i16, ptr %450, align 4, !tbaa !35
  %452 = icmp ne i16 %451, 0
  br i1 %452, label %453, label %467

453:                                              ; preds = %438
  store i32 1, ptr @maskedtexture, align 4, !tbaa !5
  %454 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %455 = load i32, ptr @rw_x, align 4, !tbaa !5
  %456 = sext i32 %455 to i64
  %457 = sub i64 0, %456
  %458 = getelementptr inbounds i16, ptr %454, i64 %457
  store ptr %458, ptr @maskedtexturecol, align 8, !tbaa !9
  %459 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %460 = getelementptr inbounds %struct.drawseg_s, ptr %459, i32 0, i32 11
  store ptr %458, ptr %460, align 8, !tbaa !34
  %461 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %462 = load i32, ptr @rw_x, align 4, !tbaa !5
  %463 = sub nsw i32 %461, %462
  %464 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %465 = sext i32 %463 to i64
  %466 = getelementptr inbounds i16, ptr %464, i64 %465
  store ptr %466, ptr @lastopening, align 8, !tbaa !9
  br label %467

467:                                              ; preds = %453, %438
  br label %468

468:                                              ; preds = %467, %168
  %469 = load i32, ptr @midtexture, align 4, !tbaa !5
  %470 = load i32, ptr @toptexture, align 4, !tbaa !5
  %471 = or i32 %469, %470
  %472 = load i32, ptr @bottomtexture, align 4, !tbaa !5
  %473 = or i32 %471, %472
  %474 = load i32, ptr @maskedtexture, align 4, !tbaa !5
  %475 = or i32 %473, %474
  store i32 %475, ptr @segtextured, align 4, !tbaa !5
  %476 = load i32, ptr @segtextured, align 4, !tbaa !5
  %477 = icmp ne i32 %476, 0
  br i1 %477, label %478, label %577

478:                                              ; preds = %468
  %479 = load i32, ptr @rw_normalangle, align 4, !tbaa !5
  %480 = load i32, ptr @rw_angle1, align 4, !tbaa !5
  %481 = sub i32 %479, %480
  store i32 %481, ptr %8, align 4, !tbaa !5
  %482 = load i32, ptr %8, align 4, !tbaa !5
  %483 = icmp ugt i32 %482, -2147483648
  br i1 %483, label %484, label %487

484:                                              ; preds = %478
  %485 = load i32, ptr %8, align 4, !tbaa !5
  %486 = sub i32 0, %485
  store i32 %486, ptr %8, align 4, !tbaa !5
  br label %487

487:                                              ; preds = %484, %478
  %488 = load i32, ptr %8, align 4, !tbaa !5
  %489 = icmp ugt i32 %488, 1073741824
  br i1 %489, label %490, label %491

490:                                              ; preds = %487
  store i32 1073741824, ptr %8, align 4, !tbaa !5
  br label %491

491:                                              ; preds = %490, %487
  %492 = load i32, ptr %8, align 4, !tbaa !5
  %493 = lshr i32 %492, 19
  %494 = zext i32 %493 to i64
  %495 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %494
  %496 = load i32, ptr %495, align 4, !tbaa !5
  store i32 %496, ptr %6, align 4, !tbaa !5
  %497 = load i32, ptr %5, align 4, !tbaa !5
  %498 = load i32, ptr %6, align 4, !tbaa !5
  %499 = call i32 @FixedMul(i32 noundef %497, i32 noundef %498)
  store i32 %499, ptr @rw_offset, align 4, !tbaa !5
  %500 = load i32, ptr @rw_normalangle, align 4, !tbaa !5
  %501 = load i32, ptr @rw_angle1, align 4, !tbaa !5
  %502 = sub i32 %500, %501
  %503 = icmp ult i32 %502, -2147483648
  br i1 %503, label %504, label %507

504:                                              ; preds = %491
  %505 = load i32, ptr @rw_offset, align 4, !tbaa !5
  %506 = sub nsw i32 0, %505
  store i32 %506, ptr @rw_offset, align 4, !tbaa !5
  br label %507

507:                                              ; preds = %504, %491
  %508 = load ptr, ptr @sidedef, align 8, !tbaa !9
  %509 = getelementptr inbounds %struct.side_t, ptr %508, i32 0, i32 0
  %510 = load i32, ptr %509, align 8, !tbaa !48
  %511 = load ptr, ptr @curline, align 8, !tbaa !9
  %512 = getelementptr inbounds %struct.seg_t, ptr %511, i32 0, i32 2
  %513 = load i32, ptr %512, align 8, !tbaa !49
  %514 = add nsw i32 %510, %513
  %515 = load i32, ptr @rw_offset, align 4, !tbaa !5
  %516 = add nsw i32 %515, %514
  store i32 %516, ptr @rw_offset, align 4, !tbaa !5
  %517 = load i32, ptr @viewangle, align 4, !tbaa !5
  %518 = add i32 1073741824, %517
  %519 = load i32, ptr @rw_normalangle, align 4, !tbaa !5
  %520 = sub i32 %518, %519
  store i32 %520, ptr @rw_centerangle, align 4, !tbaa !5
  %521 = load ptr, ptr @fixedcolormap, align 8, !tbaa !9
  %522 = icmp ne ptr %521, null
  br i1 %522, label %576, label %523

523:                                              ; preds = %507
  %524 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %525 = getelementptr inbounds %struct.sector_t, ptr %524, i32 0, i32 4
  %526 = load i16, ptr %525, align 4, !tbaa !45
  %527 = sext i16 %526 to i32
  %528 = ashr i32 %527, 4
  %529 = load i32, ptr @extralight, align 4, !tbaa !5
  %530 = add nsw i32 %528, %529
  store i32 %530, ptr %10, align 4, !tbaa !5
  %531 = load ptr, ptr @curline, align 8, !tbaa !9
  %532 = getelementptr inbounds %struct.seg_t, ptr %531, i32 0, i32 0
  %533 = load ptr, ptr %532, align 8, !tbaa !18
  %534 = getelementptr inbounds %struct.vertex_t, ptr %533, i32 0, i32 1
  %535 = load i32, ptr %534, align 4, !tbaa !21
  %536 = load ptr, ptr @curline, align 8, !tbaa !9
  %537 = getelementptr inbounds %struct.seg_t, ptr %536, i32 0, i32 1
  %538 = load ptr, ptr %537, align 8, !tbaa !50
  %539 = getelementptr inbounds %struct.vertex_t, ptr %538, i32 0, i32 1
  %540 = load i32, ptr %539, align 4, !tbaa !21
  %541 = icmp eq i32 %535, %540
  br i1 %541, label %542, label %545

542:                                              ; preds = %523
  %543 = load i32, ptr %10, align 4, !tbaa !5
  %544 = add nsw i32 %543, -1
  store i32 %544, ptr %10, align 4, !tbaa !5
  br label %561

545:                                              ; preds = %523
  %546 = load ptr, ptr @curline, align 8, !tbaa !9
  %547 = getelementptr inbounds %struct.seg_t, ptr %546, i32 0, i32 0
  %548 = load ptr, ptr %547, align 8, !tbaa !18
  %549 = getelementptr inbounds %struct.vertex_t, ptr %548, i32 0, i32 0
  %550 = load i32, ptr %549, align 4, !tbaa !19
  %551 = load ptr, ptr @curline, align 8, !tbaa !9
  %552 = getelementptr inbounds %struct.seg_t, ptr %551, i32 0, i32 1
  %553 = load ptr, ptr %552, align 8, !tbaa !50
  %554 = getelementptr inbounds %struct.vertex_t, ptr %553, i32 0, i32 0
  %555 = load i32, ptr %554, align 4, !tbaa !19
  %556 = icmp eq i32 %550, %555
  br i1 %556, label %557, label %560

557:                                              ; preds = %545
  %558 = load i32, ptr %10, align 4, !tbaa !5
  %559 = add nsw i32 %558, 1
  store i32 %559, ptr %10, align 4, !tbaa !5
  br label %560

560:                                              ; preds = %557, %545
  br label %561

561:                                              ; preds = %560, %542
  %562 = load i32, ptr %10, align 4, !tbaa !5
  %563 = icmp slt i32 %562, 0
  br i1 %563, label %564, label %565

564:                                              ; preds = %561
  store ptr @scalelight, ptr @walllights, align 8, !tbaa !9
  br label %575

565:                                              ; preds = %561
  %566 = load i32, ptr %10, align 4, !tbaa !5
  %567 = icmp sge i32 %566, 16
  br i1 %567, label %568, label %569

568:                                              ; preds = %565
  store ptr getelementptr inbounds ([16 x [48 x ptr]], ptr @scalelight, i64 0, i64 15), ptr @walllights, align 8, !tbaa !9
  br label %574

569:                                              ; preds = %565
  %570 = load i32, ptr %10, align 4, !tbaa !5
  %571 = sext i32 %570 to i64
  %572 = getelementptr inbounds [16 x [48 x ptr]], ptr @scalelight, i64 0, i64 %571
  %573 = getelementptr inbounds [48 x ptr], ptr %572, i64 0, i64 0
  store ptr %573, ptr @walllights, align 8, !tbaa !9
  br label %574

574:                                              ; preds = %569, %568
  br label %575

575:                                              ; preds = %574, %564
  br label %576

576:                                              ; preds = %575, %507
  br label %577

577:                                              ; preds = %576, %468
  %578 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %579 = getelementptr inbounds %struct.sector_t, ptr %578, i32 0, i32 0
  %580 = load i32, ptr %579, align 8, !tbaa !33
  %581 = load i32, ptr @viewz, align 4, !tbaa !5
  %582 = icmp sge i32 %580, %581
  br i1 %582, label %583, label %584

583:                                              ; preds = %577
  store i32 0, ptr @markfloor, align 4, !tbaa !5
  br label %584

584:                                              ; preds = %583, %577
  %585 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %586 = getelementptr inbounds %struct.sector_t, ptr %585, i32 0, i32 1
  %587 = load i32, ptr %586, align 4, !tbaa !29
  %588 = load i32, ptr @viewz, align 4, !tbaa !5
  %589 = icmp sle i32 %587, %588
  br i1 %589, label %590, label %598

590:                                              ; preds = %584
  %591 = load ptr, ptr @frontsector, align 8, !tbaa !9
  %592 = getelementptr inbounds %struct.sector_t, ptr %591, i32 0, i32 3
  %593 = load i16, ptr %592, align 2, !tbaa !43
  %594 = sext i16 %593 to i32
  %595 = load i32, ptr @skyflatnum, align 4, !tbaa !5
  %596 = icmp ne i32 %594, %595
  br i1 %596, label %597, label %598

597:                                              ; preds = %590
  store i32 0, ptr @markceiling, align 4, !tbaa !5
  br label %598

598:                                              ; preds = %597, %590, %584
  %599 = load i32, ptr @worldtop, align 4, !tbaa !5
  %600 = ashr i32 %599, 4
  store i32 %600, ptr @worldtop, align 4, !tbaa !5
  %601 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %602 = ashr i32 %601, 4
  store i32 %602, ptr @worldbottom, align 4, !tbaa !5
  %603 = load i32, ptr @rw_scalestep, align 4, !tbaa !5
  %604 = load i32, ptr @worldtop, align 4, !tbaa !5
  %605 = call i32 @FixedMul(i32 noundef %603, i32 noundef %604)
  %606 = sub nsw i32 0, %605
  store i32 %606, ptr @topstep, align 4, !tbaa !5
  %607 = load i32, ptr @centeryfrac, align 4, !tbaa !5
  %608 = ashr i32 %607, 4
  %609 = load i32, ptr @worldtop, align 4, !tbaa !5
  %610 = load i32, ptr @rw_scale, align 4, !tbaa !5
  %611 = call i32 @FixedMul(i32 noundef %609, i32 noundef %610)
  %612 = sub nsw i32 %608, %611
  store i32 %612, ptr @topfrac, align 4, !tbaa !5
  %613 = load i32, ptr @rw_scalestep, align 4, !tbaa !5
  %614 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %615 = call i32 @FixedMul(i32 noundef %613, i32 noundef %614)
  %616 = sub nsw i32 0, %615
  store i32 %616, ptr @bottomstep, align 4, !tbaa !5
  %617 = load i32, ptr @centeryfrac, align 4, !tbaa !5
  %618 = ashr i32 %617, 4
  %619 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %620 = load i32, ptr @rw_scale, align 4, !tbaa !5
  %621 = call i32 @FixedMul(i32 noundef %619, i32 noundef %620)
  %622 = sub nsw i32 %618, %621
  store i32 %622, ptr @bottomfrac, align 4, !tbaa !5
  %623 = load ptr, ptr @backsector, align 8, !tbaa !9
  %624 = icmp ne ptr %623, null
  br i1 %624, label %625, label %660

625:                                              ; preds = %598
  %626 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %627 = ashr i32 %626, 4
  store i32 %627, ptr @worldhigh, align 4, !tbaa !5
  %628 = load i32, ptr @worldlow, align 4, !tbaa !5
  %629 = ashr i32 %628, 4
  store i32 %629, ptr @worldlow, align 4, !tbaa !5
  %630 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %631 = load i32, ptr @worldtop, align 4, !tbaa !5
  %632 = icmp slt i32 %630, %631
  br i1 %632, label %633, label %644

633:                                              ; preds = %625
  %634 = load i32, ptr @centeryfrac, align 4, !tbaa !5
  %635 = ashr i32 %634, 4
  %636 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %637 = load i32, ptr @rw_scale, align 4, !tbaa !5
  %638 = call i32 @FixedMul(i32 noundef %636, i32 noundef %637)
  %639 = sub nsw i32 %635, %638
  store i32 %639, ptr @pixhigh, align 4, !tbaa !5
  %640 = load i32, ptr @rw_scalestep, align 4, !tbaa !5
  %641 = load i32, ptr @worldhigh, align 4, !tbaa !5
  %642 = call i32 @FixedMul(i32 noundef %640, i32 noundef %641)
  %643 = sub nsw i32 0, %642
  store i32 %643, ptr @pixhighstep, align 4, !tbaa !5
  br label %644

644:                                              ; preds = %633, %625
  %645 = load i32, ptr @worldlow, align 4, !tbaa !5
  %646 = load i32, ptr @worldbottom, align 4, !tbaa !5
  %647 = icmp sgt i32 %645, %646
  br i1 %647, label %648, label %659

648:                                              ; preds = %644
  %649 = load i32, ptr @centeryfrac, align 4, !tbaa !5
  %650 = ashr i32 %649, 4
  %651 = load i32, ptr @worldlow, align 4, !tbaa !5
  %652 = load i32, ptr @rw_scale, align 4, !tbaa !5
  %653 = call i32 @FixedMul(i32 noundef %651, i32 noundef %652)
  %654 = sub nsw i32 %650, %653
  store i32 %654, ptr @pixlow, align 4, !tbaa !5
  %655 = load i32, ptr @rw_scalestep, align 4, !tbaa !5
  %656 = load i32, ptr @worldlow, align 4, !tbaa !5
  %657 = call i32 @FixedMul(i32 noundef %655, i32 noundef %656)
  %658 = sub nsw i32 0, %657
  store i32 %658, ptr @pixlowstep, align 4, !tbaa !5
  br label %659

659:                                              ; preds = %648, %644
  br label %660

660:                                              ; preds = %659, %598
  %661 = load i32, ptr @markceiling, align 4, !tbaa !5
  %662 = icmp ne i32 %661, 0
  br i1 %662, label %663, label %669

663:                                              ; preds = %660
  %664 = load ptr, ptr @ceilingplane, align 8, !tbaa !9
  %665 = load i32, ptr @rw_x, align 4, !tbaa !5
  %666 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %667 = sub nsw i32 %666, 1
  %668 = call ptr @R_CheckPlane(ptr noundef %664, i32 noundef %665, i32 noundef %667)
  store ptr %668, ptr @ceilingplane, align 8, !tbaa !9
  br label %669

669:                                              ; preds = %663, %660
  %670 = load i32, ptr @markfloor, align 4, !tbaa !5
  %671 = icmp ne i32 %670, 0
  br i1 %671, label %672, label %678

672:                                              ; preds = %669
  %673 = load ptr, ptr @floorplane, align 8, !tbaa !9
  %674 = load i32, ptr @rw_x, align 4, !tbaa !5
  %675 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %676 = sub nsw i32 %675, 1
  %677 = call ptr @R_CheckPlane(ptr noundef %673, i32 noundef %674, i32 noundef %676)
  store ptr %677, ptr @floorplane, align 8, !tbaa !9
  br label %678

678:                                              ; preds = %672, %669
  call void @R_RenderSegLoop()
  %679 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %680 = getelementptr inbounds %struct.drawseg_s, ptr %679, i32 0, i32 6
  %681 = load i32, ptr %680, align 4, !tbaa !38
  %682 = and i32 %681, 2
  %683 = icmp ne i32 %682, 0
  br i1 %683, label %687, label %684

684:                                              ; preds = %678
  %685 = load i32, ptr @maskedtexture, align 4, !tbaa !5
  %686 = icmp ne i32 %685, 0
  br i1 %686, label %687, label %715

687:                                              ; preds = %684, %678
  %688 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %689 = getelementptr inbounds %struct.drawseg_s, ptr %688, i32 0, i32 9
  %690 = load ptr, ptr %689, align 8, !tbaa !39
  %691 = icmp ne ptr %690, null
  br i1 %691, label %715, label %692

692:                                              ; preds = %687
  %693 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %694 = load i32, ptr %3, align 4, !tbaa !5
  %695 = sext i32 %694 to i64
  %696 = getelementptr inbounds i16, ptr @ceilingclip, i64 %695
  %697 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %698 = load i32, ptr %3, align 4, !tbaa !5
  %699 = sub nsw i32 %697, %698
  %700 = mul nsw i32 2, %699
  %701 = sext i32 %700 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %693, ptr align 2 %696, i64 %701, i1 false)
  %702 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %703 = load i32, ptr %3, align 4, !tbaa !5
  %704 = sext i32 %703 to i64
  %705 = sub i64 0, %704
  %706 = getelementptr inbounds i16, ptr %702, i64 %705
  %707 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %708 = getelementptr inbounds %struct.drawseg_s, ptr %707, i32 0, i32 9
  store ptr %706, ptr %708, align 8, !tbaa !39
  %709 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %710 = load i32, ptr %3, align 4, !tbaa !5
  %711 = sub nsw i32 %709, %710
  %712 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %713 = sext i32 %711 to i64
  %714 = getelementptr inbounds i16, ptr %712, i64 %713
  store ptr %714, ptr @lastopening, align 8, !tbaa !9
  br label %715

715:                                              ; preds = %692, %687, %684
  %716 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %717 = getelementptr inbounds %struct.drawseg_s, ptr %716, i32 0, i32 6
  %718 = load i32, ptr %717, align 4, !tbaa !38
  %719 = and i32 %718, 1
  %720 = icmp ne i32 %719, 0
  br i1 %720, label %724, label %721

721:                                              ; preds = %715
  %722 = load i32, ptr @maskedtexture, align 4, !tbaa !5
  %723 = icmp ne i32 %722, 0
  br i1 %723, label %724, label %752

724:                                              ; preds = %721, %715
  %725 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %726 = getelementptr inbounds %struct.drawseg_s, ptr %725, i32 0, i32 10
  %727 = load ptr, ptr %726, align 8, !tbaa !40
  %728 = icmp ne ptr %727, null
  br i1 %728, label %752, label %729

729:                                              ; preds = %724
  %730 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %731 = load i32, ptr %3, align 4, !tbaa !5
  %732 = sext i32 %731 to i64
  %733 = getelementptr inbounds i16, ptr @floorclip, i64 %732
  %734 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %735 = load i32, ptr %3, align 4, !tbaa !5
  %736 = sub nsw i32 %734, %735
  %737 = mul nsw i32 2, %736
  %738 = sext i32 %737 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %730, ptr align 2 %733, i64 %738, i1 false)
  %739 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %740 = load i32, ptr %3, align 4, !tbaa !5
  %741 = sext i32 %740 to i64
  %742 = sub i64 0, %741
  %743 = getelementptr inbounds i16, ptr %739, i64 %742
  %744 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %745 = getelementptr inbounds %struct.drawseg_s, ptr %744, i32 0, i32 10
  store ptr %743, ptr %745, align 8, !tbaa !40
  %746 = load i32, ptr @rw_stopx, align 4, !tbaa !5
  %747 = load i32, ptr %3, align 4, !tbaa !5
  %748 = sub nsw i32 %746, %747
  %749 = load ptr, ptr @lastopening, align 8, !tbaa !9
  %750 = sext i32 %748 to i64
  %751 = getelementptr inbounds i16, ptr %749, i64 %750
  store ptr %751, ptr @lastopening, align 8, !tbaa !9
  br label %752

752:                                              ; preds = %729, %724, %721
  %753 = load i32, ptr @maskedtexture, align 4, !tbaa !5
  %754 = icmp ne i32 %753, 0
  br i1 %754, label %755, label %768

755:                                              ; preds = %752
  %756 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %757 = getelementptr inbounds %struct.drawseg_s, ptr %756, i32 0, i32 6
  %758 = load i32, ptr %757, align 4, !tbaa !38
  %759 = and i32 %758, 2
  %760 = icmp ne i32 %759, 0
  br i1 %760, label %768, label %761

761:                                              ; preds = %755
  %762 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %763 = getelementptr inbounds %struct.drawseg_s, ptr %762, i32 0, i32 6
  %764 = load i32, ptr %763, align 4, !tbaa !38
  %765 = or i32 %764, 2
  store i32 %765, ptr %763, align 4, !tbaa !38
  %766 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %767 = getelementptr inbounds %struct.drawseg_s, ptr %766, i32 0, i32 8
  store i32 -2147483648, ptr %767, align 4, !tbaa !42
  br label %768

768:                                              ; preds = %761, %755, %752
  %769 = load i32, ptr @maskedtexture, align 4, !tbaa !5
  %770 = icmp ne i32 %769, 0
  br i1 %770, label %771, label %784

771:                                              ; preds = %768
  %772 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %773 = getelementptr inbounds %struct.drawseg_s, ptr %772, i32 0, i32 6
  %774 = load i32, ptr %773, align 4, !tbaa !38
  %775 = and i32 %774, 1
  %776 = icmp ne i32 %775, 0
  br i1 %776, label %784, label %777

777:                                              ; preds = %771
  %778 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %779 = getelementptr inbounds %struct.drawseg_s, ptr %778, i32 0, i32 6
  %780 = load i32, ptr %779, align 4, !tbaa !38
  %781 = or i32 %780, 1
  store i32 %781, ptr %779, align 4, !tbaa !38
  %782 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %783 = getelementptr inbounds %struct.drawseg_s, ptr %782, i32 0, i32 7
  store i32 2147483647, ptr %783, align 8, !tbaa !41
  br label %784

784:                                              ; preds = %777, %771, %768
  %785 = load ptr, ptr @ds_p, align 8, !tbaa !9
  %786 = getelementptr inbounds %struct.drawseg_s, ptr %785, i32 1
  store ptr %786, ptr @ds_p, align 8, !tbaa !9
  store i32 0, ptr %11, align 4
  br label %787

787:                                              ; preds = %784, %14
  call void @llvm.lifetime.end.p0(i64 4, 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
  %788 = load i32, ptr %11, align 4
  switch i32 %788, label %790 [
    i32 0, label %789
    i32 1, label %789
  ]

789:                                              ; preds = %787, %787
  ret void

790:                                              ; preds = %787
  unreachable
}

; Function Attrs: noreturn
declare void @I_Error(ptr noundef, ...) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

declare i32 @R_PointToDist(i32 noundef, i32 noundef) #5

declare i32 @R_ScaleFromGlobalAngle(i32 noundef) #5

declare ptr @R_CheckPlane(ptr noundef, i32 noundef, i32 noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }

!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 24}
!12 = !{!"", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!13 = !{!12, !10, i64 32}
!14 = !{!15, !16, i64 24}
!15 = !{!"line_s", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !16, i64 24, !16, i64 26, !16, i64 28, !7, i64 30, !7, i64 36, !6, i64 52, !10, i64 56, !10, i64 64, !6, i64 72, !10, i64 80}
!16 = !{!"short", !7, i64 0}
!17 = !{!12, !6, i64 20}
!18 = !{!12, !10, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"", !6, i64 0, !6, i64 4}
!21 = !{!20, !6, i64 4}
!22 = !{!23, !6, i64 8}
!23 = !{!"drawseg_s", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !10, i64 40, !10, i64 48, !10, i64 56}
!24 = !{!23, !6, i64 12}
!25 = !{!23, !10, i64 0}
!26 = !{!23, !6, i64 16}
!27 = !{!23, !6, i64 20}
!28 = !{!23, !6, i64 24}
!29 = !{!30, !6, i64 4}
!30 = !{!"", !6, i64 0, !6, i64 4, !16, i64 8, !16, i64 10, !16, i64 12, !16, i64 14, !16, i64 16, !6, i64 20, !10, i64 24, !7, i64 32, !31, i64 48, !6, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !10, i64 120}
!31 = !{!"", !32, i64 0, !6, i64 24, !6, i64 28, !6, i64 32}
!32 = !{!"thinker_s", !10, i64 0, !10, i64 8, !7, i64 16}
!33 = !{!30, !6, i64 0}
!34 = !{!23, !10, i64 56}
!35 = !{!36, !16, i64 12}
!36 = !{!"", !6, i64 0, !6, i64 4, !16, i64 8, !16, i64 10, !16, i64 12, !10, i64 16}
!37 = !{!36, !6, i64 4}
!38 = !{!23, !6, i64 28}
!39 = !{!23, !10, i64 40}
!40 = !{!23, !10, i64 48}
!41 = !{!23, !6, i64 32}
!42 = !{!23, !6, i64 36}
!43 = !{!30, !16, i64 10}
!44 = !{!30, !16, i64 8}
!45 = !{!30, !16, i64 12}
!46 = !{!36, !16, i64 8}
!47 = !{!36, !16, i64 10}
!48 = !{!36, !6, i64 0}
!49 = !{!12, !6, i64 16}
!50 = !{!12, !10, i64 8}


; 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.drawseg_s = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }

@curline = external local_unnamed_addr global ptr, align 8
@frontsector = external local_unnamed_addr global ptr, align 8
@backsector = external local_unnamed_addr global ptr, align 8
@texturetranslation = external local_unnamed_addr global ptr, align 8
@extralight = external local_unnamed_addr global i32, align 4
@scalelight = external global [16 x [48 x ptr]], align 16
@walllights = external dso_local local_unnamed_addr global ptr, align 8
@maskedtexturecol = external dso_local local_unnamed_addr global ptr, align 8
@rw_scalestep = external dso_local local_unnamed_addr global i32, align 4
@textureheight = external local_unnamed_addr global ptr, align 8
@viewz = external local_unnamed_addr global i32, align 4
@fixedcolormap = external local_unnamed_addr global ptr, align 8
@centeryfrac = external local_unnamed_addr global i32, align 4
@rw_x = external dso_local local_unnamed_addr global i32, align 4
@rw_stopx = external dso_local local_unnamed_addr global i32, align 4
@topfrac = external dso_local local_unnamed_addr global i32, align 4
@ceilingclip = external local_unnamed_addr global [320 x i16], align 16
@markceiling = external dso_local local_unnamed_addr global i32, align 4
@floorclip = external local_unnamed_addr global [320 x i16], align 16
@ceilingplane = external local_unnamed_addr global ptr, align 8
@bottomfrac = external dso_local local_unnamed_addr global i32, align 4
@markfloor = external dso_local local_unnamed_addr global i32, align 4
@floorplane = external local_unnamed_addr global ptr, align 8
@segtextured = external dso_local local_unnamed_addr global i32, align 4
@rw_centerangle = external dso_local local_unnamed_addr global i32, align 4
@xtoviewangle = external local_unnamed_addr global [321 x i32], align 16
@rw_offset = external dso_local local_unnamed_addr global i32, align 4
@rw_distance = external dso_local local_unnamed_addr global i32, align 4
@rw_scale = external dso_local local_unnamed_addr global i32, align 4
@midtexture = external dso_local local_unnamed_addr global i32, align 4
@rw_midtexturemid = external dso_local local_unnamed_addr global i32, align 4
@toptexture = external dso_local local_unnamed_addr global i32, align 4
@pixhigh = external dso_local local_unnamed_addr global i32, align 4
@pixhighstep = external dso_local local_unnamed_addr global i32, align 4
@rw_toptexturemid = external dso_local local_unnamed_addr global i32, align 4
@bottomtexture = external dso_local local_unnamed_addr global i32, align 4
@pixlow = external dso_local local_unnamed_addr global i32, align 4
@pixlowstep = external dso_local local_unnamed_addr global i32, align 4
@rw_bottomtexturemid = external dso_local local_unnamed_addr global i32, align 4
@maskedtexture = external dso_local local_unnamed_addr global i32, align 4
@topstep = external dso_local local_unnamed_addr global i32, align 4
@bottomstep = external dso_local local_unnamed_addr global i32, align 4
@ds_p = external local_unnamed_addr global ptr, align 8
@drawsegs = external global [256 x %struct.drawseg_s], align 16
@viewwidth = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@sidedef = external local_unnamed_addr global ptr, align 8
@linedef = external local_unnamed_addr global ptr, align 8
@rw_normalangle = external dso_local local_unnamed_addr global i32, align 4
@rw_angle1 = external dso_local local_unnamed_addr global i32, align 4
@finesine = external local_unnamed_addr global [10240 x i32], align 16
@viewangle = external local_unnamed_addr global i32, align 4
@worldtop = external dso_local local_unnamed_addr global i32, align 4
@worldbottom = external dso_local local_unnamed_addr global i32, align 4
@screenheightarray = external global [320 x i16], align 16
@negonearray = external global [320 x i16], align 16
@worldhigh = external dso_local local_unnamed_addr global i32, align 4
@worldlow = external dso_local local_unnamed_addr global i32, align 4
@skyflatnum = external local_unnamed_addr global i32, align 4
@lastopening = external local_unnamed_addr global ptr, align 8

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @FixedMul(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @R_RenderSegLoop() local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @R_StoreWallRange(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %4 = icmp eq ptr %3, getelementptr inbounds (i8, ptr @drawsegs, i64 16384)
  br i1 %4, label %443, label %5

5:                                                ; preds = %2
  %6 = load i32, ptr @viewwidth, align 4, !tbaa !9
  %.not = icmp sle i32 %6, %0
  %7 = icmp sgt i32 %0, %1
  %or.cond84 = or i1 %7, %.not
  br i1 %or.cond84, label %8, label %9

8:                                                ; preds = %5
  tail call void (ptr, ...) @I_Error(ptr noundef nonnull @.str, i32 noundef %0, i32 noundef %1) #8
  unreachable

9:                                                ; preds = %5
  %10 = load ptr, ptr @curline, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %10, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  store ptr %12, ptr @sidedef, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %10, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  store ptr %14, ptr @linedef, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load i16, ptr %15, align 8, !tbaa !14
  %17 = or i16 %16, 256
  store i16 %17, ptr %15, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %10, i64 20
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = add i32 %19, 1073741824
  store i32 %20, ptr @rw_normalangle, align 4, !tbaa !9
  %21 = load i32, ptr @rw_angle1, align 4, !tbaa !9
  %22 = sub nsw i32 %20, %21
  %23 = tail call i32 @llvm.abs.i32(i32 %22, i1 true)
  %24 = tail call i32 @llvm.usub.sat.i32(i32 1073741824, i32 %23)
  %25 = load ptr, ptr %10, align 8, !tbaa !18
  %26 = load i32, ptr %25, align 4, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %25, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !21
  %29 = tail call i32 @R_PointToDist(i32 noundef %26, i32 noundef %28) #9
  %30 = lshr i32 %24, 19
  %31 = zext nneg i32 %30 to i64
  %32 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = tail call i32 @FixedMul(i32 noundef %29, i32 noundef %33)
  store i32 %34, ptr @rw_distance, align 4, !tbaa !9
  store i32 %0, ptr @rw_x, align 4, !tbaa !9
  %35 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  store i32 %0, ptr %36, align 8, !tbaa !22
  %37 = getelementptr inbounds i8, ptr %35, i64 12
  store i32 %1, ptr %37, align 4, !tbaa !24
  %38 = load ptr, ptr @curline, align 8, !tbaa !5
  store ptr %38, ptr %35, align 8, !tbaa !25
  %39 = add nsw i32 %1, 1
  store i32 %39, ptr @rw_stopx, align 4, !tbaa !9
  %40 = load i32, ptr @viewangle, align 4, !tbaa !9
  %41 = sext i32 %0 to i64
  %42 = getelementptr inbounds [321 x i32], ptr @xtoviewangle, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = add i32 %43, %40
  %45 = tail call i32 @R_ScaleFromGlobalAngle(i32 noundef %44) #9
  store i32 %45, ptr @rw_scale, align 4, !tbaa !9
  %46 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store i32 %45, ptr %47, align 8, !tbaa !26
  %48 = icmp sgt i32 %1, %0
  br i1 %48, label %49, label %63

49:                                               ; preds = %9
  %50 = load i32, ptr @viewangle, align 4, !tbaa !9
  %51 = sext i32 %1 to i64
  %52 = getelementptr inbounds [321 x i32], ptr @xtoviewangle, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = add i32 %53, %50
  %55 = tail call i32 @R_ScaleFromGlobalAngle(i32 noundef %54) #9
  %56 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 20
  store i32 %55, ptr %57, align 4, !tbaa !27
  %58 = load i32, ptr @rw_scale, align 4, !tbaa !9
  %59 = sub nsw i32 %55, %58
  %60 = sub nsw i32 %1, %0
  %61 = sdiv i32 %59, %60
  store i32 %61, ptr @rw_scalestep, align 4, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %56, i64 24
  store i32 %61, ptr %62, align 8, !tbaa !28
  br label %65

63:                                               ; preds = %9
  %64 = getelementptr inbounds i8, ptr %46, i64 20
  store i32 %45, ptr %64, align 4, !tbaa !27
  br label %65

65:                                               ; preds = %63, %49
  %66 = phi ptr [ %46, %63 ], [ %56, %49 ]
  %67 = load ptr, ptr @frontsector, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !29
  %70 = load i32, ptr @viewz, align 4, !tbaa !9
  %71 = sub nsw i32 %69, %70
  store i32 %71, ptr @worldtop, align 4, !tbaa !9
  %72 = load i32, ptr %67, align 8, !tbaa !33
  %73 = sub nsw i32 %72, %70
  store i32 %73, ptr @worldbottom, align 4, !tbaa !9
  store i32 0, ptr @maskedtexture, align 4, !tbaa !9
  store i32 0, ptr @bottomtexture, align 4, !tbaa !9
  store i32 0, ptr @toptexture, align 4, !tbaa !9
  store i32 0, ptr @midtexture, align 4, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %66, i64 56
  store ptr null, ptr %74, align 8, !tbaa !34
  %75 = load ptr, ptr @backsector, align 8, !tbaa !5
  %.not53 = icmp eq ptr %75, null
  br i1 %.not53, label %76, label %104

76:                                               ; preds = %65
  %77 = load ptr, ptr @texturetranslation, align 8, !tbaa !5
  %78 = load ptr, ptr @sidedef, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 12
  %80 = load i16, ptr %79, align 4, !tbaa !35
  %81 = sext i16 %80 to i64
  %82 = getelementptr inbounds i32, ptr %77, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !9
  store i32 %83, ptr @midtexture, align 4, !tbaa !9
  store i32 1, ptr @markceiling, align 4, !tbaa !9
  store i32 1, ptr @markfloor, align 4, !tbaa !9
  %84 = load ptr, ptr @linedef, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 24
  %86 = load i16, ptr %85, align 8, !tbaa !14
  %87 = and i16 %86, 16
  %.not54 = icmp eq i16 %87, 0
  br i1 %.not54, label %95, label %88

88:                                               ; preds = %76
  %89 = load i32, ptr %67, align 8, !tbaa !33
  %90 = load ptr, ptr @textureheight, align 8, !tbaa !5
  %91 = getelementptr inbounds i32, ptr %90, i64 %81
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = sub i32 %89, %70
  %94 = add i32 %93, %92
  br label %95

95:                                               ; preds = %76, %88
  %storemerge = phi i32 [ %94, %88 ], [ %71, %76 ]
  %96 = getelementptr inbounds i8, ptr %78, i64 4
  %97 = load i32, ptr %96, align 4, !tbaa !37
  %98 = add nsw i32 %97, %storemerge
  store i32 %98, ptr @rw_midtexturemid, align 4, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %66, i64 28
  store i32 3, ptr %99, align 4, !tbaa !38
  %100 = getelementptr inbounds i8, ptr %66, i64 40
  store ptr @screenheightarray, ptr %100, align 8, !tbaa !39
  %101 = getelementptr inbounds i8, ptr %66, i64 48
  store ptr @negonearray, ptr %101, align 8, !tbaa !40
  %102 = getelementptr inbounds i8, ptr %66, i64 32
  store i32 2147483647, ptr %102, align 8, !tbaa !41
  %103 = getelementptr inbounds i8, ptr %66, i64 36
  store i32 -2147483648, ptr %103, align 4, !tbaa !42
  br label %225

104:                                              ; preds = %65
  %105 = getelementptr inbounds i8, ptr %66, i64 48
  %106 = getelementptr inbounds i8, ptr %66, i64 40
  %107 = getelementptr inbounds i8, ptr %66, i64 28
  store i32 0, ptr %107, align 4, !tbaa !38
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %106, i8 0, i64 16, i1 false)
  %108 = load i32, ptr %67, align 8, !tbaa !33
  %109 = load i32, ptr %75, align 8, !tbaa !33
  %110 = icmp sgt i32 %108, %109
  br i1 %110, label %.sink.split, label %111

111:                                              ; preds = %104
  %112 = icmp sgt i32 %109, %70
  br i1 %112, label %.sink.split, label %114

.sink.split:                                      ; preds = %111, %104
  %.sink = phi i32 [ %108, %104 ], [ 2147483647, %111 ]
  store i32 1, ptr %107, align 4, !tbaa !38
  %113 = getelementptr inbounds i8, ptr %66, i64 32
  store i32 %.sink, ptr %113, align 8, !tbaa !41
  br label %114

114:                                              ; preds = %.sink.split, %111
  %115 = phi i32 [ 0, %111 ], [ 1, %.sink.split ]
  %116 = getelementptr inbounds i8, ptr %75, i64 4
  %117 = load i32, ptr %116, align 4, !tbaa !29
  %118 = icmp slt i32 %69, %117
  br i1 %118, label %.sink.split100, label %119

119:                                              ; preds = %114
  %120 = icmp slt i32 %117, %70
  br i1 %120, label %.sink.split100, label %123

.sink.split100:                                   ; preds = %119, %114
  %.sink101 = phi i32 [ %69, %114 ], [ -2147483648, %119 ]
  %121 = or disjoint i32 %115, 2
  store i32 %121, ptr %107, align 4, !tbaa !38
  %122 = getelementptr inbounds i8, ptr %66, i64 36
  store i32 %.sink101, ptr %122, align 4, !tbaa !42
  br label %123

123:                                              ; preds = %.sink.split100, %119
  %124 = phi i32 [ %115, %119 ], [ %121, %.sink.split100 ]
  %.not55 = icmp sgt i32 %117, %108
  br i1 %.not55, label %128, label %125

125:                                              ; preds = %123
  store ptr @negonearray, ptr %105, align 8, !tbaa !40
  %126 = getelementptr inbounds i8, ptr %66, i64 32
  store i32 2147483647, ptr %126, align 8, !tbaa !41
  %127 = or i32 %124, 1
  store i32 %127, ptr %107, align 4, !tbaa !38
  br label %128

128:                                              ; preds = %125, %123
  %129 = phi i32 [ %127, %125 ], [ %124, %123 ]
  %.not56 = icmp slt i32 %109, %69
  br i1 %.not56, label %133, label %130

130:                                              ; preds = %128
  store ptr @screenheightarray, ptr %106, align 8, !tbaa !39
  %131 = getelementptr inbounds i8, ptr %66, i64 36
  store i32 -2147483648, ptr %131, align 4, !tbaa !42
  %132 = or i32 %129, 2
  store i32 %132, ptr %107, align 4, !tbaa !38
  br label %133

133:                                              ; preds = %130, %128
  %134 = sub i32 %117, %70
  store i32 %134, ptr @worldhigh, align 4, !tbaa !9
  %135 = load i32, ptr %75, align 8, !tbaa !33
  %136 = sub nsw i32 %135, %70
  store i32 %136, ptr @worldlow, align 4, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %67, i64 10
  %138 = load i16, ptr %137, align 2, !tbaa !43
  %139 = sext i16 %138 to i32
  %140 = load i32, ptr @skyflatnum, align 4, !tbaa !9
  %141 = icmp eq i32 %140, %139
  br i1 %141, label %142, label %147

142:                                              ; preds = %133
  %143 = getelementptr inbounds i8, ptr %75, i64 10
  %144 = load i16, ptr %143, align 2, !tbaa !43
  %145 = icmp eq i16 %138, %144
  br i1 %145, label %146, label %147

146:                                              ; preds = %142
  store i32 %134, ptr @worldtop, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %146, %142, %133
  %148 = phi i32 [ %134, %146 ], [ %71, %142 ], [ %71, %133 ]
  %.not57 = icmp eq i32 %135, %72
  br i1 %.not57, label %149, label %159

149:                                              ; preds = %147
  %150 = getelementptr inbounds i8, ptr %75, i64 8
  %151 = load i16, ptr %150, align 8, !tbaa !44
  %152 = getelementptr inbounds i8, ptr %67, i64 8
  %153 = load i16, ptr %152, align 8, !tbaa !44
  %.not58 = icmp eq i16 %151, %153
  br i1 %.not58, label %154, label %159

154:                                              ; preds = %149
  %155 = getelementptr inbounds i8, ptr %75, i64 12
  %156 = load i16, ptr %155, align 4, !tbaa !45
  %157 = getelementptr inbounds i8, ptr %67, i64 12
  %158 = load i16, ptr %157, align 4, !tbaa !45
  %.not59 = icmp ne i16 %156, %158
  %spec.select86 = zext i1 %.not59 to i32
  br label %159

159:                                              ; preds = %154, %147, %149
  %storemerge60 = phi i32 [ 1, %149 ], [ 1, %147 ], [ %spec.select86, %154 ]
  store i32 %storemerge60, ptr @markfloor, align 4, !tbaa !9
  %.not61 = icmp eq i32 %134, %148
  br i1 %.not61, label %160, label %168

160:                                              ; preds = %159
  %161 = getelementptr inbounds i8, ptr %75, i64 10
  %162 = load i16, ptr %161, align 2, !tbaa !43
  %.not62 = icmp eq i16 %162, %138
  br i1 %.not62, label %163, label %168

163:                                              ; preds = %160
  %164 = getelementptr inbounds i8, ptr %75, i64 12
  %165 = load i16, ptr %164, align 4, !tbaa !45
  %166 = getelementptr inbounds i8, ptr %67, i64 12
  %167 = load i16, ptr %166, align 4, !tbaa !45
  %.not63 = icmp ne i16 %165, %167
  %spec.select87 = zext i1 %.not63 to i32
  br label %168

168:                                              ; preds = %163, %159, %160
  %storemerge64 = phi i32 [ 1, %160 ], [ 1, %159 ], [ %spec.select87, %163 ]
  store i32 %storemerge64, ptr @markceiling, align 4, !tbaa !9
  %169 = load i32, ptr %67, align 8, !tbaa !33
  %.not65 = icmp sgt i32 %117, %169
  br i1 %.not65, label %170, label %172

170:                                              ; preds = %168
  %171 = load i32, ptr %75, align 8, !tbaa !33
  %.not66 = icmp slt i32 %171, %69
  br i1 %.not66, label %173, label %172

172:                                              ; preds = %170, %168
  store i32 1, ptr @markfloor, align 4, !tbaa !9
  store i32 1, ptr @markceiling, align 4, !tbaa !9
  br label %173

173:                                              ; preds = %172, %170
  %174 = icmp slt i32 %134, %148
  %.pre.pre = load ptr, ptr @sidedef, align 8, !tbaa !5
  br i1 %174, label %175, label %191

175:                                              ; preds = %173
  %176 = load ptr, ptr @texturetranslation, align 8, !tbaa !5
  %177 = getelementptr inbounds i8, ptr %.pre.pre, i64 8
  %178 = load i16, ptr %177, align 8, !tbaa !46
  %179 = sext i16 %178 to i64
  %180 = getelementptr inbounds i32, ptr %176, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !9
  store i32 %181, ptr @toptexture, align 4, !tbaa !9
  %182 = load ptr, ptr @linedef, align 8, !tbaa !5
  %183 = getelementptr inbounds i8, ptr %182, i64 24
  %184 = load i16, ptr %183, align 8, !tbaa !14
  %185 = and i16 %184, 8
  %.not67 = icmp eq i16 %185, 0
  br i1 %.not67, label %186, label %.sink.split104

186:                                              ; preds = %175
  %187 = load ptr, ptr @textureheight, align 8, !tbaa !5
  %188 = getelementptr inbounds i32, ptr %187, i64 %179
  %189 = load i32, ptr %188, align 4, !tbaa !9
  %190 = add i32 %134, %189
  br label %.sink.split104

.sink.split104:                                   ; preds = %175, %186
  %.sink105 = phi i32 [ %190, %186 ], [ %148, %175 ]
  store i32 %.sink105, ptr @rw_toptexturemid, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %.sink.split104, %173
  %192 = phi i32 [ 0, %173 ], [ %181, %.sink.split104 ]
  %193 = icmp sgt i32 %135, %72
  br i1 %193, label %194, label %._crit_edge

._crit_edge:                                      ; preds = %191
  %.pre93 = load i32, ptr @rw_bottomtexturemid, align 4, !tbaa !9
  br label %205

194:                                              ; preds = %191
  %195 = load ptr, ptr @texturetranslation, align 8, !tbaa !5
  %196 = getelementptr inbounds i8, ptr %.pre.pre, i64 10
  %197 = load i16, ptr %196, align 2, !tbaa !47
  %198 = sext i16 %197 to i64
  %199 = getelementptr inbounds i32, ptr %195, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !9
  store i32 %200, ptr @bottomtexture, align 4, !tbaa !9
  %201 = load ptr, ptr @linedef, align 8, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %201, i64 24
  %203 = load i16, ptr %202, align 8, !tbaa !14
  %204 = and i16 %203, 16
  %.not68 = icmp eq i16 %204, 0
  %. = select i1 %.not68, i32 %136, i32 %148
  br label %205

205:                                              ; preds = %194, %._crit_edge
  %206 = phi i32 [ 0, %._crit_edge ], [ %200, %194 ]
  %207 = phi i32 [ %.pre93, %._crit_edge ], [ %., %194 ]
  %208 = getelementptr inbounds i8, ptr %.pre.pre, i64 4
  %209 = load i32, ptr %208, align 4, !tbaa !37
  %210 = load i32, ptr @rw_toptexturemid, align 4, !tbaa !9
  %211 = add nsw i32 %210, %209
  store i32 %211, ptr @rw_toptexturemid, align 4, !tbaa !9
  %212 = add nsw i32 %207, %209
  store i32 %212, ptr @rw_bottomtexturemid, align 4, !tbaa !9
  %213 = getelementptr inbounds i8, ptr %.pre.pre, i64 12
  %214 = load i16, ptr %213, align 4, !tbaa !35
  %.not69 = icmp eq i16 %214, 0
  br i1 %.not69, label %225, label %215

215:                                              ; preds = %205
  store i32 1, ptr @maskedtexture, align 4, !tbaa !9
  %216 = load ptr, ptr @lastopening, align 8, !tbaa !5
  %217 = load i32, ptr @rw_x, align 4, !tbaa !9
  %218 = sext i32 %217 to i64
  %219 = sub nsw i64 0, %218
  %220 = getelementptr inbounds i16, ptr %216, i64 %219
  store ptr %220, ptr @maskedtexturecol, align 8, !tbaa !5
  store ptr %220, ptr %74, align 8, !tbaa !34
  %221 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %222 = sub nsw i32 %221, %217
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i16, ptr %216, i64 %223
  store ptr %224, ptr @lastopening, align 8, !tbaa !5
  br label %225

225:                                              ; preds = %205, %215, %95
  %226 = phi i32 [ 0, %205 ], [ 1, %215 ], [ 0, %95 ]
  %227 = phi i32 [ %206, %205 ], [ %206, %215 ], [ 0, %95 ]
  %228 = phi i32 [ %192, %205 ], [ %192, %215 ], [ %83, %95 ]
  %229 = or i32 %228, %227
  %230 = or i32 %229, %226
  store i32 %230, ptr @segtextured, align 4, !tbaa !9
  %.not70 = icmp eq i32 %230, 0
  br i1 %.not70, label %287, label %231

231:                                              ; preds = %225
  %232 = load i32, ptr @rw_normalangle, align 4, !tbaa !9
  %233 = load i32, ptr @rw_angle1, align 4, !tbaa !9
  %234 = sub i32 %232, %233
  %235 = icmp ugt i32 %234, -2147483648
  %236 = sub nsw i32 0, %234
  %spec.select = select i1 %235, i32 %236, i32 %234
  %spec.store.select1 = tail call i32 @llvm.umin.i32(i32 %spec.select, i32 1073741824)
  %237 = lshr i32 %spec.store.select1, 19
  %238 = zext nneg i32 %237 to i64
  %239 = getelementptr inbounds [10240 x i32], ptr @finesine, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !9
  %241 = tail call i32 @FixedMul(i32 noundef %29, i32 noundef %240)
  store i32 %241, ptr @rw_offset, align 4, !tbaa !9
  %242 = load i32, ptr @rw_normalangle, align 4, !tbaa !9
  %243 = load i32, ptr @rw_angle1, align 4, !tbaa !9
  %244 = sub i32 %242, %243
  %245 = icmp sgt i32 %244, -1
  br i1 %245, label %246, label %248

246:                                              ; preds = %231
  %247 = sub nsw i32 0, %241
  store i32 %247, ptr @rw_offset, align 4, !tbaa !9
  br label %248

248:                                              ; preds = %246, %231
  %249 = phi i32 [ %247, %246 ], [ %241, %231 ]
  %250 = load ptr, ptr @sidedef, align 8, !tbaa !5
  %251 = load i32, ptr %250, align 8, !tbaa !48
  %252 = load ptr, ptr @curline, align 8, !tbaa !5
  %253 = getelementptr inbounds i8, ptr %252, i64 16
  %254 = load i32, ptr %253, align 8, !tbaa !49
  %255 = add nsw i32 %254, %251
  %256 = add nsw i32 %255, %249
  store i32 %256, ptr @rw_offset, align 4, !tbaa !9
  %257 = load i32, ptr @viewangle, align 4, !tbaa !9
  %reass.sub = sub i32 %257, %242
  %258 = add i32 %reass.sub, 1073741824
  store i32 %258, ptr @rw_centerangle, align 4, !tbaa !9
  %259 = load ptr, ptr @fixedcolormap, align 8, !tbaa !5
  %.not71 = icmp eq ptr %259, null
  %.pre94 = load ptr, ptr @frontsector, align 8, !tbaa !5
  br i1 %.not71, label %260, label %287

260:                                              ; preds = %248
  %261 = getelementptr inbounds i8, ptr %.pre94, i64 12
  %262 = load i16, ptr %261, align 4, !tbaa !45
  %263 = ashr i16 %262, 4
  %264 = sext i16 %263 to i32
  %265 = load i32, ptr @extralight, align 4, !tbaa !9
  %266 = add nsw i32 %265, %264
  %267 = load ptr, ptr %252, align 8, !tbaa !18
  %268 = getelementptr inbounds i8, ptr %267, i64 4
  %269 = load i32, ptr %268, align 4, !tbaa !21
  %270 = getelementptr inbounds i8, ptr %252, i64 8
  %271 = load ptr, ptr %270, align 8, !tbaa !50
  %272 = getelementptr inbounds i8, ptr %271, i64 4
  %273 = load i32, ptr %272, align 4, !tbaa !21
  %274 = icmp eq i32 %269, %273
  br i1 %274, label %280, label %275

275:                                              ; preds = %260
  %276 = load i32, ptr %267, align 4, !tbaa !19
  %277 = load i32, ptr %271, align 4, !tbaa !19
  %278 = icmp eq i32 %276, %277
  %279 = zext i1 %278 to i32
  br label %280

280:                                              ; preds = %260, %275
  %.sink106 = phi i32 [ %279, %275 ], [ -1, %260 ]
  %spec.select85 = add nsw i32 %266, %.sink106
  %281 = icmp slt i32 %spec.select85, 0
  br i1 %281, label %.sink.split107, label %282

282:                                              ; preds = %280
  %283 = icmp ugt i32 %spec.select85, 15
  br i1 %283, label %.sink.split107, label %284

284:                                              ; preds = %282
  %285 = zext nneg i32 %spec.select85 to i64
  %286 = getelementptr inbounds [16 x [48 x ptr]], ptr @scalelight, i64 0, i64 %285
  br label %.sink.split107

.sink.split107:                                   ; preds = %282, %280, %284
  %.sink108 = phi ptr [ %286, %284 ], [ @scalelight, %280 ], [ getelementptr inbounds (i8, ptr @scalelight, i64 5760), %282 ]
  store ptr %.sink108, ptr @walllights, align 8, !tbaa !5
  br label %287

287:                                              ; preds = %.sink.split107, %248, %225
  %288 = phi ptr [ %.pre94, %248 ], [ %67, %225 ], [ %.pre94, %.sink.split107 ]
  %289 = load i32, ptr %288, align 8, !tbaa !33
  %290 = load i32, ptr @viewz, align 4, !tbaa !9
  %.not72 = icmp slt i32 %289, %290
  br i1 %.not72, label %292, label %291

291:                                              ; preds = %287
  store i32 0, ptr @markfloor, align 4, !tbaa !9
  br label %292

292:                                              ; preds = %291, %287
  %293 = getelementptr inbounds i8, ptr %288, i64 4
  %294 = load i32, ptr %293, align 4, !tbaa !29
  %.not73 = icmp sgt i32 %294, %290
  br i1 %.not73, label %301, label %295

295:                                              ; preds = %292
  %296 = getelementptr inbounds i8, ptr %288, i64 10
  %297 = load i16, ptr %296, align 2, !tbaa !43
  %298 = sext i16 %297 to i32
  %299 = load i32, ptr @skyflatnum, align 4, !tbaa !9
  %.not74 = icmp eq i32 %299, %298
  br i1 %.not74, label %301, label %300

300:                                              ; preds = %295
  store i32 0, ptr @markceiling, align 4, !tbaa !9
  br label %301

301:                                              ; preds = %300, %295, %292
  %302 = load i32, ptr @worldtop, align 4, !tbaa !9
  %303 = ashr i32 %302, 4
  store i32 %303, ptr @worldtop, align 4, !tbaa !9
  %304 = load i32, ptr @worldbottom, align 4, !tbaa !9
  %305 = ashr i32 %304, 4
  store i32 %305, ptr @worldbottom, align 4, !tbaa !9
  %306 = load i32, ptr @rw_scalestep, align 4, !tbaa !9
  %307 = tail call i32 @FixedMul(i32 noundef %306, i32 noundef %303)
  %308 = sub nsw i32 0, %307
  store i32 %308, ptr @topstep, align 4, !tbaa !9
  %309 = load i32, ptr @centeryfrac, align 4, !tbaa !9
  %310 = ashr i32 %309, 4
  %311 = load i32, ptr @worldtop, align 4, !tbaa !9
  %312 = load i32, ptr @rw_scale, align 4, !tbaa !9
  %313 = tail call i32 @FixedMul(i32 noundef %311, i32 noundef %312)
  %314 = sub nsw i32 %310, %313
  store i32 %314, ptr @topfrac, align 4, !tbaa !9
  %315 = load i32, ptr @rw_scalestep, align 4, !tbaa !9
  %316 = load i32, ptr @worldbottom, align 4, !tbaa !9
  %317 = tail call i32 @FixedMul(i32 noundef %315, i32 noundef %316)
  %318 = sub nsw i32 0, %317
  store i32 %318, ptr @bottomstep, align 4, !tbaa !9
  %319 = load i32, ptr @centeryfrac, align 4, !tbaa !9
  %320 = ashr i32 %319, 4
  %321 = load i32, ptr @worldbottom, align 4, !tbaa !9
  %322 = load i32, ptr @rw_scale, align 4, !tbaa !9
  %323 = tail call i32 @FixedMul(i32 noundef %321, i32 noundef %322)
  %324 = sub nsw i32 %320, %323
  store i32 %324, ptr @bottomfrac, align 4, !tbaa !9
  %325 = load ptr, ptr @backsector, align 8, !tbaa !5
  %.not75 = icmp eq ptr %325, null
  br i1 %.not75, label %357, label %326

326:                                              ; preds = %301
  %327 = load i32, ptr @worldhigh, align 4, !tbaa !9
  %328 = ashr i32 %327, 4
  store i32 %328, ptr @worldhigh, align 4, !tbaa !9
  %329 = load i32, ptr @worldlow, align 4, !tbaa !9
  %330 = ashr i32 %329, 4
  store i32 %330, ptr @worldlow, align 4, !tbaa !9
  %331 = load i32, ptr @worldtop, align 4, !tbaa !9
  %332 = icmp slt i32 %328, %331
  br i1 %332, label %333, label %343

333:                                              ; preds = %326
  %334 = load i32, ptr @centeryfrac, align 4, !tbaa !9
  %335 = ashr i32 %334, 4
  %336 = load i32, ptr @rw_scale, align 4, !tbaa !9
  %337 = tail call i32 @FixedMul(i32 noundef %328, i32 noundef %336)
  %338 = sub nsw i32 %335, %337
  store i32 %338, ptr @pixhigh, align 4, !tbaa !9
  %339 = load i32, ptr @rw_scalestep, align 4, !tbaa !9
  %340 = load i32, ptr @worldhigh, align 4, !tbaa !9
  %341 = tail call i32 @FixedMul(i32 noundef %339, i32 noundef %340)
  %342 = sub nsw i32 0, %341
  store i32 %342, ptr @pixhighstep, align 4, !tbaa !9
  %.pre95 = load i32, ptr @worldlow, align 4, !tbaa !9
  br label %343

343:                                              ; preds = %333, %326
  %344 = phi i32 [ %.pre95, %333 ], [ %330, %326 ]
  %345 = load i32, ptr @worldbottom, align 4, !tbaa !9
  %346 = icmp sgt i32 %344, %345
  br i1 %346, label %347, label %357

347:                                              ; preds = %343
  %348 = load i32, ptr @centeryfrac, align 4, !tbaa !9
  %349 = ashr i32 %348, 4
  %350 = load i32, ptr @rw_scale, align 4, !tbaa !9
  %351 = tail call i32 @FixedMul(i32 noundef %344, i32 noundef %350)
  %352 = sub nsw i32 %349, %351
  store i32 %352, ptr @pixlow, align 4, !tbaa !9
  %353 = load i32, ptr @rw_scalestep, align 4, !tbaa !9
  %354 = load i32, ptr @worldlow, align 4, !tbaa !9
  %355 = tail call i32 @FixedMul(i32 noundef %353, i32 noundef %354)
  %356 = sub nsw i32 0, %355
  store i32 %356, ptr @pixlowstep, align 4, !tbaa !9
  br label %357

357:                                              ; preds = %343, %347, %301
  %358 = load i32, ptr @markceiling, align 4, !tbaa !9
  %.not76 = icmp eq i32 %358, 0
  br i1 %.not76, label %365, label %359

359:                                              ; preds = %357
  %360 = load ptr, ptr @ceilingplane, align 8, !tbaa !5
  %361 = load i32, ptr @rw_x, align 4, !tbaa !9
  %362 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %363 = add nsw i32 %362, -1
  %364 = tail call ptr @R_CheckPlane(ptr noundef %360, i32 noundef %361, i32 noundef %363) #9
  store ptr %364, ptr @ceilingplane, align 8, !tbaa !5
  br label %365

365:                                              ; preds = %359, %357
  %366 = load i32, ptr @markfloor, align 4, !tbaa !9
  %.not77 = icmp eq i32 %366, 0
  br i1 %.not77, label %373, label %367

367:                                              ; preds = %365
  %368 = load ptr, ptr @floorplane, align 8, !tbaa !5
  %369 = load i32, ptr @rw_x, align 4, !tbaa !9
  %370 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %371 = add nsw i32 %370, -1
  %372 = tail call ptr @R_CheckPlane(ptr noundef %368, i32 noundef %369, i32 noundef %371) #9
  store ptr %372, ptr @floorplane, align 8, !tbaa !5
  br label %373

373:                                              ; preds = %367, %365
  tail call void @R_RenderSegLoop()
  %374 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %375 = getelementptr inbounds i8, ptr %374, i64 28
  %376 = load i32, ptr %375, align 4, !tbaa !38
  %377 = and i32 %376, 2
  %378 = icmp ne i32 %377, 0
  %379 = load i32, ptr @maskedtexture, align 4
  %380 = icmp ne i32 %379, 0
  %or.cond = select i1 %378, i1 true, i1 %380
  br i1 %or.cond, label %381, label %400

381:                                              ; preds = %373
  %382 = getelementptr inbounds i8, ptr %374, i64 40
  %383 = load ptr, ptr %382, align 8, !tbaa !39
  %.not78 = icmp eq ptr %383, null
  br i1 %.not78, label %384, label %400

384:                                              ; preds = %381
  %385 = load ptr, ptr @lastopening, align 8, !tbaa !5
  %386 = getelementptr inbounds i16, ptr @ceilingclip, i64 %41
  %387 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %388 = sub nsw i32 %387, %0
  %389 = shl nsw i32 %388, 1
  %390 = sext i32 %389 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %385, ptr nonnull align 2 %386, i64 %390, i1 false)
  %391 = load ptr, ptr @lastopening, align 8, !tbaa !5
  %392 = sub nsw i64 0, %41
  %393 = getelementptr inbounds i16, ptr %391, i64 %392
  %394 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %395 = getelementptr inbounds i8, ptr %394, i64 40
  store ptr %393, ptr %395, align 8, !tbaa !39
  %396 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %397 = sub nsw i32 %396, %0
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds i16, ptr %391, i64 %398
  store ptr %399, ptr @lastopening, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %394, i64 28
  %.pre96 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !38
  %.pre97 = load i32, ptr @maskedtexture, align 4
  br label %400

400:                                              ; preds = %373, %384, %381
  %401 = phi i32 [ 0, %373 ], [ %.pre97, %384 ], [ %379, %381 ]
  %402 = phi i32 [ %376, %373 ], [ %.pre96, %384 ], [ %376, %381 ]
  %403 = phi ptr [ %374, %373 ], [ %394, %384 ], [ %374, %381 ]
  %404 = and i32 %402, 1
  %405 = icmp ne i32 %404, 0
  %406 = icmp ne i32 %401, 0
  %or.cond4 = select i1 %405, i1 true, i1 %406
  br i1 %or.cond4, label %407, label %.thread90

407:                                              ; preds = %400
  %408 = getelementptr inbounds i8, ptr %403, i64 48
  %409 = load ptr, ptr %408, align 8, !tbaa !40
  %.not79 = icmp eq ptr %409, null
  br i1 %.not79, label %410, label %426

410:                                              ; preds = %407
  %411 = load ptr, ptr @lastopening, align 8, !tbaa !5
  %412 = getelementptr inbounds i16, ptr @floorclip, i64 %41
  %413 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %414 = sub nsw i32 %413, %0
  %415 = shl nsw i32 %414, 1
  %416 = sext i32 %415 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 2 %411, ptr nonnull align 2 %412, i64 %416, i1 false)
  %417 = load ptr, ptr @lastopening, align 8, !tbaa !5
  %418 = sub nsw i64 0, %41
  %419 = getelementptr inbounds i16, ptr %417, i64 %418
  %420 = load ptr, ptr @ds_p, align 8, !tbaa !5
  %421 = getelementptr inbounds i8, ptr %420, i64 48
  store ptr %419, ptr %421, align 8, !tbaa !40
  %422 = load i32, ptr @rw_stopx, align 4, !tbaa !9
  %423 = sub nsw i32 %422, %0
  %424 = sext i32 %423 to i64
  %425 = getelementptr inbounds i16, ptr %417, i64 %424
  store ptr %425, ptr @lastopening, align 8, !tbaa !5
  %.pr.pre = load i32, ptr @maskedtexture, align 4, !tbaa !9
  br label %426

426:                                              ; preds = %410, %407
  %427 = phi ptr [ %420, %410 ], [ %403, %407 ]
  %.pr = phi i32 [ %.pr.pre, %410 ], [ %401, %407 ]
  %.not80 = icmp eq i32 %.pr, 0
  br i1 %.not80, label %.thread90, label %428

428:                                              ; preds = %426
  %429 = getelementptr inbounds i8, ptr %427, i64 28
  %430 = load i32, ptr %429, align 4, !tbaa !38
  %431 = and i32 %430, 2
  %.not81 = icmp eq i32 %431, 0
  br i1 %.not81, label %432, label %435

432:                                              ; preds = %428
  %433 = or disjoint i32 %430, 2
  store i32 %433, ptr %429, align 4, !tbaa !38
  %434 = getelementptr inbounds i8, ptr %427, i64 36
  store i32 -2147483648, ptr %434, align 4, !tbaa !42
  br label %435

435:                                              ; preds = %428, %432
  %436 = phi i32 [ %430, %428 ], [ %433, %432 ]
  %437 = and i32 %436, 1
  %.not83 = icmp eq i32 %437, 0
  br i1 %.not83, label %438, label %.thread90

438:                                              ; preds = %435
  %439 = or disjoint i32 %436, 1
  store i32 %439, ptr %429, align 4, !tbaa !38
  %440 = getelementptr inbounds i8, ptr %427, i64 32
  store i32 2147483647, ptr %440, align 8, !tbaa !41
  br label %.thread90

.thread90:                                        ; preds = %400, %426, %438, %435
  %441 = phi ptr [ %403, %400 ], [ %427, %426 ], [ %427, %438 ], [ %427, %435 ]
  %442 = getelementptr inbounds i8, ptr %441, i64 64
  store ptr %442, ptr @ds_p, align 8, !tbaa !5
  br label %443

443:                                              ; preds = %2, %.thread90
  ret void
}

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

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

declare i32 @R_PointToDist(i32 noundef, i32 noundef) local_unnamed_addr #4

declare i32 @R_ScaleFromGlobalAngle(i32 noundef) local_unnamed_addr #4

declare ptr @R_CheckPlane(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

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

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

attributes #0 = { inlinehint 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 = { 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 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!12, !6, i64 32}
!14 = !{!15, !16, i64 24}
!15 = !{!"line_s", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !16, i64 24, !16, i64 26, !16, i64 28, !7, i64 30, !7, i64 36, !10, i64 52, !6, i64 56, !6, i64 64, !10, i64 72, !6, i64 80}
!16 = !{!"short", !7, i64 0}
!17 = !{!12, !10, i64 20}
!18 = !{!12, !6, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"", !10, i64 0, !10, i64 4}
!21 = !{!20, !10, i64 4}
!22 = !{!23, !10, i64 8}
!23 = !{!"drawseg_s", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56}
!24 = !{!23, !10, i64 12}
!25 = !{!23, !6, i64 0}
!26 = !{!23, !10, i64 16}
!27 = !{!23, !10, i64 20}
!28 = !{!23, !10, i64 24}
!29 = !{!30, !10, i64 4}
!30 = !{!"", !10, i64 0, !10, i64 4, !16, i64 8, !16, i64 10, !16, i64 12, !16, i64 14, !16, i64 16, !10, i64 20, !6, i64 24, !7, i64 32, !31, i64 48, !10, i64 88, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120}
!31 = !{!"", !32, i64 0, !10, i64 24, !10, i64 28, !10, i64 32}
!32 = !{!"thinker_s", !6, i64 0, !6, i64 8, !7, i64 16}
!33 = !{!30, !10, i64 0}
!34 = !{!23, !6, i64 56}
!35 = !{!36, !16, i64 12}
!36 = !{!"", !10, i64 0, !10, i64 4, !16, i64 8, !16, i64 10, !16, i64 12, !6, i64 16}
!37 = !{!36, !10, i64 4}
!38 = !{!23, !10, i64 28}
!39 = !{!23, !6, i64 40}
!40 = !{!23, !6, i64 48}
!41 = !{!23, !10, i64 32}
!42 = !{!23, !10, i64 36}
!43 = !{!30, !16, i64 10}
!44 = !{!30, !16, i64 8}
!45 = !{!30, !16, i64 12}
!46 = !{!36, !16, i64 8}
!47 = !{!36, !16, i64 10}
!48 = !{!36, !10, i64 0}
!49 = !{!12, !10, i64 16}
!50 = !{!12, !6, i64 8}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass