	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_ret_802_11_scan        ## -- Begin function mwifiex_ret_802_11_scan
	.p2align	4, 0x90
_mwifiex_ret_802_11_scan:               ## @mwifiex_ret_802_11_scan
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r13
	movl	$0, -44(%rbp)
	movl	56(%rsi), %edi
	callq	_le16_to_cpu
	movq	_HostCmd_CMD_802_11_BG_SCAN_QUERY@GOTPCREL(%rip), %rcx
	leaq	8(%r14), %rbx
	leaq	32(%r14), %rdx
	cmpl	(%rcx), %eax
	cmoveq	%rdx, %rbx
	movl	(%rbx), %ecx
	movq	_MWIFIEX_MAX_AP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_mwifiex_dbg
	movl	$-1, %ebx
	jmp	LBB0_17
LBB0_2:
	movq	%r15, %rdi
	callq	_mwifiex_11h_get_csa_closed_channel
	movl	16(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, %r12d
	movl	%eax, -48(%rbp)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_INFO@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movl	%eax, %ecx
	callq	_mwifiex_dbg
	movl	(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movl	(%r15), %esi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	callq	_mwifiex_dbg
	movq	8(%r15), %rax
	movq	%rax, -96(%rbp)
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movslq	%r12d, %rcx
	movq	_S_DS_GEN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%ecx, %edx
	negl	%edx
	movq	%r13, %rbx
	leal	(%r14,%rdx), %r13d
	addl	$-8, %r13d
	leaq	(%rax,%rcx,4), %r14
	movq	_TLV_TYPE_TSFTIMESTAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-104(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_mwifiex_ret_802_11_scan_get_tlv_ptrs
	movq	_TLV_TYPE_CHANNELBANDLIST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-88(%rbp), %r8
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_mwifiex_ret_802_11_scan_get_tlv_ptrs
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	jle	LBB0_17
## %bb.3:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.4:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-104(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_TSF_DATA_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	%r12d, %rsi
	imulq	%rcx, %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	leaq	-44(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax), %rbx
	leaq	(%rbx,%r14), %r13
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	cmpq	$0, (%r15)
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$20, %edi
	callq	_kzalloc
	movq	(%r15), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, (%rax)
	movl	4(%rbx,%r12,8), %ecx
	movq	8(%rax), %rax
	movl	%ecx, (%rax)
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%r13d, %r13d
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-44(%rbp), %edi
	callq	_le64_to_cpu
	movl	$0, (%rsp)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	-96(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %ecx
	movq	%r13, %r8
	xorl	%r9d, %r9d
	callq	_mwifiex_parse_single_response_buf
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movslq	(%r15), %rax
	xorl	%ebx, %ebx
	cmpq	%rax, %r12
	jge	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	$8, %r14
	cmpl	$0, -48(%rbp)
	jne	LBB0_7
	jmp	LBB0_17
LBB0_16:
	movl	%eax, %ebx
LBB0_17:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mwifiex_check_next_scan_command
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HostCmd_CMD_802_11_BG_SCAN_QUERY,4,2 ## @HostCmd_CMD_802_11_BG_SCAN_QUERY
	.comm	_MWIFIEX_MAX_AP,4,2             ## @MWIFIEX_MAX_AP
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCAN_RESP: too many AP returned (%d)\n"

	.comm	_INFO,4,2                       ## @INFO
L_.str.1:                               ## @.str.1
	.asciz	"info: SCAN_RESP: bss_descript_size %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"info: SCAN_RESP: returned %d APs before parsing\n"

	.comm	_S_DS_GEN,4,2                   ## @S_DS_GEN
	.comm	_TLV_TYPE_TSFTIMESTAMP,4,2      ## @TLV_TYPE_TSFTIMESTAMP
	.comm	_TLV_TYPE_CHANNELBANDLIST,4,2   ## @TLV_TYPE_CHANNELBANDLIST
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_TSF_DATA_SIZE,4,2              ## @TSF_DATA_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mwifiex_ret_802_11_scan        ; -- Begin function mwifiex_ret_802_11_scan
	.p2align	2
_mwifiex_ret_802_11_scan:               ; @mwifiex_ret_802_11_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	str	wzr, [sp, #12]
	ldr	w0, [x1, #56]
	bl	_le16_to_cpu
Lloh0:
	adrp	x8, _HostCmd_CMD_802_11_BG_SCAN_QUERY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HostCmd_CMD_802_11_BG_SCAN_QUERY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	x9, x22, #8
	add	x10, x22, #32
	cmp	w0, w8
	csel	x24, x10, x9, eq
	ldr	w3, [x24]
Lloh3:
	adrp	x8, _MWIFIEX_MAX_AP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MWIFIEX_MAX_AP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w3, w8
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mwifiex_dbg
	mov	w21, #-1
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_mwifiex_11h_get_csa_closed_channel
	ldr	w0, [x24, #16]
	bl	_le16_to_cpu
	mov	x21, x0
	str	w0, [sp, #28]
Lloh11:
	adrp	x23, _INFO@GOTPAGE
Lloh12:
	ldr	x23, [x23, _INFO@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	bl	_mwifiex_dbg
	ldr	w0, [x22]
	bl	_le16_to_cpu
	mov	x22, x0
	ldr	w1, [x23]
	ldr	w3, [x24]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mwifiex_dbg
	ldr	x8, [x24, #8]
	str	x8, [sp, #32]
Lloh17:
	adrp	x9, _S_DS_GEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _S_DS_GEN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	add	w9, w21, w9
	sub	w9, w22, w9
	sub	w22, w9, #8
	add	x23, x8, w21, sxtw #2
Lloh20:
	adrp	x8, _TLV_TYPE_TSFTIMESTAMP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TLV_TYPE_TSFTIMESTAMP@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	add	x4, sp, #40
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_mwifiex_ret_802_11_scan_get_tlv_ptrs
Lloh23:
	adrp	x8, _TLV_TYPE_CHANNELBANDLIST@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TLV_TYPE_CHANNELBANDLIST@GOTPAGEOFF]
Lloh25:
	ldr	w3, [x8]
	add	x4, sp, #16
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_mwifiex_ret_802_11_scan_get_tlv_ptrs
	ldr	w8, [x24]
	cmp	w8, #1
	ccmp	w21, #0, #4, ge
	b.ne	LBB0_5
; %bb.3:
	mov	w21, #0
LBB0_4:
	mov	x0, x19
	bl	_mwifiex_check_next_scan_command
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_5:
	mov	x22, #0
	mov	w23, #1
Lloh26:
	adrp	x25, _GFP_ATOMIC@GOTPAGE
Lloh27:
	ldr	x25, [x25, _GFP_ATOMIC@GOTPAGEOFF]
Lloh28:
	adrp	x26, _TSF_DATA_SIZE@GOTPAGE
Lloh29:
	ldr	x26, [x26, _TSF_DATA_SIZE@GOTPAGEOFF]
	mov	w27, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x8]
	ldr	w9, [x26]
	sub	w10, w27, #1
	mul	w9, w9, w10
	add	x1, x8, w9, sxtw #2
	add	x0, sp, #12
	mov	w2, #4
	bl	_memcpy
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x28, [x8]
	add	x21, x28, x22
	ldr	x8, [x20]
	cbz	x8, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x25]
	mov	w0, #20
	bl	_kzalloc
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	str	x0, [x8, x22]
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x22]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w23, [x8]
	add	x9, x28, x22
	ldr	w9, [x9, #4]
	ldr	x8, [x8, #8]
	str	w9, [x8]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, #0
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [sp, #12]
	bl	_le64_to_cpu
	mov	x3, x0
	add	x1, sp, #32
	add	x2, sp, #28
	mov	x0, x19
	mov	x4, x21
	mov	w5, #0
	mov	w6, #0
	bl	_mwifiex_parse_single_response_buf
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x8, [x24]
	cmp	x27, x8
	b.ge	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #28]
	add	x27, x27, #1
	add	x22, x22, #8
	cbnz	w8, LBB0_6
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HostCmd_CMD_802_11_BG_SCAN_QUERY,4,2 ; @HostCmd_CMD_802_11_BG_SCAN_QUERY
	.comm	_MWIFIEX_MAX_AP,4,2             ; @MWIFIEX_MAX_AP
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCAN_RESP: too many AP returned (%d)\n"

	.comm	_INFO,4,2                       ; @INFO
l_.str.1:                               ; @.str.1
	.asciz	"info: SCAN_RESP: bss_descript_size %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"info: SCAN_RESP: returned %d APs before parsing\n"

	.comm	_S_DS_GEN,4,2                   ; @S_DS_GEN
	.comm	_TLV_TYPE_TSFTIMESTAMP,4,2      ; @TLV_TYPE_TSFTIMESTAMP
	.comm	_TLV_TYPE_CHANNELBANDLIST,4,2   ; @TLV_TYPE_CHANNELBANDLIST
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_TSF_DATA_SIZE,4,2              ; @TSF_DATA_SIZE
.subsections_via_symbols
