#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 scalar_t__ uint32_t;
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
void *atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getopt_long(int, char **, char *, struct option *, int *);
int map_sound(char *);
int /*<<< orphan*/ netlight_send(char *, int, scalar_t__, int, int, scalar_t__,
                                 scalar_t__, int, int);
char *optarg;
int optind;
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ required_argument;
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  int option = 0;
  uint32_t color = 0, future_color = 0, timeout = 0;
  int unit = -1, color_set = 0, future_color_set = 0, sound = 0,
      future_sound = 0;
  int sound_repeat = 0, future_sound_repeat = 0;
  char *netlight_address = NULL;
  struct option long_options[] = {
      {"future-color", required_argument, 0, 'C'},
      {"future-timeout", required_argument, 0, 'T'},
      {"future-sound", required_argument, 0, 'S'},
      {"future-sound-repeat", required_argument, 0, 'R'},
      {"color", required_argument, 0, 'c'},
      {"unit", required_argument, 0, 'u'},
      {"sound", required_argument, 0, 's'},
      {"sound-repeat", required_argument, 0, 'r'},
      {0, 0, 0, 0}};
  int option_index = 0;
  while ((option = getopt_long(argc, argv, "C:T:S:R:c:u:s:r:", long_options,
                               &option_index)) != -1) {
    switch (option) {
    case 0:
      break;
    case 'C':
      future_color = strtol(optarg, NULL, 16);
      future_color_set = 1;
      break;
    case 'T':
      timeout = atoi(optarg);
      break;
    case 'c':
      color = strtol(optarg, NULL, 16);
      color_set = 1;
      break;
    case 'u':
      unit = atoi(optarg);
      break;
    case 's':
      sound = map_sound(optarg);
      if (sound == -1) {
        printf("Unknown value '%s' for parameter --sound\n", optarg);
        exit(EXIT_FAILURE);
      }
      break;
    case 'S':
      future_sound = map_sound(optarg);
      if (future_sound == -1) {
        printf("Unknown value '%s' for parameter --future_sound\n", optarg);
        exit(EXIT_FAILURE);
      }
      break;
    case 'r':
      if (strcmp("continuous", optarg) == 0) {
        sound_repeat = -1;
      } else {
        sound_repeat = atoi(optarg);
      }
      break;
    case 'R':
      if (strcmp("continuous", optarg) == 0) {
        future_sound_repeat = -1;
      } else {
        future_sound_repeat = atoi(optarg);
      }
      break;
    default:
      print_usage();
      exit(EXIT_FAILURE);
    }
  }
  if (optind >= argc || argv[optind] == NULL) {
    puts("ERROR: Target NetLight network address required");
    print_usage();
    exit(EXIT_FAILURE);
  } else {
    netlight_address = argv[optind];
  }
  if (unit == -1 || color_set == 0) {
    print_usage();
    exit(EXIT_FAILURE);
  }
  if (timeout != 0 && future_color_set == 0) {
    puts("ERROR: A future-color value is required if a timeout is set");
    exit(EXIT_FAILURE);
  }
  if ((future_color_set || future_sound || future_sound_repeat) &&
      timeout == 0) {
    puts("ERROR: A timeout is required if any future value is set");
    exit(EXIT_FAILURE);
  }
  netlight_send(netlight_address, unit, color, sound, sound_repeat, timeout,
                future_color, future_sound, future_sound_repeat);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0xffffffff,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movq   $0x0,-0x58(%rbp)
