	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qtnf_cmd_send_scan             ## -- Begin function qtnf_cmd_send_scan
	.p2align	4, 0x90
_qtnf_cmd_send_scan:                    ## @qtnf_cmd_send_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	4(%rdi), %edi
	movq	_QLINK_VIFID_RSVD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLINK_CMD_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %ecx
	callq	_qtnf_cmd_alloc_new_cmdskb
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_qtnf_bus_lock
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	movq	_WLAN_EID_SSID@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	48(%r14), %rax
	movl	(%rax,%rbx,8), %ecx
	movl	4(%rax,%rbx,8), %edx
	movq	%r13, %rdi
	callq	_qtnf_cmd_skb_put_tlv_arr
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:
	movq	_QLINK_IE_SET_PROBE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	40(%r14), %edx
	movq	%r13, %rdi
	callq	_qtnf_cmd_tlv_ie_set_add
LBB0_8:
	movl	16(%r14), %r15d
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.9:
	movq	_IEEE80211_CHAN_DISABLED@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	32(%r14), %rax
	movq	(%rax,%rbx,8), %r12
	movl	(%r12), %r8d
	movl	(%rcx), %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%r8d, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	incl	%ecx
	cmpl	%ecx, %r15d
	jne	LBB0_11
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_qtnf_cmd_channel_tlv_add
	movq	_IEEE80211_CHAN_DISABLED@GOTPCREL(%rip), %rcx
	incq	%rbx
	decl	%r15d
	jne	LBB0_10
LBB0_14:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qtnf_cmd_scan_set_dwell
	movl	20(%r14), %eax
	movq	_NL80211_SCAN_FLAG_RANDOM_ADDR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_16
## %bb.15:
	movl	4(%r15), %esi
	movl	24(%r14), %ecx
	movl	28(%r14), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movl	24(%r14), %edx
	movl	28(%r14), %esi
	movq	%r13, %rdi
	callq	_qtnf_cmd_randmac_tlv_add
	movl	20(%r14), %eax
