; LLVM IR from 0intro/wmii :: lib/libstuff/x11/insanity (sizehint)

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

; Function Attrs: nounwind uwtable
define dso_local { i64, i64 } @sizehint(ptr noundef %0, i64 %1, i64 %2) #0 {
  %4 = alloca %struct.Rectangle, align 4
  %5 = alloca %struct.Rectangle, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %struct.Point, align 4
  %8 = alloca %struct.Point, align 4
  %9 = alloca %struct.Point, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.Rectangle, align 4
  %12 = alloca %struct.Point, align 4
  %13 = alloca %struct.Point, align 4
  %14 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  store i64 %1, ptr %14, align 4
  %15 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  store i64 %2, ptr %15, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %19

18:                                               ; preds = %3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 %5, i64 16, i1 false), !tbaa.struct !9
  store i32 1, ptr %10, align 4
  br label %181

19:                                               ; preds = %3
  %20 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %20, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %21 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %22 = load i64, ptr %21, align 4
  %23 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %24 = load i64, ptr %23, align 4
  %25 = load i64, ptr %9, align 4
  %26 = call { i64, i64 } @rectsubpt(i64 %22, i64 %24, i64 %25)
  %27 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %28 = extractvalue { i64, i64 } %26, 0
  store i64 %28, ptr %27, align 4
  %29 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %30 = extractvalue { i64, i64 } %26, 1
  store i64 %30, ptr %29, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  %31 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %32 = getelementptr inbounds %struct.Point, ptr %31, i32 0, i32 0
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.WinHints, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds %struct.Point, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !16
  %38 = call i32 @max(i32 noundef %33, i32 noundef %37)
  %39 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %40 = getelementptr inbounds %struct.Point, ptr %39, i32 0, i32 0
  store i32 %38, ptr %40, align 4, !tbaa !13
  %41 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %42 = getelementptr inbounds %struct.Point, ptr %41, i32 0, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !20
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.WinHints, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds %struct.Point, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = call i32 @max(i32 noundef %43, i32 noundef %47)
  %49 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %50 = getelementptr inbounds %struct.Point, ptr %49, i32 0, i32 1
  store i32 %48, ptr %50, align 4, !tbaa !20
  %51 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %52 = getelementptr inbounds %struct.Point, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4, !tbaa !13
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.WinHints, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds %struct.Point, ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !22
  %58 = call i32 @min(i32 noundef %53, i32 noundef %57)
  %59 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %60 = getelementptr inbounds %struct.Point, ptr %59, i32 0, i32 0
  store i32 %58, ptr %60, align 4, !tbaa !13
  %61 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %62 = getelementptr inbounds %struct.Point, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !20
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.WinHints, ptr %64, i32 0, i32 1
  %66 = getelementptr inbounds %struct.Point, ptr %65, i32 0, i32 1
  %67 = load i32, ptr %66, align 4, !tbaa !23
  %68 = call i32 @min(i32 noundef %63, i32 noundef %67)
  %69 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %70 = getelementptr inbounds %struct.Point, ptr %69, i32 0, i32 1
  store i32 %68, ptr %70, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %71 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.WinHints, ptr %72, i32 0, i32 2
  %74 = load i64, ptr %71, align 4
  %75 = load i64, ptr %73, align 8
  %76 = call i64 @subpt(i64 %74, i64 %75)
  store i64 %76, ptr %12, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %77 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %78 = load i32, ptr %77, align 4, !tbaa !24
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.WinHints, ptr %79, i32 0, i32 4
  %81 = getelementptr inbounds %struct.Point, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !25
  %83 = srem i32 %78, %82
  %84 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %85 = getelementptr inbounds %struct.Point, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 4, !tbaa !13
  %87 = sub nsw i32 %86, %83
  store i32 %87, ptr %85, align 4, !tbaa !13
  %88 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !26
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.WinHints, ptr %90, i32 0, i32 4
  %92 = getelementptr inbounds %struct.Point, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !27
  %94 = srem i32 %89, %93
  %95 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %96 = getelementptr inbounds %struct.Point, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = sub nsw i32 %97, %94
  store i32 %98, ptr %96, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %99 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.WinHints, ptr %100, i32 0, i32 3
  %102 = load i64, ptr %99, align 4
  %103 = load i64, ptr %101, align 8
  %104 = call i64 @subpt(i64 %102, i64 %103)
  store i64 %104, ptr %13, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %105 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !26
  %107 = call i32 @max(i32 noundef %106, i32 noundef 1)
  %108 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  store i32 %107, ptr %108, align 4, !tbaa !26
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.WinHints, ptr %109, i32 0, i32 6
  %111 = getelementptr inbounds %struct.Rectangle, ptr %110, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %111, i64 8, i1 false), !tbaa.struct !12
  %112 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %114 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !26
  %116 = mul nsw i32 %113, %115
  %117 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !26
  %119 = sdiv i32 %116, %118
  %120 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %121 = load i32, ptr %120, align 4, !tbaa !24
  %122 = icmp slt i32 %119, %121
  br i1 %122, label %123, label %139

