	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flashputbuf
_flashputbuf:                           ## @flashputbuf
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_FLAG_MPI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	$32768, %edi                    ## imm = 0x8000
	addq	8(%r15), %rdi
	movq	(%r15), %rsi
	movq	_FLASHSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy_toio
	jmp	LBB0_5
LBB0_2:
	movq	_AUXPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_OUT4500
	movq	_AUXOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_OUT4500
	movq	_FLASHSIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	incl	%eax
	cmpl	$3, %eax
	jb	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movq	_AUXDATA@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	(%r15), %rax
	movzwl	(%rax,%rbx,4), %edx
	movq	%r15, %rdi
	callq	_OUT4500
	incq	%rbx
	movl	(%r14), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpq	%rcx, %rbx
	jne	LBB0_4
LBB0_5:
	movq	_SWS0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_OUT4500
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAG_MPI,4,2                   ## @FLAG_MPI
	.comm	_FLASHSIZE,4,2                  ## @FLASHSIZE
	.comm	_AUXPAGE,4,2                    ## @AUXPAGE
	.comm	_AUXOFF,4,2                     ## @AUXOFF
	.comm	_AUXDATA,4,2                    ## @AUXDATA
	.comm	_SWS0,4,2                       ## @SWS0
	.no_dead_strip	_flashputbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flashputbuf
_flashputbuf:                           ; @flashputbuf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _FLAG_MPI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAG_MPI@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x1, x8, [x19]
	add	x0, x8, #8, lsl #12             ; =32768
Lloh3:
	adrp	x8, _FLASHSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLASHSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_memcpy_toio
	b	LBB0_5
LBB0_2:
Lloh6:
	adrp	x8, _AUXPAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AUXPAGE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #256
	bl	_OUT4500
Lloh9:
	adrp	x8, _AUXOFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AUXOFF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_OUT4500
Lloh12:
	adrp	x20, _FLASHSIZE@GOTPAGE
Lloh13:
	ldr	x20, [x20, _FLASHSIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w8, w8, #1
	cmp	w8, #3
	b.lo	LBB0_5
; %bb.3:
	mov	x21, #0
Lloh14:
	adrp	x22, _AUXDATA@GOTPAGE
Lloh15:
	ldr	x22, [x22, _AUXDATA@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	x8, [x19]
	lsl	x9, x21, #2
	ldrh	w2, [x8, x9]
	mov	x0, x19
	bl	_OUT4500
	add	x21, x21, #1
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	x21, x8
	b.ne	LBB0_4
LBB0_5:
Lloh16:
	adrp	x8, _SWS0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SWS0@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #32768
	bl	_OUT4500
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAG_MPI,4,2                   ; @FLAG_MPI
	.comm	_FLASHSIZE,4,2                  ; @FLASHSIZE
	.comm	_AUXPAGE,4,2                    ; @AUXPAGE
	.comm	_AUXOFF,4,2                     ; @AUXOFF
	.comm	_AUXDATA,4,2                    ; @AUXDATA
	.comm	_SWS0,4,2                       ; @SWS0
	.no_dead_strip	_flashputbuf
.subsections_via_symbols
