	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_get_survey
_ath5k_get_survey:                      ## @ath5k_get_survey
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movq	%r13, %rdi
	callq	_ath5k_hw_common
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_2:
	movq	%rax, %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	imull	$1000, (%r12), %ebx             ## imm = 0x3E8
	movq	%r12, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	%r12, %rdi
	callq	_ath_hw_cycle_counters_update
	movl	8(%r12), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	divl	%ebx
	addl	%eax, 4(%r13)
	movl	12(%r12), %eax
	xorl	%edx, %edx
	divl	%ebx
	addl	%eax, 8(%r13)
	movl	16(%r12), %eax
	xorl	%edx, %edx
	divl	%ebx
	addl	%eax, 12(%r13)
	movl	20(%r12), %eax
	xorl	%edx, %edx
	divl	%ebx
	addl	%eax, 16(%r13)
LBB0_4:
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	leaq	4(%r13), %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$12, %edx
	callq	_memcpy
	movl	(%r15), %eax
	movl	%eax, 8(%r14)
	movl	(%r13), %eax
	movl	%eax, 4(%r14)
	movq	_SURVEY_INFO_NOISE_DBM@GOTPCREL(%rip), %rax
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SURVEY_INFO_TIME@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SURVEY_INFO_TIME_BUSY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SURVEY_INFO_TIME_RX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SURVEY_INFO_TIME_TX@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SURVEY_INFO_NOISE_DBM,4,2      ## @SURVEY_INFO_NOISE_DBM
	.comm	_SURVEY_INFO_IN_USE,4,2         ## @SURVEY_INFO_IN_USE
	.comm	_SURVEY_INFO_TIME,4,2           ## @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ## @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_RX,4,2        ## @SURVEY_INFO_TIME_RX
	.comm	_SURVEY_INFO_TIME_TX,4,2        ## @SURVEY_INFO_TIME_TX
	.no_dead_strip	_ath5k_get_survey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_get_survey
_ath5k_get_survey:                      ; @ath5k_get_survey
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_ath5k_hw_common
	cbz	w22, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x23, x0
	add	x22, x0, #4
	mov	x24, x0
	ldr	w25, [x24], #8
	mov	x0, x22
	bl	_spin_lock_bh
	mov	x0, x23
	bl	_ath_hw_cycle_counters_update
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w9, #1000
	mul	w9, w25, w9
	udiv	w8, w8, w9
	ldp	w10, w11, [x20, #4]
	add	w8, w10, w8
	ldp	w10, w12, [x23, #12]
	udiv	w10, w10, w9
	add	w10, w11, w10
	stp	w8, w10, [x20, #4]
	udiv	w8, w12, w9
	ldp	w10, w11, [x20, #12]
	add	w8, w10, w8
	ldr	w10, [x23, #20]
	udiv	w9, w10, w9
	add	w9, w11, w9
	stp	w8, w9, [x20, #12]
LBB0_4:
	mov	x0, x24
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	mov	x0, x22
	bl	_spin_unlock_bh
	add	x1, x20, #4
	mov	x0, x19
	mov	w2, #12
	bl	_memcpy
	mov	w0, #0
	ldr	w8, [x21]
	str	w8, [x19, #8]
Lloh3:
	adrp	x8, _SURVEY_INFO_NOISE_DBM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SURVEY_INFO_NOISE_DBM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _SURVEY_INFO_TIME@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SURVEY_INFO_TIME@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh11:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _SURVEY_INFO_TIME_BUSY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SURVEY_INFO_TIME_BUSY@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _SURVEY_INFO_TIME_RX@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SURVEY_INFO_TIME_RX@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _SURVEY_INFO_TIME_TX@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SURVEY_INFO_TIME_TX@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh20:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x20]
	stp	w8, w9, [x19]
LBB0_5:
	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	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SURVEY_INFO_NOISE_DBM,4,2      ; @SURVEY_INFO_NOISE_DBM
	.comm	_SURVEY_INFO_IN_USE,4,2         ; @SURVEY_INFO_IN_USE
	.comm	_SURVEY_INFO_TIME,4,2           ; @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ; @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_RX,4,2        ; @SURVEY_INFO_TIME_RX
	.comm	_SURVEY_INFO_TIME_TX,4,2        ; @SURVEY_INFO_TIME_TX
	.no_dead_strip	_ath5k_get_survey
.subsections_via_symbols
