	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvd_read_disckey
_dvd_read_disckey:                      ## @dvd_read_disckey
	.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, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_CGC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_init_cdrom_command
	movq	_GPCMD_READ_DVD_STRUCTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movl	(%r14), %eax
	movl	%eax, 28(%rcx)
	movabsq	$34359738368, %rax              ## imm = 0x800000000
	movq	%rax, 32(%rcx)
	movl	4(%r14), %eax
	shll	$6, %eax
	movl	%eax, 40(%rcx)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	*(%rbx)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	movq	%r13, %rsi
	addq	$16, %rsi
	movl	$4, %edx
	callq	_memcpy
LBB0_4:
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	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
	.no_dead_strip	_dvd_read_disckey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function dvd_read_disckey
lCPI0_0:
	.long	0                               ; 0x0
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dvd_read_disckey:                      ; @dvd_read_disckey
	.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, #8
	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, #8
	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]
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x9, #32]
	ldr	w8, [x20, #4]
	lsl	w8, w8, #6
	str	w8, [x9, #40]
	ldr	x8, [x23]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x20, #8]
	add	x1, x19, #16
	mov	w2, #4
	bl	_memcpy
LBB0_3:
	mov	x0, x19
	bl	_kfree
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	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 AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.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
	.no_dead_strip	_dvd_read_disckey
.subsections_via_symbols
