#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();
  }
  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 (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    1240 <main+0x60>
mov    0x2db5(%rip),%rax
mov    (%rax),%esi
lea    0xdcc(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1446 <main+0x266>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%edi
call   1050 <isdigit@plt>
cmp    $0x0,%rax
je     12b7 <main+0xd7>
cmpl   $0xffffffff,-0x20(%rbp)
je     1297 <main+0xb7>
mov    0x2d5e(%rip),%rax
mov    (%rax),%esi
lea    0xd89(%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    1433 <main+0x253>
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     1305 <main+0x125>
cmpl   $0xffffffff,-0x1c(%rbp)
je     12fa <main+0x11a>
mov    0x2cfb(%rip),%rax
mov    (%rax),%esi
lea    0xd47(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x0,%al
call   10d0 <usage@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    142e <main+0x24e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd3c(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1333 <main+0x153>
movl   $0x1,-0x24(%rbp)
jmp    1429 <main+0x249>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd15(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1361 <main+0x181>
movl   $0x1,-0x28(%rbp)
jmp    1424 <main+0x244>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xcef(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13a2 <main+0x1c2>
mov    0x2c56(%rip),%rax
mov    (%rax),%esi
lea    0xcd6(%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    0xcdc(%rip),%rdi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    13e3 <main+0x203>
mov    0x2c15(%rip),%rax
mov    (%rax),%esi
lea    0xcc3(%rip),%rdi
call   1070 <fputs@plt>
mov    $0x1,%edi
call   10f0 <exit@plt>
cmpq   $0x0,-0x30(%rbp)
je     140a <main+0x22a>
mov    0x2beb(%rip),%rax
mov    (%rax),%esi
lea    0xcc4(%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    141f <main+0x23f>
jmp    1424 <main+0x244>
jmp    1429 <main+0x249>
jmp    142e <main+0x24e>
jmp    1433 <main+0x253>
jmp    1438 <main+0x258>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1247 <main+0x67>
cmpl   $0xffffffff,-0x1c(%rbp)
jne    145a <main+0x27a>
mov    $0x0,%al
call   1030 <audit_detect_machine@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1487 <main+0x2a7>
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
lea    0xc6d(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1704 <main+0x524>
cmpl   $0x0,-0x24(%rbp)
je     150c <main+0x32c>
mov    -0x1c(%rbp),%edi
call   1100 <audit_machine_to_name@plt>
mov    %rax,%rsi
lea    0xc5d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2000,-0x14(%rbp)
jge    1500 <main+0x320>
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     14ed <main+0x30d>
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
lea    0xc33(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14f2 <main+0x312>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    14b1 <main+0x2d1>
movl   $0x0,-0x4(%rbp)
jmp    1704 <main+0x524>
cmpq   $0x0,-0x30(%rbp)
je     165f <main+0x47f>
cmpl   $0x0,-0x28(%rbp)
je     1590 <main+0x3b0>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10c0 <audit_name_to_syscall@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    157a <main+0x39a>
mov    0x2a9f(%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    0xbb9(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1704 <main+0x524>
mov    -0x18(%rbp),%esi
lea    0xbcc(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    165a <main+0x47a>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x578,-0x14(%rbp)
jge    160b <main+0x42b>
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     15f8 <main+0x418>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   10e0 <strcasestr@plt>
cmp    $0x0,%rax
je     15f8 <main+0x418>
movl   $0x1,-0x34(%rbp)
mov    -0x40(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xb59(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    15fd <main+0x41d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    159e <main+0x3be>
cmpl   $0x0,-0x34(%rbp)
jne    1655 <main+0x475>
mov    0x29c4(%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    0xade(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1704 <main+0x524>
jmp    165a <main+0x47a>
jmp    16fd <main+0x51d>
cmpl   $0xffffffff,-0x20(%rbp)
je     16d7 <main+0x4f7>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <audit_syscall_to_name@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    16c0 <main+0x4e0>
mov    0x2956(%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    0xaa7(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1704 <main+0x524>
mov    -0x30(%rbp),%rsi
lea    0xa51(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    16f8 <main+0x518>
mov    0x2902(%rip),%rax
mov    (%rax),%esi
lea    0xa97(%rip),%rdi
call   1070 <fputs@plt>
movl   $0x1,-0x4(%rbp)
jmp    1704 <main+0x524>
jmp    16fd <main+0x51d>
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    122f <main+0x3f>
cmp    $0x2,%ebp
jl     13c4 <main+0x1d4>
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    127f <main+0x8f>
nopl   0x0(%rax)
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     13b3 <main+0x1c3>
mov    (%rbx,%r12,8),%rax
movsbl (%rax),%edi
call   1050 <isdigit@plt>
test   %rax,%rax
je     12c0 <main+0xd0>
cmp    $0xffffffff,%ebp
je     1260 <main+0x70>
mov    0x2d44(%rip),%rax
mov    (%rax),%esi
lea    0xd6f(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
jmp    1260 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%r12,8),%rdi
call   1040 <audit_name_to_machine@plt>
cmp    $0xffffffff,%eax
je     12ff <main+0x10f>
mov    %eax,%r15d
cmp    $0xffffffff,%r13d
je     1391 <main+0x1a1>
mov    0x2cfe(%rip),%rax
mov    (%rax),%esi
lea    0xd4a(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
mov    %r15d,%r13d
jmp    1272 <main+0x82>
mov    (%rbx,%r12,8),%rsi
lea    0xd4a(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     1399 <main+0x1a9>
mov    (%rbx,%r12,8),%rsi
lea    0xd38(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     13a6 <main+0x1b6>
mov    (%rbx,%r12,8),%rsi
lea    0xd2b(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     15ca <main+0x3da>
mov    (%rbx,%r12,8),%rsi
lea    0xd40(%rip),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
je     15b8 <main+0x3c8>
cmpq   $0x0,0x10(%rsp)
je     1383 <main+0x193>
mov    0x2c72(%rip),%rax
mov    (%rax),%esi
lea    0xd4b(%rip),%rdi
call   1080 <fputs@plt>
xor    %eax,%eax
call   10e0 <usage@plt>
mov    (%rbx,%r12,8),%rax
mov    %rax,0x10(%rsp)
jmp    1272 <main+0x82>
mov    %r15d,%r13d
jmp    1272 <main+0x82>
movl   $0x1,0xc(%rsp)
jmp    1272 <main+0x82>
movl   $0x1,0x8(%rsp)
jmp    1272 <main+0x82>
cmp    $0xffffffff,%r13d
mov    0x10(%rsp),%r14
mov    0xc(%rsp),%ebx
jne    13e9 <main+0x1f9>
jmp    13d6 <main+0x1e6>
mov    $0xffffffff,%ebp
xor    %r14d,%r14d
movl   $0x0,0x8(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <audit_detect_machine@plt>
mov    %eax,%r13d
cmp    $0xffffffff,%eax
je     148a <main+0x29a>
test   %ebx,%ebx
je     1453 <main+0x263>
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xd04(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xd0c(%rip),%rbx
xor    %ebp,%ebp
jmp    142b <main+0x23b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x2000,%ebp
je     144b <main+0x25b>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     1420 <main+0x230>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1420 <main+0x230>
xor    %r15d,%r15d
jmp    15a6 <main+0x3b6>
test   %r14,%r14
je     14a6 <main+0x2b6>
cmpl   $0x0,0x8(%rsp)
je     14d2 <main+0x2e2>
mov    %r14,%rdi
mov    %r13d,%esi
call   10d0 <audit_name_to_syscall@plt>
test   %eax,%eax
js     153a <main+0x34a>
lea    0xcd7(%rip),%rdi
xor    %r15d,%r15d
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
jmp    15a6 <main+0x3b6>
mov    0x2b4f(%rip),%rax
mov    (%rax),%edi
lea    0xc47(%rip),%rsi
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    15a0 <main+0x3b0>
cmp    $0xffffffff,%ebp
je     1563 <main+0x373>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     157a <main+0x38a>
mov    %rax,%rdi
call   1060 <puts@plt>
xor    %r15d,%r15d
jmp    15a6 <main+0x3b6>
xor    %ebp,%ebp
mov    $0x1,%r15b
lea    0xc6c(%rip),%r12
jmp    14eb <main+0x2fb>
add    $0x1,%ebp
cmp    $0x578,%ebp
je     152e <main+0x33e>
mov    %ebp,%edi
mov    %r13d,%esi
call   1090 <audit_syscall_to_name@plt>
test   %rax,%rax
je     14e0 <main+0x2f0>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   10f0 <strcasestr@plt>
test   %rax,%rax
je     14e0 <main+0x2f0>
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    14eb <main+0x2fb>
jmp    15a6 <main+0x3b6>
test   $0x1,%r15b
mov    $0x0,%r15d
je     15a6 <main+0x3b6>
mov    0x2a9f(%rip),%rax
mov    (%rax),%ebx
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xbce(%rip),%rsi
mov    %ebx,%edi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    15a0 <main+0x3b0>
mov    0x2a76(%rip),%rax
mov    (%rax),%esi
lea    0xc0b(%rip),%rdi
call   1080 <fputs@plt>
jmp    15a0 <main+0x3b0>
mov    0x2a5f(%rip),%rax
mov    (%rax),%ebx
mov    %r13d,%edi
call   1110 <audit_machine_to_name@plt>
lea    0xbc2(%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    0x2a21(%rip),%rax
mov    (%rax),%esi
lea    0xacf(%rip),%rdi
jmp    15da <main+0x3ea>
mov    0x2a0f(%rip),%rax
mov    (%rax),%esi
lea    0xa8f(%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 = [31 x i8] c"Two syscall names not allowed\0A\00"
@.str.10 = [31 x i8] c"Unable to detect machine type\0A\00"
@.str.11 = [25 x i8] c"Using %s syscall table:\0A\00"
@.str.12 = [7 x i8] c"%d\09%s\0A\00"
@.str.13 = [42 x i8] c"Unknown syscall %s using %s lookup table\0A\00"
@.str.14 = [4 x i8] c"%d\0A\00"
@.str.15 = [10 x i8] c"%-18s %d\0A\00"
@.str.16 = [42 x i8] c"Unknown syscall %d using %s lookup table\0A\00"
@.str.17 = [4 x i8] c"%s\0A\00"
@.str.18 = [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 %21
21: ; preds = %17, %2
store i32 1, i32* %6
br label %22
22: ; preds = %128, %21
%23 = load i32, i32* %6
%24 = load i32, i32* %4
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %131
26: ; preds = %22
%27 = load i8**, i8*** %5
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = call i64 @isdigit(i8 signext %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %50
36: ; preds = %26
%37 = load i32, i32* %9
%38 = icmp ne i32 %37, -1
br i1 %38, label %39, label %43
39: ; preds = %36
%40 = load i32, i32* @stderr
%41 = call i32 @fputs(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = call i32 (...) @usage()
br label %43
43: ; preds = %39, %36
%44 = load i8**, i8*** %5
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strtol(i8* %48, i32 0, i32 10)
store i32 %49, i32* %9
br label %127
50: ; preds = %26
%51 = load i8**, i8*** %5
%52 = load i32, i32* %6
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8*, i8** %51, i64 %53
%55 = load i8*, i8** %54
%56 = call i32 @audit_name_to_machine(i8* %55)
store i32 %56, i32* %7
%57 = icmp ne i32 %56, -1
br i1 %57, label %58, label %67
58: ; preds = %50
%59 = load i32, i32* %8
%60 = icmp ne i32 %59, -1
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = load i32, i32* @stderr
%63 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %62)
%64 = call i32 (...) @usage()
br label %65
65: ; preds = %61, %58
%66 = load i32, i32* %7
store i32 %66, i32* %8
br label %126
67: ; preds = %50
%68 = load i8**, i8*** %5
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8*, i8** %68, i64 %70
%72 = load i8*, i8** %71
%73 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %72)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %67
store i32 1, i32* %10
br label %125
76: ; preds = %67
%77 = load i8**, i8*** %5
%78 = load i32, i32* %6
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8*, i8** %77, i64 %79
%81 = load i8*, i8** %80
%82 = call i64 @strcmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* %81)
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %85
84: ; preds = %76
store i32 1, i32* %11
br label %124
85: ; preds = %76
%86 = load i8**, i8*** %5
%87 = load i32, i32* %6
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8*, i8** %86, i64 %88
%90 = load i8*, i8** %89
%91 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %90)
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %97
93: ; preds = %85
%94 = load i32, i32* @stderr
%95 = call i32 @fputs(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.6, i64 0, i64 0), i32 %94)
%96 = call i32 @exit(i32 1)
unreachable
97: ; preds = %85
%98 = load i8**, i8*** %5
%99 = load i32, i32* %6
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i8*, i8** %98, i64 %100
%102 = load i8*, i8** %101
%103 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %102)
%104 = icmp eq i64 %103, 0
br i1 %104, label %105, label %109
105: ; preds = %97
%106 = load i32, i32* @stderr
%107 = call i32 @fputs(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.8, i64 0, i64 0), i32 %106)
%108 = call i32 @exit(i32 1)
unreachable
109: ; preds = %97
%110 = load i8*, i8** %12
%111 = icmp ne i8* %110, null
br i1 %111, label %112, label %116
112: ; preds = %109
%113 = load i32, i32* @stderr
%114 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.9, i64 0, i64 0), i32 %113)
%115 = call i32 (...) @usage()
br label %116
116: ; preds = %112, %109
%117 = load i8**, i8*** %5
%118 = load i32, i32* %6
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8*, i8** %117, i64 %119
%121 = load i8*, i8** %120
store i8* %121, i8** %12
br label %122
122: ; preds = %116
br label %123
123: ; preds = %122
br label %124
124: ; preds = %123, %84
br label %125
125: ; preds = %124, %75
br label %126
126: ; preds = %125, %65
br label %127
127: ; preds = %126, %43
br label %128
128: ; preds = %127
%129 = load i32, i32* %6
%130 = add nsw i32 %129, 1
store i32 %130, i32* %6
br label %22
131: ; preds = %22
%132 = load i32, i32* %8
%133 = icmp eq i32 %132, -1
br i1 %133, label %134, label %136
134: ; preds = %131
%135 = call i32 (...) @audit_detect_machine()
store i32 %135, i32* %8
br label %136
136: ; preds = %134, %131
%137 = load i32, i32* %8
%138 = icmp eq i32 %137, -1
br i1 %138, label %139, label %142
139: ; preds = %136
%140 = load i32, i32* @stderr
%141 = call i32 (i32, i8*, ...) @fprintf(i32 %140, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
store i32 1, i32* %3
br label %247
142: ; preds = %136
%143 = load i32, i32* %10
%144 = icmp ne i32 %143, 0
br i1 %144, label %145, label %167
145: ; preds = %142
%146 = load i32, i32* %8
%147 = call i8* @audit_machine_to_name(i32 %146)
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0), i8* %147)
store i32 0, i32* %6
br label %149
149: ; preds = %163, %145
%150 = load i32, i32* %6
%151 = icmp slt i32 %150, 8192
br i1 %151, label %152, label %166
152: ; preds = %149
%153 = load i32, i32* %6
%154 = load i32, i32* %8
%155 = call i8* @audit_syscall_to_name(i32 %153, i32 %154)
store i8* %155, i8** %12
%156 = load i8*, i8** %12
%157 = icmp ne i8* %156, null
br i1 %157, label %158, label %162
158: ; preds = %152
%159 = load i32, i32* %6
%160 = load i8*, i8** %12
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 %159, i8* %160)
br label %162
162: ; preds = %158, %152
br label %163
163: ; preds = %162
%164 = load i32, i32* %6
%165 = add nsw i32 %164, 1
store i32 %165, i32* %6
br label %149
166: ; preds = %149
store i32 0, i32* %3
br label %247
167: ; preds = %142
%168 = load i8*, i8** %12
%169 = icmp ne i8* %168, null
br i1 %169, label %170, label %223
170: ; preds = %167
%171 = load i32, i32* %11
%172 = icmp ne i32 %171, 0
br i1 %172, label %173, label %189
173: ; preds = %170
%174 = load i8*, i8** %12
%175 = load i32, i32* %8
%176 = call i32 @audit_name_to_syscall(i8* %174, i32 %175)
store i32 %176, i32* %7
%177 = load i32, i32* %7
%178 = icmp slt i32 %177, 0
br i1 %178, label %179, label %185
179: ; preds = %173
%180 = load i32, i32* @stderr
%181 = load i8*, i8** %12
%182 = load i32, i32* %8
%183 = call i8* @audit_machine_to_name(i32 %182)
%184 = call i32 (i32, i8*, ...) @fprintf(i32 %180, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i8* %181, i8* %183)
store i32 1, i32* %3
br label %247
185: ; preds = %173
%186 = load i32, i32* %7
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 %186)
br label %188
188: ; preds = %185
br label %222
189: ; preds = %170
store i32 0, i32* %13
store i32 0, i32* %6
br label %190
190: ; preds = %209, %189
%191 = load i32, i32* %6
%192 = icmp slt i32 %191, 1400
br i1 %192, label %193, label %212
193: ; preds = %190
%194 = load i32, i32* %6
%195 = load i32, i32* %8
%196 = call i8* @audit_syscall_to_name(i32 %194, i32 %195)
store i8* %196, i8** %14
%197 = load i8*, i8** %14
%198 = icmp ne i8* %197, null
br i1 %198, label %199, label %208
199: ; preds = %193
%200 = load i8*, i8** %14
%201 = load i8*, i8** %12
%202 = call i64 @strcasestr(i8* %200, i8* %201)
%203 = icmp ne i64 %202, 0
br i1 %203, label %204, label %208
204: ; preds = %199
store i32 1, i32* %13
%205 = load i8*, i8** %14
%206 = load i32, i32* %6
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.15, i64 0, i64 0), i8* %205, i32 %206)
br label %208
208: ; preds = %204, %199, %193
br label %209
209: ; preds = %208
%210 = load i32, i32* %6
%211 = add nsw i32 %210, 1
store i32 %211, i32* %6
br label %190
212: ; preds = %190
%213 = load i32, i32* %13
%214 = icmp ne i32 %213, 0
br i1 %214, label %221, label %215
215: ; preds = %212
%216 = load i32, i32* @stderr
%217 = load i8*, i8** %12
%218 = load i32, i32* %8
%219 = call i8* @audit_machine_to_name(i32 %218)
%220 = call i32 (i32, i8*, ...) @fprintf(i32 %216, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i8* %217, i8* %219)
store i32 1, i32* %3
br label %247
221: ; preds = %212
br label %222
222: ; preds = %221, %188
br label %246
223: ; preds = %167
%224 = load i32, i32* %9
%225 = icmp ne i32 %224, -1
br i1 %225, label %226, label %242
226: ; preds = %223
%227 = load i32, i32* %9
%228 = load i32, i32* %8
%229 = call i8* @audit_syscall_to_name(i32 %227, i32 %228)
store i8* %229, i8** %12
%230 = load i8*, i8** %12
%231 = icmp eq i8* %230, null
br i1 %231, label %232, label %238
232: ; preds = %226
%233 = load i32, i32* @stderr
%234 = load i32, i32* %9
%235 = load i32, i32* %8
%236 = call i8* @audit_machine_to_name(i32 %235)
%237 = call i32 (i32, i8*, ...) @fprintf(i32 %233, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), i32 %234, i8* %236)
store i32 1, i32* %3
br label %247
238: ; preds = %226
%239 = load i8*, i8** %12
%240 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8* %239)
br label %241
241: ; preds = %238
br label %245
242: ; preds = %223
%243 = load i32, i32* @stderr
%244 = call i32 @fputs(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.18, i64 0, i64 0), i32 %243)
store i32 1, i32* %3
br label %247
245: ; preds = %241
br label %246
246: ; preds = %245, %222
store i32 0, i32* %3
br label %247
247: ; preds = %246, %242, %232, %215, %179, %166, %139
%248 = load i32, i32* %3
ret i32 %248
}

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