	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_op_get_survey
_carl9170_op_get_survey:                ## @carl9170_op_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	(%rdi), %r15
	movq	8(%r15), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rdx, %r13
	movl	%esi, %r14d
	cmpl	%esi, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r13, %rbx
	leaq	32(%r15), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_carl9170_update_survey
	movl	%eax, %r12d
	movq	%r13, %rdi
	movq	%rbx, %r13
	callq	_mutex_unlock
	testl	%r12d, %r12d
	jne	LBB0_16
LBB0_5:
	movq	_NUM_NL80211_BANDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.6:
	movq	24(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rdx
	cmpq	%rax, %rdx
	je	LBB0_18
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	(%rcx,%rdx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rdi), %esi
	testl	%esi, %esi
	jle	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rdi), %rbx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r14d, (%rbx)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=2
	addq	$4, %rbx
	decq	%rsi
	jne	LBB0_11
	jmp	LBB0_17
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	movslq	%r14d, %rsi
	shlq	$2, %rsi
	addq	16(%r15), %rsi
	movq	%r13, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	%rbx, 8(%r13)
	movq	_SURVEY_INFO_NOISE_DBM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	cmpq	8(%r15), %rbx
	jne	LBB0_14
## %bb.13:
	movq	_SURVEY_INFO_IN_USE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r13)
LBB0_14:
	xorl	%r12d, %r12d
	cmpq	$0, (%r15)
	je	LBB0_16
## %bb.15:
	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_TX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	orl	%eax, %edx
	movl	%edx, (%r13)
	jmp	LBB0_16
LBB0_18:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NUM_NL80211_BANDS,4,2          ## @NUM_NL80211_BANDS
	.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_TX,4,2        ## @SURVEY_INFO_TIME_TX
	.no_dead_strip	_carl9170_op_get_survey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_op_get_survey
_carl9170_op_get_survey:                ; @carl9170_op_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
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_3
; %bb.2:
	add	x23, x20, #32
	mov	x0, x23
	bl	_mutex_lock
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	bl	_carl9170_update_survey
	mov	x22, x0
	mov	x0, x23
	bl	_mutex_unlock
	cbnz	w22, LBB0_17
LBB0_3:
Lloh0:
	adrp	x8, _NUM_NL80211_BANDS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_NL80211_BANDS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.4:
	mov	x9, #0
	ldr	x10, [x20, #24]
	ldr	x10, [x10]
	ldr	x10, [x10]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	cmp	x9, x8
	b.eq	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x12, [x10, x9, lsl #3]
	cbz	x12, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w11, [x12]
	cmp	w11, #1
	b.lt	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x22, [x12, #8]
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x22]
	cmp	w12, w21
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x22, x22, #4
	subs	x11, x11, #1
	b.ne	LBB0_9
	b	LBB0_5
LBB0_11:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_16
LBB0_12:
	ldr	x8, [x20, #16]
	add	x1, x8, w21, sxtw #2
	mov	x0, x19
	mov	w2, #16
	bl	_memcpy
	str	x22, [x19, #8]
Lloh5:
	adrp	x8, _SURVEY_INFO_NOISE_DBM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SURVEY_INFO_NOISE_DBM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x9, [x20, #8]
	cmp	x22, x9
	b.eq	LBB0_18
; %bb.13:
	ldr	x9, [x20]
	cbz	x9, LBB0_19
LBB0_14:
	mov	w22, #0
Lloh8:
	adrp	x9, _SURVEY_INFO_TIME@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SURVEY_INFO_TIME@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _SURVEY_INFO_TIME_BUSY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SURVEY_INFO_TIME_BUSY@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh14:
	adrp	x10, _SURVEY_INFO_TIME_TX@GOTPAGE
Lloh15:
	ldr	x10, [x10, _SURVEY_INFO_TIME_TX@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_17
LBB0_15:
Lloh17:
	adrp	x8, _ENOENT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_17:
	mov	x0, x22
	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
LBB0_18:
Lloh19:
	adrp	x9, _SURVEY_INFO_IN_USE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SURVEY_INFO_IN_USE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x9, [x20]
	cbnz	x9, LBB0_14
LBB0_19:
	mov	w22, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NUM_NL80211_BANDS,4,2          ; @NUM_NL80211_BANDS
	.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_TX,4,2        ; @SURVEY_INFO_TIME_TX
	.no_dead_strip	_carl9170_op_get_survey
.subsections_via_symbols
