	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_du_plane_hwalloc
_rcar_du_plane_hwalloc:                 ## @rcar_du_plane_hwalloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rsi), %rax
	movq	_RCAR_DU_PLANE_VSPD0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
LBB0_3:
	movq	_RCAR_DU_PLANE_VSPD1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	(%rdi), %rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	sete	%cl
	jmp	LBB0_14
LBB0_5:
	movq	_RCAR_DU_NUM_HW_PLANES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.6:
	movq	8(%rsi), %rcx
	movl	(%rcx), %edi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	leal	1(%rsi), %ecx
	movl	%esi, %eax
	cmpl	$1, %ecx
	jle	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rax), %esi
	btl	%esi, %edx
	jae	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$1, %edi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ecx
	andb	$7, %cl
	movzbl	%cl, %ecx
	btl	%ecx, %edx
	jae	LBB0_7
LBB0_11:
	decl	%eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_13:
	xorl	%ecx, %ecx
LBB0_14:
	movq	_EBUSY@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	subl	(%rsi), %eax
	btl	%ecx, %edx
	cmovbl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_15:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCAR_DU_PLANE_VSPD0,8,3        ## @RCAR_DU_PLANE_VSPD0
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RCAR_DU_PLANE_VSPD1,8,3        ## @RCAR_DU_PLANE_VSPD1
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RCAR_DU_NUM_HW_PLANES,4,2      ## @RCAR_DU_NUM_HW_PLANES
	.no_dead_strip	_rcar_du_plane_hwalloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_du_plane_hwalloc
_rcar_du_plane_hwalloc:                 ; @rcar_du_plane_hwalloc
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _RCAR_DU_PLANE_VSPD0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RCAR_DU_PLANE_VSPD0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_3:
Lloh5:
	adrp	x9, _RCAR_DU_PLANE_VSPD1@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RCAR_DU_PLANE_VSPD1@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x0]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w8, eq
LBB0_5:
Lloh8:
	adrp	x9, _EBUSY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	lsr	w10, w2, w8
	tst	w10, #0x1
	csneg	w0, w8, w9, ne
LBB0_6:
	ret
LBB0_7:
Lloh11:
	adrp	x8, _RCAR_DU_NUM_HW_PLANES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RCAR_DU_NUM_HW_PLANES@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.8:
	ldr	x8, [x1, #8]
	ldr	w8, [x8]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w10, w0, #1
	mov	x9, x0
	cmp	w10, #1
	b.le	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	sub	w0, w9, #1
	lsr	w10, w2, w0
	tbz	w10, #0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	and	w9, w9, #0x7
	lsr	w9, w2, w9
	tbz	w9, #0, LBB0_9
	b	LBB0_6
LBB0_13:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_DU_PLANE_VSPD0,8,3        ; @RCAR_DU_PLANE_VSPD0
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RCAR_DU_PLANE_VSPD1,8,3        ; @RCAR_DU_PLANE_VSPD1
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RCAR_DU_NUM_HW_PLANES,4,2      ; @RCAR_DU_NUM_HW_PLANES
	.no_dead_strip	_rcar_du_plane_hwalloc
.subsections_via_symbols
