	.file	"extr_gdrom.c_gdrom_readtoc_cmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gdrom_readtoc_cmd, @function
gdrom_readtoc_cmd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	mov	edi, 16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	call	kzalloc@PLT
	test	rax, rax
	je	.L14
	movabs	rcx, 17179869184
	mov	rbp, rax
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR [rax], 20
	mov	QWORD PTR 12[rax], rcx
	mov	ecx, DWORD PTR gd[rip]
	mov	DWORD PTR 4[rax], r12d
	mov	DWORD PTR 8[rbp], 4
	test	ecx, ecx
	je	.L4
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
.L5:
	mov	rdi, rbp
	call	kfree@PLT
	mov	eax, r12d
	pop	rbp
	.cfi_remember_state
	.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	edi, DWORD PTR gd[rip+8]
	mov	rsi, rbp
	mov	DWORD PTR gd[rip], 1
	call	gdrom_packetcommand@PLT
	mov	eax, DWORD PTR gd[rip]
	xor	esi, esi
	mov	edx, DWORD PTR GDROM_DEFAULT_TIMEOUT[rip]
	mov	edi, DWORD PTR command_queue[rip]
	test	eax, eax
	sete	sil
	call	wait_event_interruptible_timeout@PLT
	mov	edx, DWORD PTR gd[rip]
	test	edx, edx
	je	.L6
.L12:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L7:
	mov	DWORD PTR gd[rip], 0
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, DWORD PTR GDROM_DATA_REG[rip]
	call	PHYSADDR@PLT
	mov	edx, 2
	mov	rsi, r13
	mov	edi, eax
	call	insw@PLT
	mov	r12d, DWORD PTR gd[rip+4]
	and	r12d, 1
	je	.L7
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r12d, DWORD PTR ENOMEM[rip]
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	gdrom_readtoc_cmd, .-gdrom_readtoc_cmd
	.comm	gd,12,8
	.comm	command_queue,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GDROM_DEFAULT_TIMEOUT,4,4
	.comm	GDROM_DATA_REG,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,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_gdrom.c_gdrom_readtoc_cmd.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gdrom_readtoc_cmd, %function
gdrom_readtoc_cmd:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	ldr	r1, .L15
	mov	r7, r0
	ldr	r1, [r1]
	mov	r0, #8
	bl	kzalloc
	subs	r4, r0, #0
	beq	.L14
	mov	r1, #20
	mov	r0, #0
	mov	r2, #4
	ldr	r3, [r4]
	ldr	r6, .L15+4
	str	r1, [r3]
	ldr	r1, [r6]
	str	r5, [r3, #4]
	cmp	r1, r0
	str	r0, [r3, #12]
	str	r2, [r3, #16]
	str	r2, [r4, #4]
	beq	.L4
	ldr	r3, .L15+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L5:
	mov	r0, r4
	bl	kfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	mov	r3, #1
	mov	r1, r4
	ldr	r0, [r6, #8]
	str	r3, [r6]
	bl	gdrom_packetcommand
	ldr	r1, [r6]
	ldr	r3, .L15+12
	clz	r1, r1
	ldr	r2, .L15+16
	ldr	r0, [r3]
	ldr	r2, [r2]
	lsr	r1, r1, #5
	bl	wait_event_interruptible_timeout
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L6
.L12:
	ldr	r3, .L15+20
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L7:
	mov	r3, #0
	str	r3, [r6]
	b	.L5
.L6:
	ldr	r3, .L15+24
	ldr	r0, [r3]
	bl	PHYSADDR
	mov	r1, r7
	mov	r2, #2
	bl	insw
	ldr	r5, [r6, #4]
	ands	r5, r5, #1
	beq	.L7
	b	.L12
.L14:
	ldr	r3, .L15+28
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	.align	2
.L15:
	.word	GFP_KERNEL
	.word	gd
	.word	EBUSY
	.word	command_queue
	.word	GDROM_DEFAULT_TIMEOUT
	.word	EINVAL
	.word	GDROM_DATA_REG
	.word	ENOMEM
	.size	gdrom_readtoc_cmd, .-gdrom_readtoc_cmd
	.comm	gd,12,4
	.comm	command_queue,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GDROM_DEFAULT_TIMEOUT,4,4
	.comm	GDROM_DATA_REG,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
