	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dm9000_set_eeprom
_dm9000_set_eeprom:                     ## @dm9000_set_eeprom
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_dm9000_board
	movq	%rax, %r15
	movq	_DM9000_PLATF_NO_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	8(%r12), %rax
	movq	_DM_EEPROM_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.4:
	movl	4(%r12), %r14d
	xorl	%eax, %eax
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.5:
	movl	(%r12), %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %esi
	shrl	$31, %esi
	addl	%r12d, %esi
	sarl	%esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_dm9000_write_eeprom
	movl	$2, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %ecx
	leaq	(%r13,%rcx,4), %r13
	addl	%eax, %r12d
	subl	%eax, %r14d
	jle	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %eax
	orl	%r12d, %eax
	testb	$1, %al
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %r15d
	andl	$1, %r15d
	movl	%r12d, %ebx
	shrl	$31, %ebx
	addl	%r12d, %ebx
	sarl	%ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	leaq	-56(%rbp), %rdx
	callq	_dm9000_read_eeprom
	movl	(%r13), %eax
	movl	%r15d, %ecx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, -56(%rbp,%rcx,4)
	movq	%r15, %rdi
	movl	%ebx, %esi
	leaq	-56(%rbp), %rdx
	callq	_dm9000_write_eeprom
	movl	$1, %eax
	jmp	LBB0_9
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DM9000_PLATF_NO_EEPROM,4,2     ## @DM9000_PLATF_NO_EEPROM
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_DM_EEPROM_MAGIC,8,3            ## @DM_EEPROM_MAGIC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_dm9000_set_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dm9000_set_eeprom
_dm9000_set_eeprom:                     ; @dm9000_set_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_to_dm9000_board
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _DM9000_PLATF_NO_EEPROM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DM9000_PLATF_NO_EEPROM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	ldr	x8, [x21, #8]
Lloh8:
	adrp	x9, _DM_EEPROM_MAGIC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DM_EEPROM_MAGIC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	ldr	w22, [x21, #4]
	cmp	w22, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x20, x0
	ldr	w23, [x21]
	mov	x24, sp
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w1, w8, #1
	mov	x0, x20
	mov	x2, x19
	bl	_dm9000_write_eeprom
	mov	w8, #2
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x19, x19, w8, uxtw #2
	add	w23, w8, w23
	sub	w22, w22, w8
	cmp	w22, #0
	b.le	LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	orr	w8, w22, w23
	tbz	w8, #0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	and	w25, w23, #0x1
	cmp	w23, #0
	cinc	w8, w23, lt
	asr	w21, w8, #1
	mov	x2, sp
	mov	x0, x20
	mov	x1, x21
	bl	_dm9000_read_eeprom
	ldr	w8, [x19]
	str	w8, [x24, w25, uxtw #2]
	mov	x2, sp
	mov	x0, x20
	mov	x1, x21
	bl	_dm9000_write_eeprom
	mov	w8, #1
	b	LBB0_6
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldr	x8, [sp, #8]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	mov	w0, #0
	b	LBB0_11
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DM9000_PLATF_NO_EEPROM,4,2     ; @DM9000_PLATF_NO_EEPROM
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_DM_EEPROM_MAGIC,8,3            ; @DM_EEPROM_MAGIC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_dm9000_set_eeprom
.subsections_via_symbols
