	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AT91F_PartialPageWrite
_AT91F_PartialPageWrite:                ## @AT91F_PartialPageWrite
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, %r14d
	movl	%edx, %r13d
	movq	_DB_PAGE_2_BUF1_TRF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_AT91F_MainMemoryToBufferTransfer
	movl	8(%rbx), %edi
	movq	_AT91C_DATAFLASH_TIMEOUT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_AT91F_DataFlashWaitReady
	movq	_DB_BUF1_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_AT91F_DataFlashWriteBuffer
	movl	8(%rbx), %edi
	movl	(%r15), %esi
	callq	_AT91F_DataFlashWaitReady
	movq	(%rbx), %rax
	cmpl	$16384, 4(%rax)                 ## imm = 0x4000
	jl	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_AT91F_PageErase
	movl	8(%rbx), %edi
	movl	(%r15), %esi
	callq	_AT91F_DataFlashWaitReady
	movq	(%rbx), %rax
LBB0_2:
	movq	_DB_BUF1_PAGE_ERASE_PGM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	imull	%r14d, %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AT91F_WriteBufferToMain        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DB_PAGE_2_BUF1_TRF,4,2         ## @DB_PAGE_2_BUF1_TRF
	.comm	_AT91C_DATAFLASH_TIMEOUT,4,2    ## @AT91C_DATAFLASH_TIMEOUT
	.comm	_DB_BUF1_WRITE,4,2              ## @DB_BUF1_WRITE
	.comm	_DB_BUF1_PAGE_ERASE_PGM,4,2     ## @DB_BUF1_PAGE_ERASE_PGM
	.no_dead_strip	_AT91F_PartialPageWrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AT91F_PartialPageWrite
_AT91F_PartialPageWrite:                ; @AT91F_PartialPageWrite
	.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, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w8, [x8]
	udiv	w20, w2, w8
	msub	w23, w20, w8, w2
Lloh0:
	adrp	x8, _DB_PAGE_2_BUF1_TRF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DB_PAGE_2_BUF1_TRF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_AT91F_MainMemoryToBufferTransfer
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x24, _AT91C_DATAFLASH_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _AT91C_DATAFLASH_TIMEOUT@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_AT91F_DataFlashWaitReady
Lloh5:
	adrp	x8, _DB_BUF1_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DB_BUF1_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x23
	mov	x4, x21
	bl	_AT91F_DataFlashWriteBuffer
	ldr	w0, [x19, #8]
	ldr	w1, [x24]
	bl	_AT91F_DataFlashWaitReady
	ldr	x8, [x19]
	ldr	w9, [x8, #4]
	cmp	w9, #4, lsl #12                 ; =16384
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_AT91F_PageErase
	ldr	w0, [x19, #8]
	ldr	w1, [x24]
	bl	_AT91F_DataFlashWaitReady
	ldr	x8, [x19]
LBB0_2:
Lloh8:
	adrp	x9, _DB_BUF1_PAGE_ERASE_PGM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DB_BUF1_PAGE_ERASE_PGM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	ldr	w8, [x8]
	mul	w2, w8, w20
	mov	x0, x19
	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	_AT91F_WriteBufferToMain
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DB_PAGE_2_BUF1_TRF,4,2         ; @DB_PAGE_2_BUF1_TRF
	.comm	_AT91C_DATAFLASH_TIMEOUT,4,2    ; @AT91C_DATAFLASH_TIMEOUT
	.comm	_DB_BUF1_WRITE,4,2              ; @DB_BUF1_WRITE
	.comm	_DB_BUF1_PAGE_ERASE_PGM,4,2     ; @DB_BUF1_PAGE_ERASE_PGM
	.no_dead_strip	_AT91F_PartialPageWrite
.subsections_via_symbols
