; LLVM IR from 0intro/wmii :: cmd/x11 (wiwarp)

; 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.Screen = type { i32, %struct.Window, ptr, i64, i64, ptr, ptr, %struct.Rectangle, i32, i32, ptr }
%struct.Window = type { i32, i64, ptr, ptr, ptr, i64, ptr, %struct.Rectangle, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Ewmh, i64, ptr, ptr, i8, i32, i32 }
%struct.Ewmh = type { i64, i64, i64 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.Point = type { i32, i32 }

@argv0 = external global ptr, align 8
@scr = external global %struct.Screen, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@display = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Point, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.Point, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !9
  %11 = load ptr, ptr @argv0, align 8, !tbaa !9
  %12 = icmp ne ptr %11, null
  br i1 %12, label %16, label %13

13:                                               ; preds = %2
  %14 = load ptr, ptr %5, align 8, !tbaa !9
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %15, ptr @argv0, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %13, %2
  %17 = load ptr, ptr %5, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %17, i32 1
  store ptr %18, ptr %5, align 8, !tbaa !9
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr %4, align 4, !tbaa !5
  store i32 1, ptr %8, align 4, !tbaa !5
  %21 = load i32, ptr %8, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  call void (i64, ...) @_used(i64 noundef %22)
  br label %23

23:                                               ; preds = %68, %16
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %34

26:                                               ; preds = %23
  %27 = load ptr, ptr %5, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i64 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %29, i64 0
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 45
  br label %34

34:                                               ; preds = %26, %23
  %35 = phi i1 [ false, %23 ], [ %33, %26 ]
  br i1 %35, label %36, label %69

36:                                               ; preds = %34
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = getelementptr inbounds ptr, ptr %37, i64 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  store ptr %40, ptr %9, align 8, !tbaa !9
  %41 = load ptr, ptr %5, align 8, !tbaa !9
  %42 = getelementptr inbounds ptr, ptr %41, i32 1
  store ptr %42, ptr %5, align 8, !tbaa !9
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %4, align 4, !tbaa !5
  %45 = load ptr, ptr %9, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 0
  %47 = load i8, ptr %46, align 1, !tbaa !11
  %48 = sext i8 %47 to i32
  %49 = icmp eq i32 %48, 45
  br i1 %49, label %50, label %57

50:                                               ; preds = %36
  %51 = load ptr, ptr %9, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 1
  %53 = load i8, ptr %52, align 1, !tbaa !11
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %50
  br label %69

57:                                               ; preds = %50, %36
  br label %58

58:                                               ; preds = %67, %57
  %59 = load ptr, ptr %9, align 8, !tbaa !9
  %60 = load i8, ptr %59, align 1, !tbaa !11
  %61 = icmp ne i8 %60, 0
  br i1 %61, label %62, label %68

62:                                               ; preds = %58
  %63 = load ptr, ptr %9, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %63, i32 1
  store ptr %64, ptr %9, align 8, !tbaa !9
  %65 = load i8, ptr %63, align 1, !tbaa !11
  %66 = sext i8 %65 to i32
  switch i32 %66, label %67 [
  ]

67:                                               ; preds = %62
  br label %58, !llvm.loop !12

68:                                               ; preds = %58
  br label %23, !llvm.loop !14

69:                                               ; preds = %56, %34
  store i32 0, ptr %8, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  %73 = load i32, ptr %8, align 4, !tbaa !5
  call void (i64, ...) @_used(i64 noundef %71, ptr noundef %72, i32 noundef %73)
  call void @initdisplay()
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %163

76:                                               ; preds = %69
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %97

79:                                               ; preds = %76
  %80 = load ptr, ptr %9, align 8, !tbaa !9
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %97

84:                                               ; preds = %79
  %85 = load ptr, ptr %9, align 8, !tbaa !9
  %86 = call i64 @strlen(ptr noundef %85) #8
  %87 = trunc i64 %86 to i32
  store i32 %87, ptr %7, align 4, !tbaa !5
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = load ptr, ptr %9, align 8, !tbaa !9
  %90 = sext i32 %88 to i64
  %91 = getelementptr inbounds i8, ptr %89, i64 %90
  store ptr %91, ptr %9, align 8, !tbaa !9
  %92 = load ptr, ptr %9, align 8, !tbaa !9
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = sub i64 0, %94
  %96 = getelementptr inbounds i8, ptr %92, i64 %95
  br label %114

97:                                               ; preds = %79, %76
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %100, label %110

100:                                              ; preds = %97
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %4, align 4, !tbaa !5
  %103 = load ptr, ptr %5, align 8, !tbaa !9
  %104 = getelementptr inbounds ptr, ptr %103, i32 1
  store ptr %104, ptr %5, align 8, !tbaa !9
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  call void (i64, ...) @_used(i64 noundef %106)
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %107, i64 -1
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  br label %112

110:                                              ; preds = %97
  call void @exit(i32 noundef 1) #9
  unreachable

111:                                              ; No predecessors!
  br label %112

112:                                              ; preds = %111, %100
  %113 = phi ptr [ %109, %100 ], [ null, %111 ]
  br label %114

114:                                              ; preds = %112, %84
  %115 = phi ptr [ %96, %84 ], [ %113, %112 ]
  %116 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %117 = call zeroext i1 @getint(ptr noundef %115, ptr noundef %116)
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @exit(i32 noundef 1) #9
  unreachable

119:                                              ; preds = %114
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %140

122:                                              ; preds = %119
  %123 = load ptr, ptr %9, align 8, !tbaa !9
  %124 = load i8, ptr %123, align 1, !tbaa !11
  %125 = sext i8 %124 to i32
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %140

127:                                              ; preds = %122
  %128 = load ptr, ptr %9, align 8, !tbaa !9
  %129 = call i64 @strlen(ptr noundef %128) #8
  %130 = trunc i64 %129 to i32
  store i32 %130, ptr %7, align 4, !tbaa !5
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = load ptr, ptr %9, align 8, !tbaa !9
  %133 = sext i32 %131 to i64
  %134 = getelementptr inbounds i8, ptr %132, i64 %133
  store ptr %134, ptr %9, align 8, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !9
  %136 = load i32, ptr %7, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = sub i64 0, %137
  %139 = getelementptr inbounds i8, ptr %135, i64 %138
  br label %157

140:                                              ; preds = %122, %119
  %141 = load i32, ptr %4, align 4, !tbaa !5
  %142 = icmp sgt i32 %141, 0
  br i1 %142, label %143, label %153

143:                                              ; preds = %140
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = add nsw i32 %144, -1
  store i32 %145, ptr %4, align 4, !tbaa !5
  %146 = load ptr, ptr %5, align 8, !tbaa !9
  %147 = getelementptr inbounds ptr, ptr %146, i32 1
  store ptr %147, ptr %5, align 8, !tbaa !9
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  call void (i64, ...) @_used(i64 noundef %149)
  %150 = load ptr, ptr %5, align 8, !tbaa !9
  %151 = getelementptr inbounds ptr, ptr %150, i64 -1
  %152 = load ptr, ptr %151, align 8, !tbaa !9
  br label %155

153:                                              ; preds = %140
  call void @exit(i32 noundef 1) #9
  unreachable

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154, %143
  %156 = phi ptr [ %152, %143 ], [ null, %154 ]
  br label %157

157:                                              ; preds = %155, %127
  %158 = phi ptr [ %139, %127 ], [ %156, %155 ]
  %159 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %160 = call zeroext i1 @getint(ptr noundef %158, ptr noundef %159)
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  call void @exit(i32 noundef 1) #9
  unreachable

162:                                              ; preds = %157
  br label %170

163:                                              ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %164 = call i64 @querypointer(ptr noundef getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1))
  store i64 %164, ptr %10, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %165 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 0
  %166 = load i32, ptr %165, align 4, !tbaa !16
  %167 = getelementptr inbounds %struct.Point, ptr %6, i32 0, i32 1
  %168 = load i32, ptr %167, align 4, !tbaa !18
  %169 = call i32 (i32, ptr, ...) @lprint(i32 noundef 1, ptr noundef @.str, i32 noundef %166, i32 noundef %168)
  br label %170