LBB0_16:
	movq	_NL80211_SCAN_FLAG_FLUSH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.17:
	movl	4(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_QTN_TLV_ID_SCAN_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_qtnf_cmd_skb_put_tlv_tag
LBB0_18:
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_qtnf_cmd_send
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_qtnf_bus_unlock
	movl	%ebx, %eax
	jmp	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLINK_VIFID_RSVD,4,2           ## @QLINK_VIFID_RSVD
	.comm	_QLINK_CMD_SCAN,4,2             ## @QLINK_CMD_SCAN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WLAN_EID_SSID,4,2              ## @WLAN_EID_SSID
	.comm	_QLINK_IE_SET_PROBE_REQ,4,2     ## @QLINK_IE_SET_PROBE_REQ
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ## @IEEE80211_CHAN_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC%u: scan chan=%d, freq=%d, flags=%#x\n"

	.comm	_NL80211_SCAN_FLAG_RANDOM_ADDR,4,2 ## @NL80211_SCAN_FLAG_RANDOM_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"MAC%u: scan with random addr=%pM, mask=%pM\n"

	.comm	_NL80211_SCAN_FLAG_FLUSH,4,2    ## @NL80211_SCAN_FLAG_FLUSH
L_.str.2:                               ## @.str.2
	.asciz	"MAC%u: flush cache before scan\n"

	.comm	_QTN_TLV_ID_SCAN_FLUSH,4,2      ## @QTN_TLV_ID_SCAN_FLUSH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qtnf_cmd_send_scan             ; -- Begin function qtnf_cmd_send_scan
	.p2align	2
_qtnf_cmd_send_scan:                    ; @qtnf_cmd_send_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldr	x23, [x0, #8]
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _QLINK_VIFID_RSVD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLINK_VIFID_RSVD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _QLINK_CMD_SCAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QLINK_CMD_SCAN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w3, #4
	bl	_qtnf_cmd_alloc_new_cmdskb
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19]
	bl	_qtnf_bus_lock
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
	mov	x22, #0
Lloh6:
	adrp	x24, _WLAN_EID_SSID@GOTPAGE
Lloh7:
	ldr	x24, [x24, _WLAN_EID_SSID@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	ldr	x8, [x23, #48]
	add	x8, x8, x21
	ldp	w3, w2, [x8]
	mov	x0, x20
	bl	_qtnf_cmd_skb_put_tlv_arr
	add	x22, x22, #1
	ldrsw	x8, [x23]
	add	x21, x21, #8
	cmp	x22, x8
	b.lt	LBB0_3
LBB0_4:
	ldr	x3, [x23, #8]
	cbz	x3, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _QLINK_IE_SET_PROBE_REQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QLINK_IE_SET_PROBE_REQ@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x23, #40]
	mov	x0, x20
	bl	_qtnf_cmd_tlv_ie_set_add
LBB0_6:
	ldr	w24, [x23, #16]
	cbz	w24, LBB0_12
; %bb.7:
	mov	x25, #0
Lloh11:
	adrp	x26, _IEEE80211_CHAN_DISABLED@GOTPAGE
Lloh12:
	ldr	x26, [x26, _IEEE80211_CHAN_DISABLED@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	mov	w9, #0
	ldr	x8, [x23, #32]
	ldr	x22, [x8, x25, lsl #3]
	ldr	w8, [x22]
	ldr	w10, [x26]
	and	w10, w10, w8
LBB0_9:                                 ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	w10, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	w9, w9, #1
	cmp	w24, w9
	b.ne	LBB0_9
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x19, #4]
	ldp	w10, w9, [x22, #4]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
	mov	x0, x21
	bl	_pr_debug
	mov	x0, x20
	mov	x1, x22
	bl	_qtnf_cmd_channel_tlv_add
	add	x25, x25, #1
	subs	w24, w24, #1
	b.ne	LBB0_8
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	bl	_qtnf_cmd_scan_set_dwell
	ldr	w8, [x23, #20]
Lloh15:
	adrp	x9, _NL80211_SCAN_FLAG_RANDOM_ADDR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NL80211_SCAN_FLAG_RANDOM_ADDR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	ldr	w1, [x19, #4]
	ldp	w9, w8, [x23, #24]
	stp	x8, x9, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldp	w2, w1, [x23, #24]
	mov	x0, x20
	bl	_qtnf_cmd_randmac_tlv_add
	ldr	w8, [x23, #20]
LBB0_14:
Lloh20:
	adrp	x9, _NL80211_SCAN_FLAG_FLUSH@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NL80211_SCAN_FLAG_FLUSH@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.15:
	ldr	w1, [x19, #4]
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
Lloh25:
	adrp	x8, _QTN_TLV_ID_SCAN_FLUSH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _QTN_TLV_ID_SCAN_FLUSH@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_qtnf_cmd_skb_put_tlv_tag
LBB0_16:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_qtnf_cmd_send
	mov	x20, x0
	ldr	w0, [x19]
	bl	_qtnf_bus_unlock
	mov	x0, x20
	b	LBB0_18
LBB0_17:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_QLINK_VIFID_RSVD,4,2           ; @QLINK_VIFID_RSVD
	.comm	_QLINK_CMD_SCAN,4,2             ; @QLINK_CMD_SCAN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WLAN_EID_SSID,4,2              ; @WLAN_EID_SSID
	.comm	_QLINK_IE_SET_PROBE_REQ,4,2     ; @QLINK_IE_SET_PROBE_REQ
	.comm	_IEEE80211_CHAN_DISABLED,4,2    ; @IEEE80211_CHAN_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC%u: scan chan=%d, freq=%d, flags=%#x\n"

	.comm	_NL80211_SCAN_FLAG_RANDOM_ADDR,4,2 ; @NL80211_SCAN_FLAG_RANDOM_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"MAC%u: scan with random addr=%pM, mask=%pM\n"

	.comm	_NL80211_SCAN_FLAG_FLUSH,4,2    ; @NL80211_SCAN_FLAG_FLUSH
l_.str.2:                               ; @.str.2
	.asciz	"MAC%u: flush cache before scan\n"

	.comm	_QTN_TLV_ID_SCAN_FLUSH,4,2      ; @QTN_TLV_ID_SCAN_FLUSH
.subsections_via_symbols
