	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_select_hw_mode         ## -- Begin function hostapd_select_hw_mode
	.p2align	4, 0x90
_hostapd_select_hw_mode:                ## @hostapd_select_hw_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdx
	movq	(%rdx), %rax
	movq	_HOSTAPD_MODE_IEEE80211G@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_6
## %bb.3:
	cmpq	$0, 32(%rdx)
	jne	LBB0_6
## %bb.4:
	cmpq	$0, 24(%rdx)
	jne	LBB0_6
## %bb.5:
	cmpq	$0, 16(%rdx)
	je	LBB0_7
LBB0_6:
	cmpl	$14, 8(%rdx)
	jne	LBB0_7
## %bb.8:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	_HOSTAPD_MODE_IEEE80211B@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rcx)
	movq	$0, 32(%rcx)
	movl	(%rbx), %ecx
	movq	$0, 24(%rbx)
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.9:
	leaq	24(%rbx), %rdx
	jmp	LBB0_10
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_22
LBB0_7:
	leaq	24(%rbx), %rdx
	movq	$0, 24(%rbx)
LBB0_10:
	movq	32(%rbx), %rsi
	movl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rsi)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	$8, %rsi
	decq	%rcx
	jne	LBB0_12
LBB0_16:
	movl	4(%rbx), %eax
	movq	_WPA_DRIVER_FLAGS_ACS_OFFLOAD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.17:
	movq	_WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_14
LBB0_18:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %edi
	movq	_HOSTAPD_MODULE_IEEE80211@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_HOSTAPD_LEVEL_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %r9d
	leaq	L_.str.2(%rip), %r8
	xorl	%esi, %esi
	callq	_hostapd_logger
	movl	$-2, %eax
	jmp	LBB0_22
LBB0_13:
	movq	%rsi, (%rdx)
LBB0_14:
	movq	%rbx, %rdi
	callq	_hostapd_check_chans
	cmpl	$128, %eax
	je	LBB0_15
## %bb.19:
	cmpl	$130, %eax
	jne	LBB0_21
## %bb.20:
	movl	$1, %eax
	jmp	LBB0_22
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_21:
	movq	%rbx, %rdi
	callq	_hostapd_notify_bad_chans
	movl	$-3, %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HOSTAPD_MODE_IEEE80211G,8,3    ## @HOSTAPD_MODE_IEEE80211G
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disable OFDM/HT/VHT/HE on channel 14"

	.comm	_HOSTAPD_MODE_IEEE80211B,8,3    ## @HOSTAPD_MODE_IEEE80211B
	.comm	_WPA_DRIVER_FLAGS_ACS_OFFLOAD,4,2 ## @WPA_DRIVER_FLAGS_ACS_OFFLOAD
	.comm	_WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY,4,2 ## @WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Hardware does not support configured mode"

	.comm	_HOSTAPD_MODULE_IEEE80211,4,2   ## @HOSTAPD_MODULE_IEEE80211
	.comm	_HOSTAPD_LEVEL_WARNING,4,2      ## @HOSTAPD_LEVEL_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"Hardware does not support configured mode (%d) (hw_mode in hostapd.conf)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_select_hw_mode         ; -- Begin function hostapd_select_hw_mode
	.p2align	2
_hostapd_select_hw_mode:                ; @hostapd_select_hw_mode
	.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
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x10, [x0, #8]
	ldr	x8, [x10]
Lloh0:
	adrp	x11, _HOSTAPD_MODE_IEEE80211G@GOTPAGE
Lloh1:
	ldr	x11, [x11, _HOSTAPD_MODE_IEEE80211G@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x8, x11
	b.eq	LBB0_5
; %bb.2:
	ldr	x11, [x10, #32]
	cbnz	x11, LBB0_5
; %bb.3:
	ldr	x11, [x10, #24]
	cbnz	x11, LBB0_5
; %bb.4:
	ldr	x11, [x10, #16]
	cbz	x11, LBB0_8
LBB0_5:
	ldr	w10, [x10, #8]
	cmp	w10, #14
	b.ne	LBB0_8
; %bb.6:
Lloh3:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh8:
	adrp	x8, _HOSTAPD_MODE_IEEE80211B@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HOSTAPD_MODE_IEEE80211B@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	str	x8, [x9]
	stp	xzr, xzr, [x9, #24]
	str	xzr, [x9, #16]
	ldr	w9, [x19]
	mov	x10, x19
	str	xzr, [x10, #24]!
	cmp	w9, #1
	b.ge	LBB0_9
	b	LBB0_12
LBB0_7:
	mov	w0, #-1
	b	LBB0_21
LBB0_8:
	mov	x10, x19
	str	xzr, [x10, #24]!
LBB0_9:
	ldr	x11, [x19, #32]
	mov	w9, w9
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	cmp	x12, x8
	b.eq	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x11, x11, #8
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_12:
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _WPA_DRIVER_FLAGS_ACS_OFFLOAD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WPA_DRIVER_FLAGS_ACS_OFFLOAD@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
Lloh14:
	adrp	x9, _WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_16
LBB0_14:
Lloh17:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
Lloh22:
	adrp	x8, _HOSTAPD_MODULE_IEEE80211@GOTPAGE
Lloh23:
	ldr	x8, [x8, _HOSTAPD_MODULE_IEEE80211@GOTPAGEOFF]
	ldp	x10, x9, [x19, #8]
	ldr	w0, [x9]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x8, _HOSTAPD_LEVEL_WARNING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _HOSTAPD_LEVEL_WARNING@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	ldr	w5, [x10]
Lloh28:
	adrp	x4, l_.str.2@PAGE
Lloh29:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	x1, #0
	bl	_hostapd_logger
	mov	w0, #-2
	b	LBB0_21
LBB0_15:
	str	x11, [x10]
LBB0_16:
	mov	x0, x19
	bl	_hostapd_check_chans
	cmp	w0, #128
	b.eq	LBB0_19
; %bb.17:
	cmp	w0, #130
	b.ne	LBB0_20
; %bb.18:
	mov	w0, #1
	b	LBB0_21
LBB0_19:
	mov	w0, #0
	b	LBB0_21
LBB0_20:
	mov	x0, x19
	bl	_hostapd_notify_bad_chans
	mov	w0, #-3
LBB0_21:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_HOSTAPD_MODE_IEEE80211G,8,3    ; @HOSTAPD_MODE_IEEE80211G
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disable OFDM/HT/VHT/HE on channel 14"

	.comm	_HOSTAPD_MODE_IEEE80211B,8,3    ; @HOSTAPD_MODE_IEEE80211B
	.comm	_WPA_DRIVER_FLAGS_ACS_OFFLOAD,4,2 ; @WPA_DRIVER_FLAGS_ACS_OFFLOAD
	.comm	_WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY,4,2 ; @WPA_DRIVER_FLAGS_SUPPORT_HW_MODE_ANY
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Hardware does not support configured mode"

	.comm	_HOSTAPD_MODULE_IEEE80211,4,2   ; @HOSTAPD_MODULE_IEEE80211
	.comm	_HOSTAPD_LEVEL_WARNING,4,2      ; @HOSTAPD_LEVEL_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"Hardware does not support configured mode (%d) (hw_mode in hostapd.conf)"

.subsections_via_symbols
