	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function skge_set_mac_address
_skge_set_mac_address:                  ## @skge_set_mac_address
	.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, %rbx
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	8(%rax), %r15
	movl	(%rax), %r14d
	movl	(%rbx), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r13), %edi
	movl	(%rbx), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_memcpy
	movq	%r13, %rdi
	callq	_netif_running
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movq	_GM_GP_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gma_read16
	movl	(%rbx), %edx
	movq	_GM_GPCR_RX_ENA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	andl	%eax, %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gma_write16
	movq	_B2_MAC_1@GOTPCREL(%rip), %rax
	leal	(,%r14,8), %ebx
	movq	8(%r15), %rdi
	addq	%rbx, %rdi
	addq	(%rax), %rdi
	movl	(%r13), %esi
	movl	(%r12), %edx
	callq	_memcpy_toio
	movq	_B2_MAC_2@GOTPCREL(%rip), %rax
	addq	8(%r15), %rbx
	addq	(%rax), %rbx
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_memcpy_toio
	movq	%r15, %rdi
	callq	_is_genesis
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_XM_SA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_xm_outaddr
	jmp	LBB0_7
LBB0_1:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_3:
	movq	_B2_MAC_1@GOTPCREL(%rip), %rax
	shll	$3, %r14d
	movq	8(%r15), %rdi
	addq	%r14, %rdi
	addq	(%rax), %rdi
	movl	(%r13), %esi
	movl	(%r12), %edx
	callq	_memcpy_toio
	movq	_B2_MAC_2@GOTPCREL(%rip), %rax
	addq	8(%r15), %r14
	addq	(%rax), %r14
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_memcpy_toio
	jmp	LBB0_8
LBB0_6:
	movq	_GM_SRC_ADDR_1L@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gma_set_addr
	movq	_GM_SRC_ADDR_2L@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gma_set_addr
LBB0_7:
	movq	_GM_GP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_gma_write16
	movq	%r15, %rdi
	callq	_spin_unlock_bh
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_B2_MAC_1,8,3                   ## @B2_MAC_1
	.comm	_B2_MAC_2,8,3                   ## @B2_MAC_2
	.comm	_GM_GP_CTRL,4,2                 ## @GM_GP_CTRL
	.comm	_GM_GPCR_RX_ENA,4,2             ## @GM_GPCR_RX_ENA
	.comm	_XM_SA,4,2                      ## @XM_SA
	.comm	_GM_SRC_ADDR_1L,4,2             ## @GM_SRC_ADDR_1L
	.comm	_GM_SRC_ADDR_2L,4,2             ## @GM_SRC_ADDR_2L
	.no_dead_strip	_skge_set_mac_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function skge_set_mac_address
_skge_set_mac_address:                  ; @skge_set_mac_address
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x1
	mov	x20, x0
	bl	_netdev_priv
	ldr	x19, [x0, #8]
	ldr	w21, [x0]
	ldr	w0, [x22]
	bl	_is_valid_ether_addr
	cbz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x20]
	ldr	w1, [x22]
Lloh0:
	adrp	x24, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_memcpy
	mov	x0, x20
	bl	_netif_running
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_spin_lock_bh
Lloh2:
	adrp	x23, _GM_GP_CTRL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GM_GP_CTRL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_gma_read16
	mov	x22, x0
	ldr	w2, [x23]
Lloh4:
	adrp	x8, _GM_GPCR_RX_ENA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GM_GPCR_RX_ENA@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w3, w0, w8
	mov	x0, x19
	mov	x1, x21
	bl	_gma_write16
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _B2_MAC_1@GOTPAGE
Lloh8:
	ldr	x9, [x9, _B2_MAC_1@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	lsl	w25, w21, #3
	add	x8, x8, x25
	add	x0, x8, x9
	ldr	w1, [x20]
	ldr	w2, [x24]
	bl	_memcpy_toio
Lloh10:
	adrp	x8, _B2_MAC_2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _B2_MAC_2@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh12:
	ldr	x8, [x8]
	add	x9, x9, x25
	add	x0, x9, x8
	ldr	w1, [x20]
	ldr	w2, [x24]
	bl	_memcpy_toio
	mov	x0, x19
	bl	_is_genesis
	cbz	x0, LBB0_6
; %bb.3:
Lloh13:
	adrp	x8, _XM_SA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XM_SA@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x21
	bl	_xm_outaddr
	b	LBB0_7
LBB0_4:
Lloh16:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _B2_MAC_1@GOTPAGE
Lloh20:
	ldr	x9, [x9, _B2_MAC_1@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	lsl	w21, w21, #3
	add	x8, x8, x21
	add	x0, x8, x9
	ldr	w1, [x20]
	ldr	w2, [x24]
	bl	_memcpy_toio
Lloh22:
	adrp	x8, _B2_MAC_2@GOTPAGE
Lloh23:
	ldr	x8, [x8, _B2_MAC_2@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh24:
	ldr	x8, [x8]
	add	x9, x9, x21
	add	x0, x9, x8
	ldr	w1, [x20]
	ldr	w2, [x24]
	bl	_memcpy_toio
	b	LBB0_8
LBB0_6:
Lloh25:
	adrp	x8, _GM_SRC_ADDR_1L@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GM_SRC_ADDR_1L@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x21
	bl	_gma_set_addr
Lloh28:
	adrp	x8, _GM_SRC_ADDR_2L@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GM_SRC_ADDR_2L@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x21
	bl	_gma_set_addr
LBB0_7:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	bl	_gma_write16
	mov	x0, x19
	bl	_spin_unlock_bh
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_B2_MAC_1,8,3                   ; @B2_MAC_1
	.comm	_B2_MAC_2,8,3                   ; @B2_MAC_2
	.comm	_GM_GP_CTRL,4,2                 ; @GM_GP_CTRL
	.comm	_GM_GPCR_RX_ENA,4,2             ; @GM_GPCR_RX_ENA
	.comm	_XM_SA,4,2                      ; @XM_SA
	.comm	_GM_SRC_ADDR_1L,4,2             ; @GM_SRC_ADDR_1L
	.comm	_GM_SRC_ADDR_2L,4,2             ; @GM_SRC_ADDR_2L
	.no_dead_strip	_skge_set_mac_address
.subsections_via_symbols
