	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_format_get_plane_sizes
_dpu_format_get_plane_sizes:            ## @dpu_format_get_plane_sizes
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rcx, %r13
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.4:
	movq	%rsi, %r12
	movq	_DPU_MAX_IMG_WIDTH@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jl	LBB0_6
## %bb.5:
	movq	%rdx, %r15
	movq	_DPU_MAX_IMG_HEIGHT@GOTPCREL(%rip), %rax
	cmpq	%rdx, (%rax)
	jl	LBB0_6
## %bb.7:
	movq	%r8, %r14
	movq	%rdi, %rbx
	callq	_DPU_FORMAT_IS_UBWC
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:
	movq	%rbx, %rdi
	callq	_DPU_FORMAT_IS_TILE
	testq	%rax, %rax
	je	LBB0_9
LBB0_10:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r13, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__dpu_format_get_plane_sizes_ubwc ## TAILCALL
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__dpu_format_get_plane_sizes_linear ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid pointer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DPU_MAX_IMG_WIDTH,8,3          ## @DPU_MAX_IMG_WIDTH
	.comm	_DPU_MAX_IMG_HEIGHT,8,3         ## @DPU_MAX_IMG_HEIGHT
L_.str.1:                               ## @.str.1
	.asciz	"image dimensions outside max range\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_dpu_format_get_plane_sizes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_format_get_plane_sizes
_dpu_format_get_plane_sizes:            ; @dpu_format_get_plane_sizes
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x3
	cbz	x3, LBB0_4
; %bb.2:
	mov	x21, x2
	mov	x22, x1
Lloh0:
	adrp	x8, _DPU_MAX_IMG_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPU_MAX_IMG_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DPU_MAX_IMG_HEIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DPU_MAX_IMG_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x1
	ccmp	x9, x2, #8, ge
	b.ge	LBB0_6
; %bb.3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _ERANGE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x20, x4
	mov	x23, x0
	bl	_DPU_FORMAT_IS_UBWC
	cbnz	x0, LBB0_8
; %bb.7:
	mov	x0, x23
	bl	_DPU_FORMAT_IS_TILE
	cbz	x0, LBB0_9
LBB0_8:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	__dpu_format_get_plane_sizes_ubwc
LBB0_9:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	mov	x4, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	__dpu_format_get_plane_sizes_linear
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid pointer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DPU_MAX_IMG_WIDTH,8,3          ; @DPU_MAX_IMG_WIDTH
	.comm	_DPU_MAX_IMG_HEIGHT,8,3         ; @DPU_MAX_IMG_HEIGHT
l_.str.1:                               ; @.str.1
	.asciz	"image dimensions outside max range\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_dpu_format_get_plane_sizes
.subsections_via_symbols
