	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_onenand_command
_s3c_onenand_command:                   ## @s3c_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movb	(%r12), %cl
	movl	%edx, %edi
	sarl	%cl, %edi
	movb	4(%r12), %cl
	sarl	%cl, %edx
	andl	8(%r12), %edx
	movq	_onenand@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	%edx, %esi
	xorl	%edx, %edx
	callq	*(%rax)
	movl	%eax, %ebx
	movq	(%r15), %rdi
	movl	%eax, %esi
	callq	_CMD_MAP_01
	movl	%eax, %r13d
	movq	(%r15), %rdi
	movl	%ebx, %esi
	callq	_CMD_MAP_10
	movl	%eax, %ebx
	leal	-129(%r14), %eax
	cmpl	$5, %eax
	ja	LBB0_3
## %bb.1:
	movl	$35, %ecx
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	callq	_ONENAND_SET_NEXT_BUFFERRAM
LBB0_3:
	movq	%r12, %rdi
	callq	_ONENAND_CURRENT_BUFFERRAM
	movq	(%r15), %rcx
	movq	8(%rcx), %r15
	movq	16(%rcx), %rcx
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	12(%r12), %eax
	sarl	$2, %eax
	cltq
	leaq	(%r15,%rax,4), %r15
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	movl	%esi, %edx
	sarl	$2, %edx
	movslq	%edx, %rax
	leaq	(%rcx,%rax,4), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	movl	%esi, %edx
	sarl	$2, %edx
LBB0_6:
	addl	$-128, %r14d
	cmpl	$5, %r14d
	ja	LBB0_30
## %bb.7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %r12d
	movl	%r12d, %edi
	sarl	$2, %edi
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_27:
	movq	_ONENAND_UNLOCK_ALL@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_14:
	movl	%edi, %ebx
	movl	%esi, %r14d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	_TSRF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRANS_SPARE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_s3c_write_reg
	cmpl	$4, %r12d
	jl	LBB0_17
## %bb.15:
	cmpl	$2, %ebx
	movl	$1, %r12d
	cmovgel	%ebx, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_s3c_read_cmd
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpl	%ebx, %r12d
	jne	LBB0_16
LBB0_17:
	cmpl	$4, %r14d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_20
## %bb.18:
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	cmpl	$2, %r14d
	movl	$1, %r15d
	cmovgel	%r14d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_s3c_read_cmd
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	cmpl	%ebx, %r15d
	jne	LBB0_19
	jmp	LBB0_20
LBB0_11:
	cmpl	$4, %r12d
	jl	LBB0_30
## %bb.12:
	cmpl	$2, %edi
	movl	$1, %r14d
	cmovgel	%edi, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_s3c_read_cmd
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_13
	jmp	LBB0_30
LBB0_21:
	movl	%edi, %ebx
	movl	%esi, %r14d
	movl	%edx, %r15d
	movq	_TSRF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRANS_SPARE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_s3c_write_reg
	cmpl	$4, %r12d
	jl	LBB0_24
## %bb.22:
	movl	%ebx, %eax
	cmpl	$2, %ebx
	movl	$1, %ebx
	cmovgel	%eax, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, %edi
	movl	%r13d, %esi
	callq	_s3c_write_cmd
	decl	%ebx
	jne	LBB0_23
LBB0_24:
	cmpl	$4, %r14d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	jl	LBB0_20
## %bb.25:
	movl	%r15d, %eax
	cmpl	$2, %r15d
	movl	$1, %r15d
	cmovgel	%eax, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,4), %edi
	movl	%r13d, %esi
	callq	_s3c_write_cmd
	incq	%rbx
	cmpl	%ebx, %r15d
	jne	LBB0_26
LBB0_20:
	movq	_TRANS_SPARE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_s3c_write_reg
	jmp	LBB0_30
LBB0_8:
	cmpl	$4, %r12d
	jl	LBB0_30
## %bb.9:
	cmpl	$2, %edi
	movl	$1, %r14d
	cmovgel	%edi, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rbx,4), %edi
	movl	%r13d, %esi
	callq	_s3c_write_cmd
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_10
	jmp	LBB0_30
LBB0_28:
	movq	_ONENAND_ERASE_START@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_s3c_write_cmd
LBB0_30:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
LJTI0_0:
	.long	L0_0_set_27
	.long	L0_0_set_14
	.long	L0_0_set_11
	.long	L0_0_set_21
	.long	L0_0_set_8
	.long	L0_0_set_28
	.end_data_region
                                        ## -- End function
	.comm	_onenand,8,3                    ## @onenand
	.comm	_TSRF,4,2                       ## @TSRF
	.comm	_TRANS_SPARE_OFFSET,4,2         ## @TRANS_SPARE_OFFSET
	.comm	_ONENAND_UNLOCK_ALL,4,2         ## @ONENAND_UNLOCK_ALL
	.comm	_ONENAND_ERASE_START,4,2        ## @ONENAND_ERASE_START
	.no_dead_strip	_s3c_onenand_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_onenand_command
