	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il_set_ht_add_station
_il_set_ht_add_station:                 ## @il_set_ht_add_station
	.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
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.1:
	movq	%rdx, %rbx
	cmpl	$0, 24(%rdx)
	je	LBB0_9
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	8(%rbx), %r13
	movl	(%rbx), %eax
	cmpl	$130, %eax
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rcx, %rdx
	cmpl	$128, %eax
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%rdx, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_D_ASSOC
	movq	(%r12), %rdx
	movq	_STA_FLG_RTS_MIMO_PROT_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_STA_FLG_MIMO_DIS_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r15d
	orl	%ecx, %r15d
	notl	%r15d
	andl	(%rdx,%r14,4), %r15d
	movl	(%rbx), %esi
	cmpl	$130, %esi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.3:
	cmpl	$129, %esi
	je	LBB0_8
## %bb.4:
	cmpl	$128, %esi
	jne	LBB0_7
## %bb.5:
	orl	%eax, %r15d
	jmp	LBB0_8
LBB0_6:
	orl	%ecx, %r15d
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	callq	_IL_WARN
LBB0_8:
	movl	16(%rbx), %edi
	movq	_STA_FLG_MAX_AGG_SIZE_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	callq	_cpu_to_le32
	movl	%eax, %r13d
	movl	8(%rbx), %edi
	movq	_STA_FLG_AGG_MPDU_DENSITY_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	callq	_cpu_to_le32
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_il_is_ht40_tx_allowed
	movq	_STA_FLG_HT40_EN_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	orl	%ebx, %edx
	notl	%ecx
	andl	%ebx, %ecx
	testq	%rax, %rax
	cmovnel	%edx, %ecx
	movq	(%r12), %rax
	movl	%ecx, (%rax,%r14,4)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spatial multiplexing power save mode: %s\n"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"disabled"

	.comm	_STA_FLG_RTS_MIMO_PROT_MSK,4,2  ## @STA_FLG_RTS_MIMO_PROT_MSK
	.comm	_STA_FLG_MIMO_DIS_MSK,4,2       ## @STA_FLG_MIMO_DIS_MSK
L_.str.4:                               ## @.str.4
	.asciz	"Invalid MIMO PS mode %d\n"

	.comm	_STA_FLG_MAX_AGG_SIZE_POS,4,2   ## @STA_FLG_MAX_AGG_SIZE_POS
	.comm	_STA_FLG_AGG_MPDU_DENSITY_POS,4,2 ## @STA_FLG_AGG_MPDU_DENSITY_POS
	.comm	_STA_FLG_HT40_EN_MSK,4,2        ## @STA_FLG_HT40_EN_MSK
	.no_dead_strip	_il_set_ht_add_station
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il_set_ht_add_station
_il_set_ht_add_station:                 ; @il_set_ht_add_station
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x2, LBB0_9
; %bb.1:
	mov	x22, x2
	ldr	w8, [x2, #24]
	cbz	w8, LBB0_9
; %bb.2:
	mov	x19, x1
	mov	x20, x0
	add	x21, x22, #8
	ldr	w8, [x22]
Lloh0:
	adrp	x9, l_.str.3@PAGE
Lloh1:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, #130
	csel	x9, x10, x9, eq
Lloh4:
	adrp	x10, l_.str.1@PAGE
Lloh5:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w8, #128
	csel	x1, x10, x9, eq
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_D_ASSOC
	ldr	x8, [x20]
	ldr	w10, [x8, x19, lsl #2]
Lloh8:
	adrp	x8, _STA_FLG_RTS_MIMO_PROT_MSK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STA_FLG_RTS_MIMO_PROT_MSK@GOTPAGEOFF]
Lloh10:
	adrp	x11, _STA_FLG_MIMO_DIS_MSK@GOTPAGE
Lloh11:
	ldr	x11, [x11, _STA_FLG_MIMO_DIS_MSK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
Lloh13:
	ldr	w8, [x11]
	orr	w11, w8, w9
	bic	w23, w10, w11
	ldr	w1, [x22]
	cmp	w1, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w1, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w1, #128
	b.ne	LBB0_7
; %bb.5:
	orr	w23, w23, w8
	b	LBB0_8
LBB0_6:
	orr	w23, w23, w9
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_IL_WARN
LBB0_8:
	ldr	w8, [x22, #16]
Lloh16:
	adrp	x9, _STA_FLG_MAX_AGG_SIZE_POS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _STA_FLG_MAX_AGG_SIZE_POS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le32
	orr	w23, w0, w23
	ldr	w8, [x22, #8]
Lloh19:
	adrp	x9, _STA_FLG_AGG_MPDU_DENSITY_POS@GOTPAGE
Lloh20:
	ldr	x9, [x9, _STA_FLG_AGG_MPDU_DENSITY_POS@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le32
	orr	w22, w23, w0
	mov	x0, x20
	mov	x1, x21
	bl	_il_is_ht40_tx_allowed
Lloh22:
	adrp	x8, _STA_FLG_HT40_EN_MSK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STA_FLG_HT40_EN_MSK@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w9, w8, w22
	bic	w8, w22, w8
	cmp	x0, #0
	csel	w8, w8, w9, eq
	ldr	x9, [x20]
	str	w8, [x9, x19, lsl #2]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spatial multiplexing power save mode: %s\n"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"disabled"

	.comm	_STA_FLG_RTS_MIMO_PROT_MSK,4,2  ; @STA_FLG_RTS_MIMO_PROT_MSK
	.comm	_STA_FLG_MIMO_DIS_MSK,4,2       ; @STA_FLG_MIMO_DIS_MSK
l_.str.4:                               ; @.str.4
	.asciz	"Invalid MIMO PS mode %d\n"

	.comm	_STA_FLG_MAX_AGG_SIZE_POS,4,2   ; @STA_FLG_MAX_AGG_SIZE_POS
	.comm	_STA_FLG_AGG_MPDU_DENSITY_POS,4,2 ; @STA_FLG_AGG_MPDU_DENSITY_POS
	.comm	_STA_FLG_HT40_EN_MSK,4,2        ; @STA_FLG_HT40_EN_MSK
	.no_dead_strip	_il_set_ht_add_station
.subsections_via_symbols
