	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1550_command
_au1550_command:                        ## @au1550_command
	.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	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	_NAND_CTL_SETCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_au1550_hwcontrol
	cmpl	$129, %r14d
	jne	LBB0_5
## %bb.1:
	movl	(%r15), %eax
	cmpl	%r12d, %eax
	jle	LBB0_2
## %bb.3:
	leal	-256(%r12), %eax
	xorl	%esi, %esi
	cmpl	$256, %r12d                     ## imm = 0x100
	setl	%sil
	cmovll	%r12d, %eax
	orl	$132, %esi
	movl	%eax, %r12d
	jmp	LBB0_4
LBB0_2:
	subl	%eax, %r12d
	movl	$131, %esi
LBB0_4:
	movq	%r15, %rdi
	callq	_au1550_write_byte
LBB0_5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_au1550_write_byte
	movq	_NAND_CTL_CLRCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_au1550_hwcontrol
	movl	%r12d, %eax
	andl	%ebx, %eax
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movq	_NAND_CTL_SETALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_au1550_hwcontrol
	cmpl	$-1, %r12d
	je	LBB0_9
## %bb.8:
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r13), %eax
	setne	%cl
	sarl	%cl, %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_au1550_write_byte
LBB0_9:
	cmpl	$-1, %ebx
	je	LBB0_10
## %bb.11:
	movzbl	%bl, %esi
	movq	%r15, %rdi
	callq	_au1550_write_byte
	leal	-131(%r14), %eax
	xorl	%r12d, %r12d
	cmpl	$2, %eax
	ja	LBB0_13
## %bb.12:
	callq	_local_irq_save
	movq	_NAND_CTL_SETNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_au1550_hwcontrol
	movl	$1, %r12d
LBB0_13:
	movl	%ebx, %esi
	sarl	$8, %esi
	movq	%r15, %rdi
	callq	_au1550_write_byte
	cmpl	$33554433, 4(%r13)              ## imm = 0x2000001
	jl	LBB0_15
## %bb.14:
	shrl	$16, %ebx
	andl	$15, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_au1550_write_byte
	jmp	LBB0_15
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_10:
	xorl	%r12d, %r12d
LBB0_15:
	movq	_NAND_CTL_CLRALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_au1550_hwcontrol
LBB0_16:
	addl	$-128, %r14d
	cmpl	$8, %r14d
	ja	LBB0_25
## %bb.17:
	movl	$451, %eax                      ## imm = 0x1C3
	btl	%r14d, %eax
	jb	LBB0_27
## %bb.18:
	movl	$56, %eax
	btl	%r14d, %eax
	jae	LBB0_25
## %bb.19:
	xorl	%edi, %edi
	testl	%r12d, %r12d
	sete	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_20
LBB0_25:
	movl	$100, %edi
	callq	_ndelay
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	*16(%r13)
	testl	%eax, %eax
	je	LBB0_26
LBB0_27:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	$100, %edi
	callq	_ndelay
	movl	8(%r13), %ebx
	movq	%r15, %rdi
	callq	*16(%r13)
	testl	%eax, %eax
	jne	LBB0_24
## %bb.21:
	testl	%ebx, %ebx
	jle	LBB0_24
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	%r15, %rdi
	callq	*16(%r13)
	testl	%eax, %eax
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	leal	-1(%rbx), %eax
	cmpl	$1, %ebx
	movl	%eax, %ebx
	ja	LBB0_22
LBB0_24:
	movq	_NAND_CTL_CLRNCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_au1550_hwcontrol
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_local_irq_restore              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CTL_SETCLE,4,2            ## @NAND_CTL_SETCLE
	.comm	_NAND_CTL_CLRCLE,4,2            ## @NAND_CTL_CLRCLE
	.comm	_NAND_CTL_SETALE,4,2            ## @NAND_CTL_SETALE
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_NAND_CTL_SETNCE,4,2            ## @NAND_CTL_SETNCE
	.comm	_NAND_CTL_CLRALE,4,2            ## @NAND_CTL_CLRALE
	.comm	_NAND_CTL_CLRNCE,4,2            ## @NAND_CTL_CLRNCE
	.no_dead_strip	_au1550_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1550_command
