	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_get_device
_onenand_get_device:                    ## @onenand_get_device
	.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
	movl	%esi, %r14d
	movq	(%rdi), %r13
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DECLARE_WAITQUEUE
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	(%r13), %eax
	movq	_FL_READY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.1:
	leaq	4(%r13), %rbx
	movq	_wait@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FL_PM_SUSPENDED@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TASK_UNINTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_add_wait_queue
	movq	%r15, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	callq	_schedule
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_remove_wait_queue
	movq	%r15, %rdi
	callq	_spin_lock
	movl	(%r13), %eax
	movq	_FL_READY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
LBB0_5:
	movl	%r14d, (%r13)
	movq	%r15, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	(%r13), %ecx
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	subl	(%rdx), %eax
	movq	_FL_PM_SUSPENDED@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	cmovel	%esi, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_current,4,2                    ## @current
	.comm	_FL_READY,4,2                   ## @FL_READY
	.comm	_FL_PM_SUSPENDED,4,2            ## @FL_PM_SUSPENDED
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ## @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_onenand_get_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_get_device
_onenand_get_device:                    ; @onenand_get_device
	.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	x19, x1
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _current@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_DECLARE_WAITQUEUE
	add	x20, x23, #8
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x23]
Lloh6:
	adrp	x24, _FL_READY@GOTPAGE
Lloh7:
	ldr	x24, [x24, _FL_READY@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.1:
	add	x21, x23, #4
Lloh8:
	adrp	x25, _FL_PM_SUSPENDED@GOTPAGE
Lloh9:
	ldr	x25, [x25, _FL_PM_SUSPENDED@GOTPAGEOFF]
Lloh10:
	adrp	x26, _TASK_UNINTERRUPTIBLE@GOTPAGE
Lloh11:
	ldr	x26, [x26, _TASK_UNINTERRUPTIBLE@GOTPAGEOFF]
Lloh12:
	adrp	x22, _wait@GOTPAGE
Lloh13:
	ldr	x22, [x22, _wait@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x25]
	cmp	w8, w19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	bl	_set_current_state
	mov	x0, x21
	mov	x1, x22
	bl	_add_wait_queue
	mov	x0, x20
	bl	_spin_unlock
	bl	_schedule
	mov	x0, x21
	mov	x1, x22
	bl	_remove_wait_queue
	mov	x0, x20
	bl	_spin_lock
	ldr	w8, [x23]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_2
LBB0_4:
	str	w19, [x23]
	mov	x0, x20
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_spin_unlock
	ldr	w8, [x23]
	ldr	w9, [x25]
Lloh14:
	adrp	x10, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x10, [x10, _EAGAIN@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	w8, w9
	csneg	w0, wzr, w10, eq
LBB0_6:
	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
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_current,4,2                    ; @current
	.comm	_FL_READY,4,2                   ; @FL_READY
	.comm	_FL_PM_SUSPENDED,4,2            ; @FL_PM_SUSPENDED
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_TASK_UNINTERRUPTIBLE,4,2       ; @TASK_UNINTERRUPTIBLE
	.no_dead_strip	_onenand_get_device
.subsections_via_symbols