_s3c_onenand_command:                   ; @s3c_onenand_command
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldp	w8, w9, [x23]
	asr	w0, w2, w8
	asr	w8, w2, w9
	ldr	w9, [x23, #8]
	and	w1, w8, w9
Lloh0:
	adrp	x24, _onenand@GOTPAGE
Lloh1:
	ldr	x24, [x24, _onenand@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w2, #0
	blr	x8
	mov	x22, x0
	ldr	x0, [x24]
	mov	x1, x22
	bl	_CMD_MAP_01
	mov	x19, x0
	ldr	x0, [x24]
	mov	x1, x22
	bl	_CMD_MAP_10
	mov	x22, x0
	sub	w8, w21, #129
	cmp	w8, #5
	b.hi	LBB0_3
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #35
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x23
	bl	_ONENAND_SET_NEXT_BUFFERRAM
LBB0_3:
	mov	x0, x23
	bl	_ONENAND_CURRENT_BUFFERRAM
	ldr	x8, [x24]
	ldp	x25, x24, [x8, #8]
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w8, [x23, #12]
	asr	w8, w8, #2
	add	x25, x25, w8, sxtw #2
	ldr	w26, [x20]
	asr	w23, w26, #2
	add	x24, x24, w23, sxtw #2
	b	LBB0_6
LBB0_5:
	ldr	w26, [x20]
	asr	w23, w26, #2
LBB0_6:
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_30
; %bb.7:
	ldr	w27, [x20, #4]
	asr	w21, w27, #2
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
Lloh4:
	adrp	x8, _ONENAND_UNLOCK_ALL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ONENAND_UNLOCK_ALL@GOTPAGEOFF]
	b	LBB0_29
LBB0_9:
Lloh6:
	adrp	x8, _TSRF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TSRF@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x20, _TRANS_SPARE_OFFSET@GOTPAGE
Lloh10:
	ldr	x20, [x20, _TRANS_SPARE_OFFSET@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_s3c_write_reg
	cmp	w27, #4
	b.lt	LBB0_12
; %bb.10:
	cmp	w21, #1
	csinc	w21, w21, wzr, gt
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_s3c_read_cmd
	str	w0, [x25], #4
	subs	w21, w21, #1
	b.ne	LBB0_11
LBB0_12:
	cmp	w26, #4
	b.lt	LBB0_24
; %bb.13:
	cmp	w23, #1
	csinc	w21, w23, wzr, gt
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_s3c_read_cmd
	str	w0, [x24], #4
	subs	w21, w21, #1
	b.ne	LBB0_14
	b	LBB0_24
LBB0_15:
	cmp	w27, #4
	b.lt	LBB0_30
; %bb.16:
	cmp	w21, #1
	csinc	w20, w21, wzr, gt
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_s3c_read_cmd
	str	w0, [x25], #4
	subs	w20, w20, #1
	b.ne	LBB0_17
	b	LBB0_30
LBB0_18:
Lloh11:
	adrp	x8, _TSRF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TSRF@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x20, _TRANS_SPARE_OFFSET@GOTPAGE
Lloh15:
	ldr	x20, [x20, _TRANS_SPARE_OFFSET@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_s3c_write_reg
	cmp	w27, #4
	b.lt	LBB0_21
; %bb.19:
	cmp	w21, #1
	csinc	w21, w21, wzr, gt
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #-1
	mov	x1, x19
	bl	_s3c_write_cmd
	subs	w21, w21, #1
	b.ne	LBB0_20
LBB0_21:
	cmp	w26, #4
	b.lt	LBB0_24
; %bb.22:
	cmp	w23, #1
	csinc	w21, w23, wzr, gt
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24], #4
	mov	x1, x19
	bl	_s3c_write_cmd
	subs	w21, w21, #1
	b.ne	LBB0_23
LBB0_24:
	ldr	w1, [x20]
	mov	w0, #0
	bl	_s3c_write_reg
	b	LBB0_30
LBB0_25:
	cmp	w27, #4
	b.lt	LBB0_30
; %bb.26:
	cmp	w21, #1
	csinc	w20, w21, wzr, gt
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25], #4
	mov	x1, x19
	bl	_s3c_write_cmd
	subs	w20, w20, #1
	b.ne	LBB0_27
	b	LBB0_30
LBB0_28:
Lloh16:
	adrp	x8, _ONENAND_ERASE_START@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ONENAND_ERASE_START@GOTPAGEOFF]
LBB0_29:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_s3c_write_cmd
LBB0_30:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_15-LBB0_8)>>2
	.byte	(LBB0_18-LBB0_8)>>2
	.byte	(LBB0_25-LBB0_8)>>2
	.byte	(LBB0_28-LBB0_8)>>2
                                        ; -- End function
	.comm	_onenand,8,3                    ; @onenand
	.comm	_TSRF,4,2                       ; @TSRF
	.comm	_TRANS_SPARE_OFFSET,4,2         ; @TRANS_SPARE_OFFSET
	.comm	_ONENAND_UNLOCK_ALL,4,2         ; @ONENAND_UNLOCK_ALL
	.comm	_ONENAND_ERASE_START,4,2        ; @ONENAND_ERASE_START
	.no_dead_strip	_s3c_onenand_command
.subsections_via_symbols
