	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_connectservice
_ath6kl_connectservice:                 ## @ath6kl_connectservice
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	12(%r14), %edi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_ath6kl_htc_conn_service
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ath6kl_err
	jmp	LBB0_11
LBB0_2:
	movl	(%r12), %esi
	leal	-128(%rsi), %eax
	cmpl	$4, %eax
	ja	LBB0_5
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	_WMM_AC_VO@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_ath6kl_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_WMM_AC_VI@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_WMM_AC_BK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_WMM_AC_BE@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movl	-40(%rbp), %edx
	movq	%r14, %rdi
	callq	_set_ac2_ep_map
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_WMI_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	4(%r14), %edi
	movl	-40(%rbp), %esi
	callq	_ath6kl_wmi_set_control_ep
LBB0_14:
	movl	-40(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_10
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to connect to %s service status:%d\n"

	.comm	_WMI_ENABLED,4,2                ## @WMI_ENABLED
	.comm	_WMM_AC_BE,4,2                  ## @WMM_AC_BE
	.comm	_WMM_AC_BK,4,2                  ## @WMM_AC_BK
	.comm	_WMM_AC_VI,4,2                  ## @WMM_AC_VI
	.comm	_WMM_AC_VO,4,2                  ## @WMM_AC_VO
L_.str.1:                               ## @.str.1
	.asciz	"service id is not mapped %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ath6kl_connectservice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_connectservice
_ath6kl_connectservice:                 ; @ath6kl_connectservice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x19, #12]
	add	x2, sp, #24
	mov	x1, x22
	bl	_ath6kl_htc_conn_service
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	stp	x21, x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
	b	LBB0_10
LBB0_2:
	ldr	w8, [x22]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hi	LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, lJTI0_0@PAGE
Lloh3:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
Lloh4:
	adrp	x8, _WMM_AC_VO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WMM_AC_VO@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ath6kl_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
Lloh11:
	adrp	x8, _WMM_AC_VI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WMM_AC_VI@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh13:
	adrp	x8, _WMM_AC_BK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WMM_AC_BK@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _WMM_AC_BE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WMM_AC_BE@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_set_ac2_ep_map
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_11:
Lloh17:
	adrp	x8, _WMI_ENABLED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WMI_ENABLED@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_bit
	cbz	w0, LBB0_13
; %bb.12:
	ldr	w0, [x19, #4]
	ldr	w1, [sp, #24]
	bl	_ath6kl_wmi_set_control_ep
LBB0_13:
	mov	w20, #0
	ldr	w8, [sp, #24]
	str	w8, [x19]
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to connect to %s service status:%d\n"

	.comm	_WMI_ENABLED,4,2                ; @WMI_ENABLED
	.comm	_WMM_AC_BE,4,2                  ; @WMM_AC_BE
	.comm	_WMM_AC_BK,4,2                  ; @WMM_AC_BK
	.comm	_WMM_AC_VI,4,2                  ; @WMM_AC_VI
	.comm	_WMM_AC_VO,4,2                  ; @WMM_AC_VO
l_.str.1:                               ; @.str.1
	.asciz	"service id is not mapped %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ath6kl_connectservice
.subsections_via_symbols
