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

/* Variables and functions */
int SIGTERM;
int /*<<< orphan*/ display_kill_version();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *const);
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
int /*<<< orphan*/ kill_usage();
int /*<<< orphan*/ pretty_print_signals();
int print_given_signals(int, char const *const *, int);
int signal_name_to_number(char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char const *const, char *);
long strtol(char const *const, char **, int);
int /*<<< orphan*/ unix_print_signals();
void kill_main(int argc, const char *restrict const *restrict argv) {
  const char *sigptr;
  int signo = SIGTERM;
  int exitvalue = 0;
  if (argc < 2)
    kill_usage();
  if (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")) {
    display_kill_version();
    exit(0);
  }
  if (argv[1][0] != '-') {
    argv++;
    argc--;
    goto no_more_args;
  }
  if (argv[1][1] == 'l' && argv[1][2] == '\0') {
    if (argc == 2) {
      unix_print_signals();
      exit(0);
    }
    if (argc > 128 || argv[2][0] == '-')
      kill_usage();
    exit(print_given_signals(argc - 2, argv + 2, 80));
  }
  if (argv[1][1] == 'L' && argv[1][2] == '\0') {
    if (argc == 2) {
      pretty_print_signals();
      exit(0);
    }
    kill_usage();
  }
  if (argv[1][1] == '-' && argv[1][2] == '\0') {
    argv += 2;
    argc -= 2;
    goto no_more_args;
  }
  if (argv[1][1] == '-')
    kill_usage();
  if (argv[1][2] == '\0' && (argv[1][1] == 's' || argv[1][1] == 'n')) {
    sigptr = argv[2];
    argv += 3;
    argc -= 3;
  } else {
    sigptr = argv[1] + 1;
    argv += 2;
    argc -= 2;
  }
  signo = signal_name_to_number(sigptr);
  if (signo < 0) {
    fprintf(stderr, "ERROR: unknown signal name \"%s\".\n", sigptr);
    kill_usage();
  }
no_more_args:
  if (!argc)
    kill_usage();
  while (argc--) {
    long pid;
    char *endp;
    pid = strtol(argv[argc], &endp, 10);
    if (!*endp) {
      if (!kill((pid_t)pid, signo))
        continue;
      exitvalue = 1;
      continue;
    }
    fprintf(stderr, "ERROR: garbage process ID \"%s\".\n", argv[argc]);
    kill_usage();
  }
  exit(exitvalue);
}


