// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Tedmem.cpp
// Function: TED::dump(void*)
void TED::dump(void *img)
{
	// this is ugly :-P
   	fwrite(Ram,RAMSIZE,1,(FILE *) img);
	fwrite(&RAMenable,sizeof(RAMenable),1,(FILE *) img);
	fwrite(&t1start,sizeof(t1start),1, (FILE *) img);
	fwrite(&t1on,sizeof(t1on),1, (FILE *) img);
	fwrite(&t2on,sizeof(t2on),1, (FILE *) img);
	fwrite(&t3on,sizeof(t3on),1, (FILE *) img);
	fwrite(&timer1,sizeof(timer1),1, (FILE *) img);
	fwrite(&timer2,sizeof(timer2),1, (FILE *) img);
	fwrite(&timer3,sizeof(timer3),1, (FILE *) img);
	fwrite(&beamx,sizeof(beamx),1, (FILE *) img);
	fwrite(&beamy,sizeof(beamy),1, (FILE *) img);
	//fwrite(&x,sizeof(x),1, (FILE *) img);
	fwrite(&irqline,sizeof(irqline),1, (FILE *) img);
	fwrite(&crsrpos,sizeof(crsrpos),1, (FILE *) img);
	fwrite(&scrattr,sizeof(scrattr),1, (FILE *) img);
	fwrite(&tmp,sizeof(tmp),1, (FILE *) img);
	fwrite(&nrwscr,sizeof(nrwscr),1, (FILE *) img);
	fwrite(&hshift,sizeof(hshift),1, (FILE *) img);
	fwrite(&vshift,sizeof(vshift),1, (FILE *) img);
	fwrite(&fltscr,sizeof(fltscr),1, (FILE *) img);
	fwrite(&mcol,sizeof(mcol),1, (FILE *) img);
	fwrite(chrbuf,40,1, (FILE *) img);
	fwrite(clrbuf,40,1, (FILE *) img);
	fwrite(&charrom,sizeof(charrom),1, (FILE *) img);
	fwrite(&charbank,sizeof(charbank),1, (FILE *) img);
//	fwrite(&TEDfreq1,sizeof(TEDfreq1),1, (FILE *) img);
//	fwrite(&TEDfreq2,sizeof(TEDfreq2),1, (FILE *) img);
//	fwrite(&TEDVolume,sizeof(TEDVolume),1, (FILE *) img);
//	fwrite(&TEDDA,sizeof(TEDDA),1, (FILE *) img);
	fwrite(&framecol,sizeof(framecol),1, (FILE *) img);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
addq $0x45fc0, %rdi          # imm = 0x45FC0
movq -0x10(%rbp), %rcx
movl $0x10000, %esi          # imm = 0x10000
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fd0, %rdi          # imm = 0x65FD0
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fc0, %rdi          # imm = 0x65FC0
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fc1, %rdi          # imm = 0x65FC1
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fc2, %rdi          # imm = 0x65FC2
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fc4, %rdi          # imm = 0x65FC4
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fc8, %rdi          # imm = 0x65FC8
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x65fcc, %rdi          # imm = 0x65FCC
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x81c, %rdi            # imm = 0x81C
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x820, %rdi            # imm = 0x820
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6184, %rdi          # imm = 0xB6184
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0x45fa8, %rdi          # imm = 0x45FA8
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6130, %rdi          # imm = 0xB6130
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x10(%rbp), %rcx
leaq 0x1d378(%rip), %rdi     # 0x35950
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6024, %rdi          # imm = 0xB6024
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb601c, %rdi          # imm = 0xB601C
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6020, %rdi          # imm = 0xB6020
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6028, %rdi          # imm = 0xB6028
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb618a, %rdi          # imm = 0xB618A
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rax
movq 0xb60f0(%rax), %rdi
movq -0x10(%rbp), %rcx
movl $0x28, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rax
movq 0xb60f8(%rax), %rdi
movq -0x10(%rbp), %rcx
movl $0x28, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6120, %rdi          # imm = 0xB6120
movq -0x10(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6134, %rdi          # imm = 0xB6134
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x18(%rbp), %rdi
addq $0xb6138, %rdi          # imm = 0xB6138
movq -0x10(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)