	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hif_usb_send_tx
_hif_usb_send_tx:                       ## @hif_usb_send_tx
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_HIF_USB_TX_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movl	4(%r12), %r13d
	movq	_MAX_TX_BUF_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	cmpl	%ebx, %r13d
	jle	LBB0_5
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	callq	_HTC_SKB_CB
	movq	%rax, %r13
	movq	(%rax), %rax
	movq	_ATH9K_HTC_MGMT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:
	xorl	%ebx, %ebx
	movq	_ATH9K_HTC_BEACON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_hif_usb_send_mgmt
	movl	%eax, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r13), %rax
	movq	_ATH9K_HTC_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_ATH9K_HTC_AMPDU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_10:
	leaq	20(%r12), %rdi
	movq	%r15, %rsi
	callq	___skb_queue_tail
	incl	4(%r12)
LBB0_11:
	movq	8(%r12), %rax
	movq	_MAX_TX_URB_NUM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.12:
	cmpl	$1, 4(%r12)
	jg	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	___hif_usb_tx
LBB0_14:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_HIF_USB_TX_STOP,4,2            ## @HIF_USB_TX_STOP
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MAX_TX_BUF_NUM,4,2             ## @MAX_TX_BUF_NUM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ATH9K_HTC_MGMT,8,3             ## @ATH9K_HTC_MGMT
	.comm	_ATH9K_HTC_BEACON,8,3           ## @ATH9K_HTC_BEACON
	.comm	_ATH9K_HTC_NORMAL,8,3           ## @ATH9K_HTC_NORMAL
	.comm	_ATH9K_HTC_AMPDU,8,3            ## @ATH9K_HTC_AMPDU
	.comm	_MAX_TX_URB_NUM,8,3             ## @MAX_TX_URB_NUM
	.no_dead_strip	_hif_usb_send_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hif_usb_send_tx
_hif_usb_send_tx:                       ; @hif_usb_send_tx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _HIF_USB_TX_STOP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HIF_USB_TX_STOP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	w22, [x20, #4]
Lloh5:
	adrp	x8, _MAX_TX_BUF_NUM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_TX_BUF_NUM@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cmp	w22, w23
	b.le	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x21
	bl	_HTC_SKB_CB
	mov	x23, x0
	ldr	x8, [x0]
Lloh10:
	adrp	x9, _ATH9K_HTC_MGMT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATH9K_HTC_MGMT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _ATH9K_HTC_BEACON@GOTPAGE
Lloh14:
	ldr	x10, [x10, _ATH9K_HTC_BEACON@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	bl	_hif_usb_send_mgmt
	mov	x22, x0
	b	LBB0_9
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x23]
Lloh16:
	adrp	x9, _ATH9K_HTC_NORMAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATH9K_HTC_NORMAL@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
Lloh19:
	adrp	x10, _ATH9K_HTC_AMPDU@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ATH9K_HTC_AMPDU@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_11
; %bb.10:
	add	x0, x20, #20
	mov	x1, x21
	bl	___skb_queue_tail
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_11:
	ldr	x8, [x20, #8]
Lloh22:
	adrp	x9, _MAX_TX_URB_NUM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAX_TX_URB_NUM@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.gt	LBB0_14
; %bb.13:
	mov	x0, x20
	bl	___hif_usb_tx
LBB0_14:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_HIF_USB_TX_STOP,4,2            ; @HIF_USB_TX_STOP
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MAX_TX_BUF_NUM,4,2             ; @MAX_TX_BUF_NUM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ATH9K_HTC_MGMT,8,3             ; @ATH9K_HTC_MGMT
	.comm	_ATH9K_HTC_BEACON,8,3           ; @ATH9K_HTC_BEACON
	.comm	_ATH9K_HTC_NORMAL,8,3           ; @ATH9K_HTC_NORMAL
	.comm	_ATH9K_HTC_AMPDU,8,3            ; @ATH9K_HTC_AMPDU
	.comm	_MAX_TX_URB_NUM,8,3             ; @MAX_TX_URB_NUM
	.no_dead_strip	_hif_usb_send_tx
.subsections_via_symbols
