// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/tedplay.cpp
// Function: getPsidProperties(PsidHeader&, char*)
void getPsidProperties(PsidHeader &psidHdr_, char *os)
{
	char temp[256];
	SIDsound* sid;

	if (ted)
		sid = ted->getSidCard();

	if (sid) {
		sprintf(os, "SID engine   :%s\r\n", sid->getSidEngineName());
	} else { 
		if (!psidHdr_.tracks) {
			strcat(os, "");
			return;
		}
	}
	std::string mType;
	switch (psidHdr_.type) {
		default:
			mType = "Other";
			break;
		case 0:
			mType = "PSID";
			break;
		case 1:
			mType = "RSID";
			break;
		case 2:
			mType = "CBM8M";
			break;
		case 3:
			mType = "TMF";
			break;
	}
	sprintf(temp,   "Type         :%s\r\n", mType.c_str());
	strcat(os, temp);
	sprintf(temp, "Chip (song)  :%s\r\n", psidHdr_.model);
	strcat(os, temp);
	sprintf(temp, "Chip (player):%s\r\n", sidModelSelect ?
		(sidModelSelect == 1 ? "SID6581" : "SID8580") : psidHdr_.model);
	strcat(os, temp);
	sprintf(temp, "Module       :%s\r\n", psidHdr_.title);
	strcat(os, temp);
	sprintf(temp, "Author       :%s\r\n", psidHdr_.author);
	strcat(os, temp);
	sprintf(temp, "Released     :%s\r\n", psidHdr_.copyright);
	strcat(os, temp);
	sprintf(temp, "Total tunes  :%u\r\n", psidHdr_.tracks);
	strcat(os, temp);
	sprintf(temp, "Default tune :%u\r\n", psidHdr_.defaultTune);
	strcat(os, temp);
	sprintf(temp, "Init         :$%04X\r\n", psidHdr_.initAddress);
	strcat(os, temp);
	sprintf(temp, "Play address :$%04X\r\n", psidHdr_.replayAddress);
	strcat(os, temp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, 0x1b115(%rip)     # 0x362a0
je 0x1b1a0
movq 0x1b10c(%rip), %rdi     # 0x362a0
callq 0x1d480
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
je 0x1b1dc
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x118(%rbp), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq -0x150(%rbp), %rdi
movq %rax, %rdx
leaq 0x4a19(%rip), %rsi      # 0x1fbec
movb $0x0, %al
callq 0x3090
jmp 0x1b1fd
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x1b1fb
movq -0x10(%rbp), %rdi
leaq 0x4adf(%rip), %rsi      # 0x1fcd0
callq 0x3430
jmp 0x1b515
jmp 0x1b1fd
leaq -0x138(%rbp), %rdi
callq 0x3350
movq -0x8(%rbp), %rax
movl 0x654(%rax), %eax
movq %rax, -0x158(%rbp)
subq $0x3, %rax
ja 0x1b237
movq -0x158(%rbp), %rax
leaq 0x49ae(%rip), %rcx      # 0x1fbdc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x49c1(%rip), %rsi      # 0x1fbff
leaq -0x138(%rbp), %rdi
callq 0x3340
jmp 0x1b24c
jmp 0x1b2cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x3150
jmp 0x1b51e
leaq 0x498d(%rip), %rsi      # 0x1fc05
leaq -0x138(%rbp), %rdi
callq 0x3340
jmp 0x1b286
jmp 0x1b2cd
leaq 0x497b(%rip), %rsi      # 0x1fc0a
leaq -0x138(%rbp), %rdi
callq 0x3340
jmp 0x1b29d
jmp 0x1b2cd
leaq 0x2e88(%rip), %rsi      # 0x1e12e
leaq -0x138(%rbp), %rdi
callq 0x3340
jmp 0x1b2b4
jmp 0x1b2cd
leaq 0x4952(%rip), %rsi      # 0x1fc0f
leaq -0x138(%rbp), %rdi
callq 0x3340
jmp 0x1b2cb
jmp 0x1b2cd
leaq -0x110(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x30f0
movq -0x168(%rbp), %rdi
movq %rax, %rdx
leaq 0x491b(%rip), %rsi      # 0x1fc13
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x634, %rdx            # imm = 0x634
leaq 0x48fe(%rip), %rsi      # 0x1fc26
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rax
movq %rax, -0x160(%rbp)
cmpl $0x0, 0x1af54(%rip)     # 0x362a8
je 0x1b38f
cmpl $0x1, 0x1af4b(%rip)     # 0x362a8
jne 0x1b36f
leaq 0x48e6(%rip), %rax      # 0x1fc4c
movq %rax, -0x170(%rbp)
jmp 0x1b37f
leaq 0x48de(%rip), %rax      # 0x1fc54
movq %rax, -0x170(%rbp)
jmp 0x1b37f
movq -0x170(%rbp), %rax
movq %rax, -0x178(%rbp)
jmp 0x1b3a0
movq -0x8(%rbp), %rax
addq $0x634, %rax            # imm = 0x634
movq %rax, -0x178(%rbp)
movq -0x160(%rbp), %rdi
movq -0x178(%rbp), %rdx
leaq 0x4884(%rip), %rsi      # 0x1fc39
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x34, %rdx
leaq 0x487a(%rip), %rsi      # 0x1fc5c
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x234, %rdx            # imm = 0x234
leaq 0x485d(%rip), %rsi      # 0x1fc6f
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x434, %rdx            # imm = 0x434
leaq 0x4840(%rip), %rsi      # 0x1fc82
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
leaq 0x4827(%rip), %rsi      # 0x1fc95
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %edx
leaq 0x480e(%rip), %rsi      # 0x1fca8
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %edx
leaq 0x47f5(%rip), %rsi      # 0x1fcbb
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x28(%rax), %edx
leaq 0x47df(%rip), %rsi      # 0x1fcd1
movb $0x0, %al
callq 0x3090
movq -0x10(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3430
leaq -0x138(%rbp), %rdi
callq 0x3150
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x140(%rbp), %rdi
callq 0x3410
nopw (%rax,%rax)