	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_htc_choose_bslot
_ath9k_htc_choose_bslot:                ## @ath9k_htc_choose_bslot
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movl	(%rbx), %r12d
	movl	(%r15), %edi
	callq	_be64_to_cpu
	movl	%eax, %r15d
	movl	%eax, %esi
	callq	_TSF_TO_TU
	movl	%eax, %r9d
	cltd
	idivl	%r12d
	movl	%edx, %eax
	movq	_ATH9K_HTC_MAX_BCN_VIF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%ecx, %eax
	cltd
	idivl	%r12d
	movl	%eax, %ebx
	notl	%ebx
	addl	%ecx, %ebx
	movq	_BEACON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_ath_dbg
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH9K_HTC_MAX_BCN_VIF,4,2      ## @ATH9K_HTC_MAX_BCN_VIF
	.comm	_BEACON,4,2                     ## @BEACON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Choose slot: %d, tsf: %llu, tsftu: %u, intval: %u\n"

	.no_dead_strip	_ath9k_htc_choose_bslot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_htc_choose_bslot
_ath9k_htc_choose_bslot:                ; @ath9k_htc_choose_bslot
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_ath9k_hw_common
	mov	x21, x0
	ldr	w20, [x20]
	ldr	w0, [x19]
	bl	_be64_to_cpu
	mov	x19, x0
	mov	x1, x0
	bl	_TSF_TO_TU
	mov	x5, x0
	sdiv	w8, w0, w20
	msub	w8, w8, w20, w0
Lloh0:
	adrp	x9, _ATH9K_HTC_MAX_BCN_VIF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATH9K_HTC_MAX_BCN_VIF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w8, w9, w8
	sdiv	w8, w8, w20
	mvn	w8, w8
	add	w22, w9, w8
Lloh3:
	adrp	x8, _BEACON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BEACON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	mov	x4, x19
	mov	x6, x20
	bl	_ath_dbg
	mov	x0, x22
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH9K_HTC_MAX_BCN_VIF,4,2      ; @ATH9K_HTC_MAX_BCN_VIF
	.comm	_BEACON,4,2                     ; @BEACON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Choose slot: %d, tsf: %llu, tsftu: %u, intval: %u\n"

	.no_dead_strip	_ath9k_htc_choose_bslot
.subsections_via_symbols
