; LLVM IR from clangen/musikcube :: src/3rdparty/win32_src/pdcurses (window)

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

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__.dupwin = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @PDC_add_window_to_list(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @dupwin(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %1
  br label %17

16:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 434, ptr noundef @__PRETTY_FUNCTION__.dupwin) #5
  unreachable

17:                                               ; preds = %15
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  store ptr null, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %214

21:                                               ; preds = %17
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._win, ptr %22, i32 0, i32 2
  %24 = load i32, ptr %23, align 8, !tbaa !9
  store i32 %24, ptr %7, align 4, !tbaa !14
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._win, ptr %25, i32 0, i32 3
  %27 = load i32, ptr %26, align 4, !tbaa !15
  store i32 %27, ptr %8, align 4, !tbaa !14
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._win, ptr %28, i32 0, i32 4
  %30 = load i32, ptr %29, align 8, !tbaa !16
  store i32 %30, ptr %9, align 4, !tbaa !14
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._win, ptr %31, i32 0, i32 5
  %33 = load i32, ptr %32, align 4, !tbaa !17
  store i32 %33, ptr %10, align 4, !tbaa !14
  %34 = load i32, ptr %7, align 4, !tbaa !14
  %35 = load i32, ptr %8, align 4, !tbaa !14
  %36 = load i32, ptr %9, align 4, !tbaa !14
  %37 = load i32, ptr %10, align 4, !tbaa !14
  %38 = call ptr @PDC_makenew(i32 noundef %34, i32 noundef %35, i32 noundef %36, i32 noundef %37)
  store ptr %38, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %44

41:                                               ; preds = %21
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = call ptr @PDC_makelines(ptr noundef %42)
  store ptr %43, ptr %4, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %41, %21
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store ptr null, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %214

48:                                               ; preds = %44
  store i32 0, ptr %11, align 4, !tbaa !14
  br label %49

49:                                               ; preds = %93, %48
  %50 = load i32, ptr %11, align 4, !tbaa !14
  %51 = load i32, ptr %7, align 4, !tbaa !14
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %53, label %96

53:                                               ; preds = %49
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._win, ptr %54, i32 0, i32 16
  %56 = load ptr, ptr %55, align 8, !tbaa !18
  %57 = load i32, ptr %11, align 4, !tbaa !14
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  store ptr %60, ptr %5, align 8, !tbaa !5
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._win, ptr %61, i32 0, i32 16
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  %64 = load i32, ptr %11, align 4, !tbaa !14
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  store ptr %67, ptr %6, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %85, %53
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._win, ptr %70, i32 0, i32 16
  %72 = load ptr, ptr %71, align 8, !tbaa !18
  %73 = load i32, ptr %11, align 4, !tbaa !14
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !14
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i64, ptr %76, i64 %78
  %80 = icmp ult ptr %69, %79
  br i1 %80, label %81, label %90

81:                                               ; preds = %68
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load i64, ptr %82, align 8, !tbaa !19
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  store i64 %83, ptr %84, align 8, !tbaa !19
  br label %85

85:                                               ; preds = %81
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds i64, ptr %86, i32 1
  store ptr %87, ptr %5, align 8, !tbaa !5
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds i64, ptr %88, i32 1
  store ptr %89, ptr %6, align 8, !tbaa !5
  br label %68, !llvm.loop !20

90:                                               ; preds = %68
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !14
  call void @PDC_mark_line_as_changed(ptr noundef %91, i32 noundef %92)
  br label %93

93:                                               ; preds = %90
  %94 = load i32, ptr %11, align 4, !tbaa !14
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !14
  br label %49, !llvm.loop !22

96:                                               ; preds = %49
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._win, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !23
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._win, ptr %100, i32 0, i32 1
  store i32 %99, ptr %101, align 4, !tbaa !23
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._win, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !24
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._win, ptr %105, i32 0, i32 0
  store i32 %104, ptr %106, align 8, !tbaa !24
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._win, ptr %107, i32 0, i32 2
  %109 = load i32, ptr %108, align 8, !tbaa !9
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._win, ptr %110, i32 0, i32 2
  store i32 %109, ptr %111, align 8, !tbaa !9
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._win, ptr %112, i32 0, i32 3
  %114 = load i32, ptr %113, align 4, !tbaa !15
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._win, ptr %115, i32 0, i32 3
  store i32 %114, ptr %116, align 4, !tbaa !15
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._win, ptr %117, i32 0, i32 4
  %119 = load i32, ptr %118, align 8, !tbaa !16
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._win, ptr %120, i32 0, i32 4
  store i32 %119, ptr %121, align 8, !tbaa !16
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._win, ptr %122, i32 0, i32 5
  %124 = load i32, ptr %123, align 4, !tbaa !17
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._win, ptr %125, i32 0, i32 5
  store i32 %124, ptr %126, align 4, !tbaa !17
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._win, ptr %127, i32 0, i32 6
  %129 = load i32, ptr %128, align 8, !tbaa !25
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._win, ptr %130, i32 0, i32 6
  store i32 %129, ptr %131, align 8, !tbaa !25
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._win, ptr %132, i32 0, i32 7
  %134 = load i64, ptr %133, align 8, !tbaa !26
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._win, ptr %135, i32 0, i32 7
  store i64 %134, ptr %136, align 8, !tbaa !26
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._win, ptr %137, i32 0, i32 9
  %139 = load i8, ptr %138, align 8, !tbaa !27, !range !28, !noundef !29
  %140 = trunc i8 %139 to i1
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._win, ptr %141, i32 0, i32 9
  %143 = zext i1 %140 to i8
  store i8 %143, ptr %142, align 8, !tbaa !27
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._win, ptr %144, i32 0, i32 10
  %146 = load i8, ptr %145, align 1, !tbaa !30, !range !28, !noundef !29
  %147 = trunc i8 %146 to i1
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._win, ptr %148, i32 0, i32 10
  %150 = zext i1 %147 to i8
  store i8 %150, ptr %149, align 1, !tbaa !30
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._win, ptr %151, i32 0, i32 11
  %153 = load i8, ptr %152, align 2, !tbaa !31, !range !28, !noundef !29
  %154 = trunc i8 %153 to i1
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._win, ptr %155, i32 0, i32 11
  %157 = zext i1 %154 to i8
  store i8 %157, ptr %156, align 2, !tbaa !31
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._win, ptr %158, i32 0, i32 12
  %160 = load i8, ptr %159, align 1, !tbaa !32, !range !28, !noundef !29
  %161 = trunc i8 %160 to i1
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct._win, ptr %162, i32 0, i32 12
  %164 = zext i1 %161 to i8
  store i8 %164, ptr %163, align 1, !tbaa !32
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._win, ptr %165, i32 0, i32 21
  %167 = load i32, ptr %166, align 8, !tbaa !33
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._win, ptr %168, i32 0, i32 21
  store i32 %167, ptr %169, align 8, !tbaa !33
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._win, ptr %170, i32 0, i32 15
  %172 = load i8, ptr %171, align 2, !tbaa !34, !range !28, !noundef !29
  %173 = trunc i8 %172 to i1
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._win, ptr %174, i32 0, i32 15
  %176 = zext i1 %173 to i8
  store i8 %176, ptr %175, align 2, !tbaa !34
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._win, ptr %177, i32 0, i32 19
  %179 = load i32, ptr %178, align 8, !tbaa !35
  %180 = load ptr, ptr %4, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct._win, ptr %180, i32 0, i32 19
  store i32 %179, ptr %181, align 8, !tbaa !35
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._win, ptr %182, i32 0, i32 20
  %184 = load i32, ptr %183, align 4, !tbaa !36
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._win, ptr %185, i32 0, i32 20
  store i32 %184, ptr %186, align 4, !tbaa !36
  %187 = load ptr, ptr %3, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._win, ptr %187, i32 0, i32 22
  %189 = load i32, ptr %188, align 4, !tbaa !37
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._win, ptr %190, i32 0, i32 22
  store i32 %189, ptr %191, align 4, !tbaa !37
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._win, ptr %192, i32 0, i32 23
  %194 = load i32, ptr %193, align 8, !tbaa !38
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._win, ptr %195, i32 0, i32 23
  store i32 %194, ptr %196, align 8, !tbaa !38
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._win, ptr %197, i32 0, i32 24
  %199 = load ptr, ptr %198, align 8, !tbaa !39
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._win, ptr %200, i32 0, i32 24
  store ptr %199, ptr %201, align 8, !tbaa !39
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._win, ptr %202, i32 0, i32 8
  %204 = load i64, ptr %203, align 8, !tbaa !40
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._win, ptr %205, i32 0, i32 8
  store i64 %204, ptr %206, align 8, !tbaa !40
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct._win, ptr %207, i32 0, i32 6
  %209 = load i32, ptr %208, align 8, !tbaa !25
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct._win, ptr %210, i32 0, i32 6
  store i32 %209, ptr %211, align 8, !tbaa !25
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  call void @PDC_add_window_to_list(ptr noundef %212)
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %213, ptr %2, align 8
  store i32 1, ptr %12, align 4
  br label %214

214:                                              ; preds = %96, %47, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  %215 = load ptr, ptr %2, align 8
  ret ptr %215
}

