	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_config
_ath5k_config:                          ## @ath5k_config
	.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	%esi, %r12d
	movq	%rdi, %r15
	movq	16(%rdi), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	_IEEE80211_CONF_CHANGE_CHANNEL@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_1
## %bb.2:
	leaq	12(%r15), %rsi
	movq	%r13, %rdi
	callq	_ath5k_chan_set
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_3
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	_IEEE80211_CONF_CHANGE_POWER@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.4:
	movl	(%r15), %esi
	cmpl	%esi, 20(%r13)
	je	LBB0_6
## %bb.5:
	movl	%esi, 20(%r13)
	addl	%esi, %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_set_txpower_limit
LBB0_6:
	movq	_IEEE80211_CONF_CHANGE_RETRY_LIMITS@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_10
## %bb.7:
	movl	8(%r15), %eax
	movl	%eax, 16(%r13)
	movl	4(%r15), %eax
	movl	%eax, 12(%r13)
	cmpl	$0, 8(%r13)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ath5k_hw_set_tx_retry_limits
	incl	%ebx
	cmpl	8(%r13), %ebx
	jl	LBB0_9
LBB0_10:
	movl	4(%r13), %esi
	movq	%r13, %rdi
	callq	_ath5k_hw_set_antenna_mode
LBB0_11:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ## @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ## @IEEE80211_CONF_CHANGE_POWER
	.comm	_IEEE80211_CONF_CHANGE_RETRY_LIMITS,4,2 ## @IEEE80211_CONF_CHANGE_RETRY_LIMITS
	.no_dead_strip	_ath5k_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_config
_ath5k_config:                          ; @ath5k_config
	.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	x22, x1
	mov	x21, x0
	ldr	x19, [x0, #16]
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_2
; %bb.1:
	add	x1, x21, #12
	mov	x0, x19
	bl	_ath5k_chan_set
	mov	x20, x0
	tbz	w0, #31, LBB0_3
	b	LBB0_11
LBB0_2:
	mov	w20, #0
LBB0_3:
Lloh3:
	adrp	x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_POWER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.4:
	ldr	w9, [x19, #20]
	ldr	w8, [x21]
	cmp	w9, w8
	b.eq	LBB0_6
; %bb.5:
	str	w8, [x19, #20]
	lsl	w1, w8, #1
	mov	x0, x19
	bl	_ath5k_hw_set_txpower_limit
LBB0_6:
Lloh6:
	adrp	x8, _IEEE80211_CONF_CHANGE_RETRY_LIMITS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IEEE80211_CONF_CHANGE_RETRY_LIMITS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_10
; %bb.7:
	ldur	d0, [x21, #4]
	stur	d0, [x19, #12]
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	w21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_ath5k_hw_set_tx_retry_limits
	add	w21, w21, #1
	ldr	w8, [x19, #8]
	cmp	w21, w8
	b.lt	LBB0_9
LBB0_10:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_ath5k_hw_set_antenna_mode
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CONF_CHANGE_CHANNEL,4,2 ; @IEEE80211_CONF_CHANGE_CHANNEL
	.comm	_IEEE80211_CONF_CHANGE_POWER,4,2 ; @IEEE80211_CONF_CHANGE_POWER
	.comm	_IEEE80211_CONF_CHANGE_RETRY_LIMITS,4,2 ; @IEEE80211_CONF_CHANGE_RETRY_LIMITS
	.no_dead_strip	_ath5k_config
.subsections_via_symbols
