	.file	"extr_mcimidi.c_MIDI_mciStop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"(%d, %08X, %p);\n"
	.text
	.p2align 4
	.type	MIDI_mciStop, @function
MIDI_mciStop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	rcx, rdx
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	mov	rdx, rbx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR 24[rdi]
	lea	rdi, .LC0[rip]
	call	TRACE@PLT
	mov	eax, DWORD PTR MCI_MODE_STOP[rip]
	cmp	DWORD PTR 0[rbp], eax
	jne	.L22
.L2:
	mov	DWORD PTR 0[rbp], eax
	test	QWORD PTR MCI_NOTIFY[rip], rbx
	je	.L1
	test	r12, r12
	je	.L1
	cmp	QWORD PTR MMSYSERR_NOERROR[rip], r13
	je	.L23
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	xor	esi, esi
	lea	rdi, 28[rbp]
	call	InterlockedExchangePointer@PLT
	test	rax, rax
	jne	.L24
.L3:
	mov	edx, DWORD PTR 0[rbp]
	mov	eax, DWORD PTR MCI_MODE_STOP[rip]
	cmp	edx, eax
	je	.L8
	mov	eax, DWORD PTR MCI_MODE_NOT_READY[rip]
	xor	r13d, r13d
	cmp	edx, DWORD PTR MCI_MODE_PAUSE[rip]
	mov	DWORD PTR 0[rbp], eax
	je	.L25
.L4:
	mov	rdi, QWORD PTR 8[rbp]
	test	rdi, rdi
	jne	.L5
.L20:
	mov	eax, DWORD PTR MCI_MODE_STOP[rip]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR INFINITE[rip]
	call	WaitForSingleObject@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edx, DWORD PTR MCI_NOTIFY_SUCCESSFUL[rip]
	mov	edi, DWORD PTR [r12]
	mov	rsi, rbp
	call	MIDI_mciNotify@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR 24[rbp]
	mov	edx, DWORD PTR MCI_NOTIFY_ABORTED[rip]
	mov	rdi, rax
	call	mciDriverNotify@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L25:
	mov	edi, DWORD PTR 16[rbp]
	call	midiOutReset@PLT
	mov	r13, rax
	jmp	.L4
.L8:
	xor	r13d, r13d
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	MIDI_mciStop, .-MIDI_mciStop
	.comm	MMSYSERR_NOERROR,8,8
	.comm	MCI_NOTIFY_SUCCESSFUL,4,4
	.comm	MCI_NOTIFY_ABORTED,4,4
	.comm	MCI_NOTIFY,8,8
	.comm	MCI_MODE_STOP,4,4
	.comm	MCI_MODE_PAUSE,4,4
	.comm	MCI_MODE_NOT_READY,4,4
	.comm	INFINITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_mcimidi.c_MIDI_mciStop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"(%d, %08X, %p);\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	MIDI_mciStop, %function
MIDI_mciStop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r7, .L23
	mov	r3, r2
	mov	r6, r1
	mov	r5, r2
	mov	r2, r1
	ldr	r1, [r0, #12]
	ldr	r0, .L23+4
	bl	TRACE
	ldr	r2, [r4]
	ldr	r3, [r7]
	cmp	r2, r3
	bne	.L19
.L8:
	mov	r8, #0
.L2:
	ldr	r2, .L23+8
	str	r3, [r4]
	ldr	r3, [r2]
	tst	r6, r3
	movne	r3, #1
	moveq	r3, #0
	cmp	r5, #0
	moveq	r3, #0
	cmp	r3, #0
	bne	.L20
.L1:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mov	r1, #0
	add	r0, r4, #16
	bl	InterlockedExchangePointer
	cmp	r0, #0
	bne	.L21
.L3:
	ldr	r2, [r4]
	ldr	r3, [r7]
	cmp	r2, r3
	beq	.L8
	ldr	r1, .L23+12
	ldr	r3, .L23+16
	ldr	r1, [r1]
	ldr	r3, [r3]
	cmp	r2, r1
	movne	r8, #0
	str	r3, [r4]
	beq	.L22
.L4:
	ldr	r0, [r4, #4]
	cmp	r0, #0
	bne	.L5
.L17:
	ldr	r3, [r7]
	b	.L2
.L20:
	ldr	r3, .L23+20
	ldr	r3, [r3]
	cmp	r3, r8
	bne	.L1
	ldr	r3, .L23+24
	mov	r1, r4
	ldr	r0, [r5]
	ldr	r2, [r3]
	bl	MIDI_mciNotify
	b	.L1
.L5:
	ldr	r3, .L23+28
	ldr	r1, [r3]
	bl	WaitForSingleObject
	b	.L17
.L21:
	ldr	r3, .L23+32
	ldr	r1, [r4, #12]
	ldr	r2, [r3]
	bl	mciDriverNotify
	b	.L3
.L22:
	ldr	r0, [r4, #8]
	bl	midiOutReset
	mov	r8, r0
	b	.L4
.L24:
	.align	2
.L23:
	.word	MCI_MODE_STOP
	.word	.LC0
	.word	MCI_NOTIFY
	.word	MCI_MODE_PAUSE
	.word	MCI_MODE_NOT_READY
	.word	MMSYSERR_NOERROR
	.word	MCI_NOTIFY_SUCCESSFUL
	.word	INFINITE
	.word	MCI_NOTIFY_ABORTED
	.size	MIDI_mciStop, .-MIDI_mciStop
	.comm	MMSYSERR_NOERROR,4,4
	.comm	MCI_NOTIFY_SUCCESSFUL,4,4
	.comm	MCI_NOTIFY_ABORTED,4,4
	.comm	MCI_NOTIFY,4,4
	.comm	MCI_MODE_STOP,4,4
	.comm	MCI_MODE_PAUSE,4,4
	.comm	MCI_MODE_NOT_READY,4,4
	.comm	INFINITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
