; LLVM IR from ARM-software/Arm-2D :: Library/Source (arm_2d)

; 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.arm_2d_location_t = type { i16, i16 }
%struct.arm_2d_region_t = type { %union.anon.34, %union.anon.35 }
%union.anon.34 = type { %struct.arm_2d_location_t }
%union.anon.35 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }

@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.arm_2d_region_intersect = external hidden unnamed_addr constant [99 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @arm_2d_region_intersect(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %2) #3 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.arm_2d_location_t, align 2
  %9 = alloca %struct.arm_2d_location_t, align 2
  %10 = alloca %struct.arm_2d_location_t, align 2
  %11 = alloca %struct.arm_2d_location_t, align 2
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  br label %17

16:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 127, ptr noundef @__PRETTY_FUNCTION__.arm_2d_region_intersect) #4
  unreachable

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

20:                                               ; preds = %17
  br label %22

21:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.7, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__.arm_2d_region_intersect) #4
  unreachable

22:                                               ; preds = %20
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.arm_2d_region_t, ptr %23, i32 0, i32 1
  %25 = getelementptr inbounds %struct.arm_2d_size_t, ptr %24, i32 0, i32 0
  %26 = load i16, ptr %25, align 2, !tbaa !9
  %27 = sext i16 %26 to i32
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %50, label %29

29:                                               ; preds = %22
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.arm_2d_region_t, ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds %struct.arm_2d_size_t, ptr %31, i32 0, i32 1
  %33 = load i16, ptr %32, align 2, !tbaa !9
  %34 = sext i16 %33 to i32
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %50, label %36

36:                                               ; preds = %29
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.arm_2d_region_t, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds %struct.arm_2d_size_t, ptr %38, i32 0, i32 0
  %40 = load i16, ptr %39, align 2, !tbaa !9
  %41 = sext i16 %40 to i32
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %50, label %43

43:                                               ; preds = %36
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.arm_2d_region_t, ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds %struct.arm_2d_size_t, ptr %45, i32 0, i32 1
  %47 = load i16, ptr %46, align 2, !tbaa !9
  %48 = sext i16 %47 to i32
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %43, %36, %29, %22
  store i1 false, ptr %4, align 1
  br label %252

51:                                               ; preds = %43
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %53 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 0
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.arm_2d_region_t, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %struct.arm_2d_location_t, ptr %55, i32 0, i32 0
  %57 = load i16, ptr %56, align 2, !tbaa !9
  %58 = sext i16 %57 to i32
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.arm_2d_region_t, ptr %59, i32 0, i32 1
  %61 = getelementptr inbounds %struct.arm_2d_size_t, ptr %60, i32 0, i32 0
  %62 = load i16, ptr %61, align 2, !tbaa !9
  %63 = sext i16 %62 to i32
  %64 = add nsw i32 %58, %63
  %65 = sub nsw i32 %64, 1
  %66 = trunc i32 %65 to i16
  store i16 %66, ptr %53, align 2, !tbaa !10
  %67 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 1
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.arm_2d_region_t, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds %struct.arm_2d_location_t, ptr %69, i32 0, i32 1
  %71 = load i16, ptr %70, align 2, !tbaa !9
  %72 = sext i16 %71 to i32
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.arm_2d_region_t, ptr %73, i32 0, i32 1
  %75 = getelementptr inbounds %struct.arm_2d_size_t, ptr %74, i32 0, i32 1
  %76 = load i16, ptr %75, align 2, !tbaa !9
  %77 = sext i16 %76 to i32
  %78 = add nsw i32 %72, %77
  %79 = sub nsw i32 %78, 1
  %80 = trunc i32 %79 to i16
  store i16 %80, ptr %67, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %81 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 0
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.arm_2d_region_t, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.arm_2d_location_t, ptr %83, i32 0, i32 0
  %85 = load i16, ptr %84, align 2, !tbaa !9
  %86 = sext i16 %85 to i32
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.arm_2d_region_t, ptr %87, i32 0, i32 1
  %89 = getelementptr inbounds %struct.arm_2d_size_t, ptr %88, i32 0, i32 0
  %90 = load i16, ptr %89, align 2, !tbaa !9
  %91 = sext i16 %90 to i32
  %92 = add nsw i32 %86, %91
  %93 = sub nsw i32 %92, 1
  %94 = trunc i32 %93 to i16
  store i16 %94, ptr %81, align 2, !tbaa !10
  %95 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 1
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.arm_2d_region_t, ptr %96, i32 0, i32 0
  %98 = getelementptr inbounds %struct.arm_2d_location_t, ptr %97, i32 0, i32 1
  %99 = load i16, ptr %98, align 2, !tbaa !9
  %100 = sext i16 %99 to i32
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.arm_2d_region_t, ptr %101, i32 0, i32 1
  %103 = getelementptr inbounds %struct.arm_2d_size_t, ptr %102, i32 0, i32 1
  %104 = load i16, ptr %103, align 2, !tbaa !9
  %105 = sext i16 %104 to i32
  %106 = add nsw i32 %100, %105
  %107 = sub nsw i32 %106, 1
  %108 = trunc i32 %107 to i16
  store i16 %108, ptr %95, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %109 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 0
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.arm_2d_region_t, ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %struct.arm_2d_location_t, ptr %111, i32 0, i32 0
  %113 = load i16, ptr %112, align 2, !tbaa !9
  %114 = sext i16 %113 to i32
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.arm_2d_region_t, ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %struct.arm_2d_location_t, ptr %116, i32 0, i32 0
  %118 = load i16, ptr %117, align 2, !tbaa !9
  %119 = sext i16 %118 to i32
  %120 = icmp sgt i32 %114, %119
  br i1 %120, label %121, label %127

