	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prepare_tx
_prepare_tx:                            ## @prepare_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
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_D_DURING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r12), %ecx
	movl	20(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_BUGMSG
	movq	_ARC_HDR_SIZE@GOTPCREL(%rip), %rdx
	subl	(%rdx), %r15d
	movq	_XMTU@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	cmpl	%ecx, %r15d
	jle	LBB0_2
## %bb.1:
	movq	_D_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_BUGMSG
	movq	_ARC_HDR_SIZE@GOTPCREL(%rip), %rdx
	movl	(%r14), %r15d
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	16(%rax), %rcx
	movq	_MinTU@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_5
## %bb.3:
	movq	(%rcx), %rax
	movl	$0, (%rax)
	movl	$512, %r14d                     ## imm = 0x200
	jmp	LBB0_4
LBB0_5:
	movq	_MTU@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jle	LBB0_7
## %bb.6:
	movq	(%rcx), %rax
	movl	$0, (%rax)
	movl	$509, %r14d                     ## imm = 0x1FD
LBB0_4:
	subl	%r15d, %r14d
	movl	%r14d, 4(%rax)
	jmp	LBB0_8
LBB0_7:
	movl	$256, %r14d                     ## imm = 0x100
	subl	%r15d, %r14d
	movq	(%rcx), %rax
	movl	%r14d, (%rax)
LBB0_8:
	movl	(%rdx), %r8d
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	*8(%r12)
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	%r15d, %r8d
	callq	*8(%r12)
	movl	24(%rbx), %eax
	movl	%eax, (%r12)
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D_DURING,4,2                   ## @D_DURING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prepare_tx: txbufs=%d/%d/%d\n"

	.comm	_ARC_HDR_SIZE,4,2               ## @ARC_HDR_SIZE
	.comm	_XMTU,4,2                       ## @XMTU
	.comm	_D_NORMAL,4,2                   ## @D_NORMAL
L_.str.1:                               ## @.str.1
	.asciz	"Bug!  prepare_tx with size %d (> %d)\n"

	.comm	_MinTU,4,2                      ## @MinTU
	.comm	_MTU,4,2                        ## @MTU
	.no_dead_strip	_prepare_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prepare_tx
_prepare_tx:                            ; @prepare_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x22, x0
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x8, _D_DURING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_DURING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldp	w3, w2, [x21, #16]
	str	x20, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_BUGMSG
Lloh5:
	adrp	x25, _ARC_HDR_SIZE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _ARC_HDR_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh7:
	adrp	x24, _XMTU@GOTPAGE
Lloh8:
	ldr	x24, [x24, _XMTU@GOTPAGEOFF]
	ldr	w3, [x24]
	sub	w23, w23, w8
	cmp	w23, w3
	b.le	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _D_NORMAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _D_NORMAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
	bl	_BUGMSG
	ldr	w23, [x24]
LBB0_2:
	add	x3, x19, #16
Lloh14:
	adrp	x8, _MinTU@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MinTU@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w23, w8
	b.le	LBB0_4
; %bb.3:
	ldr	x8, [x3]
	mov	w9, #512
	b	LBB0_6
LBB0_4:
Lloh17:
	adrp	x8, _MTU@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MTU@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w23, w8
	b.le	LBB0_7
; %bb.5:
	ldr	x8, [x3]
	mov	w9, #509
LBB0_6:
	sub	w24, w9, w23
	stp	wzr, w24, [x8]
	b	LBB0_8
LBB0_7:
	mov	w8, #256
	sub	w24, w8, w23
	ldr	x8, [x3]
	str	w24, [x8]
LBB0_8:
	ldr	x8, [x21, #8]
	ldr	w4, [x25]
	mov	x0, x22
	mov	x1, x20
	mov	w2, #0
	blr	x8
	ldr	x8, [x21, #8]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x24
	mov	x3, x19
	mov	x4, x23
	blr	x8
	ldr	w8, [x19, #24]
	str	w8, [x21]
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_D_DURING,4,2                   ; @D_DURING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prepare_tx: txbufs=%d/%d/%d\n"

	.comm	_ARC_HDR_SIZE,4,2               ; @ARC_HDR_SIZE
	.comm	_XMTU,4,2                       ; @XMTU
	.comm	_D_NORMAL,4,2                   ; @D_NORMAL
l_.str.1:                               ; @.str.1
	.asciz	"Bug!  prepare_tx with size %d (> %d)\n"

	.comm	_MinTU,4,2                      ; @MinTU
	.comm	_MTU,4,2                        ; @MTU
	.no_dead_strip	_prepare_tx
.subsections_via_symbols
