	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_82xx_store_beacon
_qlcnic_82xx_store_beacon:              ## @qlcnic_82xx_store_beacon
	.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
	cmpq	$4, %rdx
	jne	LBB0_6
## %bb.1:
	movq	%rdi, %r12
	movq	16(%rdi), %r13
	movl	(%rdi), %r14d
	leaq	-52(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	-52(%rbp), %esi
	leaq	-48(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	callq	_qlcnic_validate_beacon
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	%r12, %rdi
	callq	_qlcnic_get_beacon_state
	movq	(%r13), %rax
	movl	$4, %ebx
	cmpq	-48(%rbp), %rax
	je	LBB0_8
## %bb.3:
	xorl	%eax, %eax
	callq	_rtnl_lock
	cmpq	$0, (%r13)
	je	LBB0_9
LBB0_4:
	movq	___QLCNIC_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_11
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	___QLCNIC_LED_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	movq	___QLCNIC_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_16
LBB0_12:
	movq	-48(%rbp), %rsi
	movq	-64(%rbp), %rdx
	movq	%r12, %rdi
	callq	_qlcnic_config_led
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rax
	movq	%rax, (%r13)
	movl	$4, %ebx
LBB0_14:
	movq	___QLCNIC_DIAG_RES_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movl	8(%r12), %edi
	movl	%r14d, %esi
	callq	_qlcnic_diag_free_res
	jmp	LBB0_17
LBB0_16:
	movl	8(%r12), %edi
	movq	_QLCNIC_LED_TEST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_qlcnic_diag_alloc_res
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_20
LBB0_17:
	cmpq	$0, (%r13)
	jne	LBB0_19
## %bb.18:
	movq	___QLCNIC_LED_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
LBB0_19:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	jmp	LBB0_8
LBB0_20:
	movq	___QLCNIC_DIAG_RES_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	___QLCNIC_LED_ENABLE,4,2        ## @__QLCNIC_LED_ENABLE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	___QLCNIC_RESETTING,4,2         ## @__QLCNIC_RESETTING
	.comm	_EIO,4,2                        ## @EIO
	.comm	___QLCNIC_DEV_UP,4,2            ## @__QLCNIC_DEV_UP
	.comm	_QLCNIC_LED_TEST,4,2            ## @QLCNIC_LED_TEST
	.comm	___QLCNIC_DIAG_RES_ALLOC,4,2    ## @__QLCNIC_DIAG_RES_ALLOC
	.no_dead_strip	_qlcnic_82xx_store_beacon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_82xx_store_beacon
_qlcnic_82xx_store_beacon:              ; @qlcnic_82xx_store_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cmp	x2, #4
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x23, [x0, #16]
	ldr	w20, [x0]
	add	x0, sp, #28
	bl	_memcpy
	ldr	w1, [sp, #28]
	add	x2, sp, #16
	add	x3, sp, #8
	mov	x0, x19
	bl	_qlcnic_validate_beacon
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_qlcnic_get_beacon_state
	ldr	x8, [x23]
	ldr	x9, [sp, #16]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	mov	w22, #4
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_7:
	bl	_rtnl_lock
	ldr	x8, [x23]
	cbz	x8, LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, ___QLCNIC_RESETTING@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___QLCNIC_RESETTING@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x21, x19, #4
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_12
; %bb.9:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_18
LBB0_10:
Lloh8:
	adrp	x8, ___QLCNIC_LED_ENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, ___QLCNIC_LED_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_and_set_bit
	cbz	x0, LBB0_8
; %bb.11:
	bl	_rtnl_unlock
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_12:
Lloh13:
	adrp	x8, ___QLCNIC_DEV_UP@GOTPAGE
Lloh14:
	ldr	x8, [x8, ___QLCNIC_DEV_UP@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_17
LBB0_13:
	ldp	x2, x1, [sp, #8]
	mov	x0, x19
	bl	_qlcnic_config_led
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	x8, [sp, #16]
	str	x8, [x23]
	mov	w22, #4
LBB0_15:
Lloh16:
	adrp	x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGE
Lloh17:
	ldr	x8, [x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_and_clear_bit
	cbz	x0, LBB0_18
; %bb.16:
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_qlcnic_diag_free_res
	b	LBB0_18
LBB0_17:
	ldr	w0, [x19, #8]
Lloh19:
	adrp	x8, _QLCNIC_LED_TEST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _QLCNIC_LED_TEST@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_qlcnic_diag_alloc_res
	mov	x22, x0
	cbz	w0, LBB0_21
LBB0_18:
	ldr	x8, [x23]
	cbnz	x8, LBB0_20
; %bb.19:
Lloh22:
	adrp	x8, ___QLCNIC_LED_ENABLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, ___QLCNIC_LED_ENABLE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
LBB0_20:
	bl	_rtnl_unlock
	b	LBB0_6
LBB0_21:
Lloh25:
	adrp	x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGE
Lloh26:
	ldr	x8, [x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	___QLCNIC_LED_ENABLE,4,2        ; @__QLCNIC_LED_ENABLE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	___QLCNIC_RESETTING,4,2         ; @__QLCNIC_RESETTING
	.comm	_EIO,4,2                        ; @EIO
	.comm	___QLCNIC_DEV_UP,4,2            ; @__QLCNIC_DEV_UP
	.comm	_QLCNIC_LED_TEST,4,2            ; @QLCNIC_LED_TEST
	.comm	___QLCNIC_DIAG_RES_ALLOC,4,2    ; @__QLCNIC_DIAG_RES_ALLOC
	.no_dead_strip	_qlcnic_82xx_store_beacon
.subsections_via_symbols