123:                                              ; preds = %19
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.WinHints, ptr %124, i32 0, i32 3
  %126 = getelementptr inbounds %struct.Point, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 4, !tbaa !28
  %128 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %129 = load i32, ptr %128, align 4, !tbaa !24
  %130 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %131 = load i32, ptr %130, align 4, !tbaa !26
  %132 = mul nsw i32 %129, %131
  %133 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %134 = load i32, ptr %133, align 4, !tbaa !24
  %135 = sdiv i32 %132, %134
  %136 = add nsw i32 %127, %135
  %137 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %138 = getelementptr inbounds %struct.Point, ptr %137, i32 0, i32 1
  store i32 %136, ptr %138, align 4, !tbaa !20
  br label %139

139:                                              ; preds = %123, %19
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.WinHints, ptr %140, i32 0, i32 6
  %142 = getelementptr inbounds %struct.Rectangle, ptr %141, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %142, i64 8, i1 false), !tbaa.struct !12
  %143 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  %144 = load i32, ptr %143, align 4, !tbaa !24
  %145 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !26
  %147 = mul nsw i32 %144, %146
  %148 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %149 = load i32, ptr %148, align 4, !tbaa !26
  %150 = sdiv i32 %147, %149
  %151 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !24
  %153 = icmp sgt i32 %150, %152
  br i1 %153, label %154, label %170

154:                                              ; preds = %139
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.WinHints, ptr %155, i32 0, i32 3
  %157 = getelementptr inbounds %struct.Point, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !29
  %159 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !26
  %161 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !24
  %163 = mul nsw i32 %160, %162
  %164 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  %165 = load i32, ptr %164, align 4, !tbaa !26
  %166 = sdiv i32 %163, %165
  %167 = add nsw i32 %158, %166
  %168 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %169 = getelementptr inbounds %struct.Point, ptr %168, i32 0, i32 0
  store i32 %167, ptr %169, align 4, !tbaa !13
  br label %170

170:                                              ; preds = %154, %139
  %171 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %172 = load i64, ptr %171, align 4
  %173 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %174 = load i64, ptr %173, align 4
  %175 = load i64, ptr %9, align 4
  %176 = call { i64, i64 } @rectaddpt(i64 %172, i64 %174, i64 %175)
  %177 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 0
  %178 = extractvalue { i64, i64 } %176, 0
  store i64 %178, ptr %177, align 4
  %179 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 1
  %180 = extractvalue { i64, i64 } %176, 1
  store i64 %180, ptr %179, align 4
  store i32 1, ptr %10, align 4
  br label %181

181:                                              ; preds = %170, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %182 = load { i64, i64 }, ptr %4, align 4
  ret { i64, i64 } %182
}

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

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

declare { i64, i64 } @rectsubpt(i64, i64, i64) #3

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

declare i32 @max(i32 noundef, i32 noundef) #3

declare i32 @min(i32 noundef, i32 noundef) #3

declare i64 @subpt(i64, i64) #3

declare { i64, i64 } @rectaddpt(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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !10, i64 12, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!13 = !{!14, !11, i64 8}
!14 = !{!"Rectangle", !15, i64 0, !15, i64 8}
!15 = !{!"Point", !11, i64 0, !11, i64 4}
!16 = !{!17, !11, i64 0}
!17 = !{!"WinHints", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !14, i64 48, !18, i64 64, !19, i64 72, !19, i64 73}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!14, !11, i64 12}
!21 = !{!17, !11, i64 4}
!22 = !{!17, !11, i64 8}
!23 = !{!17, !11, i64 12}
!24 = !{!15, !11, i64 0}
!25 = !{!17, !11, i64 32}
!26 = !{!15, !11, i64 4}
!27 = !{!17, !11, i64 36}
!28 = !{!17, !11, i64 28}
!29 = !{!17, !11, i64 24}


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

