	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_dmac_parse_of
_rcar_dmac_parse_of:                    ## @rcar_dmac_parse_of
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r15), %edx
	testl	%edx, %edx
	jle	LBB0_4
## %bb.3:
	movq	_RCAR_DMAC_MAX_CHANNELS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_4
## %bb.5:
	decl	%edx
	xorl	%ebx, %ebx
	movl	%edx, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, 4(%r15)
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %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	"dma-channels"

L_.str.1:                               ## @.str.1
	.asciz	"unable to read dma-channels property\n"

	.comm	_RCAR_DMAC_MAX_CHANNELS,4,2     ## @RCAR_DMAC_MAX_CHANNELS
L_.str.2:                               ## @.str.2
	.asciz	"invalid number of channels %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rcar_dmac_parse_of
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_dmac_parse_of
_rcar_dmac_parse_of:                    ; @rcar_dmac_parse_of
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_of_property_read_u32
	tbnz	w0, #31, LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _RCAR_DMAC_MAX_CHANNELS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RCAR_DMAC_MAX_CHANNELS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	subs	w0, w8, #1
	ccmp	w8, w9, #0, ge
	b.lt	LBB0_4
; %bb.2:
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_3:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	mov	w1, #0
	bl	_GENMASK
	mov	w21, #0
	str	w0, [x20, #4]
LBB0_5:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma-channels"

l_.str.1:                               ; @.str.1
	.asciz	"unable to read dma-channels property\n"

	.comm	_RCAR_DMAC_MAX_CHANNELS,4,2     ; @RCAR_DMAC_MAX_CHANNELS
l_.str.2:                               ; @.str.2
	.asciz	"invalid number of channels %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rcar_dmac_parse_of
.subsections_via_symbols
