#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ *member_2;
  int /*<<< orphan*/ member_1;
};
typedef int /*<<< orphan*/ s;
typedef enum MODE { ____Placeholder_MODE } MODE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ exp_close();
int exp_open();
int getopt_long(int, char *const *, char *, struct option *, int *);
int /*<<< orphan*/ no_argument;
int /*<<< orphan*/ optional_argument;
int /*<<< orphan*/ print_help();
int /*<<< orphan*/ printf(char *, char *, float);
int /*<<< orphan*/ puts(char *);
scalar_t__ rand_r(unsigned int *);
struct tm *rtc_get_time();
scalar_t__ rtc_hctosys();
scalar_t__ rtc_systohc();
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *const *argv) {
  int opt = 0;
  int opts_index = 0;
  char *short_opts = "hrswVufD";
  struct option long_opts[] = {{"help", no_argument, NULL, 'h'},
                               {"show", no_argument, NULL, 'r'},
                               {"hctosys", no_argument, NULL, 's'},
                               {"systohc", no_argument, NULL, 'w'},
                               {"set", optional_argument, NULL, 'z'},
                               {"systz", optional_argument, NULL, 'z'},
                               {"adjust", optional_argument, NULL, 'z'},
                               {"getepoch", optional_argument, NULL, 'z'},
                               {"setepoch", optional_argument, NULL, 'z'},
                               {"predict", optional_argument, NULL, 'z'},
                               {"version", optional_argument, NULL, 'z'},
                               {"utc", optional_argument, NULL, 'z'},
                               {"localtime", optional_argument, NULL, 'z'},
                               {"rtc", optional_argument, NULL, 'z'},
                               {"directisa", optional_argument, NULL, 'z'},
                               {"badyear", optional_argument, NULL, 'z'},
                               {"date", optional_argument, NULL, 'z'},
                               {"epoch", optional_argument, NULL, 'z'},
                               {"noadjfile", optional_argument, NULL, 'z'},
                               {"adjfile", optional_argument, NULL, 'z'},
                               {"test", optional_argument, NULL, 'z'},
                               {"debug", optional_argument, NULL, 'z'},
                               {0, 0, 0, 0}};
  enum MODE { SHOW, HCTOSYS, SYSTOHC };
  enum MODE mode;
  mode = SHOW;
  int flag_count = 0;
  while ((opt = getopt_long(argc, argv, short_opts, long_opts, &opts_index)) !=
         -1) {
    switch (opt) {
    case 'h':
      print_help();
      break;
    case 'r':
      mode = SHOW;
      flag_count++;
      break;
    case 's':
      mode = HCTOSYS;
      flag_count++;
      break;
    case 'w':
      mode = SYSTOHC;
      flag_count++;
      break;
    case 'V':
      puts("hwclock from Pi-Weather 1.00");
      exit(0);
      break;
    case '?':
      puts("");
      print_help();
      break;
    }
  };
  if (flag_count > 1) {
    puts("hwclock: You have specified multiple functions.");
    puts("You can only perform one function at a time.");
    exit(0);
  }
  int r = exp_open();
  if (mode == HCTOSYS) {
    r += rtc_hctosys();
  } else if (mode == SYSTOHC) {
    r += rtc_systohc();
  } else {
    time_t tt;
    time(&tt);
    struct tm *t = rtc_get_time();
    char s[40];
    strftime(s, sizeof(s), "%a %d %b %Y %T %Z", t);
    float a = 1 / ((float)rand_r((unsigned int *)&tt) / 1000000000);
    float b = a - (int)a;
    if (a > 1) {
      b *= -1;
    }
    printf("%s  %f seconds\n", s, b);
  }
  r += exp_close();
  return r;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xee2(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x300(%rbp),%rdi
lea    0xed9(%rip),%rax
mov    %rax,-0x300(%rbp)
mov    0x2daa(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x2f8(%rbp)
movq   $0x0,-0x2f0(%rbp)
movl   $0x68,-0x2e8(%rbp)
add    $0x20,%rdi
lea    0xea8(%rip),%rax
mov    %rax,-0x2e0(%rbp)
mov    0x2d74(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x2d8(%rbp)
movq   $0x0,-0x2d0(%rbp)
movl   $0x72,-0x2c8(%rbp)
add    $0x20,%rdi
lea    0xe77(%rip),%rax
mov    %rax,-0x2c0(%rbp)
mov    0x2d3e(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x2b8(%rbp)
movq   $0x0,-0x2b0(%rbp)
movl   $0x73,-0x2a8(%rbp)
add    $0x20,%rdi
lea    0xe49(%rip),%rax
mov    %rax,-0x2a0(%rbp)
mov    0x2d08(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x298(%rbp)
movq   $0x0,-0x290(%rbp)
movl   $0x77,-0x288(%rbp)
add    $0x20,%rdi
lea    0xe1b(%rip),%rax
mov    %rax,-0x280(%rbp)
mov    0x2ce2(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x278(%rbp)
movq   $0x0,-0x270(%rbp)
movl   $0x7a,-0x268(%rbp)
add    $0x20,%rdi
lea    0xde9(%rip),%rax
mov    %rax,-0x260(%rbp)
mov    0x2cac(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x258(%rbp)
movq   $0x0,-0x250(%rbp)
movl   $0x7a,-0x248(%rbp)
add    $0x20,%rdi
lea    0xdb9(%rip),%rax
mov    %rax,-0x240(%rbp)
mov    0x2c76(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x238(%rbp)
movq   $0x0,-0x230(%rbp)
movl   $0x7a,-0x228(%rbp)
add    $0x20,%rdi
lea    0xd8a(%rip),%rax
mov    %rax,-0x220(%rbp)
mov    0x2c40(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x218(%rbp)
movq   $0x0,-0x210(%rbp)
movl   $0x7a,-0x208(%rbp)
add    $0x20,%rdi
lea    0xd5d(%rip),%rax
mov    %rax,-0x200(%rbp)
mov    0x2c0a(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x1f8(%rbp)
movq   $0x0,-0x1f0(%rbp)
movl   $0x7a,-0x1e8(%rbp)
add    $0x20,%rdi
lea    0xd30(%rip),%rax
mov    %rax,-0x1e0(%rbp)
mov    0x2bd4(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x1d8(%rbp)
movq   $0x0,-0x1d0(%rbp)
movl   $0x7a,-0x1c8(%rbp)
add    $0x20,%rdi
lea    0xd02(%rip),%rax
mov    %rax,-0x1c0(%rbp)
mov    0x2b9e(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x1b8(%rbp)
movq   $0x0,-0x1b0(%rbp)
movl   $0x7a,-0x1a8(%rbp)
add    $0x20,%rdi
lea    0xcd4(%rip),%rax
mov    %rax,-0x1a0(%rbp)
mov    0x2b68(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x198(%rbp)
movq   $0x0,-0x190(%rbp)
movl   $0x7a,-0x188(%rbp)
add    $0x20,%rdi
lea    0xca2(%rip),%rax
mov    %rax,-0x180(%rbp)
mov    0x2b32(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x178(%rbp)
movq   $0x0,-0x170(%rbp)
movl   $0x7a,-0x168(%rbp)
add    $0x20,%rdi
lea    0xc76(%rip),%rax
mov    %rax,-0x160(%rbp)
mov    0x2afc(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x158(%rbp)
movq   $0x0,-0x150(%rbp)
movl   $0x7a,-0x148(%rbp)
add    $0x20,%rdi
lea    0xc44(%rip),%rax
mov    %rax,-0x140(%rbp)
mov    0x2ac6(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x138(%rbp)
movq   $0x0,-0x130(%rbp)
movl   $0x7a,-0x128(%rbp)
add    $0x20,%rdi
lea    0xc18(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0x2a90(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x118(%rbp)
movq   $0x0,-0x110(%rbp)
movl   $0x7a,-0x108(%rbp)
add    $0x20,%rdi
lea    0xbea(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0x2a5a(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xf8(%rbp)
movq   $0x0,-0xf0(%rbp)
movl   $0x7a,-0xe8(%rbp)
add    $0x20,%rdi
lea    0xb71(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0x2a24(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xd8(%rbp)
movq   $0x0,-0xd0(%rbp)
movl   $0x7a,-0xc8(%rbp)
add    $0x20,%rdi
lea    0xb83(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0x29ee(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xb8(%rbp)
movq   $0x0,-0xb0(%rbp)
movl   $0x7a,-0xa8(%rbp)
add    $0x20,%rdi
lea    0xb4f(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x29b8(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x98(%rbp)
movq   $0x0,-0x90(%rbp)
movl   $0x7a,-0x88(%rbp)
add    $0x20,%rdi
lea    0xb21(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0x2985(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x78(%rbp)
movq   $0x0,-0x70(%rbp)
movl   $0x7a,-0x68(%rbp)
add    $0x20,%rdi
lea    0xafc(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x295b(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x58(%rbp)
movq   $0x0,-0x50(%rbp)
movl   $0x7a,-0x48(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1090 <memset@plt>
movl   $0x0,-0x304(%rbp)
movl   $0x0,-0x308(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x300(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1070 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     17ac <main+0x5cc>
mov    -0x14(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x350(%rbp)
sub    $0x38,%eax
ja     17a7 <main+0x5c7>
mov    -0x350(%rbp),%rax
lea    0x8fa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   10f0 <print_help@plt>
jmp    17a7 <main+0x5c7>
movl   $0x0,-0x304(%rbp)
mov    -0x308(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x308(%rbp)
jmp    17a7 <main+0x5c7>
movl   $0x1,-0x304(%rbp)
mov    -0x308(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x308(%rbp)
jmp    17a7 <main+0x5c7>
movl   $0x2,-0x304(%rbp)
mov    -0x308(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x308(%rbp)
jmp    17a7 <main+0x5c7>
lea    0x9fc(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>
lea    0xa84(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   10f0 <print_help@plt>
jmp    16c5 <main+0x4e5>
cmpl   $0x1,-0x308(%rbp)
jle    17d8 <main+0x5f8>
lea    0x9e1(%rip),%rdi
call   1030 <puts@plt>
lea    0xa05(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>
mov    $0x0,%al
call   1040 <exp_open@plt>
mov    %eax,-0x30c(%rbp)
cmpl   $0x1,-0x304(%rbp)
jne    1811 <main+0x631>
mov    $0x0,%al
call   10c0 <rtc_hctosys@plt>
mov    %rax,%rcx
movslq -0x30c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30c(%rbp)
jmp    1918 <main+0x738>
cmpl   $0x2,-0x304(%rbp)
jne    183d <main+0x65d>
mov    $0x0,%al
call   10d0 <rtc_systohc@plt>
mov    %rax,%rcx
movslq -0x30c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30c(%rbp)
jmp    1913 <main+0x733>
lea    -0x310(%rbp),%rdi
call   10a0 <time@plt>
mov    $0x0,%al
call   10e0 <rtc_get_time@plt>
mov    %rax,-0x318(%rbp)
lea    -0x340(%rbp),%rdi
mov    -0x318(%rbp),%rcx
mov    $0x28,%esi
lea    0x98d(%rip),%rdx
call   10b0 <strftime@plt>
lea    -0x310(%rbp),%rdi
call   1060 <rand_r@plt>
cvtsi2ss %rax,%xmm1
movss  0x775(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0x765(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x344(%rbp)
ff
movss  -0x344(%rbp),%xmm0
ff
cvttss2si -0x344(%rbp),%eax
ff
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x348(%rbp)
ff
movss  -0x344(%rbp),%xmm0
ff
movss  0x729(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    18f8 <main+0x718>
movss  0x720(%rip),%xmm0
mulss  -0x348(%rbp),%xmm0
ff
movss  %xmm0,-0x348(%rbp)
ff
lea    -0x340(%rbp),%rsi
movss  -0x348(%rbp),%xmm0
ff
lea    0x902(%rip),%rdi
call   1080 <printf@plt>
jmp    1918 <main+0x738>
mov    $0x0,%al
call   1050 <exp_close@plt>
mov    %rax,%rcx
movslq -0x30c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x30c(%rbp)
mov    -0x30c(%rbp),%eax
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x318,%rsp
mov    %rsi,%r14
mov    %edi,%r15d
movl   $0x0,0x8(%rsp)
lea    0xf07(%rip),%rax
mov    %rax,0x10(%rsp)
mov    0x2dc6(%rip),%rax
mov    (%rax),%al
mov    %al,0x18(%rsp)
movq   $0x0,0x20(%rsp)
movl   $0x68,0x28(%rsp)
lea    0xee2(%rip),%rcx
mov    %rcx,0x30(%rsp)
mov    %al,0x38(%rsp)
movq   $0x0,0x40(%rsp)
movl   $0x72,0x48(%rsp)
lea    0xec6(%rip),%rcx
mov    %rcx,0x50(%rsp)
mov    %al,0x58(%rsp)
movq   $0x0,0x60(%rsp)
movl   $0x73,0x68(%rsp)
lea    0xead(%rip),%rcx
mov    %rcx,0x70(%rsp)
mov    %al,0x78(%rsp)
movq   $0x0,0x80(%rsp)
movl   $0x77,0x88(%rsp)
lea    0xe8e(%rip),%rax
mov    %rax,0x90(%rsp)
mov    0x2d40(%rip),%rax
mov    (%rax),%al
mov    %al,0x98(%rsp)
movq   $0x0,0xa0(%rsp)
movl   $0x7a,0xa8(%rsp)
lea    0xe5c(%rip),%rcx
mov    %rcx,0xb0(%rsp)
mov    %al,0xb8(%rsp)
movq   $0x0,0xc0(%rsp)
movl   $0x7a,0xc8(%rsp)
lea    0xe35(%rip),%rcx
mov    %rcx,0xd0(%rsp)
mov    %al,0xd8(%rsp)
movq   $0x0,0xe0(%rsp)
movl   $0x7a,0xe8(%rsp)
lea    0xe0f(%rip),%rcx
mov    %rcx,0xf0(%rsp)
mov    %al,0xf8(%rsp)
movq   $0x0,0x100(%rsp)
movl   $0x7a,0x108(%rsp)
lea    0xdeb(%rip),%rcx
mov    %rcx,0x110(%rsp)
mov    %al,0x118(%rsp)
movq   $0x0,0x120(%rsp)
movl   $0x7a,0x128(%rsp)
lea    0xdc7(%rip),%rcx
mov    %rcx,0x130(%rsp)
mov    %al,0x138(%rsp)
movq   $0x0,0x140(%rsp)
movl   $0x7a,0x148(%rsp)
lea    0xda2(%rip),%rcx
mov    %rcx,0x150(%rsp)
mov    %al,0x158(%rsp)
movq   $0x0,0x160(%rsp)
movl   $0x7a,0x168(%rsp)
lea    0xd7d(%rip),%rcx
mov    %rcx,0x170(%rsp)
mov    %al,0x178(%rsp)
movq   $0x0,0x180(%rsp)
movl   $0x7a,0x188(%rsp)
lea    0xd54(%rip),%rcx
mov    %rcx,0x190(%rsp)
mov    %al,0x198(%rsp)
movq   $0x0,0x1a0(%rsp)
movl   $0x7a,0x1a8(%rsp)
lea    0xd31(%rip),%rcx
mov    %rcx,0x1b0(%rsp)
mov    %al,0x1b8(%rsp)
movq   $0x0,0x1c0(%rsp)
movl   $0x7a,0x1c8(%rsp)
lea    0xd08(%rip),%rcx
mov    %rcx,0x1d0(%rsp)
mov    %al,0x1d8(%rsp)
movq   $0x0,0x1e0(%rsp)
movl   $0x7a,0x1e8(%rsp)
lea    0xce5(%rip),%rcx
mov    %rcx,0x1f0(%rsp)
mov    %al,0x1f8(%rsp)
movq   $0x0,0x200(%rsp)
movl   $0x7a,0x208(%rsp)
lea    0xcc0(%rip),%rcx
mov    %rcx,0x210(%rsp)
mov    %al,0x218(%rsp)
movq   $0x0,0x220(%rsp)
movl   $0x7a,0x228(%rsp)
lea    0xc50(%rip),%rcx
mov    %rcx,0x230(%rsp)
mov    %al,0x238(%rsp)
movq   $0x0,0x240(%rsp)
movl   $0x7a,0x248(%rsp)
lea    0xc6b(%rip),%rcx
mov    %rcx,0x250(%rsp)
mov    %al,0x258(%rsp)
movq   $0x0,0x260(%rsp)
movl   $0x7a,0x268(%rsp)
lea    0xc40(%rip),%rcx
mov    %rcx,0x270(%rsp)
mov    %al,0x278(%rsp)
movq   $0x0,0x280(%rsp)
movl   $0x7a,0x288(%rsp)
lea    0xc1b(%rip),%rcx
mov    %rcx,0x290(%rsp)
mov    %al,0x298(%rsp)
movq   $0x0,0x2a0(%rsp)
movl   $0x7a,0x2a8(%rsp)
lea    0xbf3(%rip),%rcx
mov    %rcx,0x2b0(%rsp)
mov    %al,0x2b8(%rsp)
movq   $0x0,0x2c0(%rsp)
movl   $0x7a,0x2c8(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x2e0(%rsp)
movaps %xmm0,0x2d0(%rsp)
lea    0xb25(%rip),%r12
lea    0x10(%rsp),%rbp
lea    0x8(%rsp),%rbx
lea    0xa30(%rip),%r13
movl   $0x0,0x4(%rsp)
jmp    1605 <main+0x425>
nopw   0x0(%rax,%rax,1)
addl   $0x1,0x4(%rsp)
movl   $0x0,(%rsp)
jmp    1621 <main+0x441>
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   10f0 <print_help@plt>
mov    %r15d,%edi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
call   1080 <getopt_long@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x38,%ecx
ja     1655 <main+0x475>
movslq 0x0(%r13,%rcx,4),%rax
add    %r13,%rax
jmp    *%rax
movl   $0x1,(%rsp)
addl   $0x1,0x4(%rsp)
jmp    1621 <main+0x441>
cmp    $0xffffffff,%eax
jne    1621 <main+0x441>
jmp    166a <main+0x48a>
movl   $0x2,(%rsp)
addl   $0x1,0x4(%rsp)
jmp    1621 <main+0x441>
cmpl   $0x2,0x4(%rsp)
jae    175e <main+0x57e>
xor    %eax,%eax
call   1050 <exp_open@plt>
mov    %eax,%ebx
mov    (%rsp),%eax
cmp    $0x2,%eax
je     1699 <main+0x4b9>
cmp    $0x1,%eax
jne    16a7 <main+0x4c7>
xor    %eax,%eax
call   10c0 <rtc_hctosys@plt>
add    %eax,%ebx
jmp    1730 <main+0x550>
xor    %eax,%eax
call   10d0 <rtc_systohc@plt>
add    %eax,%ebx
jmp    1730 <main+0x550>
lea    0xc(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <time@plt>
xor    %eax,%eax
call   10e0 <rtc_get_time@plt>
lea    0xb50(%rip),%rdx
lea    0x2f0(%rsp),%r14
mov    %r14,%rdi
mov    $0x28,%esi
mov    %rax,%rcx
call   10b0 <strftime@plt>
mov    %rbp,%rdi
call   1070 <rand_r@plt>
cvtsi2ss %rax,%xmm1
divss  0x911(%rip),%xmm1
movss  0x90d(%rip),%xmm2
movaps %xmm2,%xmm0
divss  %xmm1,%xmm0
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
cmpltss %xmm0,%xmm2
subss  %xmm1,%xmm0
movaps %xmm2,%xmm1
andnps %xmm0,%xmm1
xorps  0x8f5(%rip),%xmm0
andps  %xmm2,%xmm0
orps   %xmm1,%xmm0
lea    0xafc(%rip),%rdi
mov    %r14,%rsi
call   1090 <printf@plt>
xor    %eax,%eax
call   1060 <exp_close@plt>
add    %ebx,%eax
add    $0x318,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa46(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1100 <exit@plt>
lea    0xa50(%rip),%rdi
call   1040 <puts@plt>
lea    0xa74(%rip),%rdi
jmp    1752 <main+0x572>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32*, i32 }
%struct.tm = type { i32 }
@.str = [9 x i8] c"hrswVufD\00"
@.str.1 = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.2 = [5 x i8] c"show\00"
@.str.3 = [8 x i8] c"hctosys\00"
@.str.4 = [8 x i8] c"systohc\00"
@.str.5 = [4 x i8] c"set\00"
@optional_argument = global i32 0
@.str.6 = [6 x i8] c"systz\00"
@.str.7 = [7 x i8] c"adjust\00"
@.str.8 = [9 x i8] c"getepoch\00"
@.str.9 = [9 x i8] c"setepoch\00"
@.str.10 = [8 x i8] c"predict\00"
@.str.11 = [8 x i8] c"version\00"
@.str.12 = [4 x i8] c"utc\00"
@.str.13 = [10 x i8] c"localtime\00"
@.str.14 = [4 x i8] c"rtc\00"
@.str.15 = [10 x i8] c"directisa\00"
@.str.16 = [8 x i8] c"badyear\00"
@.str.17 = [5 x i8] c"date\00"
@.str.18 = [6 x i8] c"epoch\00"
@.str.19 = [10 x i8] c"noadjfile\00"
@.str.20 = [8 x i8] c"adjfile\00"
@.str.21 = [5 x i8] c"test\00"
@.str.22 = [6 x i8] c"debug\00"
@.str.23 = [29 x i8] c"hwclock from Pi-Weather 1.00\00"
@.str.24 = [1 x i8] zeroinitializer
@.str.25 = [48 x i8] c"hwclock: You have specified multiple functions.\00"
@.str.26 = [45 x i8] c"You can only perform one function at a time.\00"
@.str.27 = [18 x i8] c"%a %d %b %Y %T %Z\00"
@.str.28 = [16 x i8] c"%s %f seconds\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [23 x %struct.option]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca %struct.tm*
%15 = alloca [40 x i8]
%16 = alloca float
%17 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %8
%18 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %9, i64 0, i64 0
%19 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %19
%20 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 1
%21 = load i32, i32* @no_argument
%22 = trunc i32 %21 to i8
store i8 %22, i8* %20
%23 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 2
store i32* null, i32** %23
%24 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 3
store i32 104, i32* %24
%25 = getelementptr inbounds %struct.option, %struct.option* %18, i64 1
%26 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 1
%28 = load i32, i32* @no_argument
%29 = trunc i32 %28 to i8
store i8 %29, i8* %27
%30 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 2
store i32* null, i32** %30
%31 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 3
store i32 114, i32* %31
%32 = getelementptr inbounds %struct.option, %struct.option* %25, i64 1
%33 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %33
%34 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 1
%35 = load i32, i32* @no_argument
%36 = trunc i32 %35 to i8
store i8 %36, i8* %34
%37 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 2
store i32* null, i32** %37
%38 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 3
store i32 115, i32* %38
%39 = getelementptr inbounds %struct.option, %struct.option* %32, i64 1
%40 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 1
%42 = load i32, i32* @no_argument
%43 = trunc i32 %42 to i8
store i8 %43, i8* %41
%44 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 2
store i32* null, i32** %44
%45 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 3
store i32 119, i32* %45
%46 = getelementptr inbounds %struct.option, %struct.option* %39, i64 1
%47 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %47
%48 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 1
%49 = load i32, i32* @optional_argument
%50 = trunc i32 %49 to i8
store i8 %50, i8* %48
%51 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 2
store i32* null, i32** %51
%52 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 3
store i32 122, i32* %52
%53 = getelementptr inbounds %struct.option, %struct.option* %46, i64 1
%54 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %54
%55 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 1
%56 = load i32, i32* @optional_argument
%57 = trunc i32 %56 to i8
store i8 %57, i8* %55
%58 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 2
store i32* null, i32** %58
%59 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 3
store i32 122, i32* %59
%60 = getelementptr inbounds %struct.option, %struct.option* %53, i64 1
%61 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8** %61
%62 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 1
%63 = load i32, i32* @optional_argument
%64 = trunc i32 %63 to i8
store i8 %64, i8* %62
%65 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 2
store i32* null, i32** %65
%66 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 3
store i32 122, i32* %66
%67 = getelementptr inbounds %struct.option, %struct.option* %60, i64 1
%68 = getelementptr inbounds %struct.option, %struct.option* %67, i32 0, i32 0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8** %68
%69 = getelementptr inbounds %struct.option, %struct.option* %67, i32 0, i32 1
%70 = load i32, i32* @optional_argument
%71 = trunc i32 %70 to i8
store i8 %71, i8* %69
%72 = getelementptr inbounds %struct.option, %struct.option* %67, i32 0, i32 2
store i32* null, i32** %72
%73 = getelementptr inbounds %struct.option, %struct.option* %67, i32 0, i32 3
store i32 122, i32* %73
%74 = getelementptr inbounds %struct.option, %struct.option* %67, i64 1
%75 = getelementptr inbounds %struct.option, %struct.option* %74, i32 0, i32 0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8** %75
%76 = getelementptr inbounds %struct.option, %struct.option* %74, i32 0, i32 1
%77 = load i32, i32* @optional_argument
%78 = trunc i32 %77 to i8
store i8 %78, i8* %76
%79 = getelementptr inbounds %struct.option, %struct.option* %74, i32 0, i32 2
store i32* null, i32** %79
%80 = getelementptr inbounds %struct.option, %struct.option* %74, i32 0, i32 3
store i32 122, i32* %80
%81 = getelementptr inbounds %struct.option, %struct.option* %74, i64 1
%82 = getelementptr inbounds %struct.option, %struct.option* %81, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %82
%83 = getelementptr inbounds %struct.option, %struct.option* %81, i32 0, i32 1
%84 = load i32, i32* @optional_argument
%85 = trunc i32 %84 to i8
store i8 %85, i8* %83
%86 = getelementptr inbounds %struct.option, %struct.option* %81, i32 0, i32 2
store i32* null, i32** %86
%87 = getelementptr inbounds %struct.option, %struct.option* %81, i32 0, i32 3
store i32 122, i32* %87
%88 = getelementptr inbounds %struct.option, %struct.option* %81, i64 1
%89 = getelementptr inbounds %struct.option, %struct.option* %88, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %89
%90 = getelementptr inbounds %struct.option, %struct.option* %88, i32 0, i32 1
%91 = load i32, i32* @optional_argument
%92 = trunc i32 %91 to i8
store i8 %92, i8* %90
%93 = getelementptr inbounds %struct.option, %struct.option* %88, i32 0, i32 2
store i32* null, i32** %93
%94 = getelementptr inbounds %struct.option, %struct.option* %88, i32 0, i32 3
store i32 122, i32* %94
%95 = getelementptr inbounds %struct.option, %struct.option* %88, i64 1
%96 = getelementptr inbounds %struct.option, %struct.option* %95, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %96
%97 = getelementptr inbounds %struct.option, %struct.option* %95, i32 0, i32 1
%98 = load i32, i32* @optional_argument
%99 = trunc i32 %98 to i8
store i8 %99, i8* %97
%100 = getelementptr inbounds %struct.option, %struct.option* %95, i32 0, i32 2
store i32* null, i32** %100
%101 = getelementptr inbounds %struct.option, %struct.option* %95, i32 0, i32 3
store i32 122, i32* %101
%102 = getelementptr inbounds %struct.option, %struct.option* %95, i64 1
%103 = getelementptr inbounds %struct.option, %struct.option* %102, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %103
%104 = getelementptr inbounds %struct.option, %struct.option* %102, i32 0, i32 1
%105 = load i32, i32* @optional_argument
%106 = trunc i32 %105 to i8
store i8 %106, i8* %104
%107 = getelementptr inbounds %struct.option, %struct.option* %102, i32 0, i32 2
store i32* null, i32** %107
%108 = getelementptr inbounds %struct.option, %struct.option* %102, i32 0, i32 3
store i32 122, i32* %108
%109 = getelementptr inbounds %struct.option, %struct.option* %102, i64 1
%110 = getelementptr inbounds %struct.option, %struct.option* %109, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8** %110
%111 = getelementptr inbounds %struct.option, %struct.option* %109, i32 0, i32 1
%112 = load i32, i32* @optional_argument
%113 = trunc i32 %112 to i8
store i8 %113, i8* %111
%114 = getelementptr inbounds %struct.option, %struct.option* %109, i32 0, i32 2
store i32* null, i32** %114
%115 = getelementptr inbounds %struct.option, %struct.option* %109, i32 0, i32 3
store i32 122, i32* %115
%116 = getelementptr inbounds %struct.option, %struct.option* %109, i64 1
%117 = getelementptr inbounds %struct.option, %struct.option* %116, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i8** %117
%118 = getelementptr inbounds %struct.option, %struct.option* %116, i32 0, i32 1
%119 = load i32, i32* @optional_argument
%120 = trunc i32 %119 to i8
store i8 %120, i8* %118
%121 = getelementptr inbounds %struct.option, %struct.option* %116, i32 0, i32 2
store i32* null, i32** %121
%122 = getelementptr inbounds %struct.option, %struct.option* %116, i32 0, i32 3
store i32 122, i32* %122
%123 = getelementptr inbounds %struct.option, %struct.option* %116, i64 1
%124 = getelementptr inbounds %struct.option, %struct.option* %123, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %124
%125 = getelementptr inbounds %struct.option, %struct.option* %123, i32 0, i32 1
%126 = load i32, i32* @optional_argument
%127 = trunc i32 %126 to i8
store i8 %127, i8* %125
%128 = getelementptr inbounds %struct.option, %struct.option* %123, i32 0, i32 2
store i32* null, i32** %128
%129 = getelementptr inbounds %struct.option, %struct.option* %123, i32 0, i32 3
store i32 122, i32* %129
%130 = getelementptr inbounds %struct.option, %struct.option* %123, i64 1
%131 = getelementptr inbounds %struct.option, %struct.option* %130, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8** %131
%132 = getelementptr inbounds %struct.option, %struct.option* %130, i32 0, i32 1
%133 = load i32, i32* @optional_argument
%134 = trunc i32 %133 to i8
store i8 %134, i8* %132
%135 = getelementptr inbounds %struct.option, %struct.option* %130, i32 0, i32 2
store i32* null, i32** %135
%136 = getelementptr inbounds %struct.option, %struct.option* %130, i32 0, i32 3
store i32 122, i32* %136
%137 = getelementptr inbounds %struct.option, %struct.option* %130, i64 1
%138 = getelementptr inbounds %struct.option, %struct.option* %137, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8** %138
%139 = getelementptr inbounds %struct.option, %struct.option* %137, i32 0, i32 1
%140 = load i32, i32* @optional_argument
%141 = trunc i32 %140 to i8
store i8 %141, i8* %139
%142 = getelementptr inbounds %struct.option, %struct.option* %137, i32 0, i32 2
store i32* null, i32** %142
%143 = getelementptr inbounds %struct.option, %struct.option* %137, i32 0, i32 3
store i32 122, i32* %143
%144 = getelementptr inbounds %struct.option, %struct.option* %137, i64 1
%145 = getelementptr inbounds %struct.option, %struct.option* %144, i32 0, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i8** %145
%146 = getelementptr inbounds %struct.option, %struct.option* %144, i32 0, i32 1
%147 = load i32, i32* @optional_argument
%148 = trunc i32 %147 to i8
store i8 %148, i8* %146
%149 = getelementptr inbounds %struct.option, %struct.option* %144, i32 0, i32 2
store i32* null, i32** %149
%150 = getelementptr inbounds %struct.option, %struct.option* %144, i32 0, i32 3
store i32 122, i32* %150
%151 = getelementptr inbounds %struct.option, %struct.option* %144, i64 1
%152 = getelementptr inbounds %struct.option, %struct.option* %151, i32 0, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8** %152
%153 = getelementptr inbounds %struct.option, %struct.option* %151, i32 0, i32 1
%154 = load i32, i32* @optional_argument
%155 = trunc i32 %154 to i8
store i8 %155, i8* %153
%156 = getelementptr inbounds %struct.option, %struct.option* %151, i32 0, i32 2
store i32* null, i32** %156
%157 = getelementptr inbounds %struct.option, %struct.option* %151, i32 0, i32 3
store i32 122, i32* %157
%158 = getelementptr inbounds %struct.option, %struct.option* %151, i64 1
%159 = getelementptr inbounds %struct.option, %struct.option* %158, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8** %159
%160 = getelementptr inbounds %struct.option, %struct.option* %158, i32 0, i32 1
%161 = load i32, i32* @optional_argument
%162 = trunc i32 %161 to i8
store i8 %162, i8* %160
%163 = getelementptr inbounds %struct.option, %struct.option* %158, i32 0, i32 2
store i32* null, i32** %163
%164 = getelementptr inbounds %struct.option, %struct.option* %158, i32 0, i32 3
store i32 122, i32* %164
%165 = getelementptr inbounds %struct.option, %struct.option* %158, i64 1
%166 = getelementptr inbounds %struct.option, %struct.option* %165, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i8** %166
%167 = getelementptr inbounds %struct.option, %struct.option* %165, i32 0, i32 1
%168 = load i32, i32* @optional_argument
%169 = trunc i32 %168 to i8
store i8 %169, i8* %167
%170 = getelementptr inbounds %struct.option, %struct.option* %165, i32 0, i32 2
store i32* null, i32** %170
%171 = getelementptr inbounds %struct.option, %struct.option* %165, i32 0, i32 3
store i32 122, i32* %171
%172 = getelementptr inbounds %struct.option, %struct.option* %165, i64 1
%173 = bitcast %struct.option* %172 to i8*
store i32 0, i32* %10
store i32 0, i32* %11
br label %174
174: ; preds = %200, %2
%175 = load i32, i32* %4
%176 = load i8**, i8*** %5
%177 = load i8*, i8** %8
%178 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %9, i64 0, i64 0
%179 = call i32 @getopt_long(i32 %175, i8** %176, i8* %177, %struct.option* %178, i32* %7)
store i32 %179, i32* %6
%180 = icmp ne i32 %179, -1
br i1 %180, label %181, label %201
181: ; preds = %174
%182 = load i32, i32* %6
switch i32 %182, label %200 [
i32 104, label %183
i32 114, label %185
i32 115, label %188
i32 119, label %191
i32 86, label %194
i32 63, label %197
]
183: ; preds = %181
%184 = call i32 (...) @print_help()
br label %200
185: ; preds = %181
store i32 0, i32* %10
%186 = load i32, i32* %11
%187 = add nsw i32 %186, 1
store i32 %187, i32* %11
br label %200
188: ; preds = %181
store i32 1, i32* %10
%189 = load i32, i32* %11
%190 = add nsw i32 %189, 1
store i32 %190, i32* %11
br label %200
191: ; preds = %181
store i32 2, i32* %10
%192 = load i32, i32* %11
%193 = add nsw i32 %192, 1
store i32 %193, i32* %11
br label %200
194: ; preds = %181
%195 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
%196 = call i32 @exit(i32 0)
unreachable
197: ; preds = %181
%198 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.24, i64 0, i64 0))
%199 = call i32 (...) @print_help()
br label %200
200: ; preds = %181, %197, %191, %188, %185, %183
br label %174
201: ; preds = %174
%202 = load i32, i32* %11
%203 = icmp sgt i32 %202, 1
br i1 %203, label %204, label %208
204: ; preds = %201
%205 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.25, i64 0, i64 0))
%206 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.26, i64 0, i64 0))
%207 = call i32 @exit(i32 0)
unreachable
208: ; preds = %201
%209 = call i32 (...) @exp_open()
store i32 %209, i32* %12
%210 = load i32, i32* %10
%211 = icmp eq i32 %210, 1
br i1 %211, label %212, label %218
212: ; preds = %208
%213 = call i64 (...) @rtc_hctosys()
%214 = load i32, i32* %12
%215 = sext i32 %214 to i64
%216 = add nsw i64 %215, %213
%217 = trunc i64 %216 to i32
store i32 %217, i32* %12
br label %252
218: ; preds = %208
%219 = load i32, i32* %10
%220 = icmp eq i32 %219, 2
br i1 %220, label %221, label %227
221: ; preds = %218
%222 = call i64 (...) @rtc_systohc()
%223 = load i32, i32* %12
%224 = sext i32 %223 to i64
%225 = add nsw i64 %224, %222
%226 = trunc i64 %225 to i32
store i32 %226, i32* %12
br label %251
227: ; preds = %218
%228 = call i32 @time(i32* %13)
%229 = call %struct.tm* (...) @rtc_get_time()
store %struct.tm* %229, %struct.tm** %14
%230 = getelementptr inbounds [40 x i8], [40 x i8]* %15, i64 0, i64 0
%231 = load %struct.tm*, %struct.tm** %14
%232 = call i32 @strftime(i8* %230, i32 40, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), %struct.tm* %231)
%233 = call i64 @rand_r(i32* %13)
%234 = sitofp i64 %233 to float
%235 = fdiv float %234, 1.000000e+09
%236 = fdiv float 1.000000e+00, %235
store float %236, float* %16
%237 = load float, float* %16
%238 = load float, float* %16
%239 = fptosi float %238 to i32
%240 = sitofp i32 %239 to float
%241 = fsub float %237, %240
store float %241, float* %17
%242 = load float, float* %16
%243 = fcmp ogt float %242, 1.000000e+00
br i1 %243, label %244, label %247
244: ; preds = %227
%245 = load float, float* %17
%246 = fmul float %245, -1.000000e+00
store float %246, float* %17
br label %247
247: ; preds = %244, %227
%248 = getelementptr inbounds [40 x i8], [40 x i8]* %15, i64 0, i64 0
%249 = load float, float* %17
%250 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.28, i64 0, i64 0), i8* %248, float %249)
br label %251
251: ; preds = %247, %221
br label %252
252: ; preds = %251, %212
%253 = call i64 (...) @exp_close()
%254 = load i32, i32* %12
%255 = sext i32 %254 to i64
%256 = add nsw i64 %255, %253
%257 = trunc i64 %256 to i32
store i32 %257, i32* %12
%258 = load i32, i32* %12
ret i32 %258
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32*, i32 }
%struct.tm = type { i32 }
@.str = [9 x i8] c"hrswVufD\00"
@.str.1 = [5 x i8] c"help\00"
@no_argument = global i32 0
@.str.2 = [5 x i8] c"show\00"
@.str.3 = [8 x i8] c"hctosys\00"
@.str.4 = [8 x i8] c"systohc\00"
@.str.5 = [4 x i8] c"set\00"
@optional_argument = global i32 0
@.str.6 = [6 x i8] c"systz\00"
@.str.7 = [7 x i8] c"adjust\00"
@.str.8 = [9 x i8] c"getepoch\00"
@.str.9 = [9 x i8] c"setepoch\00"
@.str.10 = [8 x i8] c"predict\00"
@.str.11 = [8 x i8] c"version\00"
@.str.12 = [4 x i8] c"utc\00"
@.str.13 = [10 x i8] c"localtime\00"
@.str.14 = [4 x i8] c"rtc\00"
@.str.15 = [10 x i8] c"directisa\00"
@.str.16 = [8 x i8] c"badyear\00"
@.str.17 = [5 x i8] c"date\00"
@.str.18 = [6 x i8] c"epoch\00"
@.str.19 = [10 x i8] c"noadjfile\00"
@.str.20 = [8 x i8] c"adjfile\00"
@.str.21 = [5 x i8] c"test\00"
@.str.22 = [6 x i8] c"debug\00"
@.str.23 = [29 x i8] c"hwclock from Pi-Weather 1.00\00"
@.str.25 = [48 x i8] c"hwclock: You have specified multiple functions.\00"
@.str.26 = [45 x i8] c"You can only perform one function at a time.\00"
@.str.27 = [18 x i8] c"%a %d %b %Y %T %Z\00"
@.str.28 = [16 x i8] c"%s %f seconds\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca [23 x %struct.option]
%5 = alloca i32
%6 = alloca [40 x i8]
%7 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%8 = bitcast [23 x %struct.option]* %4 to i8*
%9 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 0
%10 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 0, i32 1
%12 = load i32, i32* @no_argument
%13 = trunc i32 %12 to i8
store i8 %13, i8* %11
%14 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 0, i32 2
store i32* null, i32** %14
%15 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 0, i32 3
store i32 104, i32* %15
%16 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 1, i32 1
store i8 %13, i8* %17
%18 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 1, i32 2
store i32* null, i32** %18
%19 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 1, i32 3
store i32 114, i32* %19
%20 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 2, i32 1
store i8 %13, i8* %21
%22 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 2, i32 2
store i32* null, i32** %22
%23 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 2, i32 3
store i32 115, i32* %23
%24 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 3, i32 1
store i8 %13, i8* %25
%26 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 3, i32 2
store i32* null, i32** %26
%27 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 3, i32 3
store i32 119, i32* %27
%28 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %28
%29 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 4, i32 1
%30 = load i32, i32* @optional_argument
%31 = trunc i32 %30 to i8
store i8 %31, i8* %29
%32 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 4, i32 2
store i32* null, i32** %32
%33 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 4, i32 3
store i32 122, i32* %33
%34 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %34
%35 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 5, i32 1
store i8 %31, i8* %35
%36 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 5, i32 2
store i32* null, i32** %36
%37 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 5, i32 3
store i32 122, i32* %37
%38 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8** %38
%39 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 6, i32 1
store i8 %31, i8* %39
%40 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 6, i32 2
store i32* null, i32** %40
%41 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 6, i32 3
store i32 122, i32* %41
%42 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 7, i32 0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8** %42
%43 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 7, i32 1
store i8 %31, i8* %43
%44 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 7, i32 2
store i32* null, i32** %44
%45 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 7, i32 3
store i32 122, i32* %45
%46 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 8, i32 0
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8** %46
%47 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 8, i32 1
store i8 %31, i8* %47
%48 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 8, i32 2
store i32* null, i32** %48
%49 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 8, i32 3
store i32 122, i32* %49
%50 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 9, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %50
%51 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 9, i32 1
store i8 %31, i8* %51
%52 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 9, i32 2
store i32* null, i32** %52
%53 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 9, i32 3
store i32 122, i32* %53
%54 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 10, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %54
%55 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 10, i32 1
store i8 %31, i8* %55
%56 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 10, i32 2
store i32* null, i32** %56
%57 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 10, i32 3
store i32 122, i32* %57
%58 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 11, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8** %58
%59 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 11, i32 1
store i8 %31, i8* %59
%60 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 11, i32 2
store i32* null, i32** %60
%61 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 11, i32 3
store i32 122, i32* %61
%62 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 12, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %62
%63 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 12, i32 1
store i8 %31, i8* %63
%64 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 12, i32 2
store i32* null, i32** %64
%65 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 12, i32 3
store i32 122, i32* %65
%66 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 13, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8** %66
%67 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 13, i32 1
store i8 %31, i8* %67
%68 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 13, i32 2
store i32* null, i32** %68
%69 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 13, i32 3
store i32 122, i32* %69
%70 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 14, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i8** %70
%71 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 14, i32 1
store i8 %31, i8* %71
%72 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 14, i32 2
store i32* null, i32** %72
%73 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 14, i32 3
store i32 122, i32* %73
%74 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 15, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %74
%75 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 15, i32 1
store i8 %31, i8* %75
%76 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 15, i32 2
store i32* null, i32** %76
%77 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 15, i32 3
store i32 122, i32* %77
%78 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 16, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8** %78
%79 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 16, i32 1
store i8 %31, i8* %79
%80 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 16, i32 2
store i32* null, i32** %80
%81 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 16, i32 3
store i32 122, i32* %81
%82 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 17, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8** %82
%83 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 17, i32 1
store i8 %31, i8* %83
%84 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 17, i32 2
store i32* null, i32** %84
%85 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 17, i32 3
store i32 122, i32* %85
%86 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 18, i32 0
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i8** %86
%87 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 18, i32 1
store i8 %31, i8* %87
%88 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 18, i32 2
store i32* null, i32** %88
%89 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 18, i32 3
store i32 122, i32* %89
%90 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 19, i32 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8** %90
%91 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 19, i32 1
store i8 %31, i8* %91
%92 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 19, i32 2
store i32* null, i32** %92
%93 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 19, i32 3
store i32 122, i32* %93
%94 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 20, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8** %94
%95 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 20, i32 1
store i8 %31, i8* %95
%96 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 20, i32 2
store i32* null, i32** %96
%97 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 20, i32 3
store i32 122, i32* %97
%98 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 21, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i8** %98
%99 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 21, i32 1
store i8 %31, i8* %99
%100 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 21, i32 2
store i32* null, i32** %100
%101 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 21, i32 3
store i32 122, i32* %101
%102 = getelementptr inbounds [23 x %struct.option], [23 x %struct.option]* %4, i64 0, i64 22
%103 = bitcast %struct.option* %102 to i8*
br label %104
104: ; preds = %114, %2
%105 = phi i32 [ 0, %2 ], [ %116, %114 ]
%106 = phi i32 [ 0, %2 ], [ %115, %114 ]
br label %107
107: ; preds = %109, %104
%108 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.option* %9, i32* %3)
switch i32 %108, label %109 [
i32 -1, label %123
i32 104, label %110
i32 114, label %114
i32 115, label %112
i32 119, label %113
i32 86, label %117
i32 63, label %120
]
109: ; preds = %107, %120, %110
br label %107
110: ; preds = %107
%111 = call i32 (...) @print_help()
br label %109
112: ; preds = %107
br label %114
113: ; preds = %107
br label %114
114: ; preds = %107, %113, %112
%115 = phi i32 [ 1, %112 ], [ 2, %113 ], [ 0, %107 ]
%116 = add nuw nsw i32 %105, 1
br label %104
117: ; preds = %107
%118 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
%119 = call i32 @exit(i32 0)
unreachable
120: ; preds = %107
%121 = call i32 @putchar(i32 10)
%122 = call i32 (...) @print_help()
br label %109
123: ; preds = %107
%124 = icmp ugt i32 %105, 1
br i1 %124, label %125, label %129
125: ; preds = %123
%126 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.25, i64 0, i64 0))
%127 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.26, i64 0, i64 0))
%128 = call i32 @exit(i32 0)
unreachable
129: ; preds = %123
%130 = call i32 (...) @exp_open()
switch i32 %106, label %139 [
i32 1, label %131
i32 2, label %135
]
131: ; preds = %129
%132 = call i64 (...) @rtc_hctosys()
%133 = trunc i64 %132 to i32
%134 = add i32 %130, %133
br label %156
135: ; preds = %129
%136 = call i64 (...) @rtc_systohc()
%137 = trunc i64 %136 to i32
%138 = add i32 %130, %137
br label %156
139: ; preds = %129
%140 = bitcast i32* %5 to i8*
%141 = call i32 @time(i32* %5)
%142 = call %struct.tm* (...) @rtc_get_time()
%143 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%144 = call i32 @strftime(i8* %143, i32 40, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.27, i64 0, i64 0), %struct.tm* %142)
%145 = call i64 @rand_r(i32* %5)
%146 = sitofp i64 %145 to float
%147 = fdiv float %146, 1.000000e+09
%148 = fdiv float 1.000000e+00, %147
%149 = fptosi float %148 to i32
%150 = sitofp i32 %149 to float
%151 = fsub float %148, %150
%152 = fcmp ogt float %148, 1.000000e+00
%153 = fneg float %151
%154 = select i1 %152, float %153, float %151
%155 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.28, i64 0, i64 0), i8* %143, float %154)
br label %156
156: ; preds = %135, %139, %131
%157 = phi i32 [ %134, %131 ], [ %138, %135 ], [ %130, %139 ]
%158 = call i64 (...) @exp_close()
%159 = trunc i64 %158 to i32
%160 = add i32 %157, %159
ret i32 %160
}