	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_sb8dsp_midi_output_write
_snd_sb8dsp_midi_output_write:          ## @snd_sb8dsp_midi_output_write
	.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	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %r13
	leaq	8(%r13), %r14
	movl	$-32, %r12d
	leaq	-41(%rbp), %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_SB_DSP_MIDI_OUTPUT@GOTPCREL(%rip), %rax
	movsbl	(%rax), %esi
	movq	%r13, %rdi
	callq	_snd_sbdsp_command
	movsbl	-41(%rbp), %esi
	movq	%r13, %rdi
	callq	_snd_sbdsp_command
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_snd_rawmidi_transmit_ack
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	incl	%r12d
	je	LBB0_16
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_snd_rawmidi_transmit_peek
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	movq	_SB_HW_20@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%eax, %edi
	callq	_inb
	testb	$-128, %al
	jne	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movsbl	-41(%rbp), %ebx
	movq	_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_SBP
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	leaq	-41(%rbp), %rbx
	jmp	LBB0_15
LBB0_2:
	movq	_SB_OPEN_MIDI_OUTPUT_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 16(%r13)
	addq	$12, %r13
	movq	%r13, %rdi
	callq	_del_timer
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SB_OPEN_MIDI_OUTPUT_TRIGGER,4,2 ## @SB_OPEN_MIDI_OUTPUT_TRIGGER
	.comm	_SB_HW_20,8,3                   ## @SB_HW_20
	.comm	_STATUS,4,2                     ## @STATUS
	.comm	_WRITE,4,2                      ## @WRITE
	.comm	_SB_DSP_MIDI_OUTPUT,1,0         ## @SB_DSP_MIDI_OUTPUT
	.no_dead_strip	_snd_sb8dsp_midi_output_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_sb8dsp_midi_output_write
_snd_sb8dsp_midi_output_write:          ; @snd_sb8dsp_midi_output_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
	add	x19, x20, #8
	mov	w23, #-32
Lloh0:
	adrp	x24, _SB_HW_20@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SB_HW_20@GOTPAGEOFF]
Lloh2:
	adrp	x25, _SB_DSP_MIDI_OUTPUT@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SB_DSP_MIDI_OUTPUT@GOTPAGEOFF]
Lloh4:
	adrp	x26, _STATUS@GOTPAGE
Lloh5:
	ldr	x26, [x26, _STATUS@GOTPAGEOFF]
Lloh6:
	adrp	x27, _WRITE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _WRITE@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrsb	w1, [x25]
	mov	x0, x20
	bl	_snd_sbdsp_command
	ldrsb	w1, [sp, #15]
	mov	x0, x20
	bl	_snd_sbdsp_command
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	w1, #1
	bl	_snd_rawmidi_transmit_ack
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	adds	w23, w23, #1
	b.hs	LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	x1, sp, #15
	mov	x0, x21
	mov	w2, #1
	bl	_snd_rawmidi_transmit_peek
	cmp	w0, #1
	b.ne	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.lt	LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbz	w0, #7, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	bl	_SBP
	bl	_inb
	tbnz	w0, #7, LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsb	w22, [sp, #15]
	ldr	w1, [x27]
	mov	x0, x20
	bl	_SBP
	mov	x1, x0
	mov	x0, x22
	bl	_outb
	b	LBB0_2
LBB0_14:
Lloh8:
	adrp	x8, _SB_OPEN_MIDI_OUTPUT_TRIGGER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SB_OPEN_MIDI_OUTPUT_TRIGGER@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
	add	x0, x20, #12
	bl	_del_timer
LBB0_15:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SB_OPEN_MIDI_OUTPUT_TRIGGER,4,2 ; @SB_OPEN_MIDI_OUTPUT_TRIGGER
	.comm	_SB_HW_20,8,3                   ; @SB_HW_20
	.comm	_STATUS,4,2                     ; @STATUS
	.comm	_WRITE,4,2                      ; @WRITE
	.comm	_SB_DSP_MIDI_OUTPUT,1,0         ; @SB_DSP_MIDI_OUTPUT
	.no_dead_strip	_snd_sb8dsp_midi_output_write
.subsections_via_symbols
