	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2800_get_survey              ## -- Begin function rt2800_get_survey
	.p2align	4, 0x90
_rt2800_get_survey:                     ## @rt2800_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
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rdx, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movl	4(%rdi), %eax
	movl	%eax, 16(%rdx)
	movq	_CH_IDLE_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, %r13d
	movq	_CH_BUSY_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%eax, %r15d
	movq	_CH_BUSY_STA_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rt2800_register_read
	movl	%r13d, %ecx
	orl	%r15d, %ecx
	je	LBB0_4
## %bb.3:
	movq	_SURVEY_INFO_TIME@GOTPCREL(%rip), %rcx
	movq	_SURVEY_INFO_TIME_BUSY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_SURVEY_INFO_TIME_EXT_BUSY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, (%r14)
	addl	%r15d, %r13d
	movslq	%r13d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, 4(%r14)
	movslq	%r15d, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	movl	%ecx, 8(%r14)
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, 12(%r14)
LBB0_4:
	movq	_IEEE80211_CONF_OFFCHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, (%r12)
	jne	LBB0_6
## %bb.5:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r14)
LBB0_6:
	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	_CH_IDLE_STA,4,2                ## @CH_IDLE_STA
	.comm	_CH_BUSY_STA,4,2                ## @CH_BUSY_STA
	.comm	_CH_BUSY_STA_SEC,4,2            ## @CH_BUSY_STA_SEC
	.comm	_SURVEY_INFO_TIME,4,2           ## @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ## @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_EXT_BUSY,4,2  ## @SURVEY_INFO_TIME_EXT_BUSY
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ## @IEEE80211_CONF_OFFCHANNEL
	.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	_rt2800_get_survey              ; -- Begin function rt2800_get_survey
	.p2align	2
_rt2800_get_survey:                     ; @rt2800_get_survey
	.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
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENOENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	mov	x19, x2
	mov	x20, x0
	ldr	x23, [x0, #8]
	ldr	w8, [x0, #4]
	str	w8, [x2, #16]
Lloh3:
	adrp	x8, _CH_IDLE_STA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CH_IDLE_STA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_rt2800_register_read
	mov	x22, x0
Lloh6:
	adrp	x8, _CH_BUSY_STA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CH_BUSY_STA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_rt2800_register_read
	mov	x21, x0
Lloh9:
	adrp	x8, _CH_BUSY_STA_SEC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CH_BUSY_STA_SEC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_rt2800_register_read
	orr	w8, w22, w21
	cbz	w8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _SURVEY_INFO_TIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SURVEY_INFO_TIME@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _SURVEY_INFO_TIME_BUSY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SURVEY_INFO_TIME_BUSY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _SURVEY_INFO_TIME_EXT_BUSY@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SURVEY_INFO_TIME_EXT_BUSY@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	add	w9, w21, w22
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x11, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w11
	stp	w8, w9, [x19]
	smull	x8, w21, w10
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	smull	x9, w0, w10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	stp	w8, w9, [x19, #8]
LBB0_4:
	ldr	w8, [x20]
Lloh21:
	adrp	x9, _IEEE80211_CONF_OFFCHANNEL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IEEE80211_CONF_OFFCHANNEL@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w0, #0
Lloh24:
	adrp	x8, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_CH_IDLE_STA,4,2                ; @CH_IDLE_STA
	.comm	_CH_BUSY_STA,4,2                ; @CH_BUSY_STA
	.comm	_CH_BUSY_STA_SEC,4,2            ; @CH_BUSY_STA_SEC
	.comm	_SURVEY_INFO_TIME,4,2           ; @SURVEY_INFO_TIME
	.comm	_SURVEY_INFO_TIME_BUSY,4,2      ; @SURVEY_INFO_TIME_BUSY
	.comm	_SURVEY_INFO_TIME_EXT_BUSY,4,2  ; @SURVEY_INFO_TIME_EXT_BUSY
	.comm	_IEEE80211_CONF_OFFCHANNEL,4,2  ; @IEEE80211_CONF_OFFCHANNEL
	.comm	_SURVEY_INFO_IN_USE,4,2         ; @SURVEY_INFO_IN_USE
.subsections_via_symbols
