	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tg3_tx_frag_set
_tg3_tx_frag_set:                       ## @tg3_tx_frag_set
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r14d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r12
	movq	_SHORT_DMA_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_tg3_flag
	testq	%rax, %rax
	setne	%al
	cmpl	$9, %ebx
	setl	%r15b
	andb	%al, %r15b
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_tg3_4g_overflow_test
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	callq	_tg3_4g_tso_overflow_test
	movq	%rax, %r13
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_tg3_40bit_overflow_test
	orq	%r13, %rax
	orq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	setne	%al
	orb	%r15b, %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r13d
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.1:
	movq	-64(%rbp), %r10                 ## 8-byte Reload
	movl	(%r10), %eax
	cmpl	%ebx, %r13d
	jge	LBB0_2
## %bb.3:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rcx)
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	je	LBB0_4
## %bb.5:
	movq	_TXD_FLAG_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%edx, %ecx
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	subl	%r13d, %ebx
	cmpl	$8, %ebx
	jg	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %ecx
	shrl	$31, %ecx
	addl	%r13d, %ecx
	sarl	%ecx
	addl	%ecx, %ebx
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	24(%rbp), %r9d
	movl	16(%rbp), %r8d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	24(%rbp), %r9d
	movl	16(%rbp), %r8d
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	cltq
	movl	$1, (%rcx,%rax,4)
	movslq	(%r10), %rdi
	shlq	$2, %rdi
	addq	(%rdx), %rdi
	movq	%r10, %rbx
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	callq	_tg3_tx_set_bd
	decl	(%r12)
	movl	(%rbx), %r15d
	movl	%r15d, %edi
	callq	_NEXT_TX
	movq	%rbx, %r10
	movl	%eax, (%rbx)
	addl	%r13d, %r14d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r13d
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%r13d, %ebx
	jle	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_7
	jmp	LBB0_11
LBB0_15:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movslq	(%r15), %rdi
	shlq	$2, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	16(%rbp), %r8d
	movl	24(%rbp), %r9d
	callq	_tg3_tx_set_bd
	movl	(%r15), %edi
	callq	_NEXT_TX
	movl	%eax, (%r15)
	jmp	LBB0_16
LBB0_2:
	movl	%eax, %r15d
LBB0_11:
	testl	%ebx, %ebx
	je	LBB0_16
LBB0_12:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	cmpl	$0, (%r13)
	je	LBB0_14
## %bb.13:
	movslq	%eax, %rdi
	shlq	$2, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %rdi
	movl	%ebx, %edx
	movq	%r10, %rbx
	movl	%r14d, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	16(%rbp), %r8d
	movl	24(%rbp), %r9d
	callq	_tg3_tx_set_bd
	decl	(%r13)
	movl	(%rbx), %edi
	callq	_NEXT_TX
	movl	%eax, (%rbx)
LBB0_16:
	movb	-41(%rbp), %al                  ## 1-byte Reload
LBB0_17:
	movzbl	%al, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movslq	%r15d, %rcx
	movl	$0, (%rax,%rcx,4)
	movb	$1, %al
	jmp	LBB0_17
LBB0_4:
	movl	%eax, %r15d
	testl	%ebx, %ebx
	jne	LBB0_12
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_SHORT_DMA_BUG,4,2              ## @SHORT_DMA_BUG
	.comm	_TXD_FLAG_END,4,2               ## @TXD_FLAG_END
	.no_dead_strip	_tg3_tx_frag_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tg3_tx_frag_set
