// File: /workspace/github_c_makefile_star2_O0/Keith-S-Thompson[P]kst-time-utils/clock_gettime.c
// Function: main
int main(int argc, char **argv) {
    bool ok = true;
    bool show_res = false;
    bool shown = false;

    for (int i = 1; i < argc; i ++) {
        if (strlen(argv[i]) == 2 && argv[i][0] == '-') {
            switch (argv[i][1]) {
                case 'R':
                    show_res = true;
                    break;
                case 'r':
                    ok = ok && show(CLOCK_REALTIME, show_res);
                    shown = true;
                    break;
#ifdef CLOCK_TAI
                case 'T':
                    ok = ok && show(CLOCK_TAI, show_res);
                    shown = true;
                    break;
#endif
                case 'm':
                    ok = ok && show(CLOCK_MONOTONIC, show_res);
                    shown = true;
                    break;
#ifdef CLOCK_MONOTONIC_RAW
                case 'M':
                    ok = ok && show(CLOCK_MONOTONIC_RAW, show_res);
                    shown = true;
                    break;
#endif
                case 'p':
                    ok = ok && show(CLOCK_PROCESS_CPUTIME_ID, show_res);
                    shown = true;
                    break;
                case 't':
                    ok = ok && show(CLOCK_THREAD_CPUTIME_ID, show_res);
                    shown = true;
                    break;
                default:
                    usage();
                    break;
            }
        }
        else {
            usage();
        }
    }

    if (!shown) {
        ok = ok && show(CLOCK_REALTIME, show_res);
    }

    exit(ok ? EXIT_SUCCESS : EXIT_FAILURE);
}

// Assembly:
subq $0x28, %rsp
movl $0x0, 0x24(%rsp)
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb $0x1, 0x17(%rsp)
movb $0x0, 0x16(%rsp)
movb $0x0, 0x15(%rsp)
movl $0x1, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x13c7
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
cmpq $0x2, %rax
jne 0x13b0
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x13b0
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
addl $-0x4d, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x27, %eax
ja 0x13a9
movq 0x8(%rsp), %rax
leaq 0xdb2(%rip), %rcx       # 0x2004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, 0x16(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x7(%rsp)
je 0x1286
movb 0x16(%rsp), %al
xorl %edi, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x6(%rsp)
je 0x12be
movb 0x16(%rsp), %al
movl $0xb, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x5(%rsp)
je 0x12f6
movb 0x16(%rsp), %al
movl $0x1, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x4(%rsp)
je 0x132e
movb 0x16(%rsp), %al
movl $0x4, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x4(%rsp)
movb 0x4(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x3(%rsp)
je 0x1363
movb 0x16(%rsp), %al
movl $0x2, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x2(%rsp)
je 0x1398
movb 0x16(%rsp), %al
movl $0x3, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x2(%rsp)
movb 0x2(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb $0x1, 0x15(%rsp)
jmp 0x13ae
callq 0x1450
jmp 0x13b5
callq 0x1450
jmp 0x13b7
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x11dc
testb $0x1, 0x15(%rsp)
jne 0x13f9
xorl %eax, %eax
testb $0x1, 0x17(%rsp)
movb %al, 0x1(%rsp)
je 0x13ef
movb 0x16(%rsp), %al
xorl %edi, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1410
movb %al, 0x1(%rsp)
movb 0x1(%rsp), %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %cl
movl $0x1, %edi
xorl %eax, %eax
testb $0x1, %cl
cmovnel %eax, %edi
callq 0x10a0
nop