	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpga_reader_seek
_mpga_reader_seek:                      ## @mpga_reader_seek
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	callq	_STREAM_POSITION
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edi
	callq	_VC_CONTAINER_PARAM_UNUSED
	movq	_VC_CONTAINER_SEEK_MODE_TIME@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_STREAM_SEEKABLE
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movl	(%r14), %ebx
	xorl	%edi, %edi
	callq	_INT64_C
	cmpl	%eax, %ebx
	jne	LBB0_4
## %bb.3:
	movq	24(%r15), %rsi
	jmp	LBB0_13
LBB0_4:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.5:
	cmpq	$0, 56(%r15)
	je	LBB0_11
## %bb.6:
	movl	(%r15), %eax
	movl	8(%r15), %ecx
	imull	(%r14), %eax
	imull	4(%r15), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebx
	movl	$999999, %edi                   ## imm = 0xF423F
	callq	_INT64_C
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_MIN
	movslq	%eax, %rbx
	imulq	$1759218605, %rbx, %rcx         ## imm = 0x68DB8BAD
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$44, %rcx
	addl	%eax, %ecx
	imull	$10000, %ecx, %edx              ## imm = 0x2710
	movl	%ebx, %eax
	subl	%edx, %eax
	movq	16(%r15), %rsi
	movslq	%ecx, %rdi
	movl	(%rsi,%rdi,4), %ecx
	movl	$256, %edx                      ## imm = 0x100
	cmpl	$989999, %ebx                   ## imm = 0xF1B2F
	jg	LBB0_8
## %bb.7:
	movl	4(%rsi,%rdi,4), %edx
LBB0_8:
	movl	32(%r15), %esi
	subl	%ecx, %edx
	imull	%eax, %edx
	imull	%esi, %edx
	imull	%ecx, %esi
	movslq	%edx, %rax
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$44, %rax
	addl	%ecx, %eax
	addl	%esi, %eax
	sarl	$8, %eax
	movslq	%eax, %rsi
	jmp	LBB0_12
LBB0_9:
	movq	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	32(%r15), %eax
	imull	(%r14), %eax
	cltd
	idivl	%ecx
	movslq	%eax, %rsi
LBB0_12:
	addq	24(%r15), %rsi
LBB0_13:
	movq	%r12, %rdi
	callq	_SEEK
	movq	%r12, %rdi
	callq	_mpga_sync
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	%rax, %rbx
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_SEEK
	jmp	LBB0_10
LBB0_16:
	movl	4(%r15), %ecx
	imull	(%r14), %ecx
	movl	(%r12), %esi
	movl	%esi, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%eax, 36(%r15)
	movq	%r12, %rdi
	callq	_STREAM_POSITION
	subq	24(%r15), %rax
	movq	%rax, 48(%r15)
	movq	%r12, %rdi
	callq	_mpga_calculate_frame_time
	movl	%eax, 40(%r15)
	movl	%eax, (%r14)
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_SEEK_MODE_TIME,8,3 ## @VC_CONTAINER_SEEK_MODE_TIME
	.comm	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION,8,3 ## @VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ## @VC_CONTAINER_ERROR_EOS
	.no_dead_strip	_mpga_reader_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpga_reader_seek
_mpga_reader_seek:                      ; @mpga_reader_seek
	.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	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	bl	_STREAM_POSITION
	mov	x21, x0
	mov	x0, x22
	bl	_VC_CONTAINER_PARAM_UNUSED
Lloh0:
	adrp	x8, _VC_CONTAINER_SEEK_MODE_TIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_SEEK_MODE_TIME@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_STREAM_SEEKABLE
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w22, [x20]
	mov	w0, #0
	bl	_INT64_C
	cmp	w22, w0
	b.ne	LBB0_4
; %bb.3:
	ldr	x1, [x24, #24]
	b	LBB0_13
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.5:
	ldr	x9, [x24, #56]
	cbz	x9, LBB0_10
; %bb.6:
	ldr	w8, [x20]
	ldp	w9, w10, [x24]
	mul	w8, w9, w8
	ldr	w9, [x24, #8]
	mul	w9, w9, w10
	sdiv	w22, w8, w9
	mov	w0, #16959
	movk	w0, #15, lsl #16
	bl	_INT64_C
	mov	x1, x0
	mov	x0, x22
	bl	_MIN
	mov	w8, #35757
	movk	w8, #26843, lsl #16
	smull	x9, w0, w8
	lsr	x10, x9, #63
	asr	x9, x9, #44
	add	w11, w9, w10
	mov	w9, #10000
	msub	w10, w11, w9, w0
	ldr	x12, [x24, #16]
	ldr	w9, [x12, w11, sxtw #2]
	mov	w13, #6959
	movk	w13, #15, lsl #16
	cmp	w0, w13
	b.gt	LBB0_11
; %bb.7:
	sxtw	x11, w11
	add	x11, x12, x11, lsl #2
	ldr	w11, [x11, #4]
	b	LBB0_12
LBB0_8:
Lloh3:
	adrp	x8, _VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
	ldr	x9, [x24, #24]
	ldr	w10, [x20]
	ldr	w11, [x24, #32]
	mul	w10, w11, w10
	sdiv	w8, w10, w8
	add	x1, x9, w8, sxtw
	b	LBB0_13
LBB0_11:
	mov	w11, #256
LBB0_12:
	ldr	x12, [x24, #24]
	ldr	w13, [x24, #32]
	sub	w11, w11, w9
	mul	w10, w11, w10
	mul	w10, w10, w13
	smull	x8, w10, w8
	lsr	x10, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w10, asr #12
	madd	w8, w13, w9, w8
	asr	w8, w8, #8
	add	x1, x12, w8, sxtw
LBB0_13:
	mov	x0, x19
	bl	_SEEK
	mov	x0, x19
	bl	_mpga_sync
	cbz	x0, LBB0_16
; %bb.14:
	mov	x22, x0
Lloh6:
	adrp	x8, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_16
; %bb.15:
	mov	x0, x19
	mov	x1, x21
	bl	_SEEK
	b	LBB0_9
LBB0_16:
	ldr	w8, [x20]
	ldr	w9, [x24, #4]
	mul	w8, w9, w8
	ldr	w9, [x19]
	add	w8, w8, w9, asr #1
	sdiv	w8, w8, w9
	str	w8, [x24, #36]
	mov	x0, x19
	bl	_STREAM_POSITION
	ldr	x8, [x24, #24]
	sub	x8, x0, x8
	str	x8, [x24, #48]
	mov	x0, x19
	bl	_mpga_calculate_frame_time
	str	w0, [x24, #40]
	str	w0, [x20]
	mov	x0, x19
	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
	b	_STREAM_STATUS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_SEEK_MODE_TIME,8,3 ; @VC_CONTAINER_SEEK_MODE_TIME
	.comm	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION,8,3 ; @VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ; @VC_CONTAINER_ERROR_EOS
	.no_dead_strip	_mpga_reader_seek
.subsections_via_symbols
