	.file	"902338.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s: invalid length %lu\n"
	.text
	.type	to_std_logic_vector, @function
to_std_logic_vector:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	cmp	QWORD PTR -40[rbp], 64
	jbe	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, rdx
	lea	rdx, __func__.1[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	QWORD PTR -8[rbp], 0
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	sub	eax, 1
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	je	.L4
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], 3
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], 2
.L5:
	add	QWORD PTR -32[rbp], 1
	add	QWORD PTR -8[rbp], 1
.L3:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jb	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	to_std_logic_vector, .-to_std_logic_vector
	.section	.rodata
.LC1:
	.string	"%s: bad bit %d\n"
	.text
	.type	from_std_logic_vector, @function
from_std_logic_vector:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -16[rbp], 0
	cmp	QWORD PTR -48[rbp], 64
	jbe	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rcx, rdx
	lea	rdx, __func__.0[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	QWORD PTR -8[rbp], 0
	jmp	.L9
.L13:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 2
	jne	.L10
	mov	BYTE PTR -17[rbp], 0
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 3
	jne	.L12
	mov	BYTE PTR -17[rbp], 1
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -40[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	edx, al
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, edx
	lea	rdx, __func__.0[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	BYTE PTR -17[rbp], 0
.L11:
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, [rax+rax]
	movzx	eax, BYTE PTR -17[rbp]
	or	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	add	QWORD PTR -40[rbp], 1
	add	QWORD PTR -8[rbp], 1
.L9:
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -48[rbp]
	jb	.L13
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	from_std_logic_vector, .-from_std_logic_vector
	.data
	.align 4
	.type	fd, @object
	.size	fd, 4
fd:
	.long	-1
	.align 4
	.type	cfd, @object
	.size	cfd, 4
cfd:
	.long	-1
	.section	.rodata
	.align 8
.LC2:
	.string	"Failed to open debug socket !\r\n"
	.align 8
.LC3:
	.string	"Failed to configure debug socket !\r\n"
	.align 8
.LC4:
	.string	"Failed to bind debug socket !\r\n"
	.align 8
.LC5:
	.string	"Failed to listen to debug socket !\r\n"
.LC6:
	.string	"Debug socket ready\r\n"
	.text
	.type	open_socket, @function
open_socket:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L29
	mov	eax, DWORD PTR fd[rip]
	cmp	eax, -1
	jl	.L29
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	jmp	.L20
.L19:
	mov	DWORD PTR -40[rbp], 0
	mov	eax, DWORD PTR fd[rip]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	js	.L21
	mov	eax, DWORD PTR -36[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR fd[rip]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -40[rbp], eax
.L21:
	cmp	DWORD PTR -36[rbp], 0
	js	.L22
	cmp	DWORD PTR -40[rbp], 0
	jns	.L23
.L22:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 36
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
.L23:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 13245
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -44[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -44[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -32[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L24
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	jmp	.L20
.L24:
	mov	eax, DWORD PTR fd[rip]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L25
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 36
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	jmp	.L20
.L25:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC6[rip]
	call	fwrite@PLT
	jmp	.L15
.L20:
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	js	.L26
	mov	eax, DWORD PTR fd[rip]
	mov	edi, eax
	call	close@PLT
.L26:
	mov	DWORD PTR fd[rip], -2
	jmp	.L15
.L29:
	nop
.L15:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	open_socket, .-open_socket
	.section	.rodata
.LC7:
	.string	"Debug client connected !\r\n"
	.text
	.type	check_connection, @function
check_connection:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 16
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -36[rbp]
	lea	rcx, -32[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR cfd[rip], eax
	mov	eax, DWORD PTR cfd[rip]
	test	eax, eax
	js	.L34
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	jmp	.L30
.L34:
	nop
.L30:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check_connection, .-check_connection
	.section	.rodata
	.align 8
.LC8:
	.string	"Debug read error, assuming client disconnected !\r\n"
.LC9:
	.string	"Debug client disconnected !\r\n"
	.align 8
.LC10:
	.string	"Debug short read: %d bytes for %d bits, truncating\r\n"
	.text
	.globl	sim_jtag_read_msg
	.type	sim_jtag_read_msg, @function
sim_jtag_read_msg:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -73[rbp], 0
	mov	eax, DWORD PTR fd[rip]
	cmp	eax, -1
	jne	.L36
	call	open_socket
.L36:
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	js	.L52
	mov	eax, DWORD PTR cfd[rip]
	test	eax, eax
	jns	.L39
	call	check_connection
.L39:
	mov	eax, DWORD PTR cfd[rip]
	test	eax, eax
	js	.L53
	lea	rax, -56[rbp]
	mov	edx, 8
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR cfd[rip]
	mov	DWORD PTR -56[rbp], eax
	mov	WORD PTR -52[rbp], 1
	lea	rax, -56[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jle	.L54
	mov	eax, DWORD PTR cfd[rip]
	lea	rcx, -48[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jns	.L42
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 50
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
.L42:
	cmp	DWORD PTR -68[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
.L43:
	cmp	DWORD PTR -68[rbp], 0
	jg	.L44
	mov	eax, DWORD PTR cfd[rip]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR cfd[rip], -1
	jmp	.L38
.L44:
	movzx	eax, BYTE PTR -48[rbp]
	mov	BYTE PTR -73[rbp], al
	cmp	BYTE PTR -73[rbp], -1
	je	.L55
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	lea	edx, 0[0+rax*8]
	movzx	eax, BYTE PTR -73[rbp]
	cmp	edx, eax
	jge	.L46
	movzx	edx, BYTE PTR -73[rbp]
	mov	eax, DWORD PTR -68[rbp]
	lea	esi, -1[rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, edx
	mov	edx, esi
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	sal	eax, 3
	mov	BYTE PTR -73[rbp], al
.L46:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L47
.L50:
	mov	eax, DWORD PTR -72[rbp]
	sar	eax, 3
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 7
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -48[rbp+rax]
	movzx	eax, al
	and	eax, DWORD PTR -60[rbp]
	test	eax, eax
	je	.L48
	mov	edx, 3
	jmp	.L49
.L48:
	mov	edx, 2
.L49:
	mov	eax, DWORD PTR -72[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -72[rbp], 1
.L47:
	movzx	eax, BYTE PTR -73[rbp]
	cmp	DWORD PTR -72[rbp], eax
	jl	.L50
	jmp	.L38
.L52:
	nop
	jmp	.L38
.L53:
	nop
	jmp	.L38
.L54:
	nop
	jmp	.L38
.L55:
	nop
.L38:
	movzx	eax, BYTE PTR -73[rbp]
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	rdi, rax
	call	to_std_logic_vector
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sim_jtag_read_msg, .-sim_jtag_read_msg
	.section	.rodata
.LC11:
	.string	"Debug write error, ignoring\r\n"
	.text
	.globl	sim_jtag_write_msg
	.type	sim_jtag_write_msg, @function
sim_jtag_write_msg:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -96[rbp]
	mov	esi, 8
	mov	rdi, rax
	call	from_std_logic_vector
	mov	BYTE PTR -65[rbp], al
	movzx	eax, BYTE PTR -65[rbp]
	mov	BYTE PTR -48[rbp], al
	mov	DWORD PTR -64[rbp], 0
	jmp	.L57
.L60:
	mov	eax, DWORD PTR -64[rbp]
	sar	eax, 3
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	and	eax, 7
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 3
	jne	.L58
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -48[rbp+rax]
	mov	edx, eax
	mov	eax, DWORD PTR -52[rbp]
	or	edx, eax
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	cdqe
	mov	BYTE PTR -48[rbp+rax], dl
	jmp	.L59
.L58:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	cdqe
	movzx	eax, BYTE PTR -48[rbp+rax]
	mov	edx, eax
	mov	eax, DWORD PTR -52[rbp]
	not	eax
	and	edx, eax
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	cdqe
	mov	BYTE PTR -48[rbp+rax], dl
.L59:
	add	DWORD PTR -64[rbp], 1
.L57:
	movzx	eax, BYTE PTR -65[rbp]
	cmp	DWORD PTR -64[rbp], eax
	jl	.L60
	movzx	eax, BYTE PTR -65[rbp]
	add	eax, 7
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR cfd[rip]
	lea	rcx, -48[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L63
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 29
	mov	esi, 1
	lea	rdi, .LC11[rip]
	call	fwrite@PLT
.L63:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	sim_jtag_write_msg, .-sim_jtag_write_msg
	.section	.rodata
	.align 16
	.type	__func__.1, @object
	.size	__func__.1, 20
__func__.1:
	.string	"to_std_logic_vector"
	.align 16
	.type	__func__.0, @object
	.size	__func__.0, 22
__func__.0:
	.string	"from_std_logic_vector"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"902338.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s: invalid length %lu\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_std_logic_vector, %function
to_std_logic_vector:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #64
	bls	.L2
	ldr	r3, .L7
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, .L7+4
	ldr	r1, .L7+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L6:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-20]
	mov	r2, #3
	strb	r2, [r3]
	b	.L5
.L4:
	ldr	r3, [fp, #-20]
	mov	r2, #2
	strb	r2, [r3]
.L5:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bcc	.L6
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	stderr
	.word	__func__.6659
	.word	.LC0
	.size	to_std_logic_vector, .-to_std_logic_vector
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s: bad bit %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	from_std_logic_vector, %function
from_std_logic_vector:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r3, #64
	bls	.L10
	ldr	r3, .L17
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	ldr	r2, .L17+4
	ldr	r1, .L17+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L10:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L11
.L15:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #2
	bne	.L12
	mov	r3, #0
	strb	r3, [fp, #-13]
	b	.L13
.L12:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L14
	mov	r3, #1
	strb	r3, [fp, #-13]
	b	.L13
.L14:
	ldr	r3, .L17
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldr	r2, .L17+4
	ldr	r1, .L17+12
	bl	fprintf
	mov	r3, #0
	strb	r3, [fp, #-13]
.L13:
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #1
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	orr	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcc	.L15
	ldr	r3, [fp, #-12]
	mov	r2, r3
	mov	r3, #0
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	stderr
	.word	__func__.6669
	.word	.LC0
	.word	.LC1
	.size	from_std_logic_vector, .-from_std_logic_vector
	.data
	.align	2
	.type	fd, %object
	.size	fd, 4
fd:
	.word	-1
	.align	2
	.type	cfd, %object
	.size	cfd, 4
cfd:
	.word	-1
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Failed to open debug socket !\015\012\000"
	.align	2
.LC3:
	.ascii	"Failed to configure debug socket !\015\012\000"
	.align	2
.LC4:
	.ascii	"Failed to bind debug socket !\015\012\000"
	.align	2
.LC5:
	.ascii	"Failed to listen to debug socket !\015\012\000"
	.align	2
.LC6:
	.ascii	"Debug socket ready\015\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_socket, %function
open_socket:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L34+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L33
	ldr	r3, .L34+4
	ldr	r3, [r3]
	cmn	r3, #1
	blt	.L33
	mov	r1, #1
	mov	r0, #13
	bl	signal
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L34+4
	str	r3, [r2]
	ldr	r3, .L34+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L23
	ldr	r3, .L34+8
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L34+12
	bl	fwrite
	b	.L24
.L23:
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r3, .L34+4
	ldr	r3, [r3]
	mov	r1, #3
	mov	r0, r3
	bl	fcntl
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L25
	ldr	r3, .L34+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-28]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	bl	fcntl
	str	r0, [fp, #-32]
.L25:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L26
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L27
.L26:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	mov	r2, #36
	mov	r1, #1
	ldr	r0, .L34+16
	bl	fwrite
.L27:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L34+20
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r3, .L34+4
	ldr	r0, [r3]
	sub	r3, fp, #36
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	bl	setsockopt
	ldr	r3, .L34+4
	ldr	r3, [r3]
	sub	r1, fp, #24
	mov	r2, #16
	mov	r0, r3
	bl	bind
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L28
	ldr	r3, .L34+8
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L34+24
	bl	fwrite
	b	.L24
.L28:
	ldr	r3, .L34+4
	ldr	r3, [r3]
	mov	r1, #1
	mov	r0, r3
	bl	listen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L29
	ldr	r3, .L34+8
	ldr	r3, [r3]
	mov	r2, #36
	mov	r1, #1
	ldr	r0, .L34+28
	bl	fwrite
	b	.L24
.L29:
	ldr	r3, .L34+8
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L34+32
	bl	fwrite
	b	.L19
.L24:
	ldr	r3, .L34+4
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L30
	ldr	r3, .L34+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L30:
	ldr	r3, .L34+4
	mvn	r2, #1
	str	r2, [r3]
	b	.L19
.L33:
	nop
.L19:
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC7
	.word	fd
	.word	stderr
	.word	.LC2
	.word	.LC3
	.word	13245
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	open_socket, .-open_socket
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Debug client connected !\015\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_connection, %function
check_connection:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L41
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-28]
	ldr	r3, .L41+4
	ldr	r3, [r3]
	sub	r2, fp, #28
	sub	r1, fp, #24
	mov	r0, r3
	bl	accept
	mov	r3, r0
	ldr	r2, .L41+8
	str	r3, [r2]
	ldr	r3, .L41+8
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L40
	ldr	r3, .L41+12
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L41+16
	bl	fwrite
	b	.L36
.L40:
	nop
.L36:
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC9
	.word	fd
	.word	cfd
	.word	stderr
	.word	.LC8
	.size	check_connection, .-check_connection
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Debug read error, assuming client disconnected !\015"
	.ascii	"\012\000"
	.align	2
.LC11:
	.ascii	"Debug client disconnected !\015\012\000"
	.align	2
.LC12:
	.ascii	"Debug short read: %d bytes for %d bits, truncating\015"
	.ascii	"\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sim_jtag_read_msg
	.syntax unified
	.arm
	.fpu softvfp
	.type	sim_jtag_read_msg, %function
sim_jtag_read_msg:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-65]
	ldr	r3, .L64+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L44
	bl	open_socket
.L44:
	ldr	r3, .L64+4
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L60
	ldr	r3, .L64+8
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L47
	bl	check_connection
.L47:
	ldr	r3, .L64+8
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L61
	sub	r3, fp, #48
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L64+8
	ldr	r3, [r3]
	str	r3, [fp, #-48]
	mov	r3, #1
	strh	r3, [fp, #-44]	@ movhi
	sub	r3, fp, #48
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	ble	.L62
	ldr	r3, .L64+8
	ldr	r3, [r3]
	sub	r1, fp, #40
	mov	r2, #32
	mov	r0, r3
	bl	read
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L50
	ldr	r3, .L64+12
	ldr	r3, [r3]
	mov	r2, #50
	mov	r1, #1
	ldr	r0, .L64+16
	bl	fwrite
.L50:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L51
	ldr	r3, .L64+12
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L64+20
	bl	fwrite
.L51:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bgt	.L52
	ldr	r3, .L64+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L64+8
	mvn	r2, #0
	str	r2, [r3]
	b	.L46
.L52:
	ldrb	r3, [fp, #-40]
	strb	r3, [fp, #-65]
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #255
	beq	.L63
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	lsl	r2, r3, #3
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r2, r3
	bge	.L54
	ldr	r3, .L64+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	sub	r2, r3, #1
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	ldr	r1, .L64+24
	bl	fprintf
	ldr	r3, [fp, #-60]
	sub	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #3
	strb	r3, [fp, #-65]
.L54:
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L55
.L58:
	ldr	r3, [fp, #-64]
	asr	r3, r3, #3
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-64]
	and	r3, r3, #7
	mov	r2, #1
	lsl	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-36]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-52]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L56
	mov	r1, #3
	b	.L57
.L56:
	mov	r1, #2
.L57:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L55:
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	ldr	r2, [fp, #-64]
	cmp	r2, r3
	blt	.L58
	b	.L46
.L60:
	nop
	b	.L46
.L61:
	nop
	b	.L46
.L62:
	nop
	b	.L46
.L63:
	nop
.L46:
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	mov	r2, #8
	ldr	r1, [fp, #-76]
	mov	r0, r3
	bl	to_std_logic_vector
	nop
	ldr	r3, .L64
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L59
	bl	__stack_chk_fail
.L59:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC13
	.word	fd
	.word	cfd
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	sim_jtag_read_msg, .-sim_jtag_read_msg
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Debug write error, ignoring\015\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sim_jtag_write_msg
	.syntax unified
	.arm
	.fpu softvfp
	.type	sim_jtag_write_msg, %function
sim_jtag_write_msg:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L74
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #8
	ldr	r0, [fp, #-68]
	bl	from_std_logic_vector
	mov	r2, r0
	mov	r3, r1
	mov	r3, r2
	strb	r3, [fp, #-57]
	ldrb	r3, [fp, #-57]
	strb	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L67
.L70:
	ldr	r3, [fp, #-56]
	asr	r3, r3, #3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-56]
	and	r3, r3, #7
	mov	r2, #1
	lsl	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-56]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L68
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-36]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	and	r2, r2, #255
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-36]
	b	.L69
.L68:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-36]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #24
	asr	r3, r3, #24
	mvn	r3, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	and	r3, r3, r2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	and	r2, r2, #255
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-36]
.L69:
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L67:
	ldrb	r3, [fp, #-57]	@ zero_extendqisi2
	ldr	r2, [fp, #-56]
	cmp	r2, r3
	blt	.L70
	ldrb	r3, [fp, #-57]	@ zero_extendqisi2
	add	r3, r3, #7
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	str	r3, [fp, #-52]
	ldr	r3, .L74+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	sub	r1, fp, #40
	mov	r0, r3
	bl	write
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L73
	ldr	r3, .L74+8
	ldr	r3, [r3]
	mov	r2, #29
	mov	r1, #1
	ldr	r0, .L74+12
	bl	fwrite
.L73:
	nop
	ldr	r3, .L74
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L72
	bl	__stack_chk_fail
.L72:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC15
	.word	cfd
	.word	stderr
	.word	.LC14
	.size	sim_jtag_write_msg, .-sim_jtag_write_msg
	.section	.rodata
	.align	2
	.type	__func__.6659, %object
	.size	__func__.6659, 20
__func__.6659:
	.ascii	"to_std_logic_vector\000"
	.align	2
	.type	__func__.6669, %object
	.size	__func__.6669, 22
__func__.6669:
	.ascii	"from_std_logic_vector\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