170:                                              ; preds = %163, %162
  %171 = load i64, ptr %6, align 4
  call void @warppointer(i64 %171)
  %172 = load ptr, ptr @display, align 8, !tbaa !9
  %173 = call i32 @XCloseDisplay(ptr noundef %172)
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %6) #7
  %174 = load i32, ptr %3, align 4
  ret i32 %174
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @_used(i64 noundef, ...) #2

declare void @initdisplay() #3

declare zeroext i1 @getint(ptr noundef, ptr noundef) #3

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

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

declare i64 @querypointer(ptr noundef) #3

; 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

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

declare i32 @lprint(i32 noundef, ptr noundef, ...) #3

declare void @warppointer(i64) #3

declare i32 @XCloseDisplay(ptr noundef) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!16 = !{!17, !6, i64 0}
!17 = !{!"Point", !6, i64 0, !6, i64 4}
!18 = !{!17, !6, i64 4}


; 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.Screen = type { i32, %struct.Window, ptr, i64, i64, ptr, ptr, %struct.Rectangle, i32, i32, ptr }
%struct.Window = type { i32, i64, ptr, ptr, ptr, i64, ptr, %struct.Rectangle, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Ewmh, i64, ptr, ptr, i8, i32, i32 }
%struct.Ewmh = type { i64, i64, i64 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.Point = type { i32, i32 }

@argv0 = external local_unnamed_addr global ptr, align 8
@scr = external global %struct.Screen, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@display = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.Point, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %4 = load ptr, ptr @argv0, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %7

5:                                                ; preds = %2
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  store ptr %6, ptr @argv0, align 8, !tbaa !5
  br label %7

7:                                                ; preds = %5, %2
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = add nsw i32 %0, -1
  tail call void (i64, ...) @_used(i64 noundef 1)
  %.not4751 = icmp eq i32 %9, 0
  br i1 %.not4751, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %7
  %10 = load ptr, ptr %8, align 8, !tbaa !5
  %11 = load i8, ptr %10, align 1, !tbaa !9
  %12 = icmp eq i8 %11, 45
  br i1 %12, label %.lr.ph67, label %.critedge

.loopexit:                                        ; preds = %26
  %.not47 = icmp eq i32 %19, 0
  br i1 %.not47, label %.critedge, label %.lr.ph, !llvm.loop !10

.lr.ph:                                           ; preds = %.loopexit
  %13 = load ptr, ptr %18, align 8, !tbaa !5
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %15 = icmp eq i8 %14, 45
  br i1 %15, label %.lr.ph67, label %.critedge, !llvm.loop !10

.lr.ph67:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %16 = phi ptr [ %13, %.lr.ph ], [ %10, %.lr.ph.preheader ]
  %.0445266 = phi ptr [ %18, %.lr.ph ], [ %8, %.lr.ph.preheader ]
  %.05465 = phi i32 [ %19, %.lr.ph ], [ %9, %.lr.ph.preheader ]
  %17 = getelementptr inbounds i8, ptr %16, i64 1
  %18 = getelementptr inbounds i8, ptr %.0445266, i64 8
  %19 = add nsw i32 %.05465, -1
  %20 = load i8, ptr %17, align 1, !tbaa !9
  %21 = icmp eq i8 %20, 45
  br i1 %21, label %22, label %.preheader

22:                                               ; preds = %.lr.ph67
  %23 = getelementptr inbounds i8, ptr %16, i64 2
  %24 = load i8, ptr %23, align 1, !tbaa !9
  %25 = icmp eq i8 %24, 0
  br i1 %25, label %.critedge, label %.preheader

.preheader:                                       ; preds = %22, %.lr.ph67
  br label %26

26:                                               ; preds = %.preheader, %26
  %.142 = phi ptr [ %28, %26 ], [ %17, %.preheader ]
  %27 = load i8, ptr %.142, align 1, !tbaa !9
  %.not48 = icmp eq i8 %27, 0
  %28 = getelementptr inbounds i8, ptr %.142, i64 1
  br i1 %.not48, label %.loopexit, label %26, !llvm.loop !12

.critedge:                                        ; preds = %.loopexit, %22, %.lr.ph, %.lr.ph.preheader, %7
  %.145 = phi ptr [ %8, %7 ], [ %8, %.lr.ph.preheader ], [ %18, %.lr.ph ], [ %18, %22 ], [ %18, %.loopexit ]
  %.243 = phi ptr [ null, %7 ], [ null, %.lr.ph.preheader ], [ %.142, %.lr.ph ], [ %17, %22 ], [ %.142, %.loopexit ]
  %.1 = phi i32 [ 0, %7 ], [ %9, %.lr.ph.preheader ], [ %19, %.lr.ph ], [ %19, %22 ], [ 0, %.loopexit ]
  tail call void (i64, ...) @_used(i64 noundef 0, ptr noundef %.243, i32 noundef 0)
  tail call void @initdisplay() #5
  %.not49 = icmp eq i32 %.1, 0
  br i1 %.not49, label %48, label %29

29:                                               ; preds = %.critedge
  %30 = icmp sgt i32 %.1, 0
  br i1 %30, label %31, label %36

31:                                               ; preds = %29
  %32 = add nsw i32 %.1, -1
  %33 = zext nneg i32 %32 to i64
  tail call void (i64, ...) @_used(i64 noundef %33)
  %34 = load ptr, ptr %.145, align 8, !tbaa !5
  %35 = call zeroext i1 @getint(ptr noundef %34, ptr noundef nonnull %3) #5
  br i1 %35, label %38, label %37

36:                                               ; preds = %29
  tail call void @exit(i32 noundef 1) #6
  unreachable

37:                                               ; preds = %31
  call void @exit(i32 noundef 1) #6
  unreachable

38:                                               ; preds = %31
  %.not50 = icmp eq i32 %.1, 1
  br i1 %.not50, label %46, label %39

39:                                               ; preds = %38
  %40 = add nsw i32 %.1, -2
  %41 = zext nneg i32 %40 to i64
  call void (i64, ...) @_used(i64 noundef %41)
  %42 = getelementptr inbounds i8, ptr %.145, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %3, i64 4
  %45 = call zeroext i1 @getint(ptr noundef %43, ptr noundef nonnull %44) #5
  br i1 %45, label %._crit_edge, label %47

._crit_edge:                                      ; preds = %39
  %.pre = load i64, ptr %3, align 8
  br label %54

46:                                               ; preds = %38
  call void @exit(i32 noundef 1) #6
  unreachable

47:                                               ; preds = %39
  call void @exit(i32 noundef 1) #6
  unreachable

48:                                               ; preds = %.critedge
  %49 = tail call i64 @querypointer(ptr noundef nonnull getelementptr inbounds (i8, ptr @scr, i64 8)) #5
  store i64 %49, ptr %3, align 8
  %50 = trunc i64 %49 to i32
  %51 = lshr i64 %49, 32
  %52 = trunc nuw i64 %51 to i32
  %53 = tail call i32 (i32, ptr, ...) @lprint(i32 noundef 1, ptr noundef nonnull @.str, i32 noundef %50, i32 noundef %52) #5
  br label %54

54:                                               ; preds = %._crit_edge, %48
  %55 = phi i64 [ %.pre, %._crit_edge ], [ %49, %48 ]
  call void @warppointer(i64 %55) #5
  %56 = load ptr, ptr @display, align 8, !tbaa !5
  %57 = call i32 @XCloseDisplay(ptr noundef %56) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 0
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @_used(i64 noundef, ...) local_unnamed_addr #2

declare void @initdisplay() local_unnamed_addr #3

declare zeroext i1 @getint(ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare i64 @querypointer(ptr noundef) local_unnamed_addr #3

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

declare i32 @lprint(i32 noundef, ptr noundef, ...) local_unnamed_addr #3

declare void @warppointer(i64) local_unnamed_addr #3

declare i32 @XCloseDisplay(ptr noundef) local_unnamed_addr #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass