	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_init_htc_services
_ath9k_init_htc_services:               ## @ath9k_init_htc_services
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	movl	52(%r15), %esi
	leaq	48(%r15), %rdx
	callq	_ath9k_wmi_connect
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	_WMI_BEACON_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ath9k_htc_beaconep@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	44(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	_WMI_CAB_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ath9k_htc_txep@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	40(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	_WMI_UAPSD_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	36(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	_WMI_MGMT_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	32(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_WMI_DATA_BE_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	28(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	_WMI_DATA_BK_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	24(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	_WMI_DATA_VI_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	20(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_WMI_DATA_VO_SVC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	16(%r15), %rcx
	movq	%r15, %rdi
	callq	_ath9k_htc_connect_svc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movl	%r14d, %edi
	callq	_IS_AR7010_DEVICE
	testq	%rax, %rax
	movq	8(%r15), %rdi
	movl	$33, %eax
	movl	$45, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, (%rdi)
	callq	_htc_init
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%r15), %edi
	movq	8(%r15), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_WMI_BEACON_SVC,4,2             ## @WMI_BEACON_SVC
	.comm	_ath9k_htc_beaconep,4,2         ## @ath9k_htc_beaconep
	.comm	_WMI_CAB_SVC,4,2                ## @WMI_CAB_SVC
	.comm	_ath9k_htc_txep,4,2             ## @ath9k_htc_txep
	.comm	_WMI_UAPSD_SVC,4,2              ## @WMI_UAPSD_SVC
	.comm	_WMI_MGMT_SVC,4,2               ## @WMI_MGMT_SVC
	.comm	_WMI_DATA_BE_SVC,4,2            ## @WMI_DATA_BE_SVC
	.comm	_WMI_DATA_BK_SVC,4,2            ## @WMI_DATA_BK_SVC
	.comm	_WMI_DATA_VI_SVC,4,2            ## @WMI_DATA_VI_SVC
	.comm	_WMI_DATA_VO_SVC,4,2            ## @WMI_DATA_VO_SVC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ath9k_htc: HTC initialized with %d credits\n"

L_.str.1:                               ## @.str.1
	.asciz	"ath9k_htc: Unable to initialize HTC services\n"

	.no_dead_strip	_ath9k_init_htc_services
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_init_htc_services
_ath9k_init_htc_services:               ; @ath9k_init_htc_services
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x19, x0
	ldr	x0, [x0, #8]
	ldr	w1, [x19, #52]
	add	x2, x19, #48
	bl	_ath9k_wmi_connect
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _WMI_BEACON_SVC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WMI_BEACON_SVC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ath9k_htc_beaconep@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ath9k_htc_beaconep@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x3, x19, #44
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.2:
Lloh6:
	adrp	x8, _WMI_CAB_SVC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI_CAB_SVC@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x22, _ath9k_htc_txep@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ath9k_htc_txep@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x3, x19, #40
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.3:
Lloh11:
	adrp	x8, _WMI_UAPSD_SVC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WMI_UAPSD_SVC@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #36
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.4:
Lloh14:
	adrp	x8, _WMI_MGMT_SVC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WMI_MGMT_SVC@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #32
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.5:
Lloh17:
	adrp	x8, _WMI_DATA_BE_SVC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WMI_DATA_BE_SVC@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #28
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.6:
Lloh20:
	adrp	x8, _WMI_DATA_BK_SVC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WMI_DATA_BK_SVC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #24
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.7:
Lloh23:
	adrp	x8, _WMI_DATA_VI_SVC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WMI_DATA_VI_SVC@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #20
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.8:
Lloh26:
	adrp	x8, _WMI_DATA_VO_SVC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WMI_DATA_VO_SVC@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, x19, #16
	mov	x0, x19
	bl	_ath9k_htc_connect_svc
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_IS_AR7010_DEVICE
	ldr	x8, [x19, #8]
	cmp	x0, #0
	mov	w9, #45
	mov	w10, #33
	csel	w9, w10, w9, eq
	str	w9, [x8]
	mov	x0, x8
	bl	_htc_init
	mov	x21, x0
	cbz	w0, LBB0_12
LBB0_10:
	ldr	w0, [x19]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w0, [x19]
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_WMI_BEACON_SVC,4,2             ; @WMI_BEACON_SVC
	.comm	_ath9k_htc_beaconep,4,2         ; @ath9k_htc_beaconep
	.comm	_WMI_CAB_SVC,4,2                ; @WMI_CAB_SVC
	.comm	_ath9k_htc_txep,4,2             ; @ath9k_htc_txep
	.comm	_WMI_UAPSD_SVC,4,2              ; @WMI_UAPSD_SVC
	.comm	_WMI_MGMT_SVC,4,2               ; @WMI_MGMT_SVC
	.comm	_WMI_DATA_BE_SVC,4,2            ; @WMI_DATA_BE_SVC
	.comm	_WMI_DATA_BK_SVC,4,2            ; @WMI_DATA_BK_SVC
	.comm	_WMI_DATA_VI_SVC,4,2            ; @WMI_DATA_VI_SVC
	.comm	_WMI_DATA_VO_SVC,4,2            ; @WMI_DATA_VO_SVC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ath9k_htc: HTC initialized with %d credits\n"

l_.str.1:                               ; @.str.1
	.asciz	"ath9k_htc: Unable to initialize HTC services\n"

	.no_dead_strip	_ath9k_init_htc_services
.subsections_via_symbols
