	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_get_frame_duration    ## -- Begin function ath5k_hw_get_frame_duration
	.p2align	4, 0x90
_ath5k_hw_get_frame_duration:           ## @ath5k_hw_get_frame_duration
	.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	%r8d, %ebx
	movq	%rcx, %r8
	movl	%edx, %r14d
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r8), %esi
	movq	_AR5K_INIT_OFDM_PREAMPLE_TIME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_AR5K_INIT_OFDM_PLCP_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_AR5K_INIT_OFDM_SYMBOL_TIME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	$128, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$130, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.5:
	movq	_AR5K_INIT_SIFS_TURBO@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_AR5K_INIT_OFDM_PREAMBLE_TIME_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_1:
	movl	%esi, %edx
	movl	4(%rdi), %edi
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_ieee80211_generic_frame_duration
	movl	%eax, %edi
	callq	_le16_to_cpu
	movl	%eax, %ecx
	leal	-96(%rcx), %eax
	testl	%ebx, %ebx
	cmovel	%ecx, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_AR5K_INIT_SIFS_QUARTER_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	shll	$2, %ebx
	shll	$2, %r15d
	movl	%esi, %edi
	movl	$4, %esi
	jmp	LBB0_7
LBB0_6:
	movq	_AR5K_INIT_SIFS_HALF_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	addl	%ebx, %ebx
	addl	%r15d, %r15d
	movl	%esi, %edi
	movl	$2, %esi
LBB0_7:
	callq	_DIV_ROUND_UP
	movl	%eax, %esi
	jmp	LBB0_10
LBB0_9:
	movq	_AR5K_INIT_SIFS_DEFAULT_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_10:
	addl	%r13d, %ebx
	leal	(%r12,%r14,8), %eax
	imull	%r15d, %esi
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edi
	callq	_DIV_ROUND_UP
	imull	%r15d, %eax
	addl	%ebx, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_INIT_OFDM_PREAMPLE_TIME,4,2 ## @AR5K_INIT_OFDM_PREAMPLE_TIME
	.comm	_AR5K_INIT_OFDM_PLCP_BITS,4,2   ## @AR5K_INIT_OFDM_PLCP_BITS
	.comm	_AR5K_INIT_OFDM_SYMBOL_TIME,4,2 ## @AR5K_INIT_OFDM_SYMBOL_TIME
	.comm	_AR5K_INIT_SIFS_TURBO,4,2       ## @AR5K_INIT_SIFS_TURBO
	.comm	_AR5K_INIT_OFDM_PREAMBLE_TIME_MIN,4,2 ## @AR5K_INIT_OFDM_PREAMBLE_TIME_MIN
	.comm	_AR5K_INIT_SIFS_HALF_RATE,4,2   ## @AR5K_INIT_SIFS_HALF_RATE
	.comm	_AR5K_INIT_SIFS_QUARTER_RATE,4,2 ## @AR5K_INIT_SIFS_QUARTER_RATE
	.comm	_AR5K_INIT_SIFS_DEFAULT_BG,4,2  ## @AR5K_INIT_SIFS_DEFAULT_BG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_get_frame_duration    ; -- Begin function ath5k_hw_get_frame_duration
	.p2align	2
_ath5k_hw_get_frame_duration:           ; @ath5k_hw_get_frame_duration
	.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	x20, x4
	mov	x4, x3
	mov	x19, x2
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w0, [x4]
Lloh0:
	adrp	x9, _AR5K_INIT_OFDM_PREAMPLE_TIME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_INIT_OFDM_PREAMPLE_TIME@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AR5K_INIT_OFDM_PLCP_BITS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AR5K_INIT_OFDM_PLCP_BITS@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x9]
Lloh5:
	ldr	w22, [x10]
Lloh6:
	adrp	x9, _AR5K_INIT_OFDM_SYMBOL_TIME@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR5K_INIT_OFDM_SYMBOL_TIME@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x9]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #130
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.4:
Lloh9:
	adrp	x8, _AR5K_INIT_SIFS_TURBO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR5K_INIT_SIFS_TURBO@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
Lloh12:
	adrp	x8, _AR5K_INIT_OFDM_PREAMBLE_TIME_MIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR5K_INIT_OFDM_PREAMBLE_TIME_MIN@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	b	LBB0_9
LBB0_5:
	mov	x2, x1
	ldr	w0, [x0, #4]
	mov	x1, #0
	mov	x3, x19
	bl	_ieee80211_generic_frame_duration
	bl	_le16_to_cpu
	sub	w8, w0, #96
	cmp	w20, #0
	csel	w0, w0, w8, eq
	b	LBB0_10
LBB0_6:
Lloh15:
	adrp	x8, _AR5K_INIT_SIFS_QUARTER_RATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR5K_INIT_SIFS_QUARTER_RATE@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
	lsl	w21, w21, #2
	lsl	w20, w20, #2
	mov	w1, #4
	bl	_DIV_ROUND_UP
	b	LBB0_9
LBB0_7:
Lloh18:
	adrp	x8, _AR5K_INIT_SIFS_HALF_RATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AR5K_INIT_SIFS_HALF_RATE@GOTPAGEOFF]
Lloh20:
	ldr	w23, [x8]
	lsl	w21, w21, #1
	lsl	w20, w20, #1
	mov	w1, #2
	bl	_DIV_ROUND_UP
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x8, _AR5K_INIT_SIFS_DEFAULT_BG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR5K_INIT_SIFS_DEFAULT_BG@GOTPAGEOFF]
Lloh23:
	ldr	w23, [x8]
LBB0_9:
	add	w8, w22, w19, lsl #3
	mul	w1, w20, w0
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #1
	bl	_DIV_ROUND_UP
	add	w8, w23, w21
	madd	w0, w0, w20, w8
LBB0_10:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_INIT_OFDM_PREAMPLE_TIME,4,2 ; @AR5K_INIT_OFDM_PREAMPLE_TIME
	.comm	_AR5K_INIT_OFDM_PLCP_BITS,4,2   ; @AR5K_INIT_OFDM_PLCP_BITS
	.comm	_AR5K_INIT_OFDM_SYMBOL_TIME,4,2 ; @AR5K_INIT_OFDM_SYMBOL_TIME
	.comm	_AR5K_INIT_SIFS_TURBO,4,2       ; @AR5K_INIT_SIFS_TURBO
	.comm	_AR5K_INIT_OFDM_PREAMBLE_TIME_MIN,4,2 ; @AR5K_INIT_OFDM_PREAMBLE_TIME_MIN
	.comm	_AR5K_INIT_SIFS_HALF_RATE,4,2   ; @AR5K_INIT_SIFS_HALF_RATE
	.comm	_AR5K_INIT_SIFS_QUARTER_RATE,4,2 ; @AR5K_INIT_SIFS_QUARTER_RATE
	.comm	_AR5K_INIT_SIFS_DEFAULT_BG,4,2  ; @AR5K_INIT_SIFS_DEFAULT_BG
.subsections_via_symbols
