main(argc, argv) int argc;
char **argv;
{
  int proc, signal = 15;
  if (argc < 2)
    usage();
  if (*argv[1] == '-') {
    signal = atoi(&argv[1][1]);
    *argv++;
    argc--;
  }
  if (!signal)
    signal = 15;
  while (--argc) {
    *argv++;
    proc = atoi(*argv);
    if (!proc && strcmp(*argv, "0"))
      usage();
    if (kill(proc, signal)) {
      prints("Kill: %s no such process\n", itoa(proc));
      exit(1);
    }
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xf,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    119e <main+0x2e>
mov    $0x0,%al
call   1060 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11dd <main+0x6d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
add    $0x1,%rdi
mov    $0x0,%al
call   1070 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    11ee <main+0x7e>
movl   $0xf,-0x18(%rbp)
jmp    11f3 <main+0x83>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     128e <main+0x11e>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1070 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    124f <main+0xdf>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xdc6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
je     124f <main+0xdf>
mov    $0x0,%al
call   1060 <usage@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x0,%al
call   1050 <kill@plt>
cmp    $0x0,%eax
je     1289 <main+0x119>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1090 <itoa@plt>
mov    %eax,%esi
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1040 <prints@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    11f3 <main+0x83>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%r14d
cmp    $0x1,%edi
jg     118d <main+0x1d>
xor    %eax,%eax
call   1060 <usage@plt>
mov    0x8(%r12),%rdi
mov    $0xf,%r15d
cmpb   $0x2d,(%rdi)
jne    11bc <main+0x4c>
add    $0x8,%r12
add    $0x1,%rdi
xor    %eax,%eax
call   1070 <atoi@plt>
add    $0xffffffff,%r14d
test   %eax,%eax
mov    $0xf,%r15d
cmovne %eax,%r15d
mov    %r14d,%r13d
mov    $0x1,%ebx
lea    0xe35(%rip),%r14
jmp    11e4 <main+0x74>
nopl   (%rax)
mov    %ebp,%edi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <kill@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1213 <main+0xa3>
cmp    %ebx,%r13d
je     1236 <main+0xc6>
mov    (%r12,%rbx,8),%rdi
xor    %eax,%eax
call   1070 <atoi@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    11d0 <main+0x60>
mov    (%r12,%rbx,8),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11d0 <main+0x60>
xor    %eax,%eax
call   1060 <usage@plt>
jmp    11d0 <main+0x60>
mov    %ebp,%edi
xor    %eax,%eax
call   1090 <itoa@plt>
lea    0xddf(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <prints@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [26 x i8] c"Kill: %s no such process\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 15, i32* %7
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @usage()
br label %12
12: ; preds = %10, %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 45
br i1 %18, label %19, label %30
19: ; preds = %12
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 1
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %23)
store i32 %24, i32* %7
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i32 1
store i8** %26, i8*** %5
%27 = load i8*, i8** %25
%28 = load i32, i32* %4
%29 = add nsw i32 %28, -1
store i32 %29, i32* %4
br label %30
30: ; preds = %19, %12
%31 = load i32, i32* %7
%32 = icmp ne i32 %31, 0
br i1 %32, label %34, label %33
33: ; preds = %30
store i32 15, i32* %7
br label %34
34: ; preds = %33, %30
br label %35
35: ; preds = %64, %34
%36 = load i32, i32* %4
%37 = add nsw i32 %36, -1
store i32 %37, i32* %4
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %65
39: ; preds = %35
%40 = load i8**, i8*** %5
%41 = getelementptr inbounds i8*, i8** %40, i32 1
store i8** %41, i8*** %5
%42 = load i8*, i8** %40
%43 = load i8**, i8*** %5
%44 = load i8*, i8** %43
%45 = call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %44)
store i32 %45, i32* %6
%46 = load i32, i32* %6
%47 = icmp ne i32 %46, 0
br i1 %47, label %55, label %48
48: ; preds = %39
%49 = load i8**, i8*** %5
%50 = load i8*, i8** %49
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %48
%54 = call i32 (...) @usage()
br label %55
55: ; preds = %53, %48, %39
%56 = load i32, i32* %6
%57 = load i32, i32* %7
%58 = call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %56, i32 %57)
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %55
%61 = load i32, i32* %6
%62 = call i32 (i32, ...) bitcast (i32 (...)* @itoa to i32 (i32, ...)*)(i32 %61)
%63 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @prints to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %62)
unreachable
64: ; preds = %55
br label %35
65: ; preds = %35
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [26 x i8] c"Kill: %s no such process\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 45
br i1 %10, label %11, label %17
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %12)
%14 = add nsw i32 %0, -1
%15 = icmp eq i32 %13, 0
%16 = select i1 %15, i32 15, i32 %13
br label %17
17: ; preds = %11, %6
%18 = phi i32 [ %0, %6 ], [ %14, %11 ]
%19 = phi i8** [ %1, %6 ], [ %7, %11 ]
%20 = phi i32 [ 15, %6 ], [ %16, %11 ]
br label %21
21: ; preds = %37, %17
%22 = phi i8** [ %19, %17 ], [ %27, %37 ]
%23 = phi i32 [ %18, %17 ], [ %24, %37 ]
%24 = add nsw i32 %23, -1
%25 = icmp eq i32 %24, 0
br i1 %25, label %43, label %26
26: ; preds = %21
%27 = getelementptr inbounds i8*, i8** %22, i64 1
%28 = load i8*, i8** %27
%29 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %28)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %37
31: ; preds = %26
%32 = load i8*, i8** %27
%33 = tail call i32 @strcmp(i8* dereferenceable(1) %32, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %31
%36 = tail call i32 (...) @usage()
br label %37
37: ; preds = %35, %31, %26
%38 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @kill to i32 (i32, i32, ...)*)(i32 %29, i32 %20)
%39 = icmp eq i32 %38, 0
br i1 %39, label %21, label %40
40: ; preds = %37
%41 = tail call i32 (i32, ...) bitcast (i32 (...)* @itoa to i32 (i32, ...)*)(i32 %29)
%42 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @prints to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %41)
tail call void @exit(i32 1)
unreachable
43: ; preds = %21
tail call void @exit(i32 0)
unreachable
}