	.file	"extr_ds1.c_ds_initcd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ds_initcd, @function
ds_initcd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	edx, 1
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	mov	esi, DWORD PTR PCIR_DSXGCTRL[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	edi, DWORD PTR 0[rbp]
	call	pci_read_config@PLT
	test	al, 3
	jne	.L8
.L2:
	xor	esi, esi
	mov	rdi, rbp
	call	ds_cdbusy@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	test	rax, rax
	pop	r12
	.cfi_def_cfa_offset 8
	sete	al
	movzx	eax, al
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	r12d, eax
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR PCIR_DSXGCTRL[rip]
	mov	ebx, eax
	and	r12d, -4
	mov	ecx, 1
	mov	edx, r12d
	call	pci_write_config@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR PCIR_DSXGCTRL[rip]
	mov	edx, ebx
	or	edx, 3
	mov	ecx, 1
	call	pci_write_config@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	ecx, 1
	mov	edx, r12d
	mov	esi, DWORD PTR PCIR_DSXGCTRL[rip]
	call	pci_write_config@PLT
	mov	edi, 500000
	call	DELAY@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ds_initcd, .-ds_initcd
	.comm	PCIR_DSXGCTRL,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_ds1.c_ds_initcd.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ds_initcd, %function
ds_initcd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L9
	ldr	r0, [r1]
	mov	r4, r1
	mov	r2, #1
	ldr	r1, [r6]
	bl	pci_read_config
	tst	r0, #3
	bne	.L8
.L2:
	mov	r0, r4
	mov	r1, #0
	bl	ds_cdbusy
	clz	r0, r0
	lsr	r0, r0, #5
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r5, r0
	bic	r7, r0, #3
	mov	r2, r7
	ldr	r1, [r6]
	mov	r3, #1
	ldr	r0, [r4]
	bl	pci_write_config
	ldr	r1, [r6]
	orr	r2, r5, #3
	mov	r3, #1
	ldr	r0, [r4]
	bl	pci_write_config
	mov	r2, r7
	mov	r3, #1
	ldr	r1, [r6]
	ldr	r0, [r4]
	bl	pci_write_config
	ldr	r0, .L9+4
	bl	DELAY
	b	.L2
.L10:
	.align	2
.L9:
	.word	PCIR_DSXGCTRL
	.word	500000
	.size	ds_initcd, .-ds_initcd
	.comm	PCIR_DSXGCTRL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
