// File: geoherna[P]lib605/./src/lib605.cpp
// Function: lib605::operator<<(std::ostream&, lib605::Magstripe&)
std::ostream& operator<< (std::ostream &out, Magstripe &sMagstripe) {
		out << "Card Format: ";
		switch(sMagstripe.GetCardDataFormat()) {
			case Magstripe::ISO: {
				out << "ISO" << std::endl;
				break;
			} case Magstripe::RAW: {
				out << "Raw" << std::endl;
				break;
			} default: break;
		}

		Track* t = sMagstripe.GetTrack1();
		if(t->GetTrackDataLength() != 0) {
			out << "\t" << (*t);
			if(sMagstripe.Format == Magstripe::RAW)
				out << "\t Track Data: " << std::hex << t->GetTrackData() << std::endl;
			else
				out << "\t Track Data:" << t->GetTrackData() << std::endl;
		} else {
			out << "Track 1: EMPTY" << std::endl;
		}
		t = sMagstripe.GetTrack2();
		if(t->GetTrackDataLength() != 0) {
			out << "\t" << (*t);
			if(sMagstripe.Format == Magstripe::RAW)
				out << "\t Track Data: " << std::hex << t->GetTrackData() << std::endl;
			else
				out << "\t Track Data:" << t->GetTrackData() << std::endl;
		} else {
			out << "Track 2: EMPTY" << std::endl;
		}
		t = sMagstripe.GetTrack3();
		if(t->GetTrackDataLength() != 0) {
			out << "\t" << (*t);
			if(sMagstripe.Format == Magstripe::RAW)
				out << "\t Track Data: " << std::hex << t->GetTrackData() << std::endl;
			else
				out << "\t Track Data:" << t->GetTrackData() << std::endl;
		} else {
			out << "Track 3: EMPTY" << std::endl;
		}
		return out;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x324e(%rip), %rsi      # 0x9059
callq 0x53f0
movq -0x10(%rbp), %rdi
callq 0x5890
movl %eax, %ecx
movl %ecx, -0x1c(%rbp)
testl %eax, %eax
je 0x5e4f
jmp 0x5e24
movl -0x1c(%rbp), %eax
subl $0x1, %eax
jne 0x5e70
jmp 0x5e2e
movq -0x8(%rbp), %rdi
leaq 0x322e(%rip), %rsi      # 0x9067
callq 0x53f0
movq %rax, %rdi
movq 0x6180(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x5e72
movq -0x8(%rbp), %rdi
leaq 0x3211(%rip), %rsi      # 0x906b
callq 0x53f0
movq %rax, %rdi
movq 0x615f(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x5e72
jmp 0x5e72
movq -0x10(%rbp), %rdi
callq 0x5760
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5510
cmpl $0x0, %eax
je 0x5f3a
movq -0x8(%rbp), %rdi
leaq 0x31d3(%rip), %rsi      # 0x906f
callq 0x53f0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x51c0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x5f00
movq -0x8(%rbp), %rdi
leaq 0x31af(%rip), %rsi      # 0x9071
callq 0x53f0
movq %rax, %rdi
movq 0x611f(%rip), %rsi      # 0xbff0
callq 0x5170
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x60cf(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x5f38
movq -0x8(%rbp), %rdi
leaq 0x3175(%rip), %rsi      # 0x9080
callq 0x53f0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x6095(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x5f59
movq -0x8(%rbp), %rdi
leaq 0x3149(%rip), %rsi      # 0x908e
callq 0x53f0
movq %rax, %rdi
movq 0x6074(%rip), %rsi      # 0xbfc8
callq 0x5450
movq -0x10(%rbp), %rdi
callq 0x5200
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5510
cmpl $0x0, %eax
je 0x6021
movq -0x8(%rbp), %rdi
leaq 0x30ec(%rip), %rsi      # 0x906f
callq 0x53f0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x51c0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x5fe7
movq -0x8(%rbp), %rdi
leaq 0x30c8(%rip), %rsi      # 0x9071
callq 0x53f0
movq %rax, %rdi
movq 0x6038(%rip), %rsi      # 0xbff0
callq 0x5170
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x5fe8(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x601f
movq -0x8(%rbp), %rdi
leaq 0x308e(%rip), %rsi      # 0x9080
callq 0x53f0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x5fae(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x6040
movq -0x8(%rbp), %rdi
leaq 0x3071(%rip), %rsi      # 0x909d
callq 0x53f0
movq %rax, %rdi
movq 0x5f8d(%rip), %rsi      # 0xbfc8
callq 0x5450
movq -0x10(%rbp), %rdi
callq 0x5650
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5510
cmpl $0x0, %eax
je 0x6108
movq -0x8(%rbp), %rdi
leaq 0x3005(%rip), %rsi      # 0x906f
callq 0x53f0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0x51c0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x60ce
movq -0x8(%rbp), %rdi
leaq 0x2fe1(%rip), %rsi      # 0x9071
callq 0x53f0
movq %rax, %rdi
movq 0x5f51(%rip), %rsi      # 0xbff0
callq 0x5170
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x5f01(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x6106
movq -0x8(%rbp), %rdi
leaq 0x2fa7(%rip), %rsi      # 0x9080
callq 0x53f0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5740
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x5440
movq %rax, %rdi
movq 0x5ec7(%rip), %rsi      # 0xbfc8
callq 0x5450
jmp 0x6127
movq -0x8(%rbp), %rdi
leaq 0x2f99(%rip), %rsi      # 0x90ac
callq 0x53f0
movq %rax, %rdi
movq 0x5ea6(%rip), %rsi      # 0xbfc8
callq 0x5450
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)