	.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
	subq	$40, %rsp
	.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, %r13d
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	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, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_BUGMSG
	movq	_ARC_HDR_SIZE@GOTPCREL(%rip), %rbx
	subl	(%rbx), %r13d
	movq	_XMTU@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	cmpl	%ecx, %r13d
	jle	LBB0_2
## %bb.1:
	movq	_D_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_BUGMSG
	movl	(%r14), %r13d
LBB0_2:
	movq	_D_DURING@GOTPCREL(%rip), %rcx
	leaq	16(%r15), %rdx
	movq	_MinTU@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	jge	LBB0_3
## %bb.5:
	movq	_MTU@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jle	LBB0_7
## %bb.6:
	movq	(%rdx), %rax
	movl	$0, (%rax)
	movl	$509, %r15d                     ## imm = 0x1FD
	jmp	LBB0_4
LBB0_3:
	movq	(%rdx), %rax
	movl	$0, (%rax)
	movl	$512, %r15d                     ## imm = 0x200
LBB0_4:
	subl	%r13d, %r15d
	movl	%r15d, 4(%rax)
	jmp	LBB0_8
LBB0_7:
	movl	$256, %r15d                     ## imm = 0x100
	subl	%r13d, %r15d
	movq	(%rdx), %rax
	movl	%r15d, (%rax)
LBB0_8:
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_BUGMSG
	movl	(%rbx), %r8d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	*8(%r12)
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	%r13d, %r8d
	callq	*8(%r12)
	movl	24(%rbx), %eax
	movl	%eax, (%r12)
	movl	$1, %eax
	addq	$40, %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
L_.str.2:                               ## @.str.2
	.asciz	"prepare_tx: length=%d ofs=%d\n"

	.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, #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
	mov	x20, x3
	mov	x23, x2
	mov	x19, x1
	mov	x22, x0
	bl	_netdev_priv
	mov	x21, x0
Lloh0:
	adrp	x26, _D_DURING@GOTPAGE
Lloh1:
	ldr	x26, [x26, _D_DURING@GOTPAGEOFF]
	ldr	w0, [x26]
	ldp	w3, w2, [x21, #16]
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_BUGMSG
Lloh4:
	adrp	x27, _ARC_HDR_SIZE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _ARC_HDR_SIZE@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh6:
	adrp	x24, _XMTU@GOTPAGE
Lloh7:
	ldr	x24, [x24, _XMTU@GOTPAGEOFF]
	ldr	w3, [x24]
	sub	w23, w23, w8
	cmp	w23, w3
	b.le	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _D_NORMAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _D_NORMAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x23
	bl	_BUGMSG
	ldr	w23, [x24]
LBB0_2:
	add	x24, x19, #16
Lloh13:
	adrp	x8, _MinTU@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MinTU@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ge	LBB0_5
; %bb.3:
Lloh16:
	adrp	x8, _MTU@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MTU@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w23, w8
	b.le	LBB0_7
; %bb.4:
	ldr	x8, [x24]
	mov	w9, #509
	b	LBB0_6
LBB0_5:
	ldr	x8, [x24]
	mov	w9, #512
LBB0_6:
	sub	w25, w9, w23
	stp	wzr, w25, [x8]
	b	LBB0_8
LBB0_7:
	mov	w8, #256
	sub	w25, w8, w23
	ldr	x8, [x24]
	str	w25, [x8]
LBB0_8:
	ldr	w0, [x26]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	mov	x3, x25
	bl	_BUGMSG
	ldr	x8, [x21, #8]
	ldr	w4, [x27]
	mov	x0, x22
	mov	x1, x20
	mov	w2, #0
	mov	x3, x24
	blr	x8
	ldr	x8, [x21, #8]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x25
	mov	x3, x19
	mov	x4, x23
	blr	x8
	ldr	w8, [x19, #24]
	str	w8, [x21]
	mov	w0, #1
	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	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.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
l_.str.2:                               ; @.str.2
	.asciz	"prepare_tx: length=%d ofs=%d\n"

	.no_dead_strip	_prepare_tx
.subsections_via_symbols
