	.file	"extr_hisax_fcpcipnp.c_hdlc_empty_fifo.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hdlc_empty_fifo %d"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"hdlc_empty_fifo: incoming packet too large"
	.text
	.p2align 4
	.type	hdlc_empty_fifo, @function
hdlc_empty_fifo:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	cmp	QWORD PTR 16[rdi], 0
	mov	rbp, QWORD PTR 24[rdi]
	movzx	r13d, BYTE PTR AVM_IDX_HDLC_1[rip]
	je	.L3
	movzx	r13d, BYTE PTR AVM_IDX_HDLC_2[rip]
.L3:
	mov	edx, r12d
	xor	eax, eax
	mov	edi, 16
	lea	rsi, .LC0[rip]
	call	DBG@PLT
	mov	rdx, QWORD PTR [rbx]
	movsx	rax, r12d
	add	rax, rdx
	cmp	rax, QWORD PTR HSCX_BUFMAX[rip]
	jg	.L15
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR 0[rbp]
	add	rdx, QWORD PTR 8[rbx]
	mov	r14, rdx
	cmp	eax, 129
	je	.L5
	cmp	eax, 130
	je	.L6
	cmp	eax, 128
	je	.L16
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	lea	rsi, .LC1[rip]
	mov	edi, 16
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	DBG@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	r15, 4[rbp]
	mov	rdi, r15
	call	spin_lock@PLT
	mov	rsi, QWORD PTR AVM_INDEX[rip]
	movzx	edi, r13b
	add	rsi, QWORD PTR 8[rbp]
	call	outb@PLT
	mov	rdi, QWORD PTR AVM_DATA[rip]
	mov	edx, r12d
	add	rdi, QWORD PTR 8[rbp]
	mov	rsi, r14
	call	insb@PLT
.L13:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r15
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	spin_unlock@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	lea	edx, 6[r12]
	add	r12d, 3
	mov	rdi, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR AVM_HDLC_FIFO_1[rip]
	cmovns	edx, r12d
	sar	edx, 2
	cmp	QWORD PTR 16[rbx], 0
	je	.L10
	mov	rax, QWORD PTR AVM_HDLC_FIFO_2[rip]
.L10:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rsi, r14
	add	rdi, rax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	insl@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	lea	r15, 4[rbp]
	mov	rdi, r15
	call	spin_lock@PLT
	movzx	edi, r13b
	mov	rsi, QWORD PTR AVM_INDEX[rip]
	add	rsi, QWORD PTR 8[rbp]
	call	outl@PLT
	lea	edx, 6[r12]
	add	r12d, 3
	mov	rsi, r14
	cmovns	edx, r12d
	mov	rdi, QWORD PTR AVM_DATA[rip]
	add	rdi, QWORD PTR 8[rbp]
	add	rdi, QWORD PTR HDLC_FIFO[rip]
	sar	edx, 2
	call	insl@PLT
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	hdlc_empty_fifo, .-hdlc_empty_fifo
	.comm	HSCX_BUFMAX,8,8
	.comm	HDLC_FIFO,8,8
	.comm	AVM_INDEX,8,8
	.comm	AVM_IDX_HDLC_2,1,1
	.comm	AVM_IDX_HDLC_1,1,1
	.comm	AVM_HDLC_FIFO_2,8,8
	.comm	AVM_HDLC_FIFO_1,8,8
	.comm	AVM_DATA,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_hisax_fcpcipnp.c_hdlc_empty_fifo.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hdlc_empty_fifo %d\000"
	.align	2
.LC1:
	.ascii	"hdlc_empty_fifo: incoming packet too large\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hdlc_empty_fifo, %function
hdlc_empty_fifo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [r0, #8]
	mov	r2, r1
	cmp	r3, #0
	ldrne	r3, .L15
	ldreq	r3, .L15+4
	ldr	r6, [r0, #12]
	ldr	r1, .L15+8
	mov	r0, #16
	ldrb	r7, [r3]	@ zero_extendqisi2
	bl	DBG
	ldr	r3, .L15+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	add	r0, r2, r5
	cmp	r0, r3
	bgt	.L14
	ldr	r3, [r6]
	ldr	r1, [r4, #4]
	cmp	r3, #129
	str	r0, [r4]
	add	r8, r1, r2
	beq	.L5
	cmp	r3, #130
	beq	.L6
	cmp	r3, #128
	popne	{r4, r5, r6, r7, r8, pc}
	add	r4, r6, #4
	mov	r0, r4
	bl	spin_lock
	ldr	r3, .L15+16
	ldr	r1, [r6, #8]
	ldr	r3, [r3]
	mov	r0, r7
	add	r1, r1, r3
	bl	outb
	ldr	r3, .L15+20
	ldr	r0, [r6, #8]
	ldr	r3, [r3]
	mov	r2, r5
	mov	r1, r8
	add	r0, r0, r3
	bl	insb
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	spin_unlock
.L14:
	mov	r0, #16
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r1, .L15+24
	b	DBG
.L5:
	ldr	r2, [r4, #8]
	ldr	r3, [r6, #8]
	cmp	r2, #0
	ldrne	r2, .L15+28
	ldreq	r2, .L15+32
	mov	r1, r8
	ldr	r0, [r2]
	adds	r2, r5, #3
	addmi	r2, r5, #6
	add	r0, r3, r0
	asr	r2, r2, #2
	pop	{r4, r5, r6, r7, r8, lr}
	b	insl
.L6:
	add	r4, r6, #4
	mov	r0, r4
	bl	spin_lock
	ldr	r3, .L15+16
	ldr	r1, [r6, #8]
	ldr	r3, [r3]
	mov	r0, r7
	add	r1, r1, r3
	bl	outl
	ldr	r1, .L15+20
	ldr	r0, .L15+36
	ldr	r3, [r6, #8]
	ldr	r1, [r1]
	adds	r2, r5, #3
	ldr	r0, [r0]
	addmi	r2, r5, #6
	add	r3, r3, r1
	add	r0, r3, r0
	mov	r1, r8
	asr	r2, r2, #2
	bl	insl
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	spin_unlock
.L16:
	.align	2
.L15:
	.word	AVM_IDX_HDLC_2
	.word	AVM_IDX_HDLC_1
	.word	.LC0
	.word	HSCX_BUFMAX
	.word	AVM_INDEX
	.word	AVM_DATA
	.word	.LC1
	.word	AVM_HDLC_FIFO_2
	.word	AVM_HDLC_FIFO_1
	.word	HDLC_FIFO
	.size	hdlc_empty_fifo, .-hdlc_empty_fifo
	.comm	HSCX_BUFMAX,4,4
	.comm	HDLC_FIFO,4,4
	.comm	AVM_INDEX,4,4
	.comm	AVM_IDX_HDLC_2,1,1
	.comm	AVM_IDX_HDLC_1,1,1
	.comm	AVM_HDLC_FIFO_2,4,4
	.comm	AVM_HDLC_FIFO_1,4,4
	.comm	AVM_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
