	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_is_usable_chan
_hostapd_is_usable_chan:                ## @hostapd_is_usable_chan
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.1:
	movl	%edx, %r12d
	movl	%esi, %r14d
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_hw_get_channel_chan
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %r15
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	callq	_chan_pri_allowed
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movl	(%r15), %r8d
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movl	(%r15), %r8d
	movq	_HOSTAPD_CHAN_DISABLED@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_10
## %bb.6:
	leaq	L_.str.2(%rip), %rcx
LBB0_7:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HOSTAPD_CHAN_NO_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r8d, %eax
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %r9
	cmoveq	%rax, %r9
	movq	_HOSTAPD_CHAN_RADAR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%r8d, %edx
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	%rdx, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_wpa_printf
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	$1, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HOSTAPD_CHAN_DISABLED,4,2      ## @HOSTAPD_CHAN_DISABLED
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel %d (%s) not allowed for AP mode, flags: 0x%x%s%s"

L_.str.1:                               ## @.str.1
	.asciz	"primary"

L_.str.2:                               ## @.str.2
	.asciz	"secondary"

	.comm	_HOSTAPD_CHAN_NO_IR,4,2         ## @HOSTAPD_CHAN_NO_IR
L_.str.3:                               ## @.str.3
	.asciz	" NO-IR"

L_.str.4:                               ## @.str.4
	.space	1

	.comm	_HOSTAPD_CHAN_RADAR,4,2         ## @HOSTAPD_CHAN_RADAR
L_.str.5:                               ## @.str.5
	.asciz	" RADAR"

	.no_dead_strip	_hostapd_is_usable_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_is_usable_chan
_hostapd_is_usable_chan:                ; @hostapd_is_usable_chan
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w0, [x0]
	cbz	w0, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x2, #0
	bl	_hw_get_channel_chan
	cbz	x0, LBB0_9
; %bb.2:
	mov	x21, x0
	cbz	w20, LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_chan_pri_allowed
	cbnz	x0, LBB0_8
; %bb.4:
	ldr	w4, [x21]
Lloh0:
	adrp	x3, l_.str.1@PAGE
Lloh1:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w4, [x21]
Lloh2:
	adrp	x8, _HOSTAPD_CHAN_DISABLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HOSTAPD_CHAN_DISABLED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w4
	b.eq	LBB0_8
; %bb.6:
Lloh5:
	adrp	x3, l_.str.2@PAGE
Lloh6:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_7:
Lloh7:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _HOSTAPD_CHAN_NO_IR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HOSTAPD_CHAN_NO_IR@GOTPAGEOFF]
Lloh12:
	adrp	x9, l_.str.3@PAGE
Lloh13:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x10, l_.str.4@PAGE
Lloh16:
	add	x10, x10, l_.str.4@PAGEOFF
	tst	w8, w4
Lloh17:
	adrp	x8, _HOSTAPD_CHAN_RADAR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HOSTAPD_CHAN_RADAR@GOTPAGEOFF]
	csel	x5, x10, x9, eq
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, l_.str.5@PAGE
Lloh21:
	add	x9, x9, l_.str.5@PAGEOFF
	tst	w8, w4
	csel	x6, x10, x9, eq
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_wpa_printf
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_HOSTAPD_CHAN_DISABLED,4,2      ; @HOSTAPD_CHAN_DISABLED
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel %d (%s) not allowed for AP mode, flags: 0x%x%s%s"

l_.str.1:                               ; @.str.1
	.asciz	"primary"

l_.str.2:                               ; @.str.2
	.asciz	"secondary"

	.comm	_HOSTAPD_CHAN_NO_IR,4,2         ; @HOSTAPD_CHAN_NO_IR
l_.str.3:                               ; @.str.3
	.asciz	" NO-IR"

l_.str.4:                               ; @.str.4
	.space	1

	.comm	_HOSTAPD_CHAN_RADAR,4,2         ; @HOSTAPD_CHAN_RADAR
l_.str.5:                               ; @.str.5
	.asciz	" RADAR"

	.no_dead_strip	_hostapd_is_usable_chan
.subsections_via_symbols
