	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function voc_write_packet
_voc_write_packet:                      ## @voc_write_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, %r14
	movq	16(%rdi), %r15
	movq	8(%rdi), %rbx
	cmpl	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_VOC_TYPE_VOICE_DATA_CONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_avio_wl24
	jmp	LBB0_8
LBB0_2:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	cmpl	$4, (%r12)
	jl	LBB0_4
## %bb.3:
	movq	_VOC_TYPE_NEW_VOICE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	(%r14), %esi
	addl	$12, %esi
	movq	%rbx, %rdi
	callq	_avio_wl24
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl32
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	12(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wl32
	jmp	LBB0_7
LBB0_4:
	cmpl	$2, 12(%r12)
	jl	LBB0_6
## %bb.5:
	movq	_VOC_TYPE_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_wl24
	movl	12(%r12), %ecx
	imull	4(%r12), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	addl	$256000000, %eax                ## imm = 0xF424000
	cltd
	idivl	%ecx
	movl	$65536, %esi                    ## imm = 0x10000
	subl	%eax, %esi
	movq	%rbx, %rdi
	callq	_avio_wl16
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	12(%r12), %esi
	decl	%esi
	movq	%rbx, %rdi
	callq	_avio_w8
LBB0_6:
	movq	_VOC_TYPE_VOICE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	(%r14), %esi
	addl	$2, %esi
	movq	%rbx, %rdi
	callq	_avio_wl24
	movl	4(%r12), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	addl	$1000000, %eax                  ## imm = 0xF4240
	cltd
	idivl	%ecx
	movl	$256, %esi                      ## imm = 0x100
	subl	%eax, %esi
	movq	%rbx, %rdi
	callq	_avio_w8
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_avio_w8
LBB0_7:
	movl	$1, (%r15)
LBB0_8:
	movl	(%r14), %edx
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	callq	_avio_write
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VOC_TYPE_NEW_VOICE_DATA,4,2    ## @VOC_TYPE_NEW_VOICE_DATA
	.comm	_VOC_TYPE_EXTENDED,4,2          ## @VOC_TYPE_EXTENDED
	.comm	_VOC_TYPE_VOICE_DATA,4,2        ## @VOC_TYPE_VOICE_DATA
	.comm	_VOC_TYPE_VOICE_DATA_CONT,4,2   ## @VOC_TYPE_VOICE_DATA_CONT
	.no_dead_strip	_voc_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function voc_write_packet
_voc_write_packet:                      ; @voc_write_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
	ldp	x20, x21, [x0, #8]
	ldr	w8, [x21]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _VOC_TYPE_VOICE_DATA_CONT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VOC_TYPE_VOICE_DATA_CONT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_w8
	ldr	w1, [x19]
	mov	x0, x20
	bl	_avio_wl24
	b	LBB0_8
LBB0_2:
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	w8, [x22]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _VOC_TYPE_NEW_VOICE_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VOC_TYPE_NEW_VOICE_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_w8
	ldr	w8, [x19]
	add	w1, w8, #12
	mov	x0, x20
	bl	_avio_wl24
	ldr	w1, [x22, #4]
	mov	x0, x20
	bl	_avio_wl32
	ldr	w1, [x22, #8]
	mov	x0, x20
	bl	_avio_w8
	ldr	w1, [x22, #12]
	mov	x0, x20
	bl	_avio_w8
	ldr	w1, [x22]
	mov	x0, x20
	bl	_avio_wl16
	mov	x0, x20
	mov	w1, #0
	bl	_avio_wl32
	b	LBB0_7
LBB0_4:
	ldr	w8, [x22, #12]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _VOC_TYPE_EXTENDED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VOC_TYPE_EXTENDED@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_w8
	mov	x0, x20
	mov	w1, #4
	bl	_avio_wl24
	ldr	w8, [x22, #4]
	ldr	w9, [x22, #12]
	mul	w8, w9, w8
	cmp	w8, #0
	cinc	w9, w8, lt
	mov	w10, #16384
	movk	w10, #3906, lsl #16
	add	w9, w10, w9, asr #1
	sdiv	w8, w9, w8
	mov	w9, #65536
	sub	w1, w9, w8
	mov	x0, x20
	bl	_avio_wl16
	ldr	w1, [x22]
	mov	x0, x20
	bl	_avio_w8
	ldr	w8, [x22, #12]
	sub	w1, w8, #1
	mov	x0, x20
	bl	_avio_w8
LBB0_6:
Lloh9:
	adrp	x8, _VOC_TYPE_VOICE_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VOC_TYPE_VOICE_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_avio_w8
	ldr	w8, [x19]
	add	w1, w8, #2
	mov	x0, x20
	bl	_avio_wl24
	ldr	w8, [x22, #4]
	cmp	w8, #0
	cinc	w9, w8, lt
	mov	w10, #16960
	movk	w10, #15, lsl #16
	add	w9, w10, w9, asr #1
	sdiv	w8, w9, w8
	mov	w9, #256
	sub	w1, w9, w8
	mov	x0, x20
	bl	_avio_w8
	ldr	w1, [x22]
	mov	x0, x20
	bl	_avio_w8
LBB0_7:
	mov	w8, #1
	str	w8, [x21]
LBB0_8:
	ldp	w2, w1, [x19]
	mov	x0, x20
	bl	_avio_write
	mov	w0, #0
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VOC_TYPE_NEW_VOICE_DATA,4,2    ; @VOC_TYPE_NEW_VOICE_DATA
	.comm	_VOC_TYPE_EXTENDED,4,2          ; @VOC_TYPE_EXTENDED
	.comm	_VOC_TYPE_VOICE_DATA,4,2        ; @VOC_TYPE_VOICE_DATA
	.comm	_VOC_TYPE_VOICE_DATA_CONT,4,2   ; @VOC_TYPE_VOICE_DATA_CONT
	.no_dead_strip	_voc_write_packet
.subsections_via_symbols
