	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_onenand_bbt_wait
_s3c_onenand_bbt_wait:                  ## @s3c_onenand_bbt_wait
	.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	_INT_ACT@GOTPCREL(%rip), %rax
	movq	_LOAD_CMP@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	orl	(%rax), %r14d
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	movl	$20, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r13, %rbx
	movq	_INT_ERR_STAT_OFFSET@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edi
	callq	_s3c_read_reg
	testl	%eax, %r14d
	je	LBB0_1
LBB0_3:
	movl	(%r13), %edi
	callq	_s3c_read_reg
	movq	%rax, %rbx
	movq	_INT_ERR_ACK_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_s3c_write_reg
	movq	_LD_FAIL_ECC_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
LBB0_6:
	xorl	%eax, %eax
	callq	_s3c_onenand_reset
	movq	_ONENAND_BBT_READ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%r14d, %r14d
	testl	%ebx, (%r15)
	je	LBB0_7
## %bb.5:
	movq	_ECC_ERR_STAT_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_s3c_read_reg
	movq	_ONENAND_ECC_4BIT_UNCORRECTABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_ACT,4,2                    ## @INT_ACT
	.comm	_LOAD_CMP,4,2                   ## @LOAD_CMP
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_INT_ERR_STAT_OFFSET,4,2        ## @INT_ERR_STAT_OFFSET
	.comm	_INT_ERR_ACK_OFFSET,4,2         ## @INT_ERR_ACK_OFFSET
	.comm	_LD_FAIL_ECC_ERR,4,2            ## @LD_FAIL_ECC_ERR
	.comm	_ONENAND_BBT_READ_ERROR,4,2     ## @ONENAND_BBT_READ_ERROR
	.comm	_ECC_ERR_STAT_OFFSET,4,2        ## @ECC_ERR_STAT_OFFSET
	.comm	_ONENAND_ECC_4BIT_UNCORRECTABLE,4,2 ## @ONENAND_ECC_4BIT_UNCORRECTABLE
	.no_dead_strip	_s3c_onenand_bbt_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_onenand_bbt_wait
_s3c_onenand_bbt_wait:                  ; @s3c_onenand_bbt_wait
	.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
Lloh0:
	adrp	x8, _INT_ACT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_ACT@GOTPAGEOFF]
Lloh2:
	adrp	x20, _LOAD_CMP@GOTPAGE
Lloh3:
	ldr	x20, [x20, _LOAD_CMP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w21, w9, w8
Lloh5:
	adrp	x22, _jiffies@GOTPAGE
Lloh6:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x19, [x22]
	mov	w0, #20
	bl	_msecs_to_jiffies
	add	x19, x0, x19
Lloh7:
	adrp	x23, _INT_ERR_STAT_OFFSET@GOTPAGE
Lloh8:
	ldr	x23, [x23, _INT_ERR_STAT_OFFSET@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	mov	x1, x19
	bl	_time_before
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x23]
	bl	_s3c_read_reg
	tst	w21, w0
	b.eq	LBB0_1
LBB0_3:
	ldr	w0, [x23]
	bl	_s3c_read_reg
	mov	x19, x0
Lloh9:
	adrp	x8, _INT_ERR_ACK_OFFSET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INT_ERR_ACK_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_s3c_write_reg
Lloh12:
	adrp	x8, _LD_FAIL_ECC_ERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LD_FAIL_ECC_ERR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_5
LBB0_4:
	bl	_s3c_onenand_reset
Lloh15:
	adrp	x8, _ONENAND_BBT_READ_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ONENAND_BBT_READ_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x20]
	tst	w8, w19
	b.eq	LBB0_7
; %bb.6:
Lloh18:
	adrp	x8, _ECC_ERR_STAT_OFFSET@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ECC_ERR_STAT_OFFSET@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_s3c_read_reg
Lloh21:
	adrp	x8, _ONENAND_ECC_4BIT_UNCORRECTABLE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ONENAND_ECC_4BIT_UNCORRECTABLE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
LBB0_7:
	mov	w0, #0
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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_ACT,4,2                    ; @INT_ACT
	.comm	_LOAD_CMP,4,2                   ; @LOAD_CMP
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_INT_ERR_STAT_OFFSET,4,2        ; @INT_ERR_STAT_OFFSET
	.comm	_INT_ERR_ACK_OFFSET,4,2         ; @INT_ERR_ACK_OFFSET
	.comm	_LD_FAIL_ECC_ERR,4,2            ; @LD_FAIL_ECC_ERR
	.comm	_ONENAND_BBT_READ_ERROR,4,2     ; @ONENAND_BBT_READ_ERROR
	.comm	_ECC_ERR_STAT_OFFSET,4,2        ; @ECC_ERR_STAT_OFFSET
	.comm	_ONENAND_ECC_4BIT_UNCORRECTABLE,4,2 ; @ONENAND_ECC_4BIT_UNCORRECTABLE
	.no_dead_strip	_s3c_onenand_bbt_wait
.subsections_via_symbols
