	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c2440_nand_write_buf
_s3c2440_nand_write_buf:                ## @s3c2440_nand_write_buf
	.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	%edx, %r13d
	movq	%rsi, %r15
	callq	_s3c2410_nand_mtd_toinfo
	movq	%rax, %r14
	movq	_S3C2440_NFDATA@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%rax), %rdi
	movl	%r13d, %edx
	sarl	$2, %edx
	movq	%r15, %rsi
	callq	_writesl
	testb	$3, %r13b
	je	LBB0_3
## %bb.1:
	movl	%r13d, %eax
	andl	$-4, %eax
	cltq
	leaq	(%r15,%rax,4), %r15
	decl	%r13d
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	(%r12), %rsi
	addq	(%r14), %rsi
	callq	_writeb
	addq	$4, %r15
	decl	%ebx
	testb	$3, %r13b
	movl	%ebx, %r13d
	jne	LBB0_2
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C2440_NFDATA,8,3             ## @S3C2440_NFDATA
	.no_dead_strip	_s3c2440_nand_write_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c2440_nand_write_buf
_s3c2440_nand_write_buf:                ; @s3c2440_nand_write_buf
	.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, x2
	mov	x21, x1
	bl	_s3c2410_nand_mtd_toinfo
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _S3C2440_NFDATA@GOTPAGE
Lloh1:
	ldr	x22, [x22, _S3C2440_NFDATA@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	asr	w2, w19, #2
	mov	x1, x21
	bl	_writesl
	tst	w19, #0x3
	b.eq	LBB0_4
; %bb.1:
	and	w8, w19, #0xfffffffc
	add	x21, x21, w8, sxtw #2
	ldr	w0, [x21]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writeb
	sub	w8, w19, #1
	tst	w8, #0x3
	b.eq	LBB0_4
; %bb.2:
	ldr	w0, [x21, #4]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writeb
	add	w8, w19, #2
	tst	w8, #0x3
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x21, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x1, x9, x8
	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
	b	_writeb
LBB0_4:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C2440_NFDATA,8,3             ; @S3C2440_NFDATA
	.no_dead_strip	_s3c2440_nand_write_buf
.subsections_via_symbols
