// File: /workspace/github_cpp_makefile_star2_O2/mlugo2[P]SunshineGPU/src/gpu.cpp
// Function: gpu::debug(unsigned long long)
void gpu::debug(u64 instr)
{
// DEBUG
	u64 w = instr;

	u8 b = get_opcode(w);
	cout << (u16)b << endl;

	b = get_dest_type(w);
	cout << (u16)b << endl;

	b = get_dest_index(w);
	cout << (u16)b << endl;

	b = get_dest_w(w);
	cout << (u16)b << endl;

	b = get_dest_z(w);
	cout << (u16)b << endl;

	b = get_dest_y(w);
	cout << (u16)b << endl;

	b = get_dest_x(w);
	cout << (u16)b << endl;

	b = get_srcN_neg(w, 0);
	cout <<"source0 neg: "<< (u16)b << endl;

	b = get_srcN_type(w, 0);
	cout <<"source0 type: "<< (u16)b << endl;

	b = get_srcN_index(w, 0);
	cout <<"source0 index: "<< (u16)b << endl;

	b = get_srcN_w(w, 0);
	cout <<"source0 w: "<< (u16)b << endl;

	b = get_srcN_z(w, 0);
	cout <<"source0 z: "<< (u16)b << endl;

	b = get_srcN_y(w, 0);
	cout <<"source0 y: "<< (u16)b << endl;

	b = get_srcN_x(w, 0);
	cout <<"source0 x: "<< (u16)b << endl;

	cout << "-------------------" << endl;

	b = get_srcN_neg(w, 1);
	cout <<"source1 neg: "<< (u16)b << endl;

	b = get_srcN_type(w, 1);
	cout <<"source1 type: "<< (u16)b << endl;

	b = get_srcN_index(w, 1);
	cout <<"source1 index: "<< (u16)b << endl;

	b = get_srcN_w(w, 1);
	cout <<"source1 w: "<< (u16)b << endl;

	b = get_srcN_z(w, 1);
	cout <<"source1 z: "<< (u16)b << endl;

	b = get_srcN_y(w, 1);
	cout <<"source1 y: "<< (u16)b << endl;

	b = get_srcN_x(w, 1);
	cout <<"source1 x: "<< (u16)b << endl;

	cout << "-------------------" << endl;

	b = get_srcN_neg(w, 2);
	cout <<"source2 neg: "<< (u16)b << endl;

	b = get_srcN_type(w, 2);
	cout <<"source2 type: "<< (u16)b << endl;

	b = get_srcN_index(w, 2);
	cout <<"source2 index: "<< (u16)b << endl;

	b = get_srcN_w(w, 2);
	cout <<"source2 w: "<< (u16)b << endl;

	b = get_srcN_z(w, 2);
	cout <<"source2 z: "<< (u16)b << endl;

	b = get_srcN_y(w, 2);
	cout <<"source2 y: "<< (u16)b << endl;

	b = get_srcN_x(w, 2);
	cout <<"source2 x: "<< (u16)b << endl;


	// DEBUG
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
shrq $0x3a, %rsi
movq 0x4cbe(%rip), %r14      # 0xbfc0
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x38, %rsi
andl $0x1, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x34, %rsi
andl $0xf, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x33, %rsi
andl $0x1, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x32, %rsi
andl $0x1, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x31, %rsi
andl $0x1, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %rsi
shrq $0x30, %rsi
andl $0x1, %esi
movq %r14, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x2f, %r15
leaq 0xf5c(%rip), %rsi       # 0x8318
movq %r14, %rdi
callq 0x2270
andl $0x1, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x2d, %r15
leaq 0xf3d(%rip), %rsi       # 0x8326
movq %r14, %rdi
callq 0x2270
andl $0x3, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x29, %r15
leaq 0xf1f(%rip), %rsi       # 0x8335
movq %r14, %rdi
callq 0x2270
andl $0xf, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x27, %r15
leaq 0xf02(%rip), %rsi       # 0x8345
movq %r14, %rdi
callq 0x2270
andl $0x3, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x25, %r15
leaq 0xee1(%rip), %rsi       # 0x8351
movq %r14, %rdi
callq 0x2270
andl $0x3, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x23, %r15
leaq 0xec0(%rip), %rsi       # 0x835d
movq %r14, %rdi
callq 0x2270
andl $0x3, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %rbx, %r15
shrq $0x21, %r15
leaq 0xe9f(%rip), %rsi       # 0x8369
movq %r14, %rdi
callq 0x2270
andl $0x3, %r15d
movq %rax, %rdi
movl %r15d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
leaq 0xe85(%rip), %r15       # 0x8375
movq %r14, %rdi
movq %r15, %rsi
callq 0x2270
movq %rax, %rdi
callq 0x2140
movq %rbx, %r12
shrq $0x20, %r12
leaq 0xe78(%rip), %rsi       # 0x8389
movq %r14, %rdi
callq 0x2270
andl $0x1, %r12d
movq %rax, %rdi
movl %r12d, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x1e, %ebp
leaq 0xe5b(%rip), %rsi       # 0x8397
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x1a, %ebp
leaq 0xe44(%rip), %rsi       # 0x83a6
movq %r14, %rdi
callq 0x2270
andl $0xf, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x18, %ebp
leaq 0xe2b(%rip), %rsi       # 0x83b6
movq %r14, %rdi
callq 0x2270
andl $0x3, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x16, %ebp
leaq 0xe0e(%rip), %rsi       # 0x83c2
movq %r14, %rdi
callq 0x2270
andl $0x3, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x14, %ebp
leaq 0xdf1(%rip), %rsi       # 0x83ce
movq %r14, %rdi
callq 0x2270
andl $0x3, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x12, %ebp
leaq 0xdd4(%rip), %rsi       # 0x83da
movq %r14, %rdi
callq 0x2270
andl $0x3, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movq %r14, %rdi
movq %r15, %rsi
callq 0x2270
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x11, %ebp
leaq 0xda4(%rip), %rsi       # 0x83e6
movq %r14, %rdi
callq 0x2270
andl $0x1, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0xf, %ebp
leaq 0xd89(%rip), %rsi       # 0x83f4
movq %r14, %rdi
callq 0x2270
andl $0x3, %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0xb, %ebp
andl $0xf, %ebp
leaq 0xd6c(%rip), %rsi       # 0x8403
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x9, %ebp
andl $0x3, %ebp
leaq 0xd53(%rip), %rsi       # 0x8413
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x7, %ebp
andl $0x3, %ebp
leaq 0xd36(%rip), %rsi       # 0x841f
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
movl %ebx, %ebp
shrl $0x5, %ebp
andl $0x3, %ebp
leaq 0xd19(%rip), %rsi       # 0x842b
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebp, %esi
callq 0x2350
movq %rax, %rdi
callq 0x2140
shrl $0x3, %ebx
andl $0x3, %ebx
leaq 0xcfe(%rip), %rsi       # 0x8437
movq %r14, %rdi
callq 0x2270
movq %rax, %rdi
movl %ebx, %esi
callq 0x2350
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2140
nop