	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00mac_set_antenna          ## -- Begin function rt2x00mac_set_antenna
	.p2align	4, 0x90
_rt2x00mac_set_antenna:                 ## @rt2x00mac_set_antenna
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	testl	%edx, %edx
	je	LBB0_3
## %bb.2:
	movl	%edx, %eax
	orl	%esi, %eax
	cmpl	$4, %eax
	jae	LBB0_3
## %bb.4:
	movq	(%rdi), %rdi
	movl	24(%rdi), %eax
	movq	_ANTENNA_TX_DIVERSITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	cmpl	$3, %esi
	je	LBB0_7
## %bb.5:
	movl	%r9d, %ecx
	andl	%eax, %ecx
	je	LBB0_7
## %bb.6:
	movl	%r9d, %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 24(%rdi)
LBB0_7:
	movq	_ANTENNA_RX_DIVERSITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	cmpl	$3, %edx
	je	LBB0_10
## %bb.8:
	movl	%r8d, %ecx
	andl	%eax, %ecx
	je	LBB0_10
## %bb.9:
	movl	%r8d, %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 24(%rdi)
LBB0_10:
	cmpl	$3, %esi
	jne	LBB0_14
## %bb.11:
	movl	(%rdi), %esi
	movq	_ANTENNA_SW_DIVERSITY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_12
## %bb.13:
	orl	%r9d, %eax
	movl	%eax, 24(%rdi)
LBB0_14:
	cmpl	$3, %edx
	jne	LBB0_17
LBB0_15:
	movl	4(%rdi), %ecx
	movq	_ANTENNA_SW_DIVERSITY@GOTPCREL(%rip), %r9
	movl	$3, %edx
	cmpl	(%r9), %ecx
	jne	LBB0_17
## %bb.16:
	orl	%r8d, %eax
	movl	%eax, 24(%rdi)
	movl	%ecx, %edx
	jmp	LBB0_17
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_12:
	movl	$3, %esi
	cmpl	$3, %edx
	je	LBB0_15
LBB0_17:
	movl	%esi, -24(%rbp)
	movl	%edx, -20(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-24(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_rt2x00lib_config_antenna
	xorl	%eax, %eax
LBB0_18:
	addq	$48, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ANTENNA_TX_DIVERSITY,4,2       ## @ANTENNA_TX_DIVERSITY
	.comm	_ANTENNA_RX_DIVERSITY,4,2       ## @ANTENNA_RX_DIVERSITY
	.comm	_ANTENNA_SW_DIVERSITY,4,2       ## @ANTENNA_SW_DIVERSITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00mac_set_antenna          ; -- Begin function rt2x00mac_set_antenna
	.p2align	2
_rt2x00mac_set_antenna:                 ; @rt2x00mac_set_antenna
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	cbz	w1, LBB0_15
; %bb.1:
	cbz	w2, LBB0_15
; %bb.2:
	orr	w8, w2, w1
	cmp	w8, #4
	b.hs	LBB0_15
; %bb.3:
	ldr	x0, [x0]
	ldr	w8, [x0, #24]
Lloh0:
	adrp	x9, _ANTENNA_TX_DIVERSITY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ANTENNA_TX_DIVERSITY@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	cmp	w1, #3
	b.eq	LBB0_6
; %bb.4:
	and	w9, w10, w8
	cbz	w9, LBB0_6
; %bb.5:
	bic	w8, w8, w10
	str	w8, [x0, #24]
LBB0_6:
Lloh3:
	adrp	x9, _ANTENNA_RX_DIVERSITY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ANTENNA_RX_DIVERSITY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w2, #3
	b.eq	LBB0_9
; %bb.7:
	and	w11, w9, w8
	cbz	w11, LBB0_9
; %bb.8:
	bic	w8, w8, w9
	str	w8, [x0, #24]
LBB0_9:
	cmp	w1, #3
	b.ne	LBB0_12
; %bb.10:
	ldr	w1, [x0]
Lloh6:
	adrp	x11, _ANTENNA_SW_DIVERSITY@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ANTENNA_SW_DIVERSITY@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	cmp	w1, w11
	b.ne	LBB0_16
; %bb.11:
	orr	w8, w8, w10
	str	w8, [x0, #24]
LBB0_12:
	cmp	w2, #3
	b.ne	LBB0_18
LBB0_13:
	ldr	w2, [x0, #4]
Lloh9:
	adrp	x10, _ANTENNA_SW_DIVERSITY@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ANTENNA_SW_DIVERSITY@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w2, w10
	b.ne	LBB0_17
; %bb.14:
	orr	w8, w8, w9
	str	w8, [x0, #24]
	b	LBB0_18
LBB0_15:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_16:
	mov	w1, #3
	cmp	w2, #3
	b.eq	LBB0_13
	b	LBB0_18
LBB0_17:
	mov	w2, #3
LBB0_18:
	stp	w1, w2, [sp, #8]
	stp	xzr, xzr, [sp, #16]
	add	x1, sp, #8
	bl	_rt2x00lib_config_antenna
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ANTENNA_TX_DIVERSITY,4,2       ; @ANTENNA_TX_DIVERSITY
	.comm	_ANTENNA_RX_DIVERSITY,4,2       ; @ANTENNA_RX_DIVERSITY
	.comm	_ANTENNA_SW_DIVERSITY,4,2       ; @ANTENNA_SW_DIVERSITY
.subsections_via_symbols