x86 assembly (clang, -O0):
<kill_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e22(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    11e3 <kill_main+0x33>
mov    $0x0,%al
call   1050 <kill_usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     121d <kill_main+0x6d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    122b <kill_main+0x7b>
mov    $0x0,%al
call   1030 <display_kill_version@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1259 <kill_main+0xa9>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1450 <kill_main+0x2a0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    12e2 <kill_main+0x132>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    12e2 <kill_main+0x132>
cmpl   $0x2,-0x4(%rbp)
jne    129b <kill_main+0xeb>
mov    $0x0,%al
call   10d0 <unix_print_signals@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
cmpl   $0x80,-0x4(%rbp)
jg     12bc <kill_main+0x10c>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    12c3 <kill_main+0x113>
mov    $0x0,%al
call   1050 <kill_usage@plt>
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
mov    $0x50,%edx
call   10a0 <print_given_signals@plt>
mov    %eax,%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x4c,%eax
jne    132b <kill_main+0x17b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    132b <kill_main+0x17b>
cmpl   $0x2,-0x4(%rbp)
jne    1324 <kill_main+0x174>
mov    $0x0,%al
call   10b0 <pretty_print_signals@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
mov    $0x0,%al
call   1050 <kill_usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    136f <kill_main+0x1bf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    136f <kill_main+0x1bf>
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    1450 <kill_main+0x2a0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    138b <kill_main+0x1db>
mov    $0x0,%al
call   1050 <kill_usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x0,%eax
jne    13f0 <kill_main+0x240>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x73,%eax
je     13ca <kill_main+0x21a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6e,%eax
jne    13f0 <kill_main+0x240>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    1415 <kill_main+0x265>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <signal_name_to_number@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    144b <kill_main+0x29b>
mov    0x2ba6(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xbce(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1050 <kill_usage@plt>
jmp    1450 <kill_main+0x2a0>
cmpl   $0x0,-0x4(%rbp)
jne    1461 <kill_main+0x2b1>
mov    $0x0,%al
call   1050 <kill_usage@plt>
jmp    1466 <kill_main+0x2b6>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     14fa <kill_main+0x34a>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x30(%rbp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
cmpb   $0x0,(%rax)
jne    14cd <kill_main+0x31d>
mov    -0x28(%rbp),%rax
mov    %eax,%edi
mov    -0x1c(%rbp),%esi
call   1090 <kill@plt>
cmp    $0x0,%eax
jne    14c1 <kill_main+0x311>
jmp    1466 <kill_main+0x2b6>
movl   $0x1,-0x20(%rbp)
jmp    1466 <kill_main+0x2b6>
mov    0x2b04(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xb46(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1050 <kill_usage@plt>
jmp    1466 <kill_main+0x2b6>
mov    -0x20(%rbp),%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<kill_main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %edi,%r12d
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
cmp    $0x1,%edi
jg     11dd <kill_main+0x2d>
xor    %eax,%eax
call   1050 <kill_usage@plt>
mov    0x8(%r14),%rbx
lea    0xe18(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1207 <kill_main+0x57>
lea    0xe08(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
jne    1215 <kill_main+0x65>
xor    %eax,%eax
call   1030 <display_kill_version@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
cmpb   $0x2d,(%rbx)
jne    124b <kill_main+0x9b>
lea    0x1(%rbx),%rbp
mov    0x1(%rbx),%al
cmp    $0x4c,%al
je     125b <kill_main+0xab>
cmp    $0x6c,%al
jne    12b5 <kill_main+0x105>
cmpb   $0x0,0x2(%rbx)
jne    12d3 <kill_main+0x123>
cmp    $0x2,%r12d
jne    1275 <kill_main+0xc5>
xor    %eax,%eax
call   10d0 <unix_print_signals@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
add    $0x8,%r14
add    $0xffffffff,%r12d
mov    %r12d,%r15d
jmp    1336 <kill_main+0x186>
cmpb   $0x0,0x2(%rbx)
jne    12d3 <kill_main+0x123>
xor    %eax,%eax
cmp    $0x2,%r12d
jne    12ad <kill_main+0xfd>
call   10b0 <pretty_print_signals@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
cmp    $0x80,%r12d
jg     1287 <kill_main+0xd7>
mov    0x10(%r14),%rax
cmpb   $0x2d,(%rax)
jne    128e <kill_main+0xde>
xor    %eax,%eax
call   1050 <kill_usage@plt>
add    $0xfffffffe,%r12d
add    $0x10,%r14
mov    %r12d,%edi
mov    %r14,%rsi
mov    $0x50,%edx
call   10a0 <print_given_signals@plt>
mov    %eax,%edi
call   10c0 <exit@plt>
call   1050 <kill_usage@plt>
mov    0x0(%rbp),%al
cmp    $0x2d,%al
jne    12d3 <kill_main+0x123>
cmpb   $0x0,0x2(%rbx)
jne    12cc <kill_main+0x11c>
add    $0x10,%r14
add    $0xfffffffe,%r12d
mov    %r12d,%r15d
jmp    1336 <kill_main+0x186>
xor    %eax,%eax
call   1050 <kill_usage@plt>
mov    $0xfffffffe,%r15d
mov    $0x2,%eax
cmpb   $0x0,0x2(%rbx)
jne    1300 <kill_main+0x150>
mov    0x0(%rbp),%cl
cmp    $0x73,%cl
je     12f1 <kill_main+0x141>
cmp    $0x6e,%cl
jne    1300 <kill_main+0x150>
mov    0x10(%r14),%rbp
mov    $0xfffffffd,%r15d
mov    $0x3,%eax
lea    (%r14,%rax,8),%r14
add    %r12d,%r15d
mov    %rbp,%rdi
call   1040 <signal_name_to_number@plt>
mov    %eax,0xc(%rsp)
test   %eax,%eax
jns    1336 <kill_main+0x186>
mov    0x2cba(%rip),%rax
mov    (%rax),%edi
lea    0xce6(%rip),%rsi
mov    %rbp,%rdx
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1050 <kill_usage@plt>
test   %r15d,%r15d
jne    134b <kill_main+0x19b>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <kill_usage@plt>
mov    %ebx,%edi
call   10c0 <exit@plt>
movslq %r15d,%rax
lea    (%r14,%rax,8),%rbp
add    $0xfffffffffffffff8,%rbp
neg    %r15d
lea    0x10(%rsp),%r12
lea    0xcca(%rip),%r14
xor    %r13d,%r13d
xor    %ebx,%ebx
jmp    1396 <kill_main+0x1e6>
nopl   0x0(%rax)
mov    0x2c61(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp,%r13,8),%rdx
mov    %r14,%rsi
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1050 <kill_usage@plt>
add    $0xffffffffffffffff,%r13
cmp    %r13d,%r15d
je     13c9 <kill_main+0x219>
mov    0x0(%rbp,%r13,8),%rdi
mov    %r12,%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    0x10(%rsp),%rcx
cmpb   $0x0,(%rcx)
jne    1370 <kill_main+0x1c0>
mov    %eax,%edi
mov    0xc(%rsp),%esi
call   1090 <kill@plt>
test   %eax,%eax
mov    $0x1,%eax
cmovne %eax,%ebx
jmp    138d <kill_main+0x1dd>
mov    %ebx,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@SIGTERM = global i32 0
@.str = [3 x i8] c"-V\00"
@.str.1 = [10 x i8] c"--version\00"
@stderr = global i32 0
@.str.2 = [34 x i8] c"ERROR: unknown signal name \22%s\22.\0A\00"
@.str.3 = [33 x i8] c"ERROR: garbage process ID \22%s\22.\0A\00"
define void @kill_main(i32 %0, i8** noalias %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%10 = load i32, i32* @SIGTERM
store i32 %10, i32* %6
store i32 0, i32* %7
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (...) @kill_usage()
br label %15
15: ; preds = %13, %2
%16 = load i8**, i8*** %4
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @strcmp(i8* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %15
%22 = load i8**, i8*** %4
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %21, %15
%28 = call i32 (...) @display_kill_version()
%29 = call i32 @exit(i32 0)
unreachable
30: ; preds = %21
%31 = load i8**, i8*** %4
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = getelementptr inbounds i8, i8* %33, i64 0
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %36, 45
br i1 %37, label %38, label %43
38: ; preds = %30
%39 = load i8**, i8*** %4
%40 = getelementptr inbounds i8*, i8** %39, i32 1
store i8** %40, i8*** %4
%41 = load i32, i32* %3
%42 = add nsw i32 %41, -1
store i32 %42, i32* %3
br label %192
43: ; preds = %30
%44 = load i8**, i8*** %4
%45 = getelementptr inbounds i8*, i8** %44, i64 1
%46 = load i8*, i8** %45
%47 = getelementptr inbounds i8, i8* %46, i64 1
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 108
br i1 %50, label %51, label %85
51: ; preds = %43
%52 = load i8**, i8*** %4
%53 = getelementptr inbounds i8*, i8** %52, i64 1
%54 = load i8*, i8** %53
%55 = getelementptr inbounds i8, i8* %54, i64 2
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %85
59: ; preds = %51
%60 = load i32, i32* %3
%61 = icmp eq i32 %60, 2
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = call i32 (...) @unix_print_signals()
%64 = call i32 @exit(i32 0)
unreachable
65: ; preds = %59
%66 = load i32, i32* %3
%67 = icmp sgt i32 %66, 128
br i1 %67, label %76, label %68
68: ; preds = %65
%69 = load i8**, i8*** %4
%70 = getelementptr inbounds i8*, i8** %69, i64 2
%71 = load i8*, i8** %70
%72 = getelementptr inbounds i8, i8* %71, i64 0
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 45
br i1 %75, label %76, label %78
76: ; preds = %68, %65
%77 = call i32 (...) @kill_usage()
br label %78
78: ; preds = %76, %68
%79 = load i32, i32* %3
%80 = sub nsw i32 %79, 2
%81 = load i8**, i8*** %4
%82 = getelementptr inbounds i8*, i8** %81, i64 2
%83 = call i32 @print_given_signals(i32 %80, i8** %82, i32 80)
%84 = call i32 @exit(i32 %83)
unreachable
85: ; preds = %51, %43
%86 = load i8**, i8*** %4
%87 = getelementptr inbounds i8*, i8** %86, i64 1
%88 = load i8*, i8** %87
%89 = getelementptr inbounds i8, i8* %88, i64 1
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 76
br i1 %92, label %93, label %109
93: ; preds = %85
%94 = load i8**, i8*** %4
%95 = getelementptr inbounds i8*, i8** %94, i64 1
%96 = load i8*, i8** %95
%97 = getelementptr inbounds i8, i8* %96, i64 2
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %109
101: ; preds = %93
%102 = load i32, i32* %3
%103 = icmp eq i32 %102, 2
br i1 %103, label %104, label %107
104: ; preds = %101
%105 = call i32 (...) @pretty_print_signals()
%106 = call i32 @exit(i32 0)
unreachable
107: ; preds = %101
%108 = call i32 (...) @kill_usage()
br label %109
109: ; preds = %107, %93, %85
%110 = load i8**, i8*** %4
%111 = getelementptr inbounds i8*, i8** %110, i64 1
%112 = load i8*, i8** %111
%113 = getelementptr inbounds i8, i8* %112, i64 1
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 45
br i1 %116, label %117, label %130
117: ; preds = %109
%118 = load i8**, i8*** %4
%119 = getelementptr inbounds i8*, i8** %118, i64 1
%120 = load i8*, i8** %119
%121 = getelementptr inbounds i8, i8* %120, i64 2
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %130
125: ; preds = %117
%126 = load i8**, i8*** %4
%127 = getelementptr inbounds i8*, i8** %126, i64 2
store i8** %127, i8*** %4
%128 = load i32, i32* %3
%129 = sub nsw i32 %128, 2
store i32 %129, i32* %3
br label %192
130: ; preds = %117, %109
%131 = load i8**, i8*** %4
%132 = getelementptr inbounds i8*, i8** %131, i64 1
%133 = load i8*, i8** %132
%134 = getelementptr inbounds i8, i8* %133, i64 1
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 45
br i1 %137, label %138, label %140
138: ; preds = %130
%139 = call i32 (...) @kill_usage()
br label %140
140: ; preds = %138, %130
%141 = load i8**, i8*** %4
%142 = getelementptr inbounds i8*, i8** %141, i64 1
%143 = load i8*, i8** %142
%144 = getelementptr inbounds i8, i8* %143, i64 2
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 0
br i1 %147, label %148, label %172
148: ; preds = %140
%149 = load i8**, i8*** %4
%150 = getelementptr inbounds i8*, i8** %149, i64 1
%151 = load i8*, i8** %150
%152 = getelementptr inbounds i8, i8* %151, i64 1
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = icmp eq i32 %154, 115
br i1 %155, label %164, label %156
156: ; preds = %148
%157 = load i8**, i8*** %4
%158 = getelementptr inbounds i8*, i8** %157, i64 1
%159 = load i8*, i8** %158
%160 = getelementptr inbounds i8, i8* %159, i64 1
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = icmp eq i32 %162, 110
br i1 %163, label %164, label %172
164: ; preds = %156, %148
%165 = load i8**, i8*** %4
%166 = getelementptr inbounds i8*, i8** %165, i64 2
%167 = load i8*, i8** %166
store i8* %167, i8** %5
%168 = load i8**, i8*** %4
%169 = getelementptr inbounds i8*, i8** %168, i64 3
store i8** %169, i8*** %4
%170 = load i32, i32* %3
%171 = sub nsw i32 %170, 3
store i32 %171, i32* %3
br label %181
172: ; preds = %156, %140
%173 = load i8**, i8*** %4
%174 = getelementptr inbounds i8*, i8** %173, i64 1
%175 = load i8*, i8** %174
%176 = getelementptr inbounds i8, i8* %175, i64 1
store i8* %176, i8** %5
%177 = load i8**, i8*** %4
%178 = getelementptr inbounds i8*, i8** %177, i64 2
store i8** %178, i8*** %4
%179 = load i32, i32* %3
%180 = sub nsw i32 %179, 2
store i32 %180, i32* %3
br label %181
181: ; preds = %172, %164
%182 = load i8*, i8** %5
%183 = call i32 @signal_name_to_number(i8* %182)
store i32 %183, i32* %6
%184 = load i32, i32* %6
%185 = icmp slt i32 %184, 0
br i1 %185, label %186, label %191
186: ; preds = %181
%187 = load i32, i32* @stderr
%188 = load i8*, i8** %5
%189 = call i32 @fprintf(i32 %187, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %188)
%190 = call i32 (...) @kill_usage()
br label %191
191: ; preds = %186, %181
br label %192
192: ; preds = %191, %125, %38
%193 = load i32, i32* %3
%194 = icmp ne i32 %193, 0
br i1 %194, label %197, label %195
195: ; preds = %192
%196 = call i32 (...) @kill_usage()
br label %197
197: ; preds = %195, %192
br label %198
198: ; preds = %220, %219, %218, %197
%199 = load i32, i32* %3
%200 = add nsw i32 %199, -1
store i32 %200, i32* %3
%201 = icmp ne i32 %199, 0
br i1 %201, label %202, label %229
202: ; preds = %198
%203 = load i8**, i8*** %4
%204 = load i32, i32* %3
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i8*, i8** %203, i64 %205
%207 = load i8*, i8** %206
%208 = call i64 @strtol(i8* %207, i8** %9, i32 10)
store i64 %208, i64* %8
%209 = load i8*, i8** %9
%210 = load i8, i8* %209
%211 = icmp ne i8 %210, 0
br i1 %211, label %220, label %212
212: ; preds = %202
%213 = load i64, i64* %8
%214 = trunc i64 %213 to i32
%215 = load i32, i32* %6
%216 = call i32 @kill(i32 %214, i32 %215)
%217 = icmp ne i32 %216, 0
br i1 %217, label %219, label %218
218: ; preds = %212
br label %198
219: ; preds = %212
store i32 1, i32* %7
br label %198
220: ; preds = %202
%221 = load i32, i32* @stderr
%222 = load i8**, i8*** %4
%223 = load i32, i32* %3
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds i8*, i8** %222, i64 %224
%226 = load i8*, i8** %225
%227 = call i32 @fprintf(i32 %221, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %226)
%228 = call i32 (...) @kill_usage()
br label %198
229: ; preds = %198
%230 = load i32, i32* %7
%231 = call i32 @exit(i32 %230)
unreachable
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@.str = [3 x i8] c"-V\00"
@.str.1 = [10 x i8] c"--version\00"
@stderr = global i32 0
@.str.2 = [34 x i8] c"ERROR: unknown signal name \22%s\22.\0A\00"
@.str.3 = [33 x i8] c"ERROR: garbage process ID \22%s\22.\0A\00"
define void @kill_main(i32 %0, i8** noalias %1) {
%3 = alloca i8*
%4 = load i32, i32* @SIGTERM
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @kill_usage()
br label %8
8: ; preds = %6, %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13, %8
%17 = tail call i32 (...) @display_kill_version()
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %13
%20 = load i8, i8* %10
%21 = icmp eq i8 %20, 45
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = add nsw i32 %0, -1
br label %95
24: ; preds = %19
%25 = getelementptr inbounds i8, i8* %10, i64 1
%26 = load i8, i8* %25
switch i8 %26, label %62 [
i8 108, label %27
i8 76, label %50
]
27: ; preds = %24
%28 = getelementptr inbounds i8, i8* %10, i64 2
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 0
br i1 %30, label %31, label %74
31: ; preds = %27
%32 = icmp eq i32 %0, 2
br i1 %32, label %33, label %36
33: ; preds = %31
%34 = tail call i32 (...) @unix_print_signals()
%35 = tail call i32 @exit(i32 0)
unreachable
36: ; preds = %31
%37 = icmp sgt i32 %0, 128
br i1 %37, label %43, label %38
38: ; preds = %36
%39 = getelementptr inbounds i8*, i8** %1, i64 2
%40 = load i8*, i8** %39
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 45
br i1 %42, label %43, label %45
43: ; preds = %38, %36
%44 = tail call i32 (...) @kill_usage()
br label %45
45: ; preds = %43, %38
%46 = add nsw i32 %0, -2
%47 = getelementptr inbounds i8*, i8** %1, i64 2
%48 = tail call i32 @print_given_signals(i32 %46, i8** %47, i32 80)
%49 = tail call i32 @exit(i32 %48)
unreachable
50: ; preds = %24
%51 = getelementptr inbounds i8, i8* %10, i64 2
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 0
br i1 %53, label %54, label %74
54: ; preds = %50
%55 = icmp eq i32 %0, 2
br i1 %55, label %56, label %59
56: ; preds = %54
%57 = tail call i32 (...) @pretty_print_signals()
%58 = tail call i32 @exit(i32 0)
unreachable
59: ; preds = %54
%60 = tail call i32 (...) @kill_usage()
%61 = load i8, i8* %25
br label %62
62: ; preds = %24, %59
%63 = phi i8 [ %26, %24 ], [ %61, %59 ]
%64 = icmp eq i8 %63, 45
br i1 %64, label %65, label %74
65: ; preds = %62
%66 = getelementptr inbounds i8, i8* %10, i64 2
%67 = load i8, i8* %66
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = getelementptr inbounds i8*, i8** %1, i64 2
%71 = add nsw i32 %0, -2
br label %95
72: ; preds = %65
%73 = tail call i32 (...) @kill_usage()
br label %74
74: ; preds = %50, %27, %62, %72
%75 = getelementptr inbounds i8, i8* %10, i64 2
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 0
br i1 %77, label %78, label %83
78: ; preds = %74
%79 = load i8, i8* %25
switch i8 %79, label %83 [
i8 115, label %80
i8 110, label %80
]
80: ; preds = %78, %78
%81 = getelementptr inbounds i8*, i8** %1, i64 2
%82 = load i8*, i8** %81
br label %83
83: ; preds = %74, %78, %80
%84 = phi i64 [ 3, %80 ], [ 2, %78 ], [ 2, %74 ]
%85 = phi i32 [ -3, %80 ], [ -2, %78 ], [ -2, %74 ]
%86 = phi i8* [ %82, %80 ], [ %25, %78 ], [ %25, %74 ]
%87 = getelementptr inbounds i8*, i8** %1, i64 %84
%88 = add nsw i32 %85, %0
%89 = tail call i32 @signal_name_to_number(i8* %86)
%90 = icmp slt i32 %89, 0
br i1 %90, label %91, label %95
91: ; preds = %83
%92 = load i32, i32* @stderr
%93 = tail call i32 @fprintf(i32 %92, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %86)
%94 = tail call i32 (...) @kill_usage()
br label %95
95: ; preds = %83, %91, %69, %22
%96 = phi i8** [ %9, %22 ], [ %70, %69 ], [ %87, %91 ], [ %87, %83 ]
%97 = phi i32 [ %4, %22 ], [ %4, %69 ], [ %89, %91 ], [ %89, %83 ]
%98 = phi i32 [ %23, %22 ], [ %71, %69 ], [ %88, %91 ], [ %88, %83 ]
%99 = icmp eq i32 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %95
%101 = tail call i32 (...) @kill_usage()
br label %129
102: ; preds = %95
%103 = bitcast i8** %3 to i8*
%104 = sext i32 %98 to i64
br label %105
105: ; preds = %102, %125
%106 = phi i64 [ %104, %102 ], [ %108, %125 ]
%107 = phi i32 [ 0, %102 ], [ %126, %125 ]
%108 = add nsw i64 %106, -1
%109 = getelementptr inbounds i8*, i8** %96, i64 %108
%110 = load i8*, i8** %109
%111 = call i64 @strtol(i8* %110, i8** %3, i32 10)
%112 = load i8*, i8** %3
%113 = load i8, i8* %112
%114 = icmp eq i8 %113, 0
br i1 %114, label %115, label %120
115: ; preds = %105
%116 = trunc i64 %111 to i32
%117 = tail call i32 @kill(i32 %116, i32 %97)
%118 = icmp eq i32 %117, 0
%119 = select i1 %118, i32 %107, i32 1
br label %125
120: ; preds = %105
%121 = load i32, i32* @stderr
%122 = load i8*, i8** %109
%123 = tail call i32 @fprintf(i32 %121, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %122)
%124 = tail call i32 (...) @kill_usage()
br label %125
125: ; preds = %115, %120
%126 = phi i32 [ %107, %120 ], [ %119, %115 ]
%127 = trunc i64 %108 to i32
%128 = icmp eq i32 %127, 0
br i1 %128, label %129, label %105
129: ; preds = %125, %100
%130 = phi i32 [ 0, %100 ], [ %126, %125 ]
%131 = tail call i32 @exit(i32 %130)
unreachable
}