	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function seq_queue
_seq_queue:                             ## @seq_queue
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_qlen@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_SEQ_MAX_QUEUE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jb	LBB0_3
## %bb.1:
	movq	_seq_playing@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_seq_startplay
LBB0_3:
	testb	%bl, %bl
	jne	LBB0_7
## %bb.4:
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	jb	LBB0_7
## %bb.5:
	movq	_seq_sleeper@GOTPCREL(%rip), %rdi
	callq	_waitqueue_active
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_seq_sleeper@GOTPCREL(%rip), %rdi
	callq	_interruptible_sleep_on
LBB0_7:
	movq	(%r15), %rcx
	xorl	%eax, %eax
	cmpq	(%r12), %rcx
	jae	LBB0_12
## %bb.8:
	movq	_queue@GOTPCREL(%rip), %rax
	movq	_qtail@GOTPCREL(%rip), %rbx
	movq	_EV_SZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	(%rbx), %rdi
	imulq	%rdx, %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	(%rbx), %rax
	incq	%rax
	movq	(%r12), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.10:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_11
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	movq	%rdx, (%rbx)
	incq	(%r15)
	movl	$1, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_qlen,8,3                       ## @qlen
	.comm	_SEQ_MAX_QUEUE,8,3              ## @SEQ_MAX_QUEUE
	.comm	_seq_playing,4,2                ## @seq_playing
	.comm	_seq_sleeper,4,2                ## @seq_sleeper
	.comm	_queue,8,3                      ## @queue
	.comm	_qtail,8,3                      ## @qtail
	.comm	_EV_SZ,8,3                      ## @EV_SZ
	.no_dead_strip	_seq_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function seq_queue
_seq_queue:                             ; @seq_queue
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _qlen@GOTPAGE
Lloh1:
	ldr	x21, [x21, _qlen@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _SEQ_MAX_QUEUE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SEQ_MAX_QUEUE@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh4:
	adrp	x10, _seq_playing@GOTPAGE
Lloh5:
	ldr	x10, [x10, _seq_playing@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w10, #0, #0, hs
	b.ne	LBB0_2
; %bb.1:
	bl	_seq_startplay
LBB0_2:
	cbnz	w20, LBB0_6
; %bb.3:
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.lo	LBB0_6
; %bb.4:
Lloh7:
	adrp	x0, _seq_sleeper@GOTPAGE
Lloh8:
	ldr	x0, [x0, _seq_sleeper@GOTPAGEOFF]
	bl	_waitqueue_active
	cbnz	w0, LBB0_6
; %bb.5:
Lloh9:
	adrp	x0, _seq_sleeper@GOTPAGE
Lloh10:
	ldr	x0, [x0, _seq_sleeper@GOTPAGEOFF]
	bl	_interruptible_sleep_on
LBB0_6:
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	b.hs	LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _queue@GOTPAGE
Lloh12:
	ldr	x8, [x8, _queue@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x20, _qtail@GOTPAGE
Lloh15:
	ldr	x20, [x20, _qtail@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh16:
	adrp	x10, _EV_SZ@GOTPAGE
Lloh17:
	ldr	x10, [x10, _EV_SZ@GOTPAGEOFF]
Lloh18:
	ldr	x2, [x10]
	mul	x9, x2, x9
	add	x0, x8, x9, lsl #2
	mov	x1, x19
	bl	_memcpy
	ldr	x8, [x20]
	add	x8, x8, #1
	ldr	x9, [x22]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x20]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_qlen,8,3                       ; @qlen
	.comm	_SEQ_MAX_QUEUE,8,3              ; @SEQ_MAX_QUEUE
	.comm	_seq_playing,4,2                ; @seq_playing
	.comm	_seq_sleeper,4,2                ; @seq_sleeper
	.comm	_queue,8,3                      ; @queue
	.comm	_qtail,8,3                      ; @qtail
	.comm	_EV_SZ,8,3                      ; @EV_SZ
	.no_dead_strip	_seq_queue
.subsections_via_symbols
