// File: chlunde[P]qtar/qtar.cc
// Function: main
int main(int argc, char *argv[]) {
	std::string queueType = argv[1];
	std::string root = argv[2];
	struct archive *a;

	a = archive_write_new();

	//archive_write_set_compression_gzip(a);

	archive_write_set_compression_none(a);
	archive_write_set_format_ustar(a);
	archive_write_set_bytes_per_block(a, 128 * 1024);

	archive_write_open_file(a, "/tmp/z.tar");

	if (queueType == "CScan") {
		Traverser<CScan> t(a);

		t.walk(root);
	} else if (queueType == "Queue") {
		Traverser<Queue> t(a);

		t.walk(root);
	}
	archive_write_close(a);
	archive_write_finish(a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x2a8(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x3490
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x38f0
jmp 0x36d1
leaq -0x31(%rbp), %rdi
callq 0x3310
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x3490
movq -0x2b8(%rbp), %rsi
movq -0x2b0(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x38f0
jmp 0x3712
leaq -0x69(%rbp), %rdi
callq 0x3310
callq 0x30e0
movq %rax, -0x2c0(%rbp)
jmp 0x3729
movq -0x2c0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x3470
jmp 0x373f
movq -0x78(%rbp), %rdi
callq 0x3500
jmp 0x374a
movq -0x78(%rbp), %rdi
movl $0x20000, %esi          # imm = 0x20000
callq 0x34b0
jmp 0x375a
movq -0x78(%rbp), %rdi
leaq 0x989f(%rip), %rsi      # 0xd004
callq 0x33b0
jmp 0x376c
leaq 0x989c(%rip), %rsi      # 0xd00f
leaq -0x30(%rbp), %rdi
callq 0x39a0
movb %al, -0x2c1(%rbp)
jmp 0x3784
movb -0x2c1(%rbp), %al
testb $0x1, %al
jne 0x3793
jmp 0x382a
movq -0x78(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x39d0
jmp 0x37a5
leaq -0x170(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3a80
jmp 0x37b7
leaq -0x170(%rbp), %rdi
callq 0x3ce0
jmp 0x389c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x3310
jmp 0x38e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x3310
jmp 0x38d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x38d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x3ce0
jmp 0x38d0
leaq 0x97e4(%rip), %rsi      # 0xd015
leaq -0x30(%rbp), %rdi
callq 0x39a0
movb %al, -0x2c2(%rbp)
jmp 0x3842
movb -0x2c2(%rbp), %al
testb $0x1, %al
jne 0x384e
jmp 0x389a
movq -0x78(%rbp), %rsi
leaq -0x298(%rbp), %rdi
callq 0x3d40
jmp 0x3860
leaq -0x298(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3df0
jmp 0x3872
leaq -0x298(%rbp), %rdi
callq 0x4050
jmp 0x389a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x4050
jmp 0x38d0
jmp 0x389c
movq -0x78(%rbp), %rdi
callq 0x3090
jmp 0x38a7
movq -0x78(%rbp), %rdi
callq 0x34c0
jmp 0x38b2
leaq -0x68(%rbp), %rdi
callq 0x31c0
leaq -0x30(%rbp), %rdi
callq 0x31c0
movl -0x4(%rbp), %eax
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x31c0
leaq -0x30(%rbp), %rdi
callq 0x31c0
movq -0x40(%rbp), %rdi
callq 0x3480
nopl (%rax,%rax)