declare void @PDC_mark_line_as_changed(ptr noundef, i32 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 = { 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 #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 }
attributes #5 = { 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 = !{!10, !11, i64 8}
!10 = !{!"_win", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 32, !12, i64 40, !13, i64 48, !13, i64 49, !13, i64 50, !13, i64 51, !13, i64 52, !13, i64 53, !13, i64 54, !6, i64 56, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 12}
!16 = !{!10, !11, i64 16}
!17 = !{!10, !11, i64 20}
!18 = !{!10, !6, i64 56}
!19 = !{!12, !12, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!10, !11, i64 4}
!24 = !{!10, !11, i64 0}
!25 = !{!10, !11, i64 24}
!26 = !{!10, !12, i64 32}
!27 = !{!10, !13, i64 48}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!10, !13, i64 49}
!31 = !{!10, !13, i64 50}
!32 = !{!10, !13, i64 51}
!33 = !{!10, !11, i64 88}
!34 = !{!10, !13, i64 54}
!35 = !{!10, !11, i64 80}
!36 = !{!10, !11, i64 84}
!37 = !{!10, !11, i64 92}
!38 = !{!10, !11, i64 96}
!39 = !{!10, !6, i64 104}
!40 = !{!10, !12, i64 40}


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

@.str.1 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@__PRETTY_FUNCTION__.dupwin = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @dupwin(ptr noundef readonly %0) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %2, label %3

2:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 434, ptr noundef nonnull @__PRETTY_FUNCTION__.dupwin) #4
  unreachable

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  %7 = load i32, ptr %6, align 4, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load i32, ptr %8, align 8, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 20
  %11 = load i32, ptr %10, align 4, !tbaa !15
  %12 = tail call ptr @PDC_makenew(i32 noundef %5, i32 noundef %7, i32 noundef %9, i32 noundef %11)
  %.not80 = icmp eq ptr %12, null
  br i1 %.not80, label %.thread, label %13

