	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aqc111_tx_fixup
_aqc111_tx_fixup:                       ## @aqc111_tx_fixup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movslq	(%rdi), %r13
	movq	$0, -64(%rbp)
	movq	_AQ_TX_DESC_LEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	andl	(%rsi), %r15d
	movq	%rsi, %rdi
	callq	_skb_shinfo
	movq	_AQ_TX_DESC_MSS_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	(%rax), %ebx
	movq	_AQ_TX_DESC_MSS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movslq	(%r14), %rax
	leal	4(%rax), %ecx
	andl	$7, %ecx
	movl	$8, %r12d
	subl	%ecx, %r12d
	testl	%ecx, %ecx
	cmovel	%ecx, %r12d
	addq	%r12, %rax
	addq	$4, %rax
	movq	%rax, %rcx
	orq	%r13, %rcx
	shrq	$32, %rcx
	je	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	divq	%r13
	jmp	LBB0_3
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	orl	%r15d, %ebx
	xorl	%eax, %eax
	testq	%rdx, %rdx
	jne	LBB0_5
## %bb.4:
	addl	$8, %r12d
	movq	_AQ_TX_DESC_DROP_PADD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	orl	%eax, %ebx
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_vlan_get_tag
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	movq	_AQ_TX_DESC_VLAN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_AQ_TX_DESC_VLAN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-64(%rbp), %eax
	movq	_AQ_TX_DESC_VLAN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %ebx
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	je	LBB0_15
LBB0_8:
	movq	%r14, %rdi
	callq	_skb_headroom
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_skb_tailroom
	cmpl	$4, %r13d
	jb	LBB0_10
## %bb.9:
	cmpl	%r12d, %eax
	jge	LBB0_11
LBB0_10:
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%r12d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_skb_copy_expand
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_dev_kfree_skb_any
	movq	%r15, %r14
	testq	%r15, %r15
	je	LBB0_18
LBB0_11:
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_skb_put_zero
LBB0_13:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_skb_push
	movq	%rax, %r15
	movl	%ebx, %edi
	callq	_cpu_to_le64
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_usbnet_set_skb_tx_stats
	jmp	LBB0_14
LBB0_15:
	movq	8(%rax), %rax
	movq	_NETIF_F_SG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_8
## %bb.16:
	movq	%r14, %rdi
	callq	_skb_linearize
	testq	%rax, %rax
	je	LBB0_8
LBB0_18:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AQ_TX_DESC_LEN_MASK,4,2        ## @AQ_TX_DESC_LEN_MASK
	.comm	_AQ_TX_DESC_MSS_MASK,4,2        ## @AQ_TX_DESC_MSS_MASK
	.comm	_AQ_TX_DESC_MSS_SHIFT,4,2       ## @AQ_TX_DESC_MSS_SHIFT
	.comm	_AQ_TX_DESC_DROP_PADD,4,2       ## @AQ_TX_DESC_DROP_PADD
	.comm	_AQ_TX_DESC_VLAN,4,2            ## @AQ_TX_DESC_VLAN
	.comm	_AQ_TX_DESC_VLAN_MASK,4,2       ## @AQ_TX_DESC_VLAN_MASK
	.comm	_AQ_TX_DESC_VLAN_SHIFT,4,2      ## @AQ_TX_DESC_VLAN_SHIFT
	.comm	_NETIF_F_SG,4,2                 ## @NETIF_F_SG
	.no_dead_strip	_aqc111_tx_fixup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aqc111_tx_fixup
