	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cafe_device_ready
_cafe_device_ready:                     ## @cafe_device_ready
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_nand_get_controller_data
	movq	%rax, %r12
	movq	_NAND_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cafe_readl
	movl	%eax, %ebx
	andl	$1073741824, %ebx               ## imm = 0x40000000
	movl	%ebx, %r14d
	shrl	$30, %r14d
	movq	_NAND_IRQ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_cafe_readl
	movl	%eax, %r15d
	movl	(%r13), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_cafe_writel
	testl	%ebx, %ebx
	movq	(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r13
	cmoveq	%rax, %r13
	movq	_NAND_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cafe_readl
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_GLOBAL_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cafe_readl
	movl	%eax, %ebx
	movq	_GLOBAL_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_cafe_readl
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	%r15d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%ebx, %r9d
	callq	_cafe_dev_dbg
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_STATUS,4,2                ## @NAND_STATUS
	.comm	_NAND_IRQ,4,2                   ## @NAND_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NAND device is%s ready, IRQ %x (%x) (%x,%x)\n"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	" not"

	.comm	_GLOBAL_IRQ,4,2                 ## @GLOBAL_IRQ
	.comm	_GLOBAL_IRQ_MASK,4,2            ## @GLOBAL_IRQ_MASK
	.no_dead_strip	_cafe_device_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cafe_device_ready
_cafe_device_ready:                     ; @cafe_device_ready
	.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
	bl	_nand_get_controller_data
	mov	x19, x0
Lloh0:
	adrp	x8, _NAND_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_cafe_readl
	mov	x20, x0
Lloh3:
	adrp	x24, _NAND_IRQ@GOTPAGE
Lloh4:
	ldr	x24, [x24, _NAND_IRQ@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_cafe_readl
	mov	x21, x0
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_cafe_writel
	ands	w8, w20, #0x40000000
	lsr	w20, w8, #30
	ldr	x22, [x19]
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh7:
	adrp	x9, l_.str.2@PAGE
Lloh8:
	add	x9, x9, l_.str.2@PAGEOFF
	csel	x23, x9, x8, eq
	ldr	w1, [x24]
	mov	x0, x19
	bl	_cafe_readl
	mov	x24, x0
Lloh9:
	adrp	x8, _GLOBAL_IRQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GLOBAL_IRQ@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cafe_readl
	mov	x25, x0
Lloh12:
	adrp	x8, _GLOBAL_IRQ_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GLOBAL_IRQ_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cafe_readl
	mov	x6, x0
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x24
	mov	x5, x25
	bl	_cafe_dev_dbg
	mov	x0, x20
	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 AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_STATUS,4,2                ; @NAND_STATUS
	.comm	_NAND_IRQ,4,2                   ; @NAND_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NAND device is%s ready, IRQ %x (%x) (%x,%x)\n"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	" not"

	.comm	_GLOBAL_IRQ,4,2                 ; @GLOBAL_IRQ
	.comm	_GLOBAL_IRQ_MASK,4,2            ; @GLOBAL_IRQ_MASK
	.no_dead_strip	_cafe_device_ready
.subsections_via_symbols
