	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nand_wait
_nand_wait:                             ## @nand_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	%rsi, %r12
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movl	(%rsi), %r13d
	movq	_FL_ERASING@GOTPCREL(%rip), %rcx
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%rcx), %r13d
	jne	LBB0_2
## %bb.1:
	imull	$400, %eax, %eax                ## imm = 0x190
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	jmp	LBB0_3
LBB0_2:
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$36, %rax
LBB0_3:
	addl	%ecx, %eax
	cltq
	addq	%rax, %rbx
	movq	_nand_led_trigger@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LED_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_led_trigger_event
	movl	$100, %edi
	callq	_ndelay
	movq	_FL_ERASING@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	movq	%r12, %r8
	jne	LBB0_6
## %bb.4:
	movq	_NAND_IS_AND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r8)
	je	LBB0_6
## %bb.5:
	movq	_NAND_CMD_STATUS_MULTI@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_NAND_CMD_STATUS@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$-1, %edx
	movl	$-1, %ecx
	callq	*24(%r8)
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_NAND_STATUS_READY@GOTPCREL(%rip), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	callq	*8(%r12)
	testl	%eax, (%r13)
	jne	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	callq	*%rax
	testq	%rax, %rax
	je	LBB0_12
LBB0_13:
	movq	_nand_led_trigger@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LED_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_led_trigger_event
	movq	%r14, %rdi
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_FL_ERASING,4,2                 ## @FL_ERASING
	.comm	_HZ,4,2                         ## @HZ
	.comm	_nand_led_trigger,4,2           ## @nand_led_trigger
	.comm	_LED_FULL,4,2                   ## @LED_FULL
	.comm	_NAND_IS_AND,4,2                ## @NAND_IS_AND
	.comm	_NAND_CMD_STATUS_MULTI,4,2      ## @NAND_CMD_STATUS_MULTI
	.comm	_NAND_CMD_STATUS,4,2            ## @NAND_CMD_STATUS
	.comm	_NAND_STATUS_READY,4,2          ## @NAND_STATUS_READY
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.no_dead_strip	_nand_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nand_wait
_nand_wait:                             ; @nand_wait
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x24, _FL_ERASING@GOTPAGE
Lloh3:
	ldr	x24, [x24, _FL_ERASING@GOTPAGEOFF]
Lloh4:
	adrp	x9, _HZ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
	ldr	w25, [x1]
Lloh6:
	ldr	w9, [x9]
	mov	w10, #34079
	movk	w10, #20971, lsl #16
	smull	x10, w9, w10
	lsr	x11, x10, #63
	asr	x10, x10, #36
	add	w10, w10, w11
	mov	w11, #400
	mul	w9, w9, w11
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	smull	x9, w9, w11
	lsr	x11, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w11
	ldr	w11, [x24]
	cmp	w25, w11
	csel	w9, w10, w9, ne
	add	x21, x8, w9, sxtw
Lloh7:
	adrp	x23, _nand_led_trigger@GOTPAGE
Lloh8:
	ldr	x23, [x23, _nand_led_trigger@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh9:
	adrp	x8, _LED_FULL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LED_FULL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_led_trigger_event
	mov	w0, #100
	bl	_ndelay
	ldr	w8, [x24]
	cmp	w25, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x20, #4]
Lloh12:
	adrp	x9, _NAND_IS_AND@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NAND_IS_AND@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _NAND_CMD_STATUS_MULTI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NAND_CMD_STATUS_MULTI@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh17:
	adrp	x8, _NAND_CMD_STATUS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NAND_CMD_STATUS@GOTPAGEOFF]
LBB0_4:
	ldr	x9, [x20, #24]
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	mov	w3, #-1
	blr	x9
	ldr	x0, [x22]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_10
; %bb.5:
Lloh19:
	adrp	x24, _NAND_STATUS_READY@GOTPAGE
Lloh20:
	ldr	x24, [x24, _NAND_STATUS_READY@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20, #8]
	mov	x0, x19
	blr	x8
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_cond_resched
	ldr	x0, [x22]
	mov	x1, x21
	bl	_time_before
	cbz	x0, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_7
LBB0_10:
	ldr	w0, [x23]
Lloh21:
	adrp	x8, _LED_OFF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LED_OFF@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_led_trigger_event
	ldr	x1, [x20, #8]
	mov	x0, x19
	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
	br	x1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_FL_ERASING,4,2                 ; @FL_ERASING
	.comm	_HZ,4,2                         ; @HZ
	.comm	_nand_led_trigger,4,2           ; @nand_led_trigger
	.comm	_LED_FULL,4,2                   ; @LED_FULL
	.comm	_NAND_IS_AND,4,2                ; @NAND_IS_AND
	.comm	_NAND_CMD_STATUS_MULTI,4,2      ; @NAND_CMD_STATUS_MULTI
	.comm	_NAND_CMD_STATUS,4,2            ; @NAND_CMD_STATUS
	.comm	_NAND_STATUS_READY,4,2          ; @NAND_STATUS_READY
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.no_dead_strip	_nand_wait
.subsections_via_symbols
