	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvd_read_physical
_dvd_read_physical:                     ## @dvd_read_physical
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	8(%rsi), %r12d
	movq	_DVD_LAYERS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %r13
	movq	_CGC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-80(%rbp), %rsi
	movq	%rdx, %rdi
	movl	$21, %edx
	callq	_init_cdrom_command
	movq	_GPCMD_READ_DVD_STRUCTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	%r12d, 24(%rcx)
	movl	(%r15), %eax
	movl	%eax, 28(%rcx)
	movzbl	8(%rbx), %eax
	movl	%eax, 36(%rcx)
	movl	$1, 12(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	*(%r13)
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movslq	%r12d, %rax
	movq	16(%r15), %r15
	leaq	(%rax,%rax,2), %rcx
	leaq	(%rax,%rcx,4), %rbx
	leaq	(%r15,%rbx), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$13, %edx
	callq	_memset
	movb	-76(%rbp), %al
	andb	$15, %al
	movb	%al, (%r15,%rbx)
	movb	-76(%rbp), %al
	shrb	$4, %al
	movb	%al, 1(%r15,%rbx)
	movb	-75(%rbp), %al
	andb	$15, %al
	movb	%al, 2(%r15,%rbx)
	movb	-75(%rbp), %al
	shrb	$4, %al
	movb	%al, 3(%r15,%rbx)
	movb	-74(%rbp), %al
	andb	$15, %al
	movb	%al, 4(%r15,%rbx)
	movb	-74(%rbp), %al
	shrb	$4, %al
	andb	$1, %al
	movb	%al, 5(%r15,%rbx)
	movb	-74(%rbp), %al
	shrb	$5, %al
	andb	$3, %al
	movb	%al, 6(%r15,%rbx)
	movb	-73(%rbp), %al
	andb	$15, %al
	movb	%al, 7(%r15,%rbx)
	movb	-73(%rbp), %al
	shrb	$4, %al
	movb	%al, 8(%r15,%rbx)
	movb	-69(%rbp), %al
	movb	%al, 9(%r15,%rbx)
	movb	-65(%rbp), %al
	movb	%al, 10(%r15,%rbx)
	movb	-61(%rbp), %al
	movb	%al, 11(%r15,%rbx)
	movb	-60(%rbp), %al
	shrb	$7, %al
	movb	%al, 12(%r15,%rbx)
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DVD_LAYERS,4,2                 ## @DVD_LAYERS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CGC_DATA_READ,4,2              ## @CGC_DATA_READ
	.comm	_GPCMD_READ_DVD_STRUCTURE,4,2   ## @GPCMD_READ_DVD_STRUCTURE
	.no_dead_strip	_dvd_read_physical
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvd_read_physical
_dvd_read_physical:                     ; @dvd_read_physical
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w22, [x1, #8]
Lloh3:
	adrp	x8, _DVD_LAYERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DVD_LAYERS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ge	LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x23, [x0]
Lloh6:
	adrp	x8, _CGC_DATA_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CGC_DATA_READ@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x1, sp, #3
	mov	x0, x2
	mov	w2, #21
	bl	_init_cdrom_command
Lloh9:
	adrp	x8, _GPCMD_READ_DVD_STRUCTURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPCMD_READ_DVD_STRUCTURE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x20]
	str	w8, [x9]
	str	w22, [x9, #24]
	ldr	w8, [x19]
	str	w8, [x9, #28]
	ldrb	w8, [x20, #8]
	str	w8, [x9, #36]
	mov	w8, #1
	str	w8, [x20, #12]
	ldr	x8, [x23]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	cbnz	w0, LBB0_4
; %bb.2:
	sxtw	x8, w22
	ldr	x9, [x19, #16]
	mov	w10, #13
	madd	x19, x8, x10, x9
	mov	x0, x19
	mov	w1, #0
	mov	w2, #13
	bl	_memset
	mov	w0, #0
	ldrb	w8, [sp, #7]
	and	w8, w8, #0xf
	strb	w8, [x19]
	ldrb	w8, [sp, #7]
	lsr	w8, w8, #4
	strb	w8, [x19, #1]
	ldrb	w8, [sp, #8]
	and	w8, w8, #0xf
	strb	w8, [x19, #2]
	ldrb	w8, [sp, #8]
	lsr	w8, w8, #4
	strb	w8, [x19, #3]
	ldrb	w8, [sp, #9]
	and	w8, w8, #0xf
	strb	w8, [x19, #4]
	ldrb	w8, [sp, #9]
	ubfx	w8, w8, #4, #1
	strb	w8, [x19, #5]
	ldrb	w8, [sp, #9]
	ubfx	w8, w8, #5, #2
	strb	w8, [x19, #6]
	ldrb	w8, [sp, #10]
	and	w8, w8, #0xf
	strb	w8, [x19, #7]
	ldrb	w8, [sp, #10]
	lsr	w8, w8, #4
	strb	w8, [x19, #8]
	ldrb	w8, [sp, #14]
	strb	w8, [x19, #9]
	ldrb	w8, [sp, #18]
	strb	w8, [x19, #10]
	ldrb	w8, [sp, #22]
	strb	w8, [x19, #11]
	ldrb	w8, [sp, #23]
	lsr	w8, w8, #7
	strb	w8, [x19, #12]
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DVD_LAYERS,4,2                 ; @DVD_LAYERS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CGC_DATA_READ,4,2              ; @CGC_DATA_READ
	.comm	_GPCMD_READ_DVD_STRUCTURE,4,2   ; @GPCMD_READ_DVD_STRUCTURE
	.no_dead_strip	_dvd_read_physical
.subsections_via_symbols
