	.file	"extr_cdrom.c_cdrom_select_disc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"entering cdrom_select_disc()\n"
	.text
	.p2align 4
	.type	cdrom_select_disc, @function
cdrom_select_disc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	lea	rsi, .LC0[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR CD_CHANGER[rip]
	call	cd_dbg@PLT
	mov	edi, DWORD PTR CDC_SELECT_DISC[rip]
	call	CDROM_CAN@PLT
	mov	r12d, DWORD PTR EDRIVE_CANT_DO_THIS[rip]
	neg	r12d
	test	eax, eax
	je	.L1
	mov	rdx, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR 8[rdx]
	test	rax, rax
	je	.L4
	xor	esi, esi
	mov	edx, ebx
	mov	rdi, rbp
	call	rax
	cmp	DWORD PTR CDSL_NONE[rip], ebx
	je	.L18
.L6:
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	edi, 4
	call	kmalloc@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	r13, rax
	neg	r12d
	test	rax, rax
	je	.L1
	mov	rsi, rax
	mov	rdi, rbp
	call	cdrom_read_mech_status@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
	mov	rdi, r13
	mov	r12d, DWORD PTR 0[r13]
	call	kfree@PLT
	cmp	DWORD PTR 4[rbp], 1
	mov	eax, DWORD PTR CDSL_CURRENT[rip]
	jle	.L9
.L10:
	cmp	ebx, eax
	je	.L1
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	esi, ebx
	mov	rdi, rbp
	call	[QWORD PTR [rdx]]
	cmp	DWORD PTR CDSL_NONE[rip], ebx
	jne	.L6
.L18:
	mov	DWORD PTR 0[rbp], 3
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	mov	esi, -1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	cdrom_load_unload@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	cmp	QWORD PTR 8[rbp], 0
	jne	.L10
	cmp	ebx, eax
	mov	DWORD PTR 0[rbp], 3
	mov	rdi, rbp
	cmovne	r12d, ebx
	mov	esi, r12d
	call	cdrom_load_unload@PLT
	test	eax, eax
	cmovne	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r13
	call	kfree@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cdrom_select_disc, .-cdrom_select_disc
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EDRIVE_CANT_DO_THIS,4,4
	.comm	EBUSY,4,4
	.comm	CD_CHANGER,4,4
	.comm	CDSL_NONE,4,4
	.comm	CDSL_CURRENT,4,4
	.comm	CDC_SELECT_DISC,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_cdrom.c_cdrom_select_disc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"entering cdrom_select_disc()\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cdrom_select_disc, %function
cdrom_select_disc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L22
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r6, r1
	ldr	r0, [r3]
	ldr	r1, .L22+4
	bl	cd_dbg
	ldr	r3, .L22+8
	ldr	r0, [r3]
	bl	CDROM_CAN
	cmp	r0, #0
	beq	.L18
	ldr	r2, [r4, #12]
	ldr	r3, [r2, #4]
	cmp	r3, #0
	beq	.L4
	mov	r2, r6
	mov	r1, #0
	mov	r0, r4
	blx	r3
	ldr	r3, .L22+12
	ldr	r3, [r3]
	cmp	r3, r6
	beq	.L19
.L6:
	ldr	r3, .L22+16
	mov	r0, #4
	ldr	r1, [r3]
	bl	kmalloc
	subs	r7, r0, #0
	beq	.L20
	mov	r1, r7
	mov	r0, r4
	bl	cdrom_read_mech_status
	subs	r5, r0, #0
	mov	r0, r7
	bne	.L21
	ldr	r5, [r7]
	bl	kfree
	ldr	r3, [r4, #4]
	cmp	r3, #1
	ble	.L9
	ldr	r3, .L22+20
	ldr	r3, [r3]
.L10:
	cmp	r6, r3
	beq	.L1
	ldr	r3, .L22+24
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r3, .L22+28
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r3, [r2]
	mov	r1, r6
	mov	r0, r4
	blx	r3
	ldr	r3, .L22+12
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L6
.L19:
	mov	r3, #3
	mov	r0, r4
	str	r3, [r4]
	mvn	r1, #0
	pop	{r4, r5, r6, r7, r8, lr}
	b	cdrom_load_unload
.L9:
	ldr	r2, [r4, #8]
	ldr	r3, .L22+20
	cmp	r2, #0
	ldr	r3, [r3]
	bne	.L10
	cmp	r6, r3
	movne	r5, r6
	mov	r3, #3
	mov	r1, r5
	mov	r0, r4
	str	r3, [r4]
	bl	cdrom_load_unload
	cmp	r0, #0
	movne	r5, r0
	b	.L1
.L20:
	ldr	r3, .L22+32
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	bl	kfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	.align	2
.L22:
	.word	CD_CHANGER
	.word	.LC0
	.word	CDC_SELECT_DISC
	.word	CDSL_NONE
	.word	GFP_KERNEL
	.word	CDSL_CURRENT
	.word	EBUSY
	.word	EDRIVE_CANT_DO_THIS
	.word	ENOMEM
	.size	cdrom_select_disc, .-cdrom_select_disc
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EDRIVE_CANT_DO_THIS,4,4
	.comm	EBUSY,4,4
	.comm	CD_CHANGER,4,4
	.comm	CDSL_NONE,4,4
	.comm	CDSL_CURRENT,4,4
	.comm	CDC_SELECT_DISC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
