	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvd_read_bca
_dvd_read_bca:                          ## @dvd_read_bca
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$192, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_CGC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$192, %edx
	callq	_init_cdrom_command
	movq	_GPCMD_READ_DVD_STRUCTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	(%r14), %eax
	movl	%eax, 28(%rcx)
	movzbl	8(%rbx), %eax
	movl	%eax, 36(%rcx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	*(%r13)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	(%r15), %edx
	shll	$8, %edx
	orl	4(%r15), %edx
	movl	%edx, 4(%r14)
	leal	-189(%rdx), %eax
	cmpl	$-178, %eax
	ja	LBB0_5
## %bb.4:
	movq	_CD_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_cdinfo
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movl	8(%r14), %edi
	movq	%r15, %rsi
	addq	$16, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	xorl	%ebx, %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_kfree
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CGC_DATA_READ,4,2              ## @CGC_DATA_READ
	.comm	_GPCMD_READ_DVD_STRUCTURE,4,2   ## @GPCMD_READ_DVD_STRUCTURE
	.comm	_CD_WARNING,4,2                 ## @CD_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received invalid BCA length (%d)\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_dvd_read_bca
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvd_read_bca
_dvd_read_bca:                          ; @dvd_read_bca
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #192
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _CGC_DATA_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CGC_DATA_READ@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x19
	mov	w2, #192
	bl	_init_cdrom_command
Lloh6:
	adrp	x8, _GPCMD_READ_DVD_STRUCTURE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPCMD_READ_DVD_STRUCTURE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x21]
	str	w8, [x9]
	ldr	w8, [x20]
	str	w8, [x9, #28]
	ldrb	w8, [x21, #8]
	str	w8, [x9, #36]
	ldr	x8, [x23]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldp	w8, w9, [x19]
	orr	w2, w9, w8, lsl #8
	str	w2, [x20, #4]
	sub	w8, w2, #189
	cmn	w8, #178
	b.hi	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _CD_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CD_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_4:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20, #8]
	add	x1, x19, #16
	bl	_memcpy
	mov	w21, #0
LBB0_6:
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CGC_DATA_READ,4,2              ; @CGC_DATA_READ
	.comm	_GPCMD_READ_DVD_STRUCTURE,4,2   ; @GPCMD_READ_DVD_STRUCTURE
	.comm	_CD_WARNING,4,2                 ; @CD_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received invalid BCA length (%d)\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_dvd_read_bca
.subsections_via_symbols
