; LLVM IR from leonmavr/gfx-v4 :: src (algos)

; 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.node_t = type { %struct.vec2i_t, %struct.vec3u8_t, ptr }
%struct.vec2i_t = type { i32, i32 }
%struct.vec3u8_t = type { i8, i8, i8 }

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

declare void @gfx_point(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: 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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @is_interior(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @algos_triangle_fill_int_test(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.node_t, align 8
  %8 = alloca %struct.node_t, align 8
  %9 = alloca %struct.node_t, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.node_t, ptr %21, i32 0, i32 0
  %23 = getelementptr inbounds %struct.vec2i_t, ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.node_t, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds %struct.vec2i_t, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = icmp sgt i32 %24, %28
  br i1 %29, label %30, label %37

30:                                               ; preds = %3
  br label %31

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %32, i64 24, i1 false), !tbaa.struct !14
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %34, i64 24, i1 false), !tbaa.struct !14
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %7, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %36

36:                                               ; preds = %31
  br label %37

37:                                               ; preds = %36, %3
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.node_t, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %struct.vec2i_t, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.node_t, ptr %42, i32 0, i32 0
  %44 = getelementptr inbounds %struct.vec2i_t, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = icmp sgt i32 %41, %45
  br i1 %46, label %47, label %54

47:                                               ; preds = %37
  br label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %49, i64 24, i1 false), !tbaa.struct !14
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 8 %51, i64 24, i1 false), !tbaa.struct !14
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %52, ptr align 8 %8, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %53

53:                                               ; preds = %48
  br label %54

54:                                               ; preds = %53, %37
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.node_t, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds %struct.vec2i_t, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.node_t, ptr %59, i32 0, i32 0
  %61 = getelementptr inbounds %struct.vec2i_t, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = icmp sgt i32 %58, %62
  br i1 %63, label %64, label %71

64:                                               ; preds = %54
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #4
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %66, i64 24, i1 false), !tbaa.struct !14
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %67, ptr align 8 %68, i64 24, i1 false), !tbaa.struct !14
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %69, ptr align 8 %9, i64 24, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #4
  br label %70

70:                                               ; preds = %65
  br label %71

71:                                               ; preds = %70, %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.node_t, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds %struct.vec2i_t, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !17
  store i32 %75, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.node_t, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %struct.vec2i_t, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !17
  store i32 %79, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.node_t, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds %struct.vec2i_t, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !17
  store i32 %83, ptr %12, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.node_t, ptr %84, i32 0, i32 0
  %86 = getelementptr inbounds %struct.vec2i_t, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %13, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.node_t, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds %struct.vec2i_t, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !9
  store i32 %91, ptr %14, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.node_t, ptr %92, i32 0, i32 0
  %94 = getelementptr inbounds %struct.vec2i_t, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !9
  store i32 %95, ptr %15, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %96 = load i32, ptr %10, align 4, !tbaa !15
  %97 = load i32, ptr %11, align 4, !tbaa !15
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %101

99:                                               ; preds = %71
  %100 = load i32, ptr %10, align 4, !tbaa !15
  br label %103

101:                                              ; preds = %71
  %102 = load i32, ptr %11, align 4, !tbaa !15
  br label %103

103:                                              ; preds = %101, %99
  %104 = phi i32 [ %100, %99 ], [ %102, %101 ]
  %105 = load i32, ptr %12, align 4, !tbaa !15
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %117

107:                                              ; preds = %103
  %108 = load i32, ptr %10, align 4, !tbaa !15
  %109 = load i32, ptr %11, align 4, !tbaa !15
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %111, label %113

111:                                              ; preds = %107
  %112 = load i32, ptr %10, align 4, !tbaa !15
  br label %115

113:                                              ; preds = %107
  %114 = load i32, ptr %11, align 4, !tbaa !15
  br label %115

115:                                              ; preds = %113, %111
  %116 = phi i32 [ %112, %111 ], [ %114, %113 ]
  br label %119

117:                                              ; preds = %103
  %118 = load i32, ptr %12, align 4, !tbaa !15
  br label %119

