	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_update_tx_triglevel   ## -- Begin function ath5k_hw_update_tx_triglevel
	.p2align	4, 0x90
_ath5k_hw_update_tx_triglevel:          ## @ath5k_hw_update_tx_triglevel
	.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, %rbx
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_AR5K_INT_GLOBAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	notq	%rsi
	andq	(%rdi), %rsi
	callq	_ath5k_hw_set_imr
	movq	%rax, %r14
	movq	_AR5K_TXCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath5k_hw_reg_read
	movq	_AR5K_TXCFG_TXFULL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_AR5K_REG_MS
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.3:
	movq	_AR5K_TUNE_MAX_TX_FIFO_THRES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	subq	%rax, %rdx
	movq	%rdx, %rcx
	shrq	$63, %rcx
	addq	%rdx, %rcx
	sarq	%rcx
	jmp	LBB0_4
LBB0_1:
	movq	_AR5K_TUNE_MIN_TX_FIFO_THRES@GOTPCREL(%rip), %rdx
	movq	$-1, %rcx
	cmpq	(%rdx), %rax
	jle	LBB0_2
LBB0_4:
	addq	%rax, %rcx
	movq	8(%rbx), %rax
	movq	_AR5K_AR5210@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_AR5K_TRIG_LVL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_ath5k_hw_reg_write
	jmp	LBB0_7
LBB0_6:
	movq	_AR5K_TXCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_AR5K_REG_WRITE_BITS
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_2:
	negl	%r15d
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_set_imr
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AR5K_INT_GLOBAL,8,3            ## @AR5K_INT_GLOBAL
	.comm	_AR5K_TXCFG,4,2                 ## @AR5K_TXCFG
	.comm	_AR5K_TXCFG_TXFULL,4,2          ## @AR5K_TXCFG_TXFULL
	.comm	_AR5K_TUNE_MIN_TX_FIFO_THRES,8,3 ## @AR5K_TUNE_MIN_TX_FIFO_THRES
	.comm	_AR5K_TUNE_MAX_TX_FIFO_THRES,8,3 ## @AR5K_TUNE_MAX_TX_FIFO_THRES
	.comm	_AR5K_AR5210,8,3                ## @AR5K_AR5210
	.comm	_AR5K_TRIG_LVL,4,2              ## @AR5K_TRIG_LVL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_update_tx_triglevel   ; -- Begin function ath5k_hw_update_tx_triglevel
	.p2align	2
_ath5k_hw_update_tx_triglevel:          ; @ath5k_hw_update_tx_triglevel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _AR5K_INT_GLOBAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AR5K_INT_GLOBAL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	bic	x1, x8, x9
	bl	_ath5k_hw_set_imr
	mov	x20, x0
Lloh6:
	adrp	x22, _AR5K_TXCFG@GOTPAGE
Lloh7:
	ldr	x22, [x22, _AR5K_TXCFG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ath5k_hw_reg_read
Lloh8:
	adrp	x23, _AR5K_TXCFG_TXFULL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _AR5K_TXCFG_TXFULL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_AR5K_REG_MS
	cbz	w21, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _AR5K_TUNE_MAX_TX_FIFO_THRES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AR5K_TUNE_MAX_TX_FIFO_THRES@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	sub	x8, x8, x0
	cmp	x8, #0
	cinc	x8, x8, lt
	asr	x8, x8, #1
	b	LBB0_4
LBB0_2:
Lloh13:
	adrp	x8, _AR5K_TUNE_MIN_TX_FIFO_THRES@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AR5K_TUNE_MIN_TX_FIFO_THRES@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_8
; %bb.3:
	mov	x8, #-1
LBB0_4:
	add	x3, x8, x0
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x9, _AR5K_AR5210@GOTPAGE
Lloh17:
	ldr	x9, [x9, _AR5K_AR5210@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh19:
	adrp	x8, _AR5K_TRIG_LVL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AR5K_TRIG_LVL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x3
	bl	_ath5k_hw_reg_write
	b	LBB0_7
LBB0_6:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_AR5K_REG_WRITE_BITS
LBB0_7:
	mov	w21, #0
	b	LBB0_9
LBB0_8:
	neg	w21, w24
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_set_imr
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AR5K_INT_GLOBAL,8,3            ; @AR5K_INT_GLOBAL
	.comm	_AR5K_TXCFG,4,2                 ; @AR5K_TXCFG
	.comm	_AR5K_TXCFG_TXFULL,4,2          ; @AR5K_TXCFG_TXFULL
	.comm	_AR5K_TUNE_MIN_TX_FIFO_THRES,8,3 ; @AR5K_TUNE_MIN_TX_FIFO_THRES
	.comm	_AR5K_TUNE_MAX_TX_FIFO_THRES,8,3 ; @AR5K_TUNE_MAX_TX_FIFO_THRES
	.comm	_AR5K_AR5210,8,3                ; @AR5K_AR5210
	.comm	_AR5K_TRIG_LVL,4,2              ; @AR5K_TRIG_LVL
.subsections_via_symbols
