	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_usb_hif_tx_sg
_ath10k_usb_hif_tx_sg:                  ## @ath10k_usb_hif_tx_sg
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_ath10k_usb_priv
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	leaq	(%r14,%r14,2), %rcx
	leaq	(%rax,%rcx,4), %r13
	leaq	4(%rax,%rcx,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_ath10k_usb_alloc_urb_from_pipe
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %r12
	movq	%r12, 8(%rbx)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_usb_alloc_urb
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	8(%r13), %edx
	movl	(%r12), %r8d
	movl	4(%r12), %ecx
	movq	_ath10k_usb_transmit_complete@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%rbx, (%rsp)
	movq	%r15, %rdi
	callq	_usb_fill_bulk_urb
	movl	(%r12), %eax
	cltd
	idivl	(%r13)
	testl	%edx, %edx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_URB_ZERO_PACKET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_usb_anchor_urb
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_usb_submit_urb
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_usb_free_urb
	incq	%r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_13
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_ATH10K_DBG_USB_BULK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_ath10k_dbg
	movq	%r15, %rdi
	callq	_usb_unanchor_urb
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r14d
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	callq	_ath10k_usb_free_urb_to_pipe
LBB0_13:
	negl	%r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ath10k_usb_transmit_complete,4,2 ## @ath10k_usb_transmit_complete
	.comm	_URB_ZERO_PACKET,4,2            ## @URB_ZERO_PACKET
	.comm	_ATH10K_DBG_USB_BULK,4,2        ## @ATH10K_DBG_USB_BULK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb bulk transmit failed: %d\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_usb_hif_tx_sg
_ath10k_usb_hif_tx_sg:                  ; @ath10k_usb_hif_tx_sg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x20, x2
	mov	x24, x1
	mov	x19, x0
	bl	_ath10k_usb_priv
	cmp	w23, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x8, [x0, #8]
	mov	w9, #12
	madd	x22, x24, x9, x8
	mov	w9, #12
	madd	x8, x24, x9, x8
	add	x27, x8, #8
	add	x24, x8, #4
	mov	w28, w23
Lloh0:
	adrp	x26, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GFP_ATOMIC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_ath10k_usb_alloc_urb_from_pipe
	cbz	x0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x23, x0
	ldr	x19, [x20]
	str	x19, [x0, #8]
	ldr	w1, [x26]
	mov	w0, #0
	bl	_usb_alloc_urb
	cbz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	w1, [x21]
	ldr	w2, [x27]
	ldp	w4, w3, [x19]
Lloh2:
	adrp	x8, _ath10k_usb_transmit_complete@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ath10k_usb_transmit_complete@GOTPAGEOFF]
Lloh4:
	ldr	w5, [x8]
	mov	x6, x23
	bl	_usb_fill_bulk_urb
	ldr	w8, [x19]
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbnz	w8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh5:
	adrp	x8, _URB_ZERO_PACKET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _URB_ZERO_PACKET@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x25]
	orr	w8, w9, w8
	str	w8, [x25]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	mov	x1, x24
	bl	_usb_anchor_urb
	ldr	w1, [x26]
	mov	x0, x25
	bl	_usb_submit_urb
	cbnz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x25
	bl	_usb_free_urb
	add	x20, x20, #8
	subs	x28, x28, #1
	b.ne	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w19, [x8]
	b	LBB0_13
LBB0_10:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	mov	x3, x0
Lloh13:
	adrp	x8, _ATH10K_DBG_USB_BULK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATH10K_DBG_USB_BULK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str@PAGE
Lloh17:
	add	x2, x2, l_.str@PAGEOFF
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_ath10k_dbg
	mov	x0, x25
	bl	_usb_unanchor_urb
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w19, [x8]
	ldr	w0, [x23]
	mov	x1, x23
	bl	_ath10k_usb_free_urb_to_pipe
LBB0_13:
	neg	w0, w19
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ath10k_usb_transmit_complete,4,2 ; @ath10k_usb_transmit_complete
	.comm	_URB_ZERO_PACKET,4,2            ; @URB_ZERO_PACKET
	.comm	_ATH10K_DBG_USB_BULK,4,2        ; @ATH10K_DBG_USB_BULK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb bulk transmit failed: %d\n"

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