	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function is_40_allowed
_is_40_allowed:                         ## @is_40_allowed
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	_HOSTAPD_MODE_IEEE80211G@GOTPCREL(%rip), %rcx
	movl	$1, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	leal	(%rsi,%rsi,4), %r14d
	addl	$2407, %r14d                    ## imm = 0x967
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %esi
	callq	_hostapd_hw_get_freq
                                        ## kill: def $eax killed $eax def $rax
	movq	(%rbx), %rcx
	cmpq	$0, (%rcx)
	leal	20(%rax,%rax), %edx
	leal	-20(%rax,%rax), %ecx
	cmovgl	%edx, %ecx
	sarl	%ecx
	leal	-25(%rcx), %edx
	cmpl	%edx, %r14d
	jl	LBB0_4
## %bb.2:
	addl	$25, %ecx
	cmpl	%ecx, %r14d
	jg	LBB0_4
## %bb.3:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOSTAPD_MODE_IEEE80211G,8,3    ## @HOSTAPD_MODE_IEEE80211G
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"40 MHz affected channel range: [%d,%d] MHz"

L_.str.1:                               ## @.str.1
	.asciz	"Neighboring BSS: freq=%d"

	.no_dead_strip	_is_40_allowed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function is_40_allowed
_is_40_allowed:                         ; @is_40_allowed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _HOSTAPD_MODE_IEEE80211G@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HOSTAPD_MODE_IEEE80211G@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x20, x0
	add	w8, w1, w1, lsl #2
	add	w19, w8, #2407
	ldp	x9, x8, [x0]
	ldr	w0, [x8]
	ldr	w1, [x9, #8]
	bl	_hostapd_hw_get_freq
	ldr	x8, [x20]
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #20
	cneg	w8, w8, le
	add	w8, w8, w0, lsl #1
	orr	w9, w8, #0x1
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #1
	sub	w2, w8, #25
	add	w8, w8, #25
	cmp	w19, w2
	ccmp	w19, w8, #0, ge
	b.le	LBB0_3
LBB0_2:
	mov	w0, #1
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x20, _MSG_ERROR@GOTPAGE
Lloh4:
	ldr	x20, [x20, _MSG_ERROR@GOTPAGEOFF]
	ldr	w0, [x20]
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_wpa_printf
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HOSTAPD_MODE_IEEE80211G,8,3    ; @HOSTAPD_MODE_IEEE80211G
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"40 MHz affected channel range: [%d,%d] MHz"

l_.str.1:                               ; @.str.1
	.asciz	"Neighboring BSS: freq=%d"

	.no_dead_strip	_is_40_allowed
.subsections_via_symbols