lea    -0x130(%rbp),%rdi
lea    0xdd1(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0x2d9b(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x128(%rbp)
movl   $0x0,-0x124(%rbp)
movl   $0x43,-0x120(%rbp)
add    $0x18,%rdi
lea    0xda9(%rip),%rax
mov    %rax,-0x118(%rbp)
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x110(%rbp)
movl   $0x0,-0x10c(%rbp)
movl   $0x54,-0x108(%rbp)
add    $0x18,%rdi
lea    0xd83(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0x2d31(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xf8(%rbp)
movl   $0x0,-0xf4(%rbp)
movl   $0x53,-0xf0(%rbp)
add    $0x18,%rdi
lea    0xd5b(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0x2cfc(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xe0(%rbp)
movl   $0x0,-0xdc(%rbp)
movl   $0x52,-0xd8(%rbp)
add    $0x18,%rdi
lea    0xd04(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0x2cc7(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xc8(%rbp)
movl   $0x0,-0xc4(%rbp)
movl   $0x63,-0xc0(%rbp)
add    $0x18,%rdi
lea    0xd05(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0x2c92(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xb0(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x75,-0xa8(%rbp)
add    $0x18,%rdi
lea    0xcb6(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2c5d(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x98(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x73,-0x90(%rbp)
add    $0x18,%rdi
lea    0xc8e(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0x2c28(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x80(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x72,-0x78(%rbp)
add    $0x18,%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1080 <memset@plt>
movl   $0x0,-0x134(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x130(%rbp),%rcx
lea    0xc50(%rip),%rdx
lea    -0x134(%rbp),%r8
call   1050 <getopt_long@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     166c <main+0x4bc>
mov    -0x14(%rbp),%eax
mov    %eax,-0x138(%rbp)
test   %eax,%eax
je     14c0 <main+0x310>
jmp    1420 <main+0x270>
mov    -0x138(%rbp),%eax
sub    $0x43,%eax
je     14c5 <main+0x315>
jmp    1434 <main+0x284>
mov    -0x138(%rbp),%eax
sub    $0x52,%eax
je     1610 <main+0x460>
jmp    1448 <main+0x298>
mov    -0x138(%rbp),%eax
sub    $0x53,%eax
je     1589 <main+0x3d9>
jmp    145c <main+0x2ac>
mov    -0x138(%rbp),%eax
sub    $0x54,%eax
je     14ed <main+0x33d>
jmp    1470 <main+0x2c0>
mov    -0x138(%rbp),%eax
sub    $0x63,%eax
je     1505 <main+0x355>
jmp    1484 <main+0x2d4>
mov    -0x138(%rbp),%eax
sub    $0x72,%eax
je     15ce <main+0x41e>
jmp    1498 <main+0x2e8>
mov    -0x138(%rbp),%eax
sub    $0x73,%eax
je     1544 <main+0x394>
jmp    14ac <main+0x2fc>
mov    -0x138(%rbp),%eax
sub    $0x75,%eax
je     152d <main+0x37d>
jmp    1652 <main+0x4a2>
jmp    1667 <main+0x4b7>
mov    0x2b2c(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtol@plt>
mov    %rax,-0x28(%rbp)
movl   $0x1,-0x3c(%rbp)
jmp    1667 <main+0x4b7>
mov    0x2b04(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %rax,-0x30(%rbp)
jmp    1667 <main+0x4b7>
mov    0x2aec(%rip),%rax
mov    (%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   10a0 <strtol@plt>
mov    %rax,-0x20(%rbp)
movl   $0x1,-0x38(%rbp)
jmp    1667 <main+0x4b7>
mov    0x2ac4(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x34(%rbp)
jmp    1667 <main+0x4b7>
mov    0x2aad(%rip),%rax
mov    (%rax),%rdi
call   1040 <map_sound@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0xffffffff,-0x40(%rbp)
jne    1584 <main+0x3d4>
mov    0x2a91(%rip),%rax
mov    (%rax),%rsi
lea    0xae2(%rip),%rdi
call   1060 <printf@plt>
mov    0x2a4b(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1667 <main+0x4b7>
mov    0x2a68(%rip),%rax
mov    (%rax),%rdi
call   1040 <map_sound@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0xffffffff,-0x44(%rbp)
jne    15c9 <main+0x419>
mov    0x2a4c(%rip),%rax
mov    (%rax),%rsi
lea    0xac7(%rip),%rdi
call   1060 <printf@plt>
mov    0x2a06(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    1667 <main+0x4b7>
mov    0x2a23(%rip),%rax
mov    (%rax),%rsi
lea    0xacf(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    15f9 <main+0x449>
movl   $0xffffffff,-0x48(%rbp)
jmp    160b <main+0x45b>
mov    0x29f8(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x48(%rbp)
jmp    1667 <main+0x4b7>
mov    0x29e1(%rip),%rax
mov    (%rax),%rsi
lea    0xa8d(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    163b <main+0x48b>
movl   $0xffffffff,-0x4c(%rbp)
jmp    164d <main+0x49d>
mov    0x29b6(%rip),%rax
mov    (%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x4c(%rbp)
jmp    1667 <main+0x4b7>
mov    $0x0,%al
call   10d0 <print_usage@plt>
mov    0x2968(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
jmp    13dd <main+0x22d>
mov    0x296d(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jge    1697 <main+0x4e7>
mov    -0x10(%rbp),%rax
mov    0x2957(%rip),%rcx
movslq (%rcx),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    16b8 <main+0x508>
lea    0xa1b(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   10d0 <print_usage@plt>
mov    0x2917(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x291d(%rip),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x58(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
je     16e2 <main+0x532>
cmpl   $0x0,-0x38(%rbp)
jne    16f7 <main+0x547>
mov    $0x0,%al
call   10d0 <print_usage@plt>
mov    0x28d8(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
je     1726 <main+0x576>
cmpl   $0x0,-0x3c(%rbp)
jne    1726 <main+0x576>
lea    0x9d6(%rip),%rdi
call   1030 <puts@plt>
mov    0x28a9(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
cmpl   $0x0,-0x3c(%rbp)
jne    1744 <main+0x594>
cmpl   $0x0,-0x44(%rbp)
jne    1744 <main+0x594>
cmpl   $0x0,-0x4c(%rbp)
je     1769 <main+0x5b9>
cmpq   $0x0,-0x30(%rbp)
jne    1769 <main+0x5b9>
lea    0x9cf(%rip),%rdi
call   1030 <puts@plt>
mov    0x2866(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x58(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x40(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x30(%rbp),%r9
mov    -0x28(%rbp),%r11
mov    -0x44(%rbp),%r10d
mov    -0x4c(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1070 <netlight_send@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x128,%rsp
mov    %rsi,%r15
mov    %edi,%ebp
lea    0xf0f(%rip),%rax
mov    %rax,0x50(%rsp)
mov    0x2e0f(%rip),%rax
mov    (%rax),%al
mov    %al,0x58(%rsp)
movabs $0x4300000000,%rcx
mov    %rcx,0x5c(%rsp)
lea    0xef4(%rip),%rcx
mov    %rcx,0x68(%rsp)
mov    %al,0x70(%rsp)
movabs $0x5400000000,%rcx
mov    %rcx,0x74(%rsp)
lea    0xee4(%rip),%rcx
mov    %rcx,0x80(%rsp)
mov    %al,0x88(%rsp)
movabs $0x5300000000,%rcx
mov    %rcx,0x8c(%rsp)
lea    0xec9(%rip),%rcx
mov    %rcx,0x98(%rsp)
mov    %al,0xa0(%rsp)
movabs $0x5200000000,%rcx
mov    %rcx,0xa4(%rsp)
lea    0xe7f(%rip),%rcx
mov    %rcx,0xb0(%rsp)
mov    %al,0xb8(%rsp)
movabs $0x6300000000,%rcx
mov    %rcx,0xbc(%rsp)
lea    0xe8d(%rip),%rcx
mov    %rcx,0xc8(%rsp)
mov    %al,0xd0(%rsp)
movabs $0x7500000000,%rcx
mov    %rcx,0xd4(%rsp)
lea    0xe4b(%rip),%rcx
mov    %rcx,0xe0(%rsp)
mov    %al,0xe8(%rsp)
movabs $0x7300000000,%rcx
mov    %rcx,0xec(%rsp)
lea    0xe30(%rip),%rcx
mov    %rcx,0xf8(%rsp)
mov    %al,0x100(%rsp)
movabs $0x7200000000,%rax
mov    %rax,0x104(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x110(%rsp)
movq   $0x0,0x120(%rsp)
movl   $0x0,0x24(%rsp)
xor    %eax,%eax
mov    %rax,0x30(%rsp)
mov    $0xffffffff,%eax
mov    %rax,0x48(%rsp)
lea    0x24(%rsp),%r13
lea    0xcd7(%rip),%r14
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %eax,%eax
mov    %rax,0x38(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
mov    %rax,0x40(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
xor    %eax,%eax
jmp    14d8 <main+0x338>
mov    0x2c8d(%rip),%rax
mov    (%rax),%rdi
call   10a0 <atoi@plt>
mov    %rax,0x48(%rsp)
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r15,%rsi
lea    0xd82(%rip),%rdx
lea    0x50(%rsp),%rcx
mov    %r13,%r8
call   1050 <getopt_long@plt>
lea    -0x43(%rax),%ecx
cmp    $0x32,%ecx
ja     13cf <main+0x22f>
movslq (%r14,%rcx,4),%rax
add    %r14,%rax
jmp    *%rax
mov    0x2c47(%rip),%rax
mov    (%rax),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1090 <strtol@plt>
mov    %rax,0x28(%rsp)
movl   $0x1,0xc(%rsp)
jmp    1380 <main+0x1e0>
test   %eax,%eax
je     1380 <main+0x1e0>
jmp    14e2 <main+0x342>
mov    0x2c19(%rip),%rax
mov    (%rax),%rbx
lea    0xd91(%rip),%rdi
mov    %rbx,%rsi
call   1080 <strcmp@plt>
mov    $0xffffffff,%ecx
mov    %rcx,0x18(%rsp)
test   %eax,%eax
jne    14d0 <main+0x330>
jmp    1380 <main+0x1e0>
mov    0x2be9(%rip),%rax
mov    (%rax),%rdi
call   1040 <map_sound@plt>
mov    %rax,0x40(%rsp)
cmp    $0xffffffff,%eax
jne    1380 <main+0x1e0>
jmp    1587 <main+0x3e7>
mov    0x2bc7(%rip),%rax
mov    (%rax),%rdi
call   10a0 <atoi@plt>
mov    %rax,0x38(%rsp)
jmp    1380 <main+0x1e0>
mov    0x2bae(%rip),%rax
mov    (%rax),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1090 <strtol@plt>
mov    %rax,0x30(%rsp)
movl   $0x1,0x8(%rsp)
jmp    1380 <main+0x1e0>
mov    0x2b86(%rip),%rax
mov    (%rax),%r12
lea    0xcfe(%rip),%rdi
mov    %r12,%rsi
call   1080 <strcmp@plt>
mov    $0xffffffff,%ecx
mov    %rcx,0x10(%rsp)
test   %eax,%eax
je     1380 <main+0x1e0>
mov    %r12,%rdi
call   10a0 <atoi@plt>
mov    %rax,0x10(%rsp)
jmp    1380 <main+0x1e0>
mov    0x2b49(%rip),%rax
mov    (%rax),%rdi
call   1040 <map_sound@plt>
mov    %eax,0x4(%rsp)
cmp    $0xffffffff,%eax
jne    1380 <main+0x1e0>
jmp    159a <main+0x3fa>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   10a0 <atoi@plt>
mov    %rax,0x18(%rsp)
jmp    1380 <main+0x1e0>
cmp    $0xffffffff,%eax
jne    15be <main+0x41e>
mov    0x2aee(%rip),%rax
movslq (%rax),%rax
cmp    %ebp,%eax
jge    15b2 <main+0x412>
mov    (%r15,%rax,8),%rdi
test   %rdi,%rdi
je     15b2 <main+0x412>
mov    0x48(%rsp),%rsi
cmp    $0xffffffff,%esi
je     15be <main+0x41e>
cmpl   $0x0,0x8(%rsp)
je     15be <main+0x41e>
mov    0x38(%rsp),%r9
test   %r9,%r9
mov    0x40(%rsp),%rax
mov    0x18(%rsp),%rbp
mov    0xc(%rsp),%ecx
je     1543 <main+0x3a3>
test   %ecx,%ecx
je     15d3 <main+0x433>
or     %eax,%ecx
or     %ebp,%ecx
je     1552 <main+0x3b2>
test   %r9,%r9
je     15e1 <main+0x441>
sub    $0x8,%rsp
mov    0x38(%rsp),%rdx
mov    0xc(%rsp),%ecx
mov    0x18(%rsp),%r8
push   %rbp
push   %rax
push   0x40(%rsp)
call   1070 <netlight_send@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x128,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a6a(%rip),%rax
mov    (%rax),%rsi
lea    0xbb1(%rip),%rdi
jmp    15ab <main+0x40b>
mov    0x2a57(%rip),%rax
mov    (%rax),%rsi
lea    0xb74(%rip),%rdi
call   1060 <printf@plt>
jmp    15c5 <main+0x425>
lea    0xbcc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   10c0 <print_usage@plt>
mov    0x29fc(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
lea    0xbdb(%rip),%rdi
call   1030 <puts@plt>
jmp    15c5 <main+0x425>
lea    0xc09(%rip),%rdi
call   1030 <puts@plt>
jmp    15c5 <main+0x425>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@.str = [13 x i8] c"future-color\00"
@required_argument = global i32 0
@.str.1 = [15 x i8] c"future-timeout\00"
@.str.2 = [13 x i8] c"future-sound\00"
@.str.3 = [20 x i8] c"future-sound-repeat\00"
@.str.4 = [6 x i8] c"color\00"
@.str.5 = [5 x i8] c"unit\00"
@.str.6 = [6 x i8] c"sound\00"
@.str.7 = [13 x i8] c"sound-repeat\00"
@.str.8 = [17 x i8] c"C:T:S:R:c:u:s:r:\00"
@optarg = global i8* null
@.str.9 = [42 x i8] c"Unknown value '%s' for parameter --sound\0A\00"
@EXIT_FAILURE = global i32 0
@.str.10 = [49 x i8] c"Unknown value '%s' for parameter --future_sound\0A\00"
@.str.11 = [11 x i8] c"continuous\00"
@optind = global i32 0
@.str.12 = [48 x i8] c"ERROR: Target NetLight network address required\00"
@.str.13 = [60 x i8] c"ERROR: A future-color value is required if a timeout is set\00"
@.str.14 = [56 x i8] c"ERROR: A timeout is required if any future value is set\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca [9 x %struct.option]
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i64 0, i64* %7
store i64 0, i64* %8
store i64 0, i64* %9
store i32 -1, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i8* null, i8** %17
%20 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %18, i64 0, i64 0
%21 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %21
%22 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 1
%23 = load i32, i32* @required_argument
%24 = trunc i32 %23 to i8
store i8 %24, i8* %22
%25 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 2
store i32 0, i32* %25
%26 = getelementptr inbounds %struct.option, %struct.option* %20, i32 0, i32 3
store i32 67, i32* %26
%27 = getelementptr inbounds %struct.option, %struct.option* %20, i64 1
%28 = getelementptr inbounds %struct.option, %struct.option* %27, i32 0, i32 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %28
%29 = getelementptr inbounds %struct.option, %struct.option* %27, i32 0, i32 1
%30 = load i32, i32* @required_argument
%31 = trunc i32 %30 to i8
store i8 %31, i8* %29
%32 = getelementptr inbounds %struct.option, %struct.option* %27, i32 0, i32 2
store i32 0, i32* %32
%33 = getelementptr inbounds %struct.option, %struct.option* %27, i32 0, i32 3
store i32 84, i32* %33
%34 = getelementptr inbounds %struct.option, %struct.option* %27, i64 1
%35 = getelementptr inbounds %struct.option, %struct.option* %34, i32 0, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %35
%36 = getelementptr inbounds %struct.option, %struct.option* %34, i32 0, i32 1
%37 = load i32, i32* @required_argument
%38 = trunc i32 %37 to i8
store i8 %38, i8* %36
%39 = getelementptr inbounds %struct.option, %struct.option* %34, i32 0, i32 2
store i32 0, i32* %39
%40 = getelementptr inbounds %struct.option, %struct.option* %34, i32 0, i32 3
store i32 83, i32* %40
%41 = getelementptr inbounds %struct.option, %struct.option* %34, i64 1
%42 = getelementptr inbounds %struct.option, %struct.option* %41, i32 0, i32 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8** %42
%43 = getelementptr inbounds %struct.option, %struct.option* %41, i32 0, i32 1
%44 = load i32, i32* @required_argument
%45 = trunc i32 %44 to i8
store i8 %45, i8* %43
%46 = getelementptr inbounds %struct.option, %struct.option* %41, i32 0, i32 2
store i32 0, i32* %46
%47 = getelementptr inbounds %struct.option, %struct.option* %41, i32 0, i32 3
store i32 82, i32* %47
%48 = getelementptr inbounds %struct.option, %struct.option* %41, i64 1
%49 = getelementptr inbounds %struct.option, %struct.option* %48, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %49
%50 = getelementptr inbounds %struct.option, %struct.option* %48, i32 0, i32 1
%51 = load i32, i32* @required_argument
%52 = trunc i32 %51 to i8
store i8 %52, i8* %50
%53 = getelementptr inbounds %struct.option, %struct.option* %48, i32 0, i32 2
store i32 0, i32* %53
%54 = getelementptr inbounds %struct.option, %struct.option* %48, i32 0, i32 3
store i32 99, i32* %54
%55 = getelementptr inbounds %struct.option, %struct.option* %48, i64 1
%56 = getelementptr inbounds %struct.option, %struct.option* %55, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %56
%57 = getelementptr inbounds %struct.option, %struct.option* %55, i32 0, i32 1
%58 = load i32, i32* @required_argument
%59 = trunc i32 %58 to i8
store i8 %59, i8* %57
%60 = getelementptr inbounds %struct.option, %struct.option* %55, i32 0, i32 2
store i32 0, i32* %60
%61 = getelementptr inbounds %struct.option, %struct.option* %55, i32 0, i32 3
store i32 117, i32* %61
%62 = getelementptr inbounds %struct.option, %struct.option* %55, i64 1
%63 = getelementptr inbounds %struct.option, %struct.option* %62, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %63
%64 = getelementptr inbounds %struct.option, %struct.option* %62, i32 0, i32 1
%65 = load i32, i32* @required_argument
%66 = trunc i32 %65 to i8
store i8 %66, i8* %64
%67 = getelementptr inbounds %struct.option, %struct.option* %62, i32 0, i32 2
store i32 0, i32* %67
%68 = getelementptr inbounds %struct.option, %struct.option* %62, i32 0, i32 3
store i32 115, i32* %68
%69 = getelementptr inbounds %struct.option, %struct.option* %62, i64 1
%70 = getelementptr inbounds %struct.option, %struct.option* %69, i32 0, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %70
%71 = getelementptr inbounds %struct.option, %struct.option* %69, i32 0, i32 1
%72 = load i32, i32* @required_argument
%73 = trunc i32 %72 to i8
store i8 %73, i8* %71
%74 = getelementptr inbounds %struct.option, %struct.option* %69, i32 0, i32 2
store i32 0, i32* %74
%75 = getelementptr inbounds %struct.option, %struct.option* %69, i32 0, i32 3
store i32 114, i32* %75
%76 = getelementptr inbounds %struct.option, %struct.option* %69, i64 1
%77 = bitcast %struct.option* %76 to i8*
store i32 0, i32* %19
br label %78
78: ; preds = %147, %2
%79 = load i32, i32* %4
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %18, i64 0, i64 0
%82 = call i32 @getopt_long(i32 %79, i8** %80, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), %struct.option* %81, i32* %19)
store i32 %82, i32* %6
%83 = icmp ne i32 %82, -1
br i1 %83, label %84, label %148
84: ; preds = %78
%85 = load i32, i32* %6
switch i32 %85, label %143 [
i32 0, label %86
i32 67, label %87
i32 84, label %90
i32 99, label %94
i32 117, label %97
i32 115, label %101
i32 83, label %112
i32 114, label %123
i32 82, label %133
]
86: ; preds = %84
br label %147
87: ; preds = %84
%88 = load i8*, i8** @optarg
%89 = call i64 @strtol(i8* %88, i32* null, i32 16)
store i64 %89, i64* %8
store i32 1, i32* %12
br label %147
90: ; preds = %84
%91 = load i8*, i8** @optarg
%92 = call i8* @atoi(i8* %91)
%93 = ptrtoint i8* %92 to i64
store i64 %93, i64* %9
br label %147
94: ; preds = %84
%95 = load i8*, i8** @optarg
%96 = call i64 @strtol(i8* %95, i32* null, i32 16)
store i64 %96, i64* %7
store i32 1, i32* %11
br label %147
97: ; preds = %84
%98 = load i8*, i8** @optarg
%99 = call i8* @atoi(i8* %98)
%100 = ptrtoint i8* %99 to i32
store i32 %100, i32* %10
br label %147
101: ; preds = %84
%102 = load i8*, i8** @optarg
%103 = call i32 @map_sound(i8* %102)
store i32 %103, i32* %13
%104 = load i32, i32* %13
%105 = icmp eq i32 %104, -1
br i1 %105, label %106, label %111
106: ; preds = %101
%107 = load i8*, i8** @optarg
%108 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i8* %107)
%109 = load i32, i32* @EXIT_FAILURE
%110 = call i32 @exit(i32 %109)
unreachable
111: ; preds = %101
br label %147
112: ; preds = %84
%113 = load i8*, i8** @optarg
%114 = call i32 @map_sound(i8* %113)
store i32 %114, i32* %14
%115 = load i32, i32* %14
%116 = icmp eq i32 %115, -1
br i1 %116, label %117, label %122
117: ; preds = %112
%118 = load i8*, i8** @optarg
%119 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* %118)
%120 = load i32, i32* @EXIT_FAILURE
%121 = call i32 @exit(i32 %120)
unreachable
122: ; preds = %112
br label %147
123: ; preds = %84
%124 = load i8*, i8** @optarg
%125 = call i32 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* %124)
%126 = icmp eq i32 %125, 0
br i1 %126, label %127, label %128
127: ; preds = %123
store i32 -1, i32* %15
br label %132
128: ; preds = %123
%129 = load i8*, i8** @optarg
%130 = call i8* @atoi(i8* %129)
%131 = ptrtoint i8* %130 to i32
store i32 %131, i32* %15
br label %132
132: ; preds = %128, %127
br label %147
133: ; preds = %84
%134 = load i8*, i8** @optarg
%135 = call i32 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* %134)
%136 = icmp eq i32 %135, 0
br i1 %136, label %137, label %138
137: ; preds = %133
store i32 -1, i32* %16
br label %142
138: ; preds = %133
%139 = load i8*, i8** @optarg
%140 = call i8* @atoi(i8* %139)
%141 = ptrtoint i8* %140 to i32
store i32 %141, i32* %16
br label %142
142: ; preds = %138, %137
br label %147
143: ; preds = %84
%144 = call i32 (...) @print_usage()
%145 = load i32, i32* @EXIT_FAILURE
%146 = call i32 @exit(i32 %145)
unreachable
147: ; preds = %142, %132, %122, %111, %97, %94, %90, %87, %86
br label %78
148: ; preds = %78
%149 = load i32, i32* @optind
%150 = load i32, i32* %4
%151 = icmp sge i32 %149, %150
br i1 %151, label %159, label %152
152: ; preds = %148
%153 = load i8**, i8*** %5
%154 = load i32, i32* @optind
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i8*, i8** %153, i64 %155
%157 = load i8*, i8** %156
%158 = icmp eq i8* %157, null
br i1 %158, label %159, label %164
159: ; preds = %152, %148
%160 = call i32 @puts(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%161 = call i32 (...) @print_usage()
%162 = load i32, i32* @EXIT_FAILURE
%163 = call i32 @exit(i32 %162)
unreachable
164: ; preds = %152
%165 = load i8**, i8*** %5
%166 = load i32, i32* @optind
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i8*, i8** %165, i64 %167
%169 = load i8*, i8** %168
store i8* %169, i8** %17
br label %170
170: ; preds = %164
%171 = load i32, i32* %10
%172 = icmp eq i32 %171, -1
br i1 %172, label %176, label %173
173: ; preds = %170
%174 = load i32, i32* %11
%175 = icmp eq i32 %174, 0
br i1 %175, label %176, label %180
176: ; preds = %173, %170
%177 = call i32 (...) @print_usage()
%178 = load i32, i32* @EXIT_FAILURE
%179 = call i32 @exit(i32 %178)
unreachable
180: ; preds = %173
%181 = load i64, i64* %9
%182 = icmp ne i64 %181, 0
br i1 %182, label %183, label %190
183: ; preds = %180
%184 = load i32, i32* %12
%185 = icmp eq i32 %184, 0
br i1 %185, label %186, label %190
186: ; preds = %183
%187 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0))
%188 = load i32, i32* @EXIT_FAILURE
%189 = call i32 @exit(i32 %188)
unreachable
190: ; preds = %183, %180
%191 = load i32, i32* %12
%192 = icmp ne i32 %191, 0
br i1 %192, label %199, label %193
193: ; preds = %190
%194 = load i32, i32* %14
%195 = icmp ne i32 %194, 0
br i1 %195, label %199, label %196
196: ; preds = %193
%197 = load i32, i32* %16
%198 = icmp ne i32 %197, 0
br i1 %198, label %199, label %206
199: ; preds = %196, %193, %190
%200 = load i64, i64* %9
%201 = icmp eq i64 %200, 0
br i1 %201, label %202, label %206
202: ; preds = %199
%203 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i64 0, i64 0))
%204 = load i32, i32* @EXIT_FAILURE
%205 = call i32 @exit(i32 %204)
unreachable
206: ; preds = %199, %196
%207 = load i8*, i8** %17
%208 = load i32, i32* %10
%209 = load i64, i64* %7
%210 = load i32, i32* %13
%211 = load i32, i32* %15
%212 = load i64, i64* %9
%213 = load i64, i64* %8
%214 = load i32, i32* %14
%215 = load i32, i32* %16
%216 = call i32 @netlight_send(i8* %207, i32 %208, i64 %209, i32 %210, i32 %211, i64 %212, i64 %213, i32 %214, i32 %215)
ret i32 0
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@.str = [13 x i8] c"future-color\00"
@required_argument = global i32 0
@.str.1 = [15 x i8] c"future-timeout\00"
@.str.2 = [13 x i8] c"future-sound\00"
@.str.3 = [20 x i8] c"future-sound-repeat\00"
@.str.4 = [6 x i8] c"color\00"
@.str.5 = [5 x i8] c"unit\00"
@.str.6 = [6 x i8] c"sound\00"
@.str.7 = [13 x i8] c"sound-repeat\00"
@.str.8 = [17 x i8] c"C:T:S:R:c:u:s:r:\00"
@optarg = global i8* null
@.str.9 = [42 x i8] c"Unknown value '%s' for parameter --sound\0A\00"
@EXIT_FAILURE = global i32 0
@.str.10 = [49 x i8] c"Unknown value '%s' for parameter --future_sound\0A\00"
@.str.11 = [11 x i8] c"continuous\00"
@optind = global i32 0
@.str.12 = [48 x i8] c"ERROR: Target NetLight network address required\00"
@.str.13 = [60 x i8] c"ERROR: A future-color value is required if a timeout is set\00"
@.str.14 = [56 x i8] c"ERROR: A timeout is required if any future value is set\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [9 x %struct.option]
%4 = alloca i32
%5 = bitcast [9 x %struct.option]* %3 to i8*
%6 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 0
%7 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 0, i32 1
%9 = load i32, i32* @required_argument
%10 = trunc i32 %9 to i8
store i8 %10, i8* %8
%11 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 0, i32 2
store i32 0, i32* %11
%12 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 0, i32 3
store i32 67, i32* %12
%13 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8** %13
%14 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 1, i32 1
store i8 %10, i8* %14
%15 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 1, i32 2
store i32 0, i32* %15
%16 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 1, i32 3
store i32 84, i32* %16
%17 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 2, i32 1
store i8 %10, i8* %18
%19 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 2, i32 2
store i32 0, i32* %19
%20 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 2, i32 3
store i32 83, i32* %20
%21 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i8** %21
%22 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 3, i32 1
store i8 %10, i8* %22
%23 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 3, i32 2
store i32 0, i32* %23
%24 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 3, i32 3
store i32 82, i32* %24
%25 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %25
%26 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 4, i32 1
store i8 %10, i8* %26
%27 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 4, i32 2
store i32 0, i32* %27
%28 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 4, i32 3
store i32 99, i32* %28
%29 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %29
%30 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 5, i32 1
store i8 %10, i8* %30
%31 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 5, i32 2
store i32 0, i32* %31
%32 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 5, i32 3
store i32 117, i32* %32
%33 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %33
%34 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 6, i32 1
store i8 %10, i8* %34
%35 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 6, i32 2
store i32 0, i32* %35
%36 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 6, i32 3
store i32 115, i32* %36
%37 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 7, i32 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8** %37
%38 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 7, i32 1
store i8 %10, i8* %38
%39 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 7, i32 2
store i32 0, i32* %39
%40 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 7, i32 3
store i32 114, i32* %40
%41 = getelementptr inbounds [9 x %struct.option], [9 x %struct.option]* %3, i64 0, i64 8
%42 = bitcast %struct.option* %41 to i8*
%43 = bitcast i32* %4 to i8*
store i32 0, i32* %4
br label %44
44: ; preds = %101, %2
%45 = phi i64 [ 0, %2 ], [ %102, %101 ]
%46 = phi i64 [ 0, %2 ], [ %103, %101 ]
%47 = phi i64 [ 0, %2 ], [ %104, %101 ]
%48 = phi i32 [ -1, %2 ], [ %105, %101 ]
%49 = phi i32 [ 0, %2 ], [ %106, %101 ]
%50 = phi i32 [ 0, %2 ], [ %107, %101 ]
%51 = phi i32 [ 0, %2 ], [ %108, %101 ]
%52 = phi i32 [ 0, %2 ], [ %109, %101 ]
%53 = phi i32 [ 0, %2 ], [ %110, %101 ]
%54 = phi i32 [ 0, %2 ], [ %111, %101 ]
%55 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), %struct.option* %6, i32* %4)
switch i32 %55, label %116 [
i32 -1, label %120
i32 0, label %101
i32 67, label %56
i32 84, label %59
i32 99, label %63
i32 117, label %66
i32 115, label %71
i32 83, label %80
i32 114, label %89
i32 82, label %97
]
56: ; preds = %44
%57 = load i8*, i8** @optarg
%58 = call i64 @strtol(i8* nocapture %57, i32* null, i32 16)
br label %101
59: ; preds = %44
%60 = load i8*, i8** @optarg
%61 = call i8* @atoi(i8* %60)
%62 = ptrtoint i8* %61 to i64
br label %101
63: ; preds = %44
%64 = load i8*, i8** @optarg
%65 = call i64 @strtol(i8* nocapture %64, i32* null, i32 16)
br label %101
66: ; preds = %44
%67 = load i8*, i8** @optarg
%68 = call i8* @atoi(i8* %67)
%69 = ptrtoint i8* %68 to i64
%70 = trunc i64 %69 to i32
br label %101
71: ; preds = %44
%72 = load i8*, i8** @optarg
%73 = call i32 @map_sound(i8* %72)
%74 = icmp eq i32 %73, -1
br i1 %74, label %75, label %101
75: ; preds = %71
%76 = load i8*, i8** @optarg
%77 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0), i8* %76)
%78 = load i32, i32* @EXIT_FAILURE
%79 = call i32 @exit(i32 %78)
unreachable
80: ; preds = %44
%81 = load i8*, i8** @optarg
%82 = call i32 @map_sound(i8* %81)
%83 = icmp eq i32 %82, -1
br i1 %83, label %84, label %101
84: ; preds = %80
%85 = load i8*, i8** @optarg
%86 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0), i8* %85)
%87 = load i32, i32* @EXIT_FAILURE
%88 = call i32 @exit(i32 %87)
unreachable
89: ; preds = %44
%90 = load i8*, i8** @optarg
%91 = call i32 @strcmp(i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* dereferenceable(1) %90)
%92 = icmp eq i32 %91, 0
br i1 %92, label %101, label %93
93: ; preds = %89
%94 = call i8* @atoi(i8* %90)
%95 = ptrtoint i8* %94 to i64
%96 = trunc i64 %95 to i32
br label %101
97: ; preds = %44
%98 = load i8*, i8** @optarg
%99 = call i32 @strcmp(i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i8* dereferenceable(1) %98)
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %112
101: ; preds = %97, %89, %44, %112, %93, %80, %71, %66, %63, %59, %56
%102 = phi i64 [ %45, %112 ], [ %45, %93 ], [ %45, %80 ], [ %45, %71 ], [ %45, %66 ], [ %65, %63 ], [ %45, %59 ], [ %45, %56 ], [ %45, %44 ], [ %45, %89 ], [ %45, %97 ]
%103 = phi i64 [ %46, %112 ], [ %46, %93 ], [ %46, %80 ], [ %46, %71 ], [ %46, %66 ], [ %46, %63 ], [ %46, %59 ], [ %58, %56 ], [ %46, %44 ], [ %46, %89 ], [ %46, %97 ]
%104 = phi i64 [ %47, %112 ], [ %47, %93 ], [ %47, %80 ], [ %47, %71 ], [ %47, %66 ], [ %47, %63 ], [ %62, %59 ], [ %47, %56 ], [ %47, %44 ], [ %47, %89 ], [ %47, %97 ]
%105 = phi i32 [ %48, %112 ], [ %48, %93 ], [ %48, %80 ], [ %48, %71 ], [ %70, %66 ], [ %48, %63 ], [ %48, %59 ], [ %48, %56 ], [ %48, %44 ], [ %48, %89 ], [ %48, %97 ]
%106 = phi i32 [ %49, %112 ], [ %49, %93 ], [ %49, %80 ], [ %49, %71 ], [ %49, %66 ], [ 1, %63 ], [ %49, %59 ], [ %49, %56 ], [ %49, %44 ], [ %49, %89 ], [ %49, %97 ]
%107 = phi i32 [ %50, %112 ], [ %50, %93 ], [ %50, %80 ], [ %50, %71 ], [ %50, %66 ], [ %50, %63 ], [ %50, %59 ], [ 1, %56 ], [ %50, %44 ], [ %50, %89 ], [ %50, %97 ]
%108 = phi i32 [ %51, %112 ], [ %51, %93 ], [ %51, %80 ], [ %73, %71 ], [ %51, %66 ], [ %51, %63 ], [ %51, %59 ], [ %51, %56 ], [ %51, %44 ], [ %51, %89 ], [ %51, %97 ]
%109 = phi i32 [ %52, %112 ], [ %52, %93 ], [ %82, %80 ], [ %52, %71 ], [ %52, %66 ], [ %52, %63 ], [ %52, %59 ], [ %52, %56 ], [ %52, %44 ], [ %52, %89 ], [ %52, %97 ]
%110 = phi i32 [ %53, %112 ], [ %96, %93 ], [ %53, %80 ], [ %53, %71 ], [ %53, %66 ], [ %53, %63 ], [ %53, %59 ], [ %53, %56 ], [ %53, %44 ], [ -1, %89 ], [ %53, %97 ]
%111 = phi i32 [ %115, %112 ], [ %54, %93 ], [ %54, %80 ], [ %54, %71 ], [ %54, %66 ], [ %54, %63 ], [ %54, %59 ], [ %54, %56 ], [ %54, %44 ], [ %54, %89 ], [ -1, %97 ]
br label %44
112: ; preds = %97
%113 = call i8* @atoi(i8* %98)
%114 = ptrtoint i8* %113 to i64
%115 = trunc i64 %114 to i32
br label %101
116: ; preds = %44
%117 = call i32 (...) @print_usage()
%118 = load i32, i32* @EXIT_FAILURE
%119 = call i32 @exit(i32 %118)
unreachable
120: ; preds = %44
%121 = load i32, i32* @optind
%122 = icmp slt i32 %121, %0
br i1 %122, label %123, label %128
123: ; preds = %120
%124 = sext i32 %121 to i64
%125 = getelementptr inbounds i8*, i8** %1, i64 %124
%126 = load i8*, i8** %125
%127 = icmp eq i8* %126, null
br i1 %127, label %128, label %133
128: ; preds = %123, %120
%129 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.12, i64 0, i64 0))
%130 = call i32 (...) @print_usage()
%131 = load i32, i32* @EXIT_FAILURE
%132 = call i32 @exit(i32 %131)
unreachable
133: ; preds = %123
%134 = icmp eq i32 %48, -1
%135 = icmp eq i32 %49, 0
%136 = select i1 %134, i1 true, i1 %135
br i1 %136, label %137, label %141
137: ; preds = %133
%138 = call i32 (...) @print_usage()
%139 = load i32, i32* @EXIT_FAILURE
%140 = call i32 @exit(i32 %139)
unreachable
141: ; preds = %133
%142 = icmp ne i64 %47, 0
%143 = icmp eq i32 %50, 0
%144 = select i1 %142, i1 %143, i1 false
br i1 %144, label %145, label %149
145: ; preds = %141
%146 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0))
%147 = load i32, i32* @EXIT_FAILURE
%148 = call i32 @exit(i32 %147)
unreachable
149: ; preds = %141
%150 = icmp ne i32 %50, 0
%151 = icmp ne i32 %52, 0
%152 = select i1 %150, i1 true, i1 %151
%153 = icmp ne i32 %54, 0
%154 = select i1 %152, i1 true, i1 %153
%155 = icmp eq i64 %47, 0
%156 = select i1 %154, i1 %155, i1 false
br i1 %156, label %157, label %161
157: ; preds = %149
%158 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i64 0, i64 0))
%159 = load i32, i32* @EXIT_FAILURE
%160 = call i32 @exit(i32 %159)
unreachable
161: ; preds = %149
%162 = call i32 @netlight_send(i8* %126, i32 %48, i64 %45, i32 %51, i32 %53, i64 %47, i64 %46, i32 %52, i32 %54)
ret i32 0
}