#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 pid_t;

/* Variables and functions */
size_t SIGABRT;
size_t SIGALRM;
size_t SIGBUS;
size_t SIGCHLD;
size_t SIGCONT;
size_t SIGFPE;
size_t SIGHUP;
size_t SIGILL;
size_t SIGINT;
size_t SIGKILL;
size_t SIGPIPE;
size_t SIGQUIT;
size_t SIGSEGV;
size_t SIGSTOP;
size_t SIGTERM;
size_t SIGTRAP;
size_t SIGTSTP;
size_t SIGTTIN;
size_t SIGTTOU;
size_t SIGURG;
size_t SIGUSR1;
size_t SIGUSR2;
size_t SIGXCPU;
size_t SIGXFSZ;
void *atoi(char *);
scalar_t__ bu_handle_version(int, char **);
int /*<<< orphan*/ bu_invalid_argument(char *, char *);
int /*<<< orphan*/ bu_missing_argument(char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
scalar_t__ has_arg(int, char **, char *);
int kill(int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int main(int argc, char **argv) {
  if (has_arg(argc, argv, "-h") || has_arg(argc, argv, "--help")) {
    puts("Usage: kill -s SIGNAL_NAME PID...");
    puts("       kill -l [EXIT_STATUS]");
    puts("       kill [-SIGNAL_NAME] PID...");
    puts("       kill [-SIGNAL_NUMBER] PID...");
    return 1;
  }
  if (bu_handle_version(argc, argv)) {
    return 0;
  }
  if (argc < 2) {
    bu_missing_argument(argv[0]);
    return 1;
  }
  char *signal_names[33] = {0};
  signal_names[SIGABRT] = "SIGABRT";
  signal_names[SIGALRM] = "SIGALRM";
  signal_names[SIGBUS] = "SIGBUS";
  signal_names[SIGCHLD] = "SIGCHLD";
  signal_names[SIGCONT] = "SIGCONT";
  signal_names[SIGFPE] = "SIGFPE";
  signal_names[SIGHUP] = "SIGHUP";
  signal_names[SIGILL] = "SIGILL";
  signal_names[SIGINT] = "SIGINT";
  signal_names[SIGKILL] = "SIGKILL";
  signal_names[SIGPIPE] = "SIGPIPE";
  signal_names[SIGQUIT] = "SIGQUIT";
  signal_names[SIGSEGV] = "SIGSEGV";
  signal_names[SIGSTOP] = "SIGSTOP";
  signal_names[SIGTERM] = "SIGTERM";
  signal_names[SIGTSTP] = "SIGTSTP";
  signal_names[SIGTTIN] = "SIGTTIN";
  signal_names[SIGTTOU] = "SIGTTOU";
  signal_names[SIGUSR1] = "SIGUSR1";
  signal_names[SIGUSR2] = "SIGUSR2";
  signal_names[SIGTRAP] = "SIGTRAP";
  signal_names[SIGURG] = "SIGURG";
  signal_names[SIGXCPU] = "SIGXCPU";
  signal_names[SIGXFSZ] = "SIGXFSZ";
  int signal_num = -1;
  char *signal_name = NULL;
  char *pid_str = NULL;
  int dash_s = 0;
  int dash_l = 0;
  if (strncmp(argv[1], "-s", 3) == 0) {
    if (argc < 4) {
      bu_missing_argument(argv[0]);
      return 1;
    }
    dash_s = 1;
    signal_name = argv[2];
    pid_str = argv[3];
  } else if (strncmp(argv[1], "-l", 3) == 0) {
    dash_l = 1;
  } else if (argv[1][0] == '-') {
    signal_name = argv[1] + 1;
    pid_str = argv[2];
  } else {
    bu_invalid_argument(argv[0], argv[1]);
  }
  if (dash_l) {
    int i_per_line = 0;
    for (int i = 0; i < 33; i++) {
      if (signal_names[i] != NULL) {
        i_per_line++;
        printf("%i) %s\t", i, signal_names[i]);
      }
      if (i_per_line > 3) {
        puts("");
        i_per_line = 0;
      }
    }
    return 0;
  }
  if (signal_name != NULL && signal_name[0] >= '0' && signal_name[0] <= '9') {
    signal_num = atoi(signal_name);
    signal_name = NULL;
  }
  if (signal_name) {
    for (int i = 0; i < 33; i++) {
      if (signal_names[i] != NULL &&
          strcmp(signal_names[i] + 3, signal_name) == 0) {
        signal_num = i;
      }
    }
  }
  if (signal_name != NULL && signal_num == -1) {
    fputs(argv[0], stderr);
    fputs(": Unknown signal: ", stderr);
    fputs(signal_name, stderr);
    fputs("\n", stderr);
  }
  pid_t pid = -1;
  if (pid_str) {
    pid = atoi(pid_str);
  }
  if (kill(pid, signal_num) == -1) {
    perror(argv[0]);
  }
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe09(%rip),%rdx
call   1050 <has_arg@plt>
cmp    $0x0,%rax
jne    1223 <main+0x53>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xdef(%rip),%rdx
call   1050 <has_arg@plt>
cmp    $0x0,%rax
je     125f <main+0x8f>
lea    0xde0(%rip),%rdi
call   1040 <puts@plt>
lea    0xdf6(%rip),%rdi
call   1040 <puts@plt>
lea    0xe07(%rip),%rdi
call   1040 <puts@plt>
lea    0xe1d(%rip),%rdi
call   1040 <puts@plt>
movl   $0x1,-0x4(%rbp)
jmp    18a0 <main+0x6d0>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10e0 <bu_handle_version@plt>
cmp    $0x0,%rax
je     1281 <main+0xb1>
movl   $0x0,-0x4(%rbp)
jmp    18a0 <main+0x6d0>
cmpl   $0x2,-0x8(%rbp)
jge    12a3 <main+0xd3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10f0 <bu_missing_argument@plt>
movl   $0x1,-0x4(%rbp)
jmp    18a0 <main+0x6d0>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x108,%edx
call   1090 <memset@plt>
mov    0x2c73(%rip),%rax
mov    (%rax),%rax
lea    0xdc8(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2ce2(%rip),%rax
mov    (%rax),%rax
lea    0xdb7(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2cf9(%rip),%rax
mov    (%rax),%rax
lea    0xda6(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
mov    0x2c80(%rip),%rax
mov    (%rax),%rax
lea    0xd94(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2ca7(%rip),%rax
mov    (%rax),%rax
lea    0xd83(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2c5e(%rip),%rax
mov    (%rax),%rax
lea    0xd72(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2c9d(%rip),%rax
mov    (%rax),%rax
lea    0xd60(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2c04(%rip),%rax
mov    (%rax),%rax
lea    0xd4e(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2c2b(%rip),%rax
mov    (%rax),%rax
lea    0xd3c(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b9a(%rip),%rax
mov    (%rax),%rax
lea    0xd2a(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b99(%rip),%rax
mov    (%rax),%rax
lea    0xd19(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2bd0(%rip),%rax
mov    (%rax),%rax
lea    0xd08(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2bd7(%rip),%rax
mov    (%rax),%rax
lea    0xcf7(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b1e(%rip),%rax
mov    (%rax),%rax
lea    0xce6(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b8d(%rip),%rax
mov    (%rax),%rax
lea    0xcd5(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b4c(%rip),%rax
mov    (%rax),%rax
lea    0xcc4(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b2b(%rip),%rax
mov    (%rax),%rax
lea    0xcb3(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b72(%rip),%rax
mov    (%rax),%rax
lea    0xca2(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2b51(%rip),%rax
mov    (%rax),%rax
lea    0xc91(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2ac0(%rip),%rax
mov    (%rax),%rax
lea    0xc80(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2a77(%rip),%rax
mov    (%rax),%rax
lea    0xc6f(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2a7e(%rip),%rax
mov    (%rax),%rax
lea    0xc5e(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2a5d(%rip),%rax
mov    (%rax),%rax
lea    0xc4c(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
mov    0x2a94(%rip),%rax
mov    (%rax),%rax
lea    0xc3b(%rip),%rcx
mov    %rcx,-0x120(%rbp,%rax,8)
ff
movl   $0xffffffff,-0x124(%rbp)
ff ff ff
movq   $0x0,-0x130(%rbp)
movq   $0x0,-0x138(%rbp)
movl   $0x0,-0x13c(%rbp)
movl   $0x0,-0x140(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xbf8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    15b4 <main+0x3e4>
cmpl   $0x4,-0x8(%rbp)
jge    1587 <main+0x3b7>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10f0 <bu_missing_argument@plt>
movl   $0x1,-0x4(%rbp)
jmp    18a0 <main+0x6d0>
movl   $0x1,-0x13c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x130(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x138(%rbp)
jmp    163f <main+0x46f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xb89(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    15e6 <main+0x416>
movl   $0x1,-0x140(%rbp)
jmp    163a <main+0x46a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1621 <main+0x451>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
add    $0x1,%rax
mov    %rax,-0x130(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x138(%rbp)
jmp    1635 <main+0x465>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1060 <bu_invalid_argument@plt>
jmp    163a <main+0x46a>
jmp    163f <main+0x46f>
cmpl   $0x0,-0x140(%rbp)
je     16fb <main+0x52b>
movl   $0x0,-0x144(%rbp)
movl   $0x0,-0x148(%rbp)
cmpl   $0x21,-0x148(%rbp)
jge    16ef <main+0x51f>
movslq -0x148(%rbp),%rax
cmpq   $0x0,-0x120(%rbp,%rax,8)
je     16b3 <main+0x4e3>
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
mov    -0x148(%rbp),%esi
movslq -0x148(%rbp),%rax
mov    -0x120(%rbp,%rax,8),%rdx
ff
lea    0xaa1(%rip),%rdi
call   1070 <printf@plt>
cmpl   $0x3,-0x144(%rbp)
jle    16d6 <main+0x506>
lea    0xa8f(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x144(%rbp)
jmp    16db <main+0x50b>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    1660 <main+0x490>
movl   $0x0,-0x4(%rbp)
jmp    18a0 <main+0x6d0>
cmpq   $0x0,-0x130(%rbp)
je     174c <main+0x57c>
mov    -0x130(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     174c <main+0x57c>
mov    -0x130(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     174c <main+0x57c>
mov    -0x130(%rbp),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x124(%rbp)
movq   $0x0,-0x130(%rbp)
cmpq   $0x0,-0x130(%rbp)
je     17da <main+0x60a>
movl   $0x0,-0x14c(%rbp)
cmpl   $0x21,-0x14c(%rbp)
jge    17d5 <main+0x605>
movslq -0x14c(%rbp),%rax
cmpq   $0x0,-0x120(%rbp,%rax,8)
je     17bc <main+0x5ec>
movslq -0x14c(%rbp),%rax
mov    -0x120(%rbp,%rax,8),%rdi
ff
add    $0x3,%rdi
mov    -0x130(%rbp),%rsi
call   10a0 <strcmp@plt>
cmp    $0x0,%rax
jne    17bc <main+0x5ec>
mov    -0x14c(%rbp),%eax
mov    %eax,-0x124(%rbp)
jmp    17c1 <main+0x5f1>
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1764 <main+0x594>
jmp    17da <main+0x60a>
cmpq   $0x0,-0x130(%rbp)
je     1849 <main+0x679>
cmpl   $0xffffffff,-0x124(%rbp)
jne    1849 <main+0x679>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x275d(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x274f(%rip),%rax
mov    (%rax),%esi
lea    0x93d(%rip),%rdi
call   1080 <fputs@plt>
mov    -0x130(%rbp),%rdi
mov    0x2733(%rip),%rax
mov    (%rax),%esi
call   1080 <fputs@plt>
mov    0x2725(%rip),%rax
mov    (%rax),%esi
lea    0x926(%rip),%rdi
call   1080 <fputs@plt>
movl   $0xffffffff,-0x150(%rbp)
ff ff ff
cmpq   $0x0,-0x138(%rbp)
je     1873 <main+0x6a3>
mov    -0x138(%rbp),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x150(%rbp)
mov    -0x150(%rbp),%edi
mov    -0x124(%rbp),%esi
call   10b0 <kill@plt>
cmp    $0xffffffff,%eax
jne    1899 <main+0x6c9>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10c0 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x110,%rsp
mov    %rsi,%r12
mov    %edi,%ebp
lea    0xe05(%rip),%rdx
call   1060 <has_arg@plt>
test   %rax,%rax
jne    121b <main+0x3b>
lea    0xdf7(%rip),%rdx
mov    %ebp,%edi
mov    %r12,%rsi
call   1060 <has_arg@plt>
test   %rax,%rax
je     1262 <main+0x82>
lea    0xde8(%rip),%rdi
call   1050 <puts@plt>
lea    0xdfe(%rip),%rdi
call   1050 <puts@plt>
lea    0xe0f(%rip),%rdi
call   1050 <puts@plt>
lea    0xe25(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x110,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebp,%edi
mov    %r12,%rsi
call   10f0 <bu_handle_version@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    1250 <main+0x70>
cmp    $0x1,%ebp
jg     1283 <main+0xa3>
mov    (%r12),%rdi
call   1100 <bu_missing_argument@plt>
jmp    124b <main+0x6b>
mov    %rsp,%rdi
mov    $0x108,%edx
xor    %esi,%esi
call   10a0 <memset@plt>
mov    0x2c97(%rip),%rax
mov    (%rax),%rax
lea    0xdec(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2d0a(%rip),%rax
mov    (%rax),%rax
lea    0xddf(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2d25(%rip),%rax
mov    (%rax),%rax
lea    0xdd2(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2cb0(%rip),%rax
mov    (%rax),%rax
lea    0xdc4(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2cdb(%rip),%rax
mov    (%rax),%rax
lea    0xdb7(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2c96(%rip),%rax
mov    (%rax),%rax
lea    0xdaa(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2cd9(%rip),%rax
mov    (%rax),%rax
lea    0xd9c(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2c44(%rip),%rax
mov    (%rax),%rax
lea    0xd8e(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2c6f(%rip),%rax
mov    (%rax),%rax
lea    0xd80(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2be2(%rip),%rax
mov    (%rax),%rax
lea    0xd72(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2be5(%rip),%rax
mov    (%rax),%rax
lea    0xd65(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2c20(%rip),%rax
mov    (%rax),%rax
lea    0xd58(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2c2b(%rip),%rax
mov    (%rax),%rax
lea    0xd4b(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2b76(%rip),%rax
mov    (%rax),%rax
lea    0xd3e(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2be9(%rip),%rax
mov    (%rax),%rax
lea    0xd31(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2bac(%rip),%rax
mov    (%rax),%rax
lea    0xd24(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2b8f(%rip),%rax
mov    (%rax),%rax
lea    0xd17(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2bda(%rip),%rax
mov    (%rax),%rax
lea    0xd0a(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2bbd(%rip),%rax
mov    (%rax),%rax
lea    0xcfd(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2b30(%rip),%rax
mov    (%rax),%rax
lea    0xcf0(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2aeb(%rip),%rax
mov    (%rax),%rax
lea    0xce3(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2af6(%rip),%rax
mov    (%rax),%rax
lea    0xcd6(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2ad9(%rip),%rax
mov    (%rax),%rax
lea    0xcc8(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x2b14(%rip),%rax
mov    (%rax),%rax
lea    0xcbb(%rip),%rcx
mov    %rcx,(%rsp,%rax,8)
mov    0x8(%r12),%rdi
lea    0xcb3(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     14da <main+0x2fa>
mov    0x8(%r12),%rdi
lea    0xc9b(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     150f <main+0x32f>
mov    0x8(%r12),%r15
cmpb   $0x2d,(%r15)
jne    1556 <main+0x376>
add    $0x1,%r15
mov    0x10(%r12),%r14
jmp    14f6 <main+0x316>
cmp    $0x3,%ebp
jbe    1278 <main+0x98>
mov    0x10(%r12),%r15
mov    0x18(%r12),%r14
test   %r15,%r15
je     15d9 <main+0x3f9>
mov    (%r15),%al
add    $0xd0,%al
cmp    $0xa,%al
jae    156c <main+0x38c>
mov    %r15,%rdi
call   10e0 <atoi@plt>
mov    %rax,%rbp
jmp    15de <main+0x3fe>
xor    %ebx,%ebx
lea    0xc37(%rip),%r14
xor    %ebp,%ebp
jmp    1529 <main+0x349>
add    $0x1,%ebp
add    $0x1,%rbx
cmp    $0x21,%rbx
je     154f <main+0x36f>
mov    (%rsp,%rbx,8),%rdx
test   %rdx,%rdx
je     151f <main+0x33f>
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <printf@plt>
cmp    $0x3,%ebp
jl     151c <main+0x33c>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %ebp,%ebp
jmp    151f <main+0x33f>
xor    %ebx,%ebx
jmp    1250 <main+0x70>
mov    (%r12),%rdi
mov    %r15,%rsi
call   1070 <bu_invalid_argument@plt>
mov    $0xffffffff,%ebp
jmp    15f0 <main+0x410>
mov    $0xffffffff,%ebp
xor    %ebx,%ebx
jmp    157f <main+0x39f>
add    $0x1,%rbx
cmp    $0x21,%rbx
je     159c <main+0x3bc>
mov    (%rsp,%rbx,8),%rdi
test   %rdi,%rdi
je     1575 <main+0x395>
add    $0x3,%rdi
mov    %r15,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
cmove  %ebx,%ebp
jmp    1575 <main+0x395>
cmp    $0xffffffff,%ebp
jne    15de <main+0x3fe>
mov    (%r12),%rdi
mov    0x29b4(%rip),%rbx
mov    (%rbx),%esi
call   1090 <fputs@plt>
mov    (%rbx),%esi
lea    0xb9b(%rip),%rdi
call   1090 <fputs@plt>
mov    (%rbx),%esi
mov    %r15,%rdi
call   1090 <fputs@plt>
mov    (%rbx),%esi
lea    0xb96(%rip),%rdi
call   1090 <fputs@plt>
mov    $0xffffffff,%ebp
test   %r14,%r14
je     15f0 <main+0x410>
mov    %r14,%rdi
call   10e0 <atoi@plt>
mov    %rax,%rdi
jmp    15f5 <main+0x415>
mov    $0xffffffff,%edi
mov    %ebp,%esi
call   10c0 <kill@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
jne    1250 <main+0x70>
mov    (%r12),%rdi
call   10d0 <perror@plt>
jmp    1250 <main+0x70>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [34 x i8] c"Usage: kill -s SIGNAL_NAME PID...\00"
@.str.3 = [29 x i8] c" kill -l [EXIT_STATUS]\00"
@.str.4 = [34 x i8] c" kill [-SIGNAL_NAME] PID...\00"
@.str.5 = [36 x i8] c" kill [-SIGNAL_NUMBER] PID...\00"
@.str.6 = [8 x i8] c"SIGABRT\00"
@SIGABRT = global i64 0
@.str.7 = [8 x i8] c"SIGALRM\00"
@SIGALRM = global i64 0
@.str.8 = [7 x i8] c"SIGBUS\00"
@SIGBUS = global i64 0
@.str.9 = [8 x i8] c"SIGCHLD\00"
@SIGCHLD = global i64 0
@.str.10 = [8 x i8] c"SIGCONT\00"
@SIGCONT = global i64 0
@.str.11 = [7 x i8] c"SIGFPE\00"
@SIGFPE = global i64 0
@.str.12 = [7 x i8] c"SIGHUP\00"
@SIGHUP = global i64 0
@.str.13 = [7 x i8] c"SIGILL\00"
@SIGILL = global i64 0
@.str.14 = [7 x i8] c"SIGINT\00"
@SIGINT = global i64 0
@.str.15 = [8 x i8] c"SIGKILL\00"
@SIGKILL = global i64 0
@.str.16 = [8 x i8] c"SIGPIPE\00"
@SIGPIPE = global i64 0
@.str.17 = [8 x i8] c"SIGQUIT\00"
@SIGQUIT = global i64 0
@.str.18 = [8 x i8] c"SIGSEGV\00"
@SIGSEGV = global i64 0
@.str.19 = [8 x i8] c"SIGSTOP\00"
@SIGSTOP = global i64 0
@.str.20 = [8 x i8] c"SIGTERM\00"
@SIGTERM = global i64 0
@.str.21 = [8 x i8] c"SIGTSTP\00"
@SIGTSTP = global i64 0
@.str.22 = [8 x i8] c"SIGTTIN\00"
@SIGTTIN = global i64 0
@.str.23 = [8 x i8] c"SIGTTOU\00"
@SIGTTOU = global i64 0
@.str.24 = [8 x i8] c"SIGUSR1\00"
@SIGUSR1 = global i64 0
@.str.25 = [8 x i8] c"SIGUSR2\00"
@SIGUSR2 = global i64 0
@.str.26 = [8 x i8] c"SIGTRAP\00"
@SIGTRAP = global i64 0
@.str.27 = [7 x i8] c"SIGURG\00"
@SIGURG = global i64 0
@.str.28 = [8 x i8] c"SIGXCPU\00"
@SIGXCPU = global i64 0
@.str.29 = [8 x i8] c"SIGXFSZ\00"
@SIGXFSZ = global i64 0
@.str.30 = [3 x i8] c"-s\00"
@.str.31 = [3 x i8] c"-l\00"
@.str.32 = [8 x i8] c"%i) %s\09\00"
@.str.33 = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.34 = [19 x i8] c": Unknown signal: \00"
@.str.35 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [33 x i8*]
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i64 @has_arg(i32 %16, i8** %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%19 = icmp ne i64 %18, 0
br i1 %19, label %25, label %20
20: ; preds = %2
%21 = load i32, i32* %4
%22 = load i8**, i8*** %5
%23 = call i64 @has_arg(i32 %21, i8** %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %20, %2
%26 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%27 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%28 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %264
30: ; preds = %20
%31 = load i32, i32* %4
%32 = load i8**, i8*** %5
%33 = call i64 @bu_handle_version(i32 %31, i8** %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %30
store i32 0, i32* %3
br label %264
36: ; preds = %30
%37 = load i32, i32* %4
%38 = icmp slt i32 %37, 2
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i64 0
%42 = load i8*, i8** %41
%43 = call i32 @bu_missing_argument(i8* %42)
store i32 1, i32* %3
br label %264
44: ; preds = %36
%45 = bitcast [33 x i8*]* %6 to i8*
%46 = load i64, i64* @SIGABRT
%47 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %46
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %47
%48 = load i64, i64* @SIGALRM
%49 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %48
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %49
%50 = load i64, i64* @SIGBUS
%51 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %50
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %51
%52 = load i64, i64* @SIGCHLD
%53 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %52
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %53
%54 = load i64, i64* @SIGCONT
%55 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %54
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %55
%56 = load i64, i64* @SIGFPE
%57 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %56
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8** %57
%58 = load i64, i64* @SIGHUP
%59 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %58
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8** %59
%60 = load i64, i64* @SIGILL
%61 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %60
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8** %61
%62 = load i64, i64* @SIGINT
%63 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %62
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8** %63
%64 = load i64, i64* @SIGKILL
%65 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %64
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8** %65
%66 = load i64, i64* @SIGPIPE
%67 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %66
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %67
%68 = load i64, i64* @SIGQUIT
%69 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %68
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %69
%70 = load i64, i64* @SIGSEGV
%71 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %70
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8** %71
%72 = load i64, i64* @SIGSTOP
%73 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %72
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i8** %73
%74 = load i64, i64* @SIGTERM
%75 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %74
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8** %75
%76 = load i64, i64* @SIGTSTP
%77 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %76
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i8** %77
%78 = load i64, i64* @SIGTTIN
%79 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %78
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i64 0, i64 0), i8** %79
%80 = load i64, i64* @SIGTTOU
%81 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %80
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), i8** %81
%82 = load i64, i64* @SIGUSR1
%83 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %82
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0), i8** %83
%84 = load i64, i64* @SIGUSR2
%85 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %84
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i64 0, i64 0), i8** %85
%86 = load i64, i64* @SIGTRAP
%87 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %86
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0), i8** %87
%88 = load i64, i64* @SIGURG
%89 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %88
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i8** %89
%90 = load i64, i64* @SIGXCPU
%91 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %90
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.28, i64 0, i64 0), i8** %91
%92 = load i64, i64* @SIGXFSZ
%93 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %92
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i64 0, i64 0), i8** %93
store i32 -1, i32* %7
store i8* null, i8** %8
store i8* null, i8** %9
store i32 0, i32* %10
store i32 0, i32* %11
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 1
%96 = load i8*, i8** %95
%97 = call i64 @strncmp(i8* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0), i32 3)
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %114
99: ; preds = %44
%100 = load i32, i32* %4
%101 = icmp slt i32 %100, 4
br i1 %101, label %102, label %107
102: ; preds = %99
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 0
%105 = load i8*, i8** %104
%106 = call i32 @bu_missing_argument(i8* %105)
store i32 1, i32* %3
br label %264
107: ; preds = %99
store i32 1, i32* %10
%108 = load i8**, i8*** %5
%109 = getelementptr inbounds i8*, i8** %108, i64 2
%110 = load i8*, i8** %109
store i8* %110, i8** %8
%111 = load i8**, i8*** %5
%112 = getelementptr inbounds i8*, i8** %111, i64 3
%113 = load i8*, i8** %112
store i8* %113, i8** %9
br label %147
114: ; preds = %44
%115 = load i8**, i8*** %5
%116 = getelementptr inbounds i8*, i8** %115, i64 1
%117 = load i8*, i8** %116
%118 = call i64 @strncmp(i8* %117, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), i32 3)
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %121
120: ; preds = %114
store i32 1, i32* %11
br label %146
121: ; preds = %114
%122 = load i8**, i8*** %5
%123 = getelementptr inbounds i8*, i8** %122, i64 1
%124 = load i8*, i8** %123
%125 = getelementptr inbounds i8, i8* %124, i64 0
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = icmp eq i32 %127, 45
br i1 %128, label %129, label %137
129: ; preds = %121
%130 = load i8**, i8*** %5
%131 = getelementptr inbounds i8*, i8** %130, i64 1
%132 = load i8*, i8** %131
%133 = getelementptr inbounds i8, i8* %132, i64 1
store i8* %133, i8** %8
%134 = load i8**, i8*** %5
%135 = getelementptr inbounds i8*, i8** %134, i64 2
%136 = load i8*, i8** %135
store i8* %136, i8** %9
br label %145
137: ; preds = %121
%138 = load i8**, i8*** %5
%139 = getelementptr inbounds i8*, i8** %138, i64 0
%140 = load i8*, i8** %139
%141 = load i8**, i8*** %5
%142 = getelementptr inbounds i8*, i8** %141, i64 1
%143 = load i8*, i8** %142
%144 = call i32 @bu_invalid_argument(i8* %140, i8* %143)
br label %145
145: ; preds = %137, %129
br label %146
146: ; preds = %145, %120
br label %147
147: ; preds = %146, %107
%148 = load i32, i32* %11
%149 = icmp ne i32 %148, 0
br i1 %149, label %150, label %179
150: ; preds = %147
store i32 0, i32* %12
store i32 0, i32* %13
br label %151
151: ; preds = %175, %150
%152 = load i32, i32* %13
%153 = icmp slt i32 %152, 33
br i1 %153, label %154, label %178
154: ; preds = %151
%155 = load i32, i32* %13
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %156
%158 = load i8*, i8** %157
%159 = icmp ne i8* %158, null
br i1 %159, label %160, label %169
160: ; preds = %154
%161 = load i32, i32* %12
%162 = add nsw i32 %161, 1
store i32 %162, i32* %12
%163 = load i32, i32* %13
%164 = load i32, i32* %13
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %165
%167 = load i8*, i8** %166
%168 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 %163, i8* %167)
br label %169
169: ; preds = %160, %154
%170 = load i32, i32* %12
%171 = icmp sgt i32 %170, 3
br i1 %171, label %172, label %174
172: ; preds = %169
%173 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.33, i64 0, i64 0))
store i32 0, i32* %12
br label %174
174: ; preds = %172, %169
br label %175
175: ; preds = %174
%176 = load i32, i32* %13
%177 = add nsw i32 %176, 1
store i32 %177, i32* %13
br label %151
178: ; preds = %151
store i32 0, i32* %3
br label %264
179: ; preds = %147
%180 = load i8*, i8** %8
%181 = icmp ne i8* %180, null
br i1 %181, label %182, label %198
182: ; preds = %179
%183 = load i8*, i8** %8
%184 = getelementptr inbounds i8, i8* %183, i64 0
%185 = load i8, i8* %184
%186 = sext i8 %185 to i32
%187 = icmp sge i32 %186, 48
br i1 %187, label %188, label %198
188: ; preds = %182
%189 = load i8*, i8** %8
%190 = getelementptr inbounds i8, i8* %189, i64 0
%191 = load i8, i8* %190
%192 = sext i8 %191 to i32
%193 = icmp sle i32 %192, 57
br i1 %193, label %194, label %198
194: ; preds = %188
%195 = load i8*, i8** %8
%196 = call i8* @atoi(i8* %195)
%197 = ptrtoint i8* %196 to i32
store i32 %197, i32* %7
store i8* null, i8** %8
br label %198
198: ; preds = %194, %188, %182, %179
%199 = load i8*, i8** %8
%200 = icmp ne i8* %199, null
br i1 %200, label %201, label %227
201: ; preds = %198
store i32 0, i32* %14
br label %202
202: ; preds = %223, %201
%203 = load i32, i32* %14
%204 = icmp slt i32 %203, 33
br i1 %204, label %205, label %226
205: ; preds = %202
%206 = load i32, i32* %14
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %207
%209 = load i8*, i8** %208
%210 = icmp ne i8* %209, null
br i1 %210, label %211, label %222
211: ; preds = %205
%212 = load i32, i32* %14
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [33 x i8*], [33 x i8*]* %6, i64 0, i64 %213
%215 = load i8*, i8** %214
%216 = getelementptr inbounds i8, i8* %215, i64 3
%217 = load i8*, i8** %8
%218 = call i64 @strcmp(i8* %216, i8* %217)
%219 = icmp eq i64 %218, 0
br i1 %219, label %220, label %222
220: ; preds = %211
%221 = load i32, i32* %14
store i32 %221, i32* %7
br label %222
222: ; preds = %220, %211, %205
br label %223
223: ; preds = %222
%224 = load i32, i32* %14
%225 = add nsw i32 %224, 1
store i32 %225, i32* %14
br label %202
226: ; preds = %202
br label %227
227: ; preds = %226, %198
%228 = load i8*, i8** %8
%229 = icmp ne i8* %228, null
br i1 %229, label %230, label %246
230: ; preds = %227
%231 = load i32, i32* %7
%232 = icmp eq i32 %231, -1
br i1 %232, label %233, label %246
233: ; preds = %230
%234 = load i8**, i8*** %5
%235 = getelementptr inbounds i8*, i8** %234, i64 0
%236 = load i8*, i8** %235
%237 = load i32, i32* @stderr
%238 = call i32 @fputs(i8* %236, i32 %237)
%239 = load i32, i32* @stderr
%240 = call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.34, i64 0, i64 0), i32 %239)
%241 = load i8*, i8** %8
%242 = load i32, i32* @stderr
%243 = call i32 @fputs(i8* %241, i32 %242)
%244 = load i32, i32* @stderr
%245 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0), i32 %244)
br label %246
246: ; preds = %233, %230, %227
store i32 -1, i32* %15
%247 = load i8*, i8** %9
%248 = icmp ne i8* %247, null
br i1 %248, label %249, label %253
249: ; preds = %246
%250 = load i8*, i8** %9
%251 = call i8* @atoi(i8* %250)
%252 = ptrtoint i8* %251 to i32
store i32 %252, i32* %15
br label %253
253: ; preds = %249, %246
%254 = load i32, i32* %15
%255 = load i32, i32* %7
%256 = call i32 @kill(i32 %254, i32 %255)
%257 = icmp eq i32 %256, -1
br i1 %257, label %258, label %263
258: ; preds = %253
%259 = load i8**, i8*** %5
%260 = getelementptr inbounds i8*, i8** %259, i64 0
%261 = load i8*, i8** %260
%262 = call i32 @perror(i8* %261)
br label %263
263: ; preds = %258, %253
store i32 0, i32* %3
br label %264
264: ; preds = %263, %178, %102, %39, %35, %25
%265 = load i32, i32* %3
ret i32 %265
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
@.str.2 = [34 x i8] c"Usage: kill -s SIGNAL_NAME PID...\00"
@.str.3 = [29 x i8] c" kill -l [EXIT_STATUS]\00"
@.str.4 = [34 x i8] c" kill [-SIGNAL_NAME] PID...\00"
@.str.5 = [36 x i8] c" kill [-SIGNAL_NUMBER] PID...\00"
@.str.6 = [8 x i8] c"SIGABRT\00"
@SIGABRT = global i64 0
@.str.7 = [8 x i8] c"SIGALRM\00"
@SIGALRM = global i64 0
@.str.8 = [7 x i8] c"SIGBUS\00"
@SIGBUS = global i64 0
@.str.9 = [8 x i8] c"SIGCHLD\00"
@SIGCHLD = global i64 0
@.str.10 = [8 x i8] c"SIGCONT\00"
@SIGCONT = global i64 0
@.str.11 = [7 x i8] c"SIGFPE\00"
@SIGFPE = global i64 0
@.str.12 = [7 x i8] c"SIGHUP\00"
@SIGHUP = global i64 0
@.str.13 = [7 x i8] c"SIGILL\00"
@SIGILL = global i64 0
@.str.14 = [7 x i8] c"SIGINT\00"
@SIGINT = global i64 0
@.str.15 = [8 x i8] c"SIGKILL\00"
@SIGKILL = global i64 0
@.str.16 = [8 x i8] c"SIGPIPE\00"
@SIGPIPE = global i64 0
@.str.17 = [8 x i8] c"SIGQUIT\00"
@SIGQUIT = global i64 0
@.str.18 = [8 x i8] c"SIGSEGV\00"
@SIGSEGV = global i64 0
@.str.19 = [8 x i8] c"SIGSTOP\00"
@SIGSTOP = global i64 0
@.str.20 = [8 x i8] c"SIGTERM\00"
@SIGTERM = global i64 0
@.str.21 = [8 x i8] c"SIGTSTP\00"
@SIGTSTP = global i64 0
@.str.22 = [8 x i8] c"SIGTTIN\00"
@SIGTTIN = global i64 0
@.str.23 = [8 x i8] c"SIGTTOU\00"
@SIGTTOU = global i64 0
@.str.24 = [8 x i8] c"SIGUSR1\00"
@SIGUSR1 = global i64 0
@.str.25 = [8 x i8] c"SIGUSR2\00"
@SIGUSR2 = global i64 0
@.str.26 = [8 x i8] c"SIGTRAP\00"
@SIGTRAP = global i64 0
@.str.27 = [7 x i8] c"SIGURG\00"
@SIGURG = global i64 0
@.str.28 = [8 x i8] c"SIGXCPU\00"
@SIGXCPU = global i64 0
@.str.29 = [8 x i8] c"SIGXFSZ\00"
@SIGXFSZ = global i64 0
@.str.30 = [3 x i8] c"-s\00"
@.str.31 = [3 x i8] c"-l\00"
@.str.32 = [8 x i8] c"%i) %s\09\00"
@stderr = global i32 0
@.str.34 = [19 x i8] c": Unknown signal: \00"
@.str.35 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [33 x i8*]
%4 = tail call i64 @has_arg(i32 %0, i8** %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i64 @has_arg(i32 %0, i8** %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6, %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
br label %175
14: ; preds = %6
%15 = tail call i64 @bu_handle_version(i32 %0, i8** %1)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %175
17: ; preds = %14
%18 = icmp slt i32 %0, 2
br i1 %18, label %19, label %22
19: ; preds = %17
%20 = load i8*, i8** %1
%21 = tail call i32 @bu_missing_argument(i8* %20)
br label %175
22: ; preds = %17
%23 = bitcast [33 x i8*]* %3 to i8*
%24 = load i64, i64* @SIGABRT
%25 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %24
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8** %25
%26 = load i64, i64* @SIGALRM
%27 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %26
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %27
%28 = load i64, i64* @SIGBUS
%29 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %28
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8** %29
%30 = load i64, i64* @SIGCHLD
%31 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %30
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %31
%32 = load i64, i64* @SIGCONT
%33 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %32
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %33
%34 = load i64, i64* @SIGFPE
%35 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %34
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8** %35
%36 = load i64, i64* @SIGHUP
%37 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %36
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8** %37
%38 = load i64, i64* @SIGILL
%39 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %38
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8** %39
%40 = load i64, i64* @SIGINT
%41 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %40
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8** %41
%42 = load i64, i64* @SIGKILL
%43 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %42
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i8** %43
%44 = load i64, i64* @SIGPIPE
%45 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %44
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i8** %45
%46 = load i64, i64* @SIGQUIT
%47 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %46
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8** %47
%48 = load i64, i64* @SIGSEGV
%49 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %48
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8** %49
%50 = load i64, i64* @SIGSTOP
%51 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %50
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i8** %51
%52 = load i64, i64* @SIGTERM
%53 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %52
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8** %53
%54 = load i64, i64* @SIGTSTP
%55 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %54
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i8** %55
%56 = load i64, i64* @SIGTTIN
%57 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %56
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i64 0, i64 0), i8** %57
%58 = load i64, i64* @SIGTTOU
%59 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %58
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), i8** %59
%60 = load i64, i64* @SIGUSR1
%61 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %60
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i64 0, i64 0), i8** %61
%62 = load i64, i64* @SIGUSR2
%63 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %62
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.25, i64 0, i64 0), i8** %63
%64 = load i64, i64* @SIGTRAP
%65 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %64
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.26, i64 0, i64 0), i8** %65
%66 = load i64, i64* @SIGURG
%67 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %66
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.27, i64 0, i64 0), i8** %67
%68 = load i64, i64* @SIGXCPU
%69 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %68
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.28, i64 0, i64 0), i8** %69
%70 = load i64, i64* @SIGXFSZ
%71 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %70
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.29, i64 0, i64 0), i8** %71
%72 = getelementptr inbounds i8*, i8** %1, i64 1
%73 = load i8*, i8** %72
%74 = tail call i64 @strncmp(i8* %73, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.30, i64 0, i64 0), i32 3)
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %81
76: ; preds = %22
%77 = icmp ult i32 %0, 4
br i1 %77, label %78, label %113
78: ; preds = %76
%79 = load i8*, i8** %1
%80 = tail call i32 @bu_missing_argument(i8* %79)
br label %173
81: ; preds = %22
%82 = load i8*, i8** %72
%83 = tail call i64 @strncmp(i8* %82, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0), i32 3)
%84 = icmp eq i64 %83, 0
br i1 %84, label %96, label %85
85: ; preds = %81
%86 = load i8*, i8** %72
%87 = load i8, i8* %86
%88 = icmp eq i8 %87, 45
br i1 %88, label %89, label %93
89: ; preds = %85
%90 = getelementptr inbounds i8, i8* %86, i64 1
%91 = getelementptr inbounds i8*, i8** %1, i64 2
%92 = load i8*, i8** %91
br label %119
93: ; preds = %85
%94 = load i8*, i8** %1
%95 = tail call i32 @bu_invalid_argument(i8* %94, i8* %86)
br label %165
96: ; preds = %81, %109
%97 = phi i64 [ %111, %109 ], [ 0, %81 ]
%98 = phi i32 [ %110, %109 ], [ 0, %81 ]
%99 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %97
%100 = load i8*, i8** %99
%101 = icmp eq i8* %100, null
br i1 %101, label %109, label %102
102: ; preds = %96
%103 = add nsw i32 %98, 1
%104 = trunc i64 %97 to i32
%105 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.32, i64 0, i64 0), i32 %104, i8* %100)
%106 = icmp sgt i32 %98, 2
br i1 %106, label %107, label %109
107: ; preds = %102
%108 = tail call i32 @putchar(i32 10)
br label %109
109: ; preds = %96, %102, %107
%110 = phi i32 [ 0, %107 ], [ %103, %102 ], [ %98, %96 ]
%111 = add nuw nsw i64 %97, 1
%112 = icmp eq i64 %111, 33
br i1 %112, label %173, label %96
113: ; preds = %76
%114 = getelementptr inbounds i8*, i8** %1, i64 2
%115 = load i8*, i8** %114
%116 = getelementptr inbounds i8*, i8** %1, i64 3
%117 = load i8*, i8** %116
%118 = icmp eq i8* %115, null
br i1 %118, label %157, label %119
119: ; preds = %89, %113
%120 = phi i8* [ %92, %89 ], [ %117, %113 ]
%121 = phi i8* [ %90, %89 ], [ %115, %113 ]
%122 = load i8, i8* %121
%123 = add i8 %122, -48
%124 = icmp ult i8 %123, 10
br i1 %124, label %125, label %129
125: ; preds = %119
%126 = tail call i8* @atoi(i8* %121)
%127 = ptrtoint i8* %126 to i64
%128 = trunc i64 %127 to i32
br label %157
129: ; preds = %119, %141
%130 = phi i64 [ %143, %141 ], [ 0, %119 ]
%131 = phi i32 [ %142, %141 ], [ -1, %119 ]
%132 = getelementptr inbounds [33 x i8*], [33 x i8*]* %3, i64 0, i64 %130
%133 = load i8*, i8** %132
%134 = icmp eq i8* %133, null
br i1 %134, label %141, label %135
135: ; preds = %129
%136 = getelementptr inbounds i8, i8* %133, i64 3
%137 = tail call i64 @strcmp(i8* %136, i8* %121)
%138 = icmp eq i64 %137, 0
%139 = trunc i64 %130 to i32
%140 = select i1 %138, i32 %139, i32 %131
br label %141
141: ; preds = %135, %129
%142 = phi i32 [ %131, %129 ], [ %140, %135 ]
%143 = add nuw nsw i64 %130, 1
%144 = icmp eq i64 %143, 33
br i1 %144, label %145, label %129
145: ; preds = %141
%146 = icmp eq i32 %142, -1
br i1 %146, label %147, label %157
147: ; preds = %145
%148 = load i8*, i8** %1
%149 = load i32, i32* @stderr
%150 = tail call i32 @fputs(i8* %148, i32 %149)
%151 = load i32, i32* @stderr
%152 = tail call i32 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.34, i64 0, i64 0), i32 %151)
%153 = load i32, i32* @stderr
%154 = tail call i32 @fputs(i8* %121, i32 %153)
%155 = load i32, i32* @stderr
%156 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0), i32 %155)
br label %157
157: ; preds = %125, %113, %147, %145
%158 = phi i32 [ -1, %147 ], [ %142, %145 ], [ -1, %113 ], [ %128, %125 ]
%159 = phi i8* [ %120, %147 ], [ %120, %145 ], [ %117, %113 ], [ %120, %125 ]
%160 = icmp eq i8* %159, null
br i1 %160, label %165, label %161
161: ; preds = %157
%162 = tail call i8* @atoi(i8* %159)
%163 = ptrtoint i8* %162 to i64
%164 = trunc i64 %163 to i32
br label %165
165: ; preds = %93, %161, %157
%166 = phi i32 [ %158, %161 ], [ %158, %157 ], [ -1, %93 ]
%167 = phi i32 [ %164, %161 ], [ -1, %157 ], [ -1, %93 ]
%168 = tail call i32 @kill(i32 %167, i32 %166)
%169 = icmp eq i32 %168, -1
br i1 %169, label %170, label %173
170: ; preds = %165
%171 = load i8*, i8** %1
%172 = tail call i32 @perror(i8* %171)
br label %173
173: ; preds = %109, %165, %170, %78
%174 = phi i32 [ 1, %78 ], [ 0, %170 ], [ 0, %165 ], [ 0, %109 ]
br label %175
175: ; preds = %14, %173, %19, %9
%176 = phi i32 [ 1, %9 ], [ 1, %19 ], [ %174, %173 ], [ 0, %14 ]
ret i32 %176
}