	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function midi_poll
_midi_poll:                             ## @midi_poll
	.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	_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	_open_devs@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.1:
	movq	_num_midis@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.2:
	xorl	%r15d, %r15d
	movq	_midi_devs@GOTPCREL(%rip), %r13
	movq	_midi_out_buf@GOTPCREL(%rip), %r12
	movq	_lock@GOTPCREL(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movq	_num_midis@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	(%r13), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	testq	%rdi, %rdi
	jne	LBB0_5
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	xorl	%edx, %edx
	divq	%rcx
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%rdx, 8(%rdi)
	decl	16(%rdi)
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	callq	_DATA_AVAIL
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx,%rax,4), %ebx
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	*(%rax)
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	movq	8(%rdi), %rax
	incq	%rax
	movq	_MAX_QUEUE_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r15,8), %rdi
	callq	_DATA_AVAIL
	cmpl	$99, %eax
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(,%r15,4), %rdi
	movq	_midi_sleeper@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_wake_up
	jmp	LBB0_13
LBB0_14:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	incq	%rax
	movq	_poll_timer@GOTPCREL(%rip), %rdi
	movq	%rax, (%rdi)
	callq	_add_timer
LBB0_15:
	movq	_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_lock,4,2                       ## @lock
	.comm	_open_devs,8,3                  ## @open_devs
	.comm	_num_midis,4,2                  ## @num_midis
	.comm	_midi_devs,8,3                  ## @midi_devs
	.comm	_midi_out_buf,8,3               ## @midi_out_buf
	.comm	_MAX_QUEUE_SIZE,4,2             ## @MAX_QUEUE_SIZE
	.comm	_midi_sleeper,8,3               ## @midi_sleeper
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_poll_timer,8,3                 ## @poll_timer
	.no_dead_strip	_midi_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function midi_poll
_midi_poll:                             ; @midi_poll
	.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	x0, _lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
Lloh2:
	adrp	x8, _open_devs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _open_devs@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.1:
Lloh5:
	adrp	x22, _num_midis@GOTPAGE
Lloh6:
	ldr	x22, [x22, _num_midis@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.2:
	mov	x19, #0
Lloh7:
	adrp	x23, _midi_devs@GOTPAGE
Lloh8:
	ldr	x23, [x23, _midi_devs@GOTPAGEOFF]
Lloh9:
	adrp	x24, _midi_out_buf@GOTPAGE
Lloh10:
	ldr	x24, [x24, _midi_out_buf@GOTPAGEOFF]
Lloh11:
	adrp	x25, _midi_sleeper@GOTPAGE
Lloh12:
	ldr	x25, [x25, _midi_sleeper@GOTPAGEOFF]
Lloh13:
	adrp	x20, _lock@GOTPAGE
Lloh14:
	ldr	x20, [x20, _lock@GOTPAGEOFF]
Lloh15:
	adrp	x26, _MAX_QUEUE_SIZE@GOTPAGE
Lloh16:
	ldr	x26, [x26, _MAX_QUEUE_SIZE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x22]
	cmp	x19, x8
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x23]
	ldr	x8, [x8, x19, lsl #3]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8, x19, lsl #3]
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_DATA_AVAIL
	cbz	w0, LBB0_9
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24]
	lsl	x27, x19, #3
	ldr	x8, [x8, x27]
	ldp	x9, x8, [x8]
	ldr	w21, [x9, x8, lsl #2]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x8, [x23]
	ldr	x8, [x8, x27]
	ldr	x8, [x8]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	mov	x21, x0
	mov	x0, x20
	bl	_spin_lock_irqsave
	cbz	w21, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x24]
	ldr	x0, [x8, x19, lsl #3]
	ldr	x8, [x0, #8]
	add	x8, x8, #1
	ldrsw	x9, [x26]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x0, #8]
	ldr	w8, [x0, #16]
	sub	w8, w8, #1
	str	w8, [x0, #16]
	bl	_DATA_AVAIL
	cbnz	w0, LBB0_7
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	ldr	x0, [x8, x19, lsl #3]
	bl	_DATA_AVAIL
	cmp	w0, #99
	b.gt	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	add	x0, x8, x19, lsl #2
	bl	_wake_up
	b	LBB0_3
LBB0_11:
Lloh17:
	adrp	x8, _jiffies@GOTPAGE
Lloh18:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	add	x8, x8, #1
Lloh20:
	adrp	x0, _poll_timer@GOTPAGE
Lloh21:
	ldr	x0, [x0, _poll_timer@GOTPAGEOFF]
	str	x8, [x0]
	bl	_add_timer
LBB0_12:
Lloh22:
	adrp	x0, _lock@GOTPAGE
Lloh23:
	ldr	x0, [x0, _lock@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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_lock,4,2                       ; @lock
	.comm	_open_devs,8,3                  ; @open_devs
	.comm	_num_midis,4,2                  ; @num_midis
	.comm	_midi_devs,8,3                  ; @midi_devs
	.comm	_midi_out_buf,8,3               ; @midi_out_buf
	.comm	_MAX_QUEUE_SIZE,4,2             ; @MAX_QUEUE_SIZE
	.comm	_midi_sleeper,8,3               ; @midi_sleeper
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_poll_timer,8,3                 ; @poll_timer
	.no_dead_strip	_midi_poll
.subsections_via_symbols