13:                                               ; preds = %3
  %14 = tail call ptr @PDC_makelines(ptr noundef nonnull %12)
  %.not81 = icmp eq ptr %14, null
  br i1 %.not81, label %.thread, label %.preheader

.preheader:                                       ; preds = %13
  %15 = icmp sgt i32 %5, 0
  br i1 %15, label %.lr.ph87, label %._crit_edge88

.lr.ph87:                                         ; preds = %.preheader
  %16 = getelementptr inbounds i8, ptr %14, i64 56
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = sext i32 %7 to i64
  %wide.trip.count = zext nneg i32 %5 to i64
  %19 = icmp sgt i32 %7, 0
  %20 = shl nsw i64 %18, 3
  br label %21

21:                                               ; preds = %.lr.ph87, %._crit_edge
  %indvars.iv = phi i64 [ 0, %.lr.ph87 ], [ %indvars.iv.next, %._crit_edge ]
  %22 = load ptr, ptr %16, align 8, !tbaa !16
  %23 = getelementptr inbounds ptr, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i64, ptr %24, i64 %18
  br i1 %19, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %21
  %26 = ptrtoint ptr %24 to i64
  %27 = load ptr, ptr %17, align 8, !tbaa !16
  %28 = getelementptr inbounds ptr, ptr %27, i64 %indvars.iv
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  %30 = add i64 %20, %26
  %31 = add i64 %26, 8
  %umax = tail call i64 @llvm.umax.i64(i64 %30, i64 %31)
  %32 = xor i64 %26, -1
  %33 = add i64 %umax, %32
  %34 = lshr i64 %33, 3
  %35 = add nuw nsw i64 %34, 1
  %min.iters.check = icmp ult i64 %33, 24
  %36 = ptrtoint ptr %29 to i64
  %37 = sub i64 %26, %36
  %diff.check = icmp ult i64 %37, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph.preheader98, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %35, 4611686018427387900
  %38 = shl i64 %n.vec, 3
  %ind.end = getelementptr i8, ptr %24, i64 %38
  %39 = shl i64 %n.vec, 3
  %ind.end90 = getelementptr i8, ptr %29, i64 %39
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 3
  %next.gep = getelementptr i8, ptr %24, i64 %offset.idx
  %offset.idx93 = shl i64 %index, 3
  %next.gep94 = getelementptr i8, ptr %29, i64 %offset.idx93
  %40 = getelementptr i8, ptr %next.gep94, i64 16
  %wide.load = load <2 x i64>, ptr %next.gep94, align 8, !tbaa !18
  %wide.load96 = load <2 x i64>, ptr %40, align 8, !tbaa !18
  %41 = getelementptr i8, ptr %next.gep, i64 16
  store <2 x i64> %wide.load, ptr %next.gep, align 8, !tbaa !18
  store <2 x i64> %wide.load96, ptr %41, align 8, !tbaa !18
  %index.next = add nuw i64 %index, 4
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %35, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader98

