	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function seq_startplay
_seq_startplay:                         ## @seq_startplay
	.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
	movq	_qlen@GOTPCREL(%rip), %r14
	movq	_lock@GOTPCREL(%rip), %rbx
	movq	_qhead@GOTPCREL(%rip), %r15
	movq	_EV_SZ@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movslq	(%r15), %r12
	leal	1(%r12), %eax
	cltd
	movq	_SEQ_MAX_QUEUE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%edx, (%r15)
	decl	(%r14)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_seq_playing@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movslq	(%r13), %rdi
	imulq	%r12, %rdi
	shlq	$2, %rdi
	movq	_queue@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_play_event
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.4:
	incl	(%r14)
	movl	%r12d, (%r15)
	jmp	LBB0_6
LBB0_5:
	movq	_seq_playing@GOTPCREL(%rip), %rcx
	movl	$0, (%rcx)
	movq	_SEQ_MAX_QUEUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%eax, %ecx
	movq	_output_threshold@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jge	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_seq_sleeper@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wake_up                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_qlen,4,2                       ## @qlen
	.comm	_lock,4,2                       ## @lock
	.comm	_qhead,4,2                      ## @qhead
	.comm	_SEQ_MAX_QUEUE,4,2              ## @SEQ_MAX_QUEUE
	.comm	_seq_playing,4,2                ## @seq_playing
	.comm	_queue,8,3                      ## @queue
	.comm	_EV_SZ,4,2                      ## @EV_SZ
	.comm	_output_threshold,4,2           ## @output_threshold
	.comm	_seq_sleeper,4,2                ## @seq_sleeper
	.no_dead_strip	_seq_startplay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function seq_startplay
_seq_startplay:                         ; @seq_startplay
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x20, _qlen@GOTPAGE
Lloh1:
	ldr	x20, [x20, _qlen@GOTPAGEOFF]
Lloh2:
	adrp	x19, _lock@GOTPAGE
Lloh3:
	ldr	x19, [x19, _lock@GOTPAGEOFF]
Lloh4:
	adrp	x21, _qhead@GOTPAGE
Lloh5:
	ldr	x21, [x21, _qhead@GOTPAGEOFF]
Lloh6:
	adrp	x22, _SEQ_MAX_QUEUE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SEQ_MAX_QUEUE@GOTPAGEOFF]
Lloh8:
	adrp	x23, _seq_playing@GOTPAGE
Lloh9:
	ldr	x23, [x23, _seq_playing@GOTPAGEOFF]
	mov	w24, #1
Lloh10:
	adrp	x25, _queue@GOTPAGE
Lloh11:
	ldr	x25, [x25, _queue@GOTPAGEOFF]
Lloh12:
	adrp	x26, _EV_SZ@GOTPAGE
Lloh13:
	ldr	x26, [x26, _EV_SZ@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w27, [x21]
	add	w8, w27, #1
	ldr	w9, [x22]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x21]
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	str	w24, [x23]
	ldr	x8, [x25]
	ldr	w9, [x26]
	mul	w9, w9, w27
	add	x0, x8, w9, sxtw #2
	bl	_play_event
	cbz	w0, LBB0_1
; %bb.3:
	cmp	w0, #2
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	str	w27, [x21]
	b	LBB0_6
LBB0_5:
	str	wzr, [x23]
	ldr	w9, [x22]
Lloh14:
	adrp	x10, _output_threshold@GOTPAGE
Lloh15:
	ldr	x10, [x10, _output_threshold@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	sub	w8, w9, w8
	cmp	w8, w10
	b.ge	LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh17:
	adrp	x0, _seq_sleeper@GOTPAGE
Lloh18:
	ldr	x0, [x0, _seq_sleeper@GOTPAGEOFF]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_wake_up
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_qlen,4,2                       ; @qlen
	.comm	_lock,4,2                       ; @lock
	.comm	_qhead,4,2                      ; @qhead
	.comm	_SEQ_MAX_QUEUE,4,2              ; @SEQ_MAX_QUEUE
	.comm	_seq_playing,4,2                ; @seq_playing
	.comm	_queue,8,3                      ; @queue
	.comm	_EV_SZ,4,2                      ; @EV_SZ
	.comm	_output_threshold,4,2           ; @output_threshold
	.comm	_seq_sleeper,4,2                ; @seq_sleeper
	.no_dead_strip	_seq_startplay
.subsections_via_symbols
