	.file	"extr_if_sbni.c_handle_channel.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"internal error!\n"
	.text
	.p2align 4
	.type	handle_channel, @function
handle_channel:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR CSR0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	lea	rbx, .LC0[rip]
	call	sbni_inb@PLT
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	mov	r8d, eax
	mov	eax, DWORD PTR EN_INT[rip]
	not	eax
	and	eax, r8d
	or	eax, DWORD PTR TR_REQ[rip]
	mov	edx, eax
	call	sbni_outb@PLT
	mov	eax, DWORD PTR CHANGE_LEVEL_START_TICKS[rip]
	mov	DWORD PTR 20[rbp], eax
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	call	sbni_inb@PLT
	mov	edx, DWORD PTR RC_RDY[rip]
	mov	ecx, DWORD PTR TR_RDY[rip]
	or	ecx, edx
	test	ecx, eax
	je	.L3
	test	edx, eax
	jne	.L4
	xor	r12d, r12d
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR FL_PREV_OK[rip], eax
	sete	r12b
.L5:
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	call	sbni_inb@PLT
	test	DWORD PTR TR_RDY[rip], eax
	je	.L6
	test	DWORD PTR RC_RDY[rip], eax
	je	.L7
.L6:
	mov	edi, DWORD PTR 16[rbp]
	mov	rsi, rbx
	call	if_printf@PLT
.L7:
	test	r12d, r12d
	jne	.L8
	cmp	QWORD PTR 8[rbp], 0
	je	.L9
.L8:
	mov	rdi, rbp
	call	send_frame@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	call	recv_frame@PLT
	mov	r12d, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	call	sbni_inb@PLT
	mov	edx, DWORD PTR TR_REQ[rip]
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	not	edx
	and	edx, eax
	call	sbni_outb@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, DWORD PTR CSR0[rip]
	mov	rdi, rbp
	call	sbni_inb@PLT
	mov	esi, DWORD PTR CSR0[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	or	eax, DWORD PTR EN_INT[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	edx, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	sbni_outb@PLT
	.cfi_endproc
.LFE0:
	.size	handle_channel, .-handle_channel
	.comm	TR_REQ,4,4
	.comm	TR_RDY,4,4
	.comm	RC_RDY,4,4
	.comm	FL_PREV_OK,4,4
	.comm	EN_INT,4,4
	.comm	CSR0,4,4
	.comm	CHANGE_LEVEL_START_TICKS,4,4
	.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_if_sbni.c_handle_channel.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"internal error!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_channel, %function
handle_channel:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, .L19
	mov	fp, r0
	ldr	r5, [r4]
	ldr	r10, .L19+4
	mov	r1, r5
	bl	sbni_inb
	ldr	r3, .L19+8
	ldr	r2, [r10]
	ldr	r1, [r3]
	ldr	r7, .L19+12
	bic	r0, r0, r1
	orr	r2, r0, r2
	mov	r1, r5
	mov	r0, fp
	bl	sbni_outb
	ldr	r2, .L19+16
	ldr	r6, .L19+20
	ldr	r2, [r2]
	ldr	r8, .L19+24
	ldr	r9, .L19+28
	str	r2, [fp, #12]
.L2:
	ldr	r1, [r4]
	mov	r0, fp
	bl	sbni_inb
	ldr	r1, [r7]
	ldr	r2, [r6]
	orr	r2, r1, r2
	tst	r2, r0
	beq	.L3
	tst	r1, r0
	bne	.L4
	ldr	r1, [fp]
	ldr	r2, [r8]
	tst	r1, r2
	moveq	r5, #1
	movne	r5, #0
.L5:
	mov	r0, fp
	ldr	r1, [r4]
	bl	sbni_inb
	ldr	r2, [r6]
	tst	r0, r2
	beq	.L6
	ldr	r2, [r7]
	tst	r0, r2
	beq	.L7
.L6:
	mov	r1, r9
	ldr	r0, [fp, #8]
	bl	if_printf
.L7:
	cmp	r5, #0
	bne	.L8
	ldr	r2, [fp, #4]
	cmp	r2, #0
	beq	.L9
.L8:
	mov	r0, fp
	bl	send_frame
	b	.L2
.L4:
	mov	r0, fp
	bl	recv_frame
	mov	r5, r0
	b	.L5
.L9:
	ldr	r5, [r4]
	mov	r0, fp
	mov	r1, r5
	bl	sbni_inb
	ldr	r2, [r10]
	mov	r1, r5
	bic	r2, r0, r2
	mov	r0, fp
	bl	sbni_outb
	b	.L2
.L3:
	ldr	r4, [r4]
	mov	r0, fp
	mov	r1, r4
	bl	sbni_inb
	ldr	r3, .L19+8
	mov	r1, r4
	ldr	r2, [r3]
	orr	r2, r0, r2
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	sbni_outb
.L20:
	.align	2
.L19:
	.word	CSR0
	.word	TR_REQ
	.word	EN_INT
	.word	RC_RDY
	.word	CHANGE_LEVEL_START_TICKS
	.word	TR_RDY
	.word	FL_PREV_OK
	.word	.LC0
	.size	handle_channel, .-handle_channel
	.comm	TR_REQ,4,4
	.comm	TR_RDY,4,4
	.comm	RC_RDY,4,4
	.comm	FL_PREV_OK,4,4
	.comm	EN_INT,4,4
	.comm	CSR0,4,4
	.comm	CHANGE_LEVEL_START_TICKS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
