	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qsynth_reader_open             ## -- Begin function qsynth_reader_open
	.p2align	4, 0x90
_qsynth_reader_open:                    ## @qsynth_reader_open
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_HEADER_LENGTH@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_PEEK_BYTES
	cmpl	(%r12), %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_qsynth_read_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.3:
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%r14), %rax
	movq	%rbx, 16(%rax)
	movl	$1, (%r14)
	movq	%rbx, 24(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vc_container_allocate_track
	movq	24(%r14), %rcx
	movq	%rax, (%rcx)
	movq	24(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	_VC_CONTAINER_ES_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	8(%rax), %rdx
	movl	%ecx, 4(%rdx)
	movq	_VC_CONTAINER_CODEC_MIDI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movl	$1, (%rax)
	movq	%r14, %rdi
	callq	_qsynth_get_duration
	movq	%rax, %rbx
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	_VC_CONTAINER_CAPS_CAN_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	movq	8(%r14), %rax
	movq	_qsynth_reader_close@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_qsynth_reader_read@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_qsynth_reader_seek@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	(%r15), %rbx
	jmp	LBB0_10
LBB0_2:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	jmp	LBB0_10
LBB0_5:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	%r14, %rdi
	callq	_qsynth_reader_close
	jmp	LBB0_10
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_HEADER_LENGTH,4,2              ## @HEADER_LENGTH
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ES_TYPE_AUDIO,4,2 ## @VC_CONTAINER_ES_TYPE_AUDIO
	.comm	_VC_CONTAINER_CODEC_MIDI,4,2    ## @VC_CONTAINER_CODEC_MIDI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"using qsynth reader"

	.comm	_VC_CONTAINER_CAPS_CAN_SEEK,4,2 ## @VC_CONTAINER_CAPS_CAN_SEEK
	.comm	_qsynth_reader_read,4,2         ## @qsynth_reader_read
	.comm	_qsynth_reader_seek,4,2         ## @qsynth_reader_seek
L_.str.1:                               ## @.str.1
	.asciz	"qsynth: error opening stream (%i)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qsynth_reader_open             ; -- Begin function qsynth_reader_open
	.p2align	2
_qsynth_reader_open:                    ; @qsynth_reader_open
	.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
	sub	sp, sp, #16
	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, #-40]
Lloh3:
	adrp	x21, _HEADER_LENGTH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _HEADER_LENGTH@GOTPAGEOFF]
	ldr	w2, [x21]
	lsl	x8, x2, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_PEEK_BYTES
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_qsynth_read_header
Lloh7:
	adrp	x21, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh8:
	ldr	x21, [x21, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #8]
	str	x20, [x8, #16]
	mov	w22, #1
	str	w22, [x19]
	str	x20, [x19, #24]
	mov	x0, x19
	mov	w1, #0
	bl	_vc_container_allocate_track
	ldr	x8, [x19, #24]
	str	x0, [x8]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.4:
Lloh9:
	adrp	x9, _VC_CONTAINER_ES_TYPE_AUDIO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VC_CONTAINER_ES_TYPE_AUDIO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	x10, [x8, #8]
Lloh12:
	adrp	x11, _VC_CONTAINER_CODEC_MIDI@GOTPAGE
Lloh13:
	ldr	x11, [x11, _VC_CONTAINER_CODEC_MIDI@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	stp	w11, w9, [x10]
	str	w22, [x8]
	mov	x0, x19
	bl	_qsynth_get_duration
	mov	x20, x0
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
Lloh17:
	adrp	x8, _VC_CONTAINER_CAPS_CAN_SEEK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC_CONTAINER_CAPS_CAN_SEEK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x19, #8]
Lloh20:
	adrp	x9, _qsynth_reader_close@GOTPAGE
Lloh21:
	ldr	x9, [x9, _qsynth_reader_close@GOTPAGEOFF]
	str	x9, [x8, #8]
Lloh22:
	adrp	x9, _qsynth_reader_read@GOTPAGE
Lloh23:
	ldr	x9, [x9, _qsynth_reader_read@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _qsynth_reader_seek@GOTPAGE
Lloh26:
	ldr	x10, [x10, _qsynth_reader_seek@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	stp	w10, w9, [x8]
	ldr	x20, [x21]
	b	LBB0_7
LBB0_6:
Lloh28:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh30:
	ldr	x20, [x8]
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.8:
	mov	x0, x20
	sub	sp, x29, #32
	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
LBB0_9:
Lloh34:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh36:
	ldr	x20, [x8]
	str	x20, [sp, #-16]!
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	add	sp, sp, #16
	b	LBB0_7
LBB0_10:
Lloh39:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh41:
	ldr	x20, [x8]
LBB0_11:
	str	x20, [sp, #-16]!
Lloh42:
	adrp	x1, l_.str.1@PAGE
Lloh43:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	add	sp, sp, #16
	mov	x0, x19
	bl	_qsynth_reader_close
	b	LBB0_7
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_HEADER_LENGTH,4,2              ; @HEADER_LENGTH
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_ES_TYPE_AUDIO,4,2 ; @VC_CONTAINER_ES_TYPE_AUDIO
	.comm	_VC_CONTAINER_CODEC_MIDI,4,2    ; @VC_CONTAINER_CODEC_MIDI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"using qsynth reader"

	.comm	_VC_CONTAINER_CAPS_CAN_SEEK,4,2 ; @VC_CONTAINER_CAPS_CAN_SEEK
	.comm	_qsynth_reader_read,4,2         ; @qsynth_reader_read
	.comm	_qsynth_reader_seek,4,2         ; @qsynth_reader_seek
l_.str.1:                               ; @.str.1
	.asciz	"qsynth: error opening stream (%i)"

.subsections_via_symbols
