	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_update_proberesp_tmpl ## -- Begin function wcn36xx_smd_update_proberesp_tmpl
	.p2align	4, 0x90
_wcn36xx_smd_update_proberesp_tmpl:     ## @wcn36xx_smd_update_proberesp_tmpl
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mutex_lock
	movq	_WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-32(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-48(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_INIT_HAL_MSG
	movl	(%rbx), %edx
	movq	_BEACON_TEMPLATE_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_wcn36xx_warn
	movq	_E2BIG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	%edx, -32(%rbp)
	leaq	-28(%rbp), %rdi
	movl	4(%rbx), %esi
	callq	_memcpy
	movq	-40(%rbp), %rdi
	movl	(%r15), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movl	8(%r14), %edi
	movq	-32(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-48(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_PREPARE_HAL_BUF
	movq	_WCN36XX_DBG_HAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-32(%rbp), %edx
	movq	-40(%rbp), %rcx
	leaq	L_.str.1(%rip), %rsi
	callq	_wcn36xx_dbg
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_wcn36xx_smd_send_and_wait
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_7
LBB0_4:
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	callq	_wcn36xx_smd_rsp_status_check
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_7
LBB0_5:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ,4,2 ## @WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ
	.comm	_BEACON_TEMPLATE_SIZE,4,2       ## @BEACON_TEMPLATE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"probe response template is too big: %d\n"

	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ## @WCN36XX_DBG_HAL
L_.str.1:                               ## @.str.1
	.asciz	"hal update probe rsp len %d bssid %pM\n"

L_.str.2:                               ## @.str.2
	.asciz	"Sending hal_update_proberesp_tmpl failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"hal_update_proberesp_tmpl 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_update_proberesp_tmpl ; -- Begin function wcn36xx_smd_update_proberesp_tmpl
	.p2align	2
_wcn36xx_smd_update_proberesp_tmpl:     ; @wcn36xx_smd_update_proberesp_tmpl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x22, sp, #40
	add	x0, sp, #40
	bl	_INIT_HAL_MSG
	ldr	w2, [x21]
Lloh3:
	adrp	x8, _BEACON_TEMPLATE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BEACON_TEMPLATE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w2, w8
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_wcn36xx_warn
Lloh8:
	adrp	x8, _E2BIG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_2:
	str	w2, [sp, #56]
	add	x0, x22, #20
	ldr	w1, [x21, #4]
	bl	_memcpy
	ldr	x0, [sp, #48]
	ldr	w1, [x20]
Lloh11:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	w0, [x19, #8]
	ldur	q0, [sp, #40]
	str	q0, [sp, #16]
	ldr	x8, [sp, #56]
	str	x8, [sp, #32]
	add	x1, sp, #16
	bl	_PREPARE_HAL_BUF
Lloh14:
	adrp	x8, _WCN36XX_DBG_HAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WCN36XX_DBG_HAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	w2, [sp, #56]
	ldr	x3, [sp, #48]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wcn36xx_dbg
	ldr	w1, [sp, #40]
	mov	x0, x19
	bl	_wcn36xx_smd_send_and_wait
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldp	w1, w0, [x19, #4]
	bl	_wcn36xx_smd_rsp_status_check
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.5:
	str	x20, [sp]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_6:
	bl	_wcn36xx_err
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ,4,2 ; @WCN36XX_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ
	.comm	_BEACON_TEMPLATE_SIZE,4,2       ; @BEACON_TEMPLATE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"probe response template is too big: %d\n"

	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ; @WCN36XX_DBG_HAL
l_.str.1:                               ; @.str.1
	.asciz	"hal update probe rsp len %d bssid %pM\n"

l_.str.2:                               ; @.str.2
	.asciz	"Sending hal_update_proberesp_tmpl failed\n"

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

.subsections_via_symbols
