// File: /workspace/github_c_makefile_star2_O2/ksherlock[P]nroff_man/main.c
// Function: main
int main(int argc, char **argv) {

	int i;
	int ch;

#ifdef __STACK_CHECK__
    _beginStackCheck();
    atexit(printStack);
#endif

	while (( ch = getopt(argc, argv, "m:hW:I:ibt:T:")) != -1) {
		switch(ch) {
			case '?': case ':':
			default: usage(1);
			case 'h': usage(0);
			case 'i': flags.i = 1; break;
			case 'b': flags.b = 1; break;
			case 'W':
				if (isdigit(*optarg))
					flags.W = *optarg - '0';
				else
					warnx("-W %s: Bad argument", optarg);
				break;
			case 'I':
				if (strncmp(optarg, "os=", 3) == 0)
					flags.os = optarg + 3;
				else
					warnx("-I %s: Bad argument", optarg);
				break;
			case 'm': /* silently accept -man */
				break;

			case 't':
				flags.t = optarg;
				break;
			case 'T':
				flags.T = parseT(optarg);
				if (flags.T < 0) usage(1);

				break;
		}
	}

	argc -= optind;
	argv += optind;


	if (flags.T == FMT_TERMCAP)
		tc_init();

	if (argc == 0) {
		man(stdin, "stdin");
	} else {
		for (i = 0; i < argc; ++i) {
			char *cp = argv[i];
			FILE *fp = fopen(cp, "r");
			if (!fp) err(1, "Unable to open %s", cp);
			man(fp, cp);
			fclose(fp);
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x4d21(%rip), %r15      # 0x9004
movq 0x9cee(%rip), %rbp      # 0xdfd8
leaq 0xa087(%rip), %r13      # 0xe378
leaq 0x4d2e(%rip), %r12      # 0x9026
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4170
cmpl $0x49, %eax
je 0x43b6
cmpl $0x54, %eax
je 0x433e
cmpl $0x57, %eax
je 0x437c
cmpl $0x62, %eax
je 0x439c
cmpl $0x69, %eax
je 0x43a9
cmpl $0x6d, %eax
je 0x42f8
cmpl $0x74, %eax
jne 0x4423
movq (%rbp), %rax
movq %rax, 0x18(%r13)
jmp 0x42f8
movq (%rbp), %rdi
testq %rdi, %rdi
je 0x44b8
movzbl (%rdi), %eax
cmpl $0x61, %eax
je 0x4403
cmpl $0x70, %eax
je 0x43f3
cmpl $0x74, %eax
jne 0x44b8
leaq 0x4d9d(%rip), %rsi      # 0x910d
callq 0x40f0
xorl %ecx, %ecx
jmp 0x4412
callq 0x41c0
movq (%rax), %rcx
movq (%rbp), %rsi
movsbq (%rsi), %rax
testb $0x8, 0x1(%rcx,%rax,2)
jne 0x43e7
leaq 0x4c78(%rip), %rdi      # 0x9012
jmp 0x43db
movl $0x1, 0x8(%r13)
jmp 0x42f8
movl $0x1, 0x4(%r13)
jmp 0x42f8
movq (%rbp), %rsi
cmpb $0x6f, (%rsi)
jne 0x43d8
cmpb $0x73, 0x1(%rsi)
jne 0x43d8
cmpb $0x3d, 0x2(%rsi)
jne 0x43d8
addq $0x3, %rsi
movq %rsi, 0x10(%r13)
jmp 0x42f8
movq %r12, %rdi
xorl %eax, %eax
callq 0x40a0
jmp 0x42f8
addl $-0x30, %eax
movl %eax, (%r13)
jmp 0x42f8
leaq 0x4d21(%rip), %rsi      # 0x911b
callq 0x40f0
pushq $0x2
jmp 0x4411
leaq 0x4d0b(%rip), %rsi      # 0x9115
callq 0x40f0
pushq $0x1
popq %rcx
testl %eax, %eax
jne 0x44b8
movl %ecx, 0x20(%r13)
jmp 0x42f8
cmpl $-0x1, %eax
jne 0x44bf
movq 0x9b9d(%rip), %rax      # 0xdfd0
movslq (%rax), %r15
cmpl $0x0, 0x20(%r13)
jne 0x4442
callq 0x5e24
cmpl %r15d, %ebx
jne 0x446e
movq 0x9b7a(%rip), %rax      # 0xdfc8
movq (%rax), %rdi
leaq 0x4be2(%rip), %rsi      # 0x903a
callq 0x62ff
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %r15d, %ebx
leaq (%r14,%r15,8), %r13
xorl %ebp, %ebp
testl %ebx, %ebx
cmovlel %ebp, %ebx
leaq 0x5145(%rip), %r14      # 0x95c8
cmpq %rbp, %rbx
je 0x445d
movq (%r13,%rbp,8), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4160
testq %rax, %rax
je 0x44d3
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x62ff
movq %r12, %rdi
callq 0x4080
incq %rbp
jmp 0x4483
orl $-0x1, 0x20(%r13)
jmp 0x44cb
cmpl $0x68, %eax
jne 0x44cb
xorl %edi, %edi
callq 0x44e7
pushq $0x1
popq %rdi
callq 0x44e7
leaq 0x4b66(%rip), %rsi      # 0x9040
pushq $0x1
popq %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4120