	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htc_send                ## -- Begin function ath10k_htc_send
	.p2align	4, 0x90
_ath10k_htc_send:                       ## @ath10k_htc_send
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	(%rdi), %r15
	movq	16(%rdi), %r12
	movq	%rdx, %rdi
	callq	_ATH10K_SKB_CB
	movq	(%r13), %rsi
	movq	(%rsi), %rcx
	movq	_ATH10K_STATE_WEDGED@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.1:
	movq	_ECOMM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_ATH10K_HTC_EP_COUNT@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jbe	LBB0_4
## %bb.5:
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movl	%ebx, %r14d
	shlq	$5, %r14
	leaq	(%r12,%r14), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movl	$4, %esi
	callq	_skb_push
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%r12,%r14)
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.7:
	movq	%r12, -112(%rbp)                ## 8-byte Spill
	movl	(%rbx), %edi
	movl	12(%r13), %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %r14d
	leaq	8(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	movl	%r14d, %r8d
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %r9d
	movl	%r9d, %eax
	subl	%r8d, %eax
	jge	LBB0_9
## %bb.8:
	movq	_ATH10K_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_ath10k_dbg
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_21
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_ath10k_warn
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_22
LBB0_6:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_9:
	movl	%eax, (%r14)
	movq	_ATH10K_DBG_HTC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %r9d
	callq	_ath10k_dbg
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	movq	-112(%rbp), %r12                ## 8-byte Reload
LBB0_10:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ath10k_htc_prepare_tx_skb
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rdx)
	movq	8(%r15), %rax
	movq	_ATH10K_DEV_TYPE_HL@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	movl	%ecx, %r15d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.11:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_dma_map_single
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movq	%r14, %rdi
	movq	_ATH10K_DEV_TYPE_HL@GOTPCREL(%rip), %r14
	movl	%eax, %esi
	callq	_dma_mapping_error
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movq	%r12, %rbx
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_17
LBB0_13:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	28(%r12,%rcx), %eax
	movl	%eax, -120(%rbp)
	movq	%rbx, -128(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -136(%rbp)
	movl	4(%rdx), %eax
	movl	%eax, -140(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -144(%rbp)
	movq	(%r13), %rdi
	movq	%r12, %rbx
	movl	24(%r12,%rcx), %esi
	leaq	-144(%rbp), %rdx
	movl	$1, %ecx
	callq	_ath10k_hif_tx_sg
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %r12d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	cmpq	(%r14), %rax
	je	LBB0_17
## %bb.16:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_dma_unmap_single
LBB0_17:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rbx,%rcx), %rax
	addq	$16, %rax
	cmpq	$0, (%rax)
	je	LBB0_20
## %bb.18:
	leaq	8(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r9d
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	addl	%r8d, %r9d
	movl	%r9d, (%rax)
	movq	_ATH10K_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %ecx
	callq	_ath10k_dbg
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rbx,%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	movq	(%r13), %rdi
	callq	*%rcx
LBB0_20:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_21:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_skb_pull
LBB0_22:
	movl	%r12d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%r12d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_STATE_WEDGED,8,3        ## @ATH10K_STATE_WEDGED
	.comm	_ECOMM,4,2                      ## @ECOMM
	.comm	_ATH10K_HTC_EP_COUNT,4,2        ## @ATH10K_HTC_EP_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid endpoint id: %d\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ATH10K_DBG_HTC,4,2             ## @ATH10K_DBG_HTC
L_.str.1:                               ## @.str.1
	.asciz	"htc insufficient credits ep %d required %d available %d\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"htc ep %d consumed %d credits (total %d)\n"

	.comm	_ATH10K_DEV_TYPE_HL,8,3         ## @ATH10K_DEV_TYPE_HL
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_EIO,4,2                        ## @EIO
L_.str.3:                               ## @.str.3
	.asciz	"htc ep %d reverted %d credits back (total %d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath10k_htc_send                ; -- Begin function ath10k_htc_send
	.p2align	2
_ath10k_htc_send:                       ; @ath10k_htc_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	ldr	x28, [x0, #16]
	mov	x0, x2
	bl	_ATH10K_SKB_CB
	ldr	x8, [x21]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _ATH10K_STATE_WEDGED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATH10K_STATE_WEDGED@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ECOMM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ECOMM@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
Lloh5:
	adrp	x9, _ATH10K_HTC_EP_COUNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATH10K_HTC_EP_COUNT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w9, w20
	b.ls	LBB0_6
; %bb.3:
	mov	x25, x0
	mov	w23, w20
	add	x26, x28, x23, lsl #5
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x19
	mov	w1, #4
	bl	_skb_push
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
	add	x24, x28, x23, lsl #5
	ldr	x8, [x24, #16]!
	cbz	x8, LBB0_8
; %bb.4:
	ldr	w0, [x19]
	ldr	w1, [x21, #12]
	bl	_DIV_ROUND_UP
	mov	x23, x0
	add	x27, x21, #8
	mov	x0, x27
	bl	_spin_lock_bh
	ldr	w5, [x26]
	subs	w8, w5, w23
	b.ge	LBB0_9
; %bb.5:
Lloh8:
	adrp	x8, _ATH10K_DBG_HTC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATH10K_DBG_HTC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x3, x20
	mov	x4, x23
	bl	_ath10k_dbg
	mov	x0, x27
	bl	_spin_unlock_bh
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_19
LBB0_6:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x20
	bl	_ath10k_warn
Lloh18:
	adrp	x8, _ENOENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_20
LBB0_8:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	b	LBB0_10
LBB0_9:
	str	w8, [x26]
Lloh20:
	adrp	x9, _ATH10K_DBG_HTC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ATH10K_DBG_HTC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x9]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x3, x20
	str	w23, [sp, #12]                  ; 4-byte Folded Spill
	mov	x4, x23
	mov	x5, x8
	bl	_ath10k_dbg
	mov	x0, x27
	bl	_spin_unlock_bh
LBB0_10:
	mov	x23, x26
	mov	x0, x26
	mov	x1, x19
	bl	_ath10k_htc_prepare_tx_skb
	str	w20, [x25]
	ldr	x8, [x22, #8]
Lloh25:
	adrp	x9, _ATH10K_DEV_TYPE_HL@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ATH10K_DEV_TYPE_HL@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:
	ldp	w2, w1, [x19]
Lloh28:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	ldr	x26, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x26
	bl	_dma_map_single
	mov	x1, x0
	str	w0, [x25, #4]
	mov	x0, x26
	bl	_dma_mapping_error
	cbz	w0, LBB0_13
; %bb.12:
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w27, w8
	ldr	x26, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_16
LBB0_13:
	ldr	x26, [sp, #24]                  ; 8-byte Folded Reload
	add	x8, x28, x26, lsl #5
	ldr	w9, [x8, #28]
	str	w9, [sp, #56]
	str	x19, [sp, #48]
	ldp	w10, w9, [x19]
	str	w9, [sp, #40]
	ldr	w9, [x25, #4]
	stp	w10, w9, [sp, #32]
	ldr	x0, [x21]
	ldr	w1, [x8, #24]
	add	x2, sp, #32
	mov	w3, #1
	bl	_ath10k_hif_tx_sg
	mov	x27, x0
	cbz	w0, LBB0_20
; %bb.14:
	ldr	x8, [x22, #8]
Lloh34:
	adrp	x9, _ATH10K_DEV_TYPE_HL@GOTPAGE
Lloh35:
	ldr	x9, [x9, _ATH10K_DEV_TYPE_HL@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.15:
	ldr	w1, [x25, #4]
	ldr	w2, [x19]
Lloh37:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_dma_unmap_single
LBB0_16:
	ldr	x8, [x24]
	cbz	x8, LBB0_19
; %bb.17:
	add	x25, x21, #8
	mov	x0, x25
	bl	_spin_lock_bh
	ldr	w8, [x23]
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	add	w5, w8, w4
	str	w5, [x23]
Lloh40:
	adrp	x8, _ATH10K_DBG_HTC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ATH10K_DBG_HTC@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
Lloh43:
	adrp	x2, l_.str.3@PAGE
Lloh44:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x3, x20
	bl	_ath10k_dbg
	mov	x0, x25
	bl	_spin_unlock_bh
	add	x8, x28, x26, lsl #5
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_19
; %bb.18:
	ldr	x0, [x21]
	blr	x8
LBB0_19:
	mov	x0, x19
	mov	w1, #4
	bl	_skb_pull
LBB0_20:
	mov	x0, x27
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_STATE_WEDGED,8,3        ; @ATH10K_STATE_WEDGED
	.comm	_ECOMM,4,2                      ; @ECOMM
	.comm	_ATH10K_HTC_EP_COUNT,4,2        ; @ATH10K_HTC_EP_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid endpoint id: %d\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ATH10K_DBG_HTC,4,2             ; @ATH10K_DBG_HTC
l_.str.1:                               ; @.str.1
	.asciz	"htc insufficient credits ep %d required %d available %d\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"htc ep %d consumed %d credits (total %d)\n"

	.comm	_ATH10K_DEV_TYPE_HL,8,3         ; @ATH10K_DEV_TYPE_HL
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_EIO,4,2                        ; @EIO
l_.str.3:                               ; @.str.3
	.asciz	"htc ep %d reverted %d credits back (total %d)\n"

.subsections_via_symbols
