	.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	$40, %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_1
## %bb.2:
	movq	%rdi, %r12
	movq	24(%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_26
## %bb.3:
	movq	_QLCNIC_FW_CAPABILITY_2_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_10
## %bb.4:
	leaq	-72(%rbp), %rsi
	movq	%r12, %rdi
	callq	_qlcnic_get_beacon_state
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	-72(%rbp), %rax
	movq	_QLCNIC_BEACON_DISABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	$0, 4(%r13)
	jmp	LBB0_10
LBB0_1:
	movq	_QL_STATUS_INVALID_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_10
LBB0_8:
	movq	_QLCNIC_BEACON_EANBLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movl	$2, 4(%r13)
LBB0_10:
	movslq	4(%r13), %rax
	movl	$4, %ebx
	cmpq	%rax, -48(%rbp)
	je	LBB0_26
## %bb.11:
	xorl	%eax, %eax
	callq	_rtnl_lock
	cmpl	$0, 4(%r13)
	je	LBB0_12
LBB0_14:
	movq	___QLCNIC_RESETTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_12:
	movq	___QLCNIC_LED_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %rsi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_16:
	movq	___QLCNIC_DEV_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_17
LBB0_19:
	movq	-48(%rbp), %rsi
	movq	-64(%rbp), %rdx
	movq	%r12, %rdi
	callq	_qlcnic_config_led
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movl	-48(%rbp), %eax
	movl	%eax, 4(%r13)
	movl	$4, %ebx
LBB0_21:
	movq	___QLCNIC_DIAG_RES_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_and_clear_bit
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	8(%r12), %edi
	movl	%r14d, %esi
	callq	_qlcnic_diag_free_res
	jmp	LBB0_23
LBB0_17:
	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_18
LBB0_23:
	cmpl	$0, 4(%r13)
	jne	LBB0_25
## %bb.24:
	movq	___QLCNIC_LED_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
LBB0_25:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	jmp	LBB0_26
LBB0_18:
	movq	___QLCNIC_DIAG_RES_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_QL_STATUS_INVALID_PARAM,4,2    ## @QL_STATUS_INVALID_PARAM
	.comm	_QLCNIC_FW_CAPABILITY_2_BEACON,4,2 ## @QLCNIC_FW_CAPABILITY_2_BEACON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get current beacon state\n"

	.comm	_QLCNIC_BEACON_DISABLE,8,3      ## @QLCNIC_BEACON_DISABLE
	.comm	_QLCNIC_BEACON_EANBLE,8,3       ## @QLCNIC_BEACON_EANBLE
	.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_6
; %bb.1:
	mov	x19, x0
	ldr	x23, [x0, #24]
	ldr	w20, [x0]
	add	x0, sp, #28
	bl	_memcpy
	ldr	w1, [sp, #28]
	add	x2, sp, #8
	mov	x3, sp
	mov	x0, x19
	bl	_qlcnic_validate_beacon
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _QLCNIC_FW_CAPABILITY_2_BEACON@GOTPAGE
Lloh1:
	ldr	x9, [x9, _QLCNIC_FW_CAPABILITY_2_BEACON@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.3:
	add	x1, sp, #16
	mov	x0, x19
	bl	_qlcnic_get_beacon_state
	cbz	w0, LBB0_8
; %bb.4:
	ldr	x8, [sp, #16]
Lloh3:
	adrp	x9, _QLCNIC_BEACON_DISABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QLCNIC_BEACON_DISABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	str	wzr, [x23, #4]
	b	LBB0_11
LBB0_6:
Lloh6:
	adrp	x8, _QL_STATUS_INVALID_PARAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QL_STATUS_INVALID_PARAM@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
LBB0_7:
	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_8:
	ldr	x0, [x19, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x9, _QLCNIC_BEACON_EANBLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _QLCNIC_BEACON_EANBLE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #2
	str	w8, [x23, #4]
LBB0_11:
	ldrsw	x8, [x23, #4]
	ldr	x9, [sp, #8]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	w22, #4
	b	LBB0_7
LBB0_13:
	bl	_rtnl_lock
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_16
LBB0_14:
Lloh14:
	adrp	x8, ___QLCNIC_RESETTING@GOTPAGE
Lloh15:
	ldr	x8, [x8, ___QLCNIC_RESETTING@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x21, x19, #4
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_18
; %bb.15:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_24
LBB0_16:
Lloh20:
	adrp	x8, ___QLCNIC_LED_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, ___QLCNIC_LED_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_and_set_bit
	cbz	x0, LBB0_14
; %bb.17:
	bl	_rtnl_unlock
Lloh23:
	adrp	x8, _EBUSY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_18:
Lloh26:
	adrp	x8, ___QLCNIC_DEV_UP@GOTPAGE
Lloh27:
	ldr	x8, [x8, ___QLCNIC_DEV_UP@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_23
LBB0_19:
	ldp	x2, x1, [sp]
	mov	x0, x19
	bl	_qlcnic_config_led
	mov	x22, x0
	cbnz	w0, LBB0_21
; %bb.20:
	ldr	x8, [sp, #8]
	str	w8, [x23, #4]
	mov	w22, #4
LBB0_21:
Lloh29:
	adrp	x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGE
Lloh30:
	ldr	x8, [x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_and_clear_bit
	cbz	x0, LBB0_24
; %bb.22:
	ldr	w0, [x19, #8]
	mov	x1, x20
	bl	_qlcnic_diag_free_res
	b	LBB0_24
LBB0_23:
	ldr	w0, [x19, #8]
Lloh32:
	adrp	x8, _QLCNIC_LED_TEST@GOTPAGE
Lloh33:
	ldr	x8, [x8, _QLCNIC_LED_TEST@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	bl	_qlcnic_diag_alloc_res
	mov	x22, x0
	cbz	w0, LBB0_27
LBB0_24:
	ldr	w8, [x23, #4]
	cbnz	w8, LBB0_26
; %bb.25:
Lloh35:
	adrp	x8, ___QLCNIC_LED_ENABLE@GOTPAGE
Lloh36:
	ldr	x8, [x8, ___QLCNIC_LED_ENABLE@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
LBB0_26:
	bl	_rtnl_unlock
	b	LBB0_7
LBB0_27:
Lloh38:
	adrp	x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGE
Lloh39:
	ldr	x8, [x8, ___QLCNIC_DIAG_RES_ALLOC@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_QL_STATUS_INVALID_PARAM,4,2    ; @QL_STATUS_INVALID_PARAM
	.comm	_QLCNIC_FW_CAPABILITY_2_BEACON,4,2 ; @QLCNIC_FW_CAPABILITY_2_BEACON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get current beacon state\n"

	.comm	_QLCNIC_BEACON_DISABLE,8,3      ; @QLCNIC_BEACON_DISABLE
	.comm	_QLCNIC_BEACON_EANBLE,8,3       ; @QLCNIC_BEACON_EANBLE
	.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
