	.file	"extr_rtmp-stream.c_send_packet.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	send_packet, @function
send_packet:
.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
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 16[rdi]
	mov	DWORD PTR 4[rsp], 0
	test	eax, eax
	je	.L2
.L5:
	lea	r14, 8[rbx]
	test	r12d, r12d
	je	.L3
	mov	r8d, r12d
	lea	rcx, 16[rsp]
	lea	rdx, 8[rsp]
	xor	esi, esi
	mov	rdi, rbp
	call	flv_packet_mux@PLT
	mov	edx, DWORD PTR 16[rsp]
	mov	ecx, r13d
	mov	rdi, r14
	mov	rsi, QWORD PTR 8[rsp]
	call	RTMP_Write@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	r12d, eax
	call	bfree@PLT
	mov	rdi, QWORD PTR 0[rbp]
	call	bfree@PLT
.L7:
	mov	rax, QWORD PTR 16[rsp]
	add	QWORD PTR [rbx], rax
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 32
	.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
.L3:
	.cfi_restore_state
	mov	esi, DWORD PTR 12[rbx]
	xor	r8d, r8d
	lea	rcx, 16[rsp]
	lea	rdx, 8[rsp]
	mov	rdi, rbp
	call	flv_packet_mux@PLT
	mov	edx, DWORD PTR 16[rsp]
	mov	ecx, r13d
	mov	rdi, r14
	mov	rsi, QWORD PTR 8[rsp]
	call	RTMP_Write@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	r12d, eax
	call	bfree@PLT
	mov	rdi, rbp
	call	obs_encoder_packet_release@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR 8[rdi]
	mov	esi, DWORD PTR FIONREAD[rip]
	lea	rdx, 4[rsp]
	call	ioctl@PLT
	test	eax, eax
	js	.L5
	movsx	rsi, DWORD PTR 4[rsp]
	test	esi, esi
	jle	.L5
	mov	rdi, rbx
	call	discard_recv_data@PLT
	test	eax, eax
	jne	.L5
	or	r12d, -1
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	send_packet, .-send_packet
	.comm	FIONREAD,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_rtmp-stream.c_send_packet.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_packet, %function
send_packet:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, #0
	ldr	ip, [r4, #12]
	mov	r7, r3
	ldr	r3, .L14
	sub	sp, sp, #24
	cmp	ip, r0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r6, r1
	mov	r5, r2
	str	r0, [sp, #16]
	beq	.L2
.L5:
	cmp	r5, #0
	add	r8, r4, #4
	beq	.L3
	mov	r1, #0
	str	r5, [sp]
	add	r3, sp, #12
	add	r2, sp, #8
	mov	r0, r6
	bl	flv_packet_mux
	mov	r3, r7
	ldr	r2, [sp, #12]
	ldr	r1, [sp, #8]
	mov	r0, r8
	bl	RTMP_Write
	mov	r5, r0
	ldr	r0, [sp, #8]
	bl	bfree
	ldr	r0, [r6]
	bl	bfree
.L7:
	ldr	r3, [r4]
	ldr	r2, [sp, #12]
	add	r3, r3, r2
	str	r3, [r4]
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	str	r5, [sp]
	ldr	r1, [r4, #8]
	add	r3, sp, #12
	add	r2, sp, #8
	mov	r0, r6
	bl	flv_packet_mux
	mov	r3, r7
	ldr	r2, [sp, #12]
	ldr	r1, [sp, #8]
	mov	r0, r8
	bl	RTMP_Write
	mov	r5, r0
	ldr	r0, [sp, #8]
	bl	bfree
	mov	r0, r6
	bl	obs_encoder_packet_release
	b	.L7
.L2:
	ldr	r3, .L14+4
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	add	r2, sp, #16
	bl	ioctl
	cmp	r0, #0
	blt	.L5
	ldr	r1, [sp, #16]
	cmp	r1, #0
	ble	.L5
	mov	r0, r4
	bl	discard_recv_data
	cmp	r0, #0
	bne	.L5
	mvn	r5, #0
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	FIONREAD
	.size	send_packet, .-send_packet
	.comm	FIONREAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
