	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function denali_oob_xfer
_denali_oob_xfer:                       ## @denali_oob_xfer
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_denali_controller
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nand_to_mtd
	movl	(%rax), %r12d
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %r14d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_denali_change_column
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.2:
	movslq	%r14d, %rax
	addq	%rax, %r15
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	addl	%r8d, %edi
	leal	(%r14,%r8), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %eax
	movl	8(%rbx), %edx
	leal	(%rdx,%rax), %esi
	imull	%r12d, %esi
	addl	%eax, %esi
	decl	%ecx
	leal	(%rsi,%r14), %eax
	movl	%edi, %r14d
	subl	%eax, %r14d
	cmpl	%ecx, %r12d
	cmovnel	%edx, %r14d
	movl	%r8d, %r13d
	subl	%esi, %r13d
	jle	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(%r14,%rsi), %eax
	cmpl	%r8d, %eax
	jle	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_denali_change_column
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %rax
	addq	%rax, %r15
	subl	%r13d, %r14d
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%esi, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_denali_change_column
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r14d, %rax
	addq	%rax, %r15
	incl	%r12d
	movl	(%rbx), %ecx
	cmpl	%ecx, %r12d
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jl	LBB0_3
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_denali_oob_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function denali_oob_xfer
_denali_oob_xfer:                       ; @denali_oob_xfer
	.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	x19, x2
	mov	x22, x1
	mov	x20, x0
	bl	_to_denali_controller
	mov	x23, x0
	mov	x0, x20
	bl	_nand_to_mtd
	ldp	w21, w24, [x0]
	ldr	w23, [x23]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	mov	x4, x19
	bl	_denali_change_column
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w25, #0
	sxtw	x26, w23
	add	x22, x22, x26
	add	w27, w24, w21
	add	w28, w26, w21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w10, [x20, #4]
	add	w11, w10, w8
	madd	w8, w11, w25, w8
	sub	w9, w9, #1
	add	w1, w8, w26
	sub	w11, w27, w1
	cmp	w25, w9
	csel	w23, w11, w10, eq
	subs	w24, w21, w8
	b.le	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w23, w8
	cmp	w9, w21
	b.le	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x8
	mov	x2, x22
	mov	x3, x24
	mov	x4, x19
	bl	_denali_change_column
	cbnz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, w24, sxtw
	sub	w23, w23, w24
	mov	x1, x28
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x8
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x19
	bl	_denali_change_column
	cbnz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, w23, sxtw
	add	w25, w25, #1
	ldr	w9, [x20]
	cmp	w25, w9
	b.lt	LBB0_3
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_denali_oob_xfer
.subsections_via_symbols
