	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_nfc_dma_buffer_setup
_meson_nfc_dma_buffer_setup:            ## @meson_nfc_dma_buffer_setup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %r15d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, %rbx
	callq	_nand_get_controller_data
	movq	%rax, %r13
	movl	24(%rax), %edi
	movq	%rbx, %rsi
	movl	%r12d, %ebx
	movl	%r12d, %edx
	movl	%r14d, %ecx
	callq	_dma_map_single
	movq	%rax, 16(%r13)
	movl	24(%r13), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	movl	24(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	_NFC_CMD_ADL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r13), %rsi
	callq	_GENCMDDADDRL
	movq	_NFC_REG_CMD@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_NFC_CMD_ADH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r13), %rsi
	callq	_GENCMDDADDRH
	movq	(%rbx), %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	xorl	%r12d, %r12d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:
	movl	24(%r13), %edi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_dma_map_single
	movq	%rax, 8(%r13)
	movl	24(%r13), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	movl	24(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	24(%r13), %edi
	movq	16(%r13), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_dma_unmap_single
	movl	%ebx, %r12d
	jmp	LBB0_6
LBB0_5:
	movq	_NFC_CMD_AIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rsi
	callq	_GENCMDIADDRL
	movq	_NFC_REG_CMD@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_NFC_CMD_AIH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rsi
	callq	_GENCMDIADDRH
	movq	(%rbx), %rsi
	addq	(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA mapping error\n"

	.comm	_NFC_CMD_ADL,4,2                ## @NFC_CMD_ADL
	.comm	_NFC_REG_CMD,8,3                ## @NFC_REG_CMD
	.comm	_NFC_CMD_ADH,4,2                ## @NFC_CMD_ADH
	.comm	_NFC_CMD_AIL,4,2                ## @NFC_CMD_AIL
	.comm	_NFC_CMD_AIH,4,2                ## @NFC_CMD_AIH
	.no_dead_strip	_meson_nfc_dma_buffer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_nfc_dma_buffer_setup
_meson_nfc_dma_buffer_setup:            ; @meson_nfc_dma_buffer_setup
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x5
	mov	x22, x4
	mov	x23, x3
	mov	x21, x2
	mov	x24, x1
	bl	_nand_get_controller_data
	mov	x19, x0
	ldr	w0, [x0, #24]
	mov	x1, x24
	mov	x2, x21
	mov	x3, x20
	bl	_dma_map_single
	mov	x1, x0
	str	x0, [x19, #16]
	ldr	w0, [x19, #24]
	bl	_dma_mapping_error
	cbz	w0, LBB0_3
; %bb.1:
	mov	x24, x0
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_2:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh2:
	adrp	x8, _NFC_CMD_ADL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NFC_CMD_ADL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_GENCMDDADDRL
	ldr	x8, [x19]
Lloh5:
	adrp	x25, _NFC_REG_CMD@GOTPAGE
Lloh6:
	ldr	x25, [x25, _NFC_REG_CMD@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
Lloh7:
	adrp	x8, _NFC_CMD_ADH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NFC_CMD_ADH@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	x1, [x19, #16]
	bl	_GENCMDDADDRH
	ldr	x8, [x19]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	cbz	x23, LBB0_6
; %bb.4:
	ldr	w0, [x19, #24]
	mov	x1, x23
	mov	x2, x22
	mov	x3, x20
	bl	_dma_map_single
	mov	x1, x0
	str	x0, [x19, #8]
	ldr	w0, [x19, #24]
	bl	_dma_mapping_error
	mov	x24, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w0, [x19, #24]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #24]
	ldr	x1, [x19, #16]
	mov	x2, x21
	mov	x3, x20
	bl	_dma_unmap_single
	b	LBB0_2
LBB0_6:
	mov	w24, #0
	b	LBB0_2
LBB0_7:
Lloh12:
	adrp	x8, _NFC_CMD_AIL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NFC_CMD_AIL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	x1, [x19, #8]
	bl	_GENCMDIADDRL
	ldr	x8, [x19]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
Lloh15:
	adrp	x8, _NFC_CMD_AIH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NFC_CMD_AIH@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	x1, [x19, #8]
	bl	_GENCMDIADDRH
	ldr	x8, [x19]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA mapping error\n"

	.comm	_NFC_CMD_ADL,4,2                ; @NFC_CMD_ADL
	.comm	_NFC_REG_CMD,8,3                ; @NFC_REG_CMD
	.comm	_NFC_CMD_ADH,4,2                ; @NFC_CMD_ADH
	.comm	_NFC_CMD_AIL,4,2                ; @NFC_CMD_AIL
	.comm	_NFC_CMD_AIH,4,2                ; @NFC_CMD_AIH
	.no_dead_strip	_meson_nfc_dma_buffer_setup
.subsections_via_symbols
