// File: /workspace/github_c_makefile_star2_O2/arachsys[P]init/daemon.c
// Function: main
int main(int argc, char **argv) {
  char *dir = NULL, *options, *path;
  int fd, inotify, option, pwd, tail, waitargs;
  size_t doublefork = 0, limit = -1, restart = 0;
  struct passwd *user;

  /* Redirect stdin from /dev/null. */
  if ((fd = open("/dev/null", O_RDWR)) < 0)
    err(EXIT_FAILURE, "open /dev/null");
  if (fd != STDIN_FILENO) {
    if ((dup2(fd, STDIN_FILENO)) < 0)
      err(EXIT_FAILURE, "dup2");
    close(fd);
  }

  /* Redirect stdout and/or stderr to /dev/null if closed. */
  if (fcntl(STDOUT_FILENO, F_GETFD) < 0 && errno == EBADF)
    if ((dup2(STDIN_FILENO, STDOUT_FILENO)) < 0)
      err(EXIT_FAILURE, "dup2");
  if (fcntl(STDERR_FILENO, F_GETFD) < 0 && errno == EBADF)
    if ((dup2(STDIN_FILENO, STDERR_FILENO)) < 0)
      err(EXIT_FAILURE, "dup2");

  options = "+:cd:fl:n:p:rs:t:u:w:", waitargs = 0;
  while ((option = getopt(argc, argv, options)) > 0)
    switch (option) {
      case 'c':
        /* Special case of -d DIR, for compatibility with BSD daemon(1). */
        dir = "/";
        break;
      case 'd':
        dir = optarg;
        if ((fd = open(dir, O_RDONLY | O_DIRECTORY)) < 0)
          err(EXIT_FAILURE, "%s", dir);
        close(fd);
        break;
      case 'f':
        doublefork = 1;
        break;
      case 'l':
        logger_setup(optarg);
        break;
      case 'n':
        if (sscanf(optarg, "%zu%n", &limit, &tail) >= 1)
          if (optarg[tail] == 0)
            break;
        errx(EXIT_FAILURE, "Invalid connection limit");
      case 'p':
        pidfile_open(optarg);
        break;
      case 'r':
        restart = 1;
        break;
      case 's':
        listen_unix(optarg);
        break;
      case 't':
        listen_tcp(optarg);
        break;
      case 'u':
        if (sscanf(optarg, "%u:%u%n", &uid, &gid, &tail) >= 2)
          if (optarg[tail] == 0)
            break;
        if ((user = getpwnam(optarg))) {
          uid = user->pw_uid;
          gid = user->pw_gid;
          break;
        }
        errx(EXIT_FAILURE, "Invalid username");
      case 'w':
        waitargs++;
        break;
      default:
        usage(argv[0]);
    }

  /* When run with just -w arguments, we await paths in the foreground. */
  if (waitargs > 0 && argc == 2 * waitargs + 1)
    goto await;

  if (argc <= optind)
    usage(argv[0]);

  /* Fork into the background then create a session and process group. */
  switch (fork()) {
    case -1:
      err(EXIT_FAILURE, "fork");
    case 0:
      setsid(); /* Ignore errors but should always work after fork. */
      break;
    default:
      _exit(EXIT_SUCCESS); /* Don't delete pidfile in atexit() handler. */
  }

  if (doublefork) {
    /* Fork again to ensure we are not the session leader. */
    switch (fork()) {
      case -1:
        err(EXIT_FAILURE, "fork");
      case 0:
        break;
      default:
        _exit(EXIT_SUCCESS); /* Don't delete pidfile in atexit() handler. */
    }
  }

  logger_start();
  pidfile_write();

await:
  if (waitargs > 0) {
    if ((inotify = inotify_init1(IN_CLOEXEC | IN_NONBLOCK)) < 0)
      err(EXIT_FAILURE, "inotify_init1");

    /* Open the working directory so we can restore it after each await(). */
    if ((pwd = open(".", O_RDONLY | O_DIRECTORY)) < 0)
      err(EXIT_FAILURE, "open pwd");

    optind = 0; /* Need to reset optind to reprocess -w arguments. */
    while ((option = getopt(argc, argv, options)) > 0)
      if (option == 'w') {
        if (!(path = strdup(optarg)))
          err(EXIT_FAILURE, "strdup");
        await(path, inotify, 0);
        free(path);
        if (fchdir(pwd) < 0)
          err(EXIT_FAILURE, "fchdir");
      }

    close(inotify);
    close(pwd);
  }

  /* Exit if we were just awaiting paths in the foreground. */
  if (argc <= optind)
    return EXIT_SUCCESS;

  if (dir && chdir(dir) < 0)
    err(EXIT_FAILURE, "chdir");

  /* If we don't need to supervise it, just exec the command. */
  if (!restart && !pidfile.path && !listeners)
    execute(argv + optind);

  /* Use a signals pipe to avoid async-unsafe handlers. */
  if (pipe2(signals, O_CLOEXEC) < 0)
    err(EXIT_FAILURE, "pipe");

  /* Avoid using SIG_IGN as this disposition persists across exec. */
  signal(SIGHUP, signal_put);
  signal(SIGINT, signal_put);
  signal(SIGPIPE, signal_put);
  signal(SIGTERM, signal_put);
  signal(SIGCHLD, signal_put);
  signal(SIGUSR1, signal_put);
  signal(SIGUSR2, signal_put);

  if (listeners > 0)
    return serve(argv + optind, limit);
  return supervise(argv + optind, restart);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rsi, 0x20(%rsp)
movl %edi, 0x18(%rsp)
orq $-0x1, 0x58(%rsp)
leaq 0x1b9a(%rip), %rdi      # 0x407d
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x22c0
testl %eax, %eax
js 0x310c
je 0x2511
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl %ebx, %edi
callq 0x2140
pushq $0x1
popq %rdi
movl %edi, %esi
xorl %eax, %eax
callq 0x2090
testl %eax, %eax
jns 0x253d
callq 0x2040
cmpl $0x9, (%rax)
jne 0x253d
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
js 0x3016
pushq $0x2
popq %rdi
pushq $0x1
popq %rsi
xorl %eax, %eax
callq 0x2090
testl %eax, %eax
jns 0x256a
callq 0x2040
cmpl $0x9, (%rax)
jne 0x256a
pushq $0x2
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
js 0x3016
leaq 0x1b1b(%rip), %rbx      # 0x408c
pushq $0x1
popq %r13
pushq $0x2
popq %r15
pushq $0x4
popq %r12
xorl %r14d, %r14d
movq $0x0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x30(%rsp)
movq %r14, %rbp
movl 0x18(%rsp), %edi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
callq 0x22d0
testl %eax, %eax
jle 0x2aaf
addl $-0x63, %eax
cmpl $0x14, %eax
ja 0x301f
leaq 0x1a5a(%rip), %rcx      # 0x4024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
leaq 0x211a(%rip), %r14      # 0x46f2
jmpq *%rax
movq 0x39f7(%rip), %rax      # 0x5fd8
movq (%rax), %r14
movq %r14, %rdi
movl $0x10000, %esi          # imm = 0x10000
xorl %eax, %eax
callq 0x22c0
testl %eax, %eax
js 0x2fb3
movl %eax, %edi
callq 0x2140
jmp 0x259b
movq 0x40(%rsp), %rax
incl %eax
movq %rax, 0x40(%rsp)
jmp 0x2aa7
movq 0x39bc(%rip), %rbx      # 0x5fd8
movq (%rbx), %rdi
leaq 0x1a9b(%rip), %rsi      # 0x40c1
leaq 0x3bcb(%rip), %rdx      # 0x61f8
leaq 0x3bc8(%rip), %rcx      # 0x61fc
leaq 0x2c(%rsp), %r8
xorl %eax, %eax
callq 0x2240
movq (%rbx), %rdi
leaq 0x1a42(%rip), %rbx      # 0x408c
cmpl $0x2, %eax
jl 0x2661
movslq 0x2c(%rsp), %rax
cmpb $0x0, (%rdi,%rax)
movq %rbp, %r14
je 0x259b
callq 0x21c0
testq %rax, %rax
je 0x3069
movl 0x10(%rax), %ecx
movl %ecx, 0x3b80(%rip)      # 0x61f8
movl 0x14(%rax), %eax
movl %eax, 0x3b7b(%rip)      # 0x61fc
jmp 0x2aa7
movq 0x394b(%rip), %rax      # 0x5fd8
movq (%rax), %r14
movq %r14, %rdi
movl $0x80042, %esi          # imm = 0x80042
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x22c0
movl %eax, 0x3b5e(%rip)      # 0x6208
testl %eax, %eax
js 0x2fb3
movl %eax, %edi
pushq $0x6
popq %rsi
callq 0x2300
testl %eax, %eax
js 0x302c
movq %r14, %rdi
xorl %esi, %esi
callq 0x21e0
movq %rax, 0x3b2b(%rip)      # 0x6200
testq %rax, %rax
je 0x2fb3
movl 0x3b24(%rip), %edi      # 0x6208
xorl %esi, %esi
callq 0x2130
testl %eax, %eax
js 0x2fb3
leaq 0xe88(%rip), %rdi       # 0x3582
callq 0x3680
jmp 0x2aa7
movq %rbp, %r14
pushq $0x1
popq %rax
movq %rax, 0x30(%rsp)
jmp 0x259b
cmpq $0x0, 0x3b0c(%rip)      # 0x6228
jne 0x303e
movq 0x38af(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
movzbl (%rdi), %eax
cmpl $0x3a, %eax
je 0x2fe2
testl %eax, %eax
je 0x2fe2
callq 0x2360
movq %rax, 0x3adc(%rip)      # 0x6228
testq %rax, %rax
je 0x2faa
cmpb $0x2f, (%rax)
jne 0x2a31
movq %rax, %rdi
movl $0x442, %esi            # imm = 0x442
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x22c0
movl %eax, 0x3ab8(%rip)      # 0x6230
testl %eax, %eax
js 0x308f
movl %eax, %edi
pushq $0x6
popq %rsi
callq 0x2300
testl %eax, %eax
jns 0x2aa7
jmp 0x30a5
movq 0x383a(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movl $0x1, 0x98(%rsp)
movq %rdi, 0x38(%rsp)
leaq 0x19fa(%rip), %rsi      # 0x41cd
leaq 0xc0(%rsp), %r14
movq %r14, %rdx
leaq 0x60(%rsp), %rbx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2240
movq %rbx, %rdx
cmpl $0x2, %eax
je 0x284d
movq 0x38(%rsp), %rdi
leaq 0x19df(%rip), %rsi      # 0x41e0
movq %r14, %rdx
leaq 0x60(%rsp), %rcx
xorl %eax, %eax
callq 0x2240
leaq 0x60(%rsp), %rdx
cmpl $0x2, %eax
je 0x284d
movq 0x38(%rsp), %rdi
leaq 0x19c2(%rip), %rsi      # 0x41e8
xorl %eax, %eax
callq 0x2240
cmpl $0x1, %eax
jne 0x31a0
movb $0x0, 0xc2(%rsp)
movw $0x3a3a, 0xc0(%rsp)     # imm = 0x3A3A
leaq 0x60(%rsp), %rdx
movq %r14, %rdi
movq %rdx, %rsi
leaq 0x90(%rsp), %rdx
leaq 0x88(%rsp), %rbx
movq %rbx, %rcx
callq 0x2350
testl %eax, %eax
jne 0x3047
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2a22
movl 0x4(%rbx), %edi
movl 0x8(%rbx), %esi
xorl %edx, %edx
callq 0x23b0
testl %eax, %eax
js 0x2f87
movl %eax, %r14d
movl $0x1, 0x4c(%rsp)
movl %eax, %edi
movl %r13d, %esi
movl %r15d, %edx
leaq 0x4c(%rsp), %rcx
movl %r12d, %r8d
callq 0x2080
movl %r14d, %edi
movl %r15d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2090
movl %r14d, %edi
movl %r12d, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x2090
movq 0x18(%rbx), %rsi
movl 0x10(%rbx), %edx
movl %r14d, %edi
callq 0x2290
testl %eax, %eax
js 0x2f90
movl %r14d, %edi
movl $0x1000, %esi           # imm = 0x1000
callq 0x2250
testl %eax, %eax
js 0x2f99
movl %r14d, %edi
callq 0x35a6
addq $0x28, %rbx
jmp 0x2873
movq 0x36be(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
leaq 0x177e(%rip), %rsi      # 0x40a2
leaq 0x58(%rsp), %rdx
leaq 0x2c(%rsp), %rcx
xorl %eax, %eax
callq 0x2240
testl %eax, %eax
jle 0x2fee
movq 0x3694(%rip), %rax      # 0x5fd8
movq (%rax), %rax
movslq 0x2c(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
movq %rbp, %r14
je 0x259b
jmp 0x2fee
movq %rbp, %r14
pushq $0x1
popq %rax
movq %rax, 0x50(%rsp)
jmp 0x259b
movq 0x3663(%rip), %rax      # 0x5fd8
movq (%rax), %rbx
movq %rbx, %rdi
callq 0x20c0
cmpq $0x6d, %rax
jae 0x3060
movq %rax, %r14
movw $0x1, 0xc0(%rsp)
leaq 0xc2(%rsp), %rdi
movq %rbx, %rsi
pushq $0x6c
popq %rdx
callq 0x2060
movq %rbx, %rdi
callq 0x2050
movl %r13d, %edi
movl %r13d, %esi
xorl %edx, %edx
callq 0x23b0
testl %eax, %eax
js 0x2f87
movl %eax, %ebx
movl %eax, %edi
movl %r15d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2090
movl %ebx, %edi
movl %r12d, %esi
movl $0x800, %edx            # imm = 0x800
xorl %eax, %eax
callq 0x2090
addl $0x2, %r14d
movl %ebx, %edi
leaq 0xc0(%rsp), %rsi
movl %r14d, %edx
callq 0x2290
testl %eax, %eax
js 0x2f90
movl %ebx, %edi
movl $0x1000, %esi           # imm = 0x1000
callq 0x2250
testl %eax, %eax
js 0x2f99
movl %ebx, %edi
callq 0x35a6
movq %rbp, %r14
leaq 0x1660(%rip), %rbx      # 0x408c
jmp 0x259b
movq %rax, %rdi
pushq $0x3a
popq %rsi
callq 0x2100
movq %rax, 0x37dd(%rip)      # 0x6220
testq %rax, %rax
je 0x2a66
movq %rax, %rcx
incq %rcx
movq %rcx, 0x37cb(%rip)      # 0x6220
movb $0x0, (%rax)
cmpb $0x0, 0x1(%rax)
jne 0x2a66
andq $0x0, 0x37ba(%rip)      # 0x6220
callq 0x23a0
testl %eax, %eax
je 0x30bb
cmpl $-0x1, %eax
je 0x3083
movl %eax, %edi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
callq 0x22b0
testl %eax, %eax
js 0x30d7
movzwl 0xc0(%rsp), %eax
testw $0xff7f, %ax            # imm = 0xFF7F
jne 0x30e3
movq %rbp, %r14
jmp 0x259b
movq 0x40(%rsp), %r14
testl %r14d, %r14d
jle 0x2acb
leal 0x1(,%r14,2), %eax
cmpl 0x18(%rsp), %eax
je 0x2c27
movq 0x34fe(%rip), %rax      # 0x5fd0
movl 0x18(%rsp), %ecx
cmpl %ecx, (%rax)
jge 0x301f
callq 0x23a0
testl %eax, %eax
jne 0x307a
callq 0x2170
cmpq $0x0, 0x50(%rsp)
je 0x2b05
callq 0x23a0
testl %eax, %eax
jne 0x307a
movq 0x371c(%rip), %rax      # 0x6228
testq %rax, %rax
je 0x2b59
cmpb $0x2f, (%rax)
jne 0x2b7e
movl 0x3714(%rip), %edi      # 0x6230
pushq $0x1
popq %rsi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0x36fe(%rip), %edi      # 0x6230
pushq $0x2
popq %rsi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0x36e8(%rip), %edi      # 0x6230
leal -0x3(%rdi), %eax
cmpl $-0x2, %eax
jb 0x2bea
jmp 0x2bef
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
js 0x3016
pushq $0x2
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
jns 0x2bef
jmp 0x3016
leaq 0xc0(%rsp), %rdi
callq 0x2160
testl %eax, %eax
js 0x3130
callq 0x23a0
testl %eax, %eax
je 0x31d3
cmpl $-0x1, %eax
je 0x3083
movl 0xc4(%rsp), %edi
pushq $0x1
popq %rsi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0xc4(%rsp), %edi
pushq $0x2
popq %rsi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0xc0(%rsp), %edi
callq 0x2140
movl 0xc4(%rsp), %edi
callq 0x2140
cmpq $0x0, 0x3609(%rip)      # 0x6200
je 0x2c1e
movl 0x3609(%rip), %ebx      # 0x6208
callq 0x20b0
leaq 0x1acc(%rip), %rsi      # 0x46d7
movl %ebx, %edi
movl %eax, %edx
xorl %eax, %eax
callq 0x2150
testl %eax, %eax
js 0x31c7
testl %r14d, %r14d
jle 0x2cda
movl $0x80800, %edi          # imm = 0x80800
callq 0x2390
testl %eax, %eax
js 0x3118
movl %eax, %ebx
leaq 0x14ab(%rip), %rdi      # 0x40ed
movl $0x10000, %esi          # imm = 0x10000
xorl %eax, %eax
callq 0x22c0
testl %eax, %eax
js 0x3124
movl %eax, %r14d
movq 0x3370(%rip), %rax      # 0x5fd0
andl $0x0, (%rax)
leaq 0x1422(%rip), %r15      # 0x408c
movl 0x18(%rsp), %edi
movq 0x20(%rsp), %rsi
movq %r15, %rdx
callq 0x22d0
testl %eax, %eax
jle 0x2ccb
cmpl $0x77, %eax
jne 0x2c6a
movq 0x334d(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
callq 0x2360
testq %rax, %rax
je 0x2faa
movq %rax, %r12
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x3298
movq %r12, %rdi
callq 0x2030
movl %r14d, %edi
callq 0x2260
testl %eax, %eax
jns 0x2c6a
leaq 0x1439(%rip), %rsi      # 0x40ff
jmp 0x2fa0
movl %ebx, %edi
callq 0x2140
movl %r14d, %edi
callq 0x2140
movq 0x32ef(%rip), %r15      # 0x5fd0
movl 0x18(%rsp), %eax
cmpl %eax, (%r15)
jge 0x2f6a
testq %rbp, %rbp
je 0x2d03
movq %rbp, %rdi
callq 0x20d0
testl %eax, %eax
js 0x30cb
cmpq $0x0, 0x30(%rsp)
jne 0x2d23
cmpq $0x0, 0x34ed(%rip)      # 0x6200
jne 0x2d23
cmpq $0x0, 0x34f3(%rip)      # 0x6210
je 0x31b6
leaq 0x34ee(%rip), %rdi      # 0x6218
movl $0x80000, %esi          # imm = 0x80000
callq 0x2320
testl %eax, %eax
js 0x3130
leaq 0x7fd(%rip), %r14       # 0x3540
pushq $0x1
popq %rbx
movl %ebx, %edi
movq %r14, %rsi
callq 0x21b0
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x21b0
pushq $0xd
popq %rdi
movq %r14, %rsi
callq 0x21b0
pushq $0xf
popq %rdi
movq %r14, %rsi
callq 0x21b0
pushq $0x11
popq %rdi
movq %r14, %rsi
callq 0x21b0
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0x21b0
pushq $0xc
popq %rdi
movq %r14, %rsi
callq 0x21b0
cmpq $0x0, 0x3476(%rip)      # 0x6210
movslq (%r15), %rax
movq %rax, 0x18(%rsp)
je 0x2ec8
movq 0x58(%rsp), %r14
movl 0x3465(%rip), %edi      # 0x6218
callq 0x35a6
movq 0x3479(%rip), %rax      # 0x6238
movq 0x344a(%rip), %rsi      # 0x6210
movw $0x1, -0x4(%rax,%rsi,8)
xorl %r12d, %r12d
pushq $0x1
popq %r13
pushq $-0x1
popq %rbx
xorl %ebp, %ebp
cmpq %r14, %r12
setb %bpl
movq 0x3451(%rip), %rdi      # 0x6238
movq %r13, %rax
cmpq %rsi, %rax
jae 0x2df9
movw %bp, -0x4(%rdi,%rax,8)
incq %rax
jmp 0x2dea
movl %ebx, %edx
callq 0x2280
testl %eax, %eax
jns 0x2e22
callq 0x2040
movl (%rax), %eax
cmpl $0x4, %eax
je 0x2e19
cmpl $0xb, %eax
jne 0x2f7e
movq 0x33f0(%rip), %rsi      # 0x6210
jmp 0x2de0
movq 0x340f(%rip), %rax      # 0x6238
movq 0x33e0(%rip), %rcx      # 0x6210
testb $0x1, -0x2(%rax,%rcx,8)
je 0x2e6c
callq 0x3604
cmpb $0x11, %al
je 0x2e63
movzbl %al, %eax
cmpl $0x2, %eax
je 0x2f6a
cmpl $0xf, %eax
jne 0x2e6c
jmp 0x2f6a
subq $0x1, %r12
movl $0x0, %eax
cmovbq %rax, %r12
callq 0x3641
testl %eax, %eax
jg 0x2e56
xorl %r15d, %r15d
incq %r15
movq 0x3397(%rip), %rsi      # 0x6210
cmpq %rsi, %r15
jae 0x2dd7
movq 0x33af(%rip), %rax      # 0x6238
testb $0x1, -0x2(%rax,%r15,8)
je 0x2e6f
cmpq %r14, %r12
jae 0x2e6f
movl -0x8(%rax,%r15,8), %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e0
testl %eax, %eax
js 0x2e6f
movl %eax, %ebp
callq 0x23a0
cmpl $-0x1, %eax
je 0x2ebf
testl %eax, %eax
je 0x2ff7
incq %r12
movl %ebp, %edi
callq 0x2140
jmp 0x2e6f
xorl %r12d, %r12d
leaq 0x1132(%rip), %r13      # 0x4004
movq 0x30(%rsp), %r15
callq 0x23a0
testl %eax, %eax
je 0x2fc7
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x3083
xorl %edi, %edi
callq 0x2200
movq %rax, %r14
addq $0x5, %r14
testl %ebp, %ebp
je 0x2f46
callq 0x3604
movzbl %al, %ecx
leal -0xa(%rcx), %edx
cmpl $0x7, %edx
ja 0x2f31
movslq (%r13,%rdx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
xorl %r15d, %r15d
jmp 0x2f38
cmpl %ebp, %eax
cmovel %r12d, %ebp
callq 0x3641
testl %eax, %eax
jne 0x2f20
jmp 0x2efd
decl %ecx
cmpl $0x2, %ecx
jae 0x2efd
movl %ebp, %edi
movl %eax, %esi
callq 0x21f0
xorl %r14d, %r14d
jmp 0x2efd
testl %r15d, %r15d
je 0x2f6a
xorl %edi, %edi
callq 0x2200
movl %ebx, %r15d
cmpq %r14, %rax
jge 0x2ed7
leaq 0x17c9(%rip), %rsi      # 0x472e
jmp 0x3070
xorl %eax, %eax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1791(%rip), %rsi      # 0x4716
jmp 0x2fa0
leaq 0x1229(%rip), %rsi      # 0x41b7
jmp 0x2fa0
leaq 0x121b(%rip), %rsi      # 0x41b2
jmp 0x2fa0
leaq 0x121e(%rip), %rsi      # 0x41be
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x2210
leaq 0x1147(%rip), %rsi      # 0x40f8
jmp 0x2fa0
leaq 0x125b(%rip), %rsi      # 0x4215
pushq $0x1
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2210
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rbx
callq 0x2170
movq %rbx, %rdi
callq 0x34e8
leaq 0x1148(%rip), %rsi      # 0x4131
jmp 0x3070
leaq 0x10b3(%rip), %rsi      # 0x40a8
jmp 0x3070
movl %ebp, %edi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
js 0x3016
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x20f0
testl %eax, %eax
jns 0x30eb
leaq 0x106a(%rip), %rsi      # 0x4087
jmp 0x2fa0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x3274
leaq 0x1127(%rip), %rsi      # 0x415a
pushq $0x1
popq %rdi
movq %r14, %rdx
jmp 0x31af
leaq 0x10c6(%rip), %rsi      # 0x410b
jmp 0x3070
movl %eax, %edi
callq 0x2110
leaq 0x11b3(%rip), %rsi      # 0x4208
pushq $0x1
popq %rdi
movq %rax, %rdx
jmp 0x31af
leaq 0x1130(%rip), %rsi      # 0x4197
jmp 0x3070
leaq 0x1059(%rip), %rsi      # 0x40c9
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x20e0
cmpl $-0x1, %eax
jne 0x3105
leaq 0x1050(%rip), %rsi      # 0x40da
jmp 0x2fa0
movq 0x3192(%rip), %rdx      # 0x6228
leaq 0x1178(%rip), %rsi      # 0x4215
pushq $0x1
popq %rdi
jmp 0x2fc0
movq 0x317c(%rip), %rdx      # 0x6228
leaq 0x10a7(%rip), %rsi      # 0x415a
pushq $0x1
popq %rdi
jmp 0x31af
leaq 0x1630(%rip), %rdi      # 0x46f2
callq 0x20d0
testl %eax, %eax
jns 0x313c
leaq 0x102e(%rip), %rsi      # 0x4100
jmp 0x2fa0
leaq 0x10b1(%rip), %rsi      # 0x418f
jmp 0x2fa0
pushq $0x1
popq %rdi
callq 0x2330
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx,8), %rbx
movl %ebp, %edi
callq 0x2140
jmp 0x2fda
xorl %edi, %edi
callq 0x2070
leaq 0xf65(%rip), %rsi       # 0x4078
jmp 0x2fa0
leaq 0xfc0(%rip), %rsi       # 0x40df
jmp 0x2fa0
leaq 0xfc4(%rip), %rsi       # 0x40ef
jmp 0x2fa0
leaq 0xfcf(%rip), %rsi       # 0x4106
jmp 0x2fa0
movq 0x30dd(%rip), %rax      # 0x6220
testq %rax, %rax
leaq 0x102c(%rip), %r9       # 0x4179
cmovneq %rax, %r9
movq 0x30d0(%rip), %rax      # 0x6228
movq %rax, 0x8(%rsp)
leaq 0x1023(%rip), %rax      # 0x4187
andq $0x0, 0x10(%rsp)
movq %rax, (%rsp)
leaq 0xff7(%rip), %rdi       # 0x416c
leaq 0xff7(%rip), %rdx       # 0x4173
leaq 0xefa(%rip), %rcx       # 0x407d
leaq 0xfec(%rip), %r8        # 0x4176
movq %rdi, %rsi
xorl %eax, %eax
callq 0x2370
leaq 0xfef(%rip), %rsi       # 0x418a
jmp 0x2fa0
leaq 0x104a(%rip), %rsi      # 0x41f1
pushq $0x1
popq %rdi
movq 0x38(%rsp), %rdx
xorl %eax, %eax
callq 0x20e0
movslq (%r15), %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %rdi
callq 0x34e8
leaq 0x150d(%rip), %rsi      # 0x46db
jmp 0x2fa0
leaq 0x1518(%rip), %rdi      # 0x46f2
callq 0x20d0
testl %eax, %eax
js 0x30cb
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
js 0x3016
pushq $0x2
popq %rsi
xorl %edi, %edi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0xc0(%rsp), %edi
xorl %esi, %esi
callq 0x20f0
testl %eax, %eax
js 0x3016
movl 0xc0(%rsp), %edi
callq 0x2140
movl 0xc4(%rsp), %edi
callq 0x2140
movq 0x2fe0(%rip), %rax      # 0x6220
testq %rax, %rax
leaq 0xf2f(%rip), %rcx       # 0x4179
cmovneq %rax, %rcx
movq 0x2fd3(%rip), %r9       # 0x6228
andq $0x0, (%rsp)
leaq 0xf0b(%rip), %rdi       # 0x416c
leaq 0xf0e(%rip), %rdx       # 0x4176
leaq 0xf18(%rip), %r8        # 0x4187
jmp 0x318a