	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdrom_readtoc_cmd
_gdrom_readtoc_cmd:                     ## @gdrom_readtoc_cmd
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	(%rax), %rax
	movl	$20, (%rax)
	movl	%ebx, 4(%rax)
	movabsq	$17179869184, %rcx              ## imm = 0x400000000
	movq	%rcx, 12(%rax)
	movl	$4, 8(%r15)
	movq	_gd@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movl	$1, (%r12)
	movl	8(%r12), %edi
	movq	%r15, %rsi
	callq	_gdrom_packetcommand
	movq	_command_queue@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	$0, (%r12)
	movl	(%rax), %edi
	sete	%sil
	movq	_GDROM_DEFAULT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_wait_event_interruptible_timeout
	cmpl	$0, (%r12)
	jne	LBB0_6
## %bb.5:
	movq	_GDROM_DATA_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PHYSADDR
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$2, %edx
	callq	_insw
	xorl	%ebx, %ebx
	testb	$1, 4(%r12)
	je	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	$0, (%r12)
LBB0_8:
	movq	%r15, %rdi
	callq	_kfree
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_gd,12,2                        ## @gd
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_command_queue,4,2              ## @command_queue
	.comm	_GDROM_DEFAULT_TIMEOUT,4,2      ## @GDROM_DEFAULT_TIMEOUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GDROM_DATA_REG,4,2             ## @GDROM_DATA_REG
	.no_dead_strip	_gdrom_readtoc_cmd
.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 gdrom_readtoc_cmd
lCPI0_0:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_gdrom_readtoc_cmd:                     ; @gdrom_readtoc_cmd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	mov	w9, #20
	stp	w9, w21, [x8]
Lloh3:
	adrp	x9, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x8, #12]
	mov	w8, #4
	str	w8, [x0, #8]
Lloh5:
	adrp	x21, _gd@GOTPAGE
Lloh6:
	ldr	x21, [x21, _gd@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.2:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_3:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_4:
	mov	w8, #1
	str	w8, [x21]
	ldr	w0, [x21, #8]
	mov	x1, x19
	bl	_gdrom_packetcommand
Lloh13:
	adrp	x8, _command_queue@GOTPAGE
Lloh14:
	ldr	x8, [x8, _command_queue@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w1, eq
Lloh16:
	adrp	x8, _GDROM_DEFAULT_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GDROM_DEFAULT_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	bl	_wait_event_interruptible_timeout
	ldr	w8, [x21]
	cbnz	w8, LBB0_7
; %bb.5:
Lloh19:
	adrp	x8, _GDROM_DATA_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GDROM_DATA_REG@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_PHYSADDR
	mov	x1, x20
	mov	w2, #2
	bl	_insw
	ldrb	w8, [x21, #4]
	tbnz	w8, #0, LBB0_7
; %bb.6:
	mov	w20, #0
	b	LBB0_8
LBB0_7:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	str	wzr, [x21]
LBB0_9:
	mov	x0, x19
	bl	_kfree
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_gd,12,2                        ; @gd
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_command_queue,4,2              ; @command_queue
	.comm	_GDROM_DEFAULT_TIMEOUT,4,2      ; @GDROM_DEFAULT_TIMEOUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GDROM_DATA_REG,4,2             ; @GDROM_DATA_REG
	.no_dead_strip	_gdrom_readtoc_cmd
.subsections_via_symbols