121:                                              ; preds = %52
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.arm_2d_region_t, ptr %122, i32 0, i32 0
  %124 = getelementptr inbounds %struct.arm_2d_location_t, ptr %123, i32 0, i32 0
  %125 = load i16, ptr %124, align 2, !tbaa !9
  %126 = sext i16 %125 to i32
  br label %133

127:                                              ; preds = %52
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.arm_2d_region_t, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.arm_2d_location_t, ptr %129, i32 0, i32 0
  %131 = load i16, ptr %130, align 2, !tbaa !9
  %132 = sext i16 %131 to i32
  br label %133

133:                                              ; preds = %127, %121
  %134 = phi i32 [ %126, %121 ], [ %132, %127 ]
  %135 = trunc i32 %134 to i16
  store i16 %135, ptr %109, align 2, !tbaa !10
  %136 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 1
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.arm_2d_region_t, ptr %137, i32 0, i32 0
  %139 = getelementptr inbounds %struct.arm_2d_location_t, ptr %138, i32 0, i32 1
  %140 = load i16, ptr %139, align 2, !tbaa !9
  %141 = sext i16 %140 to i32
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.arm_2d_region_t, ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %struct.arm_2d_location_t, ptr %143, i32 0, i32 1
  %145 = load i16, ptr %144, align 2, !tbaa !9
  %146 = sext i16 %145 to i32
  %147 = icmp sgt i32 %141, %146
  br i1 %147, label %148, label %154

148:                                              ; preds = %133
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.arm_2d_region_t, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds %struct.arm_2d_location_t, ptr %150, i32 0, i32 1
  %152 = load i16, ptr %151, align 2, !tbaa !9
  %153 = sext i16 %152 to i32
  br label %160

154:                                              ; preds = %133
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.arm_2d_region_t, ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds %struct.arm_2d_location_t, ptr %156, i32 0, i32 1
  %158 = load i16, ptr %157, align 2, !tbaa !9
  %159 = sext i16 %158 to i32
  br label %160

160:                                              ; preds = %154, %148
  %161 = phi i32 [ %153, %148 ], [ %159, %154 ]
  %162 = trunc i32 %161 to i16
  store i16 %162, ptr %136, align 2, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %163 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 0
  %164 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 0
  %165 = load i16, ptr %164, align 2, !tbaa !10
  %166 = sext i16 %165 to i32
  %167 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 0
  %168 = load i16, ptr %167, align 2, !tbaa !10
  %169 = sext i16 %168 to i32
  %170 = icmp slt i32 %166, %169
  br i1 %170, label %171, label %175

171:                                              ; preds = %160
  %172 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 0
  %173 = load i16, ptr %172, align 2, !tbaa !10
  %174 = sext i16 %173 to i32
  br label %179

