	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_btcoex_set_weight     ## -- Begin function ath9k_hw_btcoex_set_weight
	.p2align	4, 0x90
_ath9k_hw_btcoex_set_weight:            ## @ath9k_hw_btcoex_set_weight
	.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
	movl	%ecx, %ebx
	movq	%rdi, %r14
	cmpl	$0, 40(%rdi)
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movq	(%r14), %rax
	movl	%ebx, %r13d
	cmpl	$0, (%rax,%r13,4)
	setne	%r15b
	jmp	LBB0_3
LBB0_1:
	movl	%ebx, %r13d
	xorl	%r15d, %r15d
LBB0_3:
	movq	_ar9003_wlan_weights@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %r12
	movq	%r14, %rdi
	callq	_AR_SREV_9300_20_OR_LATER
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_AR_SREV_9462
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_10
LBB0_7:
	movq	_ATH_BTCOEX_STOMP_LOW@GOTPCREL(%rip), %rcx
	movq	%r13, %rax
	cmpl	%ebx, (%rcx)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, 32(%r14)
	movq	_ATH_BTCOEX_STOMP_LOW_FTP@GOTPCREL(%rip), %rax
	cmovnel	(%rax), %ebx
	movq	%rbx, %rax
LBB0_9:
	movq	_mci_wlan_weights@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %r12
LBB0_10:
	movq	_AR9300_NUM_WLAN_WEIGHTS@GOTPCREL(%rip), %r9
	cmpl	$0, (%r9)
	jle	LBB0_11
## %bb.12:
	movq	16(%r14), %rsi
	movq	24(%r14), %rdi
	xorl	%eax, %eax
	movq	_AR9300_BT_WGHT@GOTPCREL(%rip), %r10
	leaq	l___const.ath9k_hw_btcoex_set_weight.txprio_shift(%rip), %r8
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%rax
	movslq	(%r9), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r10), %ecx
	movl	%ecx, (%rdi,%rax,4)
	movl	(%r12,%rax,4), %edx
	movl	%edx, (%rsi,%rax,4)
	testq	%rax, %rax
	setne	%cl
	andb	%r15b, %cl
	cmpb	$1, %cl
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movzbl	-4(%r8,%rax,4), %ecx
	movl	$255, %ebx
	shll	%cl, %ebx
	notl	%ebx
	andl	%ebx, %edx
	movl	%edx, (%rsi,%rax,4)
	movq	(%r14), %rbx
	movl	(%rbx,%r13,4), %ebx
	shll	%cl, %ebx
	orl	%edx, %ebx
	movl	%ebx, (%rsi,%rax,4)
	jmp	LBB0_15
LBB0_16:
	decq	%rax
	testb	%r15b, %r15b
	jne	LBB0_18
	jmp	LBB0_19
LBB0_4:
	movq	_AR_BTCOEX_BT_WGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_SM
	movl	%eax, %ebx
	movq	_AR_BTCOEX_WL_WGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_SM
	orl	%ebx, %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_19
LBB0_11:
	movq	$-1, %rax
	testb	%r15b, %r15b
	je	LBB0_19
LBB0_18:
	leaq	l___const.ath9k_hw_btcoex_set_weight.txprio_shift(%rip), %rcx
	movb	(%rcx,%rax,4), %cl
	movl	$255, %edx
	shll	%cl, %edx
	notl	%edx
	movq	16(%r14), %rsi
	andl	(%rsi,%rax,4), %edx
	movl	%edx, (%rsi,%rax,4)
	movq	(%r14), %rdi
	movl	(%rdi,%r13,4), %edi
	shll	%cl, %edi
	orl	%edx, %edi
	movl	%edi, (%rsi,%rax,4)
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.ath9k_hw_btcoex_set_weight.txprio_shift
l___const.ath9k_hw_btcoex_set_weight.txprio_shift:
	.long	24                              ## 0x18
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	0                               ## 0x0

	.comm	_ar9003_wlan_weights,8,3        ## @ar9003_wlan_weights
	.comm	_AR_BTCOEX_BT_WGHT,4,2          ## @AR_BTCOEX_BT_WGHT
	.comm	_AR_BTCOEX_WL_WGHT,4,2          ## @AR_BTCOEX_WL_WGHT
	.comm	_ATH_BTCOEX_STOMP_LOW,4,2       ## @ATH_BTCOEX_STOMP_LOW
	.comm	_ATH_BTCOEX_STOMP_LOW_FTP,4,2   ## @ATH_BTCOEX_STOMP_LOW_FTP
	.comm	_mci_wlan_weights,8,3           ## @mci_wlan_weights
	.comm	_AR9300_NUM_WLAN_WEIGHTS,4,2    ## @AR9300_NUM_WLAN_WEIGHTS
	.comm	_AR9300_BT_WGHT,4,2             ## @AR9300_BT_WGHT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_btcoex_set_weight     ; -- Begin function ath9k_hw_btcoex_set_weight
	.p2align	2