; Function Attrs: nounwind uwtable
define dso_local { i64, i64 } @sizehint(ptr noundef readonly %0, i64 %1, i64 %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  br i1 %4, label %58, label %5

5:                                                ; preds = %3
  %6 = tail call { i64, i64 } @rectsubpt(i64 %1, i64 %2, i64 %1) #2
  %7 = extractvalue { i64, i64 } %6, 0
  %8 = extractvalue { i64, i64 } %6, 1
  %.sroa.6.8.extract.trunc = trunc i64 %8 to i32
  %9 = load i32, ptr %0, align 8, !tbaa !5
  %10 = tail call i32 @max(i32 noundef %.sroa.6.8.extract.trunc, i32 noundef %9) #2
  %.sroa.6.12.extract.shift = lshr i64 %8, 32
  %.sroa.6.12.extract.trunc = trunc nuw i64 %.sroa.6.12.extract.shift to i32
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !14
  %13 = tail call i32 @max(i32 noundef %.sroa.6.12.extract.trunc, i32 noundef %12) #2
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !15
  %16 = tail call i32 @min(i32 noundef %10, i32 noundef %15) #2
  %.sroa.6.8.insert.ext48 = zext i32 %16 to i64
  %17 = getelementptr inbounds i8, ptr %0, i64 12
  %18 = load i32, ptr %17, align 4, !tbaa !16
  %19 = tail call i32 @min(i32 noundef %13, i32 noundef %18) #2
  %.sroa.6.12.insert.ext65 = zext i32 %19 to i64
  %.sroa.6.12.insert.shift66 = shl nuw i64 %.sroa.6.12.insert.ext65, 32
  %.sroa.6.12.insert.insert68 = or disjoint i64 %.sroa.6.12.insert.shift66, %.sroa.6.8.insert.ext48
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = load i64, ptr %20, align 8
  %22 = tail call i64 @subpt(i64 %.sroa.6.12.insert.insert68, i64 %21) #2
  %.sroa.015.0.extract.trunc19 = trunc i64 %22 to i32
  %.sroa.820.0.extract.shift21 = lshr i64 %22, 32
  %.sroa.820.0.extract.trunc22 = trunc nuw i64 %.sroa.820.0.extract.shift21 to i32
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load i32, ptr %23, align 8, !tbaa !17
  %25 = srem i32 %.sroa.015.0.extract.trunc19, %24
  %26 = sub nsw i32 %16, %25
  %.sroa.6.8.insert.ext54 = zext i32 %26 to i64
  %27 = getelementptr inbounds i8, ptr %0, i64 36
  %28 = load i32, ptr %27, align 4, !tbaa !18
  %29 = srem i32 %.sroa.820.0.extract.trunc22, %28
  %30 = sub nsw i32 %19, %29
  %.sroa.6.12.insert.ext73 = zext i32 %30 to i64
  %.sroa.6.12.insert.shift74 = shl nuw i64 %.sroa.6.12.insert.ext73, 32
  %.sroa.6.12.insert.insert76 = or disjoint i64 %.sroa.6.12.insert.shift74, %.sroa.6.8.insert.ext54
  %31 = getelementptr inbounds i8, ptr %0, i64 24
  %32 = load i64, ptr %31, align 8
  %33 = tail call i64 @subpt(i64 %.sroa.6.12.insert.insert76, i64 %32) #2
  %.sroa.015.0.extract.trunc = trunc i64 %33 to i32
  %.sroa.820.0.extract.shift = lshr i64 %33, 32
  %.sroa.820.0.extract.trunc = trunc nuw i64 %.sroa.820.0.extract.shift to i32
  %34 = tail call i32 @max(i32 noundef %.sroa.820.0.extract.trunc, i32 noundef 1) #2
  %35 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.05.0.copyload = load i32, ptr %35, align 8, !tbaa !19
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 52
  %.sroa.8.0.copyload = load i32, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !19
  %36 = mul nsw i32 %.sroa.8.0.copyload, %.sroa.015.0.extract.trunc
  %37 = sdiv i32 %36, %34
  %38 = icmp slt i32 %37, %.sroa.05.0.copyload
  br i1 %38, label %39, label %44

39:                                               ; preds = %5
  %40 = getelementptr inbounds i8, ptr %0, i64 28
  %41 = load i32, ptr %40, align 4, !tbaa !20
  %42 = sdiv i32 %36, %.sroa.05.0.copyload
  %43 = add nsw i32 %42, %41
  %.sroa.6.12.insert.ext78 = zext i32 %43 to i64
  %.sroa.6.12.insert.shift79 = shl nuw i64 %.sroa.6.12.insert.ext78, 32
  %.sroa.6.12.insert.insert81 = or disjoint i64 %.sroa.6.12.insert.shift79, %.sroa.6.8.insert.ext54
  br label %44

44:                                               ; preds = %39, %5
  %.sroa.6.0 = phi i64 [ %.sroa.6.12.insert.insert81, %39 ], [ %.sroa.6.12.insert.insert76, %5 ]
  %45 = getelementptr inbounds i8, ptr %0, i64 56
  %.sroa.05.0.copyload9 = load i32, ptr %45, align 8, !tbaa !19
  %.sroa.8.0..sroa_idx10 = getelementptr inbounds i8, ptr %0, i64 60
  %.sroa.8.0.copyload11 = load i32, ptr %.sroa.8.0..sroa_idx10, align 4, !tbaa !19
  %46 = mul nsw i32 %.sroa.8.0.copyload11, %.sroa.015.0.extract.trunc
  %47 = sdiv i32 %46, %34
  %48 = icmp sgt i32 %47, %.sroa.05.0.copyload9
  br i1 %48, label %49, label %54

49:                                               ; preds = %44
  %50 = load i32, ptr %31, align 8, !tbaa !21
  %51 = mul nsw i32 %.sroa.05.0.copyload9, %34
  %52 = sdiv i32 %51, %.sroa.8.0.copyload11
  %53 = add nsw i32 %52, %50
  %.sroa.6.8.insert.ext58 = zext i32 %53 to i64
  %.sroa.6.8.insert.mask59 = and i64 %.sroa.6.0, -4294967296
  %.sroa.6.8.insert.insert60 = or disjoint i64 %.sroa.6.8.insert.mask59, %.sroa.6.8.insert.ext58
  br label %54

54:                                               ; preds = %49, %44
  %.sroa.6.1 = phi i64 [ %.sroa.6.8.insert.insert60, %49 ], [ %.sroa.6.0, %44 ]
  %55 = tail call { i64, i64 } @rectaddpt(i64 %7, i64 %.sroa.6.1, i64 %1) #2
  %56 = extractvalue { i64, i64 } %55, 0
  %57 = extractvalue { i64, i64 } %55, 1
  br label %58

58:                                               ; preds = %3, %54
  %.sroa.082.0 = phi i64 [ %56, %54 ], [ %1, %3 ]
  %.sroa.3.0 = phi i64 [ %57, %54 ], [ %2, %3 ]
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.082.0, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.3.0, 1
  ret { i64, i64 } %.fca.1.insert
}

declare { i64, i64 } @rectsubpt(i64, i64, i64) local_unnamed_addr #1

declare i32 @max(i32 noundef, i32 noundef) local_unnamed_addr #1

declare i32 @min(i32 noundef, i32 noundef) local_unnamed_addr #1

declare i64 @subpt(i64, i64) local_unnamed_addr #1

declare { i64, i64 } @rectaddpt(i64, i64, i64) local_unnamed_addr #1

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 0}
!6 = !{!"WinHints", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !12, i64 64, !13, i64 72, !13, i64 73}
!7 = !{!"Point", !8, i64 0, !8, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"Rectangle", !7, i64 0, !7, i64 8}
!12 = !{!"long", !9, i64 0}
!13 = !{!"_Bool", !9, i64 0}
!14 = !{!6, !8, i64 4}
!15 = !{!6, !8, i64 8}
!16 = !{!6, !8, i64 12}
!17 = !{!6, !8, i64 32}
!18 = !{!6, !8, i64 36}
!19 = !{!8, !8, i64 0}
!20 = !{!6, !8, i64 28}
!21 = !{!6, !8, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass