	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdlc_empty_fifo
_hdlc_empty_fifo:                       ## @hdlc_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, %ebx
	movq	%rdi, %r13
	cmpq	$0, 8(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_AVM_HDLC_1@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AVM_HDLC_2@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	movq	32(%r13), %r12
	movl	(%r12), %eax
	movq	_L1_DEB_HSCX@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	_L1_DEB_HSCX_FIFO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_debugl1
LBB0_6:
	movq	16(%r13), %r15
	movslq	%ebx, %rax
	addq	%r15, %rax
	movq	_HSCX_BUFMAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
## %bb.7:
	movq	_L1_DEB_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_20
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_19
LBB0_9:
	shlq	$2, %r15
	addq	24(%r13), %r15
	movq	%rax, 16(%r13)
	movq	_AVM_FRITZ_PCI@GOTPCREL(%rip), %rax
	movq	8(%r12), %rcx
	movq	24(%r12), %rsi
	addq	$4, %rsi
	cmpq	(%rax), %rcx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edi
	jne	LBB0_15
## %bb.10:
	callq	_outl
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.12:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rdi
	callq	_inl
	movl	%eax, (%r15,%r13)
	addq	$4, %r13
	cmpl	%ebx, %r13d
	jl	LBB0_13
## %bb.14:
	addq	%r15, %r13
	movq	%r15, %r14
	movq	%r13, %r15
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_15:
	callq	_outb
	movq	%r15, %r14
	testl	%ebx, %ebx
	jle	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rdi
	callq	_inb
	movl	%eax, (%r14)
	addq	$4, %r14
	decl	%ebx
	jne	LBB0_16
	jmp	LBB0_17
LBB0_11:
	movq	%r15, %r14
LBB0_17:
	movq	_L1_DEB_HSCX_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_20
## %bb.18:
	movq	8(%r12), %rax
	movq	_AVM_FRITZ_PNP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	cmoveq	%r15, %r14
	cmpq	$1, 8(%r13)
	movq	%r13, %r15
	movq	(%r13), %r13
	movl	$66, %edx
	sbbl	$0, %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_sprintf
	movslq	%eax, %rdi
	addq	%r13, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_QuickHex
	movq	(%r15), %rsi
LBB0_19:
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_debugl1                        ## TAILCALL
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVM_HDLC_2,4,2                 ## @AVM_HDLC_2
	.comm	_AVM_HDLC_1,4,2                 ## @AVM_HDLC_1
	.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	"hdlc_empty_fifo %d"

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

	.comm	_AVM_FRITZ_PCI,8,3              ## @AVM_FRITZ_PCI
	.comm	_AVM_FRITZ_PNP,8,3              ## @AVM_FRITZ_PNP
L_.str.2:                               ## @.str.2
	.asciz	"hdlc_empty_fifo %c cnt %d"

	.comm	__IO_BASE,8,3                   ## @_IO_BASE
	.no_dead_strip	_hdlc_empty_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdlc_empty_fifo
_hdlc_empty_fifo:                       ; @hdlc_empty_fifo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _AVM_HDLC_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVM_HDLC_2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _AVM_HDLC_1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AVM_HDLC_1@GOTPAGEOFF]
	ldr	x10, [x0, #8]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	ldr	x19, [x0, #32]
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _L1_DEB_HSCX@GOTPAGE
Lloh5:
	ldr	x9, [x9, _L1_DEB_HSCX@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
Lloh7:
	adrp	x23, _L1_DEB_HSCX_FIFO@GOTPAGE
Lloh8:
	ldr	x23, [x23, _L1_DEB_HSCX_FIFO@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_debugl1
LBB0_3:
	ldr	x9, [x20, #16]
	add	x8, x9, w21, sxtw
Lloh11:
	adrp	x10, _HSCX_BUFMAX@GOTPAGE
Lloh12:
	ldr	x10, [x10, _HSCX_BUFMAX@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x10
	b.le	LBB0_6
; %bb.4:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _L1_DEB_WARN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _L1_DEB_WARN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.5:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_6:
	ldr	x10, [x20, #24]
	add	x24, x10, x9, lsl #2
	str	x8, [x20, #16]
	ldr	x8, [x19, #8]
Lloh19:
	adrp	x9, _AVM_FRITZ_PCI@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AVM_FRITZ_PCI@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	x10, [x19, #24]
	add	x1, x10, #4
	mov	x0, x22
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	bl	_outl
	cmp	w21, #1
	b.lt	LBB0_14
; %bb.8:
	mov	x25, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #16]
	bl	_inl
	str	w0, [x24, x25]
	add	x25, x25, #4
	cmp	w25, w21
	b.lt	LBB0_9
; %bb.10:
	mov	x22, x24
	add	x24, x24, x25
	b	LBB0_15
LBB0_11:
	bl	_outb
	cmp	w21, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x25, x21
	mov	x22, x24
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #16]
	bl	_inb
	str	w0, [x22], #4
	subs	w25, w25, #1
	b.ne	LBB0_13
	b	LBB0_15
LBB0_14:
	mov	x22, x24
LBB0_15:
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.16:
	ldr	x8, [x19, #8]
Lloh22:
	adrp	x9, _AVM_FRITZ_PNP@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AVM_FRITZ_PNP@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x22, x24, x22, eq
	ldp	x23, x8, [x20]
	cmp	x8, #0
	mov	w8, #65
	cinc	w2, w8, ne
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	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, [x20]
LBB0_17:
	mov	x0, x19
	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
	add	sp, sp, #96
	b	_debugl1
LBB0_18:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_AVM_HDLC_2,4,2                 ; @AVM_HDLC_2
	.comm	_AVM_HDLC_1,4,2                 ; @AVM_HDLC_1
	.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	"hdlc_empty_fifo %d"

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

	.comm	_AVM_FRITZ_PCI,8,3              ; @AVM_FRITZ_PCI
	.comm	_AVM_FRITZ_PNP,8,3              ; @AVM_FRITZ_PNP
l_.str.2:                               ; @.str.2
	.asciz	"hdlc_empty_fifo %c cnt %d"

	.comm	__IO_BASE,8,3                   ; @_IO_BASE
	.no_dead_strip	_hdlc_empty_fifo
.subsections_via_symbols