175:                                              ; preds = %160
  %176 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 0
  %177 = load i16, ptr %176, align 2, !tbaa !10
  %178 = sext i16 %177 to i32
  br label %179

179:                                              ; preds = %175, %171
  %180 = phi i32 [ %174, %171 ], [ %178, %175 ]
  %181 = trunc i32 %180 to i16
  store i16 %181, ptr %163, align 2, !tbaa !10
  %182 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 1
  %183 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 1
  %184 = load i16, ptr %183, align 2, !tbaa !13
  %185 = sext i16 %184 to i32
  %186 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 1
  %187 = load i16, ptr %186, align 2, !tbaa !13
  %188 = sext i16 %187 to i32
  %189 = icmp slt i32 %185, %188
  br i1 %189, label %190, label %194

190:                                              ; preds = %179
  %191 = getelementptr inbounds %struct.arm_2d_location_t, ptr %8, i32 0, i32 1
  %192 = load i16, ptr %191, align 2, !tbaa !13
  %193 = sext i16 %192 to i32
  br label %198

194:                                              ; preds = %179
  %195 = getelementptr inbounds %struct.arm_2d_location_t, ptr %9, i32 0, i32 1
  %196 = load i16, ptr %195, align 2, !tbaa !13
  %197 = sext i16 %196 to i32
  br label %198

198:                                              ; preds = %194, %190
  %199 = phi i32 [ %193, %190 ], [ %197, %194 ]
  %200 = trunc i32 %199 to i16
  store i16 %200, ptr %182, align 2, !tbaa !13
  %201 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 0
  %202 = load i16, ptr %201, align 2, !tbaa !10
  %203 = sext i16 %202 to i32
  %204 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 0
  %205 = load i16, ptr %204, align 2, !tbaa !10
  %206 = sext i16 %205 to i32
  %207 = icmp sgt i32 %203, %206
  br i1 %207, label %216, label %208

208:                                              ; preds = %198
  %209 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 1
  %210 = load i16, ptr %209, align 2, !tbaa !13
  %211 = sext i16 %210 to i32
  %212 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 1
  %213 = load i16, ptr %212, align 2, !tbaa !13
  %214 = sext i16 %213 to i32
  %215 = icmp sgt i32 %211, %214
  br i1 %215, label %216, label %217

216:                                              ; preds = %208, %198
  store i1 false, ptr %4, align 1
  store i32 1, ptr %12, align 4
  br label %248

217:                                              ; preds = %208
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = icmp ne ptr null, %218
  br i1 %219, label %220, label %247

220:                                              ; preds = %217
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.arm_2d_region_t, ptr %221, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %222, ptr align 2 %10, i64 4, i1 false), !tbaa.struct !14
  %223 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 0
  %224 = load i16, ptr %223, align 2, !tbaa !10
  %225 = sext i16 %224 to i32
  %226 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 0
  %227 = load i16, ptr %226, align 2, !tbaa !10
  %228 = sext i16 %227 to i32
  %229 = sub nsw i32 %225, %228
  %230 = add nsw i32 %229, 1
  %231 = trunc i32 %230 to i16
  %232 = load ptr, ptr %7, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.arm_2d_region_t, ptr %232, i32 0, i32 1
  %234 = getelementptr inbounds %struct.arm_2d_size_t, ptr %233, i32 0, i32 0
  store i16 %231, ptr %234, align 2, !tbaa !9
  %235 = getelementptr inbounds %struct.arm_2d_location_t, ptr %11, i32 0, i32 1
  %236 = load i16, ptr %235, align 2, !tbaa !13
  %237 = sext i16 %236 to i32
  %238 = getelementptr inbounds %struct.arm_2d_location_t, ptr %10, i32 0, i32 1
  %239 = load i16, ptr %238, align 2, !tbaa !13
  %240 = sext i16 %239 to i32
  %241 = sub nsw i32 %237, %240
  %242 = add nsw i32 %241, 1
  %243 = trunc i32 %242 to i16
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.arm_2d_region_t, ptr %244, i32 0, i32 1
  %246 = getelementptr inbounds %struct.arm_2d_size_t, ptr %245, i32 0, i32 1
  store i16 %243, ptr %246, align 2, !tbaa !9
  br label %247

