// File: /workspace/github_c_makefile_star2_O3/dcat[P]mdphat/mdphat.c
// Function: main
int
main(int argc, char **argv) {
	int i;
	int rflag = 0;
	int hflag = 0;
	int iflag = 0;
	char *argv0;
	char line[8];

	d = open(I2C_DEV, O_RDWR);
	if (d < 0)
		err(1, "open '%s'", I2C_DEV);

	reset();
	i2c_set_all(CMD_MODE, DEFAULT_MODE);

	ARGBEGIN {
	case 'r':
		rflag = 1;
		break;
	case 'h':
		hflag = 1;
		break;
	case 'i':
		iflag = 1;
		break;
	case 'b':
		brightness(atoi(ARGF()));
		break;
	} ARGEND

	if (!iflag) {
		while (*argv)
			printstring(*argv++);
	} else {
		while (fgets(line, 8, stdin)) {
			clear();
			printstring(line);
			update();
		}
	}

	update();

	if (hflag) {
		getchar();
		rflag = 1;
	}

	if (rflag)
		reset();

	close(d);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x97647(%rip), %rdi     # 0x499004
movl $0x2, %esi
xorl %eax, %eax
callq 0x448d50
movl %eax, 0x139681(%rip)    # 0x53b050
testl %eax, %eax
js 0x401bf7
xorl %r14d, %r14d
movl $0xff, %edi
xorl %esi, %esi
callq 0x40190f
xorl %edi, %edi
movl $0x18, %esi
callq 0x40190f
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x401af2
leaq 0x8(%rbx), %r12
xorl %r15d, %r15d
xorl %ebp, %ebp
movb 0x1(%rax), %cl
testb %cl, %cl
je 0x401b00
cmpb $0x2d, (%rax)
jne 0x401b00
cmpb $0x2d, %cl
jne 0x401a2b
cmpb $0x0, 0x2(%rax)
je 0x401af9
incq %rax
movq %rax, (%r12)
movq 0x8(%rbx), %rdi
movb (%rdi), %al
testb %al, %al
je 0x401adb
movzbl %al, %eax
movb $0x1, %r13b
movl $0x8, %r12d
cmpl $0x68, %eax
jg 0x401a63
cmpl $0x62, %eax
je 0x401a74
cmpl $0x68, %eax
jne 0x401aab
movl $0x1, %r15d
jmp 0x401aab
cmpl $0x69, %eax
je 0x401a7f
cmpl $0x72, %eax
jne 0x401aab
movl $0x1, %ebp
jmp 0x401aab
cmpb $0x0, 0x1(%rdi)
je 0x401a87
incq %rdi
jmp 0x401a96
movl $0x1, %r14d
jmp 0x401aab
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x401acf
movl $0x10, %r12d
xorl %r13d, %r13d
callq 0x40a3f0
movzbl %al, %esi
movl $0x19, %edi
callq 0x40190f
movq (%rbx,%r12), %rax
leaq 0x1(%rax), %rdi
movq %rdi, (%rbx,%r12)
cmpq $0x8, %r12
jne 0x401ad6
testb %r13b, %r13b
je 0x401ad6
movb 0x1(%rax), %al
testb %al, %al
jne 0x401a40
jmp 0x401ad6
movb $0x1, %r13b
xorl %edi, %edi
jmp 0x401a99
addq %r12, %rbx
jmp 0x401adf
addq $0x8, %rbx
leaq 0x8(%rbx), %r12
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x401a08
jmp 0x401b00
movb $0xc, %al
jmp 0x401bd1
addq $0x10, %rbx
movq %rbx, %r12
testl %r14d, %r14d
je 0x401ba8
movq $0x539458, %r12         # imm = 0x539458
movq (%r12), %rdx
movq %rsp, %rdi
movl $0x8, %esi
callq 0x40c940
testq %rax, %rax
je 0x401bb1
xorl %r14d, %r14d
movq %rsp, %rbx
movl %r14d, %edi
movl $0x20, %esi
callq 0x401782
incl %r14d
cmpl $0x6, %r14d
jne 0x401b30
xorl %r14d, %r14d
movsbl (%rsp,%r14), %esi
testl %esi, %esi
je 0x401b63
movl %r14d, %edi
callq 0x401782
incq %r14
cmpl $0x6, %r14d
jne 0x401b49
xorl %r14d, %r14d
movl $0xc, %edi
xorl %esi, %esi
callq 0x40190f
movq (%r12), %rdx
movq %rbx, %rdi
movl $0x8, %esi
callq 0x40c940
testq %rax, %rax
jne 0x401b30
jmp 0x401bb1
addq $0x8, %r12
xorl %ebx, %ebx
movsbl (%r14,%rbx), %esi
testl %esi, %esi
je 0x401ba8
movl %ebx, %edi
callq 0x401782
incq %rbx
cmpl $0x6, %ebx
jne 0x401b90
movq (%r12), %r14
testq %r14, %r14
jne 0x401b8a
movl $0xc, %edi
xorl %esi, %esi
callq 0x40190f
testl %r15d, %r15d
je 0x401bcb
callq 0x40ee00
movb $-0x1, %al
jmp 0x401bd1
movb $-0x1, %al
testl %ebp, %ebp
je 0x401bdb
movzbl %al, %edi
xorl %esi, %esi
callq 0x40190f
movl 0x13946f(%rip), %edi    # 0x53b050
callq 0x448ff0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x97411(%rip), %rsi     # 0x49900f
leaq 0x973ff(%rip), %rdx     # 0x499004
movl $0x1, %edi
xorl %eax, %eax
callq 0x44b2e0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)