	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function denali_exec_instr
_denali_exec_instr:                     ## @denali_exec_instr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_to_denali_controller
	movl	(%rbx), %edx
	leal	-128(%rdx), %ecx
	cmpl	$4, %ecx
	ja	LBB0_12
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_11:
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_denali_exec_waitrdy            ## TAILCALL
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_WARN_ONCE
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_8:
	movq	_DENALI_MAP11_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	12(%rbx), %ecx
	movl	16(%rbx), %edx
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rbx)
	movl	$0, %r8d
	jne	LBB0_10
## %bb.9:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	xorl	%r8d, %r8d
	testl	%edi, (%r15)
	setne	%r8b
LBB0_10:
	movq	%rax, %rdi
	callq	_denali_exec_out
	jmp	LBB0_13
LBB0_5:
	movq	_DENALI_MAP11_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	12(%rbx), %ecx
	movl	20(%rbx), %edx
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rbx)
	movl	$0, %r8d
	jne	LBB0_7
## %bb.6:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	xorl	%r8d, %r8d
	testl	%edi, (%r15)
	setne	%r8b
LBB0_7:
	movq	%rax, %rdi
	callq	_denali_exec_in
	jmp	LBB0_13
LBB0_2:
	movq	_DENALI_MAP11_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	addq	$40, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rdx
	movl	$1, %ecx
	jmp	LBB0_3
LBB0_4:
	movq	_DENALI_MAP11_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	32(%rbx), %rdx
	movl	24(%rbx), %ecx
	movq	%rax, %rdi
LBB0_3:
	callq	_denali_exec_out8
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_8
	.long	L0_0_set_5
	.long	L0_0_set_2
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_DENALI_MAP11_CMD,4,2           ## @DENALI_MAP11_CMD
	.comm	_DENALI_MAP11_ADDR,4,2          ## @DENALI_MAP11_ADDR
	.comm	_DENALI_MAP11_DATA,4,2          ## @DENALI_MAP11_DATA
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported NAND instruction type: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_denali_exec_instr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function denali_exec_instr
_denali_exec_instr:                     ; @denali_exec_instr
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_to_denali_controller
	ldr	w2, [x19]
	sub	w8, w2, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_denali_exec_waitrdy
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN_ONCE
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_4:
Lloh7:
	adrp	x8, _DENALI_MAP11_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DENALI_MAP11_DATA@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldp	w3, w2, [x19, #12]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_11
; %bb.5:
	mov	w4, #0
	b	LBB0_12
LBB0_6:
Lloh10:
	adrp	x8, _DENALI_MAP11_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DENALI_MAP11_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19, #20]
	ldp	w8, w3, [x19, #8]
	cbz	w8, LBB0_13
; %bb.7:
	mov	w4, #0
	b	LBB0_14
LBB0_8:
Lloh13:
	adrp	x8, _DENALI_MAP11_CMD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DENALI_MAP11_CMD@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, x19, #40
	mov	w3, #1
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _DENALI_MAP11_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DENALI_MAP11_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	x2, [x19, #32]
	ldr	w3, [x19, #24]
LBB0_10:
	bl	_denali_exec_out8
	b	LBB0_15
LBB0_11:
	ldr	w8, [x20]
Lloh19:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh20:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w4, ne
LBB0_12:
	bl	_denali_exec_out
	b	LBB0_15
LBB0_13:
	ldr	w8, [x20]
Lloh22:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh23:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w4, ne
LBB0_14:
	bl	_denali_exec_in
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
                                        ; -- End function
	.comm	_DENALI_MAP11_CMD,4,2           ; @DENALI_MAP11_CMD
	.comm	_DENALI_MAP11_ADDR,4,2          ; @DENALI_MAP11_ADDR
	.comm	_DENALI_MAP11_DATA,4,2          ; @DENALI_MAP11_DATA
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported NAND instruction type: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_denali_exec_instr
.subsections_via_symbols