247:                                              ; preds = %220, %217
  store i32 0, ptr %12, align 4
  br label %248

248:                                              ; preds = %247, %216
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %249 = load i32, ptr %12, align 4
  switch i32 %249, label %254 [
    i32 0, label %250
    i32 1, label %252
  ]

250:                                              ; preds = %248
  br label %251

251:                                              ; preds = %250
  store i1 true, ptr %4, align 1
  br label %252

252:                                              ; preds = %251, %248, %50
  %253 = load i1, ptr %4, align 1
  ret i1 %253

254:                                              ; preds = %248
  unreachable
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !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 = !{!11, !12, i64 0}
!11 = !{!"arm_2d_location_t", !12, i64 0, !12, i64 2}
!12 = !{!"short", !7, i64 0}
!13 = !{!11, !12, i64 2}
!14 = !{i64 0, i64 2, !15, i64 2, i64 2, !15}
!15 = !{!12, !12, i64 0}


; 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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local noundef zeroext i1 @arm_2d_region_intersect(ptr nocapture noundef nonnull readonly %0, ptr nocapture noundef nonnull readonly %1, ptr noundef writeonly %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 4
  %5 = load i16, ptr %4, align 2, !tbaa !5
  %6 = icmp eq i16 %5, 0
  br i1 %6, label %45, label %7

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 6
  %9 = load i16, ptr %8, align 2, !tbaa !5
  %10 = icmp eq i16 %9, 0
  br i1 %10, label %45, label %11

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i16, ptr %12, align 2, !tbaa !5
  %14 = icmp eq i16 %13, 0
  br i1 %14, label %45, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %1, i64 6
  %17 = load i16, ptr %16, align 2, !tbaa !5
  %18 = icmp eq i16 %17, 0
  br i1 %18, label %45, label %19

19:                                               ; preds = %15
  %20 = load i16, ptr %0, align 2, !tbaa !5
  %21 = add i16 %5, -1
  %22 = add i16 %21, %20
  %23 = getelementptr inbounds i8, ptr %0, i64 2
  %24 = load i16, ptr %23, align 2, !tbaa !5
  %25 = load i16, ptr %1, align 2, !tbaa !5
  %26 = add i16 %13, -1
  %27 = add i16 %26, %25
  %28 = getelementptr inbounds i8, ptr %1, i64 2
  %29 = load i16, ptr %28, align 2, !tbaa !5
  %. = tail call i16 @llvm.smax.i16(i16 %20, i16 %25)
  %.in54 = tail call i16 @llvm.smax.i16(i16 %24, i16 %29)
  %30 = tail call i16 @llvm.smin.i16(i16 %22, i16 %27)
  %31 = icmp sgt i16 %., %30
  br i1 %31, label %45, label %32

32:                                               ; preds = %19
  %33 = add i16 %17, -1
  %34 = add i16 %33, %29
  %35 = add i16 %9, -1
  %36 = add i16 %35, %24
  %37 = tail call i16 @llvm.smin.i16(i16 %36, i16 %34)
  %38 = icmp sgt i16 %.in54, %37
  br i1 %38, label %45, label %39

39:                                               ; preds = %32
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %45, label %40

40:                                               ; preds = %39
  store i16 %., ptr %2, align 2, !tbaa !8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 2
  store i16 %.in54, ptr %.sroa.6.0..sroa_idx, align 2, !tbaa !8
  %reass.sub = sub i16 %30, %.
  %41 = add i16 %reass.sub, 1
  %42 = getelementptr inbounds i8, ptr %2, i64 4
  store i16 %41, ptr %42, align 2, !tbaa !5
  %reass.sub55 = sub i16 %37, %.in54
  %43 = add i16 %reass.sub55, 1
  %44 = getelementptr inbounds i8, ptr %2, i64 6
  store i16 %43, ptr %44, align 2, !tbaa !5
  br label %45

45:                                               ; preds = %32, %19, %40, %39, %3, %7, %11, %15
  %.1 = phi i1 [ false, %15 ], [ false, %11 ], [ false, %7 ], [ false, %3 ], [ false, %32 ], [ false, %19 ], [ true, %40 ], [ true, %39 ]
  ret i1 %.1
}

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

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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 speculatable willreturn memory(none) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"short", !6, i64 0}


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