	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function qsynth_get_duration
LCPI0_0:
	.long	77                              ## 0x4d
	.long	84                              ## 0x54
	.long	114                             ## 0x72
	.long	107                             ## 0x6b
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_qsynth_get_duration:                   ## @qsynth_get_duration
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	$0, -96(%rbp)
	movq	$500000, -104(%rbp)             ## imm = 0x7A120
	movl	$1, -88(%rbp)
	movl	$1, -84(%rbp)
	movq	_HEADER_LENGTH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	$24, %edi
	callq	_malloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	$0, 8(%rax)
	movq	(%rbx), %rdx
	movq	24(%r15), %rax
	movq	%rdx, 16(%rax)
	leaq	24(%rax), %rcx
	movq	%rcx, (%rax)
	movq	24(%r15), %rax
	movq	(%rax), %rsi
	movq	%r13, %rdi
	callq	_PEEK_BYTES
	cmpq	(%rbx), %rax
	jne	LBB0_4
## %bb.2:
	movq	24(%r15), %rax
	movq	(%rax), %rdi
	leaq	-112(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	leaq	-88(%rbp), %rcx
	leaq	-84(%rbp), %r8
	callq	_qsynth_read_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_23
## %bb.3:
	movq	-112(%rbp), %rax
	movq	_MAX_TRACKS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_5
LBB0_4:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_5:
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_SKIP_BYTES
	movq	24(%r15), %r12
	movq	(%rbx), %rax
	movq	%rax, 8(%r15)
	cmpq	$0, -96(%rbp)
	jne	LBB0_7
## %bb.6:
	movl	-84(%rbp), %ecx
	imull	-88(%rbp), %ecx
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%ecx
	cltq
	movq	%rax, -104(%rbp)
	movq	$1, -96(%rbp)
LBB0_7:
	cmpq	$0, -112(%rbp)
	jle	LBB0_28
## %bb.8:
	leaq	8(%r15), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	xorl	%edx, %edx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	-176(%rbp), %rcx
	movq	-152(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, %rcx
	cmovgq	%rcx, %rax
	movq	8(%r12), %r12
	incq	%r14
	cmpq	-112(%rbp), %r14
	movq	%rbx, %r13
	jge	LBB0_25
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movl	$32, %edx
	movq	%r13, %rdi
	leaq	-80(%rbp), %rsi
	callq	_READ_BYTES
	cmpq	$32, %rax
	jne	LBB0_28
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movdqa	-80(%rbp), %xmm0
	pcmpeqd	LCPI0_0(%rip), %xmm0
	movmskps	%xmm0, %eax
	xorl	$15, %eax
	testb	$1, %al
	jne	LBB0_28
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %ecx
	andb	$2, %cl
	shrb	%cl
	jne	LBB0_28
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %ecx
	andb	$4, %cl
	shrb	$2, %cl
	jne	LBB0_28
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	shrb	$3, %al
	jne	LBB0_28
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rbx
	leaq	-64(%rbp), %rdi
	callq	_BI32
	cmpq	$1048576, %rax                  ## imm = 0x100000
	jg	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %r13
	leal	32(%rax), %edi
	callq	_malloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	8(%r13), %rcx
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	addq	%rcx, (%rdx)
	movq	$0, 8(%rax)
	movq	8(%r12), %rax
	movq	%rcx, 16(%rax)
	leaq	24(%rax), %rcx
	movq	%rcx, (%rax)
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	leaq	-80(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	8(%r12), %rax
	movq	(%rax), %rsi
	addq	$32, %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	callq	_READ_BYTES
	cmpq	%r13, %rax
	jne	LBB0_28
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r12), %rdi
	leaq	-176(%rbp), %rsi
	leaq	-160(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	leaq	-168(%rbp), %r8
	callq	_qsynth_read_track
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	testq	%rdx, %rdx
	jne	LBB0_9
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-104(%rbp), %rdx
	movq	-168(%rbp), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	-160(%rbp), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	jmp	LBB0_9
LBB0_21:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_31
## %bb.24:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	testq	%rdx, %rdx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rsi
	je	LBB0_28
## %bb.26:
	movq	24(%r15), %rcx
	movq	%rcx, 32(%r15)
	movq	$0, 16(%r15)
	subq	-120(%rbp), %rax                ## 8-byte Folded Reload
	imulq	%rdx, %rax
	addq	-128(%rbp), %rax                ## 8-byte Folded Reload
	movq	-96(%rbp), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_29
## %bb.27:
	cqto
	idivq	%rcx
	jmp	LBB0_30
LBB0_28:
	movq	_VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_29:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_30:
	movq	%rax, (%r13)
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, (%rax)
	movl	$4, 8(%rax)
	movl	(%rsi), %eax
	jmp	LBB0_23
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HEADER_LENGTH,8,3              ## @HEADER_LENGTH
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,4,2 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,4,2 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_SUCCESS,4,2       ## @VC_CONTAINER_SUCCESS
	.comm	_MAX_TRACKS,8,3                 ## @MAX_TRACKS
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,4,2 ## @VC_CONTAINER_ERROR_FORMAT_INVALID
	.no_dead_strip	_qsynth_get_duration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsynth_get_duration
_qsynth_get_duration:                   ; @qsynth_get_duration
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
	mov	w8, #41248
	movk	w8, #7, lsl #16
	stp	x8, xzr, [sp, #48]
	mov	w8, #1
	stp	w8, w8, [sp, #40]
Lloh3:
	adrp	x20, _HEADER_LENGTH@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HEADER_LENGTH@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w0, w8, #24
	bl	_malloc
	str	x0, [x22, #24]
	cbz	x0, LBB0_21
; %bb.1:
	str	xzr, [x0, #8]
	ldr	x2, [x20]
	ldr	x8, [x22, #24]
	str	x2, [x8, #16]
	add	x9, x8, #24
	str	x9, [x8]
	ldr	x8, [x22, #24]
	ldr	x1, [x8]
	mov	x0, x19
	bl	_PEEK_BYTES
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x22, #24]
	ldr	x0, [x8]
	add	x1, sp, #64
	add	x2, sp, #56
	add	x3, sp, #44
	add	x4, sp, #40
	bl	_qsynth_read_header
Lloh5:
	adrp	x24, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_23
; %bb.3:
	ldr	x8, [sp, #64]
Lloh7:
	adrp	x9, _MAX_TRACKS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_TRACKS@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
	b	LBB0_22
LBB0_5:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_SKIP_BYTES
	ldr	x8, [x20]
	mov	x9, x22
	str	x8, [x9, #8]!
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [sp, #56]
	cbnz	x8, LBB0_7
; %bb.6:
	ldp	w9, w8, [sp, #40]
	mul	w8, w9, w8
	mov	w9, #16960
	movk	w9, #15, lsl #16
	sdiv	w8, w9, w8
	sxtw	x9, w8
	mov	w8, #1
	stp	x9, x8, [sp, #48]
LBB0_7:
	ldr	x8, [sp, #64]
	cmp	x8, #1
	b.lt	LBB0_25
; %bb.8:
	mov	x25, #0
	mov	x27, #0
	mov	x26, #0
	mov	x28, #0
	mov	x23, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x20, [x8, #16]
	add	x8, sp, #72
	add	x8, x8, #16
	str	x8, [sp]                        ; 8-byte Folded Spill
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #72
	mov	x0, x19
	mov	w2, #32
	bl	_READ_BYTES
	cmp	x0, #32
	b.ne	LBB0_25
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #72]
	cmp	w8, #77
	b.ne	LBB0_25
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #76]
	cmp	w8, #84
	b.ne	LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #80]
	cmp	w8, #114
	b.ne	LBB0_25
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #84]
	cmp	w8, #107
	b.ne	LBB0_25
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_BI32
	cmp	x0, #256, lsl #12               ; =1048576
	b.gt	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x21, x0
	add	w0, w21, #32
	bl	_malloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x8, x21, #8
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x9, [x10]
	add	x9, x9, x8
	str	x9, [x10]
	str	xzr, [x0, #8]
	ldr	x9, [x20, #8]
	str	x8, [x9, #16]
	add	x8, x9, #24
	str	x8, [x9]
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
	add	x1, sp, #72
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	add	x1, x8, #32
	mov	x0, x19
	mov	x2, x21
	bl	_READ_BYTES
	cmp	x0, x21
	b.ne	LBB0_25
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x0, [x20, #8]
	add	x1, sp, #32
	add	x2, sp, #16
	add	x3, sp, #48
	add	x4, sp, #24
	bl	_qsynth_read_track
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_23
; %bb.18:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [sp, #48]
	ldp	x10, x9, [sp, #16]
	cmp	x26, #0
	csel	x26, x8, x26, eq
	csel	x27, x9, x27, eq
	csel	x25, x10, x25, eq
	ldr	x8, [sp, #32]
	cmp	x8, x28
	csel	x28, x8, x28, gt
	ldr	x20, [x20, #8]
	add	x23, x23, #1
	ldr	x8, [sp, #64]
	cmp	x23, x8
	b.lt	LBB0_9
; %bb.19:
	cbz	x26, LBB0_25
; %bb.20:
	ldr	x8, [x22, #24]
	str	x8, [x22, #32]
	str	xzr, [x22, #16]
	sub	x8, x28, x27
	madd	x8, x8, x26, x25
	ldr	x9, [sp, #56]
	sdiv	x8, x8, x9
	str	x8, [x19]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	x9, [x8]
	mov	w9, #4
	str	w9, [x8, #8]
	ldr	w0, [x24]
	b	LBB0_23
LBB0_21:
Lloh12:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
LBB0_23:
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.24:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_25:
Lloh17:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGEOFF]
	b	LBB0_22
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_HEADER_LENGTH,8,3              ; @HEADER_LENGTH
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,4,2 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,4,2 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_SUCCESS,4,2       ; @VC_CONTAINER_SUCCESS
	.comm	_MAX_TRACKS,8,3                 ; @MAX_TRACKS
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,4,2 ; @VC_CONTAINER_ERROR_FORMAT_INVALID
	.no_dead_strip	_qsynth_get_duration
.subsections_via_symbols
