	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcd_audio_ioctl
_pcd_audio_ioctl:                       ## @pcd_audio_ioctl
	.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	$64, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %rdi
	cmpl	$129, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$128, %esi
	jne	LBB0_8
## %bb.2:
	movq	_GPCMD_READ_TOC_PMA_ATIP@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -36(%rbp)
	movabsq	$51539607552, %rax              ## imm = 0xC00000000
	movq	%rax, -32(%rbp)
	movl	$0, -35(%rbp)
	leaq	L_.str(%rip), %r8
	xorl	%ebx, %ebx
	leaq	-36(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	movl	$12, %edx
	xorl	%eax, %eax
	callq	_pcd_atapi
	movb	-78(%rbp), %cl
	movb	%cl, (%r14)
	movb	-77(%rbp), %cl
	movb	%cl, 1(%r14)
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	movq	_GPCMD_READ_TOC_PMA_ATIP@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -36(%rbp)
	movl	$0, -34(%rbp)
	movw	$0, -30(%rbp)
	movl	$12, -28(%rbp)
	movl	12(%r14), %eax
	movq	_CDROM_MSF@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	sete	%al
	addb	%al, %al
	movb	%al, -35(%rbp)
	movb	(%r14), %al
	movb	%al, -30(%rbp)
	leaq	L_.str.1(%rip), %r8
	leaq	-36(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	movl	$12, %edx
	xorl	%eax, %eax
	callq	_pcd_atapi
	movzbl	-75(%rbp), %ecx
	movl	%ecx, %edx
	andb	$15, %dl
	movb	%dl, 1(%r14)
	movl	%ecx, %edx
	shrb	$4, %dl
	movb	%dl, 2(%r14)
	shrl	$2, %ecx
	andl	$1, %ecx
	movl	%ecx, 4(%r14)
	movl	12(%r14), %ecx
	cmpl	(%rbx), %ecx
	jne	LBB0_5
## %bb.4:
	movb	-71(%rbp), %cl
	movb	%cl, 9(%r14)
	movb	-70(%rbp), %cl
	movb	%cl, 10(%r14)
	movb	-69(%rbp), %cl
	movb	%cl, 11(%r14)
	jmp	LBB0_6
LBB0_8:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	movb	-69(%rbp), %cl
	movb	%cl, 8(%r14)
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovel	%eax, %ebx
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%ebx, %eax
	addq	$64, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GPCMD_READ_TOC_PMA_ATIP,4,2    ## @GPCMD_READ_TOC_PMA_ATIP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read toc header"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_CDROM_MSF,4,2                  ## @CDROM_MSF
L_.str.1:                               ## @.str.1
	.asciz	"read toc entry"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.no_dead_strip	_pcd_audio_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcd_audio_ioctl
_pcd_audio_ioctl:                       ; @pcd_audio_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x0, [x0]
	cmp	w1, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #128
	b.ne	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _GPCMD_READ_TOC_PMA_ATIP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GPCMD_READ_TOC_PMA_ATIP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sturb	w8, [x29, #-36]
	stur	wzr, [x29, #-35]
	mov	x8, #51539607552
	stur	x8, [x29, #-32]
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	add	x9, sp, #28
	stp	x9, x8, [sp]
	sub	x1, x29, #36
	mov	w2, #12
	bl	_pcd_atapi
	ldrh	w8, [sp, #30]
	strh	w8, [x19]
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _GPCMD_READ_TOC_PMA_ATIP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPCMD_READ_TOC_PMA_ATIP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	sturb	w8, [x29, #-36]
	stur	wzr, [x29, #-34]
	sturh	wzr, [x29, #-30]
	mov	w8, #12
	stur	w8, [x29, #-28]
	ldr	w8, [x19, #12]
Lloh11:
	adrp	x20, _CDROM_MSF@GOTPAGE
Lloh12:
	ldr	x20, [x20, _CDROM_MSF@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	cset	w8, eq
	lsl	w8, w8, #1
	sturb	w8, [x29, #-35]
	ldrb	w8, [x19]
	sturb	w8, [x29, #-30]
Lloh13:
	adrp	x8, l_.str.1@PAGE
Lloh14:
	add	x8, x8, l_.str.1@PAGEOFF
	add	x9, sp, #28
	stp	x9, x8, [sp]
	sub	x1, x29, #36
	mov	w2, #12
	bl	_pcd_atapi
	ldrb	w8, [sp, #33]
	and	w9, w8, #0xf
	strb	w9, [x19, #1]
	lsr	w9, w8, #4
	strb	w9, [x19, #2]
	ubfx	w8, w8, #2, #1
	str	w8, [x19, #4]
	ldr	w8, [x19, #12]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.4:
	ldrb	w8, [sp, #37]
	strb	w8, [x19, #9]
	ldrh	w8, [sp, #38]
	strh	w8, [x19, #10]
	b	LBB0_7
LBB0_5:
Lloh15:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_6:
	ldrb	w8, [sp, #39]
	strb	w8, [x19, #8]
LBB0_7:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, eq
LBB0_8:
	ldur	x8, [x29, #-24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GPCMD_READ_TOC_PMA_ATIP,4,2    ; @GPCMD_READ_TOC_PMA_ATIP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read toc header"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_CDROM_MSF,4,2                  ; @CDROM_MSF
l_.str.1:                               ; @.str.1
	.asciz	"read toc entry"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.no_dead_strip	_pcd_audio_ioctl
.subsections_via_symbols
