	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_connect_cmd         ## -- Begin function ath6kl_wmi_connect_cmd
	.p2align	4, 0x90
_ath6kl_wmi_connect_cmd:                ## @ath6kl_wmi_connect_cmd
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %ebx
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	movl	%r8d, %r10d
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r11d
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movq	%rdi, %r12
	movq	80(%rbp), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	72(%rbp), %r8d
	movl	64(%rbp), %ecx
	movq	56(%rbp), %rdx
	movq	48(%rbp), %r13
	movl	40(%rbp), %r14d
	movq	32(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %r15d
	movq	16(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %r9d
	pushq	%r15
	pushq	%rbx
	movq	%r10, -96(%rbp)                 ## 8-byte Spill
	pushq	%r10
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	pushq	%rax
	movq	%r11, -88(%rbp)                 ## 8-byte Spill
	pushq	%r11
	callq	_ath6kl_dbg
	addq	$48, %rsp
	movq	_ATH6KL_DBG_WMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	xorl	%esi, %esi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rcx
	movl	%r14d, %r8d
	callq	_ath6kl_dbg_dump
	movq	%r12, -120(%rbp)                ## 8-byte Spill
	movl	$100, (%r12)
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	movq	_NONE_CRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%ebx, %eax
	jne	LBB0_4
## %bb.1:
	cmpl	%r15d, %eax
	jne	LBB0_2
LBB0_4:
	cmpl	%ebx, %eax
	je	LBB0_6
## %bb.5:
	cmpl	%r15d, %eax
	jne	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$72, %edi
	callq	_ath6kl_wmi_get_new_buf
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	(%rax), %r13
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movl	64(%r13), %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
LBB0_10:
	movl	%r14d, (%r13)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 4(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 8(%r13)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 12(%r13)
	movl	%ebx, 16(%r13)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%r13)
	movl	%r15d, 20(%r13)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 48(%r13)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, 44(%r13)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le32
	movl	%eax, 40(%r13)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 32(%r13)
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:
	movl	24(%r13), %edi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
LBB0_12:
	movq	_WMI_CONNECT_CMDID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NO_SYNC_WMIFLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	%r12, %rdx
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_wmi_cmd_send            ## TAILCALL
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_DBG_WMI,4,2             ## @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wmi connect bssid %pM freq %d flags 0x%x ssid_len %d type %d dot11_auth %d auth %d pairwise %d group %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"ssid "

	.comm	_NONE_CRYPT,4,2                 ## @NONE_CRYPT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WMI_CONNECT_CMDID,4,2          ## @WMI_CONNECT_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ## @NO_SYNC_WMIFLAG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath6kl_wmi_connect_cmd         ; -- Begin function ath6kl_wmi_connect_cmd
	.p2align	2
_ath6kl_wmi_connect_cmd:                ; @ath6kl_wmi_connect_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x25, x7
	str	x6, [sp, #48]                   ; 8-byte Folded Spill
	mov	x23, x5
	mov	x7, x3
	mov	x22, x2
	str	x1, [sp, #64]                   ; 8-byte Folded Spill
	mov	x26, x0
	ldr	x8, [x29, #56]
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldp	w28, w19, [x29, #48]
	ldp	x20, x27, [x29, #32]
	ldr	w24, [x29, #24]
	ldr	x8, [x29, #16]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x21, _ATH6KL_DBG_WMI@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ATH6KL_DBG_WMI@GOTPAGEOFF]
	ldr	w0, [x21]
	stp	w5, w25, [sp, #4]
	stp	w7, w4, [sp, #72]               ; 8-byte Folded Spill
	str	w4, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x27
	mov	x3, x28
	mov	x4, x19
	mov	x5, x24
	mov	x6, x22
	bl	_ath6kl_dbg
	ldr	w0, [x21]
	mov	x21, x23
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, #0
	mov	x3, x20
	mov	x4, x24
	bl	_ath6kl_dbg_dump
	mov	w8, #100
	str	w8, [x26]
Lloh6:
	adrp	x8, _NONE_CRYPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NONE_CRYPT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w23
	ccmp	w8, w25, #4, eq
	b.ne	LBB0_8
; %bb.1:
	mov	x23, x20
	stp	w28, w19, [sp, #32]             ; 8-byte Folded Spill
	ldp	w20, w28, [sp, #72]             ; 8-byte Folded Reload
	cmp	w8, w21
	ccmp	w8, w25, #0, ne
	b.eq	LBB0_8
; %bb.2:
	mov	w0, #72
	bl	_ath6kl_wmi_get_new_buf
	cbz	x0, LBB0_10
; %bb.3:
	mov	x19, x21
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x21, [x0]
	cbz	w24, LBB0_5
; %bb.4:
	ldr	w0, [x21, #64]
	mov	x1, x23
	mov	x2, x24
	bl	_memcpy
LBB0_5:
	stp	w24, w22, [x21]
	stp	w20, w28, [x21, #8]
	stp	w19, w25, [x21, #16]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x8, x9, [x21, #48]
	ldr	w0, [sp, #32]                   ; 4-byte Folded Reload
	bl	_cpu_to_le16
	str	w0, [x21, #44]
	ldr	w0, [sp, #36]                   ; 4-byte Folded Reload
	bl	_cpu_to_le32
	str	w0, [x21, #40]
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	str	x8, [x21, #32]
	cbz	x27, LBB0_7
; %bb.6:
	ldr	w0, [x21, #24]
Lloh9:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x27
	bl	_memcpy
LBB0_7:
Lloh12:
	adrp	x8, _WMI_CONNECT_CMDID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WMI_CONNECT_CMDID@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _NO_SYNC_WMIFLAG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NO_SYNC_WMIFLAG@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	x0, x26
	ldr	x1, [sp, #64]                   ; 8-byte Folded Reload
	ldr	x2, [sp, #24]                   ; 8-byte Folded Reload
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_ath6kl_wmi_cmd_send
LBB0_8:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_10:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_DBG_WMI,4,2             ; @ATH6KL_DBG_WMI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wmi connect bssid %pM freq %d flags 0x%x ssid_len %d type %d dot11_auth %d auth %d pairwise %d group %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"ssid "

	.comm	_NONE_CRYPT,4,2                 ; @NONE_CRYPT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WMI_CONNECT_CMDID,4,2          ; @WMI_CONNECT_CMDID
	.comm	_NO_SYNC_WMIFLAG,4,2            ; @NO_SYNC_WMIFLAG
.subsections_via_symbols
