	.file	"extr_opl3_seq.c_snd_opl3_synth_create_port.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"OPL%i FM Port"
	.text
	.p2align 4
	.type	snd_opl3_synth_create_port, @function
snd_opl3_synth_create_port:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 80
	.cfi_def_cfa_offset 128
	mov	ebp, DWORD PTR MAX_OPL3_VOICES[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR OPL3_HW_OPL3[rip]
	cmp	DWORD PTR [rdi], eax
	jge	.L3
	mov	ebp, DWORD PTR MAX_OPL2_VOICES[rip]
.L3:
	mov	edi, 16
	call	snd_midi_channel_alloc_set@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	QWORD PTR 8[rbx], rax
	neg	r12d
	test	rax, rax
	je	.L1
	mov	QWORD PTR 8[rax], rbx
	mov	r13, rsp
	mov	edx, 32
	xor	esi, esi
	mov	rdi, r13
	lea	r14, 32[rsp]
	call	memset@PLT
	mov	eax, DWORD PTR THIS_MODULE[rip]
	mov	edx, DWORD PTR [rbx]
	mov	rdi, r14
	and	edx, DWORD PTR OPL3_HW_MASK[rip]
	lea	rsi, .LC0[rip]
	mov	QWORD PTR [rsp], rbx
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR snd_opl3_synth_use[rip]
	sar	edx, 8
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR snd_opl3_synth_unuse[rip]
	mov	DWORD PTR 16[rsp], eax
	mov	eax, DWORD PTR snd_opl3_synth_event_input[rip]
	mov	DWORD PTR 12[rsp], eax
	mov	eax, DWORD PTR snd_opl3_synth_free_port[rip]
	mov	DWORD PTR 8[rsp], eax
	call	sprintf@PLT
	mov	r12, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 16[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	ecx, DWORD PTR SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC[rip]
	mov	edx, DWORD PTR SNDRV_SEQ_PORT_CAP_WRITE[rip]
	mov	r9d, ebp
	mov	rsi, r13
	mov	DWORD PTR 4[r12], edi
	or	ecx, DWORD PTR SNDRV_SEQ_PORT_TYPE_MIDI_GM[rip]
	mov	r8d, 16
	or	ecx, DWORD PTR SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE[rip]
	or	edx, DWORD PTR SNDRV_SEQ_PORT_CAP_SUBS_WRITE[rip]
	push	r14
	.cfi_def_cfa_offset 144
	or	ecx, DWORD PTR SNDRV_SEQ_PORT_TYPE_HARDWARE[rip]
	or	ecx, DWORD PTR SNDRV_SEQ_PORT_TYPE_SYNTHESIZER[rip]
	call	snd_seq_event_port_attach@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	DWORD PTR [r12], eax
	pop	rax
	.cfi_def_cfa_offset 136
	mov	r12d, DWORD PTR [rdi]
	pop	rdx
	.cfi_def_cfa_offset 128
	test	r12d, r12d
	js	.L10
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 80
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	snd_midi_channel_free_set@PLT
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	snd_opl3_synth_create_port, .-snd_opl3_synth_create_port
	.comm	snd_opl3_synth_use,4,4
	.comm	snd_opl3_synth_unuse,4,4
	.comm	snd_opl3_synth_free_port,4,4
	.comm	snd_opl3_synth_event_input,4,4
	.comm	THIS_MODULE,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_MIDI_GM,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_HARDWARE,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE,4,4
	.comm	SNDRV_SEQ_PORT_CAP_WRITE,4,4
	.comm	SNDRV_SEQ_PORT_CAP_SUBS_WRITE,4,4
	.comm	OPL3_HW_OPL3,4,4
	.comm	OPL3_HW_MASK,4,4
	.comm	MAX_OPL3_VOICES,4,4
	.comm	MAX_OPL2_VOICES,4,4
	.comm	ENOMEM,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_opl3_seq.c_snd_opl3_synth_create_port.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"OPL%i FM Port\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_opl3_synth_create_port, %function
snd_opl3_synth_create_port:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, lr}
	ldr	r3, [r3]
	ldr	r2, [r0]
	ldr	r1, .L13+4
	cmp	r2, r3
	ldrlt	r3, .L13+8
	ldrge	r3, .L13+12
	mov	r4, r0
	sub	sp, sp, #84
	mov	r0, #16
	ldr	r1, [r1]
	str	r1, [sp, #76]
	mov	r1,#0
	ldr	r5, [r3]
	bl	snd_midi_channel_alloc_set
	cmp	r0, #0
	str	r0, [r4, #4]
	beq	.L10
	ldr	r3, .L13+16
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	lr, .L13+20
	ldr	ip, .L13+24
	ldr	r1, .L13+28
	and	r2, r2, r3
	ldr	r3, .L13+32
	ldr	r6, [lr]
	ldr	lr, [ip]
	ldr	ip, [r1]
	ldr	r1, [r3]
	ldr	r3, .L13+36
	add	r7, sp, #44
	ldr	r3, [r3]
	str	r4, [r0, #8]
	asr	r2, r2, #8
	str	r1, [sp, #28]
	mov	r0, r7
	ldr	r1, .L13+40
	str	r4, [sp, #20]
	str	r6, [sp, #40]
	str	lr, [sp, #36]
	str	ip, [sp, #32]
	str	r3, [sp, #24]
	bl	sprintf
	mov	r1, #16
	ldr	r2, .L13+44
	ldr	r3, .L13+48
	ldr	r0, [r2]
	ldr	r2, .L13+52
	ldr	r3, [r3]
	ldr	ip, [r2]
	ldr	r2, .L13+56
	orr	r3, r3, r0
	ldr	r2, [r2]
	orr	r3, r3, ip
	orr	r3, r3, r2
	ldr	ip, .L13+60
	ldr	r2, .L13+64
	ldr	r6, [r4, #4]
	ldr	r0, [r4, #8]
	ldr	lr, [ip]
	ldr	ip, [r2]
	ldr	r2, .L13+68
	str	r0, [r6, #4]
	str	r7, [sp, #8]
	str	r5, [sp, #4]
	ldr	r2, [r2]
	orr	r3, r3, lr
	str	r1, [sp]
	orr	r2, ip, r2
	add	r1, sp, #20
	bl	snd_seq_event_port_attach
	ldr	r3, [r4, #4]
	str	r0, [r6]
	ldr	r4, [r3]
	cmp	r4, #0
	movge	r4, #0
	blt	.L11
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [sp, #76]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r4
	add	sp, sp, #84
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L10:
	ldr	r3, .L13+72
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L11:
	mov	r0, r3
	bl	snd_midi_channel_free_set
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	OPL3_HW_OPL3
	.word	.LC1
	.word	MAX_OPL2_VOICES
	.word	MAX_OPL3_VOICES
	.word	OPL3_HW_MASK
	.word	THIS_MODULE
	.word	snd_opl3_synth_use
	.word	snd_opl3_synth_unuse
	.word	snd_opl3_synth_event_input
	.word	snd_opl3_synth_free_port
	.word	.LC0
	.word	SNDRV_SEQ_PORT_TYPE_MIDI_GM
	.word	SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC
	.word	SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE
	.word	SNDRV_SEQ_PORT_TYPE_HARDWARE
	.word	SNDRV_SEQ_PORT_TYPE_SYNTHESIZER
	.word	SNDRV_SEQ_PORT_CAP_WRITE
	.word	SNDRV_SEQ_PORT_CAP_SUBS_WRITE
	.word	ENOMEM
	.size	snd_opl3_synth_create_port, .-snd_opl3_synth_create_port
	.comm	snd_opl3_synth_use,4,4
	.comm	snd_opl3_synth_unuse,4,4
	.comm	snd_opl3_synth_free_port,4,4
	.comm	snd_opl3_synth_event_input,4,4
	.comm	THIS_MODULE,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_MIDI_GM,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_HARDWARE,4,4
	.comm	SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE,4,4
	.comm	SNDRV_SEQ_PORT_CAP_WRITE,4,4
	.comm	SNDRV_SEQ_PORT_CAP_SUBS_WRITE,4,4
	.comm	OPL3_HW_OPL3,4,4
	.comm	OPL3_HW_MASK,4,4
	.comm	MAX_OPL3_VOICES,4,4
	.comm	MAX_OPL2_VOICES,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