_tg3_tx_frag_set:                       ; @tg3_tx_frag_set
	.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
	stp	w5, w7, [sp, #4]                ; 8-byte Folded Spill
	mov	x21, x6
	mov	x25, x4
	mov	x26, x3
	mov	x24, x2
	mov	x19, x1
	mov	x27, x0
	ldr	x28, [x0, #16]
Lloh0:
	adrp	x8, _SHORT_DMA_BUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SHORT_DMA_BUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_tg3_flag
	mov	x22, x0
	mov	x0, x26
	mov	x1, x25
	bl	_tg3_4g_overflow_test
	mov	x23, x0
	mov	x0, x28
	mov	x1, x26
	mov	x2, x25
	mov	x3, x21
	bl	_tg3_4g_tso_overflow_test
	mov	x20, x0
	mov	x0, x28
	mov	x1, x26
	mov	x2, x25
	bl	_tg3_40bit_overflow_test
	cmp	w25, #9
	ccmp	x22, #0, #4, lt
	orr	x8, x0, x20
	orr	x8, x8, x23
	ccmp	x8, #0, #0, eq
	cset	w20, ne
	ldr	w8, [x28]
	cbz	w8, LBB0_7
; %bb.1:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	ldr	w21, [sp, #8]                   ; 4-byte Folded Reload
	ldr	w0, [x19]
	cmp	w8, w25
	str	w20, [sp]                       ; 4-byte Folded Spill
	b.ge	LBB0_8
; %bb.2:
	ldr	w9, [x24]
	mov	x5, x21
	ldr	w10, [sp, #4]                   ; 4-byte Folded Reload
	cbz	w9, LBB0_10
; %bb.3:
Lloh3:
	adrp	x9, _TXD_FLAG_END@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TXD_FLAG_END@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	bic	w22, w10, w9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #0
	cinc	w9, w8, lt
	asr	w9, w9, #1
	sub	w10, w25, w8
	add	w11, w10, w9
	cmp	w10, #8
	csel	w25, w10, w11, gt
	csel	w20, w8, w9, gt
	ldp	x9, x8, [x27]
	mov	w10, #1
	str	w10, [x8, w0, sxtw #2]
	ldrsw	x8, [x19]
	add	x0, x9, x8, lsl #2
	mov	x1, x26
	mov	x2, x20
	mov	x3, x22
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	bl	_tg3_tx_set_bd
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
	ldr	w23, [x19]
	mov	x0, x23
	bl	_NEXT_TX
	str	w0, [x19]
	add	w26, w20, w26
	ldr	w8, [x28]
	cmp	w25, w8
	b.le	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
	mov	x5, x21
	cbnz	w9, LBB0_4
; %bb.6:
	cbnz	w25, LBB0_11
	b	LBB0_13
LBB0_7:
	ldr	x8, [x27]
	ldrsw	x9, [x19]
	add	x0, x8, x9, lsl #2
	mov	x1, x26
	mov	x2, x25
	ldp	w3, w5, [sp, #4]                ; 8-byte Folded Reload
	mov	x4, x21
	bl	_tg3_tx_set_bd
	ldr	w0, [x19]
	bl	_NEXT_TX
	str	w0, [x19]
	b	LBB0_15
LBB0_8:
	mov	x23, x0
LBB0_9:
	mov	x5, x21
	cbnz	w25, LBB0_11
	b	LBB0_13
LBB0_10:
	mov	x23, x0
	cbz	w25, LBB0_13
LBB0_11:
	ldr	w8, [x24]
	cbz	w8, LBB0_14
; %bb.12:
	ldr	x8, [x27]
	add	x0, x8, w0, sxtw #2
	mov	x1, x26
	mov	x2, x25
	ldr	w3, [sp, #4]                    ; 4-byte Folded Reload
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	bl	_tg3_tx_set_bd
	ldr	w8, [x24]
	sub	w8, w8, #1
	str	w8, [x24]
	ldr	w0, [x19]
	bl	_NEXT_TX
	str	w0, [x19]
LBB0_13:
	ldr	w20, [sp]                       ; 4-byte Folded Reload
	b	LBB0_15
LBB0_14:
	ldr	x8, [x27, #8]
	str	wzr, [x8, w23, sxtw #2]
	mov	w20, #1
LBB0_15:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SHORT_DMA_BUG,4,2              ; @SHORT_DMA_BUG
	.comm	_TXD_FLAG_END,4,2               ; @TXD_FLAG_END
	.no_dead_strip	_tg3_tx_frag_set
.subsections_via_symbols
