	.file	"947064.c"
	.intel_syntax noprefix
	.text
	.globl	sram
	.bss
	.align 32
	.type	sram, @object
	.size	sram, 1048576
sram:
	.zero	1048576
	.globl	fptr
	.align 8
	.type	fptr, @object
	.size	fptr, 8
fptr:
	.zero	8
	.globl	log_enabled
	.align 4
	.type	log_enabled, @object
	.size	log_enabled, 4
log_enabled:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"\nr%02d [%08x] r%02d [%08x] r%02d [%08x] r%02d [%08x]"
	.text
	.globl	dumpregs
	.type	dumpregs, @function
dumpregs:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 3[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	edi, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -4[rbp]
	lea	r8d, 3[rax]
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	esi, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -4[rbp]
	lea	r9d, 2[rax]
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	movsx	rdx, edx
	mov	r10d, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -4[rbp]
	lea	ecx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	eax, DWORD PTR -4[rbp]
	sub	rsp, 8
	push	rdi
	push	r8
	push	rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
	add	DWORD PTR -4[rbp], 4
.L2:
	cmp	DWORD PTR -4[rbp], 31
	jle	.L3
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dumpregs, .-dumpregs
	.section	.rodata
.LC1:
	.string	"\npc: %08x, ir: %08x"
	.text
	.globl	bp
	.type	bp, @function
bp:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	dumpregs
	call	getchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bp, .-bp
	.type	mem_fetch, @function
mem_fetch:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 136[rax]
	mov	eax, DWORD PTR -28[rbp]
	and	eax, 1048575
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mem_fetch, .-mem_fetch
	.section	.rodata
	.align 8
.LC2:
	.string	"\nunaligned access (load word) pc=0x%x addr=0x%x"
	.align 8
.LC3:
	.string	"\nunaligned access (load halfword) pc=0x%x addr=0x%x"
.LC4:
	.string	"\nerror"
	.text
	.type	mem_read, @function
mem_read:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	cmp	DWORD PTR -32[rbp], -268435392
	je	.L8
	cmp	DWORD PTR -32[rbp], -268435392
	ja	.L9
	cmp	DWORD PTR -32[rbp], -268435408
	je	.L10
	cmp	DWORD PTR -32[rbp], -268435408
	ja	.L9
	cmp	DWORD PTR -32[rbp], -268435424
	je	.L11
	cmp	DWORD PTR -32[rbp], -268435424
	ja	.L9
	cmp	DWORD PTR -32[rbp], -268435440
	je	.L12
	cmp	DWORD PTR -32[rbp], -268435440
	ja	.L9
	cmp	DWORD PTR -32[rbp], -268435456
	je	.L13
	cmp	DWORD PTR -32[rbp], -268435456
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519880688
	je	.L14
	cmp	DWORD PTR -32[rbp], -519880688
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519880704
	je	.L15
	cmp	DWORD PTR -32[rbp], -519880704
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519894016
	je	.L16
	cmp	DWORD PTR -32[rbp], -519894016
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519895040
	je	.L17
	cmp	DWORD PTR -32[rbp], -519895040
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519896064
	je	.L18
	cmp	DWORD PTR -32[rbp], -519896064
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519945168
	je	.L19
	cmp	DWORD PTR -32[rbp], -519945168
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519945184
	je	.L20
	cmp	DWORD PTR -32[rbp], -519945184
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519945200
	je	.L21
	cmp	DWORD PTR -32[rbp], -519945200
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519945216
	je	.L22
	cmp	DWORD PTR -32[rbp], -519945216
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519946240
	je	.L23
	cmp	DWORD PTR -32[rbp], -519946240
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519959552
	je	.L24
	cmp	DWORD PTR -32[rbp], -519959552
	ja	.L9
	cmp	DWORD PTR -32[rbp], -519960576
	je	.L25
	cmp	DWORD PTR -32[rbp], -519960576
	ja	.L9
	cmp	DWORD PTR -32[rbp], -520092672
	je	.L26
	cmp	DWORD PTR -32[rbp], -519961600
	je	.L27
	jmp	.L9
.L13:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 144[rax]
	jmp	.L28
.L12:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 148[rax]
	jmp	.L28
.L11:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 152[rax]
	jmp	.L28
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 156[rax]
	jmp	.L28
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 176[rax]
	jmp	.L28
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 180[rax]
	jmp	.L28
.L27:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 184[rax]
	jmp	.L28
.L25:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 188[rax]
	jmp	.L28
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 192[rax]
	jmp	.L28
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 196[rax]
	jmp	.L28
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 200[rax]
	jmp	.L28
.L21:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 204[rax]
	jmp	.L28
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 208[rax]
	jmp	.L28
.L19:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 212[rax]
	jmp	.L28
.L18:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 216[rax]
	jmp	.L28
.L17:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 220[rax]
	jmp	.L28
.L16:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 224[rax]
	jmp	.L28
.L15:
	call	getchar@PLT
	jmp	.L28
.L14:
	mov	eax, 0
	jmp	.L28
.L9:
	cmp	DWORD PTR -32[rbp], -536870913
	jbe	.L29
	mov	eax, 0
	jmp	.L28
.L29:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 136[rax]
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 1048575
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	cmp	DWORD PTR -28[rbp], 4
	je	.L30
	cmp	DWORD PTR -28[rbp], 4
	jg	.L31
	cmp	DWORD PTR -28[rbp], 1
	je	.L32
	cmp	DWORD PTR -28[rbp], 2
	je	.L33
	jmp	.L31
.L30:
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 3
	test	eax, eax
	je	.L34
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dumpregs
	mov	edi, 1
	call	exit@PLT
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L35
.L33:
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 1
	test	eax, eax
	je	.L36
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dumpregs
	mov	edi, 1
	call	exit@PLT
.L36:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	cwde
	mov	DWORD PTR -12[rbp], eax
	jmp	.L35
.L32:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -12[rbp], eax
	jmp	.L35
.L31:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
.L35:
	mov	eax, DWORD PTR -12[rbp]
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	mem_read, .-mem_read
	.section	.rodata
	.align 8
.LC5:
	.string	"\nend of simulation - %ld cycles.\n"
	.align 8
.LC6:
	.string	"\nunaligned access (store word) pc=0x%x addr=0x%x"
	.align 8
.LC7:
	.string	"\nunaligned access (store halfword) pc=0x%x addr=0x%x"
	.text
	.type	mem_write, @function
mem_write:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	cmp	DWORD PTR -32[rbp], -268435248
	je	.L38
	cmp	DWORD PTR -32[rbp], -268435248
	ja	.L39
	cmp	DWORD PTR -32[rbp], -268435392
	je	.L40
	cmp	DWORD PTR -32[rbp], -268435392
	ja	.L39
	cmp	DWORD PTR -32[rbp], -268435408
	je	.L41
	cmp	DWORD PTR -32[rbp], -268435408
	ja	.L39
	cmp	DWORD PTR -32[rbp], -268435424
	je	.L42
	cmp	DWORD PTR -32[rbp], -268435424
	ja	.L39
	cmp	DWORD PTR -32[rbp], -268435456
	je	.L43
	cmp	DWORD PTR -32[rbp], -268435456
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519880688
	je	.L70
	cmp	DWORD PTR -32[rbp], -519880688
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519880704
	je	.L45
	cmp	DWORD PTR -32[rbp], -519880704
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519894016
	je	.L46
	cmp	DWORD PTR -32[rbp], -519894016
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519895040
	je	.L47
	cmp	DWORD PTR -32[rbp], -519895040
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519945168
	je	.L48
	cmp	DWORD PTR -32[rbp], -519945168
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519945184
	je	.L49
	cmp	DWORD PTR -32[rbp], -519945184
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519945200
	je	.L50
	cmp	DWORD PTR -32[rbp], -519945200
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519945216
	je	.L51
	cmp	DWORD PTR -32[rbp], -519945216
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519946240
	je	.L71
	cmp	DWORD PTR -32[rbp], -519946240
	ja	.L39
	cmp	DWORD PTR -32[rbp], -519959552
	je	.L53
	cmp	DWORD PTR -32[rbp], -519959552
	ja	.L39
	cmp	DWORD PTR -32[rbp], -536870912
	je	.L54
	cmp	DWORD PTR -32[rbp], -519960576
	je	.L55
	jmp	.L39
.L43:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 144[rax], edx
	jmp	.L37
.L42:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 152[rax], edx
	jmp	.L37
.L41:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L57
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 156[rax], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L58
.L59:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -12[rbp]
	add	rdx, 40
	mov	DWORD PTR [rax+rdx*4], 0
	add	DWORD PTR -12[rbp], 1
.L58:
	cmp	DWORD PTR -12[rbp], 3
	jbe	.L59
	jmp	.L37
.L57:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 172[rax], edx
	jmp	.L37
.L40:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -36[rbp]
	mov	DWORD PTR 176[rax], edx
	jmp	.L37
.L55:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 188[rax], edx
	jmp	.L37
.L53:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 192[rax], edx
	jmp	.L37
.L51:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L37
.L50:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 204[rax], edx
	jmp	.L37
.L49:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 208[rax], edx
	jmp	.L37
.L48:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, ax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 212[rax], edx
	jmp	.L37
.L47:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 220[rax], edx
	jmp	.L37
.L46:
	mov	eax, DWORD PTR -36[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 224[rax], edx
	jmp	.L37
.L54:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	eax, DWORD PTR log_enabled[rip]
	test	eax, eax
	je	.L61
	mov	rax, QWORD PTR fptr[rip]
	mov	rdi, rax
	call	fclose@PLT
.L61:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 232[rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L38:
	mov	eax, DWORD PTR log_enabled[rip]
	test	eax, eax
	je	.L72
	mov	eax, DWORD PTR -36[rbp]
	movsx	eax, al
	mov	rdx, QWORD PTR fptr[rip]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	jmp	.L72
.L45:
	mov	eax, DWORD PTR -36[rbp]
	movsx	eax, al
	mov	rdx, QWORD PTR stdout[rip]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	jmp	.L37
.L39:
	cmp	DWORD PTR -32[rbp], -536870913
	ja	.L73
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 136[rax]
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 1048575
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	cmp	DWORD PTR -28[rbp], 4
	je	.L64
	cmp	DWORD PTR -28[rbp], 4
	jg	.L65
	cmp	DWORD PTR -28[rbp], 1
	je	.L66
	cmp	DWORD PTR -28[rbp], 2
	je	.L67
	jmp	.L65
.L64:
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 3
	test	eax, eax
	je	.L68
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dumpregs
	mov	edi, 1
	call	exit@PLT
.L68:
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L37
.L67:
	mov	eax, DWORD PTR -32[rbp]
	and	eax, 1
	test	eax, eax
	je	.L69
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	dumpregs
	mov	edi, 1
	call	exit@PLT
.L69:
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	WORD PTR [rax], dx
	jmp	.L37
.L66:
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L37
.L65:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L37
.L70:
	nop
	jmp	.L37
.L71:
	nop
	jmp	.L37
.L72:
	nop
	jmp	.L37
.L73:
	nop
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	mem_write, .-mem_write
	.section	.rodata
	.align 8
.LC8:
	.string	"\ninvalid opcode (pc=0x%x opcode=0x%x)"
	.text
	.globl	cycle
	.type	cycle, @function
cycle:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 104
	.cfi_offset 3, -24
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 156[rax]
	test	eax, eax
	je	.L75
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 148[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 152[rax]
	and	eax, edx
	test	eax, eax
	je	.L75
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 132[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 176[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 144[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 128[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 144[rax]
	lea	edx, 4[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 156[rax], 0
	mov	DWORD PTR -92[rbp], 0
	jmp	.L76
.L77:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR -92[rbp]
	add	rdx, 40
	mov	DWORD PTR [rax+rdx*4], 0
	add	DWORD PTR -92[rbp], 1
.L76:
	cmp	DWORD PTR -92[rbp], 3
	jbe	.L77
.L75:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	mem_fetch
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 127
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 7
	and	eax, 31
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 15
	and	eax, 31
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 20
	and	eax, 31
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 12
	and	eax, 7
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 25
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 20
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 7
	and	eax, 31
	mov	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 20
	and	eax, 4064
	or	eax, edx
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 7
	and	eax, 30
	mov	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 20
	and	eax, 2016
	or	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	sal	eax, 4
	and	eax, 2048
	or	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 19
	and	eax, 4096
	or	eax, edx
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -4096
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 20
	and	eax, 2046
	mov	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 9
	and	eax, 2048
	or	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 1044480
	or	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	shr	eax, 11
	and	eax, 1048576
	or	eax, edx
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	test	eax, eax
	jns	.L78
	or	DWORD PTR -88[rbp], -4096
	or	DWORD PTR -84[rbp], -4096
	or	DWORD PTR -80[rbp], -8192
	or	DWORD PTR -76[rbp], -2097152
.L78:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -88[rbp]
	add	eax, edx
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -84[rbp]
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	cmp	DWORD PTR -68[rbp], 111
	je	.L79
	cmp	DWORD PTR -68[rbp], 111
	ja	.L184
	cmp	DWORD PTR -68[rbp], 103
	je	.L81
	cmp	DWORD PTR -68[rbp], 103
	ja	.L184
	cmp	DWORD PTR -68[rbp], 99
	je	.L82
	cmp	DWORD PTR -68[rbp], 99
	ja	.L184
	cmp	DWORD PTR -68[rbp], 3
	je	.L83
	cmp	DWORD PTR -68[rbp], 3
	jb	.L184
	cmp	DWORD PTR -68[rbp], 55
	ja	.L184
	cmp	DWORD PTR -68[rbp], 19
	jb	.L184
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 19
	cmp	eax, 36
	ja	.L184
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L85[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L85[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L85:
	.long	.L89-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L88-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L87-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L86-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L184-.L85
	.long	.L84-.L85
	.text
.L84:
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L90
.L88:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	jmp	.L90
.L79:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 132[rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -76[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L90
.L81:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 132[rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, eax
	mov	eax, DWORD PTR -88[rbp]
	add	eax, edx
	and	eax, -2
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L90
.L82:
	cmp	DWORD PTR -52[rbp], 7
	ja	.L185
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L93[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L93[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L93:
	.long	.L98-.L93
	.long	.L97-.L93
	.long	.L185-.L93
	.long	.L185-.L93
	.long	.L96-.L93
	.long	.L95-.L93
	.long	.L94-.L93
	.long	.L92-.L93
	.text
.L98:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L186
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L186
.L97:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	je	.L187
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L187
.L96:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jge	.L188
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L188
.L95:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jl	.L189
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L189
.L94:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jnb	.L190
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L190
.L92:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jb	.L191
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 128[rax]
	mov	eax, DWORD PTR -80[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	jmp	.L191
.L186:
	nop
	jmp	.L90
.L187:
	nop
	jmp	.L90
.L188:
	nop
	jmp	.L90
.L189:
	nop
	jmp	.L90
.L190:
	nop
	jmp	.L90
.L191:
	nop
	jmp	.L90
.L83:
	cmp	DWORD PTR -52[rbp], 5
	ja	.L192
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L109[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L109[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L109:
	.long	.L113-.L109
	.long	.L112-.L109
	.long	.L111-.L109
	.long	.L192-.L109
	.long	.L110-.L109
	.long	.L108-.L109
	.text
.L113:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	mem_read
	mov	ecx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movsx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L114
.L112:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	mem_read
	mov	ecx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movsx	eax, cx
	mov	DWORD PTR [rdx], eax
	jmp	.L114
.L111:
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	lea	rbx, [rdx+rax]
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	mem_read
	mov	DWORD PTR [rbx], eax
	jmp	.L114
.L110:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	mem_read
	mov	ecx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L114
.L108:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	mem_read
	mov	ecx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cx
	mov	DWORD PTR [rdx], eax
	nop
.L114:
	jmp	.L90
.L87:
	cmp	DWORD PTR -52[rbp], 2
	je	.L115
	cmp	DWORD PTR -52[rbp], 2
	ja	.L193
	cmp	DWORD PTR -52[rbp], 0
	je	.L117
	cmp	DWORD PTR -52[rbp], 1
	je	.L118
	jmp	.L193
.L117:
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	ecx, eax
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	mem_write
	jmp	.L119
.L118:
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	ecx, eax
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 2
	mov	rdi, rax
	call	mem_write
	jmp	.L119
.L115:
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	ecx, eax
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 4
	mov	rdi, rax
	call	mem_write
	nop
.L119:
	jmp	.L90
.L89:
	cmp	DWORD PTR -52[rbp], 7
	ja	.L194
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L122[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L122[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L122:
	.long	.L129-.L122
	.long	.L128-.L122
	.long	.L127-.L122
	.long	.L126-.L122
	.long	.L125-.L122
	.long	.L124-.L122
	.long	.L123-.L122
	.long	.L121-.L122
	.text
.L129:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L130
.L127:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -88[rbp]
	cmp	edx, eax
	setl	cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L130
.L126:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -88[rbp], eax
	seta	cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L130
.L125:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	xor	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L130
.L123:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	or	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L130
.L121:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR -88[rbp]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	and	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L130
.L128:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	and	eax, 63
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	jmp	.L130
.L124:
	cmp	DWORD PTR -48[rbp], 0
	je	.L131
	cmp	DWORD PTR -48[rbp], 32
	je	.L132
	jmp	.L106
.L131:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	and	eax, 63
	mov	ecx, eax
	shr	edx, cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	jmp	.L134
.L132:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	and	eax, 63
	mov	edx, eax
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	ecx, edx
	sar	esi, cl
	mov	edx, esi
	mov	DWORD PTR [rax], edx
	nop
.L134:
	nop
.L130:
	jmp	.L90
.L86:
	cmp	DWORD PTR -52[rbp], 7
	ja	.L195
	mov	eax, DWORD PTR -52[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L137[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L137[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L137:
	.long	.L144-.L137
	.long	.L143-.L137
	.long	.L142-.L137
	.long	.L141-.L137
	.long	.L140-.L137
	.long	.L139-.L137
	.long	.L138-.L137
	.long	.L136-.L137
	.text
.L144:
	cmp	DWORD PTR -48[rbp], 0
	je	.L145
	cmp	DWORD PTR -48[rbp], 32
	je	.L146
	jmp	.L106
.L145:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	add	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L148
.L146:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	sub	edx, ecx
	mov	DWORD PTR [rax], edx
	nop
.L148:
	jmp	.L149
.L143:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	mov	DWORD PTR [rdx], eax
	jmp	.L149
.L142:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	setl	cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L149
.L141:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	setb	cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	movzx	eax, cl
	mov	DWORD PTR [rdx], eax
	jmp	.L149
.L140:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	xor	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L149
.L139:
	cmp	DWORD PTR -48[rbp], 0
	je	.L150
	cmp	DWORD PTR -48[rbp], 32
	je	.L151
	jmp	.L106
.L150:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	mov	ecx, eax
	shr	edx, cl
	mov	eax, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	DWORD PTR [rax], edx
	jmp	.L153
.L151:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	esi, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -64[rbp]
	lea	rcx, 0[0+rdx*4]
	mov	rdx, QWORD PTR -32[rbp]
	add	rdx, rcx
	mov	ecx, eax
	sar	esi, cl
	mov	eax, esi
	mov	DWORD PTR [rdx], eax
	nop
.L153:
	jmp	.L149
.L138:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	or	edx, ecx
	mov	DWORD PTR [rax], edx
	jmp	.L149
.L136:
	mov	eax, DWORD PTR -60[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR [rax]
	mov	eax, DWORD PTR -56[rbp]
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	lea	rsi, 0[0+rax*4]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	and	edx, ecx
	mov	DWORD PTR [rax], edx
	nop
.L149:
	nop
.L90:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 132[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 128[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 132[rax]
	lea	edx, 4[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 132[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 160[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 156[rax], edx
	mov	DWORD PTR -92[rbp], 0
	jmp	.L154
.L155:
	mov	eax, DWORD PTR -92[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, edx
	add	rdx, 40
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	rax, QWORD PTR -104[rbp]
	mov	ecx, DWORD PTR -92[rbp]
	add	rcx, 40
	mov	DWORD PTR [rax+rcx*4], edx
	add	DWORD PTR -92[rbp], 1
.L154:
	cmp	DWORD PTR -92[rbp], 2
	jbe	.L155
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 65536
	test	eax, eax
	je	.L156
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	or	eax, 1
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
	jmp	.L157
.L156:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	and	eax, 254
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
.L157:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 262144
	test	eax, eax
	je	.L158
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	or	eax, 2
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
	jmp	.L159
.L158:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	and	eax, 253
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
.L159:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 200[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 208[rax]
	cmp	edx, eax
	jne	.L160
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], 0
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	xor	eax, 4
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
.L160:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 200[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 212[rax]
	cmp	edx, eax
	jnb	.L161
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	or	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
	jmp	.L162
.L161:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 184[rax]
	and	eax, 247
	mov	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 184[rax], edx
.L162:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR 184[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 188[rax]
	xor	edx, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 192[rax]
	and	eax, edx
	test	eax, eax
	je	.L163
	mov	edx, 4
	jmp	.L164
.L163:
	mov	edx, 0
.L164:
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 180[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 180[rax]
	test	eax, eax
	setne	al
	movzx	edx, al
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 148[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR 232[rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	QWORD PTR 232[rax], rdx
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 196[rax], edx
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 204[rax]
	cmp	eax, 7
	ja	.L165
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L167[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L167[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L167:
	.long	.L165-.L167
	.long	.L173-.L167
	.long	.L172-.L167
	.long	.L171-.L167
	.long	.L170-.L167
	.long	.L169-.L167
	.long	.L168-.L167
	.long	.L166-.L167
	.text
.L173:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 3
	test	eax, eax
	jne	.L196
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L196
.L172:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 15
	test	eax, eax
	jne	.L197
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L197
.L171:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 63
	test	eax, eax
	jne	.L198
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L198
.L170:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	movzx	eax, al
	test	eax, eax
	jne	.L199
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L199
.L169:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 1023
	test	eax, eax
	jne	.L200
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L200
.L168:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 4095
	test	eax, eax
	jne	.L201
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L201
.L166:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 196[rax]
	and	eax, 16383
	test	eax, eax
	jne	.L202
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L202
.L165:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L175
.L196:
	nop
	jmp	.L175
.L197:
	nop
	jmp	.L175
.L198:
	nop
	jmp	.L175
.L199:
	nop
	jmp	.L175
.L200:
	nop
	jmp	.L175
.L201:
	nop
	jmp	.L175
.L202:
	nop
.L175:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 200[rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -104[rbp]
	mov	DWORD PTR 200[rax], edx
	jmp	.L183
.L184:
	nop
	jmp	.L106
.L185:
	nop
	jmp	.L106
.L192:
	nop
	jmp	.L106
.L193:
	nop
	jmp	.L106
.L194:
	nop
	jmp	.L106
.L195:
	nop
.L106:
	mov	rax, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR 128[rax]
	mov	edx, DWORD PTR -72[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L183:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	cycle, .-cycle
	.section	.rodata
.LC9:
	.string	"rb"
.LC10:
	.string	"\nerror opening binary file."
.LC11:
	.string	"\nerror reading binary file."
.LC12:
	.string	"wb"
	.align 8
.LC13:
	.string	"\nsyntax: hf_risc_sim [file.bin] [logfile.txt]"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -256[rbp]
	mov	QWORD PTR -272[rbp], rax
	mov	rax, QWORD PTR -272[rbp]
	mov	edx, 240
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edx, 4
	mov	esi, 255
	lea	rdi, sram[rip]
	call	memset@PLT
	cmp	DWORD PTR -292[rbp], 1
	jle	.L204
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -264[rbp], rax
	cmp	QWORD PTR -264[rbp], 0
	jne	.L205
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L211
.L205:
	mov	rax, QWORD PTR -264[rbp]
	mov	rcx, rax
	mov	edx, 1048576
	mov	esi, 1
	lea	rdi, sram[rip]
	call	fread@PLT
	mov	DWORD PTR -276[rbp], eax
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	DWORD PTR -276[rbp], 0
	jne	.L207
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L211
.L207:
	cmp	DWORD PTR -292[rbp], 3
	jne	.L208
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR fptr[rip], rax
	mov	rax, QWORD PTR fptr[rip]
	test	rax, rax
	jne	.L209
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L211
.L209:
	mov	DWORD PTR log_enabled[rip], 1
	jmp	.L208
.L204:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L211
.L208:
	mov	rax, QWORD PTR -272[rbp]
	mov	edx, 240
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	DWORD PTR 128[rax], 1073741824
	mov	rax, QWORD PTR -272[rbp]
	mov	eax, DWORD PTR 128[rax]
	lea	edx, 4[rax]
	mov	rax, QWORD PTR -272[rbp]
	mov	DWORD PTR 132[rax], edx
	mov	rax, QWORD PTR -272[rbp]
	lea	rdx, sram[rip]
	mov	QWORD PTR 136[rax], rdx
.L210:
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	cycle
	jmp	.L210
.L211:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L212
	call	__stack_chk_fail@PLT
.L212:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.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	"947064.c"
	.text
	.comm	sram,1048576,4
	.comm	fptr,4,4
	.global	log_enabled
	.bss
	.align	2
	.type	log_enabled, %object
	.size	log_enabled, 4
log_enabled:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012r%02d [%08x] r%02d [%08x] r%02d [%08x] r%02d [%"
	.ascii	"08x]\000"
	.text
	.align	2
	.global	dumpregs
	.syntax unified
	.arm
	.fpu softvfp
	.type	dumpregs, %function
dumpregs:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L3:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	ldr	r4, [r3, r2, lsl #2]
	ldr	r3, [fp, #-16]
	add	r5, r3, #1
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, [fp, #-16]
	add	r2, r2, #2
	ldr	r1, [fp, #-16]
	add	r0, r1, #2
	ldr	r1, [fp, #-24]
	ldr	r1, [r1, r0, lsl #2]
	ldr	r0, [fp, #-16]
	add	r0, r0, #3
	ldr	ip, [fp, #-16]
	add	lr, ip, #3
	ldr	ip, [fp, #-24]
	ldr	ip, [ip, lr, lsl #2]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r5
	mov	r2, r4
	ldr	r1, [fp, #-16]
	ldr	r0, .L4
	bl	printf
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	str	r3, [fp, #-16]
.L2:
	ldr	r3, [fp, #-16]
	cmp	r3, #31
	ble	.L3
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	dumpregs, .-dumpregs
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\012pc: %08x, ir: %08x\000"
	.text
	.align	2
	.global	bp
	.syntax unified
	.arm
	.fpu softvfp
	.type	bp, %function
bp:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L7
	bl	printf
	ldr	r0, [fp, #-8]
	bl	dumpregs
	bl	getchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.size	bp, .-bp
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mem_fetch, %function
mem_fetch:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #136]
	ldr	r3, [fp, #-20]
	bic	r3, r3, #-16777216
	bic	r3, r3, #15728640
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	mem_fetch, .-mem_fetch
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012unaligned access (load word) pc=0x%x addr=0x%x\000"
	.align	2
.LC3:
	.ascii	"\012unaligned access (load halfword) pc=0x%x addr=0"
	.ascii	"x%x\000"
	.align	2
.LC4:
	.ascii	"\012error\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mem_read, %function
mem_read:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r2, .L41
	cmp	r3, r2
	beq	.L12
	ldr	r3, [fp, #-24]
	ldr	r2, .L41
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+4
	cmp	r3, r2
	beq	.L14
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+4
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+8
	cmp	r3, r2
	beq	.L15
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+8
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+12
	cmp	r3, r2
	beq	.L16
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+12
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	cmp	r3, #-268435456
	beq	.L17
	ldr	r3, [fp, #-24]
	cmp	r3, #-268435456
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+16
	cmp	r3, r2
	beq	.L18
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+16
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+20
	cmp	r3, r2
	beq	.L19
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+20
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+24
	cmp	r3, r2
	beq	.L20
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+24
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+28
	cmp	r3, r2
	beq	.L21
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+28
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+32
	cmp	r3, r2
	beq	.L22
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+32
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+36
	cmp	r3, r2
	beq	.L23
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+36
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+40
	cmp	r3, r2
	beq	.L24
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+40
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+44
	cmp	r3, r2
	beq	.L25
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+44
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+48
	cmp	r3, r2
	beq	.L26
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+48
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+52
	cmp	r3, r2
	beq	.L27
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+52
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+56
	cmp	r3, r2
	beq	.L28
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+56
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+60
	cmp	r3, r2
	beq	.L29
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+60
	cmp	r3, r2
	bhi	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+64
	cmp	r3, r2
	beq	.L30
	ldr	r3, [fp, #-24]
	ldr	r2, .L41+68
	cmp	r3, r2
	beq	.L31
	b	.L13
.L17:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #140]
	b	.L32
.L16:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #144]
	b	.L32
.L15:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #148]
	b	.L32
.L14:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #152]
	b	.L32
.L12:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #172]
	b	.L32
.L30:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #176]
	b	.L32
.L31:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #180]
	b	.L32
.L29:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #184]
	b	.L32
.L28:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #188]
	b	.L32
.L27:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #192]
	b	.L32
.L26:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #196]
	b	.L32
.L25:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #200]
	b	.L32
.L24:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #204]
	b	.L32
.L23:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #208]
	b	.L32
.L22:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #212]
	b	.L32
.L21:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #216]
	b	.L32
.L20:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #220]
	b	.L32
.L19:
	bl	getchar
	mov	r3, r0
	b	.L32
.L18:
	mov	r3, #0
	b	.L32
.L13:
	ldr	r3, [fp, #-24]
	cmn	r3, #536870913
	bls	.L33
	mov	r3, #0
	b	.L32
.L33:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #136]
	ldr	r3, [fp, #-24]
	bic	r3, r3, #-16777216
	bic	r3, r3, #15728640
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	beq	.L34
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	bgt	.L35
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	beq	.L36
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	beq	.L37
	b	.L35
.L34:
	ldr	r3, [fp, #-24]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L41+72
	bl	printf
	ldr	r0, [fp, #-16]
	bl	dumpregs
	mov	r0, #1
	bl	exit
.L38:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L39
.L37:
	ldr	r3, [fp, #-24]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L41+76
	bl	printf
	ldr	r0, [fp, #-16]
	bl	dumpregs
	mov	r0, #1
	bl	exit
.L40:
	ldr	r3, [fp, #-8]
	ldrsh	r3, [r3]
	str	r3, [fp, #-12]
	b	.L39
.L36:
	ldr	r3, [fp, #-8]
	ldrsb	r3, [r3]
	str	r3, [fp, #-12]
	b	.L39
.L35:
	ldr	r0, .L41+80
	bl	printf
.L39:
	ldr	r3, [fp, #-12]
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	-268435392
	.word	-268435408
	.word	-268435424
	.word	-268435440
	.word	-519880688
	.word	-519880704
	.word	-519894016
	.word	-519895040
	.word	-519896064
	.word	-519945168
	.word	-519945184
	.word	-519945200
	.word	-519945216
	.word	-519946240
	.word	-519959552
	.word	-519960576
	.word	-520092672
	.word	-519961600
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	mem_read, .-mem_read
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\012end of simulation - %ld cycles.\012\000"
	.align	2
.LC6:
	.ascii	"\012unaligned access (store word) pc=0x%x addr=0x%x"
	.ascii	"\000"
	.align	2
.LC7:
	.ascii	"\012unaligned access (store halfword) pc=0x%x addr="
	.ascii	"0x%x\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mem_write, %function
mem_write:
	@ 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]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r2, .L80
	cmp	r3, r2
	beq	.L44
	ldr	r3, [fp, #-24]
	ldr	r2, .L80
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+4
	cmp	r3, r2
	beq	.L46
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+4
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+8
	cmp	r3, r2
	beq	.L47
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+8
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+12
	cmp	r3, r2
	beq	.L48
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+12
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	cmp	r3, #-268435456
	beq	.L49
	ldr	r3, [fp, #-24]
	cmp	r3, #-268435456
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+16
	cmp	r3, r2
	beq	.L76
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+16
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+20
	cmp	r3, r2
	beq	.L51
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+20
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+24
	cmp	r3, r2
	beq	.L52
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+24
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+28
	cmp	r3, r2
	beq	.L53
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+28
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+32
	cmp	r3, r2
	beq	.L54
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+32
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+36
	cmp	r3, r2
	beq	.L55
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+36
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+40
	cmp	r3, r2
	beq	.L56
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+40
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+44
	cmp	r3, r2
	beq	.L57
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+44
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+48
	cmp	r3, r2
	beq	.L77
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+48
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+52
	cmp	r3, r2
	beq	.L59
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+52
	cmp	r3, r2
	bhi	.L45
	ldr	r3, [fp, #-24]
	cmp	r3, #-536870912
	beq	.L60
	ldr	r3, [fp, #-24]
	ldr	r2, .L80+56
	cmp	r3, r2
	beq	.L61
	b	.L45
.L49:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #140]
	b	.L43
.L48:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #148]
	b	.L43
.L47:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L63
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #152]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L64
.L65:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #38
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L64:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	bls	.L65
	b	.L43
.L63:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #168]
	b	.L43
.L46:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	str	r2, [r3, #172]
	b	.L43
.L61:
	ldr	r3, [fp, #-28]
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	str	r2, [r3, #184]
	b	.L43
.L59:
	ldr	r3, [fp, #-28]
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	str	r2, [r3, #188]
	b	.L43
.L57:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-16]
	str	r3, [r2, #196]
	b	.L43
.L56:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-16]
	str	r3, [r2, #200]
	b	.L43
.L55:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-16]
	str	r3, [r2, #204]
	b	.L43
.L54:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-16]
	str	r3, [r2, #208]
	b	.L43
.L53:
	ldr	r3, [fp, #-28]
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	str	r2, [r3, #216]
	b	.L43
.L52:
	ldr	r3, [fp, #-28]
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	str	r2, [r3, #220]
	b	.L43
.L60:
	ldr	r3, .L80+60
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L80+64
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L67
	ldr	r3, .L80+68
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
.L67:
	ldr	r3, [fp, #-16]
	add	r3, r3, #224
	ldmia	r3, {r2-r3}
	ldr	r0, .L80+72
	bl	printf
	mov	r0, #0
	bl	exit
.L44:
	ldr	r3, .L80+64
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L78
	ldr	r3, .L80+68
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #24
	asr	r3, r3, #24
	mov	r1, r2
	mov	r0, r3
	bl	fputc
	b	.L78
.L51:
	ldr	r3, .L80+60
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #24
	asr	r3, r3, #24
	mov	r1, r2
	mov	r0, r3
	bl	fputc
	b	.L43
.L45:
	ldr	r3, [fp, #-24]
	cmn	r3, #536870913
	bhi	.L79
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #136]
	ldr	r3, [fp, #-24]
	bic	r3, r3, #-16777216
	bic	r3, r3, #15728640
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	beq	.L70
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	bgt	.L71
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	beq	.L72
	ldr	r3, [fp, #-20]
	cmp	r3, #2
	beq	.L73
	b	.L71
.L70:
	ldr	r3, [fp, #-24]
	and	r3, r3, #3
	cmp	r3, #0
	beq	.L74
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L80+76
	bl	printf
	ldr	r0, [fp, #-16]
	bl	dumpregs
	mov	r0, #1
	bl	exit
.L74:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L43
.L73:
	ldr	r3, [fp, #-24]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L75
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L80+80
	bl	printf
	ldr	r0, [fp, #-16]
	bl	dumpregs
	mov	r0, #1
	bl	exit
.L75:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r3, [fp, #-8]
	strh	r2, [r3]	@ movhi
	b	.L43
.L72:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	b	.L43
.L71:
	ldr	r0, .L80+84
	bl	printf
	b	.L43
.L76:
	nop
	b	.L43
.L77:
	nop
	b	.L43
.L78:
	nop
	b	.L43
.L79:
	nop
.L43:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L81:
	.align	2
.L80:
	.word	-268435248
	.word	-268435392
	.word	-268435408
	.word	-268435424
	.word	-519880688
	.word	-519880704
	.word	-519894016
	.word	-519895040
	.word	-519945168
	.word	-519945184
	.word	-519945200
	.word	-519945216
	.word	-519946240
	.word	-519959552
	.word	-519960576
	.word	stdout
	.word	log_enabled
	.word	fptr
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC4
	.size	mem_write, .-mem_write
	.section	.rodata
	.align	2
.LC8:
	.ascii	"\012invalid opcode (pc=0x%x opcode=0x%x)\000"
	.text
	.align	2
	.global	cycle
	.syntax unified
	.arm
	.fpu softvfp
	.type	cycle, %function
cycle:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #84
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #152]
	cmp	r3, #0
	beq	.L83
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #144]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #148]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L83
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #132]
	ldr	r3, [fp, #-96]
	str	r2, [r3, #172]
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #140]
	ldr	r3, [fp, #-96]
	str	r2, [r3, #128]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #140]
	add	r2, r3, #4
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	ldr	r3, [fp, #-96]
	mov	r2, #0
	str	r2, [r3, #152]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L84
.L85:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-88]
	add	r3, r3, #38
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L84:
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	bls	.L85
.L83:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #128]
	mov	r1, r3
	ldr	r0, [fp, #-96]
	bl	mem_fetch
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	and	r3, r3, #127
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #7
	and	r3, r3, #31
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #15
	and	r3, r3, #31
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #20
	and	r3, r3, #31
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #12
	and	r3, r3, #7
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #25
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #20
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #7
	and	r2, r3, #31
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #20
	and	r3, r3, #4064
	orr	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #7
	and	r2, r3, #30
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #20
	and	r3, r3, #2016
	orr	r2, r2, r3
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #4
	and	r3, r3, #2048
	orr	r2, r2, r3
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #19
	and	r3, r3, #4096
	orr	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #4080
	bic	r3, r3, #15
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-60]
	lsr	r2, r3, #20
	ldr	r3, .L211
	and	r3, r3, r2
	ldr	r2, [fp, #-60]
	lsr	r2, r2, #9
	and	r2, r2, #2048
	orr	r2, r3, r2
	ldr	r3, [fp, #-60]
	and	r3, r3, #1044480
	orr	r2, r2, r3
	ldr	r3, [fp, #-60]
	lsr	r3, r3, #11
	and	r3, r3, #1048576
	orr	r3, r2, r3
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L86
	ldr	r3, [fp, #-84]
	mvn	r3, r3, lsl #20
	mvn	r3, r3, lsr #20
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-80]
	mvn	r3, r3, lsl #20
	mvn	r3, r3, lsr #20
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-76]
	mvn	r3, r3, lsl #19
	mvn	r3, r3, lsr #19
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-72]
	mvn	r3, r3, lsl #11
	mvn	r3, r3, lsr #11
	str	r3, [fp, #-72]
.L86:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-68]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-56]
	cmp	r3, #111
	beq	.L87
	ldr	r3, [fp, #-56]
	cmp	r3, #111
	bhi	.L192
	ldr	r3, [fp, #-56]
	cmp	r3, #103
	beq	.L89
	ldr	r3, [fp, #-56]
	cmp	r3, #103
	bhi	.L192
	ldr	r3, [fp, #-56]
	cmp	r3, #99
	beq	.L90
	ldr	r3, [fp, #-56]
	cmp	r3, #99
	bhi	.L192
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	beq	.L91
	ldr	r3, [fp, #-56]
	cmp	r3, #3
	bcc	.L192
	ldr	r3, [fp, #-56]
	cmp	r3, #55
	bhi	.L192
	ldr	r3, [fp, #-56]
	cmp	r3, #19
	bcc	.L192
	ldr	r3, [fp, #-56]
	sub	r3, r3, #19
	cmp	r3, #36
	ldrls	pc, [pc, r3, asl #2]
	b	.L192
.L93:
	.word	.L97
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L96
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L95
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L94
	.word	.L192
	.word	.L192
	.word	.L192
	.word	.L92
.L92:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	b	.L98
.L96:
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-32]
	add	r1, r2, r3
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L98
.L87:
	ldr	r3, [fp, #-96]
	ldr	r1, [r3, #132]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-72]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L98
.L89:
	ldr	r3, [fp, #-96]
	ldr	r1, [r3, #132]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-84]
	add	r3, r2, r3
	bic	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L98
.L90:
	ldr	r3, [fp, #-40]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L193
.L101:
	.word	.L106
	.word	.L105
	.word	.L193
	.word	.L193
	.word	.L104
	.word	.L103
	.word	.L102
	.word	.L100
.L106:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-68]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L194
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L194
.L105:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-68]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L195
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L195
.L104:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-68]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L196
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L196
.L103:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-68]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L197
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L197
.L102:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bcs	.L198
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L198
.L100:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L199
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #128]
	ldr	r3, [fp, #-76]
	add	r2, r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	b	.L199
.L194:
	nop
	b	.L98
.L195:
	nop
	b	.L98
.L196:
	nop
	b	.L98
.L197:
	nop
	b	.L98
.L198:
	nop
	b	.L98
.L199:
	nop
	b	.L98
.L91:
	ldr	r3, [fp, #-40]
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L200
.L117:
	.word	.L121
	.word	.L120
	.word	.L119
	.word	.L200
	.word	.L118
	.word	.L116
.L121:
	ldr	r2, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	mem_read
	mov	r3, r0
	lsl	r3, r3, #24
	asr	r1, r3, #24
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L122
.L120:
	ldr	r2, [fp, #-28]
	mov	r1, #2
	ldr	r0, [fp, #-96]
	bl	mem_read
	mov	r3, r0
	lsl	r3, r3, #16
	asr	r1, r3, #16
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L122
.L119:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r6, r2, r3
	ldr	r2, [fp, #-28]
	mov	r1, #4
	ldr	r0, [fp, #-96]
	bl	mem_read
	mov	r3, r0
	str	r3, [r6]
	b	.L122
.L118:
	ldr	r2, [fp, #-28]
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	mem_read
	mov	r3, r0
	and	r1, r3, #255
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L122
.L116:
	ldr	r2, [fp, #-28]
	mov	r1, #2
	ldr	r0, [fp, #-96]
	bl	mem_read
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r1, r3, #16
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	nop
.L122:
	b	.L98
.L95:
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	beq	.L123
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	bhi	.L201
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L125
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	beq	.L126
	b	.L201
.L125:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	mov	r1, #1
	ldr	r0, [fp, #-96]
	bl	mem_write
	b	.L127
.L126:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	mov	r1, #2
	ldr	r0, [fp, #-96]
	bl	mem_write
	b	.L127
.L123:
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	mov	r1, #4
	ldr	r0, [fp, #-96]
	bl	mem_write
	nop
.L127:
	b	.L98
.L97:
	ldr	r3, [fp, #-40]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L202
.L130:
	.word	.L137
	.word	.L136
	.word	.L135
	.word	.L134
	.word	.L133
	.word	.L132
	.word	.L131
	.word	.L129
.L137:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	b	.L138
.L135:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L138
.L134:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-84]
	cmp	r2, r3
	movhi	r3, #1
	movls	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L138
.L133:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	eor	r2, r2, r1
	str	r2, [r3]
	b	.L138
.L131:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	orr	r2, r1, r2
	str	r2, [r3]
	b	.L138
.L129:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	and	r2, r2, r1
	str	r2, [r3]
	b	.L138
.L136:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	and	r3, r3, #63
	lsl	r1, r2, r3
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L138
.L132:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L139
	ldr	r3, [fp, #-36]
	cmp	r3, #32
	beq	.L140
	b	.L114
.L139:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	and	r3, r3, #63
	lsr	r1, r2, r3
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L142
.L140:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	and	r2, r3, #63
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	asr	r2, r1, r2
	str	r2, [r3]
	nop
.L142:
	nop
.L138:
	b	.L98
.L94:
	ldr	r3, [fp, #-40]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L203
.L145:
	.word	.L152
	.word	.L151
	.word	.L150
	.word	.L149
	.word	.L148
	.word	.L147
	.word	.L146
	.word	.L144
.L152:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L153
	ldr	r3, [fp, #-36]
	cmp	r3, #32
	beq	.L154
	b	.L114
.L153:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	add	r2, r1, r2
	str	r2, [r3]
	b	.L156
.L154:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	sub	r2, r1, r2
	str	r2, [r3]
	nop
.L156:
	b	.L157
.L151:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	lsl	r2, r1, r2
	str	r2, [r3]
	b	.L157
.L150:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-68]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L157
.L149:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	movcc	r3, #1
	movcs	r3, #0
	and	r1, r3, #255
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L157
.L148:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	eor	r2, r2, r1
	str	r2, [r3]
	b	.L157
.L147:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L158
	ldr	r3, [fp, #-36]
	cmp	r3, #32
	beq	.L159
	b	.L114
.L158:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r1, [fp, #-64]
	add	r3, r1, r3
	ldr	r3, [r3]
	lsr	r1, r2, r3
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3]
	b	.L161
.L159:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	asr	r2, r1, r2
	str	r2, [r3]
	nop
.L161:
	b	.L157
.L146:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	orr	r2, r1, r2
	str	r2, [r3]
	b	.L157
.L144:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r1, [r3]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #2
	ldr	r0, [fp, #-68]
	add	r3, r0, r3
	and	r2, r2, r1
	str	r2, [r3]
	nop
.L157:
	nop
.L98:
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #132]
	ldr	r3, [fp, #-96]
	str	r2, [r3, #128]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #132]
	add	r2, r3, #4
	ldr	r3, [fp, #-96]
	str	r2, [r3, #132]
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #156]
	ldr	r3, [fp, #-96]
	str	r2, [r3, #152]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L162
.L163:
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	ldr	r2, [fp, #-96]
	add	r3, r3, #38
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, [fp, #-96]
	ldr	r3, [fp, #-88]
	add	r3, r3, #38
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L162:
	ldr	r3, [fp, #-88]
	cmp	r3, #2
	bls	.L163
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #65536
	cmp	r3, #0
	beq	.L164
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	orr	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
	b	.L165
.L164:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	and	r2, r3, #254
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
.L165:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #262144
	cmp	r3, #0
	beq	.L166
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	orr	r2, r3, #2
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
	b	.L167
.L166:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	and	r2, r3, #253
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
.L167:
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #196]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #204]
	cmp	r2, r3
	bne	.L168
	ldr	r3, [fp, #-96]
	mov	r2, #0
	str	r2, [r3, #196]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	eor	r2, r3, #4
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
.L168:
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #196]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #208]
	cmp	r2, r3
	bcs	.L169
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	orr	r2, r3, #8
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
	b	.L170
.L169:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #180]
	and	r2, r3, #247
	ldr	r3, [fp, #-96]
	str	r2, [r3, #180]
.L170:
	ldr	r3, [fp, #-96]
	ldr	r2, [r3, #180]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #184]
	eor	r2, r2, r3
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #188]
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L171
	mov	r2, #4
	b	.L172
.L171:
	mov	r2, #0
.L172:
	ldr	r3, [fp, #-96]
	str	r2, [r3, #176]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #176]
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-96]
	str	r2, [r3, #144]
	ldr	r3, [fp, #-96]
	add	r3, r3, #224
	ldmia	r3, {r2-r3}
	adds	r4, r2, #1
	adc	r5, r3, #0
	ldr	r3, [fp, #-96]
	str	r4, [r3, #224]
	str	r5, [r3, #228]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #192]
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #200]
	sub	r3, r3, #1
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L173
.L175:
	.word	.L181
	.word	.L180
	.word	.L179
	.word	.L178
	.word	.L177
	.word	.L176
	.word	.L174
.L181:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #3
	cmp	r3, #0
	bne	.L204
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L204
.L180:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #15
	cmp	r3, #0
	bne	.L205
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L205
.L179:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #63
	cmp	r3, #0
	bne	.L206
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L206
.L178:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L207
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L207
.L177:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	cmp	r3, #0
	bne	.L208
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L208
.L176:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	lsl	r3, r3, #20
	lsr	r3, r3, #20
	cmp	r3, #0
	bne	.L209
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L209
.L174:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #192]
	lsl	r3, r3, #18
	lsr	r3, r3, #18
	cmp	r3, #0
	bne	.L210
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L210
.L212:
	.align	2
.L211:
	.word	2046
	.word	.LC8
.L173:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	add	r2, r3, #1
	ldr	r3, [fp, #-96]
	str	r2, [r3, #196]
	b	.L183
.L204:
	nop
	b	.L183
.L205:
	nop
	b	.L183
.L206:
	nop
	b	.L183
.L207:
	nop
	b	.L183
.L208:
	nop
	b	.L183
.L209:
	nop
	b	.L183
.L210:
	nop
.L183:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #196]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, [fp, #-96]
	str	r3, [r2, #196]
	b	.L191
.L192:
	nop
	b	.L114
.L193:
	nop
	b	.L114
.L200:
	nop
	b	.L114
.L201:
	nop
	b	.L114
.L202:
	nop
	b	.L114
.L203:
	nop
.L114:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3, #128]
	ldr	r2, [fp, #-60]
	mov	r1, r3
	ldr	r0, .L211+4
	bl	printf
	mov	r0, #0
	bl	exit
.L191:
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
	.size	cycle, .-cycle
	.section	.rodata
	.align	2
.LC9:
	.ascii	"rb\000"
	.align	2
.LC10:
	.ascii	"\012error opening binary file.\000"
	.align	2
.LC11:
	.ascii	"\012error reading binary file.\000"
	.align	2
.LC12:
	.ascii	"wb\000"
	.align	2
.LC13:
	.ascii	"\012syntax: hf_risc_sim [file.bin] [logfile.txt]\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #264
	str	r0, [fp, #-264]
	str	r1, [fp, #-268]
	ldr	r3, .L223
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #244
	str	r3, [fp, #-256]
	mov	r2, #232
	mov	r1, #0
	ldr	r0, [fp, #-256]
	bl	memset
	mov	r2, #4
	mov	r1, #255
	ldr	r0, .L223+4
	bl	memset
	ldr	r3, [fp, #-264]
	cmp	r3, #1
	ble	.L214
	ldr	r3, [fp, #-268]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L223+8
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-252]
	ldr	r3, [fp, #-252]
	cmp	r3, #0
	bne	.L215
	ldr	r0, .L223+12
	bl	puts
	mov	r3, #1
	b	.L221
.L215:
	ldr	r3, [fp, #-252]
	mov	r2, #1048576
	mov	r1, #1
	ldr	r0, .L223+4
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-248]
	ldr	r0, [fp, #-252]
	bl	fclose
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	bne	.L217
	ldr	r0, .L223+16
	bl	puts
	mov	r3, #1
	b	.L221
.L217:
	ldr	r3, [fp, #-264]
	cmp	r3, #3
	bne	.L218
	ldr	r3, [fp, #-268]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L223+20
	mov	r0, r3
	bl	fopen
	mov	r3, r0
	ldr	r2, .L223+24
	str	r3, [r2]
	ldr	r3, .L223+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L219
	ldr	r0, .L223+16
	bl	puts
	mov	r3, #1
	b	.L221
.L219:
	ldr	r3, .L223+28
	mov	r2, #1
	str	r2, [r3]
	b	.L218
.L214:
	ldr	r0, .L223+32
	bl	puts
	mov	r3, #1
	b	.L221
.L218:
	mov	r2, #232
	mov	r1, #0
	ldr	r0, [fp, #-256]
	bl	memset
	ldr	r3, [fp, #-256]
	mov	r2, #1073741824
	str	r2, [r3, #128]
	ldr	r3, [fp, #-256]
	ldr	r3, [r3, #128]
	add	r2, r3, #4
	ldr	r3, [fp, #-256]
	str	r2, [r3, #132]
	ldr	r3, [fp, #-256]
	ldr	r2, .L223+4
	str	r2, [r3, #136]
.L220:
	ldr	r0, [fp, #-256]
	bl	cycle
	b	.L220
.L221:
	ldr	r2, .L223
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L222
	bl	__stack_chk_fail
.L222:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L224:
	.align	2
.L223:
	.word	.LC14
	.word	sram
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	fptr
	.word	log_enabled
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
