	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function onenand_command
_onenand_command:                       ## @onenand_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	%edx, %r12d
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	leal	-128(%r14), %eax
	cmpl	$11, %eax
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_onenand_block
	movl	%eax, %r12d
	movl	$-1, %r15d
	cmpl	$136, %r14d
	jne	LBB0_10
## %bb.3:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_onenand_bufferram_address
	movq	_ONENAND_REG_START_ADDRESS2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	*24(%rbx)
	movq	%rbx, %rdi
	callq	_ONENAND_IS_MLC
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_ONENAND_IS_2PLANE
	testq	%rax, %rax
	je	LBB0_26
LBB0_5:
	movq	%rbx, %rdi
	callq	_ONENAND_SET_BUFFERRAM0
	jmp	LBB0_23
LBB0_6:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_onenand_block
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_onenand_addr
	movl	%r12d, %r15d
	subl	%eax, %r15d
	movb	4(%rbx), %cl
	sarl	%cl, %r15d
	movq	%rbx, %rdi
	callq	_ONENAND_IS_2PLANE
	testq	%rax, %rax
	je	LBB0_24
## %bb.7:
	andl	$-2, %r13d
	xorl	%eax, %eax
	testl	%r12d, 8(%rbx)
	setne	%al
	orl	%r13d, %eax
	sarl	%r15d
	movl	%eax, %r12d
	jmp	LBB0_25
LBB0_8:
	imull	(%rbx), %r12d
	xorl	%r15d, %r15d
	movl	$131, %r14d
	cmpl	$-1, %r12d
	jne	LBB0_11
	jmp	LBB0_12
LBB0_9:
	imull	(%rbx), %r12d
	movl	$-1, %r15d
	movl	$139, %r14d
LBB0_10:
	cmpl	$-1, %r12d
	je	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_onenand_block_address
	movq	_ONENAND_REG_START_ADDRESS1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	*24(%rbx)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_onenand_bufferram_address
	movq	_ONENAND_REG_START_ADDRESS2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	*24(%rbx)
LBB0_12:
	cmpl	$-1, %r15d
	je	LBB0_22
## %bb.13:
	leal	-130(%r14), %eax
	cmpl	$7, %eax
	ja	LBB0_18
## %bb.14:
	movl	$131, %ecx
	btl	%eax, %ecx
	jae	LBB0_18
## %bb.15:
	movq	%rbx, %rdi
	callq	_ONENAND_IS_MLC
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	callq	_ONENAND_SET_BUFFERRAM0
	jmp	LBB0_21
LBB0_17:
	callq	_ONENAND_SET_NEXT_BUFFERRAM
	jmp	LBB0_21
LBB0_18:
	movq	%rbx, %rdi
	callq	_ONENAND_IS_2PLANE
	movq	_ONENAND_CMD_PROG@GOTPCREL(%rip), %rdx
	movl	%r14d, %ecx
	cmpl	(%rdx), %r14d
	jne	LBB0_20
## %bb.19:
	movq	_ONENAND_CMD_2X_PROG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_20:
	testq	%rax, %rax
	cmovnel	%ecx, %r14d
	movq	%rbx, %rdi
	callq	_ONENAND_CURRENT_BUFFERRAM
LBB0_21:
	movl	%eax, %r12d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_onenand_page_address
	movq	_ONENAND_REG_START_ADDRESS8@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	*24(%rbx)
	movl	%r12d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_onenand_buffer_address
	movq	_ONENAND_REG_START_BUFFER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%rbx), %rsi
	movl	%eax, %edi
	callq	*24(%rbx)
LBB0_22:
	movq	_ONENAND_INT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ONENAND_REG_INTERRUPT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	callq	*24(%rbx)
	movq	_ONENAND_REG_COMMAND@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%rbx), %rsi
	movl	%r14d, %edi
	callq	*24(%rbx)
