	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_set_mac_addr
_ql_set_mac_addr:                       ## @ql_set_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	movq	(%r15), %r14
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%r15), %ecx
	leaq	L_.str(%rip), %r8
	movq	%r15, %rdi
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_netif_printk
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KERN_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	12(%r15), %ecx
	leaq	L_.str.1(%rip), %r8
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netif_printk
LBB0_3:
	movq	_SEM_MAC_ADDR_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_sem_spinlock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_MAC_ADDR_TYPE_CAM_MAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAX_CQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	imull	8(%r15), %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ql_set_mac_addr_reg
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ql_sem_unlock
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.6:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	leaq	L_.str.2(%rip), %rcx
	movq	%r15, %rdi
	callq	_netif_err
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_ifup,4,2                       ## @ifup
	.comm	_KERN_DEBUG,4,2                 ## @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Mac addr %pM\n"

L_.str.1:                               ## @.str.1
	.asciz	"Clearing MAC address\n"

	.comm	_SEM_MAC_ADDR_MASK,4,2          ## @SEM_MAC_ADDR_MASK
	.comm	_MAC_ADDR_TYPE_CAM_MAC,4,2      ## @MAC_ADDR_TYPE_CAM_MAC
	.comm	_MAX_CQ,4,2                     ## @MAX_CQ
L_.str.2:                               ## @.str.2
	.asciz	"Failed to init mac address.\n"

	.no_dead_strip	_ql_set_mac_addr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_set_mac_addr
_ql_set_mac_addr:                       ; @ql_set_mac_addr
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	cbz	w1, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _ifup@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
	ldr	x20, [x19]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldr	w3, [x19, #12]
Lloh14:
	adrp	x4, l_.str@PAGE
Lloh15:
	add	x4, x4, l_.str@PAGEOFF
	str	x20, [sp, #-16]!
	mov	x0, x19
	bl	_netif_printk
	add	sp, sp, #16
	b	LBB0_3
LBB0_2:
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
Lloh16:
	adrp	x8, _ifup@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _KERN_DEBUG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _KERN_DEBUG@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	ldr	w3, [x19, #12]
Lloh22:
	adrp	x4, l_.str.1@PAGE
Lloh23:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_printk
LBB0_3:
Lloh24:
	adrp	x22, _SEM_MAC_ADDR_MASK@GOTPAGE
Lloh25:
	ldr	x22, [x22, _SEM_MAC_ADDR_MASK@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ql_sem_spinlock
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
Lloh26:
	adrp	x8, _MAC_ADDR_TYPE_CAM_MAC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MAC_ADDR_TYPE_CAM_MAC@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w8, [x19, #8]
Lloh29:
	adrp	x9, _MAX_CQ@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MAX_CQ@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	mul	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_ql_set_mac_addr_reg
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ql_sem_unlock
	cbz	w21, LBB0_6
; %bb.5:
Lloh32:
	adrp	x8, _ifup@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	w2, [x19, #12]
Lloh35:
	adrp	x3, l_.str.2@PAGE
Lloh36:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	sub	sp, x29, #32
	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
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_ifup,4,2                       ; @ifup
	.comm	_KERN_DEBUG,4,2                 ; @KERN_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Mac addr %pM\n"

l_.str.1:                               ; @.str.1
	.asciz	"Clearing MAC address\n"

	.comm	_SEM_MAC_ADDR_MASK,4,2          ; @SEM_MAC_ADDR_MASK
	.comm	_MAC_ADDR_TYPE_CAM_MAC,4,2      ; @MAC_ADDR_TYPE_CAM_MAC
	.comm	_MAX_CQ,4,2                     ; @MAX_CQ
l_.str.2:                               ; @.str.2
	.asciz	"Failed to init mac address.\n"

	.no_dead_strip	_ql_set_mac_addr
.subsections_via_symbols
