	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee802_11_set_beacon          ## -- Begin function ieee802_11_set_beacon
	.p2align	4, 0x90
_ieee802_11_set_beacon:                 ## @ieee802_11_set_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
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r14d
	jmp	LBB0_12
LBB0_2:
	movq	%rdi, %rbx
	movq	24(%rdi), %r12
	movq	8(%r12), %r13
	movq	16(%r12), %r15
	movl	$1, (%rdi)
	leaq	-160(%rbp), %rsi
	callq	_ieee802_11_build_ap_params
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	leaq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_hostapd_build_ap_extra_ies
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_11
## %bb.5:
	movq	-88(%rbp), %rax
	movq	%rax, -128(%rbp)
	movq	-80(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-72(%rbp), %rax
	movq	%rax, -144(%rbp)
	movq	8(%rbx), %rax
	movq	%rax, -152(%rbp)
	movq	$0, 8(%rbx)
	testq	%r13, %r13
	je	LBB0_8
## %bb.6:
	movl	20(%r15), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r12), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	16(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	12(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r15), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	4(%r15), %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_hostapd_get_oper_chwidth
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_hostapd_get_oper_centr_freq_seg0_idx
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_hostapd_get_oper_centr_freq_seg1_idx
                                        ## kill: def $eax killed $eax def $rax
	movl	8(%r13), %r10d
	movq	_IEEE80211_MODE_AP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r11
	shlq	$2, %r11
	addq	(%r13), %r11
	subq	$8, %rsp
	leaq	-120(%rbp), %r15
	movq	%r15, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%r11
	pushq	%r10
	pushq	%rax
	pushq	%r12
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-112(%rbp)                      ## 8-byte Folded Reload
	callq	_hostapd_set_freq_params
	addq	$64, %rsp
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	%r15, -160(%rbp)
LBB0_8:
	leaq	-160(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_hostapd_drv_set_ap
	movl	%eax, %r15d
	movq	-88(%rbp), %rsi
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_hostapd_free_ap_extra_ies
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.10:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_11
LBB0_3:
	movl	$-1, %r14d
	jmp	LBB0_12
LBB0_9:
	xorl	%r14d, %r14d
LBB0_11:
	leaq	-160(%rbp), %rdi
	callq	_ieee802_11_free_ap_params
LBB0_12:
	movl	%r14d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot set beacons during CSA period"

	.comm	_IEEE80211_MODE_AP,8,3          ## @IEEE80211_MODE_AP
L_.str.1:                               ## @.str.1
	.asciz	"Failed to set beacon parameters"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee802_11_set_beacon          ; -- Begin function ieee802_11_set_beacon
	.p2align	2
_ieee802_11_set_beacon:                 ; @ieee802_11_set_beacon
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w19, #-1
	b	LBB0_13
LBB0_2:
	mov	x19, x0
	ldr	x21, [x0, #24]
	ldp	x23, x20, [x21, #8]
	mov	w8, #1
	str	w8, [x0]
	add	x1, sp, #72
	bl	_ieee802_11_build_ap_params
	tbnz	x0, #63, LBB0_10
; %bb.3:
	add	x1, sp, #56
	add	x2, sp, #48
	add	x3, sp, #40
	mov	x0, x19
	bl	_hostapd_build_ap_extra_ies
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldp	x9, x8, [sp, #48]
	stp	x9, x8, [sp, #96]
	ldr	x8, [sp, #40]
	ldr	x9, [x19, #8]
	stp	x9, x8, [sp, #80]
	str	xzr, [x19, #8]
	cbz	x23, LBB0_7
; %bb.5:
	ldr	w9, [x21]
	ldp	w8, w22, [x20, #16]
	stp	w8, w9, [sp, #32]               ; 8-byte Folded Spill
	ldp	w25, w24, [x20, #8]
	ldp	w27, w26, [x20]
	mov	x0, x20
	bl	_hostapd_get_oper_chwidth
	mov	x28, x0
	mov	x0, x20
	bl	_hostapd_get_oper_centr_freq_seg0_idx
	mov	x21, x0
	mov	x0, x20
	bl	_hostapd_get_oper_centr_freq_seg1_idx
	mov	x8, x0
	ldr	w9, [x23, #8]
	ldr	x10, [x23]
Lloh5:
	adrp	x11, _IEEE80211_MODE_AP@GOTPAGE
Lloh6:
	ldr	x11, [x11, _IEEE80211_MODE_AP@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	add	x10, x10, x11, lsl #2
	str	x10, [sp, #16]
	add	x20, sp, #64
	add	x0, sp, #64
	stp	w8, w9, [sp, #8]
	stp	w28, w21, [sp]
	mov	x1, x22
	ldp	w3, w2, [sp, #32]               ; 8-byte Folded Reload
	mov	x4, x24
	mov	x5, x25
	mov	x6, x26
	mov	x7, x27
	bl	_hostapd_set_freq_params
	cbnz	x0, LBB0_7
; %bb.6:
	str	x20, [sp, #72]
LBB0_7:
	add	x1, sp, #72
	mov	x0, x19
	bl	_hostapd_drv_set_ap
	mov	x20, x0
	ldp	x2, x1, [sp, #48]
	ldr	x3, [sp, #40]
	mov	x0, x19
	bl	_hostapd_free_ap_extra_ies
	cbz	w20, LBB0_11
; %bb.8:
Lloh8:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_9:
	mov	w19, #-1
	b	LBB0_12
LBB0_10:
	mov	w19, #-1
	b	LBB0_13
LBB0_11:
	mov	w19, #0
LBB0_12:
	add	x0, sp, #72
	bl	_ieee802_11_free_ap_params
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot set beacons during CSA period"

	.comm	_IEEE80211_MODE_AP,8,3          ; @IEEE80211_MODE_AP
l_.str.1:                               ; @.str.1
	.asciz	"Failed to set beacon parameters"

.subsections_via_symbols