LBB0_23:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	%r13d, %r12d
LBB0_25:
	andl	12(%rbx), %r15d
	cmpl	$-1, %r12d
	jne	LBB0_11
	jmp	LBB0_12
LBB0_26:
	movq	%rbx, %rdi
	callq	_ONENAND_SET_NEXT_BUFFERRAM
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_6
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_22
	.long	L0_0_set_22
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_ONENAND_REG_START_ADDRESS2,8,3 ## @ONENAND_REG_START_ADDRESS2
	.comm	_ONENAND_REG_START_ADDRESS1,8,3 ## @ONENAND_REG_START_ADDRESS1
	.comm	_ONENAND_CMD_PROG,4,2           ## @ONENAND_CMD_PROG
	.comm	_ONENAND_CMD_2X_PROG,4,2        ## @ONENAND_CMD_2X_PROG
	.comm	_ONENAND_REG_START_ADDRESS8,8,3 ## @ONENAND_REG_START_ADDRESS8
	.comm	_ONENAND_REG_START_BUFFER,8,3   ## @ONENAND_REG_START_BUFFER
	.comm	_ONENAND_INT_CLEAR,4,2          ## @ONENAND_INT_CLEAR
	.comm	_ONENAND_REG_INTERRUPT,8,3      ## @ONENAND_REG_INTERRUPT
	.comm	_ONENAND_REG_COMMAND,8,3        ## @ONENAND_REG_COMMAND
	.no_dead_strip	_onenand_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function onenand_command
_onenand_command:                       ; @onenand_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	x23, x2
	mov	x20, x1
	ldr	x19, [x0]
	sub	w8, w1, #128
	cmp	w8, #11
	b.hi	LBB0_7
