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

/* Variables and functions */
int audit_detect_machine();
char *audit_machine_to_name(int);
int audit_name_to_machine(char *);
int audit_name_to_syscall(char const *, int);
char *audit_syscall_to_name(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
scalar_t__ isdigit(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strcasestr(char const *, char const *);
scalar_t__ strcmp(char *, char *);
int strtol(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int i, rc;
  int machine = -1, syscall_num = -1, dump = 0, exact = 0;
  const char *name = NULL;
  if (argc > 4) {
    fputs("Too many arguments\n", stderr);
    usage();
  } else if (argc < 2)
    usage();
  for (i = 1; i < argc; i++) {
    if (isdigit(argv[i][0])) {
      if (syscall_num != -1) {
        fputs("Two syscall numbers not allowed\n", stderr);
        usage();
      }
      syscall_num = strtol(argv[i], 0, 10);
    } else if ((rc = audit_name_to_machine(argv[i])) != -1) {
      if (machine != -1) {
        fputs("Two machine types not allowed\n", stderr);
        usage();
      }
      machine = rc;
    } else if (strcmp("--dump", argv[i]) == 0) {
      dump = 1;
    } else if (strcmp("--exact", argv[i]) == 0) {
      exact = 1;
    } else if (strcmp("alpha", argv[i]) == 0) {
      fputs("Alpha processor support is not enabled\n", stderr);
      exit(1);
    } else if (strcmp("armeb", argv[i]) == 0) {
      fputs("Arm eabi processor support is not enabled\n", stderr);
      exit(1);
    } else if (strcmp("aarch64", argv[i]) == 0) {
      fputs("Aarch64 processor support is not enabled\n", stderr);
      exit(1);
    } else {
      if (name != NULL) {
        fputs("Two syscall names not allowed\n", stderr);
        usage();
      }
      name = argv[i];
    }
  }
  if (machine == -1)
    machine = audit_detect_machine();
  if (machine == -1) {
    fprintf(stderr, "Unable to detect machine type\n");
    return 1;
  }
  if (dump) {
    printf("Using %s syscall table:\n", audit_machine_to_name(machine));
    for (i = 0; i < 8192; i++) {
      name = audit_syscall_to_name(i, machine);
      if (name)
        printf("%d\t%s\n", i, name);
    }
    return 0;
  }
  if (name) {
    if (exact) {
      rc = audit_name_to_syscall(name, machine);
      if (rc < 0) {
        fprintf(stderr, "Unknown syscall %s using %s lookup table\n", name,
                audit_machine_to_name(machine));
        return 1;
      } else
        printf("%d\n", rc);
    } else {
      int found = 0;
      for (i = 0; i < 1400; i++) {
        const char *n = audit_syscall_to_name(i, machine);
        if (n && strcasestr(n, name)) {
          found = 1;
          printf("%-18s %d\n", n, i);
        }
      }
      if (!found) {
        fprintf(stderr, "Unknown syscall %s using %s lookup table\n", name,
                audit_machine_to_name(machine));
        return 1;
      }
    }
  } else if (syscall_num != -1) {
    name = audit_syscall_to_name(syscall_num, machine);
    if (name == NULL) {
      fprintf(stderr, "Unknown syscall %d using %s lookup table\n", syscall_num,
              audit_machine_to_name(machine));
      return 1;
    } else
      printf("%s\n", name);
  } else {
    fputs("Error - either a syscall name or number must "
          "be given with an optional arch\n",
          stderr);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0xffffffff,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
cmpl   $0x4,-0x8(%rbp)
jle    1245 <main+0x65>
mov    0x2db5(%rip),%rax
mov    (%rax),%esi
lea    0xdcc(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
jmp    125b <main+0x7b>
cmpl   $0x2,-0x8(%rbp)
jge    1256 <main+0x76>
mov    $0x0,%al
call   10d0 <usage@plt>
jmp    125b <main+0x7b>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14a7 <main+0x2c7>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%edi
call   1050 <isdigit@plt>
cmp    $0x0,%rax
je     12d2 <main+0xf2>
cmpl   $0xffffffff,-0x20(%rbp)
je     12b2 <main+0xd2>
mov    0x2d43(%rip),%rax
mov    (%rax),%esi
lea    0xd6e(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10b0 <strtol@plt>
mov    %eax,-0x20(%rbp)
jmp    1494 <main+0x2b4>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <audit_name_to_machine@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
je     1320 <main+0x140>
cmpl   $0xffffffff,-0x1c(%rbp)
je     1315 <main+0x135>
mov    0x2ce0(%rip),%rax
mov    (%rax),%esi
lea    0xd2c(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    148f <main+0x2af>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd21(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    134e <main+0x16e>
movl   $0x1,-0x24(%rbp)
jmp    148a <main+0x2aa>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcfa(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    137c <main+0x19c>
movl   $0x1,-0x28(%rbp)
jmp    1485 <main+0x2a5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcd4(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13bd <main+0x1dd>
mov    0x2c3b(%rip),%rax
mov    (%rax),%esi
lea    0xcbb(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcc1(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13fe <main+0x21e>
mov    0x2bfa(%rip),%rax
mov    (%rax),%esi
lea    0xca8(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcb1(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    143f <main+0x25f>
mov    0x2bb9(%rip),%rax
mov    (%rax),%esi
lea    0xc9a(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
je     1466 <main+0x286>
mov    0x2b8f(%rip),%rax
mov    (%rax),%esi
lea    0xc9a(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x30(%rbp)
jmp    147b <main+0x29b>
jmp    1480 <main+0x2a0>
jmp    1485 <main+0x2a5>
jmp    148a <main+0x2aa>
jmp    148f <main+0x2af>
jmp    1494 <main+0x2b4>
jmp    1499 <main+0x2b9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1262 <main+0x82>
cmpl   $0xffffffff,-0x1c(%rbp)
jne    14bb <main+0x2db>
mov    $0x0,%al
call   1030 <audit_detect_machine@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    14e8 <main+0x308>
mov    0x2b14(%rip),%rax
mov    (%rax),%edi
lea    0xc3e(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1765 <main+0x585>
cmpl   $0x0,-0x24(%rbp)
je     156d <main+0x38d>
mov    -0x1c(%rbp),%edi
call   1100 <audit_machine_to_name@plt>
mov    %rax,%rsi
lea    0xc2e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2000,-0x14(%rbp)
jge    1561 <main+0x381>
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     154e <main+0x36e>
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
lea    0xc04(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1553 <main+0x373>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1512 <main+0x332>
movl   $0x0,-0x4(%rbp)
jmp    1765 <main+0x585>
cmpq   $0x0,-0x30(%rbp)
je     16c0 <main+0x4e0>
cmpl   $0x0,-0x28(%rbp)
je     15f1 <main+0x411>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10c0 <audit_name_to_syscall@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    15db <main+0x3fb>
mov    0x2a3e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x1c(%rbp),%edi
call   1100 <audit_machine_to_name@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%rdx
mov    %rax,%rcx
lea    0xb8a(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1765 <main+0x585>
mov    -0x18(%rbp),%esi
lea    0xb9d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    16bb <main+0x4db>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x578,-0x14(%rbp)
jge    166c <main+0x48c>
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     1659 <main+0x479>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   10e0 <strcasestr@plt>
cmp    $0x0,%rax
je     1659 <main+0x479>
movl   $0x1,-0x34(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xb2a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    165e <main+0x47e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    15ff <main+0x41f>
cmpl   $0x0,-0x34(%rbp)
jne    16b6 <main+0x4d6>
mov    0x2963(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x1c(%rbp),%edi
call   1100 <audit_machine_to_name@plt>
mov    -0x5c(%rbp),%edi
mov    -0x58(%rbp),%rdx
mov    %rax,%rcx
lea    0xaaf(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1765 <main+0x585>
jmp    16bb <main+0x4db>
jmp    175e <main+0x57e>
cmpl   $0xffffffff,-0x20(%rbp)
je     1738 <main+0x558>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1721 <main+0x541>
mov    0x28f5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x64(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x1c(%rbp),%edi
call   1100 <audit_machine_to_name@plt>
mov    -0x64(%rbp),%edi
mov    -0x60(%rbp),%edx
mov    %rax,%rcx
lea    0xa78(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1765 <main+0x585>
mov    -0x30(%rbp),%rsi
lea    0xa22(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1759 <main+0x579>
mov    0x28a1(%rip),%rax
mov    (%rax),%esi
lea    0xa68(%rip),%rdi
call   1070 <fputs@plt>
movl   $0x1,-0x4(%rbp)
jmp    1765 <main+0x585>
jmp    175e <main+0x57e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x5,%edi
jl     1226 <main+0x36>
mov    0x2dd1(%rip),%rax
mov    (%rax),%esi
lea    0xde8(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
jmp    1249 <main+0x59>
cmp    $0x1,%ebp
jg     1249 <main+0x59>
xor    %r14d,%r14d
xor    %eax,%eax
call   10e0 <usage@plt>
mov    $0xffffffff,%ebp
movl   $0x0,0x8(%rsp)
xor    %ebx,%ebx
jmp    13ff <main+0x20f>
mov    %ebp,%r14d
mov    $0xffffffff,%ebp
mov    $0x1,%r12d
xor    %eax,%eax
mov    %rax,0x10(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
mov    $0xffffffff,%r13d
jmp    129f <main+0xaf>
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%r12,8),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   10c0 <strtol@plt>
mov    %eax,%ebp
add    $0x1,%r12
cmp    %r12,%r14
je     13f0 <main+0x200>
mov    (%rbx,%r12,8),%rax
movsbl (%rax),%edi
call   1050 <isdigit@plt>
test   %rax,%rax
je     12e0 <main+0xf0>
cmp    $0xffffffff,%ebp
je     1280 <main+0x90>
mov    0x2d24(%rip),%rax
mov    (%rax),%esi
lea    0xd4f(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
jmp    1280 <main+0x90>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%r12,8),%rdi
call   1040 <audit_name_to_machine@plt>
cmp    $0xffffffff,%eax
je     131f <main+0x12f>
mov    %eax,%r15d
cmp    $0xffffffff,%r13d
je     13ce <main+0x1de>
mov    0x2cde(%rip),%rax
mov    (%rax),%esi
lea    0xd2a(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
mov    %r15d,%r13d
jmp    1292 <main+0xa2>
mov    (%rbx,%r12,8),%rsi
lea    0xd2a(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13d6 <main+0x1e6>
mov    (%rbx,%r12,8),%rsi
lea    0xd18(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13e3 <main+0x1f3>
mov    (%rbx,%r12,8),%rsi
lea    0xd07(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     15d8 <main+0x3e8>
mov    (%rbx,%r12,8),%rsi
lea    0xd1c(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     15ea <main+0x3fa>
mov    (%rbx,%r12,8),%rsi
lea    0xd34(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     15fc <main+0x40c>
cmpq   $0x0,0x10(%rsp)
je     13c0 <main+0x1d0>
mov    0x2c35(%rip),%rax
mov    (%rax),%esi
lea    0xd40(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
mov    (%rbx,%r12,8),%rax
mov    %rax,0x10(%rsp)
jmp    1292 <main+0xa2>
mov    %r15d,%r13d
jmp    1292 <main+0xa2>
movl   $0x1,0xc(%rsp)
jmp    1292 <main+0xa2>
movl   $0x1,0x8(%rsp)
jmp    1292 <main+0xa2>
cmp    $0xffffffff,%r13d
mov    0x10(%rsp),%r14
mov    0xc(%rsp),%ebx
jne    1412 <main+0x222>
xor    %eax,%eax
call   1030 <audit_detect_machine@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     14aa <main+0x2ba>
test   %ebx,%ebx
je     1473 <main+0x283>
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xd0d(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd15(%rip),%rbx
xor    %ebp,%ebp
jmp    144b <main+0x25b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x2000,%ebp
je     146b <main+0x27b>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     1440 <main+0x250>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1440 <main+0x250>
xor    %r15d,%r15d
jmp    15c6 <main+0x3d6>
test   %r14,%r14
je     14c6 <main+0x2d6>
cmpl   $0x0,0x8(%rsp)
je     14f2 <main+0x302>
mov    %r14,%rdi
mov    %r13d,%esi
call   10d0 <audit_name_to_syscall@plt>
test   %eax,%eax
js     155a <main+0x36a>
lea    0xce9(%rip),%rdi
xor    %r15d,%r15d
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    15c6 <main+0x3d6>
mov    0x2b2f(%rip),%rax
mov    (%rax),%edi
lea    0xc59(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    15c0 <main+0x3d0>
cmp    $0xffffffff,%ebp
je     1583 <main+0x393>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     159a <main+0x3aa>
mov    %rax,%rdi
call   1060 <puts@plt>
xor    %r15d,%r15d
jmp    15c6 <main+0x3d6>
xor    %ebp,%ebp
mov    $0x1,%r15b
lea    0xc7e(%rip),%r12
jmp    150b <main+0x31b>
add    $0x1,%ebp
cmp    $0x578,%ebp
je     154e <main+0x35e>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     1500 <main+0x310>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   10f0 <strcasestr@plt>
test   %rax,%rax
je     1500 <main+0x310>
xor    %r15d,%r15d
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x1(%rbp),%eax
cmp    $0x577,%ebp
mov    %eax,%ebp
jne    150b <main+0x31b>
jmp    15c6 <main+0x3d6>
test   $0x1,%r15b
mov    $0x0,%r15d
je     15c6 <main+0x3d6>
mov    0x2a7f(%rip),%rax
mov    (%rax),%ebx
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xbe0(%rip),%rsi
mov    %ebx,%edi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    15c0 <main+0x3d0>
mov    0x2a56(%rip),%rax
mov    (%rax),%esi
lea    0xc1d(%rip),%rdi
call   1080 <fputs@plt>
jmp    15c0 <main+0x3d0>
mov    0x2a3f(%rip),%rax
mov    (%rax),%ebx
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xbd4(%rip),%rsi
mov    %ebx,%edi
mov    %ebp,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a01(%rip),%rax
mov    (%rax),%esi
lea    0xa81(%rip),%rdi
jmp    160c <main+0x41c>
mov    0x29ef(%rip),%rax
mov    (%rax),%esi
lea    0xa9d(%rip),%rdi
jmp    160c <main+0x41c>
mov    0x29dd(%rip),%rax
mov    (%rax),%esi
lea    0xabe(%rip),%rdi
call   1080 <fputs@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Too many arguments\0A\00"
@stderr = global i32 0
@.str.1 = [33 x i8] c"Two syscall numbers not allowed\0A\00"
@.str.2 = [31 x i8] c"Two machine types not allowed\0A\00"
@.str.3 = [7 x i8] c"--dump\00"
@.str.4 = [8 x i8] c"--exact\00"
@.str.5 = [6 x i8] c"alpha\00"
@.str.6 = [40 x i8] c"Alpha processor support is not enabled\0A\00"
@.str.7 = [6 x i8] c"armeb\00"
@.str.8 = [43 x i8] c"Arm eabi processor support is not enabled\0A\00"
@.str.9 = [8 x i8] c"aarch64\00"
@.str.10 = [42 x i8] c"Aarch64 processor support is not enabled\0A\00"
@.str.11 = [31 x i8] c"Two syscall names not allowed\0A\00"
@.str.12 = [31 x i8] c"Unable to detect machine type\0A\00"
@.str.13 = [25 x i8] c"Using %s syscall table:\0A\00"
@.str.14 = [7 x i8] c"%d\09%s\0A\00"
@.str.15 = [42 x i8] c"Unknown syscall %s using %s lookup table\0A\00"
@.str.16 = [4 x i8] c"%d\0A\00"
@.str.17 = [10 x i8] c"%-18s %d\0A\00"
@.str.18 = [42 x i8] c"Unknown syscall %d using %s lookup table\0A\00"
@.str.19 = [4 x i8] c"%s\0A\00"
@.str.20 = [77 x i8] c"Error - either a syscall name or number must be given with an optional arch\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %8
store i32 -1, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i8* null, i8** %12
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 4
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i32, i32* @stderr
%19 = call i32 @fputs(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = call i32 (...) @usage()
br label %27
21: ; preds = %2
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 2
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (...) @usage()
br label %26
26: ; preds = %24, %21
br label %27
27: ; preds = %26, %17
store i32 1, i32* %6
br label %28
28: ; preds = %147, %27
%29 = load i32, i32* %6
%30 = load i32, i32* %4
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %150
32: ; preds = %28
%33 = load i8**, i8*** %5
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8*, i8** %33, i64 %35
%37 = load i8*, i8** %36
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
%40 = call i64 @isdigit(i8 signext %39)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %56
42: ; preds = %32
%43 = load i32, i32* %9
%44 = icmp ne i32 %43, -1
br i1 %44, label %45, label %49
45: ; preds = %42
%46 = load i32, i32* @stderr
%47 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %46)
%48 = call i32 (...) @usage()
br label %49
49: ; preds = %45, %42
%50 = load i8**, i8*** %5
%51 = load i32, i32* %6
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 @strtol(i8* %54, i32 0, i32 10)
store i32 %55, i32* %9
br label %146
56: ; preds = %32
%57 = load i8**, i8*** %5
%58 = load i32, i32* %6
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8*, i8** %57, i64 %59
%61 = load i8*, i8** %60
%62 = call i32 @audit_name_to_machine(i8* %61)
store i32 %62, i32* %7
%63 = icmp ne i32 %62, -1
br i1 %63, label %64, label %73
64: ; preds = %56
%65 = load i32, i32* %8
%66 = icmp ne i32 %65, -1
br i1 %66, label %67, label %71
67: ; preds = %64
%68 = load i32, i32* @stderr
%69 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %68)
%70 = call i32 (...) @usage()
br label %71
71: ; preds = %67, %64
%72 = load i32, i32* %7
store i32 %72, i32* %8
br label %145
73: ; preds = %56
%74 = load i8**, i8*** %5
%75 = load i32, i32* %6
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8*, i8** %74, i64 %76
%78 = load i8*, i8** %77
%79 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %78)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %82
81: ; preds = %73
store i32 1, i32* %10
br label %144
82: ; preds = %73
%83 = load i8**, i8*** %5
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8*, i8** %83, i64 %85
%87 = load i8*, i8** %86
%88 = call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %87)
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %82
store i32 1, i32* %11
br label %143
91: ; preds = %82
%92 = load i8**, i8*** %5
%93 = load i32, i32* %6
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8*, i8** %92, i64 %94
%96 = load i8*, i8** %95
%97 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %96)
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %103
99: ; preds = %91
%100 = load i32, i32* @stderr
%101 = call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i32 %100)
%102 = call i32 @exit(i32 1)
unreachable
103: ; preds = %91
%104 = load i8**, i8*** %5
%105 = load i32, i32* %6
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8*, i8** %104, i64 %106
%108 = load i8*, i8** %107
%109 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %108)
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %115
111: ; preds = %103
%112 = load i32, i32* @stderr
%113 = call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %112)
%114 = call i32 @exit(i32 1)
unreachable
115: ; preds = %103
%116 = load i8**, i8*** %5
%117 = load i32, i32* %6
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8*, i8** %116, i64 %118
%120 = load i8*, i8** %119
%121 = call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* %120)
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %127
123: ; preds = %115
%124 = load i32, i32* @stderr
%125 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i32 %124)
%126 = call i32 @exit(i32 1)
unreachable
127: ; preds = %115
%128 = load i8*, i8** %12
%129 = icmp ne i8* %128, null
br i1 %129, label %130, label %134
130: ; preds = %127
%131 = load i32, i32* @stderr
%132 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32 %131)
%133 = call i32 (...) @usage()
br label %134
134: ; preds = %130, %127
%135 = load i8**, i8*** %5
%136 = load i32, i32* %6
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i8*, i8** %135, i64 %137
%139 = load i8*, i8** %138
store i8* %139, i8** %12
br label %140
140: ; preds = %134
br label %141
141: ; preds = %140
br label %142
142: ; preds = %141
br label %143
143: ; preds = %142, %90
br label %144
144: ; preds = %143, %81
br label %145
145: ; preds = %144, %71
br label %146
146: ; preds = %145, %49
br label %147
147: ; preds = %146
%148 = load i32, i32* %6
%149 = add nsw i32 %148, 1
store i32 %149, i32* %6
br label %28
150: ; preds = %28
%151 = load i32, i32* %8
%152 = icmp eq i32 %151, -1
br i1 %152, label %153, label %155
153: ; preds = %150
%154 = call i32 (...) @audit_detect_machine()
store i32 %154, i32* %8
br label %155
155: ; preds = %153, %150
%156 = load i32, i32* %8
%157 = icmp eq i32 %156, -1
br i1 %157, label %158, label %161
158: ; preds = %155
%159 = load i32, i32* @stderr
%160 = call i32 (i32, i8*, ...) @fprintf(i32 %159, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
store i32 1, i32* %3
br label %266
161: ; preds = %155
%162 = load i32, i32* %10
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %186
164: ; preds = %161
%165 = load i32, i32* %8
%166 = call i8* @audit_machine_to_name(i32 %165)
%167 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %166)
store i32 0, i32* %6
br label %168
168: ; preds = %182, %164
%169 = load i32, i32* %6
%170 = icmp slt i32 %169, 8192
br i1 %170, label %171, label %185
171: ; preds = %168
%172 = load i32, i32* %6
%173 = load i32, i32* %8
%174 = call i8* @audit_syscall_to_name(i32 %172, i32 %173)
store i8* %174, i8** %12
%175 = load i8*, i8** %12
%176 = icmp ne i8* %175, null
br i1 %176, label %177, label %181
177: ; preds = %171
%178 = load i32, i32* %6
%179 = load i8*, i8** %12
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %178, i8* %179)
br label %181
181: ; preds = %177, %171
br label %182
182: ; preds = %181
%183 = load i32, i32* %6
%184 = add nsw i32 %183, 1
store i32 %184, i32* %6
br label %168
185: ; preds = %168
store i32 0, i32* %3
br label %266
186: ; preds = %161
%187 = load i8*, i8** %12
%188 = icmp ne i8* %187, null
br i1 %188, label %189, label %242
189: ; preds = %186
%190 = load i32, i32* %11
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %208
192: ; preds = %189
%193 = load i8*, i8** %12
%194 = load i32, i32* %8
%195 = call i32 @audit_name_to_syscall(i8* %193, i32 %194)
store i32 %195, i32* %7
%196 = load i32, i32* %7
%197 = icmp slt i32 %196, 0
br i1 %197, label %198, label %204
198: ; preds = %192
%199 = load i32, i32* @stderr
%200 = load i8*, i8** %12
%201 = load i32, i32* %8
%202 = call i8* @audit_machine_to_name(i32 %201)
%203 = call i32 (i32, i8*, ...) @fprintf(i32 %199, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i8* %200, i8* %202)
store i32 1, i32* %3
br label %266
204: ; preds = %192
%205 = load i32, i32* %7
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %205)
br label %207
207: ; preds = %204
br label %241
208: ; preds = %189
store i32 0, i32* %13
store i32 0, i32* %6
br label %209
209: ; preds = %228, %208
%210 = load i32, i32* %6
%211 = icmp slt i32 %210, 1400
br i1 %211, label %212, label %231
212: ; preds = %209
%213 = load i32, i32* %6
%214 = load i32, i32* %8
%215 = call i8* @audit_syscall_to_name(i32 %213, i32 %214)
store i8* %215, i8** %14
%216 = load i8*, i8** %14
%217 = icmp ne i8* %216, null
br i1 %217, label %218, label %227
218: ; preds = %212
%219 = load i8*, i8** %14
%220 = load i8*, i8** %12
%221 = call i64 @strcasestr(i8* %219, i8* %220)
%222 = icmp ne i64 %221, 0
br i1 %222, label %223, label %227
223: ; preds = %218
store i32 1, i32* %13
%224 = load i8*, i8** %14
%225 = load i32, i32* %6
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %224, i32 %225)
br label %227
227: ; preds = %223, %218, %212
br label %228
228: ; preds = %227
%229 = load i32, i32* %6
%230 = add nsw i32 %229, 1
store i32 %230, i32* %6
br label %209
231: ; preds = %209
%232 = load i32, i32* %13
%233 = icmp ne i32 %232, 0
br i1 %233, label %240, label %234
234: ; preds = %231
%235 = load i32, i32* @stderr
%236 = load i8*, i8** %12
%237 = load i32, i32* %8
%238 = call i8* @audit_machine_to_name(i32 %237)
%239 = call i32 (i32, i8*, ...) @fprintf(i32 %235, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i8* %236, i8* %238)
store i32 1, i32* %3
br label %266
240: ; preds = %231
br label %241
241: ; preds = %240, %207
br label %265
242: ; preds = %186
%243 = load i32, i32* %9
%244 = icmp ne i32 %243, -1
br i1 %244, label %245, label %261
245: ; preds = %242
%246 = load i32, i32* %9
%247 = load i32, i32* %8
%248 = call i8* @audit_syscall_to_name(i32 %246, i32 %247)
store i8* %248, i8** %12
%249 = load i8*, i8** %12
%250 = icmp eq i8* %249, null
br i1 %250, label %251, label %257
251: ; preds = %245
%252 = load i32, i32* @stderr
%253 = load i32, i32* %9
%254 = load i32, i32* %8
%255 = call i8* @audit_machine_to_name(i32 %254)
%256 = call i32 (i32, i8*, ...) @fprintf(i32 %252, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 %253, i8* %255)
store i32 1, i32* %3
br label %266
257: ; preds = %245
%258 = load i8*, i8** %12
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i8* %258)
br label %260
260: ; preds = %257
br label %264
261: ; preds = %242
%262 = load i32, i32* @stderr
%263 = call i32 @fputs(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.20, i64 0, i64 0), i32 %262)
store i32 1, i32* %3
br label %266
264: ; preds = %260
br label %265
265: ; preds = %264, %241
store i32 0, i32* %3
br label %266
266: ; preds = %265, %261, %251, %234, %198, %185, %158
%267 = load i32, i32* %3
ret i32 %267
}

LLVM IR (-O2):
@.str = [20 x i8] c"Too many arguments\0A\00"
@stderr = global i32 0
@.str.1 = [33 x i8] c"Two syscall numbers not allowed\0A\00"
@.str.2 = [31 x i8] c"Two machine types not allowed\0A\00"
@.str.3 = [7 x i8] c"--dump\00"
@.str.4 = [8 x i8] c"--exact\00"
@.str.5 = [6 x i8] c"alpha\00"
@.str.6 = [40 x i8] c"Alpha processor support is not enabled\0A\00"
@.str.7 = [6 x i8] c"armeb\00"
@.str.8 = [43 x i8] c"Arm eabi processor support is not enabled\0A\00"
@.str.9 = [8 x i8] c"aarch64\00"
@.str.10 = [42 x i8] c"Aarch64 processor support is not enabled\0A\00"
@.str.11 = [31 x i8] c"Two syscall names not allowed\0A\00"
@.str.12 = [31 x i8] c"Unable to detect machine type\0A\00"
@.str.13 = [25 x i8] c"Using %s syscall table:\0A\00"
@.str.14 = [7 x i8] c"%d\09%s\0A\00"
@.str.15 = [42 x i8] c"Unknown syscall %s using %s lookup table\0A\00"
@.str.16 = [4 x i8] c"%d\0A\00"
@.str.17 = [10 x i8] c"%-18s %d\0A\00"
@.str.18 = [42 x i8] c"Unknown syscall %d using %s lookup table\0A\00"
@.str.20 = [77 x i8] c"Error - either a syscall name or number must be given with an optional arch\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 4
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @usage()
br label %12
8: ; preds = %2
%9 = icmp slt i32 %0, 2
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = tail call i32 (...) @usage()
br label %95
12: ; preds = %8, %4
%13 = zext i32 %0 to i64
br label %14
14: ; preds = %12, %85
%15 = phi i64 [ 1, %12 ], [ %91, %85 ]
%16 = phi i8* [ null, %12 ], [ %90, %85 ]
%17 = phi i32 [ 0, %12 ], [ %89, %85 ]
%18 = phi i32 [ 0, %12 ], [ %88, %85 ]
%19 = phi i32 [ -1, %12 ], [ %87, %85 ]
%20 = phi i32 [ -1, %12 ], [ %86, %85 ]
%21 = getelementptr inbounds i8*, i8** %1, i64 %15
%22 = load i8*, i8** %21
%23 = load i8, i8* %22
%24 = tail call i64 @isdigit(i8 signext %23)
%25 = icmp eq i64 %24, 0
br i1 %25, label %35, label %26
26: ; preds = %14
%27 = icmp eq i32 %19, -1
br i1 %27, label %32, label %28
28: ; preds = %26
%29 = load i32, i32* @stderr
%30 = tail call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = tail call i32 (...) @usage()
br label %32
32: ; preds = %28, %26
%33 = load i8*, i8** %21
%34 = tail call i32 @strtol(i8* %33, i32 0, i32 10)
br label %85
35: ; preds = %14
%36 = load i8*, i8** %21
%37 = tail call i32 @audit_name_to_machine(i8* %36)
%38 = icmp eq i32 %37, -1
br i1 %38, label %45, label %39
39: ; preds = %35
%40 = icmp eq i32 %20, -1
br i1 %40, label %85, label %41
41: ; preds = %39
%42 = load i32, i32* @stderr
%43 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %42)
%44 = tail call i32 (...) @usage()
br label %85
45: ; preds = %35
%46 = load i8*, i8** %21
%47 = tail call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %46)
%48 = icmp eq i64 %47, 0
br i1 %48, label %85, label %49
49: ; preds = %45
%50 = load i8*, i8** %21
%51 = tail call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %50)
%52 = icmp eq i64 %51, 0
br i1 %52, label %85, label %53
53: ; preds = %49
%54 = load i8*, i8** %21
%55 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %61
57: ; preds = %53
%58 = load i32, i32* @stderr
%59 = tail call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i32 %58)
%60 = tail call i32 @exit(i32 1)
unreachable
61: ; preds = %53
%62 = load i8*, i8** %21
%63 = tail call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %62)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %69
65: ; preds = %61
%66 = load i32, i32* @stderr
%67 = tail call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %66)
%68 = tail call i32 @exit(i32 1)
unreachable
69: ; preds = %61
%70 = load i8*, i8** %21
%71 = tail call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* %70)
%72 = icmp eq i64 %71, 0
br i1 %72, label %73, label %77
73: ; preds = %69
%74 = load i32, i32* @stderr
%75 = tail call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.10, i64 0, i64 0), i32 %74)
%76 = tail call i32 @exit(i32 1)
unreachable
77: ; preds = %69
%78 = icmp eq i8* %16, null
br i1 %78, label %83, label %79
79: ; preds = %77
%80 = load i32, i32* @stderr
%81 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0), i32 %80)
%82 = tail call i32 (...) @usage()
br label %83
83: ; preds = %79, %77
%84 = load i8*, i8** %21
br label %85
85: ; preds = %49, %45, %39, %41, %32, %83
%86 = phi i32 [ %20, %32 ], [ %20, %83 ], [ %37, %41 ], [ %37, %39 ], [ %20, %45 ], [ %20, %49 ]
%87 = phi i32 [ %34, %32 ], [ %19, %83 ], [ %19, %41 ], [ %19, %39 ], [ %19, %45 ], [ %19, %49 ]
%88 = phi i32 [ %18, %32 ], [ %18, %83 ], [ %18, %41 ], [ %18, %39 ], [ 1, %45 ], [ %18, %49 ]
%89 = phi i32 [ %17, %32 ], [ %17, %83 ], [ %17, %41 ], [ %17, %39 ], [ %17, %45 ], [ 1, %49 ]
%90 = phi i8* [ %16, %32 ], [ %84, %83 ], [ %16, %41 ], [ %16, %39 ], [ %16, %45 ], [ %16, %49 ]
%91 = add nuw nsw i64 %15, 1
%92 = icmp eq i64 %91, %13
br i1 %92, label %93, label %14
93: ; preds = %85
%94 = icmp eq i32 %86, -1
br i1 %94, label %95, label %105
95: ; preds = %10, %93
%96 = phi i8* [ null, %10 ], [ %90, %93 ]
%97 = phi i32 [ 0, %10 ], [ %89, %93 ]
%98 = phi i32 [ 0, %10 ], [ %88, %93 ]
%99 = phi i32 [ -1, %10 ], [ %87, %93 ]
%100 = tail call i32 (...) @audit_detect_machine()
%101 = icmp eq i32 %100, -1
br i1 %101, label %102, label %105
102: ; preds = %95
%103 = load i32, i32* @stderr
%104 = tail call i32 (i32, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
br label %173
105: ; preds = %93, %95
%106 = phi i8* [ %96, %95 ], [ %90, %93 ]
%107 = phi i32 [ %97, %95 ], [ %89, %93 ]
%108 = phi i32 [ %98, %95 ], [ %88, %93 ]
%109 = phi i32 [ %99, %95 ], [ %87, %93 ]
%110 = phi i32 [ %100, %95 ], [ %86, %93 ]
%111 = icmp eq i32 %108, 0
br i1 %111, label %124, label %112
112: ; preds = %105
%113 = tail call i8* @audit_machine_to_name(i32 %110)
%114 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i8* %113)
br label %115
115: ; preds = %112, %121
%116 = phi i32 [ 0, %112 ], [ %122, %121 ]
%117 = tail call i8* @audit_syscall_to_name(i32 %116, i32 %110)
%118 = icmp eq i8* %117, null
br i1 %118, label %121, label %119
119: ; preds = %115
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %116, i8* %117)
br label %121
121: ; preds = %115, %119
%122 = add nuw nsw i32 %116, 1
%123 = icmp eq i32 %122, 8192
br i1 %123, label %173, label %115
124: ; preds = %105
%125 = icmp eq i8* %106, null
br i1 %125, label %159, label %126
126: ; preds = %124
%127 = icmp eq i32 %107, 0
br i1 %127, label %128, label %131
128: ; preds = %126, %150
%129 = phi i1 [ false, %150 ], [ true, %126 ]
%130 = phi i32 [ %152, %150 ], [ 0, %126 ]
br label %140
131: ; preds = %126
%132 = tail call i32 @audit_name_to_syscall(i8* %106, i32 %110)
%133 = icmp slt i32 %132, 0
br i1 %133, label %134, label %138
134: ; preds = %131
%135 = load i32, i32* @stderr
%136 = tail call i8* @audit_machine_to_name(i32 %110)
%137 = tail call i32 (i32, i8*, ...) @fprintf(i32 %135, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i8* %106, i8* %136)
br label %173
138: ; preds = %131
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 %132)
br label %173
140: ; preds = %128, %147
%141 = phi i32 [ %148, %147 ], [ %130, %128 ]
%142 = tail call i8* @audit_syscall_to_name(i32 %141, i32 %110)
%143 = icmp eq i8* %142, null
br i1 %143, label %147, label %144
144: ; preds = %140
%145 = tail call i64 @strcasestr(i8* %142, i8* %106)
%146 = icmp eq i64 %145, 0
br i1 %146, label %147, label %150
147: ; preds = %144, %140
%148 = add nuw nsw i32 %141, 1
%149 = icmp eq i32 %148, 1400
br i1 %149, label %154, label %140
150: ; preds = %144
%151 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8* %142, i32 %141)
%152 = add nuw nsw i32 %141, 1
%153 = icmp eq i32 %152, 1400
br i1 %153, label %173, label %128
154: ; preds = %147
br i1 %129, label %155, label %173
155: ; preds = %154
%156 = load i32, i32* @stderr
%157 = tail call i8* @audit_machine_to_name(i32 %110)
%158 = tail call i32 (i32, i8*, ...) @fprintf(i32 %156, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i8* %106, i8* %157)
br label %173
159: ; preds = %124
%160 = icmp eq i32 %109, -1
br i1 %160, label %170, label %161
161: ; preds = %159
%162 = tail call i8* @audit_syscall_to_name(i32 %109, i32 %110)
%163 = icmp eq i8* %162, null
br i1 %163, label %164, label %168
164: ; preds = %161
%165 = load i32, i32* @stderr
%166 = tail call i8* @audit_machine_to_name(i32 %110)
%167 = tail call i32 (i32, i8*, ...) @fprintf(i32 %165, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 %109, i8* %166)
br label %173
168: ; preds = %161
%169 = tail call i32 @puts(i8* %162)
br label %173
170: ; preds = %159
%171 = load i32, i32* @stderr
%172 = tail call i32 @fputs(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.20, i64 0, i64 0), i32 %171)
br label %173
173: ; preds = %121, %150, %168, %138, %154, %155, %170, %164, %134, %102
%174 = phi i32 [ 1, %102 ], [ 1, %134 ], [ 1, %164 ], [ 1, %170 ], [ 1, %155 ], [ 0, %154 ], [ 0, %138 ], [ 0, %168 ], [ 0, %150 ], [ 0, %121 ]
ret i32 %174
}