	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acs_study
_acs_study:                             ## @acs_study
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_acs_study_options
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_acs_find_ideal_chan
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rax), %ecx
	movq	(%r14), %rax
	movl	%ecx, 16(%rax)
	cmpq	$0, 8(%rax)
	jne	LBB0_6
## %bb.5:
	cmpq	$0, (%rax)
	je	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_acs_adjust_center_freq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_8
LBB0_3:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %ebx
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_hostapd_acs_completed
	movq	_HOSTAPD_CHAN_VALID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_acs_cleanup                    ## TAILCALL
LBB0_10:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_acs_fail                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ACS: All study options have failed"

L_.str.1:                               ## @.str.1
	.asciz	"ACS: Failed to compute ideal channel"

	.comm	_HOSTAPD_CHAN_VALID,8,3         ## @HOSTAPD_CHAN_VALID
L_.str.2:                               ## @.str.2
	.asciz	"ACS: Possibly channel configuration is invalid, please report this along with your config file."

	.no_dead_strip	_acs_study
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acs_study
_acs_study:                             ; @acs_study
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_acs_study_options
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_acs_find_ideal_chan
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w9, [x0]
	ldr	x8, [x19]
	str	w9, [x8, #16]
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_4
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_acs_adjust_center_freq
LBB0_5:
	mov	w20, #0
	b	LBB0_8
LBB0_6:
	mov	x20, x0
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
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w20, #-1
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_hostapd_acs_completed
Lloh10:
	adrp	x8, _HOSTAPD_CHAN_VALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HOSTAPD_CHAN_VALID@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_acs_cleanup
LBB0_10:
Lloh13:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_acs_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ACS: All study options have failed"

l_.str.1:                               ; @.str.1
	.asciz	"ACS: Failed to compute ideal channel"

	.comm	_HOSTAPD_CHAN_VALID,8,3         ; @HOSTAPD_CHAN_VALID
l_.str.2:                               ; @.str.2
	.asciz	"ACS: Possibly channel configuration is invalid, please report this along with your config file."

	.no_dead_strip	_acs_study
.subsections_via_symbols
