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

; 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_op_control = type { %struct.anon.22 }
%struct.anon.22 = type { ptr, %struct.anon.23, %struct.anon.24, i16, i16, i16, i16, ptr, %union.anon.25 }
%struct.anon.23 = type { ptr, ptr }
%struct.anon.24 = type { ptr, ptr }
%union.anon.25 = type { %struct.arm_2d_op_trans_msk_opa_t }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.65, %struct.anon.66, %union.anon.67, %struct.anon.69, %struct.anon.70, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { %struct.anon.26, i64 }
%struct.anon.26 = type { ptr, ptr, %struct.anon.27, i8, %union.arm_2d_op_status_t, %struct.arm_2d_op_evt_t }
%struct.anon.27 = type { i8 }
%union.arm_2d_op_status_t = type { %struct.anon.28 }
%struct.anon.28 = type { i16 }
%struct.arm_2d_op_evt_t = type { ptr, ptr }
%struct.anon.65 = type { ptr, ptr }
%struct.anon.66 = type { ptr }
%union.anon.67 = type { %struct.anon.68 }
%struct.anon.68 = type { i32 }
%struct.anon.69 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.6, %union.anon.15, %union.anon.16 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i8, %union.arm_2d_color_info_t, %union.anon.8 }
%union.arm_2d_color_info_t = type { %struct.anon }
%struct.anon = type { i8 }
%union.anon.8 = type { i16 }
%union.anon.15 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.1, %union.anon.2 }
%union.anon.1 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.2 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.16 = type { ptr }
%struct.anon.70 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.3, %struct.anon.4 }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.3 = type { i32 }
%struct.anon.4 = type { %struct.arm_2d_location_t, %struct.anon.5 }
%struct.anon.5 = type { %struct.arm_2d_region_t, %struct.arm_2d_tile_t }
%struct.arm_2d_runtime_feature_t = type { i8 }
%struct.arm_2d_op_trans_t = type { %struct.arm_2d_op_core_t, %struct.anon.55, %struct.anon.56, %union.anon.57, %struct.anon.59, %struct.__arm_2d_transform_info_t }
%struct.anon.55 = type { ptr, ptr }
%struct.anon.56 = type { ptr }
%union.anon.57 = type { %struct.anon.58 }
%struct.anon.58 = type { i32 }
%struct.anon.59 = type { ptr, %struct.arm_2d_tile_t }
%struct.anon.77 = type { %union.arm_2d_color_info_t, %union.anon.78, i8, i8, %union.anon.80, %union.anon.84 }
%union.anon.78 = type { %struct.anon.79 }
%struct.anon.79 = type { i8 }
%union.anon.80 = type { %struct.anon.81 }
%struct.anon.81 = type { i8, i8 }
%union.anon.84 = type { [2 x ptr] }

@.str.1 = external hidden unnamed_addr constant [87 x i8], align 1
@ARM_2D_CTRL = external global %struct.__arm_2d_op_control, align 8
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__.arm_2dp_tile_transform_xy = external hidden unnamed_addr constant [138 x i8], align 1
@ARM_2D_RUNTIME_FEATURE = external global %struct.arm_2d_runtime_feature_t, align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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) #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: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

18:                                               ; preds = %4
  br label %20

19:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1516, ptr noundef @__PRETTY_FUNCTION__.arm_2dp_tile_transform_xy) #6
  unreachable

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %21, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = icmp eq ptr null, %22
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  store ptr getelementptr inbounds (%struct.anon.22, ptr @ARM_2D_CTRL, i32 0, i32 8), ptr %10, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %24, %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call zeroext i1 @__arm_2d_op_acquire(ptr noundef %26)
  br i1 %27, label %29, label %28

28:                                               ; preds = %25
  store i32 1, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %119

29:                                               ; preds = %25
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.arm_2d_op_trans_t, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %31, align 8
  %33 = lshr i32 %32, 31
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %38

35:                                               ; preds = %29
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call i32 @__arm_2d_op_depose(ptr noundef %36, i32 noundef -13)
  store i32 -13, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %119

38:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %39 = getelementptr inbounds %struct.arm_2d_region_t, ptr %13, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 2 %39, i8 0, i64 4, i1 false)
  %40 = getelementptr inbounds %struct.arm_2d_region_t, ptr %13, i32 0, i32 1
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %41, i32 0, i32 1
  %43 = getelementptr inbounds %struct.arm_2d_region_t, ptr %42, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %40, ptr align 4 %43, i64 4, i1 false), !tbaa.struct !9
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = icmp eq ptr null, %44
  br i1 %45, label %46, label %47

46:                                               ; preds = %38
  store ptr %13, ptr %8, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %46, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = ptrtoint ptr %48 to i64
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.arm_2d_op_trans_t, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.arm_2d_op_core_t, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.anon.26, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !12
  %55 = getelementptr inbounds %struct.anon.77, ptr %54, i32 0, i32 2
  %56 = load i8, ptr %55, align 2, !tbaa !30
  %57 = zext i8 %56 to i64
  %58 = add i64 %49, %57
  %59 = inttoptr i64 %58 to ptr
  store ptr %59, ptr %14, align 8, !tbaa !5
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.__arm_2d_transform_info_t, ptr %62, i32 0, i32 5
  %64 = getelementptr inbounds %struct.anon.4, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.anon.5, ptr %64, i32 0, i32 1
  %66 = call ptr @arm_2d_tile_generate_child(ptr noundef %60, ptr noundef %61, ptr noundef %65, i1 noundef zeroext false)
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.arm_2d_op_trans_t, ptr %67, i32 0, i32 1
  %69 = getelementptr inbounds %struct.anon.55, ptr %68, i32 0, i32 0
  store ptr %66, ptr %69, align 8, !tbaa !31
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.arm_2d_op_trans_t, ptr %70, i32 0, i32 1
  %72 = getelementptr inbounds %struct.anon.55, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !31
  %74 = icmp eq ptr null, %73
  br i1 %74, label %75, label %84

75:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 -3, ptr %15, align 4, !tbaa !32
  %76 = load i8, ptr @ARM_2D_RUNTIME_FEATURE, align 1
  %77 = and i8 %76, 1
  %78 = icmp ne i8 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %75
  store i32 0, ptr %15, align 4, !tbaa !32
  br label %80

80:                                               ; preds = %79, %75
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = load i32, ptr %15, align 4, !tbaa !32
  %83 = call i32 @__arm_2d_op_depose(ptr noundef %81, i32 noundef %82)
  store i32 %83, ptr %5, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %118

84:                                               ; preds = %47
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = icmp ne ptr null, %85
  br i1 %86, label %87, label %110

87:                                               ; preds = %84
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %88, i32 0, i32 0
  %90 = load float, ptr %89, align 4, !tbaa !34
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.arm_2d_region_t, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.arm_2d_location_t, ptr %92, i32 0, i32 0
  %94 = load i16, ptr %93, align 2, !tbaa !30
  %95 = sext i16 %94 to i32
  %96 = sitofp i32 %95 to float
  %97 = fsub float %90, %96
  %98 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %11, i32 0, i32 0
  store float %97, ptr %98, align 4, !tbaa !34
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %99, i32 0, i32 1
  %101 = load float, ptr %100, align 4, !tbaa !35
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.arm_2d_region_t, ptr %102, i32 0, i32 0
  %104 = getelementptr inbounds %struct.arm_2d_location_t, ptr %103, i32 0, i32 1
  %105 = load i16, ptr %104, align 2, !tbaa !30
  %106 = sext i16 %105 to i32
  %107 = sitofp i32 %106 to float
  %108 = fsub float %101, %107
  %109 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %11, i32 0, i32 1
  store float %108, ptr %109, align 4, !tbaa !35
  store ptr %11, ptr %9, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %87, %84
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.arm_2d_op_trans_t, ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %struct.anon.55, ptr %112, i32 0, i32 1
  store ptr null, ptr %113, align 8, !tbaa !36
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  call void @__arm_2d_transform_preprocess_target(ptr noundef %114, ptr noundef %115)
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = call i32 @__arm_2d_op_invoke(ptr noundef %116)
  store i32 %117, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %118

