	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76_get_survey                ## -- Begin function mt76_get_survey
	.p2align	4, 0x90
_mt76_get_survey:                       ## @mt76_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
	pushq	%rax
	.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), %r13
	testl	%esi, %esi
	jne	LBB0_3
## %bb.1:
	movq	48(%r13), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	*%rax
LBB0_3:
	leaq	32(%r13), %rcx
	movl	32(%r13), %edx
	leaq	16(%r13), %rax
	xorl	%r15d, %r15d
	cmpl	%ebx, %edx
	cmovgq	%rcx, %rax
	cmovgl	%r15d, %edx
	subl	%edx, %ebx
	cmpl	(%rax), %ebx
	jge	LBB0_4
## %bb.5:
	movslq	%ebx, %rbx
	shlq	$2, %rbx
	addq	8(%rax), %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_mt76_channel_state
	movq	%rax, %r12
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%rbx, 24(%r14)
	movq	_SURVEY_INFO_TIME@GOTPCREL(%rip), %rcx
	movq	_SURVEY_INFO_TIME_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	cmpq	8(%r13), %rbx
	jne	LBB0_7
## %bb.6:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_7:
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movl	4(%r12), %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_div_u64
	movq	%rax, 16(%r14)
	movl	(%r12), %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_div_u64
	movq	%rax, 8(%r14)
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	jmp	LBB0_8
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %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_TIME,4,2           ## @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ## @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_IN_USE,4,2         ## @SURVEY_INFO_IN_USE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76_get_survey                ; -- Begin function mt76_get_survey
	.p2align	2
_mt76_get_survey:                       ; @mt76_get_survey
	.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, x2
	mov	x21, x1
	ldr	x20, [x0]
	cbnz	w1, LBB0_3
; %bb.1:
	ldr	x8, [x20, #48]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x20
	blr	x8
LBB0_3:
	mov	x8, x20
	ldr	w9, [x8, #32]!
	sub	x10, x8, #16
	cmp	w9, w21
	csel	w9, wzr, w9, gt
	csel	x8, x8, x10, gt
	ldr	w10, [x8]
	sub	w9, w21, w9
	cmp	w9, w10
	b.ge	LBB0_7
; %bb.4:
	ldr	x8, [x8, #8]
	add	x22, x8, w9, sxtw #2
	mov	x0, x20
	mov	x1, x22
	bl	_mt76_channel_state
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	str	x22, [x19, #24]
Lloh0:
	adrp	x8, _SURVEY_INFO_TIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SURVEY_INFO_TIME@GOTPAGEOFF]
Lloh2:
	adrp	x9, _SURVEY_INFO_TIME_BUSY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SURVEY_INFO_TIME_BUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x9, [x20, #8]
	cmp	x22, x9
	b.ne	LBB0_6
; %bb.5:
Lloh6:
	adrp	x9, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	mov	x0, x20
	bl	_spin_lock_bh
	ldr	w0, [x21, #4]
	mov	w1, #1000
	bl	_div_u64
	str	x0, [x19, #16]
	ldr	w0, [x21]
	mov	w1, #1000
	bl	_div_u64
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_bh
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _ENOENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SURVEY_INFO_TIME,4,2           ; @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ; @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_IN_USE,4,2         ; @SURVEY_INFO_IN_USE
.subsections_via_symbols
