	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_ram_open_write
_cdrom_ram_open_write:                  ## @cdrom_ram_open_write
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_cdrom_has_defect_mgt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_cdrom_get_random_writable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_CDF_RWRT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	-20(%rbp), %edi
	callq	_be16_to_cpu
	cmpq	%rax, %rbx
	sete	%al
	cmpl	$0, -24(%rbp)
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %ebx
	movq	_CD_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_cdinfo
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDF_RWRT,8,3                   ## @CDF_RWRT
	.comm	_CD_OPEN,4,2                    ## @CD_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can open for random write\n"

	.no_dead_strip	_cdrom_ram_open_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_ram_open_write
_cdrom_ram_open_write:                  ; @cdrom_ram_open_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_cdrom_has_defect_mgt
	mov	x19, x0
	cbnz	w0, LBB0_3
; %bb.1:
	add	x1, sp, #8
	mov	x0, x20
	bl	_cdrom_get_random_writable
	mov	x19, x0
	cbnz	w0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _CDF_RWRT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDF_RWRT@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	ldr	w0, [sp, #12]
	bl	_be16_to_cpu
	cmp	x19, x0
	ldr	w8, [sp, #8]
	ccmp	w8, #0, #0, eq
	cset	w19, eq
Lloh3:
	adrp	x8, _CD_OPEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CD_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CDF_RWRT,8,3                   ; @CDF_RWRT
	.comm	_CD_OPEN,4,2                    ; @CD_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can open for random write\n"

	.no_dead_strip	_cdrom_ram_open_write
.subsections_via_symbols
