	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_82547_fifo_workaround
_e1000_82547_fifo_workaround:           ## @e1000_82547_fifo_workaround
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %r13
	subq	8(%rdi), %r13
	movq	_E1000_FIFO_HDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rsi), %rdi
	addq	%rax, %rdi
	movq	%rax, %rsi
	callq	_ALIGN
	movq	%rax, %r14
	movq	16(%rbx), %rax
	movq	_HALF_DUPLEX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	leaq	24(%rbx), %r12
	movq	%r12, %rdi
	callq	_atomic_read
	movl	$1, %r15d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	_E1000_82547_PAD_LEN@GOTPCREL(%rip), %rax
	addq	(%rax), %r13
	cmpq	%r13, %r14
	jge	LBB0_3
LBB0_4:
	addq	8(%rbx), %r14
	movq	%r14, 8(%rbx)
	xorl	%r15d, %r15d
	subq	(%rbx), %r14
	jl	LBB0_6
## %bb.5:
	movq	%r14, 8(%rbx)
	jmp	LBB0_6
LBB0_3:
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_atomic_set
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E1000_FIFO_HDR,8,3             ## @E1000_FIFO_HDR
	.comm	_HALF_DUPLEX,8,3                ## @HALF_DUPLEX
	.comm	_E1000_82547_PAD_LEN,8,3        ## @E1000_82547_PAD_LEN
	.no_dead_strip	_e1000_82547_fifo_workaround
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_82547_fifo_workaround
_e1000_82547_fifo_workaround:           ; @e1000_82547_fifo_workaround
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldp	x22, x23, [x0]
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _E1000_FIFO_HDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _E1000_FIFO_HDR@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x9]
	add	x0, x1, x8
	bl	_ALIGN
	mov	x20, x0
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _HALF_DUPLEX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HALF_DUPLEX@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	add	x21, x19, #24
	mov	x0, x21
	bl	_atomic_read
	cbz	x0, LBB0_3
; %bb.2:
	mov	w20, #1
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x8, _E1000_82547_PAD_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E1000_82547_PAD_LEN@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sub	x9, x22, x23
	add	x8, x9, x8
	cmp	x20, x8
	b.ge	LBB0_6
LBB0_4:
	ldp	x9, x8, [x19]
	add	x10, x8, x20
	subs	x8, x10, x9
	str	x10, [x19, #8]
	mov	w20, #0
	b.lt	LBB0_7
; %bb.5:
	str	x8, [x19, #8]
	b	LBB0_7
LBB0_6:
	mov	w20, #1
	mov	x0, x21
	mov	w1, #1
	bl	_atomic_set
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_E1000_FIFO_HDR,8,3             ; @E1000_FIFO_HDR
	.comm	_HALF_DUPLEX,8,3                ; @HALF_DUPLEX
	.comm	_E1000_82547_PAD_LEN,8,3        ; @E1000_82547_PAD_LEN
	.no_dead_strip	_e1000_82547_fifo_workaround
.subsections_via_symbols
