	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_reg_dma
_read_reg_dma:                          ## @read_reg_dma
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movl	%esi, %edx
	movq	%rdi, %rbx
	movslq	(%rdi), %r15
	leal	(%r15,%r14), %eax
	addq	16(%rdi), %r15
	movl	%eax, (%rdi)
	movq	_NAND_DEV_CMD_VLD@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_NAND_DEV_CMD1@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movl	%edx, %esi
	callq	_dev_cmd_reg_addr
	movl	%eax, %edx
LBB0_3:
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r15, %rcx
	movl	%r14d, %r8d
	movl	%r12d, %r9d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_prep_bam_dma_desc_cmd          ## TAILCALL
LBB0_5:
	movq	_NAND_READ_ID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	sete	%al
	movq	_NAND_FLASH_STATUS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r9d
	shll	$2, %r14d
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r15, %rcx
	movl	%r14d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_prep_adm_dma_desc              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_DEV_CMD_VLD,4,2           ## @NAND_DEV_CMD_VLD
	.comm	_NAND_DEV_CMD1,4,2              ## @NAND_DEV_CMD1
	.comm	_NAND_READ_ID,4,2               ## @NAND_READ_ID
	.comm	_NAND_FLASH_STATUS,4,2          ## @NAND_FLASH_STATUS
	.no_dead_strip	_read_reg_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_reg_dma
_read_reg_dma:                          ; @read_reg_dma
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x3
	mov	x19, x2
	mov	x2, x1
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldrsw	x9, [x0]
	add	x20, x8, x9
	add	w8, w9, w19
	str	w8, [x0]
Lloh0:
	adrp	x8, _NAND_DEV_CMD_VLD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_DEV_CMD_VLD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NAND_DEV_CMD1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_DEV_CMD1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x2
	bl	_dev_cmd_reg_addr
	mov	x2, x0
LBB0_2:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	w1, #1
	mov	x3, x20
	mov	x4, x19
	mov	x5, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_prep_bam_dma_desc_cmd
LBB0_4:
Lloh6:
	adrp	x8, _NAND_READ_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_READ_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w2, w8
Lloh9:
	adrp	x8, _NAND_FLASH_STATUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_FLASH_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ccmp	w2, w8, #4, ne
	cset	w5, eq
	lsl	w4, w19, #2
	mov	x0, x21
	mov	w1, #1
	mov	x3, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_prep_adm_dma_desc
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_DEV_CMD_VLD,4,2           ; @NAND_DEV_CMD_VLD
	.comm	_NAND_DEV_CMD1,4,2              ; @NAND_DEV_CMD1
	.comm	_NAND_READ_ID,4,2               ; @NAND_READ_ID
	.comm	_NAND_FLASH_STATUS,4,2          ; @NAND_FLASH_STATUS
	.no_dead_strip	_read_reg_dma
.subsections_via_symbols
