	.file	"extr_stradis.c_debiread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	debiread, @function
debiread:
.LFB0:
	.cfi_startproc
	endbr64
	lea	eax, -1[rcx]
	cmp	eax, 32763
	jbe	.L2
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, ecx
	call	wait_for_debi_done@PLT
	test	rax, rax
	js	.L4
	mov	edi, DWORD PTR 0[r13]
	mov	r14d, DWORD PTR SAA7146_DEBI_AD[rip]
	call	virt_to_bus@PLT
	mov	esi, r14d
	mov	edi, eax
	call	saawrite@PLT
	mov	edi, ebx
	movzx	edx, bp
	mov	esi, DWORD PTR SAA7146_DEBI_COMMAND[rip]
	sal	edi, 17
	or	edx, edi
	or	edx, 65536
	mov	edi, edx
	call	saawrite@PLT
	mov	esi, DWORD PTR SAA7146_DEBI_CONFIG[rip]
	mov	edi, r12d
	call	saawrite@PLT
	mov	eax, DWORD PTR SAA7146_MC2_UPLD_DEBI[rip]
	mov	esi, DWORD PTR SAA7146_MC2[rip]
	mov	edi, eax
	sal	edi, 16
	or	edi, eax
	call	saawrite@PLT
	mov	eax, ebx
	cmp	ebx, 4
	jle	.L12
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, r13
	call	wait_for_debi_done@PLT
	mov	edi, DWORD PTR SAA7146_DEBI_AD[rip]
	call	saaread@PLT
	cmp	ebx, 1
	je	.L13
	cmp	ebx, 2
	jne	.L6
	movzx	eax, ax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	cmp	ebx, 3
	jne	.L1
	and	eax, 16777215
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	movzx	eax, al
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	debiread, .-debiread
	.comm	SAA7146_MC2_UPLD_DEBI,4,4
	.comm	SAA7146_MC2,4,4
	.comm	SAA7146_DEBI_CONFIG,4,4
	.comm	SAA7146_DEBI_COMMAND,4,4
	.comm	SAA7146_DEBI_AD,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_stradis.c_debiread.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	debiread, %function
debiread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r3
	ldr	r3, .L12
	sub	ip, r4, #1
	cmp	ip, r3
	bls	.L2
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r6, r1
	mov	r5, r2
	mov	r8, r0
	bl	wait_for_debi_done
	cmp	r0, #0
	blt	.L4
	ldr	r9, .L12+4
	ldr	r0, [r8]
	ldr	r7, .L12+8
	bl	virt_to_bus
	ldr	r1, [r9]
	bl	saawrite
	ldr	r3, .L12+12
	and	r2, r5, r7
	orr	r2, r2, r4, lsl #17
	ldr	r1, [r3]
	orr	r0, r2, #65536
	bl	saawrite
	ldr	r3, .L12+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	saawrite
	ldr	r2, .L12+20
	ldr	r3, .L12+24
	ldr	r0, [r2]
	ldr	r1, [r3]
	orr	r0, r0, r0, lsl #16
	bl	saawrite
	cmp	r4, #4
	ble	.L10
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	mov	r0, r8
	bl	wait_for_debi_done
	ldr	r0, [r9]
	bl	saaread
	cmp	r4, #1
	beq	.L11
	cmp	r4, #2
	bne	.L6
	and	r0, r0, r7
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	cmp	r4, #3
	biceq	r0, r0, #-16777216
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	and	r0, r0, #255
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L13:
	.align	2
.L12:
	.word	32763
	.word	SAA7146_DEBI_AD
	.word	65535
	.word	SAA7146_DEBI_COMMAND
	.word	SAA7146_DEBI_CONFIG
	.word	SAA7146_MC2_UPLD_DEBI
	.word	SAA7146_MC2
	.size	debiread, .-debiread
	.comm	SAA7146_MC2_UPLD_DEBI,4,4
	.comm	SAA7146_MC2,4,4
	.comm	SAA7146_DEBI_CONFIG,4,4
	.comm	SAA7146_DEBI_COMMAND,4,4
	.comm	SAA7146_DEBI_AD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