_au1550_command:                        ; @au1550_command
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _NAND_CTL_SETCLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CTL_SETCLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_au1550_hwcontrol
	cmp	w20, #129
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19]
	subs	w9, w22, #256
	csel	w9, w22, w9, lt
	mov	w10, #132
	cinc	w10, w10, lt
	sub	w11, w22, w8
	mov	w12, #131
	cmp	w8, w22
	csel	w22, w9, w11, gt
	csel	w1, w10, w12, gt
	mov	x0, x19
	bl	_au1550_write_byte
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_au1550_write_byte
Lloh3:
	adrp	x8, _NAND_CTL_CLRCLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CTL_CLRCLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_au1550_hwcontrol
	and	w8, w22, w21
	cmn	w8, #1
	b.eq	LBB0_8
; %bb.3:
Lloh6:
	adrp	x8, _NAND_CTL_SETALE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CTL_SETALE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_au1550_hwcontrol
	cmn	w22, #1
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x23]
Lloh9:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	asr	w1, w22, w8
	mov	x0, x19
	bl	_au1550_write_byte
LBB0_5:
	cmn	w21, #1
	b.eq	LBB0_9
; %bb.6:
	and	w1, w21, #0xff
	mov	x0, x19
	bl	_au1550_write_byte
	sub	w8, w20, #131
	cmp	w8, #2
	b.hi	LBB0_10
; %bb.7:
	bl	_local_irq_save
Lloh12:
	adrp	x8, _NAND_CTL_SETNCE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAND_CTL_SETNCE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_au1550_hwcontrol
	mov	w22, #1
	b	LBB0_11
LBB0_8:
	mov	w22, #0
	b	LBB0_14
LBB0_9:
	mov	w22, #0
	b	LBB0_13
LBB0_10:
	mov	w22, #0
LBB0_11:
	asr	w1, w21, #8
	mov	x0, x19
	bl	_au1550_write_byte
	ldr	w8, [x23, #4]
	mov	w9, #1
	movk	w9, #512, lsl #16
	cmp	w8, w9
	b.lt	LBB0_13
; %bb.12:
	ubfx	w1, w21, #16, #4
	mov	x0, x19
	bl	_au1550_write_byte
LBB0_13:
Lloh15:
	adrp	x8, _NAND_CTL_CLRALE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NAND_CTL_CLRALE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_au1550_hwcontrol
LBB0_14:
	sub	w8, w20, #128
	cmp	w8, #8
	b.hi	LBB0_18
; %bb.15:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #451
	tst	w8, w9
	b.ne	LBB0_20
; %bb.16:
	tst	w8, #0x38
	b.eq	LBB0_18
; %bb.17:
	cmp	w22, #0
	cset	w0, eq
	bl	_unlikely
	cbz	w0, LBB0_21
LBB0_18:
	mov	w0, #100
	bl	_ndelay
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #16]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_19
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	w0, #100
	bl	_ndelay
	ldr	w20, [x23, #8]
	ldr	x8, [x23, #16]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_24
; %bb.22:
	cmp	w20, #1
	b.lt	LBB0_24
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	sub	w21, w20, #1
	ldr	x8, [x23, #16]
	mov	x0, x19
	blr	x8
	cmp	w0, #0
	ccmp	w20, #1, #0, eq
	mov	x20, x21
	b.hi	LBB0_23
LBB0_24:
Lloh18:
	adrp	x8, _NAND_CTL_CLRNCE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NAND_CTL_CLRNCE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_au1550_hwcontrol
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_local_irq_restore
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CTL_SETCLE,4,2            ; @NAND_CTL_SETCLE
	.comm	_NAND_CTL_CLRCLE,4,2            ; @NAND_CTL_CLRCLE
	.comm	_NAND_CTL_SETALE,4,2            ; @NAND_CTL_SETALE
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_NAND_CTL_SETNCE,4,2            ; @NAND_CTL_SETNCE
	.comm	_NAND_CTL_CLRALE,4,2            ; @NAND_CTL_CLRALE
	.comm	_NAND_CTL_CLRNCE,4,2            ; @NAND_CTL_CLRNCE
	.no_dead_strip	_au1550_command
.subsections_via_symbols
