	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00lib_config_antenna       ## -- Begin function rt2x00lib_config_antenna
	.p2align	4, 0x90
_rt2x00lib_config_antenna:              ## @rt2x00lib_config_antenna
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, -56(%rbp)
	movq	%rdx, -48(%rbp)
	leaq	24(%rdi), %r14
	movl	16(%rdi), %ecx
	movq	_ANTENNA_RX_DIVERSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ANTENNA_SW_DIVERSITY@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	testl	%ecx, %eax
	je	LBB0_1
## %bb.5:
	cmpq	%rsi, %rdi
	jne	LBB0_6
## %bb.7:
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)
	jmp	LBB0_8
LBB0_1:
	cmpq	%rsi, %rdi
	jne	LBB0_6
## %bb.2:
	orl	%ecx, %eax
	movl	%eax, 16(%rbx)
	movq	40(%rbx), %rcx
	cmpq	%rsi, %rcx
	jne	LBB0_4
## %bb.3:
	movq	_ANTENNA_B@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_4:
	movq	%rcx, -56(%rbp)
	jmp	LBB0_9
LBB0_6:
	movq	%rdi, %rsi
LBB0_8:
	movl	%ecx, %eax
LBB0_9:
	movq	_ANTENNA_TX_DIVERSITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_10
## %bb.13:
	cmpq	%rdx, %rsi
	jne	LBB0_16
## %bb.14:
	movq	32(%rbx), %rax
	jmp	LBB0_15
LBB0_10:
	cmpq	%rdx, %rsi
	jne	LBB0_16
## %bb.11:
	orl	%eax, %ecx
	movl	%ecx, 16(%rbx)
	movq	48(%rbx), %rax
	cmpq	%rdx, %rax
	jne	LBB0_15
## %bb.12:
	movq	_ANTENNA_B@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_15:
	movq	%rax, -48(%rbp)
LBB0_16:
	movq	_DEVICE_STATE_ENABLED_RADIO@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	4(%rbx), %r15
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	(%rbx), %edi
	callq	_rt2x00queue_stop_queue
LBB0_18:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	leaq	-56(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*(%rax)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rt2x00link_reset_tuner
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	(%rbx), %edi
	callq	_rt2x00queue_start_queue
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANTENNA_RX_DIVERSITY,4,2       ## @ANTENNA_RX_DIVERSITY
	.comm	_ANTENNA_SW_DIVERSITY,8,3       ## @ANTENNA_SW_DIVERSITY
	.comm	_ANTENNA_B,8,3                  ## @ANTENNA_B
	.comm	_ANTENNA_TX_DIVERSITY,4,2       ## @ANTENNA_TX_DIVERSITY
	.comm	_DEVICE_STATE_ENABLED_RADIO,4,2 ## @DEVICE_STATE_ENABLED_RADIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00lib_config_antenna       ; -- Begin function rt2x00lib_config_antenna
	.p2align	2
_rt2x00lib_config_antenna:              ; @rt2x00lib_config_antenna
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	stp	x1, x2, [sp]
	add	x20, x0, #24
Lloh0:
	adrp	x9, _ANTENNA_RX_DIVERSITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ANTENNA_RX_DIVERSITY@GOTPAGEOFF]
	ldr	w8, [x0, #16]
Lloh2:
	ldr	w10, [x9]
Lloh3:
	adrp	x9, _ANTENNA_SW_DIVERSITY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ANTENNA_SW_DIVERSITY@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	tst	w10, w8
	b.eq	LBB0_3
; %bb.1:
	cmp	x1, x9
	b.ne	LBB0_7
; %bb.2:
	ldr	x9, [x20]
	b	LBB0_6
LBB0_3:
	cmp	x1, x9
	b.ne	LBB0_7
; %bb.4:
	orr	w8, w10, w8
	str	w8, [x19, #16]
	ldr	x9, [x19, #40]
	cmp	x9, x1
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x9, _ANTENNA_B@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ANTENNA_B@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
LBB0_6:
	str	x9, [sp]
	mov	x9, x1
LBB0_7:
Lloh9:
	adrp	x10, _ANTENNA_TX_DIVERSITY@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ANTENNA_TX_DIVERSITY@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_10
; %bb.8:
	cmp	x2, x9
	b.ne	LBB0_14
; %bb.9:
	ldr	x8, [x19, #32]
	b	LBB0_13
LBB0_10:
	cmp	x2, x9
	b.ne	LBB0_14
; %bb.11:
	orr	w8, w10, w8
	str	w8, [x19, #16]
	ldr	x8, [x19, #48]
	cmp	x8, x2
	b.ne	LBB0_13
; %bb.12:
Lloh12:
	adrp	x8, _ANTENNA_B@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ANTENNA_B@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
LBB0_13:
	str	x8, [sp, #8]
LBB0_14:
Lloh15:
	adrp	x22, _DEVICE_STATE_ENABLED_RADIO@GOTPAGE
Lloh16:
	ldr	x22, [x22, _DEVICE_STATE_ENABLED_RADIO@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x21, x19, #4
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_16
; %bb.15:
	ldr	w0, [x19]
	bl	_rt2x00queue_stop_queue
LBB0_16:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x1, sp
	mov	x0, x19
	blr	x8
	mov	x0, x19
	mov	w1, #1
	bl	_rt2x00link_reset_tuner
	mov	x1, sp
	mov	x0, x20
	mov	w2, #16
	bl	_memcpy
	ldr	w0, [x22]
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w0, [x19]
	bl	_rt2x00queue_start_queue
LBB0_18:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ANTENNA_RX_DIVERSITY,4,2       ; @ANTENNA_RX_DIVERSITY
	.comm	_ANTENNA_SW_DIVERSITY,8,3       ; @ANTENNA_SW_DIVERSITY
	.comm	_ANTENNA_B,8,3                  ; @ANTENNA_B
	.comm	_ANTENNA_TX_DIVERSITY,4,2       ; @ANTENNA_TX_DIVERSITY
	.comm	_DEVICE_STATE_ENABLED_RADIO,4,2 ; @DEVICE_STATE_ENABLED_RADIO
.subsections_via_symbols
