	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks8842_write_mac_addr
_ks8842_write_mac_addr:                 ## @ks8842_write_mac_addr
	.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
	movq	%rsi, %r15
	movq	%rdi, %r13
	addq	$4, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_ETH_ALEN@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	$-1, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movl	(%r12), %eax
	decl	%ebx
	cmpq	%rax, %r14
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	addl	%ebx, %eax
	movl	(%r15,%rax,4), %edx
	movq	_REG_MARL@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%r14, %rcx
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_ks8842_write8
	movq	_MICREL_KS884X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %eax
	addl	%ebx, %eax
	movl	(%r15,%rax,4), %edx
	movq	_REG_MACAR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%r14, %rcx
	movq	%r13, %rdi
	movl	$39, %esi
	callq	_ks8842_write8
	jmp	LBB0_4
LBB0_5:
	movq	_MICREL_KS884X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_7
## %bb.6:
	movq	_REG_MARL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_ks8842_read16
	movq	_REG_MACAR3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r13, %rdi
	movl	$39, %esi
	movl	%eax, %edx
	callq	_ks8842_write16
	movq	_REG_MARM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_ks8842_read16
	movq	_REG_MACAR2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r13, %rdi
	movl	$39, %esi
	movl	%eax, %edx
	callq	_ks8842_write16
	movq	_REG_MARH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_ks8842_read16
	movq	_REG_MACAR1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r13, %rdi
	movl	$39, %esi
	movl	%eax, %edx
	callq	_ks8842_write16
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_REG_MARL,8,3                   ## @REG_MARL
	.comm	_MICREL_KS884X,4,2              ## @MICREL_KS884X
	.comm	_REG_MACAR1,8,3                 ## @REG_MACAR1
	.comm	_REG_MACAR3,8,3                 ## @REG_MACAR3
	.comm	_REG_MARM,8,3                   ## @REG_MARM
	.comm	_REG_MACAR2,8,3                 ## @REG_MACAR2
	.comm	_REG_MARH,8,3                   ## @REG_MARH
	.no_dead_strip	_ks8842_write_mac_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks8842_write_mac_addr
_ks8842_write_mac_addr:                 ; @ks8842_write_mac_addr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x25, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x24, _MICREL_KS884X@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MICREL_KS884X@GOTPAGEOFF]
Lloh4:
	adrp	x23, _REG_MARL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _REG_MARL@GOTPAGEOFF]
Lloh6:
	adrp	x22, _REG_MACAR1@GOTPAGE
Lloh7:
	ldr	x22, [x22, _REG_MACAR1@GOTPAGEOFF]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x26, #0
	mov	w27, #-1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	ldr	w8, [x25]
	sub	w27, w27, #1
	cmp	x26, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w8, w27
	ldr	w2, [x21, w8, uxtw #2]
	ldr	x8, [x23]
	add	x3, x26, x8
	mov	x0, x20
	mov	w1, #2
	bl	_ks8842_write8
	ldr	w8, [x20]
	ldr	w9, [x24]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	add	w8, w27, w8
	ldr	w2, [x21, w8, uxtw #2]
	ldr	x8, [x22]
	add	x3, x26, x8
	mov	x0, x20
	mov	w1, #39
	bl	_ks8842_write8
	b	LBB0_2
LBB0_5:
	ldr	w8, [x20]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	x2, [x23]
	mov	x0, x20
	mov	w1, #2
	bl	_ks8842_read16
	mov	x2, x0
Lloh8:
	adrp	x8, _REG_MACAR3@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_MACAR3@GOTPAGEOFF]
Lloh10:
	ldr	x3, [x8]
	mov	x0, x20
	mov	w1, #39
	bl	_ks8842_write16
Lloh11:
	adrp	x8, _REG_MARM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_MARM@GOTPAGEOFF]
Lloh13:
	ldr	x2, [x8]
	mov	x0, x20
	mov	w1, #2
	bl	_ks8842_read16
	mov	x2, x0
Lloh14:
	adrp	x8, _REG_MACAR2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_MACAR2@GOTPAGEOFF]
Lloh16:
	ldr	x3, [x8]
	mov	x0, x20
	mov	w1, #39
	bl	_ks8842_write16
Lloh17:
	adrp	x8, _REG_MARH@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_MARH@GOTPAGEOFF]
Lloh19:
	ldr	x2, [x8]
	mov	x0, x20
	mov	w1, #2
	bl	_ks8842_read16
	mov	x2, x0
	ldr	x3, [x22]
	mov	x0, x20
	mov	w1, #39
	bl	_ks8842_write16
LBB0_7:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_REG_MARL,8,3                   ; @REG_MARL
	.comm	_MICREL_KS884X,4,2              ; @MICREL_KS884X
	.comm	_REG_MACAR1,8,3                 ; @REG_MACAR1
	.comm	_REG_MACAR3,8,3                 ; @REG_MACAR3
	.comm	_REG_MARM,8,3                   ; @REG_MARM
	.comm	_REG_MACAR2,8,3                 ; @REG_MACAR2
	.comm	_REG_MARH,8,3                   ; @REG_MARH
	.no_dead_strip	_ks8842_write_mac_addr
.subsections_via_symbols
