	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AT91F_DataFlashWriteBuffer
_AT91F_DataFlashWriteBuffer:            ## @AT91F_DataFlashWriteBuffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	_DB_BUF1_WRITE@GOTPCREL(%rip), %rax
	cmpb	%sil, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_DB_BUF2_WRITE@GOTPCREL(%rip), %rax
	cmpb	%sil, (%rax)
	je	LBB0_4
## %bb.2:
	movq	_AT91C_DATAFLASH_BAD_COMMAND@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	8(%rdi), %rax
	cmpl	%ecx, (%rax)
	jae	LBB0_6
## %bb.5:
	movq	_AT91C_DATAFLASH_BAD_ADDRESS@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movb	%sil, (%rax)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movb	$0, 1(%rax)
	movq	8(%rdi), %rax
	cmpl	$16384, 4(%rax)                 ## imm = 0x4000
	jl	LBB0_8
## %bb.7:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movb	$0, 2(%rax)
	movq	(%rdi), %rax
	movq	8(%rdi), %rsi
	movl	8(%rsi), %ebx
	andl	%ecx, %ebx
	movq	(%rax), %rax
	movb	%bh, 3(%rax)
	movl	$5, %eax
	jmp	LBB0_9
LBB0_8:
	movl	8(%rax), %eax
	andl	%ecx, %eax
	movq	(%rdi), %rsi
	movq	(%rsi), %rsi
	movb	%ah, 2(%rsi)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movb	%cl, 3(%rax)
	movl	$4, %eax
	xorl	%ecx, %ecx
LBB0_9:
	movq	(%rdi), %rsi
	movq	(%rsi), %rsi
	movb	%cl, 4(%rsi)
	movq	(%rdi), %rdi
	movq	(%rdi), %rcx
	movq	%rcx, 8(%rdi)
	movl	%eax, 16(%rdi)
	movq	%rcx, 24(%rdi)
	movl	%eax, 32(%rdi)
	movq	%rdx, 40(%rdi)
	movq	%rdx, 48(%rdi)
	movl	%r8d, 56(%rdi)
	movl	%r8d, 60(%rdi)
	popq	%rbx
	popq	%rbp
	jmp	_AT91F_SpiWrite                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DB_BUF1_WRITE,1,0              ## @DB_BUF1_WRITE
	.comm	_DB_BUF2_WRITE,1,0              ## @DB_BUF2_WRITE
	.comm	_AT91C_DATAFLASH_BAD_COMMAND,4,2 ## @AT91C_DATAFLASH_BAD_COMMAND
	.comm	_AT91C_DATAFLASH_BAD_ADDRESS,4,2 ## @AT91C_DATAFLASH_BAD_ADDRESS
	.no_dead_strip	_AT91F_DataFlashWriteBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AT91F_DataFlashWriteBuffer
_AT91F_DataFlashWriteBuffer:            ; @AT91F_DataFlashWriteBuffer
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DB_BUF1_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DB_BUF1_WRITE@GOTPAGEOFF]
	ldrb	w8, [x8]
Lloh2:
	adrp	x9, _DB_BUF2_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DB_BUF2_WRITE@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, w3
	b.hs	LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _AT91C_DATAFLASH_BAD_ADDRESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AT91C_DATAFLASH_BAD_ADDRESS@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ret
LBB0_3:
Lloh7:
	adrp	x8, _AT91C_DATAFLASH_BAD_COMMAND@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AT91C_DATAFLASH_BAD_COMMAND@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ret
LBB0_4:
	ldr	x8, [x0]
	ldr	x8, [x8]
	strb	w1, [x8]
	ldr	x8, [x0]
	ldr	x8, [x8]
	strb	wzr, [x8, #1]
	ldr	x8, [x0, #8]
	ldr	w9, [x8, #4]
	cmp	w9, #4, lsl #12                 ; =16384
	b.lt	LBB0_6
; %bb.5:
	ldr	x8, [x0]
	ldr	x8, [x8]
	strb	wzr, [x8, #2]
	ldp	x9, x8, [x0]
	ldr	w8, [x8, #8]
	and	w8, w8, w3
	lsr	w8, w8, #8
	ldr	x9, [x9]
	strb	w8, [x9, #3]
	mov	w8, #5
	b	LBB0_7
LBB0_6:
	ldr	w8, [x8, #8]
	and	w8, w8, w3
	lsr	w8, w8, #8
	ldr	x9, [x0]
	ldr	x9, [x9]
	strb	w8, [x9, #2]
	ldr	x8, [x0]
	ldr	x8, [x8]
	strb	w3, [x8, #3]
	mov	w8, #4
	mov	w3, #0
LBB0_7:
	ldr	x9, [x0]
	ldr	x9, [x9]
	strb	w3, [x9, #4]
	ldr	x0, [x0]
	ldr	x9, [x0]
	str	x9, [x0, #8]
	str	w8, [x0, #16]
	str	x9, [x0, #24]
	str	w8, [x0, #32]
	stp	x2, x2, [x0, #40]
	stp	w4, w4, [x0, #56]
	b	_AT91F_SpiWrite
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DB_BUF1_WRITE,1,0              ; @DB_BUF1_WRITE
	.comm	_DB_BUF2_WRITE,1,0              ; @DB_BUF2_WRITE
	.comm	_AT91C_DATAFLASH_BAD_COMMAND,4,2 ; @AT91C_DATAFLASH_BAD_COMMAND
	.comm	_AT91C_DATAFLASH_BAD_ADDRESS,4,2 ; @AT91C_DATAFLASH_BAD_ADDRESS
	.no_dead_strip	_AT91F_DataFlashWriteBuffer
.subsections_via_symbols
