	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmmac_tso_allocator
_stmmac_tso_allocator:                  ## @stmmac_tso_allocator
	.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	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	leaq	(%r8,%r8,2), %rcx
	leaq	(%rax,%rcx,8), %r14
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_stmmac_set_desc_addr
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	movq	_TSO_MAX_BUFF_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	cmpl	%ecx, %r12d
	cmovll	%r12d, %ecx
	movslq	%ecx, %rcx
	setle	%dl
	andb	%al, %dl
	movzbl	%dl, %eax
	subq	$8, %rsp
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_stmmac_prepare_tso_tx_desc
	addq	$32, %rsp
	subl	(%r15), %r12d
	jle	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	_DMA_TX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_STMMAC_GET_ENTRY
	movq	%rax, (%r14)
	movq	16(%r14), %rcx
	movl	(%rcx,%rax,4), %edi
	callq	_WARN_ON
	movq	(%r14), %rbx
	shlq	$2, %rbx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	subl	%r12d, %eax
	movslq	%eax, %rdx
	addq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	addq	8(%r14), %rbx
	cmpl	$32, (%r13)
	jg	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdx, %rdi
	callq	_cpu_to_le32
	movl	%eax, (%rbx)
	jmp	LBB0_5
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TX_SIZE,4,2                ## @DMA_TX_SIZE
	.comm	_TSO_MAX_BUFF_SIZE,4,2          ## @TSO_MAX_BUFF_SIZE
	.no_dead_strip	_stmmac_tso_allocator
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stmmac_tso_allocator
_stmmac_tso_allocator:                  ; @stmmac_tso_allocator
	.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
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x27, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	mov	w9, #24
	madd	x24, x4, x9, x8
	add	x25, x24, #16
	add	x26, x24, #8
Lloh0:
	adrp	x28, _TSO_MAX_BUFF_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _TSO_MAX_BUFF_SIZE@GOTPAGEOFF]
	mov	x20, x2
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_stmmac_set_desc_addr
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, #0
	cset	w8, ne
	ldr	w9, [x28]
	cmp	w20, w9
	csel	w9, w20, w9, lt
	sxtw	x3, w9
	cset	w9, le
	and	w6, w8, w9
	str	wzr, [sp]
	mov	x0, x22
	mov	x1, x23
	mov	w2, #0
	mov	w4, #0
	mov	w5, #1
	mov	w7, #0
	bl	_stmmac_prepare_tso_tx_desc
	ldr	w8, [x28]
	sub	w20, w20, w8
	cmp	w20, #0
	b.le	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24]
Lloh2:
	adrp	x8, _DMA_TX_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_TX_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_STMMAC_GET_ENTRY
	str	x0, [x24]
	ldr	x8, [x25]
	ldr	w0, [x8, x0, lsl #2]
	bl	_WARN_ON
	ldr	x8, [x26]
	ldr	x9, [x24]
	add	x23, x8, x9, lsl #2
	sub	w8, w27, w20
	add	x2, x21, w8, sxtw
	ldr	w8, [x22]
	cmp	w8, #32
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x2
	bl	_cpu_to_le32
	str	w0, [x23]
	b	LBB0_3
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TX_SIZE,4,2                ; @DMA_TX_SIZE
	.comm	_TSO_MAX_BUFF_SIZE,4,2          ; @TSO_MAX_BUFF_SIZE
	.no_dead_strip	_stmmac_tso_allocator
.subsections_via_symbols
