	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wcn36xx_smd_send_beacon        ## -- Begin function wcn36xx_smd_send_beacon
	.p2align	4, 0x90
_wcn36xx_smd_send_beacon:               ## @wcn36xx_smd_send_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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	_WCN36XX_HAL_SEND_BEACON_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rax
	movq	%rax, 32(%rsp)
	movups	-104(%rbp), %xmm0
	movups	-88(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_INIT_HAL_MSG
	movq	(%r13), %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rbx
	movq	%r14, %rcx
	movslq	4(%rsi,%rbx,4), %r12
	addq	$-3, %r12
	movq	_TIM_MIN_PVM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	subl	%r12d, %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rax
	movq	_NL80211_IFTYPE_MESH_POINT@GOTPCREL(%rip), %rdi
	xorl	%r15d, %r15d
	cmpq	(%rdi), %rax
	cmovel	%r15d, %r14d
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	movl	8(%r13), %edx
	leal	(%r14,%rdx), %eax
	movl	%eax, -104(%rbp)
	leal	(%r14,%rdx), %ecx
	addl	$6, %ecx
	movl	%ecx, -100(%rbp)
	movq	_BEACON_TEMPLATE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_2:
	movq	%rdi, %r13
	movq	-96(%rbp), %r15
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-88(%rbp), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.3:
	leaq	1(%rbx), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_WCN36XX_DBG_HAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_wcn36xx_dbg
	leaq	(%rbx,%r12), %rax
	leaq	(%rbx,%r12), %rcx
	addq	$5, %rcx
	leal	(%r14,%rcx), %edx
	movslq	%edx, %rdx
	leaq	(%r15,%rdx,4), %rdi
	leaq	(%r15,%rax,4), %r12
	addq	$20, %r12
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	8(%rax), %edx
	subl	%ecx, %edx
	movq	%r12, %rsi
	callq	_memmove
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	-112(%rbp), %rax                ## 8-byte Reload
	addl	%r14d, (%r15,%rax,4)
LBB0_4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	addl	$4, %ecx
	cmpq	(%r13), %rax
	movl	$256, %eax                      ## imm = 0x100
	cmovnel	%ecx, %eax
	movl	%eax, -80(%rbp)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -76(%rbp)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r14), %edi
	movq	-72(%rbp), %rax
	movq	%rax, 32(%rsp)
	movups	-104(%rbp), %xmm0
	movups	-88(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_PREPARE_HAL_BUF
	movq	_WCN36XX_DBG_HAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-104(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wcn36xx_dbg
	movl	-72(%rbp), %esi
	movq	%r14, %rdi
	callq	_wcn36xx_smd_send_and_wait
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_8
LBB0_6:
	movl	4(%r14), %esi
	movl	8(%r14), %edi
	callq	_wcn36xx_smd_rsp_status_check
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
LBB0_8:
	movl	%ebx, %r15d
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_HAL_SEND_BEACON_REQ,4,2 ## @WCN36XX_HAL_SEND_BEACON_REQ
	.comm	_TIM_MIN_PVM_SIZE,4,2           ## @TIM_MIN_PVM_SIZE
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ## @NL80211_IFTYPE_MESH_POINT
	.comm	_BEACON_TEMPLATE_SIZE,4,2       ## @BEACON_TEMPLATE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Beacon is to big: beacon size=%d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ## @WCN36XX_DBG_HAL
L_.str.1:                               ## @.str.1
	.asciz	"Pad TIM PVM. %d bytes at %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"hal send beacon beacon_length %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Sending hal_send_beacon failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"hal_send_beacon 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_send_beacon        ; -- Begin function wcn36xx_smd_send_beacon
	.p2align	2
_wcn36xx_smd_send_beacon:               ; @wcn36xx_smd_send_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	bl	_mutex_lock
Lloh0:
	adrp	x8, _WCN36XX_HAL_SEND_BEACON_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_HAL_SEND_BEACON_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	w21, [sp, #36]
	add	x0, sp, #8
	bl	_INIT_HAL_MSG
	ldr	x1, [x22]
	add	w8, w20, #1
	ldr	w26, [x1, w8, sxtw #2]
	sub	w27, w26, #3
Lloh3:
	adrp	x8, _TIM_MIN_PVM_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIM_MIN_PVM_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w8, w8, w27
	ldr	x9, [x23]
Lloh6:
	adrp	x28, _NL80211_IFTYPE_MESH_POINT@GOTPAGE
Lloh7:
	ldr	x28, [x28, _NL80211_IFTYPE_MESH_POINT@GOTPAGEOFF]
	ldr	x10, [x28]
	cmp	x9, x10
	csel	w25, wzr, w8, eq
	ldr	w2, [x22, #8]
Lloh8:
	adrp	x8, _BEACON_TEMPLATE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BEACON_TEMPLATE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	add	w24, w25, w2
	cmp	w24, w8
	b.le	LBB0_2
; %bb.1:
	str	x24, [sp]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wcn36xx_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_2:
	bl	_memcpy
	ldr	x1, [x23, #8]
Lloh16:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_memcpy
	cmp	w25, #1
	b.ge	LBB0_9
; %bb.3:
	add	w8, w24, #6
	ldr	x9, [x23]
	ldr	x10, [x28]
	add	w11, w20, #4
	cmp	x9, x10
	mov	w9, #256
	csel	w9, w9, w11, eq
	ldr	w0, [x19, #8]
	stp	w24, w8, [sp, #8]
	stp	w9, w21, [sp, #32]
	add	x1, sp, #8
	bl	_PREPARE_HAL_BUF
Lloh19:
	adrp	x8, _WCN36XX_DBG_HAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WCN36XX_DBG_HAL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x24
	bl	_wcn36xx_dbg
	mov	x0, x19
	bl	_wcn36xx_smd_send_and_wait
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldp	w1, w0, [x19, #4]
	bl	_wcn36xx_smd_rsp_status_check
	mov	x20, x0
	cbz	w0, LBB0_8
; %bb.6:
	str	x20, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_7:
	bl	_wcn36xx_err
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
Lloh28:
	adrp	x8, _WCN36XX_DBG_HAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _WCN36XX_DBG_HAL@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	str	x27, [sp]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x25
	bl	_wcn36xx_dbg
	ldr	w8, [x22, #8]
	add	w9, w20, w26
	sub	w8, w8, w9
	sub	w2, w8, #2
	bl	_memmove
	mov	w1, #0
	mov	x2, x25
	bl	_memset
	brk	#0x1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_HAL_SEND_BEACON_REQ,4,2 ; @WCN36XX_HAL_SEND_BEACON_REQ
	.comm	_TIM_MIN_PVM_SIZE,4,2           ; @TIM_MIN_PVM_SIZE
	.comm	_NL80211_IFTYPE_MESH_POINT,8,3  ; @NL80211_IFTYPE_MESH_POINT
	.comm	_BEACON_TEMPLATE_SIZE,4,2       ; @BEACON_TEMPLATE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Beacon is to big: beacon size=%d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WCN36XX_DBG_HAL,4,2            ; @WCN36XX_DBG_HAL
l_.str.1:                               ; @.str.1
	.asciz	"Pad TIM PVM. %d bytes at %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"hal send beacon beacon_length %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Sending hal_send_beacon failed\n"

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

.subsections_via_symbols
