	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jade_fill_fifo
_jade_fill_fifo:                        ## @jade_fill_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
	movq	%rdi, %rbx
	movq	48(%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	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_11
## %bb.5:
	xorl	%r13d, %r13d
	cmpl	$32, %r15d
	jbe	LBB0_7
## %bb.6:
	movl	$32, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_7:
	movq	(%rbx), %rax
	movq	_L1_MODE_TRANS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_8:
	movq	32(%rbx), %rsi
	movq	%r14, %rdi
	callq	_waitforXFW
	movq	40(%rbx), %rdi
	movq	8(%rdi), %r12
	movl	%r15d, %esi
	callq	_skb_pull
	subl	%r15d, 8(%rbx)
	addl	%r15d, 24(%rbx)
	movq	32(%rbx), %rsi
	movq	%r14, %rdi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_WRITEJADEFIFO
	movq	32(%rbx), %rsi
	movq	_jade_HDLC_XCMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_jadeXCMD_XF@GOTPCREL(%rip), %rax
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_10
## %bb.9:
	movq	_jadeXCMD_XME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
LBB0_10:
	orl	(%rax), %r13d
	movq	%r14, %rdi
	movl	%r13d, %ecx
	callq	_WriteJADECMDR
	movq	_L1_DEB_HSCX_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.12:
	cmpq	$1, 32(%rbx)
	movq	16(%rbx), %r13
	movl	$66, %edx
	sbbl	$0, %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_sprintf
	movslq	%eax, %rdi
	addq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_QuickHex
	movq	16(%rbx), %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	"jade_fill_fifo"

	.comm	_L1_MODE_TRANS,8,3              ## @L1_MODE_TRANS
	.comm	_jade_HDLC_XCMD,4,2             ## @jade_HDLC_XCMD
	.comm	_jadeXCMD_XF,4,2                ## @jadeXCMD_XF
	.comm	_jadeXCMD_XME,4,2               ## @jadeXCMD_XME
L_.str.1:                               ## @.str.1
	.asciz	"jade_fill_fifo %c cnt %d"

	.no_dead_strip	_jade_fill_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jade_fill_fifo
_jade_fill_fifo:                        ; @jade_fill_fifo
	.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	x20, x0
	ldr	x19, [x0, #48]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _L1_DEB_HSCX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L1_DEB_HSCX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x23, _L1_DEB_HSCX_FIFO@GOTPAGE
Lloh4:
	ldr	x23, [x23, _L1_DEB_HSCX_FIFO@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_2:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_10
LBB0_3:
	ldr	w21, [x8]
	cmp	w21, #1
	b.lt	LBB0_10
; %bb.4:
	cmp	w21, #32
	b.ls	LBB0_7
; %bb.5:
	mov	w24, #0
	mov	w21, #32
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_debugl1
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_3
	b	LBB0_10
LBB0_7:
	ldr	x8, [x20]
Lloh7:
	adrp	x9, _L1_MODE_TRANS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _L1_MODE_TRANS@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w24, ne
LBB0_8:
	ldr	x1, [x20, #32]
	mov	x0, x19
	bl	_waitforXFW
	ldr	x0, [x20, #40]
	ldr	x22, [x0, #8]
	mov	x1, x21
	bl	_skb_pull
	ldr	w8, [x20, #8]
	sub	w8, w8, w21
	str	w8, [x20, #8]
	ldr	w8, [x20, #24]
	add	w8, w8, w21
	str	w8, [x20, #24]
	ldr	x1, [x20, #32]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	bl	_WRITEJADEFIFO
	ldr	x1, [x20, #32]
Lloh10:
	adrp	x8, _jade_HDLC_XCMD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _jade_HDLC_XCMD@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
Lloh13:
	adrp	x8, _jadeXCMD_XF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _jadeXCMD_XF@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _jadeXCMD_XME@GOTPAGE
Lloh17:
	ldr	x9, [x9, _jadeXCMD_XME@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w24, #0
	csel	w9, w9, wzr, ne
	orr	w3, w9, w8
	mov	x0, x19
	bl	_WriteJADECMDR
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	x23, [x20, #16]
	ldr	x8, [x20, #32]
	cmp	x8, #0
	mov	w8, #65
	cinc	w2, w8, ne
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x3, x21
	bl	_sprintf
	add	x0, x23, w0, sxtw
	mov	x1, x22
	mov	x2, x21
	bl	_QuickHex
	ldr	x1, [x20, #16]
	mov	x0, x19
	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
	b	_debugl1
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.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	"jade_fill_fifo"

	.comm	_L1_MODE_TRANS,8,3              ; @L1_MODE_TRANS
	.comm	_jade_HDLC_XCMD,4,2             ; @jade_HDLC_XCMD
	.comm	_jadeXCMD_XF,4,2                ; @jadeXCMD_XF
	.comm	_jadeXCMD_XME,4,2               ; @jadeXCMD_XME
l_.str.1:                               ; @.str.1
	.asciz	"jade_fill_fifo %c cnt %d"

	.no_dead_strip	_jade_fill_fifo
.subsections_via_symbols
