	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rt2400pci_config_ant
_rt2400pci_config_ant:                  ## @rt2400pci_config_ant
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_ANTENNA_SW_DIVERSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %r15d
	movl	$1, %edi
	cmpl	%eax, (%rsi)
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpl	%eax, 4(%rbx)
	sete	%dil
LBB0_2:
	callq	_BUG_ON
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_rt2400pci_bbp_read
	movl	%eax, -28(%rbp)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rt2400pci_bbp_read
	movl	%eax, -32(%rbp)
	movl	4(%rbx), %eax
	xorl	%edx, %edx
	cmpl	$130, %eax
	setne	%dl
	addl	%edx, %edx
	cmpl	$128, %eax
	cmovel	%r15d, %edx
	movq	_BBP_R1_TX_ANTENNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdi
	callq	_rt2x00_set_field8
	movl	(%rbx), %eax
	xorl	%edx, %edx
	cmpl	$130, %eax
	setne	%dl
	addl	%edx, %edx
	cmpl	$128, %eax
	cmovel	%r15d, %edx
	movq	_BBP_R4_RX_ANTENNA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdi
	callq	_rt2x00_set_field8
	movl	-28(%rbp), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_rt2400pci_bbp_write
	movl	-32(%rbp), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_rt2400pci_bbp_write
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ANTENNA_SW_DIVERSITY,4,2       ## @ANTENNA_SW_DIVERSITY
	.comm	_BBP_R1_TX_ANTENNA,4,2          ## @BBP_R1_TX_ANTENNA
	.comm	_BBP_R4_RX_ANTENNA,4,2          ## @BBP_R4_RX_ANTENNA
	.no_dead_strip	_rt2400pci_config_ant
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rt2400pci_config_ant
_rt2400pci_config_ant:                  ; @rt2400pci_config_ant
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _ANTENNA_SW_DIVERSITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ANTENNA_SW_DIVERSITY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	w9, [x20, #4]
	cmp	w9, w8
	cset	w0, eq
LBB0_3:
	bl	_BUG_ON
	mov	x0, x19
	mov	w1, #4
	bl	_rt2400pci_bbp_read
	str	w0, [sp, #8]
	mov	x0, x19
	mov	w1, #1
	bl	_rt2400pci_bbp_read
	str	w0, [sp, #12]
	ldr	w8, [x20, #4]
	cmp	w8, #130
	cset	w9, ne
	lsl	w9, w9, #1
	cmp	w8, #128
	csinc	w2, w9, wzr, ne
Lloh3:
	adrp	x8, _BBP_R1_TX_ANTENNA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BBP_R1_TX_ANTENNA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_rt2x00_set_field8
	ldr	w8, [x20]
	cmp	w8, #130
	cset	w9, ne
	lsl	w9, w9, #1
	cmp	w8, #128
	csinc	w2, w9, wzr, ne
Lloh6:
	adrp	x8, _BBP_R4_RX_ANTENNA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BBP_R4_RX_ANTENNA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_rt2x00_set_field8
	ldr	w2, [sp, #8]
	mov	x0, x19
	mov	w1, #4
	bl	_rt2400pci_bbp_write
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #1
	bl	_rt2400pci_bbp_write
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ANTENNA_SW_DIVERSITY,4,2       ; @ANTENNA_SW_DIVERSITY
	.comm	_BBP_R1_TX_ANTENNA,4,2          ; @BBP_R1_TX_ANTENNA
	.comm	_BBP_R4_RX_ANTENNA,4,2          ; @BBP_R4_RX_ANTENNA
	.no_dead_strip	_rt2400pci_config_ant
.subsections_via_symbols