118:                                              ; preds = %110, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %119

119:                                              ; preds = %118, %35, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %120 = load i32, ptr %5, align 4
  ret i32 %120
}

declare zeroext i1 @__arm_2d_op_acquire(ptr noundef) #5

declare i32 @__arm_2d_op_depose(ptr noundef, i32 noundef) #5

declare ptr @arm_2d_tile_generate_child(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #5

; Function Attrs: nounwind uwtable
declare hidden void @__arm_2d_transform_preprocess_target(ptr noundef, ptr noundef) #4

declare i32 @__arm_2d_op_invoke(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { 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 2, !10, i64 2, i64 2, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"arm_2d_op_trans_t", !14, i64 0, !19, i64 48, !20, i64 64, !7, i64 72, !21, i64 80, !23, i64 112}
!14 = !{!"arm_2d_op_core_t", !15, i64 0, !18, i64 40}
!15 = !{!"", !6, i64 0, !6, i64 8, !16, i64 16, !7, i64 17, !7, i64 18, !17, i64 24}
!16 = !{!"", !7, i64 0}
!17 = !{!"arm_2d_op_evt_t", !6, i64 0, !6, i64 8}
!18 = !{!"long", !7, i64 0}
!19 = !{!"", !6, i64 0, !6, i64 8}
!20 = !{!"", !6, i64 0}
!21 = !{!"", !6, i64 0, !22, i64 8}
!22 = !{!"arm_2d_tile_t", !7, i64 0, !7, i64 4, !7, i64 16}
!23 = !{!"__arm_2d_transform_info_t", !24, i64 0, !24, i64 4, !24, i64 8, !25, i64 12, !7, i64 20, !26, i64 24}
!24 = !{!"float", !7, i64 0}
!25 = !{!"arm_2d_point_float_t", !24, i64 0, !24, i64 4}
!26 = !{!"", !27, i64 0, !28, i64 8}
!27 = !{!"arm_2d_location_t", !11, i64 0, !11, i64 2}
!28 = !{!"", !29, i64 0, !22, i64 8}
!29 = !{!"arm_2d_region_t", !7, i64 0, !7, i64 4}
!30 = !{!7, !7, i64 0}
!31 = !{!13, !6, i64 48}
!32 = !{!33, !33, i64 0}
!33 = !{!"int", !7, i64 0}
!34 = !{!25, !24, i64 0}
!35 = !{!25, !24, i64 4}
!36 = !{!13, !6, i64 56}


; 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.__arm_2d_op_control = type { %struct.anon.22 }
%struct.anon.22 = type { ptr, %struct.anon.23, %struct.anon.24, i16, i16, i16, i16, ptr, %union.anon.25 }
%struct.anon.23 = type { ptr, ptr }
%struct.anon.24 = type { ptr, ptr }
%union.anon.25 = type { %struct.arm_2d_op_trans_msk_opa_t }
%struct.arm_2d_op_trans_msk_opa_t = type { %struct.arm_2d_op_core_t, %struct.anon.65, %struct.anon.66, %union.anon.67, %struct.anon.69, %struct.anon.70, %struct.__arm_2d_transform_info_t, i8 }
%struct.arm_2d_op_core_t = type { %struct.anon.26, i64 }
%struct.anon.26 = type { ptr, ptr, %struct.anon.27, i8, %union.arm_2d_op_status_t, %struct.arm_2d_op_evt_t }
%struct.anon.27 = type { i8 }
%union.arm_2d_op_status_t = type { %struct.anon.28 }
%struct.anon.28 = type { i16 }
%struct.arm_2d_op_evt_t = type { ptr, ptr }
%struct.anon.65 = type { ptr, ptr }
%struct.anon.66 = type { ptr }
%union.anon.67 = type { %struct.anon.68 }
%struct.anon.68 = type { i32 }
%struct.anon.69 = type { ptr, %struct.arm_2d_tile_t }
%struct.arm_2d_tile_t = type { %union.anon.6, %union.anon.15, %union.anon.16 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i8, %union.arm_2d_color_info_t, %union.anon.8 }
%union.arm_2d_color_info_t = type { %struct.anon }
%struct.anon = type { i8 }
%union.anon.8 = type { i16 }
%union.anon.15 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.1, %union.anon.2 }
%union.anon.1 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.2 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.16 = type { ptr }
%struct.anon.70 = type { ptr, ptr }
%struct.__arm_2d_transform_info_t = type { float, float, float, %struct.arm_2d_point_float_t, %union.anon.3, %struct.anon.4 }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.3 = type { i32 }
%struct.anon.4 = type { %struct.arm_2d_location_t, %struct.anon.5 }
%struct.anon.5 = type { %struct.arm_2d_region_t, %struct.arm_2d_tile_t }
%struct.arm_2d_runtime_feature_t = type { i8 }

@ARM_2D_CTRL = external global %struct.__arm_2d_op_control, align 8
@ARM_2D_RUNTIME_FEATURE = external local_unnamed_addr global %struct.arm_2d_runtime_feature_t, align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @arm_2dp_tile_transform_xy(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %2, ptr noundef readonly %3) local_unnamed_addr #1 {
  %5 = alloca %struct.arm_2d_point_float_t, align 8
  %6 = alloca %struct.arm_2d_region_t, align 4
  %7 = icmp eq ptr %0, null
  %spec.store.select = select i1 %7, ptr getelementptr inbounds (i8, ptr @ARM_2D_CTRL, i64 56), ptr %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %8 = tail call zeroext i1 @__arm_2d_op_acquire(ptr noundef nonnull %spec.store.select) #3
  br i1 %8, label %9, label %48

9:                                                ; preds = %4
  %10 = getelementptr inbounds i8, ptr %spec.store.select, i64 72
  %11 = load i32, ptr %10, align 8
  %.not = icmp sgt i32 %11, -1
  br i1 %.not, label %14, label %12

12:                                               ; preds = %9
  %13 = tail call i32 @__arm_2d_op_depose(ptr noundef nonnull %spec.store.select, i32 noundef -13) #3
  br label %48

14:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store i32 0, ptr %6, align 4
  %15 = getelementptr inbounds i8, ptr %6, i64 4
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load i32, ptr %16, align 4
  store i32 %17, ptr %15, align 4
  %18 = icmp eq ptr %2, null
  %spec.store.select1 = select i1 %18, ptr %6, ptr %2
  %19 = ptrtoint ptr %spec.store.select to i64
  %20 = getelementptr inbounds i8, ptr %spec.store.select, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 2
  %23 = load i8, ptr %22, align 2, !tbaa !27
  %24 = zext i8 %23 to i64
  %25 = add i64 %24, %19
  %26 = inttoptr i64 %25 to ptr
  %27 = getelementptr inbounds i8, ptr %26, i64 40
  %28 = call ptr @arm_2d_tile_generate_child(ptr noundef nonnull %1, ptr noundef nonnull %spec.store.select1, ptr noundef nonnull %27, i1 noundef zeroext false) #3
  %29 = getelementptr inbounds i8, ptr %spec.store.select, i64 48
  store ptr %28, ptr %29, align 8, !tbaa !28
  %30 = icmp eq ptr %28, null
  br i1 %30, label %31, label %35

31:                                               ; preds = %14
  %32 = load i8, ptr @ARM_2D_RUNTIME_FEATURE, align 1
  %33 = and i8 %32, 1
  %.not32 = icmp eq i8 %33, 0
  %spec.store.select2 = select i1 %.not32, i32 -3, i32 0
  %34 = call i32 @__arm_2d_op_depose(ptr noundef nonnull %spec.store.select, i32 noundef %spec.store.select2) #3
  br label %47

35:                                               ; preds = %14
  %.not31 = icmp eq ptr %3, null
  br i1 %.not31, label %44, label %36

36:                                               ; preds = %35
  %37 = load i16, ptr %spec.store.select1, align 2, !tbaa !27
  %spec.store.select1.sroa.sel.v.sroa.sel.v.sroa.sel.v = select i1 %18, ptr %6, ptr %2
  %spec.store.select1.sroa.sel.v.sroa.sel.v.sroa.sel = getelementptr inbounds i8, ptr %spec.store.select1.sroa.sel.v.sroa.sel.v.sroa.sel.v, i64 2
  %38 = load i16, ptr %spec.store.select1.sroa.sel.v.sroa.sel.v.sroa.sel, align 2, !tbaa !27
  %39 = load <2 x float>, ptr %3, align 4, !tbaa !29
  %40 = insertelement <2 x i16> poison, i16 %37, i64 0
  %41 = insertelement <2 x i16> %40, i16 %38, i64 1
  %42 = sitofp <2 x i16> %41 to <2 x float>
  %43 = fsub <2 x float> %39, %42
  store <2 x float> %43, ptr %5, align 8, !tbaa !29
  br label %44

44:                                               ; preds = %36, %35
  %.028 = phi ptr [ %5, %36 ], [ null, %35 ]
  %45 = getelementptr inbounds i8, ptr %spec.store.select, i64 56
  store ptr null, ptr %45, align 8, !tbaa !30
  call void @__arm_2d_transform_preprocess_target(ptr noundef nonnull %spec.store.select, ptr noundef %.028)
  %46 = call i32 @__arm_2d_op_invoke(ptr noundef nonnull %spec.store.select) #3
  br label %47

47:                                               ; preds = %44, %31
  %.0 = phi i32 [ %34, %31 ], [ %46, %44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %48

48:                                               ; preds = %4, %47, %12
  %.1 = phi i32 [ -13, %12 ], [ %.0, %47 ], [ 1, %4 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i32 %.1
}

declare zeroext i1 @__arm_2d_op_acquire(ptr noundef) local_unnamed_addr #2

declare i32 @__arm_2d_op_depose(ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @arm_2d_tile_generate_child(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @__arm_2d_transform_preprocess_target(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @__arm_2d_op_invoke(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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, !9, i64 8}
!6 = !{!"arm_2d_op_trans_t", !7, i64 0, !15, i64 48, !16, i64 64, !10, i64 72, !17, i64 80, !19, i64 112}
!7 = !{!"arm_2d_op_core_t", !8, i64 0, !14, i64 40}
!8 = !{!"", !9, i64 0, !9, i64 8, !12, i64 16, !10, i64 17, !10, i64 18, !13, i64 24}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"", !10, i64 0}
!13 = !{!"arm_2d_op_evt_t", !9, i64 0, !9, i64 8}
!14 = !{!"long", !10, i64 0}
!15 = !{!"", !9, i64 0, !9, i64 8}
!16 = !{!"", !9, i64 0}
!17 = !{!"", !9, i64 0, !18, i64 8}
!18 = !{!"arm_2d_tile_t", !10, i64 0, !10, i64 4, !10, i64 16}
!19 = !{!"__arm_2d_transform_info_t", !20, i64 0, !20, i64 4, !20, i64 8, !21, i64 12, !10, i64 20, !22, i64 24}
!20 = !{!"float", !10, i64 0}
!21 = !{!"arm_2d_point_float_t", !20, i64 0, !20, i64 4}
!22 = !{!"", !23, i64 0, !25, i64 8}
!23 = !{!"arm_2d_location_t", !24, i64 0, !24, i64 2}
!24 = !{!"short", !10, i64 0}
!25 = !{!"", !26, i64 0, !18, i64 8}
!26 = !{!"arm_2d_region_t", !10, i64 0, !10, i64 4}
!27 = !{!10, !10, i64 0}
!28 = !{!6, !9, i64 48}
!29 = !{!20, !20, i64 0}
!30 = !{!6, !9, i64 56}


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