	.file	"extr_cdrom.c_cdrom_ram_open_write.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"can open for random write\n"
	.text
	.p2align 4
	.type	cdrom_ram_open_write, @function
cdrom_ram_open_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	cdrom_has_defect_mgt@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L7
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rsi, rsp
	mov	rdi, rbp
	call	cdrom_get_random_writable@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edi, DWORD PTR 4[rsp]
	call	be16_to_cpu@PLT
	cmp	rax, QWORD PTR CDF_RWRT[rip]
	je	.L9
.L3:
	mov	edi, DWORD PTR CD_OPEN[rip]
	lea	rsi, .LC0[rip]
	call	cd_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR [rsp]
	xor	r12d, r12d
	test	eax, eax
	sete	r12b
	jmp	.L3
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cdrom_ram_open_write, .-cdrom_ram_open_write
	.comm	CD_OPEN,4,4
	.comm	CDF_RWRT,8,8
	.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_ram_open_write.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"can open for random write\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cdrom_ram_open_write, %function
cdrom_ram_open_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L9
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	cdrom_has_defect_mgt
	subs	r4, r0, #0
	beq	.L7
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L7:
	mov	r0, r5
	add	r1, sp, #4
	bl	cdrom_get_random_writable
	subs	r4, r0, #0
	bne	.L1
	ldr	r0, [sp, #8]
	bl	be16_to_cpu
	ldr	r3, .L9+4
	ldr	r1, .L9+8
	ldr	r3, [r3]
	cmp	r0, r3
	ldreq	r0, [sp, #4]
	ldr	r3, .L9+12
	clzeq	r4, r0
	ldr	r0, [r3]
	lsreq	r4, r4, #5
	bl	cd_dbg
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	CDF_RWRT
	.word	.LC0
	.word	CD_OPEN
	.size	cdrom_ram_open_write, .-cdrom_ram_open_write
	.comm	CD_OPEN,4,4
	.comm	CDF_RWRT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
