	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function viocd_packet
_viocd_packet:                          ## @viocd_packet
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	(%rsi), %r15d
	movq	8(%rsi), %rcx
	movl	(%rcx), %edx
	cmpl	$129, %edx
	je	LBB0_5
## %bb.1:
	cmpl	$128, %edx
	jne	LBB0_9
## %bb.2:
	cmpl	$2, %r15d
	jb	LBB0_11
## %bb.3:
	movq	32(%rbx), %r12
	movl	$1, %edi
	callq	_cpu_to_be16
	movq	%rax, 8(%r12)
	xorl	%eax, %eax
	cmpl	$2, %r15d
	je	LBB0_11
## %bb.4:
	movq	8(%r14), %rcx
	movl	(%r14), %edx
	notl	%edx
	andl	(%rcx), %edx
	movq	_CDC_DVD_RAM@GOTPCREL(%rip), %rcx
	movq	_CDC_RAM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %esi
	xorl	%ecx, %ecx
	testl	%esi, %edx
	setne	%cl
	movl	%ecx, (%r12)
	jmp	LBB0_11
LBB0_5:
	movl	12(%rcx), %edi
	movq	_CDF_RWRT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	jne	LBB0_11
## %bb.6:
	cmpl	$20, %r15d
	jb	LBB0_11
## %bb.7:
	movq	8(%r14), %rcx
	movl	(%r14), %edx
	notl	%edx
	andl	(%rcx), %edx
	movq	_CDC_DVD_RAM@GOTPCREL(%rip), %rcx
	movq	_CDC_RAM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rcx), %esi
	testl	%esi, %edx
	je	LBB0_11
## %bb.8:
	movq	32(%rbx), %r14
	callq	_cpu_to_be16
	movq	%rax, 12(%r14)
	movl	$1, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movq	24(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movabsq	$137438953477, %rdx             ## imm = 0x2000000005
	movq	%rdx, (%rcx)
	movl	$0, 8(%rcx)
LBB0_11:
	movl	%eax, 16(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_CDC_DVD_RAM,4,2                ## @CDC_DVD_RAM
	.comm	_CDC_RAM,4,2                    ## @CDC_RAM
	.comm	_CDF_RWRT,4,2                   ## @CDF_RWRT
	.no_dead_strip	_viocd_packet
.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 viocd_packet
lCPI0_0:
	.long	5                               ; 0x5
	.long	32                              ; 0x20
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_viocd_packet:                          ; @viocd_packet
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	ldr	w21, [x1]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldr	x8, [x1, #8]
	ldr	w9, [x8]
	cmp	w9, #129
	b.eq	LBB0_5
; %bb.1:
	cmp	w9, #128
	b.ne	LBB0_9
; %bb.2:
	cmp	w21, #2
	b.lo	LBB0_12
; %bb.3:
	ldr	x22, [x19, #32]
	mov	w0, #1
	bl	_cpu_to_be16
	str	x0, [x22, #8]
	cmp	w21, #2
	b.ne	LBB0_11
; %bb.4:
	mov	w0, #0
	b	LBB0_12
LBB0_5:
	ldr	w8, [x8, #12]
Lloh3:
	adrp	x9, _CDF_RWRT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CDF_RWRT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.6:
	cmp	w21, #20
	b.lo	LBB0_12
; %bb.7:
	ldr	x9, [x20, #8]
	ldr	w9, [x9]
	ldr	w10, [x20]
	bic	w9, w9, w10
Lloh6:
	adrp	x10, _CDC_DVD_RAM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CDC_DVD_RAM@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _CDC_RAM@GOTPAGE
Lloh10:
	ldr	x11, [x11, _CDC_RAM@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w9, w10
	b.eq	LBB0_12
; %bb.8:
	ldr	x20, [x19, #32]
	mov	x0, x8
	bl	_cpu_to_be16
	mov	x8, x0
	mov	w0, #0
	stur	x8, [x20, #12]
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_12
LBB0_9:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_12
; %bb.10:
Lloh12:
	adrp	x9, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x8]
	str	wzr, [x8, #8]
	b	LBB0_12
LBB0_11:
	mov	w0, #0
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w8, w9
Lloh14:
	adrp	x9, _CDC_DVD_RAM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CDC_DVD_RAM@GOTPAGEOFF]
Lloh16:
	adrp	x10, _CDC_RAM@GOTPAGE
Lloh17:
	ldr	x10, [x10, _CDC_RAM@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w8, w9
	cset	w8, ne
	str	w8, [x22]
LBB0_12:
	str	w0, [x19, #16]
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_CDC_DVD_RAM,4,2                ; @CDC_DVD_RAM
	.comm	_CDC_RAM,4,2                    ; @CDC_RAM
	.comm	_CDF_RWRT,4,2                   ; @CDF_RWRT
	.no_dead_strip	_viocd_packet
.subsections_via_symbols