_aqc111_tx_fixup:                       ; @aqc111_tx_fixup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	ldrsw	x21, [x0]
	str	xzr, [sp, #8]
	ldr	w22, [x1]
Lloh0:
	adrp	x8, _AQ_TX_DESC_LEN_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AQ_TX_DESC_LEN_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x1
	bl	_skb_shinfo
	ldrsw	x8, [x19]
	add	w9, w8, #4
	ands	w10, w9, #0x7
	mov	w11, #8
	sub	w10, w11, w10
	tst	w9, #0x7
	and	w9, w24, w22
	ldr	w11, [x0]
Lloh3:
	adrp	x12, _AQ_TX_DESC_MSS_MASK@GOTPAGE
Lloh4:
	ldr	x12, [x12, _AQ_TX_DESC_MSS_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	and	w11, w12, w11
Lloh6:
	adrp	x12, _AQ_TX_DESC_MSS_SHIFT@GOTPAGE
Lloh7:
	ldr	x12, [x12, _AQ_TX_DESC_MSS_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	lsl	w11, w11, w12
	orr	w9, w11, w9
	csel	w10, wzr, w10, eq
	add	x8, x8, x10
	add	x8, x8, #4
	udiv	x11, x8, x21
	msub	x8, x11, x21, x8
Lloh9:
	adrp	x11, _AQ_TX_DESC_DROP_PADD@GOTPAGE
Lloh10:
	ldr	x11, [x11, _AQ_TX_DESC_DROP_PADD@GOTPAGEOFF]
	add	w12, w10, #8
Lloh11:
	ldr	w11, [x11]
	cmp	x8, #0
	csel	w21, w12, w10, eq
	csel	w8, w11, wzr, eq
	orr	w22, w9, w8
	add	x1, sp, #8
	mov	x0, x19
	bl	_vlan_get_tag
	tbnz	x0, #63, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _AQ_TX_DESC_VLAN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AQ_TX_DESC_VLAN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w8, w8, w22
	ldr	w9, [sp, #8]
Lloh15:
	adrp	x10, _AQ_TX_DESC_VLAN_MASK@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AQ_TX_DESC_VLAN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh18:
	adrp	x10, _AQ_TX_DESC_VLAN_SHIFT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _AQ_TX_DESC_VLAN_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w22, w8, w9
LBB0_2:
	ldr	w8, [x23, #16]
	cbz	w8, LBB0_10
LBB0_3:
	mov	x0, x19
	bl	_skb_headroom
	mov	x23, x0
	mov	x0, x19
	bl	_skb_tailroom
	cmp	w23, #4
	b.lo	LBB0_5
; %bb.4:
	cmp	w0, w21
	b.ge	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	w1, #4
	mov	x2, x21
	mov	x3, x20
	bl	_skb_copy_expand
	mov	x20, x0
	mov	x0, x19
	bl	_dev_kfree_skb_any
	mov	x19, x20
	cbz	x20, LBB0_9
LBB0_6:
	cbz	w21, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x21
	bl	_skb_put_zero
LBB0_8:
	mov	x0, x19
	mov	w1, #4
	bl	_skb_push
	mov	x20, x0
	mov	x0, x22
	bl	_cpu_to_le64
	str	w0, [x20]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_usbnet_set_skb_tx_stats
LBB0_9:
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _NETIF_F_SG@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NETIF_F_SG@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.11:
	mov	x0, x19
	bl	_skb_linearize
	cbz	x0, LBB0_3
; %bb.12:
	mov	x19, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AQ_TX_DESC_LEN_MASK,4,2        ; @AQ_TX_DESC_LEN_MASK
	.comm	_AQ_TX_DESC_MSS_MASK,4,2        ; @AQ_TX_DESC_MSS_MASK
	.comm	_AQ_TX_DESC_MSS_SHIFT,4,2       ; @AQ_TX_DESC_MSS_SHIFT
	.comm	_AQ_TX_DESC_DROP_PADD,4,2       ; @AQ_TX_DESC_DROP_PADD
	.comm	_AQ_TX_DESC_VLAN,4,2            ; @AQ_TX_DESC_VLAN
	.comm	_AQ_TX_DESC_VLAN_MASK,4,2       ; @AQ_TX_DESC_VLAN_MASK
	.comm	_AQ_TX_DESC_VLAN_SHIFT,4,2      ; @AQ_TX_DESC_VLAN_SHIFT
	.comm	_NETIF_F_SG,4,2                 ; @NETIF_F_SG
	.no_dead_strip	_aqc111_tx_fixup
.subsections_via_symbols
