	.file	"extr_core.c_most_start_channel.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to acquire HDM lock\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"channel configuration failed. Go check settings...\n"
	.text
	.p2align 4
	.globl	most_start_channel
	.type	most_start_channel, @function
most_start_channel:
.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, rdx
	movsx	rdx, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rax, QWORD PTR 8[rdi]
	mov	rbx, rdi
	xor	edi, edi
	mov	rax, QWORD PTR [rax]
	mov	rbp, QWORD PTR [rax+rdx*8]
	test	rbp, rbp
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	rax, QWORD PTR 8[rbp]
	add	rax, QWORD PTR 32[rbp]
	test	rax, rax
	jle	.L15
.L4:
	cmp	QWORD PTR 48[rbp], r13
	je	.L16
.L11:
	cmp	QWORD PTR 24[rbp], r13
	je	.L17
.L12:
	mov	rdi, rbp
	xor	r12d, r12d
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L15:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	call	try_module_get@PLT
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR 104[rbp]
	mov	QWORD PTR 80[rbp], 0
	lea	rdx, 64[rbp]
	mov	esi, DWORD PTR 100[rbp]
	mov	rdi, rax
	call	[QWORD PTR [rax]]
	test	rax, rax
	jne	.L19
	lea	rdi, 96[rbp]
	call	init_waitqueue_head@PLT
	mov	rsi, QWORD PTR 64[rbp]
	cmp	rsi, QWORD PTR MOST_CH_RX[rip]
	je	.L20
	mov	edx, DWORD PTR most_write_completion[rip]
	mov	rdi, rbp
	call	arm_mbo_chain@PLT
	mov	r14d, eax
.L9:
	xor	edi, edi
	test	r14d, r14d
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	je	.L10
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L7:
	mov	edi, DWORD PTR [rbx]
	call	module_put@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L17:
	.cfi_restore_state
	add	QWORD PTR 8[rbp], 1
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L16:
	add	QWORD PTR 32[rbp], 1
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L19:
	lea	rdi, .LC1[rip]
	call	pr_info@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, r12d
	mov	rdi, rbp
	call	run_enqueue_thread@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L7
	mov	edx, DWORD PTR 72[rbp]
	mov	QWORD PTR 88[rbp], 0
	lea	rdi, 56[rbp]
	mov	esi, r14d
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	sub	edx, eax
	mov	DWORD PTR 40[rbp], eax
	mov	DWORD PTR 16[rbp], edx
	call	atomic_set@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	mov	rdi, rbp
	call	mutex_unlock@PLT
	mov	r12d, DWORD PTR ENOLCK[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edx, DWORD PTR most_read_completion[rip]
	mov	rdi, rbp
	call	arm_mbo_chain@PLT
	mov	r14d, eax
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	most_start_channel, .-most_start_channel
	.comm	most_write_completion,4,4
	.comm	most_read_completion,4,4
	.comm	MOST_CH_RX,8,8
	.comm	ENOMEM,4,4
	.comm	ENOLCK,4,4
	.comm	EINVAL,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_core.c_most_start_channel.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to acquire HDM lock\012\000"
	.align	2
.LC1:
	.ascii	"channel configuration failed. Go check settings...\012"
	.ascii	"\000"
	.text
	.align	2
	.global	most_start_channel
	.syntax unified
	.arm
	.fpu softvfp
	.type	most_start_channel, %function
most_start_channel:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #4]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, [r3]
	mov	r5, r0
	ldr	r8, [r3, r1, lsl #2]
	mov	r6, r1
	clz	r0, r8
	lsr	r0, r0, #5
	mov	r7, r2
	bl	unlikely
	subs	r4, r0, #0
	beq	.L2
	ldr	r3, .L21
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r0, r8
	bl	mutex_lock
	ldr	r3, [r8, #16]
	ldr	r2, [r8, #4]
	add	r3, r3, r2
	cmp	r3, #0
	ble	.L17
.L4:
	ldr	r3, [r8, #24]
	cmp	r3, r7
	ldreq	r3, [r8, #16]
	addeq	r3, r3, #1
	streq	r3, [r8, #16]
	ldr	r3, [r8, #12]
	cmp	r3, r7
	beq	.L18
.L15:
	mov	r0, r8
	bl	mutex_unlock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	ldr	r0, [r5]
	bl	try_module_get
	cmp	r0, #0
	beq	.L19
	ldr	r0, [r8, #56]
	ldr	r1, [r8, #52]
	ldr	r3, [r0]
	str	r4, [r8, #40]
	add	r2, r8, #32
	blx	r3
	cmp	r0, #0
	bne	.L20
	add	r0, r8, #48
	bl	init_waitqueue_head
	ldr	r3, .L21+4
	ldr	r1, [r8, #32]
	ldr	r3, [r3]
	mov	r0, r8
	cmp	r1, r3
	ldreq	r3, .L21+8
	ldrne	r3, .L21+12
	ldr	r2, [r3]
	bl	arm_mbo_chain
	mov	r9, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	beq	.L10
	ldr	r3, .L21+16
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L7:
	ldr	r0, [r5]
	bl	module_put
	b	.L15
.L18:
	ldr	r3, [r8, #4]
	add	r3, r3, #1
	str	r3, [r8, #4]
	b	.L15
.L20:
	ldr	r0, .L21+20
	bl	pr_info
	ldr	r3, .L21
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L7
.L10:
	mov	r1, r6
	mov	r0, r8
	bl	run_enqueue_thread
	cmp	r0, #0
	movne	r4, r0
	bne	.L7
	ldr	r3, [r8, #36]
	str	r0, [r8, #44]
	add	r2, r3, r3, lsr #31
	asr	r2, r2, #1
	sub	r3, r3, r2
	mov	r1, r9
	str	r3, [r8, #8]
	str	r2, [r8, #20]
	add	r0, r8, #28
	bl	atomic_set
	b	.L4
.L19:
	ldr	r0, .L21+24
	bl	pr_info
	mov	r0, r8
	bl	mutex_unlock
	ldr	r3, .L21+28
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	EINVAL
	.word	MOST_CH_RX
	.word	most_read_completion
	.word	most_write_completion
	.word	ENOMEM
	.word	.LC1
	.word	.LC0
	.word	ENOLCK
	.size	most_start_channel, .-most_start_channel
	.comm	most_write_completion,4,4
	.comm	most_read_completion,4,4
	.comm	MOST_CH_RX,4,4
	.comm	ENOMEM,4,4
	.comm	ENOLCK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
