	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function seq_drain_midi_queues
_seq_drain_midi_queues:                 ## @seq_drain_midi_queues
	.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	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	_midi_opened@GOTPCREL(%rip), %r13
	movq	_midi_written@GOTPCREL(%rip), %r14
	movq	_midi_devs@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	_max_mididev@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jle	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r14), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %edi
	callq	*%rcx
	cmpq	$1, %rax
	sbbl	$-1, %r12d
	movq	_max_mididev@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$34, %rsi
	addl	%eax, %esi
	movq	_seq_sleeper@GOTPCREL(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_interruptible_sleep_on_timeout
	movb	$1, %r12b
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	testb	%r12b, %r12b
	jne	LBB0_2
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_max_mididev,4,2                ## @max_mididev
	.comm	_midi_opened,8,3                ## @midi_opened
	.comm	_midi_written,8,3               ## @midi_written
	.comm	_midi_devs,8,3                  ## @midi_devs
	.comm	_seq_sleeper,4,2                ## @seq_sleeper
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_seq_drain_midi_queues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function seq_drain_midi_queues
_seq_drain_midi_queues:                 ; @seq_drain_midi_queues
	.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	x21, _current@GOTPAGE
Lloh1:
	ldr	x21, [x21, _current@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_signal_pending
	cbnz	w0, LBB0_14
; %bb.1:
Lloh2:
	adrp	x22, _max_mididev@GOTPAGE
Lloh3:
	ldr	x22, [x22, _max_mididev@GOTPAGEOFF]
Lloh4:
	adrp	x23, _midi_opened@GOTPAGE
Lloh5:
	ldr	x23, [x23, _midi_opened@GOTPAGEOFF]
Lloh6:
	adrp	x24, _HZ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _HZ@GOTPAGEOFF]
	mov	w25, #26215
	movk	w25, #26214, lsl #16
Lloh8:
	adrp	x19, _seq_sleeper@GOTPAGE
Lloh9:
	ldr	x19, [x19, _seq_sleeper@GOTPAGEOFF]
Lloh10:
	adrp	x26, _midi_written@GOTPAGE
Lloh11:
	ldr	x26, [x26, _midi_written@GOTPAGEOFF]
Lloh12:
	adrp	x27, _midi_devs@GOTPAGE
Lloh13:
	ldr	x27, [x27, _midi_devs@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, #0
	mov	w28, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_9
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x23]
	ldr	x9, [x9, x20, lsl #3]
	cbz	x9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x9, [x26]
	ldr	x9, [x9, x20, lsl #3]
	cbz	x9, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x9, [x27]
	ldr	x9, [x9, x20, lsl #3]
	ldr	x9, [x9]
	cbz	x9, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x20
	blr	x9
	cmp	x0, #0
	cinc	w28, w28, ne
	ldr	w8, [x22]
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w28, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldrsw	x8, [x24]
	mul	x8, x8, x25
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w1, w8, w9
	mov	x0, x19
	bl	_interruptible_sleep_on_timeout
	mov	w20, #1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w20, #0
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21]
	bl	_signal_pending
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w20, #0, LBB0_2
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_max_mididev,4,2                ; @max_mididev
	.comm	_midi_opened,8,3                ; @midi_opened
	.comm	_midi_written,8,3               ; @midi_written
	.comm	_midi_devs,8,3                  ; @midi_devs
	.comm	_seq_sleeper,4,2                ; @seq_sleeper
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_seq_drain_midi_queues
.subsections_via_symbols
