	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_plane_get_resources        ## -- Begin function ipu_plane_get_resources
	.p2align	4, 0x90
_ipu_plane_get_resources:               ## @ipu_plane_get_resources
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	movl	24(%rdi), %edi
	callq	_ipu_idmac_get
	movq	%rax, 48(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	48(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_2:
	movl	(%rbx), %edi
	callq	_ipu_channel_alpha_channel
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movl	%eax, %r15d
	movl	24(%rbx), %edi
	movl	%eax, %esi
	callq	_ipu_idmac_get
	movq	%rax, 40(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	40(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_11
LBB0_5:
	movl	(%rbx), %esi
	movl	24(%rbx), %edi
	callq	_ipu_dmfc_get
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	32(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_10
LBB0_7:
	movq	8(%rbx), %rsi
	xorl	%r14d, %r14d
	testq	%rsi, %rsi
	js	LBB0_11
## %bb.8:
	movl	24(%rbx), %edi
	callq	_ipu_dp_get
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	16(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.3(%rip), %rdi
LBB0_10:
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	%rbx, %rdi
	callq	_ipu_plane_put_resources
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get idmac channel: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get alpha idmac channel %d: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get dmfc: ret %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to get dp flow: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_plane_get_resources        ; -- Begin function ipu_plane_get_resources
	.p2align	2
_ipu_plane_get_resources:               ; @ipu_plane_get_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #24]
	ldr	w1, [x19]
	bl	_ipu_idmac_get
	str	x0, [x19, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #48]
	bl	_PTR_ERR
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_2:
	ldr	w0, [x19]
	bl	_ipu_channel_alpha_channel
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x21, x0
	ldr	w0, [x19, #24]
	mov	x1, x21
	bl	_ipu_idmac_get
	str	x0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #40]
	bl	_PTR_ERR
	mov	x20, x0
	str	x20, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_DRM_ERROR
	b	LBB0_12
LBB0_5:
	ldr	w0, [x19, #24]
	ldr	w1, [x19]
	bl	_ipu_dmfc_get
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x19, #32]
	bl	_PTR_ERR
	mov	x20, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	mov	x1, x20
	bl	_DRM_ERROR
	mov	x0, x19
	bl	_ipu_plane_put_resources
	b	LBB0_12
LBB0_8:
	ldr	x1, [x19, #8]
	tbnz	x1, #63, LBB0_11
; %bb.9:
	ldr	w0, [x19, #24]
	bl	_ipu_dp_get
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_11:
	mov	w20, #0
LBB0_12:
	mov	x0, 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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get idmac channel: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get alpha idmac channel %d: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get dmfc: ret %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to get dp flow: %d\n"

.subsections_via_symbols
