	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl1271_tm_cmd_test
_wl1271_tm_cmd_test:                    ## @wl1271_tm_cmd_test
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_DEBUG_TESTMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wl1271_debug
	movq	_WL1271_TM_ATTR_DATA@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rbx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	callq	_nla_data
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rax
	movq	(%rbx,%rax,8), %rdi
	callq	_nla_len
	movl	%eax, %r13d
	movq	_WL1271_TM_ATTR_ANSWER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	callq	_nla_get_u8
	movq	%rax, %r14
	cmpl	$5, %r13d
	jb	LBB0_8
LBB0_7:
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_4:
	xorl	%r14d, %r14d
	cmpl	$5, %r13d
	jae	LBB0_7
LBB0_8:
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_WLCORE_STATE_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_10:
	movl	12(%r12), %edi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movq	%r14, %rcx
	callq	_wl1271_cmd_test
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.14:
	testq	%r14, %r14
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_25
## %bb.15:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx), %edi
	callq	_le16_to_cpu
	movq	(%rbx), %rcx
	movq	_TEST_CMD_P2G_CAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_18
## %bb.16:
	testl	%eax, %eax
	jns	LBB0_18
## %bb.17:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_wl1271_warning
	jmp	LBB0_19
LBB0_11:
	movl	%eax, %ebx
	movl	12(%r12), %edi
	callq	_pm_runtime_put_noidle
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_wl1271_warning
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_25
LBB0_18:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_wl1271_info
LBB0_19:
	movl	%r13d, %edi
	callq	_nla_total_size
	movq	16(%r12), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_cfg80211_testmode_alloc_reply_skb
	testq	%rax, %rax
	je	LBB0_20
## %bb.22:
	movq	%rax, %rbx
	movq	(%r15), %rsi
	movq	%rax, %rdi
	movl	%r13d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_nla_put
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	callq	_kfree_skb
	movq	_EMSGSIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_21:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_24:
	callq	_cfg80211_testmode_reply
	movl	%eax, %ebx
LBB0_25:
	movl	12(%r12), %edi
	callq	_pm_runtime_mark_last_busy
	movl	12(%r12), %edi
	callq	_pm_runtime_put_autosuspend
LBB0_26:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_27:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_TESTMODE,4,2             ## @DEBUG_TESTMODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"testmode cmd test"

	.comm	_WL1271_TM_ATTR_DATA,8,3        ## @WL1271_TM_ATTR_DATA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WL1271_TM_ATTR_ANSWER,8,3      ## @WL1271_TM_ATTR_ANSWER
	.comm	_EMSGSIZE,4,2                   ## @EMSGSIZE
	.comm	_WLCORE_STATE_ON,8,3            ## @WLCORE_STATE_ON
L_.str.1:                               ## @.str.1
	.asciz	"testmode cmd test failed: %d"

	.comm	_TEST_CMD_P2G_CAL,8,3           ## @TEST_CMD_P2G_CAL
L_.str.2:                               ## @.str.2
	.asciz	"testmode cmd: radio status=%d"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_wl1271_tm_cmd_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl1271_tm_cmd_test
_wl1271_tm_cmd_test:                    ; @wl1271_tm_cmd_test
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DEBUG_TESTMODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_TESTMODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wl1271_debug
Lloh5:
	adrp	x25, _WL1271_TM_ATTR_DATA@GOTPAGE
Lloh6:
	ldr	x25, [x25, _WL1271_TM_ATTR_DATA@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x0, [x20, x8, lsl #3]
	cbz	x0, LBB0_4
; %bb.1:
	bl	_nla_data
	mov	x21, x0
	ldr	x8, [x25]
	ldr	x0, [x20, x8, lsl #3]
	bl	_nla_len
	mov	x22, x0
Lloh7:
	adrp	x8, _WL1271_TM_ATTR_ANSWER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WL1271_TM_ATTR_ANSWER@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x0, [x20, x8, lsl #3]
	cbz	x0, LBB0_6
; %bb.2:
	bl	_nla_get_u8
	mov	x24, x0
	cmp	w22, #5
	b.lo	LBB0_7
LBB0_3:
Lloh10:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_26
LBB0_6:
	mov	x24, #0
	cmp	w22, #5
	b.hs	LBB0_3
LBB0_7:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _WLCORE_STATE_ON@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WLCORE_STATE_ON@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_25
LBB0_9:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_15
; %bb.10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x24
	bl	_wl1271_cmd_test
	mov	x23, x0
	tbnz	w0, #31, LBB0_16
; %bb.11:
	cbz	x24, LBB0_24
; %bb.12:
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	mov	x1, x0
	ldr	x8, [x21]
Lloh20:
	adrp	x9, _TEST_CMD_P2G_CAL@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TEST_CMD_P2G_CAL@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.13:
	tbz	w1, #31, LBB0_17
; %bb.14:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1271_warning
	b	LBB0_18
LBB0_15:
	mov	x23, x0
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_noidle
	b	LBB0_25
LBB0_16:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_wl1271_warning
	b	LBB0_24
LBB0_17:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wl1271_info
LBB0_18:
	mov	x0, x22
	bl	_nla_total_size
	mov	x1, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_cfg80211_testmode_alloc_reply_skb
	cbz	x0, LBB0_21
; %bb.19:
	mov	x23, x0
	ldr	x1, [x25]
	mov	x2, x22
	mov	x3, x21
	bl	_nla_put
	cbz	x0, LBB0_23
; %bb.20:
	mov	x0, x23
	bl	_kfree_skb
Lloh29:
	adrp	x8, _EMSGSIZE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EMSGSIZE@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_22:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_24
LBB0_23:
	mov	x0, x23
	bl	_cfg80211_testmode_reply
	mov	x23, x0
LBB0_24:
	ldr	w0, [x19, #12]
	bl	_pm_runtime_mark_last_busy
	ldr	w0, [x19, #12]
	bl	_pm_runtime_put_autosuspend
LBB0_25:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_26:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_TESTMODE,4,2             ; @DEBUG_TESTMODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"testmode cmd test"

	.comm	_WL1271_TM_ATTR_DATA,8,3        ; @WL1271_TM_ATTR_DATA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WL1271_TM_ATTR_ANSWER,8,3      ; @WL1271_TM_ATTR_ANSWER
	.comm	_EMSGSIZE,4,2                   ; @EMSGSIZE
	.comm	_WLCORE_STATE_ON,8,3            ; @WLCORE_STATE_ON
l_.str.1:                               ; @.str.1
	.asciz	"testmode cmd test failed: %d"

	.comm	_TEST_CMD_P2G_CAL,8,3           ; @TEST_CMD_P2G_CAL
l_.str.2:                               ; @.str.2
	.asciz	"testmode cmd: radio status=%d"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wl1271_tm_cmd_test
.subsections_via_symbols