; %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:
	mov	x0, x19
	mov	x1, x23
	bl	_onenand_block
	mov	x22, x0
	cmp	w20, #136
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	mov	x1, x22
	bl	_onenand_bufferram_address
	ldp	x9, x8, [x19, #16]
Lloh2:
	adrp	x10, _ONENAND_REG_START_ADDRESS2@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ONENAND_REG_START_ADDRESS2@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
	mov	x0, x19
	bl	_ONENAND_IS_MLC
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_ONENAND_IS_2PLANE
	cbz	x0, LBB0_23
LBB0_5:
	mov	x0, x19
	bl	_ONENAND_SET_BUFFERRAM0
	b	LBB0_22
LBB0_6:
	mov	w21, #-1
	cmn	w22, #1
	b.ne	LBB0_12
	b	LBB0_13
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	bl	_onenand_block
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_onenand_addr
	sub	w8, w23, w0
	ldr	w9, [x19, #4]
	asr	w21, w8, w9
	mov	x0, x19
	bl	_ONENAND_IS_2PLANE
	cbz	x0, LBB0_9
; %bb.8:
	and	w8, w22, #0xfffffffe
	ldr	w9, [x19, #8]
	tst	w9, w23
	cset	w9, ne
	orr	w22, w8, w9
	asr	w21, w21, #1
LBB0_9:
	ldr	w8, [x19, #12]
	and	w21, w8, w21
	cmn	w22, #1
	b.ne	LBB0_12
	b	LBB0_13
LBB0_10:
	mov	w21, #0
	ldr	w8, [x19]
	mul	w22, w8, w23
	mov	w20, #131
	cmn	w22, #1
	b.ne	LBB0_12
	b	LBB0_13
LBB0_11:
	ldr	w8, [x19]
	mul	w22, w8, w23
	mov	w21, #-1
	mov	w20, #139
	cmn	w22, #1
	b.eq	LBB0_13
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	bl	_onenand_block_address
	ldp	x9, x8, [x19, #16]
Lloh5:
	adrp	x10, _ONENAND_REG_START_ADDRESS1@GOTPAGE
Lloh6:
	ldr	x10, [x10, _ONENAND_REG_START_ADDRESS1@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
	mov	x0, x19
	mov	x1, x22
	bl	_onenand_bufferram_address
	ldp	x9, x8, [x19, #16]
Lloh8:
	adrp	x10, _ONENAND_REG_START_ADDRESS2@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ONENAND_REG_START_ADDRESS2@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
LBB0_13:
	cmn	w21, #1
	b.eq	LBB0_21
; %bb.14:
	sub	w8, w20, #130
	cmp	w8, #7
	b.hi	LBB0_19
; %bb.15:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #131
	tst	w8, w9
	b.eq	LBB0_19
; %bb.16:
	mov	x0, x19
	bl	_ONENAND_IS_MLC
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_ONENAND_SET_BUFFERRAM0
	b	LBB0_20
LBB0_18:
	mov	x0, x19
	bl	_ONENAND_SET_NEXT_BUFFERRAM
	b	LBB0_20
LBB0_19:
	mov	x0, x19
	bl	_ONENAND_IS_2PLANE
Lloh11:
	adrp	x8, _ONENAND_CMD_PROG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ONENAND_CMD_PROG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w20, w8
	ccmp	x0, #0, #4, eq
Lloh14:
	adrp	x8, _ONENAND_CMD_2X_PROG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ONENAND_CMD_2X_PROG@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	csel	w20, w8, w20, ne
	mov	x0, x19
	bl	_ONENAND_CURRENT_BUFFERRAM
LBB0_20:
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	bl	_onenand_page_address
	ldp	x9, x8, [x19, #16]
Lloh17:
	adrp	x10, _ONENAND_REG_START_ADDRESS8@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ONENAND_REG_START_ADDRESS8@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
	mov	x0, x22
	mov	w1, #0
	mov	w2, #0
	bl	_onenand_buffer_address
	ldp	x9, x8, [x19, #16]
Lloh20:
	adrp	x10, _ONENAND_REG_START_BUFFER@GOTPAGE
Lloh21:
	ldr	x10, [x10, _ONENAND_REG_START_BUFFER@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
LBB0_21:
Lloh23:
	adrp	x8, _ONENAND_INT_CLEAR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ONENAND_INT_CLEAR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldp	x9, x8, [x19, #16]
Lloh26:
	adrp	x10, _ONENAND_REG_INTERRUPT@GOTPAGE
Lloh27:
	ldr	x10, [x10, _ONENAND_REG_INTERRUPT@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	add	x1, x10, x9
	blr	x8
	ldp	x9, x8, [x19, #16]
Lloh29:
	adrp	x10, _ONENAND_REG_COMMAND@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ONENAND_REG_COMMAND@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	add	x1, x10, x9
	mov	x0, x20
	blr	x8
LBB0_22:
	mov	w0, #0
	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_23:
	mov	x0, x19
	bl	_ONENAND_SET_NEXT_BUFFERRAM
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.comm	_ONENAND_REG_START_ADDRESS2,8,3 ; @ONENAND_REG_START_ADDRESS2
	.comm	_ONENAND_REG_START_ADDRESS1,8,3 ; @ONENAND_REG_START_ADDRESS1
	.comm	_ONENAND_CMD_PROG,4,2           ; @ONENAND_CMD_PROG
	.comm	_ONENAND_CMD_2X_PROG,4,2        ; @ONENAND_CMD_2X_PROG
	.comm	_ONENAND_REG_START_ADDRESS8,8,3 ; @ONENAND_REG_START_ADDRESS8
	.comm	_ONENAND_REG_START_BUFFER,8,3   ; @ONENAND_REG_START_BUFFER
	.comm	_ONENAND_INT_CLEAR,4,2          ; @ONENAND_INT_CLEAR
	.comm	_ONENAND_REG_INTERRUPT,8,3      ; @ONENAND_REG_INTERRUPT
	.comm	_ONENAND_REG_COMMAND,8,3        ; @ONENAND_REG_COMMAND
	.no_dead_strip	_onenand_command
.subsections_via_symbols
