	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function denali_payload_xfer
_denali_payload_xfer:                   ## @denali_payload_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	callq	_to_denali_controller
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_nand_to_mtd
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.1:
	movl	(%rax), %ecx
	movl	(%rbx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addl	%ecx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %r12d
	movl	8(%r15), %esi
	addl	%r12d, %esi
	imull	%r14d, %esi
	movl	%ecx, %ebx
	subl	%esi, %ebx
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	(%rsi,%r12), %eax
	cmpl	%ecx, %eax
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_denali_change_column
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	addq	%rax, %r13
	subl	%ebx, %r12d
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	-56(%rbp), %esi                 ## 4-byte Folded Reload
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r13, %rdx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_denali_change_column
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r12d, %rax
	addq	%rax, %r13
	incl	%r14d
	cmpl	(%r15), %r14d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jl	LBB0_2
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_denali_payload_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function denali_payload_xfer
_denali_payload_xfer:                   ; @denali_payload_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	x20, x1
	mov	x21, x0
	bl	_to_denali_controller
	mov	x22, x0
	mov	x0, x21
	bl	_nand_to_mtd
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w24, #0
	ldr	w25, [x0]
	ldr	w26, [x22]
	add	w27, w26, w25
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w22, w8, [x21, #4]
	add	w8, w8, w22
	mul	w1, w8, w24
	subs	w23, w25, w1
	b.le	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w1, w22
	cmp	w8, w25
	b.le	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x2, x20
	mov	x3, x23
	mov	x4, x19
	bl	_denali_change_column
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, w23, sxtw
	sub	w22, w22, w23
	mov	x1, x27
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w1, w1, w26
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x2, x20
	mov	x3, x22
	mov	x4, x19
	bl	_denali_change_column
	cbnz	w0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, w22, sxtw
	add	w24, w24, #1
	ldr	w8, [x21]
	cmp	w24, w8
	b.lt	LBB0_2
LBB0_9:
	mov	w0, #0
LBB0_10:
	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_payload_xfer
.subsections_via_symbols
