	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e100_eeprom_save
_e100_eeprom_save:                      ## @e100_eeprom_save
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$8, -36(%rbp)
	leaq	-36(%rbp), %rsi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_e100_eeprom_read
	movl	-36(%rbp), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, (%r14)
	leal	(%r12,%r15), %edx
	cmpl	%eax, %edx
	jge	LBB0_11
## %bb.1:
	testl	%r12d, %r12d
	jle	LBB0_5
## %bb.2:
	movslq	%r15d, %rbx
	movslq	%edx, %r15
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %eax
	movq	%r14, %rdi
	movl	%ecx, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	callq	_e100_eeprom_write
	incq	%rbx
	cmpq	%r15, %rbx
	jge	LBB0_4
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-36(%rbp), %esi
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %ecx
	movq	%r14, %rdi
	movl	%ebx, %edx
	jmp	LBB0_3
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movl	(%r14), %eax
LBB0_5:
	movl	$47802, %edi                    ## imm = 0xBABA
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_le16_to_cpu
	addl	%eax, %r15d
	incq	%rbx
	movslq	(%r14), %rax
	decq	%rax
	cmpq	%rax, %rbx
	jl	LBB0_7
## %bb.8:
	movl	$47802, %edi                    ## imm = 0xBABA
	subl	%r15d, %edi
LBB0_9:
	callq	_cpu_to_le16
	movq	8(%r14), %rcx
	movslq	(%r14), %rdx
	movl	%eax, -4(%rcx,%rdx,4)
	movl	-36(%rbp), %esi
	movslq	(%r14), %rdx
	movl	-4(%rcx,%rdx,4), %ecx
	decq	%rdx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_e100_eeprom_write
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_e100_eeprom_save
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e100_eeprom_save
_e100_eeprom_save:                      ; @e100_eeprom_save
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	w8, #8
	str	w8, [sp, #12]
	add	x1, sp, #12
	mov	w2, #0
	bl	_e100_eeprom_read
	ldr	w1, [sp, #12]
	mov	w8, #1
	lsl	w8, w8, w1
	str	w8, [x19]
	add	w9, w21, w20
	cmp	w9, w8
	b.ge	LBB0_9
; %bb.1:
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.2:
	sxtw	x22, w20
	sxtw	x21, w9
	ldr	x8, [x19, #8]
	ldr	w3, [x8, w20, sxtw #2]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x20
	bl	_e100_eeprom_write
	add	x20, x22, #1
	cmp	x20, x21
	b.ge	LBB0_4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [sp, #12]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, x20, lsl #2]
	mov	x0, x19
	mov	x2, x20
	bl	_e100_eeprom_write
	add	x20, x20, #1
	cmp	x20, x21
	b.lt	LBB0_3
LBB0_4:
	ldr	w8, [x19]
LBB0_5:
	cmp	w8, #1
	b.le	LBB0_10
; %bb.6:
	mov	x21, #0
	mov	w20, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21, lsl #2]
	bl	_le16_to_cpu
	add	w20, w0, w20
	add	x21, x21, #1
	ldrsw	x8, [x19]
	sub	x8, x8, #1
	cmp	x21, x8
	b.lt	LBB0_7
; %bb.8:
	mov	w8, #47802
	sub	w0, w8, w20
	b	LBB0_11
LBB0_9:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
	mov	w0, #47802
LBB0_11:
	bl	_cpu_to_le16
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	x9, x8, x9, lsl #2
	stur	w0, [x9, #-4]
	ldr	w1, [sp, #12]
	ldrsw	x9, [x19]
	sub	x2, x9, #1
	ldr	w3, [x8, x2, lsl #2]
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_e100_eeprom_write
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_e100_eeprom_save
.subsections_via_symbols
