	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_set_rxon_chain          ## -- Begin function il4965_set_rxon_chain
	.p2align	4, 0x90
_il4965_set_rxon_chain:                 ## @il4965_set_rxon_chain
	.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	%rdi, %r14
	callq	_il4965_is_single_rx_stream
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_S_POWER_PMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rsi
	callq	_test_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r14), %r13d
	testl	%r13d, %r13d
	jne	LBB0_2
## %bb.1:
	movl	4(%r14), %r13d
LBB0_2:
	movq	_RXON_RX_CHAIN_VALID_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r13d, %r12d
	shll	%cl, %r12d
	movq	%r14, %rdi
	callq	_il4965_get_active_rx_chain_count
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_il4965_get_idle_rx_chain_count
	movl	%eax, %r15d
	movl	%r13d, %edi
	callq	_il4965_count_chain_bitmap
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	cmpl	%r15d, %eax
	cmovll	%eax, %r15d
	movq	_RXON_RX_CHAIN_MIMO_CNT_POS@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	shll	%cl, %eax
	orl	%r12d, %eax
	movq	_RXON_RX_CHAIN_CNT_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r15d, %edi
	shll	%cl, %edi
	orl	%eax, %edi
	callq	_cpu_to_le16
	movl	%eax, (%r14)
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_3
LBB0_6:
	movq	_RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
LBB0_7:
	movl	%eax, (%r14)
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_D_ASSOC
	testl	%ebx, %ebx
	sete	%al
	testl	%r15d, %r15d
	sete	%cl
	orb	%al, %cl
	cmpl	%r15d, %ebx
	setl	%al
	orb	%cl, %al
	movzbl	%al, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN_ON                        ## TAILCALL
LBB0_3:
	movq	_IL_NUM_RX_CHAINS_SINGLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jl	LBB0_6
## %bb.4:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_6
## %bb.5:
	movq	_RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_S_POWER_PMI,4,2                ## @S_POWER_PMI
	.comm	_RXON_RX_CHAIN_VALID_POS,4,2    ## @RXON_RX_CHAIN_VALID_POS
	.comm	_RXON_RX_CHAIN_MIMO_CNT_POS,4,2 ## @RXON_RX_CHAIN_MIMO_CNT_POS
	.comm	_RXON_RX_CHAIN_CNT_POS,4,2      ## @RXON_RX_CHAIN_CNT_POS
	.comm	_IL_NUM_RX_CHAINS_SINGLE,4,2    ## @IL_NUM_RX_CHAINS_SINGLE
	.comm	_RXON_RX_CHAIN_MIMO_FORCE_MSK,4,2 ## @RXON_RX_CHAIN_MIMO_FORCE_MSK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx_chain=0x%X active=%d idle=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_set_rxon_chain          ; -- Begin function il4965_set_rxon_chain
	.p2align	2
_il4965_set_rxon_chain:                 ; @il4965_set_rxon_chain
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_il4965_is_single_rx_stream
	mov	x20, x0
Lloh0:
	adrp	x8, _S_POWER_PMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _S_POWER_PMI@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	mov	x21, x0
	ldr	w22, [x19, #8]
	cbnz	w22, LBB0_2
; %bb.1:
	ldr	w22, [x19, #4]
LBB0_2:
Lloh3:
	adrp	x8, _RXON_RX_CHAIN_VALID_POS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RXON_RX_CHAIN_VALID_POS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w25, w22, w8
	mov	x0, x19
	bl	_il4965_get_active_rx_chain_count
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	bl	_il4965_get_idle_rx_chain_count
	mov	x24, x0
	mov	x0, x22
	bl	_il4965_count_chain_bitmap
	cmp	w0, w23
	csel	w22, w0, w23, lt
	cmp	w0, w24
	csel	w23, w0, w24, lt
Lloh6:
	adrp	x8, _RXON_RX_CHAIN_MIMO_CNT_POS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RXON_RX_CHAIN_MIMO_CNT_POS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w8, w22, w8
	orr	w8, w8, w25
Lloh9:
	adrp	x9, _RXON_RX_CHAIN_CNT_POS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RXON_RX_CHAIN_CNT_POS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w9, w23, w9
	orr	w0, w8, w9
	bl	_cpu_to_le16
	str	w0, [x19]
	cbnz	w20, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _IL_NUM_RX_CHAINS_SINGLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IL_NUM_RX_CHAINS_SINGLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w22, w8
	ccmp	w21, #0, #0, ge
	b.eq	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	bic	w1, w0, w8
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RXON_RX_CHAIN_MIMO_FORCE_MSK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w1, w8, w0
LBB0_6:
	str	w1, [x19]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x23
	bl	_D_ASSOC
	cmp	w22, #0
	ccmp	w23, #0, #4, ne
	ccmp	w22, w23, #8, ne
	cset	w0, lt
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_WARN_ON
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_S_POWER_PMI,4,2                ; @S_POWER_PMI
	.comm	_RXON_RX_CHAIN_VALID_POS,4,2    ; @RXON_RX_CHAIN_VALID_POS
	.comm	_RXON_RX_CHAIN_MIMO_CNT_POS,4,2 ; @RXON_RX_CHAIN_MIMO_CNT_POS
	.comm	_RXON_RX_CHAIN_CNT_POS,4,2      ; @RXON_RX_CHAIN_CNT_POS
	.comm	_IL_NUM_RX_CHAINS_SINGLE,4,2    ; @IL_NUM_RX_CHAINS_SINGLE
	.comm	_RXON_RX_CHAIN_MIMO_FORCE_MSK,4,2 ; @RXON_RX_CHAIN_MIMO_FORCE_MSK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx_chain=0x%X active=%d idle=%d\n"

.subsections_via_symbols