.lr.ph.preheader98:                               ; preds = %middle.block, %.lr.ph.preheader
  %.07685.ph = phi ptr [ %24, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.07784.ph = phi ptr [ %29, %.lr.ph.preheader ], [ %ind.end90, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader98, %.lr.ph
  %.07685 = phi ptr [ %44, %.lr.ph ], [ %.07685.ph, %.lr.ph.preheader98 ]
  %.07784 = phi ptr [ %45, %.lr.ph ], [ %.07784.ph, %.lr.ph.preheader98 ]
  %43 = load i64, ptr %.07784, align 8, !tbaa !18
  store i64 %43, ptr %.07685, align 8, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %.07685, i64 8
  %45 = getelementptr inbounds i8, ptr %.07784, i64 8
  %46 = icmp ult ptr %44, %25
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %21
  %47 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @PDC_mark_line_as_changed(ptr noundef nonnull %14, i32 noundef %47) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge88, label %21, !llvm.loop !24

._crit_edge88:                                    ; preds = %._crit_edge, %.preheader
  %48 = load <4 x i32>, ptr %0, align 8, !tbaa !25
  store <4 x i32> %48, ptr %14, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %14, i64 16
  %50 = load <2 x i32>, ptr %8, align 8, !tbaa !25
  store <2 x i32> %50, ptr %49, align 8, !tbaa !25
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load i32, ptr %51, align 8, !tbaa !26
  %53 = getelementptr inbounds i8, ptr %14, i64 24
  %54 = getelementptr inbounds i8, ptr %0, i64 32
  %55 = load i64, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %14, i64 32
  store i64 %55, ptr %56, align 8, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %0, i64 48
  %58 = getelementptr inbounds i8, ptr %14, i64 48
  %59 = load <4 x i8>, ptr %57, align 8, !tbaa !28
  store <4 x i8> %59, ptr %58, align 8, !tbaa !28
  %60 = getelementptr inbounds i8, ptr %0, i64 88
  %61 = load i32, ptr %60, align 8, !tbaa !29
  %62 = getelementptr inbounds i8, ptr %14, i64 88
  store i32 %61, ptr %62, align 8, !tbaa !29
  %63 = getelementptr inbounds i8, ptr %0, i64 54
  %64 = load i8, ptr %63, align 2, !tbaa !30, !range !31, !noundef !32
  %65 = getelementptr inbounds i8, ptr %14, i64 54
  store i8 %64, ptr %65, align 2, !tbaa !30
  %66 = getelementptr inbounds i8, ptr %0, i64 80
  %67 = getelementptr inbounds i8, ptr %14, i64 80
  %68 = load <2 x i32>, ptr %66, align 8, !tbaa !25
  store <2 x i32> %68, ptr %67, align 8, !tbaa !25
  %69 = getelementptr inbounds i8, ptr %0, i64 92
  %70 = getelementptr inbounds i8, ptr %14, i64 92
  %71 = load <2 x i32>, ptr %69, align 4, !tbaa !25
  store <2 x i32> %71, ptr %70, align 4, !tbaa !25
  %72 = getelementptr inbounds i8, ptr %0, i64 104
  %73 = load ptr, ptr %72, align 8, !tbaa !33
  %74 = getelementptr inbounds i8, ptr %14, i64 104
  store ptr %73, ptr %74, align 8, !tbaa !33
  %75 = getelementptr inbounds i8, ptr %0, i64 40
  %76 = load i64, ptr %75, align 8, !tbaa !34
  %77 = getelementptr inbounds i8, ptr %14, i64 40
  store i64 %76, ptr %77, align 8, !tbaa !34
  store i32 %52, ptr %53, align 8, !tbaa !26
  tail call void @PDC_add_window_to_list(ptr noundef nonnull %14)
  br label %.thread

.thread:                                          ; preds = %3, %13, %._crit_edge88
  %.074 = phi ptr [ %14, %._crit_edge88 ], [ null, %13 ], [ null, %3 ]
  ret ptr %.074
}

declare void @PDC_mark_line_as_changed(ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_win", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !11, i64 48, !11, i64 49, !11, i64 50, !11, i64 51, !11, i64 52, !11, i64 53, !11, i64 54, !12, i64 56, !12, i64 64, !12, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !12, i64 104, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 12}
!14 = !{!6, !7, i64 16}
!15 = !{!6, !7, i64 20}
!16 = !{!6, !12, i64 56}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !20, !21, !22}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !20, !21}
!24 = distinct !{!24, !20}
!25 = !{!7, !7, i64 0}
!26 = !{!6, !7, i64 24}
!27 = !{!6, !10, i64 32}
!28 = !{!11, !11, i64 0}
!29 = !{!6, !7, i64 88}
!30 = !{!6, !11, i64 54}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!6, !12, i64 104}
!34 = !{!6, !10, i64 40}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass