	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_eid_txpower_envelope   ## -- Begin function hostapd_eid_txpower_envelope
	.p2align	4, 0x90
_hostapd_eid_txpower_envelope:          ## @hostapd_eid_txpower_envelope
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	8(%rdi), %r13
	movq	16(%r13), %r12
	testq	%r12, %r12
	je	LBB0_19
## %bb.1:
	movq	%rdi, %r15
	movq	8(%r13), %rbx
	movq	(%r13), %rdi
	leaq	-44(%rbp), %rsi
	callq	_ieee80211_freq_to_chan
	movq	_NUM_HOSTAPD_MODES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.2:
	movq	%rbx, %rsi
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.7:
	movq	8(%r12), %rcx
	movq	(%r13), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx)
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	addq	$16, %rcx
	cmpq	%rbx, %rax
	jne	LBB0_8
	jmp	LBB0_19
LBB0_3:
	xorl	%ebx, %ebx
LBB0_4:
	cmpl	%eax, %ebx
	je	LBB0_19
## %bb.5:
	movq	8(%r13), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_19
## %bb.6:
	movl	$2, %r13d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movl	$3, %r13d
	jmp	LBB0_12
LBB0_10:
	xorl	%r13d, %r13d
	cmpl	$0, 4(%rsi)
	setne	%r13b
LBB0_12:
	movq	8(%r15), %rdi
	callq	_hostapd_is_dfs_required
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	setg	%dl
	cmpl	$-1, %ecx
	leal	(%rdx,%rdx,2), %eax
	cmovnel	%ecx, %eax
	movq	8(%r12), %rcx
	movl	%ebx, %edx
	shlq	$4, %rdx
	movl	8(%rcx,%rdx), %ecx
	subl	%eax, %ecx
	addl	%ecx, %ecx
	cmpl	$127, %ecx
	movl	$127, %eax
	cmovll	%ecx, %eax
	cmpl	$-127, %eax
	movl	$-128, %ecx
	cmovgel	%eax, %ecx
	leal	256(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	movq	_WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
	leal	2(%r13), %ecx
	movl	%ecx, 4(%r14)
	movl	%r13d, 8(%r14)
	movl	%eax, 12(%r14)
	testl	%r13d, %r13d
	je	LBB0_13
## %bb.14:
	movl	%eax, 16(%r14)
	cmpl	$1, %r13d
	jne	LBB0_16
## %bb.15:
	addq	$20, %r14
	jmp	LBB0_19
LBB0_13:
	addq	$16, %r14
	jmp	LBB0_19
LBB0_16:
	movl	%eax, 20(%r14)
	cmpl	$2, %r13d
	jne	LBB0_18
## %bb.17:
	addq	$24, %r14
	jmp	LBB0_19
LBB0_18:
	movl	%eax, 24(%r14)
	addq	$28, %r14
LBB0_19:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_NUM_HOSTAPD_MODES,8,3          ## @NUM_HOSTAPD_MODES
	.comm	_WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE,4,2 ## @WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_eid_txpower_envelope   ; -- Begin function hostapd_eid_txpower_envelope
	.p2align	2
_hostapd_eid_txpower_envelope:          ; @hostapd_eid_txpower_envelope
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	ldr	x24, [x0, #8]
	ldr	x21, [x24, #16]
	cbz	x21, LBB0_19
; %bb.1:
	mov	x20, x0
	ldp	x0, x23, [x24]
	add	x1, sp, #12
	bl	_ieee80211_freq_to_chan
Lloh0:
	adrp	x8, _NUM_HOSTAPD_MODES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_HOSTAPD_MODES@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_19
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x22, #0
	ldr	x9, [x21, #8]
	ldr	x10, [x24]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9]
	cmp	x11, x10
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	add	x9, x9, #16
	cmp	x8, x22
	b.ne	LBB0_4
	b	LBB0_19
LBB0_6:
	mov	w22, #0
LBB0_7:
	cmp	w22, w8
	b.eq	LBB0_19
; %bb.8:
	ldr	x8, [x24, #8]
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_19
; %bb.9:
	mov	w24, #2
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	mov	w24, #3
	b	LBB0_12
LBB0_11:
	ldr	w8, [x23, #4]
	cmp	w8, #0
	cset	w24, ne
LBB0_12:
	ldr	x0, [x20, #8]
	bl	_hostapd_is_dfs_required
	ldr	x8, [x20]
	ldr	w8, [x8]
	mov	w9, #3
	cmp	w0, #0
	csel	w9, w9, wzr, gt
	cmn	w8, #1
	csel	w8, w9, w8, eq
	ldr	x9, [x21, #8]
	add	x9, x9, w22, uxtw #4
	ldr	w9, [x9, #8]
	sub	w8, w9, w8
	lsl	w8, w8, #1
	mov	w9, #127
	cmp	w8, #127
	csel	w8, w8, w9, lt
	cmn	w8, #128
	mov	w9, #-128
	csel	w8, w8, w9, gt
Lloh5:
	adrp	x9, _WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	add	w10, w8, #256
	add	w11, w24, #2
	stp	w9, w11, [x19]
	cmp	w8, #0
	csel	w8, w10, w8, lt
	stp	w24, w8, [x19, #8]
	cbz	w24, LBB0_15
; %bb.13:
	str	w8, [x19, #16]
	cmp	w24, #1
	b.ne	LBB0_16
; %bb.14:
	add	x19, x19, #20
	b	LBB0_19
LBB0_15:
	add	x19, x19, #16
	b	LBB0_19
LBB0_16:
	str	w8, [x19, #20]
	cmp	w24, #2
	b.ne	LBB0_18
; %bb.17:
	add	x19, x19, #24
	b	LBB0_19
LBB0_18:
	str	w8, [x19, #24]
	add	x19, x19, #28
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_12-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
                                        ; -- End function
	.comm	_NUM_HOSTAPD_MODES,8,3          ; @NUM_HOSTAPD_MODES
	.comm	_WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE,4,2 ; @WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE
.subsections_via_symbols
