	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_controller_finished
_wait_controller_finished:              ## @wait_controller_finished
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_HINFC504_NFC_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	addq	%rdi, %r14
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	_HINFC504_STATUS@GOTPCREL(%rip), %r15
	movq	_NAND_CMD_ERASE2@GOTPCREL(%rip), %r13
	movq	_HINFC504_READY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_hinfc_read
	movq	(%rbx), %rcx
	andl	(%r12), %eax
	cmpq	(%r13), %rcx
	je	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_2
LBB0_8:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_3:
	testl	%eax, %eax
	jne	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_hinfc_read
	testl	%eax, (%r12)
	je	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HINFC504_NFC_TIMEOUT,8,3       ## @HINFC504_NFC_TIMEOUT
	.comm	_HINFC504_STATUS,4,2            ## @HINFC504_STATUS
	.comm	_NAND_CMD_ERASE2,8,3            ## @NAND_CMD_ERASE2
	.comm	_HINFC504_READY,4,2             ## @HINFC504_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait NAND controller exec cmd timeout.\n"

	.no_dead_strip	_wait_controller_finished
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_controller_finished
_wait_controller_finished:              ; @wait_controller_finished
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh2:
	adrp	x8, _HINFC504_NFC_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HINFC504_NFC_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x20, x8, x0
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_5
; %bb.1:
Lloh5:
	adrp	x21, _HINFC504_STATUS@GOTPAGE
Lloh6:
	ldr	x21, [x21, _HINFC504_STATUS@GOTPAGEOFF]
Lloh7:
	adrp	x24, _NAND_CMD_ERASE2@GOTPAGE
Lloh8:
	ldr	x24, [x24, _NAND_CMD_ERASE2@GOTPAGEOFF]
Lloh9:
	adrp	x22, _HINFC504_READY@GOTPAGE
Lloh10:
	ldr	x22, [x22, _HINFC504_READY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hinfc_read
	ldr	x9, [x19]
	ldr	x10, [x24]
	ldr	w8, [x22]
	and	w8, w8, w0
	cmp	x9, x10
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w8, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_err
LBB0_6:
	cbnz	w8, LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x19
	bl	_hinfc_read
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HINFC504_NFC_TIMEOUT,8,3       ; @HINFC504_NFC_TIMEOUT
	.comm	_HINFC504_STATUS,4,2            ; @HINFC504_STATUS
	.comm	_NAND_CMD_ERASE2,8,3            ; @NAND_CMD_ERASE2
	.comm	_HINFC504_READY,4,2             ; @HINFC504_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait NAND controller exec cmd timeout.\n"

	.no_dead_strip	_wait_controller_finished
.subsections_via_symbols