_ath9k_hw_btcoex_set_weight:            ; @ath9k_hw_btcoex_set_weight
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	mov	w23, w20
	ldr	w8, [x8, w20, uxtw #2]
	cmp	w8, #0
	cset	w24, ne
	b	LBB0_3
LBB0_2:
	mov	w24, #0
	mov	w23, w20
LBB0_3:
Lloh0:
	adrp	x8, _ar9003_wlan_weights@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ar9003_wlan_weights@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x25, [x8, x23, lsl #3]
	mov	x0, x19
	bl	_AR_SREV_9300_20_OR_LATER
	cbz	w0, LBB0_15
; %bb.4:
	mov	x0, x19
	bl	_AR_SREV_9462
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_AR_SREV_9565
	cbz	x0, LBB0_9
LBB0_6:
Lloh3:
	adrp	x8, _ATH_BTCOEX_STOMP_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH_BTCOEX_STOMP_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	mov	x8, x23
	cmp	w9, w20
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x19, #32]
Lloh6:
	adrp	x9, _ATH_BTCOEX_STOMP_LOW_FTP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATH_BTCOEX_STOMP_LOW_FTP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, w20, w9, eq
LBB0_8:
Lloh9:
	adrp	x9, _mci_wlan_weights@GOTPAGE
Lloh10:
	ldr	x9, [x9, _mci_wlan_weights@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	x25, [x9, x8, lsl #3]
LBB0_9:
Lloh12:
	adrp	x9, _AR9300_NUM_WLAN_WEIGHTS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AR9300_NUM_WLAN_WEIGHTS@GOTPAGEOFF]
	ldr	w10, [x9]
Lloh14:
	adrp	x8, l___const.ath9k_hw_btcoex_set_weight.txprio_shift@PAGE
Lloh15:
	add	x8, x8, l___const.ath9k_hw_btcoex_set_weight.txprio_shift@PAGEOFF
	cmp	w10, #1
	b.lt	LBB0_16
; %bb.10:
	mov	x10, #0
	ldp	x12, x11, [x19, #16]
	mov	w13, #255
Lloh16:
	adrp	x14, _AR9300_BT_WGHT@GOTPAGE
Lloh17:
	ldr	x14, [x14, _AR9300_BT_WGHT@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x10, x10, #1
	ldrsw	x15, [x9]
	cmp	x10, x15
	b.ge	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w16, [x14]
	lsl	x15, x10, #2
	str	w16, [x11, x15]
	ldr	w16, [x25, x15]
	str	w16, [x12, x15]
	cmp	x10, #0
	cset	w17, ne
	and	w17, w24, w17
	cmp	w17, #1
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x17, x8, x15
	ldur	w17, [x17, #-4]
	lsl	w0, w13, w17
	bic	w16, w16, w0
	str	w16, [x12, x15]
	ldr	x0, [x19]
	ldr	w0, [x0, x23, lsl #2]
	lsl	w17, w0, w17
	orr	w16, w17, w16
	str	w16, [x12, x15]
	b	LBB0_11
LBB0_14:
	sub	x9, x10, #1
	cbnz	w24, LBB0_17
	b	LBB0_18
LBB0_15:
Lloh18:
	adrp	x8, _AR_BTCOEX_BT_WGHT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AR_BTCOEX_BT_WGHT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_SM
	mov	x20, x0
Lloh21:
	adrp	x8, _AR_BTCOEX_WL_WGHT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR_BTCOEX_WL_WGHT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_SM
	orr	w8, w0, w20
	str	w8, [x19, #8]
	b	LBB0_18
LBB0_16:
	mov	x9, #-1
	cbz	w24, LBB0_18
LBB0_17:
	lsl	x9, x9, #2
	ldr	w8, [x8, x9]
	mov	w10, #255
	lsl	w10, w10, w8
	ldr	x11, [x19, #16]
	ldr	w12, [x11, x9]
	bic	w10, w12, w10
	str	w10, [x11, x9]
	ldr	x12, [x19]
	ldr	w12, [x12, x23, lsl #2]
	lsl	w8, w12, w8
	orr	w8, w8, w10
	str	w8, [x11, x9]
LBB0_18:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.ath9k_hw_btcoex_set_weight.txprio_shift
l___const.ath9k_hw_btcoex_set_weight.txprio_shift:
	.long	24                              ; 0x18
	.long	16                              ; 0x10
	.long	16                              ; 0x10
	.long	0                               ; 0x0

	.comm	_ar9003_wlan_weights,8,3        ; @ar9003_wlan_weights
	.comm	_AR_BTCOEX_BT_WGHT,4,2          ; @AR_BTCOEX_BT_WGHT
	.comm	_AR_BTCOEX_WL_WGHT,4,2          ; @AR_BTCOEX_WL_WGHT
	.comm	_ATH_BTCOEX_STOMP_LOW,4,2       ; @ATH_BTCOEX_STOMP_LOW
	.comm	_ATH_BTCOEX_STOMP_LOW_FTP,4,2   ; @ATH_BTCOEX_STOMP_LOW_FTP
	.comm	_mci_wlan_weights,8,3           ; @mci_wlan_weights
	.comm	_AR9300_NUM_WLAN_WEIGHTS,4,2    ; @AR9300_NUM_WLAN_WEIGHTS
	.comm	_AR9300_BT_WGHT,4,2             ; @AR9300_BT_WGHT
.subsections_via_symbols
