// File: STrix8[P]RasPiDS3/test.cpp
// Function: main
int main(void) {
	cout << "Start" << endl;
	DualShock3 Controller;
	Controller.update();
	UPDATELOOP (Controller, !Controller.button(START)) {
		for (int j = 0; j < NumButtons; ++j) {
			if (Controller.button(ButtonsNum(j)))
				cout << j << endl;
		}
		for (int j = 0; j < NumSticks; ++j) {
			cout << Controller.stick(SticksNum(j)) << " ";
		}
		cout << " ";
		for (int j = 0; j < NumAxis; ++j) {
			cout << Controller.acceleration(AxisNum(j)) << " ";
		}
		cout << endl;
		usleep(14000);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movl $0x0, -0x4(%rbp)
movq 0x5c07(%rip), %rdi      # 0x7fd0
leaq 0x2c34(%rip), %rsi      # 0x5004
callq 0x2110
movq %rax, %rdi
movq 0x5bd1(%rip), %rsi      # 0x7fb0
callq 0x2130
leaq -0x2a8(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x2650
movq -0x2c8(%rbp), %rdi
callq 0x3040
jmp 0x2405
leaq -0x2a8(%rbp), %rdi
callq 0x3040
jmp 0x2413
jmp 0x2415
leaq -0x2a8(%rbp), %rdi
movl $0x3, %esi
xorl %edx, %edx
callq 0x3100
movb %al, -0x2c9(%rbp)
jmp 0x2430
movb -0x2c9(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2441
jmp 0x2616
movl $0x0, -0x2b8(%rbp)
cmpl $0x10, -0x2b8(%rbp)
jge 0x24eb
movl -0x2b8(%rbp), %esi
leaq -0x2a8(%rbp), %rdi
xorl %edx, %edx
callq 0x3100
movb %al, -0x2ca(%rbp)
jmp 0x2474
movb -0x2ca(%rbp), %al
testb $0x1, %al
jne 0x2480
jmp 0x24d5
movl -0x2b8(%rbp), %esi
movq 0x5b43(%rip), %rdi      # 0x7fd0
callq 0x2210
movq %rax, -0x2d8(%rbp)
jmp 0x249b
movq -0x2d8(%rbp), %rdi
movq 0x5b07(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x24b0
jmp 0x24d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b0(%rbp)
movl %eax, -0x2b4(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x3200
jmp 0x2635
jmp 0x24d7
movl -0x2b8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b8(%rbp)
jmp 0x244b
movl $0x0, -0x2bc(%rbp)
cmpl $0x6, -0x2bc(%rbp)
jge 0x255b
movl -0x2bc(%rbp), %esi
leaq -0x2a8(%rbp), %rdi
callq 0x3180
movl %eax, -0x2dc(%rbp)
jmp 0x2518
movl -0x2dc(%rbp), %esi
movq 0x5aab(%rip), %rdi      # 0x7fd0
callq 0x2210
movq %rax, -0x2e8(%rbp)
jmp 0x2533
movq -0x2e8(%rbp), %rdi
leaq 0x2ac9(%rip), %rsi      # 0x500a
callq 0x2110
jmp 0x2548
jmp 0x254a
movl -0x2bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2bc(%rbp)
jmp 0x24f5
movq 0x5a6e(%rip), %rdi      # 0x7fd0
leaq 0x2aa1(%rip), %rsi      # 0x500a
callq 0x2110
jmp 0x2570
movl $0x0, -0x2c0(%rbp)
cmpl $0x3, -0x2c0(%rbp)
jge 0x25e0
movl -0x2c0(%rbp), %esi
leaq -0x2a8(%rbp), %rdi
callq 0x31e0
movl %eax, -0x2ec(%rbp)
jmp 0x259d
movl -0x2ec(%rbp), %esi
movq 0x5a26(%rip), %rdi      # 0x7fd0
callq 0x2210
movq %rax, -0x2f8(%rbp)
jmp 0x25b8
movq -0x2f8(%rbp), %rdi
leaq 0x2a44(%rip), %rsi      # 0x500a
callq 0x2110
jmp 0x25cd
jmp 0x25cf
movl -0x2c0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c0(%rbp)
jmp 0x257a
movq 0x59e9(%rip), %rdi      # 0x7fd0
movq 0x59c2(%rip), %rsi      # 0x7fb0
callq 0x2130
jmp 0x25f5
movl $0x36b0, %edi           # imm = 0x36B0
callq 0x21a0
jmp 0x2601
jmp 0x2603
leaq -0x2a8(%rbp), %rdi
callq 0x3040
jmp 0x2611
jmp 0x2415
movl $0x0, -0x4(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x3200
movl -0x4(%rbp), %eax
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq -0x2b0(%rbp), %rdi
callq 0x2220
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)