	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_nandc_read_byte
_qcom_nandc_read_byte:                  ## @qcom_nandc_read_byte
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_to_qcom_nand_host
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_get_qcom_nand_controller
	movq	%rax, %rcx
	movq	(%r14), %rax
	movq	_NAND_CMD_STATUS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
## %bb.1:
	movl	8(%r14), %eax
	movq	_NAND_STATUS_READY@GOTPCREL(%rip), %rcx
	movq	_NAND_STATUS_WP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	%edx, 8(%r14)
	jmp	LBB0_4
LBB0_2:
	movq	8(%rcx), %rdx
	xorl	%eax, %eax
	cmpq	16(%rcx), %rdx
	jge	LBB0_4
## %bb.3:
	movq	(%rcx), %rax
	leaq	1(%rdx), %rsi
	movq	%rsi, 8(%rcx)
	movl	(%rax,%rdx,4), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_STATUS,8,3            ## @NAND_CMD_STATUS
	.comm	_NAND_STATUS_READY,4,2          ## @NAND_STATUS_READY
	.comm	_NAND_STATUS_WP,4,2             ## @NAND_STATUS_WP
	.no_dead_strip	_qcom_nandc_read_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_nandc_read_byte
_qcom_nandc_read_byte:                  ; @qcom_nandc_read_byte
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_to_qcom_nand_host
	mov	x19, x0
	mov	x0, x20
	bl	_get_qcom_nand_controller
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _NAND_CMD_STATUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_CMD_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _NAND_STATUS_READY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_STATUS_READY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NAND_STATUS_WP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_STATUS_WP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_5
LBB0_2:
	ldp	x8, x9, [x0, #8]
	cmp	x8, x9
	b.ge	LBB0_4
; %bb.3:
	ldr	x9, [x0]
	add	x10, x8, #1
	str	x10, [x0, #8]
	ldr	w0, [x9, x8, lsl #2]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_STATUS,8,3            ; @NAND_CMD_STATUS
	.comm	_NAND_STATUS_READY,4,2          ; @NAND_STATUS_READY
	.comm	_NAND_STATUS_WP,4,2             ; @NAND_STATUS_WP
	.no_dead_strip	_qcom_nandc_read_byte
.subsections_via_symbols
