	.file	"extr_synclinkmp.c_enable_loopback.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	enable_loopback, @function
enable_loopback:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r8d, esi
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	esi, DWORD PTR MD2[rip]
	mov	rbp, rdi
	test	r8d, r8d
	je	.L2
	call	read_reg@PLT
	mov	ecx, DWORD PTR BIT0[rip]
	mov	esi, DWORD PTR MD2[rip]
	mov	rdi, rbp
	mov	r8d, eax
	movzx	eax, BYTE PTR BIT1[rip]
	add	eax, ecx
	or	eax, r8d
	movzx	edx, al
	call	write_reg@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rdi, rbp
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR 0[rbp]
	lea	ecx, [rax+rax]
	mov	eax, DWORD PTR BIT0[rip]
	sal	eax, cl
	or	DWORD PTR [rdx], eax
	call	write_control_reg@PLT
	mov	esi, DWORD PTR RXS[rip]
	mov	edx, 64
	mov	rdi, rbp
	call	write_reg@PLT
	mov	esi, DWORD PTR TXS[rip]
	mov	edx, 64
	mov	rdi, rbp
	call	write_reg@PLT
.L3:
	mov	esi, DWORD PTR 4[rbp]
	test	esi, esi
	jne	.L6
	mov	esi, 3686400
.L6:
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	set_rate@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	call	read_reg@PLT
	mov	esi, DWORD PTR MD2[rip]
	mov	rdi, rbp
	mov	r8d, eax
	mov	eax, DWORD PTR BIT0[rip]
	add	al, BYTE PTR BIT1[rip]
	not	eax
	and	eax, r8d
	movzx	edx, al
	call	write_reg@PLT
	mov	esi, DWORD PTR RXS[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	write_reg@PLT
	mov	esi, DWORD PTR TXS[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	write_reg@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	enable_loopback, .-enable_loopback
	.comm	TXS,4,4
	.comm	RXS,4,4
	.comm	MD2,4,4
	.comm	BIT1,4,4
	.comm	BIT0,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_synclinkmp.c_enable_loopback.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	enable_loopback, %function
enable_loopback:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L8
	push	{r4, r5, r6, lr}
	ldr	r5, [r3]
	subs	r6, r1, #0
	mov	r4, r0
	mov	r1, r5
	beq	.L2
	bl	read_reg
	ldr	r6, .L8+4
	ldr	r3, .L8+8
	ldr	r2, [r6]
	ldr	r3, [r3]
	mov	r1, r5
	add	r3, r3, r2
	orr	r3, r3, r0
	and	r2, r3, #255
	mov	r0, r4
	bl	write_reg
	ldr	r3, [r4, #8]
	ldr	r2, [r4]
	ldr	r1, [r3]
	ldr	r0, [r6]
	ldr	r3, [r1]
	lsl	r2, r2, #1
	orr	r3, r3, r0, lsl r2
	str	r3, [r1]
	mov	r0, r4
	bl	write_control_reg
	ldr	r3, .L8+12
	mov	r2, #64
	ldr	r1, [r3]
	mov	r0, r4
	bl	write_reg
	ldr	r3, .L8+16
	mov	r2, #64
	mov	r0, r4
	ldr	r1, [r3]
	bl	write_reg
.L3:
	ldr	r1, [r4, #4]
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	cmp	r1, #0
	moveq	r1, #3686400
	b	set_rate
.L2:
	bl	read_reg
	ldr	r2, .L8+8
	ldr	r3, .L8+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	mov	r1, r5
	add	r2, r2, r3
	bic	r2, r0, r2
	and	r2, r2, #255
	mov	r0, r4
	bl	write_reg
	ldr	r3, .L8+12
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	bl	write_reg
	ldr	r3, .L8+16
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r3]
	bl	write_reg
	b	.L3
.L9:
	.align	2
.L8:
	.word	MD2
	.word	BIT0
	.word	BIT1
	.word	RXS
	.word	TXS
	.size	enable_loopback, .-enable_loopback
	.comm	TXS,4,4
	.comm	RXS,4,4
	.comm	MD2,4,4
	.comm	BIT1,4,4
	.comm	BIT0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
