	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Memhscx_empty_fifo
_Memhscx_empty_fifo:                    ## @Memhscx_empty_fifo
	.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	%esi, %r15d
	movq	%rdi, %r13
	movq	32(%rdi), %r14
	movl	(%r14), %eax
	movq	_L1_DEB_HSCX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_L1_DEB_HSCX_FIFO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_debugl1
LBB0_3:
	movq	8(%r13), %rbx
	movslq	%r15d, %rdx
	leaq	(%rbx,%rdx), %rax
	movq	_HSCX_BUFMAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_7
## %bb.4:
	movq	_L1_DEB_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_debugl1
LBB0_6:
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	movl	$128, %edx
	callq	_MemWriteHSCXCMDR
	movq	$0, 8(%r13)
	jmp	LBB0_11
LBB0_7:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.8:
	shlq	$2, %rbx
	addq	24(%r13), %rbx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %edi
	xorl	%esi, %esi
	cmpq	$0, 16(%r13)
	setne	%sil
	shll	$6, %esi
	callq	_memreadreg
	movl	%eax, (%rbx,%r12,4)
	incq	%r12
	cmpl	%r12d, %r15d
	jne	LBB0_9
LBB0_10:
	movq	16(%r13), %rsi
	movq	%r14, %rdi
	movl	$128, %edx
	callq	_MemWriteHSCXCMDR
	movq	8(%r13), %rax
	movq	24(%r13), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addq	%rax, %rdx
	movq	%rdx, 8(%r13)
	movq	_L1_DEB_HSCX_FIFO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r14)
	je	LBB0_11
## %bb.12:
	leaq	(%rcx,%rax,4), %r12
	cmpq	$1, 16(%r13)
	movq	(%r13), %r15
	movl	$66, %edx
	sbbl	$0, %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_sprintf
	movslq	%eax, %rdi
	addq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_QuickHex
	movq	(%r13), %rsi
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_debugl1                        ## TAILCALL
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L1_DEB_HSCX,4,2                ## @L1_DEB_HSCX
	.comm	_L1_DEB_HSCX_FIFO,4,2           ## @L1_DEB_HSCX_FIFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hscx_empty_fifo"

	.comm	_HSCX_BUFMAX,8,3                ## @HSCX_BUFMAX
	.comm	_L1_DEB_WARN,4,2                ## @L1_DEB_WARN
L_.str.1:                               ## @.str.1
	.asciz	"hscx_empty_fifo: incoming packet too large"

L_.str.2:                               ## @.str.2
	.asciz	"hscx_empty_fifo %c cnt %d"

	.no_dead_strip	_Memhscx_empty_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Memhscx_empty_fifo
_Memhscx_empty_fifo:                    ; @Memhscx_empty_fifo
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _L1_DEB_HSCX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L1_DEB_HSCX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x22, _L1_DEB_HSCX_FIFO@GOTPAGE
Lloh4:
	ldr	x22, [x22, _L1_DEB_HSCX_FIFO@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x22]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_debugl1
LBB0_3:
	ldr	x8, [x19, #8]
	sxtw	x23, w21
Lloh7:
	adrp	x9, _HSCX_BUFMAX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _HSCX_BUFMAX@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x10, x8, x23
	cmp	x10, x9
	b.le	LBB0_7
; %bb.4:
	ldr	w8, [x20]
Lloh10:
	adrp	x9, _L1_DEB_WARN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _L1_DEB_WARN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_debugl1
LBB0_6:
	ldr	x1, [x19, #16]
	mov	x0, x20
	mov	w2, #128
	bl	_MemWriteHSCXCMDR
	str	xzr, [x19, #8]
	b	LBB0_12
LBB0_7:
	cbz	w21, LBB0_10
; %bb.8:
	ldr	x9, [x19, #24]
	add	x24, x9, x8, lsl #2
	mov	x25, x21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	w25, w25, #1
	ldr	w0, [x20, #4]
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w8, ne
	lsl	w1, w8, #6
	bl	_memreadreg
	str	w0, [x24], #4
	cbnz	w25, LBB0_9
LBB0_10:
	ldr	x1, [x19, #16]
	mov	x0, x20
	mov	w2, #128
	bl	_MemWriteHSCXCMDR
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	add	x10, x9, x23
	str	x10, [x19, #8]
	ldr	w10, [x20]
	ldr	w11, [x22]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.11:
	add	x22, x8, x9, lsl #2
	ldr	x23, [x19]
	ldr	x8, [x19, #16]
	cmp	x8, #0
	mov	w8, #65
	cinc	w2, w8, ne
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	bl	_sprintf
	add	x0, x23, w0, sxtw
	mov	x1, x22
	mov	x2, x21
	bl	_QuickHex
	ldr	x1, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_debugl1
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_L1_DEB_HSCX,4,2                ; @L1_DEB_HSCX
	.comm	_L1_DEB_HSCX_FIFO,4,2           ; @L1_DEB_HSCX_FIFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hscx_empty_fifo"

	.comm	_HSCX_BUFMAX,8,3                ; @HSCX_BUFMAX
	.comm	_L1_DEB_WARN,4,2                ; @L1_DEB_WARN
l_.str.1:                               ; @.str.1
	.asciz	"hscx_empty_fifo: incoming packet too large"

l_.str.2:                               ; @.str.2
	.asciz	"hscx_empty_fifo %c cnt %d"

	.no_dead_strip	_Memhscx_empty_fifo
.subsections_via_symbols