119:                                              ; preds = %117, %115
  %120 = phi i32 [ %116, %115 ], [ %118, %117 ]
  store i32 %120, ptr %16, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %121 = load i32, ptr %10, align 4, !tbaa !15
  %122 = load i32, ptr %11, align 4, !tbaa !15
  %123 = icmp sgt i32 %121, %122
  br i1 %123, label %124, label %126

124:                                              ; preds = %119
  %125 = load i32, ptr %10, align 4, !tbaa !15
  br label %128

126:                                              ; preds = %119
  %127 = load i32, ptr %11, align 4, !tbaa !15
  br label %128

128:                                              ; preds = %126, %124
  %129 = phi i32 [ %125, %124 ], [ %127, %126 ]
  %130 = load i32, ptr %12, align 4, !tbaa !15
  %131 = icmp sgt i32 %129, %130
  br i1 %131, label %132, label %142

132:                                              ; preds = %128
  %133 = load i32, ptr %10, align 4, !tbaa !15
  %134 = load i32, ptr %11, align 4, !tbaa !15
  %135 = icmp sgt i32 %133, %134
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = load i32, ptr %10, align 4, !tbaa !15
  br label %140

138:                                              ; preds = %132
  %139 = load i32, ptr %11, align 4, !tbaa !15
  br label %140

140:                                              ; preds = %138, %136
  %141 = phi i32 [ %137, %136 ], [ %139, %138 ]
  br label %144

142:                                              ; preds = %128
  %143 = load i32, ptr %12, align 4, !tbaa !15
  br label %144

144:                                              ; preds = %142, %140
  %145 = phi i32 [ %141, %140 ], [ %143, %142 ]
  store i32 %145, ptr %17, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %146 = load i32, ptr %13, align 4, !tbaa !15
  store i32 %146, ptr %18, align 4, !tbaa !15
  br label %147

147:                                              ; preds = %177, %144
  %148 = load i32, ptr %18, align 4, !tbaa !15
  %149 = load i32, ptr %15, align 4, !tbaa !15
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %180

152:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %153 = load i32, ptr %16, align 4, !tbaa !15
  store i32 %153, ptr %20, align 4, !tbaa !15
  br label %154

154:                                              ; preds = %173, %152
  %155 = load i32, ptr %20, align 4, !tbaa !15
  %156 = load i32, ptr %17, align 4, !tbaa !15
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %176

159:                                              ; preds = %154
  %160 = load i32, ptr %10, align 4, !tbaa !15
  %161 = load i32, ptr %13, align 4, !tbaa !15
  %162 = load i32, ptr %11, align 4, !tbaa !15
  %163 = load i32, ptr %14, align 4, !tbaa !15
  %164 = load i32, ptr %12, align 4, !tbaa !15
  %165 = load i32, ptr %15, align 4, !tbaa !15
  %166 = load i32, ptr %20, align 4, !tbaa !15
  %167 = load i32, ptr %18, align 4, !tbaa !15
  %168 = call zeroext i1 @is_interior(i32 noundef %160, i32 noundef %161, i32 noundef %162, i32 noundef %163, i32 noundef %164, i32 noundef %165, i32 noundef %166, i32 noundef %167)
  br i1 %168, label %169, label %172

169:                                              ; preds = %159
  %170 = load i32, ptr %20, align 4, !tbaa !15
  %171 = load i32, ptr %18, align 4, !tbaa !15
  call void @gfx_point(i32 noundef %170, i32 noundef %171)
  br label %172

172:                                              ; preds = %169, %159
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %20, align 4, !tbaa !15
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %20, align 4, !tbaa !15
  br label %154, !llvm.loop !18

176:                                              ; preds = %158
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %18, align 4, !tbaa !15
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %18, align 4, !tbaa !15
  br label %147, !llvm.loop !20

180:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!10, !12, i64 4}
!10 = !{!"node_t", !11, i64 0, !13, i64 8, !6, i64 16}
!11 = !{!"vec2i_t", !12, i64 0, !12, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!"vec3u8_t", !7, i64 0, !7, i64 1, !7, i64 2}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15, i64 8, i64 1, !16, i64 9, i64 1, !16, i64 10, i64 1, !16, i64 16, i64 8, !5}
!15 = !{!12, !12, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!10, !12, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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.node_t = type { %struct.vec2i_t, %struct.vec3u8_t, ptr }
%struct.vec2i_t = type { i32, i32 }
%struct.vec3u8_t = type { i8, i8, i8 }

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

declare void @gfx_point(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @is_interior(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @algos_triangle_fill_int_test(ptr nocapture noundef %0, ptr nocapture noundef %1, ptr nocapture noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct.node_t, align 8
  %5 = alloca %struct.node_t, align 8
  %6 = alloca %struct.node_t, align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %2, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = icmp sgt i32 %8, %10
  br i1 %11, label %12, label %13

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %0, i64 24, i1 false), !tbaa.struct !13
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %4, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4)
  %.pre = load i32, ptr %7, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %12, %3
  %14 = phi i32 [ %.pre, %12 ], [ %8, %3 ]
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp sgt i32 %14, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %0, i64 24, i1 false), !tbaa.struct !13
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %5, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5)
  %.pre71 = load i32, ptr %15, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %18, %13
  %20 = phi i32 [ %.pre71, %18 ], [ %16, %13 ]
  %21 = load i32, ptr %9, align 4, !tbaa !5
  %22 = icmp sgt i32 %20, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 24, i1 false), !tbaa.struct !13
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6)
  %.pre72 = load i32, ptr %15, align 4, !tbaa !5
  %.pre73 = load i32, ptr %9, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %23, %19
  %25 = phi i32 [ %.pre73, %23 ], [ %21, %19 ]
  %26 = phi i32 [ %.pre72, %23 ], [ %20, %19 ]
  %27 = load i32, ptr %0, align 8, !tbaa !17
  %28 = load i32, ptr %1, align 8, !tbaa !17
  %29 = load i32, ptr %2, align 8, !tbaa !17
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = tail call i32 @llvm.smin.i32(i32 %27, i32 %28)
  %. = tail call i32 @llvm.smin.i32(i32 %31, i32 %29)
  %32 = tail call i32 @llvm.smax.i32(i32 %27, i32 %28)
  %33 = tail call i32 @llvm.smax.i32(i32 %32, i32 %29)
  %34 = icmp slt i32 %30, %25
  %35 = icmp slt i32 %., %33
  %or.cond = select i1 %34, i1 %35, i1 false
  br i1 %or.cond, label %.preheader.us, label %._crit_edge68

.preheader.us:                                    ; preds = %24, %._crit_edge.us
  %.06167.us = phi i32 [ %41, %._crit_edge.us ], [ %30, %24 ]
  br label %36

36:                                               ; preds = %.preheader.us, %39
  %.066.us = phi i32 [ %., %.preheader.us ], [ %40, %39 ]
  %37 = tail call zeroext i1 @is_interior(i32 noundef %27, i32 noundef %30, i32 noundef %28, i32 noundef %26, i32 noundef %29, i32 noundef %25, i32 noundef %.066.us, i32 noundef %.06167.us)
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  tail call void @gfx_point(i32 noundef %.066.us, i32 noundef %.06167.us) #5
  br label %39

39:                                               ; preds = %38, %36
  %40 = add i32 %.066.us, 1
  %exitcond.not = icmp eq i32 %40, %33
  br i1 %exitcond.not, label %._crit_edge.us, label %36, !llvm.loop !18

._crit_edge.us:                                   ; preds = %39
  %41 = add i32 %.06167.us, 1
  %exitcond70.not = icmp eq i32 %41, %25
  br i1 %exitcond70.not, label %._crit_edge68, label %.preheader.us, !llvm.loop !20

._crit_edge68:                                    ; preds = %._crit_edge.us, %24
  ret void
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !8, i64 4}
!6 = !{!"node_t", !7, i64 0, !11, i64 8, !12, i64 16}
!7 = !{!"vec2i_t", !8, i64 0, !8, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"vec3u8_t", !9, i64 0, !9, i64 1, !9, i64 2}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 1, !15, i64 9, i64 1, !15, i64 10, i64 1, !15, i64 16, i64 8, !16}
!14 = !{!8, !8, i64 0}
!15 = !{!9, !9, i64 0}
!16 = !{!12, !12, i64 0}
!17 = !{!6, !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass