	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_hw_set_chain_masks      ## -- Begin function ar9003_hw_set_chain_masks
	.p2align	4, 0x90
_ar9003_hw_set_chain_masks:             ## @ar9003_hw_set_chain_masks
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	cmpl	$5, (%rdi)
	je	LBB0_2
## %bb.1:
	cmpl	$5, 4(%rbx)
	jne	LBB0_3
LBB0_2:
	movq	_AR_PHY_ANALOG_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_SWAP_ALT_CHAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
LBB0_3:
	movq	_AR_PHY_RX_CHAINMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_REG_WRITE
	movq	_AR_PHY_CAL_CHAINMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_REG_WRITE
	movq	_ATH9K_HW_CAP_APM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	8(%rbx), %eax
	movl	$3, %edx
	cmovel	%r14d, %edx
	cmpl	$7, %r14d
	cmovnel	%r14d, %edx
	movq	_AR_SELFGEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_PHY_ANALOG_SWAP,4,2         ## @AR_PHY_ANALOG_SWAP
	.comm	_AR_PHY_SWAP_ALT_CHAIN,4,2      ## @AR_PHY_SWAP_ALT_CHAIN
	.comm	_AR_PHY_RX_CHAINMASK,4,2        ## @AR_PHY_RX_CHAINMASK
	.comm	_AR_PHY_CAL_CHAINMASK,4,2       ## @AR_PHY_CAL_CHAINMASK
	.comm	_ATH9K_HW_CAP_APM,4,2           ## @ATH9K_HW_CAP_APM
	.comm	_AR_SELFGEN_MASK,4,2            ## @AR_SELFGEN_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_hw_set_chain_masks      ; -- Begin function ar9003_hw_set_chain_masks
	.p2align	2
_ar9003_hw_set_chain_masks:             ; @ar9003_hw_set_chain_masks
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #5
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #5
	b.ne	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _AR_PHY_ANALOG_SWAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_PHY_ANALOG_SWAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR_PHY_SWAP_ALT_CHAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_PHY_SWAP_ALT_CHAIN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
LBB0_3:
Lloh6:
	adrp	x8, _AR_PHY_RX_CHAINMASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_PHY_RX_CHAINMASK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WRITE
Lloh9:
	adrp	x8, _AR_PHY_CAL_CHAINMASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR_PHY_CAL_CHAINMASK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WRITE
Lloh12:
	adrp	x8, _ATH9K_HW_CAP_APM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATH9K_HW_CAP_APM@GOTPAGEOFF]
	ldr	w9, [x19, #8]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w9
	ccmp	w20, #7, #0, ne
	mov	w8, #3
	csel	w2, w8, w20, eq
Lloh15:
	adrp	x8, _AR_SELFGEN_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR_SELFGEN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_REG_WRITE
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_PHY_ANALOG_SWAP,4,2         ; @AR_PHY_ANALOG_SWAP
	.comm	_AR_PHY_SWAP_ALT_CHAIN,4,2      ; @AR_PHY_SWAP_ALT_CHAIN
	.comm	_AR_PHY_RX_CHAINMASK,4,2        ; @AR_PHY_RX_CHAINMASK
	.comm	_AR_PHY_CAL_CHAINMASK,4,2       ; @AR_PHY_CAL_CHAINMASK
	.comm	_ATH9K_HW_CAP_APM,4,2           ; @ATH9K_HW_CAP_APM
	.comm	_AR_SELFGEN_MASK,4,2            ; @AR_SELFGEN_MASK
.subsections_via_symbols
