	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hfcpci_empty_fifo_trans
_hfcpci_empty_fifo_trans:               ## @hfcpci_empty_fifo_trans
	.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
	movq	%rcx, %r12
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r14
	movq	_MAX_B_FRAMES@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	(%rdx), %r13
	movl	(%r14,%r15,4), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movl	4(%r14,%r15,4), %edi
	callq	_le16_to_cpu
	subl	%eax, %ebx
	je	LBB0_14
## %bb.1:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	_B_FIFO_SIZE@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	movl	$0, %eax
	testl	%ebx, %ebx
	jg	LBB0_3
## %bb.2:
	movl	(%rcx), %eax
LBB0_3:
	addl	%ebx, %eax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r14,%r15,4), %edi
	movl	%eax, %ebx
	movq	%rcx, %r14
	callq	_le16_to_cpu
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	addl	%ebx, %eax
	movl	(%r14), %edx
	movq	%r14, %rbx
	movq	_B_SUB_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%edx, %ecx
	cmpl	%ecx, %eax
	cmovll	%r12d, %edx
	subl	%edx, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%r13,%r15,4), %edi
	callq	_le16_to_cpu
	movl	%eax, %r14d
	movl	(%r13,%r15,4), %edi
	callq	_le16_to_cpu
	subl	%eax, %r14d
	movl	(%rbx), %r13d
	testl	%r14d, %r14d
	cmovlel	%r13d, %r12d
	movq	_FLG_RX_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	leaq	12(%rbx), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	addl	%eax, (%rbx)
LBB0_12:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_5:
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movq	%rbx, %rdi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	callq	_bchannel_get_rxbuf
	testl	%eax, %eax
	js	LBB0_11
## %bb.6:
	addl	%r12d, %r14d
	movl	4(%rbx), %edi
	movl	%r13d, %esi
	callq	_skb_put
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r13d, %ebx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	4(%r13,%r15,4), %edi
	callq	_le16_to_cpu
	addl	%ebx, %eax
	movq	_B_SUB_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_B_FIFO_SIZE@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%r12d, %eax
	jle	LBB0_8
## %bb.7:
	movl	4(%r13,%r15,4), %edi
	callq	_le16_to_cpu
	subl	%eax, %r12d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
LBB0_8:
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	subl	%r14d, %r12d
	movl	4(%r13,%r15,4), %edi
	callq	_le16_to_cpu
	movq	_B_SUB_VAL@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cltq
	subq	%rcx, %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	subl	%r14d, %ebx
	je	LBB0_10
## %bb.9:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
LBB0_10:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_recv_Bchannel
LBB0_13:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le16
	movl	%eax, 4(%r13,%r15,4)
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	8(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %edx
	callq	_pr_warning
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_B_FRAMES,8,3               ## @MAX_B_FRAMES
	.comm	_B_FIFO_SIZE,4,2                ## @B_FIFO_SIZE
	.comm	_B_SUB_VAL,4,2                  ## @B_SUB_VAL
	.comm	_FLG_RX_OFF,4,2                 ## @FLG_RX_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"B%d: No bufferspace for %d bytes\n"

	.no_dead_strip	_hfcpci_empty_fifo_trans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hfcpci_empty_fifo_trans
_hfcpci_empty_fifo_trans:               ; @hfcpci_empty_fifo_trans
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _MAX_B_FRAMES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_B_FRAMES@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x9]
	add	x26, x8, x22, lsl #2
	ldr	x23, [x2]
	ldr	w0, [x26]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x26, #4]
	bl	_le16_to_cpu
	subs	w8, w21, w0
	b.eq	LBB0_11
; %bb.1:
Lloh3:
	adrp	x25, _B_FIFO_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _B_FIFO_SIZE@GOTPAGEOFF]
	add	x24, x23, x22, lsl #2
	ldr	w9, [x25]
	cmp	w8, #0
	csel	w9, wzr, w9, gt
	add	w22, w9, w8
	ldr	w0, [x26, #4]
	bl	_le16_to_cpu
	add	w8, w0, w22
	ldr	w9, [x25]
Lloh5:
	adrp	x27, _B_SUB_VAL@GOTPAGE
Lloh6:
	ldr	x27, [x27, _B_SUB_VAL@GOTPAGEOFF]
	ldr	w10, [x27]
	add	w10, w10, w9
	cmp	w8, w10
	csel	w9, wzr, w9, lt
	sub	w21, w8, w9
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	mov	x23, x0
	ldr	w0, [x24]
	bl	_le16_to_cpu
	sub	w23, w23, w0
	ldr	w24, [x25]
	cmp	w23, #0
	csel	w28, wzr, w24, gt
Lloh7:
	adrp	x8, _FLG_RX_OFF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FLG_RX_OFF@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w8, [x19]
	add	w8, w8, w22
	str	w8, [x19]
	b	LBB0_10
LBB0_3:
	mov	x0, x19
	mov	x1, x22
	bl	_bchannel_get_rxbuf
	tbnz	w0, #31, LBB0_9
; %bb.4:
	add	w8, w23, w28
	sub	w23, w24, w8
	ldr	w0, [x19, #4]
	mov	x1, x22
	bl	_skb_put
	mov	x24, x0
	ldr	w0, [x26, #4]
	bl	_le16_to_cpu
	add	w8, w0, w22
	ldr	w9, [x25]
	ldr	w10, [x27]
	add	w28, w10, w9
	cmp	w8, w28
	mov	x25, x22
	b.le	LBB0_6
; %bb.5:
	ldr	w0, [x26, #4]
	bl	_le16_to_cpu
	sub	w25, w28, w0
LBB0_6:
	ldr	w0, [x26, #4]
	bl	_le16_to_cpu
	ldr	w8, [x27]
	sub	w8, w0, w8
	add	x1, x20, w8, sxtw #2
	mov	x0, x24
	mov	x2, x25
	bl	_memcpy
	subs	w2, w22, w25
	b.eq	LBB0_8
; %bb.7:
	add	x0, x24, w25, sxtw #2
	mov	x1, x20
	bl	_memcpy
LBB0_8:
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	bl	_recv_Bchannel
	b	LBB0_10
LBB0_9:
	ldr	w1, [x19, #8]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_pr_warning
LBB0_10:
	mov	x0, x21
	bl	_cpu_to_le16
	str	w0, [x26, #4]
LBB0_11:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_B_FRAMES,8,3               ; @MAX_B_FRAMES
	.comm	_B_FIFO_SIZE,4,2                ; @B_FIFO_SIZE
	.comm	_B_SUB_VAL,4,2                  ; @B_SUB_VAL
	.comm	_FLG_RX_OFF,4,2                 ; @FLG_RX_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"B%d: No bufferspace for %d bytes\n"

	.no_dead_strip	_hfcpci_empty_fifo_trans
.subsections_via_symbols
