	.file	"extr_mmstu.c_mms_CommandSend.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to send command"
	.text
	.p2align 4
	.type	mms_CommandSend, @function
mms_CommandSend:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r11d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, r9d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rbx, QWORD PTR [rdi]
	mov	DWORD PTR 8[rsp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	r9b, 7
	je	.L8
	.p2align 4,,10
	.p2align 3
.L3:
	add	r12d, 1
	test	r12b, 7
	jne	.L3
	mov	eax, r9d
	sub	eax, r12d
	lea	r15d, 8[rax]
.L2:
	lea	rbp, 32[rsp]
	xor	esi, esi
	mov	QWORD PTR 16[rsp], r8
	mov	r14d, r12d
	mov	rdi, rbp
	mov	DWORD PTR 28[rsp], r9d
	sar	r14d, 3
	mov	DWORD PTR 24[rsp], ecx
	mov	DWORD PTR 12[rsp], r11d
	call	var_buffer_initwrite@PLT
	mov	esi, 1
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	mov	esi, -1341392178
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	mov	esi, DWORD PTR MMS_CMD_HEADERSIZE[rip]
	mov	rdi, rbp
	add	esi, r12d
	sub	esi, 16
	call	var_buffer_add32@PLT
	mov	esi, 542330189
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	lea	esi, 4[r14]
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	add	DWORD PTR [rbx], 1
	xor	esi, esi
	mov	rdi, rbp
	call	var_buffer_add64@PLT
	lea	esi, 2[r14]
	mov	rdi, rbp
	call	var_buffer_add32@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, rbp
	or	esi, 196608
	call	var_buffer_add32@PLT
	mov	r11d, DWORD PTR 12[rsp]
	mov	rdi, rbp
	mov	esi, r11d
	call	var_buffer_add32@PLT
	mov	ecx, DWORD PTR 24[rsp]
	mov	rdi, rbp
	mov	esi, ecx
	call	var_buffer_add32@PLT
	mov	r8, QWORD PTR 16[rsp]
	test	r8, r8
	je	.L4
	test	r12d, r12d
	jg	.L18
.L4:
	xor	esi, esi
	lea	r12, 4[rbx]
	mov	rdi, rbp
	call	var_buffer_add64@PLT
	mov	rdi, r12
	call	vlc_mutex_lock@PLT
	mov	ecx, DWORD PTR 32[rsp]
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, r13
	mov	edx, DWORD PTR 36[rsp]
	sub	ecx, r15d
	call	net_Write@PLT
	mov	rdi, r12
	mov	ebx, eax
	call	vlc_mutex_unlock@PLT
	mov	eax, DWORD PTR 32[rsp]
	mov	rdi, rbp
	sub	eax, r15d
	cmp	eax, ebx
	je	.L5
	call	var_buffer_free@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	call	msg_Err@PLT
	mov	eax, DWORD PTR VLC_EGENERIC[rip]
.L1:
	mov	rdx, QWORD PTR 40[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	call	var_buffer_free@PLT
	mov	eax, DWORD PTR VLC_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r9d, DWORD PTR 28[rsp]
	mov	rsi, r8
	mov	rdi, rbp
	mov	edx, r9d
	call	var_buffer_addmemory@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r15d, 8
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mms_CommandSend, .-mms_CommandSend
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	MMS_CMD_HEADERSIZE,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_mmstu.c_mms_CommandSend.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to send command\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mms_CommandSend, %function
mms_CommandSend:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	ldr	r8, [sp, #68]
	mov	r9, r3
	ldr	r3, .L17
	str	r1, [sp]
	tst	r8, #7
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r6, r0
	mov	r4, r8
	mov	r10, r2
	ldr	r5, [r0]
	ldr	r3, [sp, #64]
	beq	.L8
.L3:
	add	r4, r4, #1
	tst	r4, #7
	bne	.L3
	sub	r7, r4, r8
	rsb	r7, r7, #8
.L2:
	mov	r1, #0
	add	r0, sp, #12
	str	r3, [sp, #4]
	bl	var_buffer_initwrite
	mov	r1, #1
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r1, .L17+4
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r2, .L17+8
	add	r0, sp, #12
	ldr	r1, [r2]
	asr	fp, r4, #3
	add	r1, r4, r1
	sub	r1, r1, #16
	bl	var_buffer_add32
	ldr	r1, .L17+12
	add	r0, sp, #12
	bl	var_buffer_add32
	add	r1, fp, #4
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r1, [r5]
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r2, [r5]
	mov	r1, #0
	add	r2, r2, #1
	str	r2, [r5]
	add	r0, sp, #12
	bl	var_buffer_add64
	add	r1, fp, #2
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r3, [sp]
	add	r0, sp, #12
	orr	r1, r3, #196608
	bl	var_buffer_add32
	mov	r1, r10
	add	r0, sp, #12
	bl	var_buffer_add32
	mov	r1, r9
	add	r0, sp, #12
	bl	var_buffer_add32
	ldr	r3, [sp, #4]
	cmp	r3, #0
	cmpne	r4, #0
	bgt	.L15
.L4:
	mov	r1, #0
	add	r8, r5, #4
	add	r0, sp, #12
	bl	var_buffer_add64
	mov	r0, r8
	bl	vlc_mutex_lock
	ldr	r3, [sp, #12]
	ldr	r1, [r5, #8]
	sub	r3, r3, r7
	ldr	r2, [sp, #16]
	mov	r0, r6
	bl	net_Write
	mov	r4, r0
	mov	r0, r8
	bl	vlc_mutex_unlock
	ldr	r3, [sp, #12]
	add	r0, sp, #12
	sub	r7, r3, r7
	cmp	r7, r4
	beq	.L5
	bl	var_buffer_free
	mov	r0, r6
	ldr	r1, .L17+16
	bl	msg_Err
	ldr	r3, .L17+20
	ldr	r0, [r3]
.L1:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	bl	var_buffer_free
	ldr	r3, .L17+24
	ldr	r0, [r3]
	b	.L1
.L15:
	mov	r2, r8
	mov	r1, r3
	add	r0, sp, #12
	bl	var_buffer_addmemory
	b	.L4
.L8:
	mov	r7, #8
	b	.L2
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	.LC1
	.word	-1341392178
	.word	MMS_CMD_HEADERSIZE
	.word	542330189
	.word	.LC0
	.word	VLC_EGENERIC
	.word	VLC_SUCCESS
	.size	mms_CommandSend, .-mms_CommandSend
	.comm	VLC_SUCCESS,4,4
	.comm	VLC_EGENERIC,4,4
	.comm	MMS_CMD_HEADERSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
