	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_setup_wait
_onenand_setup_wait:                    ## @onenand_setup_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	leaq	40(%rbx), %rdi
	callq	_init_completion
	movq	(%rbx), %rdi
	movq	_onenand_wait@GOTPCREL(%rip), %r14
	testq	%rdi, %rdi
	jle	LBB0_3
## %bb.1:
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_onenand_interrupt@GOTPCREL(%rip), %rsi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %r8
	callq	_request_irq
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	_ONENAND_REG_SYS_CFG1@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	24(%rbx), %rdi
	callq	*8(%rbx)
	movq	_ONENAND_SYS_CFG1_IOBE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%r14), %rsi
	addq	24(%rbx), %rsi
	movl	%eax, %edi
	callq	*32(%rbx)
	movq	_onenand_try_interrupt_wait@GOTPCREL(%rip), %r14
LBB0_3:
	movq	(%r14), %rax
	movq	%rax, 16(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_onenand_wait,8,3               ## @onenand_wait
	.comm	_onenand_interrupt,4,2          ## @onenand_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"onenand"

	.comm	_ONENAND_REG_SYS_CFG1,8,3       ## @ONENAND_REG_SYS_CFG1
	.comm	_ONENAND_SYS_CFG1_IOBE,4,2      ## @ONENAND_SYS_CFG1_IOBE
	.comm	_onenand_try_interrupt_wait,8,3 ## @onenand_try_interrupt_wait
	.no_dead_strip	_onenand_setup_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_setup_wait
_onenand_setup_wait:                    ; @onenand_setup_wait
	.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
	ldr	x19, [x0]
	add	x0, x19, #40
	bl	_init_completion
	ldr	x0, [x19]
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, _onenand_interrupt@GOTPAGE
Lloh4:
	ldr	x1, [x1, _onenand_interrupt@GOTPAGEOFF]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	x4, x19
	bl	_request_irq
	cbz	x0, LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _onenand_wait@GOTPAGE
Lloh8:
	ldr	x8, [x8, _onenand_wait@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #24]
Lloh9:
	adrp	x20, _ONENAND_REG_SYS_CFG1@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ONENAND_REG_SYS_CFG1@GOTPAGEOFF]
	ldr	x10, [x20]
	add	x0, x10, x9
	blr	x8
Lloh11:
	adrp	x8, _ONENAND_SYS_CFG1_IOBE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ONENAND_SYS_CFG1_IOBE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldp	x9, x8, [x19, #24]
	ldr	x10, [x20]
	add	x1, x10, x9
	blr	x8
Lloh14:
	adrp	x8, _onenand_try_interrupt_wait@GOTPAGE
Lloh15:
	ldr	x8, [x8, _onenand_try_interrupt_wait@GOTPAGEOFF]
LBB0_4:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_onenand_wait,8,3               ; @onenand_wait
	.comm	_onenand_interrupt,4,2          ; @onenand_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"onenand"

	.comm	_ONENAND_REG_SYS_CFG1,8,3       ; @ONENAND_REG_SYS_CFG1
	.comm	_ONENAND_SYS_CFG1_IOBE,4,2      ; @ONENAND_SYS_CFG1_IOBE
	.comm	_onenand_try_interrupt_wait,8,3 ; @onenand_try_interrupt_wait
	.no_dead_strip	_onenand_setup_wait
.subsections_via_symbols
