// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %rsi, %rbx
leaq 0x97644(%rip), %rdi     # 0x499004
movl $0x0, 0xc(%rsp)
movl $0x2, %esi
xorl %eax, %eax
callq 0x448d50
movl %eax, 0x139676(%rip)    # 0x53b050
testl %eax, %eax
js 0x401c16
movl $0xff, %edi
xorl %esi, %esi
callq 0x40190f
xorl %edi, %edi
movl $0x18, %esi
callq 0x40190f
xorl %r15d, %r15d
xorl %r14d, %r14d
leaq 0x8(%rbx), %rax
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x401b10
movb 0x1(%rdi), %cl
testb %cl, %cl
je 0x401b10
cmpb $0x2d, (%rdi)
jne 0x401b10
cmpb $0x2d, %cl
jne 0x401a34
cmpb $0x0, 0x2(%rdi)
je 0x401afe
leaq 0x1(%rdi), %rax
movq %rax, 0x8(%rbx)
movb (%rax), %cl
movb $0x1, %r13b
testb %cl, %cl
je 0x401af8
movl $0x8, %r12d
xorl %eax, %eax
movzbl %cl, %ecx
cmpl $0x68, %ecx
jg 0x401a6b
cmpl $0x62, %ecx
je 0x401a7f
cmpl $0x68, %ecx
jne 0x401ad2
movl $0x1, %r15d
jmp 0x401ad2
cmpl $0x69, %ecx
je 0x401ab4
cmpl $0x72, %ecx
jne 0x401ad2
movl $0x1, 0xc(%rsp)
jmp 0x401ad2
movb 0x2(%rdi), %cl
addq $0x2, %rdi
movl $0x1, %ebp
testb %cl, %cl
jne 0x401abe
movq 0x8(%rbx,%r12), %rdx
testq %rdx, %rdx
movl $0x1, %esi
cmovnel %esi, %eax
cmoveq %rdx, %rdi
je 0x401abc
testb %cl, %cl
jne 0x401abc
movq 0x8(%rbx,%r12), %rdi
addq $0x8, %r12
jmp 0x401abe
movl $0x1, %r14d
jmp 0x401ad2
movl %eax, %ebp
callq 0x40a400
movzbl %al, %esi
movl $0x19, %edi
callq 0x40190f
movl %ebp, %eax
movq (%rbx,%r12), %rdi
leaq 0x1(%rdi), %rcx
movq %rcx, (%rbx,%r12)
cmpq $0x8, %r12
jne 0x401af3
movb 0x1(%rdi), %cl
testb %cl, %cl
je 0x401af3
testl %eax, %eax
je 0x401a51
addq %r12, %rbx
jmp 0x401b05
addq $0x8, %rbx
jmp 0x401b05
addq $0x10, %rbx
xorl %r13d, %r13d
testb %r13b, %r13b
jne 0x401a00
jmp 0x401b13
movq %rax, %rbx
testl %r14d, %r14d
je 0x401bc3
movq $0x539458, %r12         # imm = 0x539458
movq (%r12), %rdx
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x40c950
testq %rax, %rax
je 0x401bcb
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbx
movl %r14d, %edi
movl $0x20, %esi
callq 0x401782
incl %r14d
cmpl $0x6, %r14d
jne 0x401b47
xorl %r14d, %r14d
movsbl 0x10(%rsp,%r14), %esi
testl %esi, %esi
je 0x401b7b
movl %r14d, %edi
callq 0x401782
incq %r14
cmpl $0x6, %r14d
jne 0x401b60
xorl %r14d, %r14d
movl $0xc, %edi
xorl %esi, %esi
callq 0x40190f
movq (%r12), %rdx
movq %rbx, %rdi
movl $0x8, %esi
callq 0x40c950
testq %rax, %rax
jne 0x401b47
jmp 0x401bcb
addq $0x8, %rbx
xorl %r14d, %r14d
movsbl (%r12,%r14), %esi
testl %esi, %esi
je 0x401bc3
movl %r14d, %edi
callq 0x401782
incq %r14
cmpl $0x6, %r14d
jne 0x401ba9
movq (%rbx), %r12
testq %r12, %r12
jne 0x401ba2
movl $0xc, %edi
xorl %esi, %esi
callq 0x40190f
testl %r15d, %r15d
movl 0xc(%rsp), %eax
je 0x401bea
callq 0x40ee10
movl $0x1, %eax
testl %eax, %eax
je 0x401bfa
movl $0xff, %edi
xorl %esi, %esi
callq 0x40190f
movl 0x139450(%rip), %edi    # 0x53b050
callq 0x448ff0
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x973f2(%rip), %rsi     # 0x49900f
leaq 0x973e0(%rip), %rdx     # 0x499004
movl $0x1, %edi
xorl %eax, %eax
callq 0x44b2e0