	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_legacy_set_defaults       ## -- Begin function nand_legacy_set_defaults
	.p2align	4, 0x90
_nand_legacy_set_defaults:              ## @nand_legacy_set_defaults
	.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
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	(%rdi), %r14d
	callq	_nand_has_exec_op
	testq	%rax, %rax
	jne	LBB0_29
## %bb.1:
	cmpl	$0, 8(%rbx)
	je	LBB0_2
## %bb.3:
	cmpq	$0, 64(%rbx)
	je	LBB0_4
LBB0_5:
	cmpq	$0, 56(%rbx)
	je	LBB0_6
LBB0_7:
	cmpq	$0, 48(%rbx)
	je	LBB0_8
LBB0_9:
	movq	16(%rbx), %rcx
	movq	_nand_read_byte@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	cmpq	%rax, %rcx
	jne	LBB0_14
LBB0_11:
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.12:
	movq	_nand_read_byte16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_13:
	movq	%rax, 16(%rbx)
LBB0_14:
	movq	24(%rbx), %rcx
	movq	_nand_write_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.15:
	cmpq	%rax, %rcx
	jne	LBB0_19
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_18
## %bb.17:
	movq	_nand_write_buf16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_18:
	movq	%rax, 24(%rbx)
LBB0_19:
	movq	32(%rbx), %rcx
	movq	_nand_write_byte@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.20:
	cmpq	%rax, %rcx
	jne	LBB0_24
LBB0_21:
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.22:
	movq	_nand_write_byte16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_23:
	movq	%rax, 32(%rbx)
LBB0_24:
	movq	40(%rbx), %rcx
	movq	_nand_read_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.25:
	cmpq	%rax, %rcx
	jne	LBB0_29
LBB0_26:
	testl	%r14d, %r14d
	je	LBB0_28
## %bb.27:
	movq	_nand_read_buf16@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_28:
	movq	%rax, 40(%rbx)
LBB0_29:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	$20, 8(%rbx)
	cmpq	$0, 64(%rbx)
	jne	LBB0_5
LBB0_4:
	movq	_nand_command@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%rbx)
	cmpq	$0, 56(%rbx)
	jne	LBB0_7
LBB0_6:
	movq	_nand_wait@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 56(%rbx)
	cmpq	$0, 48(%rbx)
	jne	LBB0_9
LBB0_8:
	movq	_nand_select_chip@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%rbx)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_nand_command,8,3               ## @nand_command
	.comm	_nand_wait,8,3                  ## @nand_wait
	.comm	_nand_select_chip,8,3           ## @nand_select_chip
	.comm	_nand_read_byte,8,3             ## @nand_read_byte
	.comm	_nand_read_byte16,8,3           ## @nand_read_byte16
	.comm	_nand_write_buf,8,3             ## @nand_write_buf
	.comm	_nand_write_buf16,8,3           ## @nand_write_buf16
	.comm	_nand_write_byte,8,3            ## @nand_write_byte
	.comm	_nand_write_byte16,8,3          ## @nand_write_byte16
	.comm	_nand_read_buf,8,3              ## @nand_read_buf
	.comm	_nand_read_buf16,8,3            ## @nand_read_buf16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_legacy_set_defaults       ; -- Begin function nand_legacy_set_defaults
	.p2align	2
_nand_legacy_set_defaults:              ; @nand_legacy_set_defaults
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _NAND_BUSWIDTH_16@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_nand_has_exec_op
	cbnz	x0, LBB0_17
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_18
; %bb.2:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_19
LBB0_3:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_20
LBB0_4:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_21
LBB0_5:
	and	w8, w21, w20
	ldr	x10, [x19, #16]
Lloh3:
	adrp	x9, _nand_read_byte@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nand_read_byte@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cbz	x10, LBB0_7
; %bb.6:
	cmp	x10, x9
	b.ne	LBB0_8
LBB0_7:
Lloh6:
	adrp	x10, _nand_read_byte16@GOTPAGE
Lloh7:
	ldr	x10, [x10, _nand_read_byte16@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x9, x9, x10, eq
	str	x9, [x19, #16]
LBB0_8:
	ldr	x10, [x19, #24]
Lloh9:
	adrp	x9, _nand_write_buf@GOTPAGE
Lloh10:
	ldr	x9, [x9, _nand_write_buf@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cbz	x10, LBB0_10
; %bb.9:
	cmp	x10, x9
	b.ne	LBB0_11
LBB0_10:
Lloh12:
	adrp	x10, _nand_write_buf16@GOTPAGE
Lloh13:
	ldr	x10, [x10, _nand_write_buf16@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x9, x9, x10, eq
	str	x9, [x19, #24]
LBB0_11:
	ldr	x10, [x19, #32]
Lloh15:
	adrp	x9, _nand_write_byte@GOTPAGE
Lloh16:
	ldr	x9, [x9, _nand_write_byte@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cbz	x10, LBB0_13
; %bb.12:
	cmp	x10, x9
	b.ne	LBB0_14
LBB0_13:
Lloh18:
	adrp	x10, _nand_write_byte16@GOTPAGE
Lloh19:
	ldr	x10, [x10, _nand_write_byte16@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x9, x9, x10, eq
	str	x9, [x19, #32]
LBB0_14:
	ldr	x10, [x19, #40]
Lloh21:
	adrp	x9, _nand_read_buf@GOTPAGE
Lloh22:
	ldr	x9, [x9, _nand_read_buf@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cbz	x10, LBB0_16
; %bb.15:
	cmp	x10, x9
	b.ne	LBB0_17
LBB0_16:
Lloh24:
	adrp	x10, _nand_read_buf16@GOTPAGE
Lloh25:
	ldr	x10, [x10, _nand_read_buf16@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	cmp	w8, #0
	csel	x8, x9, x10, eq
	str	x8, [x19, #40]
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_18:
	mov	w8, #20
	str	w8, [x19, #8]
	ldr	x8, [x19, #64]
	cbnz	x8, LBB0_3
LBB0_19:
Lloh27:
	adrp	x8, _nand_command@GOTPAGE
Lloh28:
	ldr	x8, [x8, _nand_command@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [x19, #64]
	ldr	x8, [x19, #56]
	cbnz	x8, LBB0_4
LBB0_20:
Lloh30:
	adrp	x8, _nand_wait@GOTPAGE
Lloh31:
	ldr	x8, [x8, _nand_wait@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	str	x8, [x19, #56]
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_5
LBB0_21:
Lloh33:
	adrp	x8, _nand_select_chip@GOTPAGE
Lloh34:
	ldr	x8, [x8, _nand_select_chip@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [x19, #48]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_nand_command,8,3               ; @nand_command
	.comm	_nand_wait,8,3                  ; @nand_wait
	.comm	_nand_select_chip,8,3           ; @nand_select_chip
	.comm	_nand_read_byte,8,3             ; @nand_read_byte
	.comm	_nand_read_byte16,8,3           ; @nand_read_byte16
	.comm	_nand_write_buf,8,3             ; @nand_write_buf
	.comm	_nand_write_buf16,8,3           ; @nand_write_buf16
	.comm	_nand_write_byte,8,3            ; @nand_write_byte
	.comm	_nand_write_byte16,8,3          ; @nand_write_byte16
	.comm	_nand_read_buf,8,3              ; @nand_read_buf
	.comm	_nand_read_buf16,8,3            ; @nand_read_buf16
.subsections_via_symbols
