	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_set_link_st        ## -- Begin function wcn36xx_smd_set_link_st
	.p2align	4, 0x90
_wcn36xx_smd_set_link_st:               ## @wcn36xx_smd_set_link_st
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_mutex_lock
	movq	_WCN36XX_HAL_SET_LINK_ST_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_INIT_HAL_MSG
	leaq	-44(%rbp), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rsi
	callq	_memcpy
	movl	(%r13), %edx
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	callq	_memcpy
	movl	%r15d, -56(%rbp)
	movl	8(%r14), %edi
	movq	-56(%rbp), %rsi
	movq	-48(%rbp), %rdx
	callq	_PREPARE_HAL_BUF
	movq	_WCN36XX_DBG_HAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %edx
	movl	-56(%rbp), %r8d
	movl	-48(%rbp), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_wcn36xx_dbg
	movl	-52(%rbp), %esi
	movq	%r14, %rdi
	callq	_wcn36xx_smd_send_and_wait
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_5
LBB0_2:
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	callq	_wcn36xx_smd_rsp_status_check
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_HAL_SET_LINK_ST_REQ,4,2 ## @WCN36XX_HAL_SET_LINK_ST_REQ
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ## @WCN36XX_DBG_HAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hal set link state bssid %pM self_mac_addr %pM state %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Sending hal_set_link_st failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"hal_set_link_st response failed err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_set_link_st        ; -- Begin function wcn36xx_smd_set_link_st
	.p2align	2
_wcn36xx_smd_set_link_st:               ; @wcn36xx_smd_set_link_st
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_mutex_lock
Lloh3:
	adrp	x8, _WCN36XX_HAL_SET_LINK_ST_REQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WCN36XX_HAL_SET_LINK_ST_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x24, sp, #8
	add	x23, x24, #8
	bl	_INIT_HAL_MSG
	add	x0, x24, #12
Lloh6:
	adrp	x24, _ETH_ALEN@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ETH_ALEN@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x1, x22
	bl	_memcpy
	ldr	w2, [x24]
	mov	x0, x23
	mov	x1, x21
	bl	_memcpy
	str	w20, [sp, #8]
	ldr	w0, [x19, #8]
	ldp	x1, x2, [sp, #8]
	bl	_PREPARE_HAL_BUF
Lloh8:
	adrp	x8, _WCN36XX_DBG_HAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WCN36XX_DBG_HAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	w3, w2, [sp, #16]
	ldr	w4, [sp, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wcn36xx_dbg
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_wcn36xx_smd_send_and_wait
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldp	w1, w0, [x19, #4]
	bl	_wcn36xx_smd_rsp_status_check
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.3:
	str	x20, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_4:
	bl	_wcn36xx_err
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	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	___stack_chk_fail
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_HAL_SET_LINK_ST_REQ,4,2 ; @WCN36XX_HAL_SET_LINK_ST_REQ
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ; @WCN36XX_DBG_HAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hal set link state bssid %pM self_mac_addr %pM state %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Sending hal_set_link_st failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"hal_set_link_st response failed err=%d\n"

.subsections_via_symbols
