LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_logf_exv
static void
munit_logf_exv(MunitLogLevel level, FILE* fp, const char* filename, int line, const char* format, va_list ap) {
  if (level < munit_log_level_visible)
    return;

  switch (level) {
    case MUNIT_LOG_DEBUG:
      fputs("Debug", fp);
      break;
    case MUNIT_LOG_INFO:
      fputs("Info", fp);
      break;
    case MUNIT_LOG_WARNING:
      fputs("Warning", fp);
      break;
    case MUNIT_LOG_ERROR:
      fputs("Error", fp);
      break;
    default:
      munit_logf_ex(MUNIT_LOG_ERROR, filename, line, "Invalid log level (%d)", level);
      return;
  }

  fputs(": ", fp);
  if (filename != NULL)
    fprintf(fp, "%s:%d: ", filename, line);
  vfprintf(fp, format, ap);
  fputc('\n', fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, %r8d
testl %edi, %edi
jne 0x381c
testb $0x1, 0x7eeb(%rip)      # 0xb6fc
jne 0x381c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %r8d
jae 0x3888
movl %r8d, %eax
leaq 0x387c(%rip), %rcx      # 0x70a8
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
movq %rbx, %rsi
callq 0x3120
leaq 0x30c3(%rip), %rdi      # 0x6905
movq %rbx, %rsi
callq 0x3120
testq %r12, %r12
je 0x3865
leaq 0x30aa(%rip), %rsi      # 0x6900
movq %rbx, %rdi
movq %r12, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x31d0
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3270
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3150
leaq 0x305a(%rip), %rcx      # 0x68e9
movl $0x3, %edi
movq %r12, %rsi
movl %ebp, %edx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3720
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_malloc_ex
void*
munit_malloc_ex(const char* filename, int line, size_t size) {
  if (size == 0)
    return NULL;

  void* ptr = calloc(1, size);
  if (MUNIT_UNLIKELY(ptr == NULL)) {
    munit_logf_ex (MUNIT_LOG_ERROR, filename, line, "Failed to allocate %" MUNIT_SIZE_MODIFIER "u bytes.", size);
  }

  return ptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x38ee
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl $0x1, %edi
movq %rdx, %rsi
callq 0x3190
movq %rax, %rbx
testq %rax, %rax
jne 0x38f0
leaq 0x2e28(%rip), %rcx      # 0x6700
movl $0x3, %edi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %r8
xorl %eax, %eax
callq 0x3720
jmp 0x38f0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_rand_uint32
uint32_t
munit_rand_uint32(void) {
  uint32_t old, state;

  do {
    old = munit_atomic_load(&munit_rand_state);
    state = munit_rand_next_state(old);
  } while (!munit_atomic_cas(&munit_rand_state, &old, state));

  return munit_rand_from_state(old);
}

// Assembly:
movl 0x7dda(%rip), %edx      # 0xb6f0
imull $0x2c9277b5, %edx, %ecx # imm = 0x2C9277B5
addl $0x6c1, %ecx            # imm = 0x6C1
movl %edx, %eax
lock
cmpxchgl %ecx, 0x7dc4(%rip)      # 0xb6f0
jne 0x3910
movl %edx, %ecx
shrl $0x1c, %ecx
addb $0x4, %cl
movl %edx, %eax
shrl %cl, %eax
xorl %edx, %eax
imull $0x108ef2d9, %eax, %ecx # imm = 0x108EF2D9
movl %ecx, %eax
shrl $0x16, %eax
xorl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_rand_memory
void
munit_rand_memory(size_t size, uint8_t data[MUNIT_ARRAY_PARAM(size)]) {
  uint32_t old, state;

  do {
    state = old = munit_atomic_load(&munit_rand_state);
    munit_rand_state_memory(&state, size, data);
  } while (!munit_atomic_cas(&munit_rand_state, &old, state));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %r14d, %r15d
andl $0x3, %r15d
movq %rdi, %r13
shrq $0x2, %r13
movl 0x7d81(%rip), %ebp      # 0xb6f0
cmpq $0x4, %r14
jae 0x3980
movl 0x4(%rsp), %ecx
movl %ebp, %edx
movq %rbx, %rdi
jmp 0x39c5
movl %ebp, %r8d
movq %rbx, %rsi
movq %r13, %rax
movl %r8d, %ecx
shrl $0x1c, %ecx
addb $0x4, %cl
movl %r8d, %edi
shrl %cl, %edi
imull $0x2c9277b5, %r8d, %edx # imm = 0x2C9277B5
addl $0x6c1, %edx            # imm = 0x6C1
xorl %r8d, %edi
imull $0x108ef2d9, %edi, %edi # imm = 0x108EF2D9
movl %edi, %ecx
shrl $0x16, %ecx
xorl %edi, %ecx
leaq 0x4(%rsi), %rdi
movl %ecx, (%rsi)
movl %edx, %r8d
movq %rdi, %rsi
decq %rax
jne 0x3989
movl %ecx, 0x4(%rsp)
testq %r15, %r15
je 0x3a0b
movl %edx, %ecx
shrl $0x1c, %ecx
addb $0x4, %cl
movl %edx, %eax
shrl %cl, %eax
imull $0x2c9277b5, %edx, %r12d # imm = 0x2C9277B5
addl $0x6c1, %r12d           # imm = 0x6C1
xorl %edx, %eax
imull $0x108ef2d9, %eax, %eax # imm = 0x108EF2D9
movl %eax, %ecx
shrl $0x16, %ecx
xorl %eax, %ecx
movl %ecx, 0x4(%rsp)
leaq 0x4(%rsp), %rsi
movq %r15, %rdx
callq 0x31e0
movl %r12d, %edx
movl %ebp, %eax
lock
cmpxchgl %edx, 0x7cdb(%rip)      # 0xb6f0
jne 0x3969
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_rand_int_range
int
munit_rand_int_range(int min, int max) {
  if (min > max)
    return munit_rand_int_range(max, min);

  uint64_t range = (((int64_t) max) - ((int64_t) min));
  if (range > INT32_MAX)
    range = INT32_MAX;

  return min + munit_rand_at_most(0, (int32_t) range);
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl %ebx, %eax
movl %edi, %ebx
movl %eax, %edi
cmpl %eax, %ebx
jg 0x3a2d
movslq %eax, %rsi
movslq %ebx, %rax
subq %rax, %rsi
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpq %rax, %rsi
cmovaeq %rax, %rsi
xorl %edi, %edi
callq 0x3a57
addl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_rand_at_most
static int32_t
munit_rand_at_most(uint32_t salt, int32_t max) {
  uint32_t old, state;
  int32_t retval;

  do {
    state = old = munit_atomic_load(&munit_rand_state);
    retval = munit_rand_state_at_most(&state, salt, max);
  } while (!munit_atomic_cas(&munit_rand_state, &old, state));

  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movslq %esi, %r13
incq %r13
leaq 0x2e95(%rip), %r14      # 0x6908
leaq 0x2e9c(%rip), %r15      # 0x6916
movl 0x7c6f(%rip), %r12d     # 0xb6f0
testl %ebx, %ebx
jg 0x3aa2
movl $0x3, %edi
movq %r14, %rsi
movl $0x180, %edx            # imm = 0x180
movq %r15, %rcx
movl %ebx, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x3720
movl $0x80000000, %eax       # imm = 0x80000000
xorl %edx, %edx
divq %r13
movq %rax, %rsi
movl $0x80000000, %eax       # imm = 0x80000000
subq %rdx, %rax
movl %r12d, %edx
movl %edx, %ecx
shrl $0x1c, %ecx
addb $0x4, %cl
movl %edx, %edi
shrl %cl, %edi
xorl %edx, %edi
imull $0x2c9277b5, %edx, %edx # imm = 0x2C9277B5
addl $0x6c1, %edx            # imm = 0x6C1
imull $0x108ef2d9, %edi, %ecx # imm = 0x108EF2D9
movl %ebp, %edi
xorl %ecx, %edi
shrl $0x16, %ecx
xorl %edi, %ecx
cmpl %ecx, %eax
jbe 0x3aba
movl %r12d, %eax
lock
cmpxchgl %edx, 0x7bfe(%rip)      # 0xb6f0
jne 0x3a7a
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_parameters_get
const char*
munit_parameters_get(const MunitParameter params[], const char* key) {
  for (const MunitParameter* param = params ; param != NULL && param->name != NULL ; param++)
    if (strcmp(param->name, key) == 0)
      return param->value;
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x3b43
movq %rdi, %r14
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3b43
movq %rsi, %r15
addq $0x10, %r14
xorl %ebx, %ebx
movq %r15, %rsi
callq 0x31b0
testl %eax, %eax
je 0x3b47
movq (%r14), %rdi
addq $0x10, %r14
testq %rdi, %rdi
jne 0x3b29
jmp 0x3b4b
xorl %ebx, %ebx
jmp 0x3b4b
movq -0x8(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_suite_list_tests
static void
munit_suite_list_tests (const MunitSuite* suite, bool show_params, const char* prefix) {
  size_t pre_l;
  char* pre = munit_maybe_concat(&pre_l, (char*) prefix, (char*) suite->prefix);

  for (const MunitTest* test = suite->tests ;
       test != NULL && test->name != NULL ;
       test++) {
    if (pre != NULL)
      fputs(pre, stdout);
    puts(test->name);

    if (show_params) {
      for (const MunitParameterEnum* params = test->parameters ;
           params != NULL && params->name != NULL ;
           params++) {
        fprintf(stdout, " - %s: ", params->name);
        if (params->values == NULL) {
          puts("Any");
        } else {
          bool first = true;
          for (char** val = params->values ;
               *val != NULL ;
               val++ ) {
            if(!first) {
              fputs(", ", stdout);
            } else {
              first = false;
            }
            fputs(*val, stdout);
          }
          putc('\n', stdout);
        }
      }
    }
  }

  for (const MunitSuite* child_suite = suite->suites ; child_suite != NULL && child_suite->prefix != NULL ; child_suite++) {
    munit_suite_list_tests(child_suite, show_params, pre);
  }

  munit_maybe_free_concat(pre, prefix, suite->prefix);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rax
movl %esi, 0x4(%rsp)
movq %rdi, %rbx
movq (%rdi), %rdx
leaq 0x20(%rsp), %rdi
movq %rax, 0x8(%rsp)
movq %rax, %rsi
callq 0x47a2
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x4746
cmpq $0x0, (%rbx)
je 0x4746
movq 0x5963(%rip), %rbp      # 0x9fd0
leaq 0x28a5(%rip), %r14      # 0x6f19
movq %r15, 0x18(%rsp)
testq %r15, %r15
je 0x468a
movq (%rbp), %rsi
movq %r15, %rdi
callq 0x3120
movq (%rbx), %rdi
callq 0x3070
cmpb $0x0, 0x4(%rsp)
je 0x4732
movq 0x28(%rbx), %r13
testq %r13, %r13
je 0x4732
movq (%r13), %rdx
testq %rdx, %rdx
je 0x4732
movq (%rbp), %rdi
leaq 0x284f(%rip), %rsi      # 0x6f0d
xorl %eax, %eax
callq 0x31d0
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x4719
cmpq $0x0, (%r15)
je 0x4709
addq $0x8, %r15
movb $0x1, %r12b
testb $0x1, %r12b
je 0x46e6
xorl %r12d, %r12d
jmp 0x46f2
movq (%rbp), %rsi
movq %r14, %rdi
callq 0x3120
movq -0x8(%r15), %rdi
movq (%rbp), %rsi
callq 0x3120
cmpq $0x0, (%r15)
leaq 0x8(%r15), %r15
jne 0x46db
movq (%rbp), %rsi
movl $0xa, %edi
callq 0x31c0
jmp 0x4725
leaq 0x27f5(%rip), %rdi      # 0x6f15
callq 0x3070
movq 0x10(%r13), %rdx
addq $0x10, %r13
jmp 0x46ae
cmpq $0x0, 0x30(%rbx)
leaq 0x30(%rbx), %rbx
movq 0x18(%rsp), %r15
jne 0x4679
movq 0x10(%rsp), %rbx
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x4777
cmpq $0x0, (%r14)
je 0x4777
movzbl 0x4(%rsp), %ebp
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x461a
cmpq $0x0, 0x20(%r14)
leaq 0x20(%r14), %r14
jne 0x475f
cmpq 0x8(%rsp), %r15
je 0x478b
cmpq %r15, (%rbx)
je 0x478b
movq %r15, %rdi
callq 0x3030
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_maybe_concat
static char*
munit_maybe_concat(size_t* len, char* prefix, char* suffix) {
  char* res;
  size_t res_l;
  const size_t prefix_l = prefix != NULL ? strlen(prefix) : 0;
  const size_t suffix_l = suffix != NULL ? strlen(suffix) : 0;
  if (prefix_l == 0 && suffix_l == 0) {
    res = NULL;
    res_l = 0;
  } else if (prefix_l == 0 && suffix_l != 0) {
    res = suffix;
    res_l = suffix_l;
  } else if (prefix_l != 0 && suffix_l == 0) {
    res = prefix;
    res_l = prefix_l;
  } else {
    res_l = prefix_l + suffix_l;
    res = malloc(res_l + 1);
    memcpy(res, prefix, prefix_l);
    memcpy(res + prefix_l, suffix, suffix_l);
    res[res_l] = 0;
  }

  if (len != NULL)
    *len = res_l;

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, (%rsp)
testq %rsi, %rsi
je 0x47c9
movq %r15, %rdi
callq 0x30d0
movq %rax, %r12
jmp 0x47cc
xorl %r12d, %r12d
testq %r14, %r14
je 0x47de
movq %r14, %rdi
callq 0x30d0
movq %rax, %r13
jmp 0x47e1
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r12, %rax
orq %r13, %rax
movl $0x0, %ebp
je 0x4857
testq %r12, %r12
sete %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x4808
movq %r13, %rbx
movq %r14, %rbp
jmp 0x4857
testq %r13, %r13
sete %al
testq %r12, %r12
setne %cl
testb %al, %cl
je 0x4820
movq %r12, %rbx
movq %r15, %rbp
jmp 0x4857
leaq (%r12,%r13), %rbx
leaq (%r12,%r13), %rdi
incq %rdi
callq 0x3210
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x31e0
addq %rbp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x31e0
movb $0x0, (%rbp,%rbx)
movq (%rsp), %rax
testq %rax, %rax
je 0x4863
movq %rbx, (%rax)
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_test_runner_run_test_wild
static void
munit_test_runner_run_test_wild(MunitTestRunner* runner,
                                const MunitTest* test,
                                const char* test_name,
                                MunitParameter* params,
                                MunitParameter* p) {
  const MunitParameterEnum* pe;
  for (pe = test->parameters ; pe != NULL && pe->name != NULL ; pe++) {
    if (p->name == pe->name)
      break;
  }

  if (pe == NULL)
    return;

  for (char** values = pe->values ; *values != NULL ; values++) {
    MunitParameter* next = p + 1;
    p->value = *values;
    if (next->name == NULL) {
      munit_test_runner_run_test_with_params(runner, test, params);
    } else {
      munit_test_runner_run_test_wild(runner, test, test_name, params, next);
    }
    if (runner->fatal_failures && (runner->report.failed != 0 || runner->report.errored != 0))
      break;
  }
}

// Assembly:
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x5615
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rax), %rcx
testq %rcx, %rcx
je 0x55a1
movq (%rbx), %rdx
cmpq %rcx, %rdx
je 0x55a1
movq 0x10(%rax), %rcx
addq $0x10, %rax
testq %rcx, %rcx
jne 0x558f
movq 0x8(%rax), %rbp
movq (%rbp), %rax
testq %rax, %rax
je 0x5607
leaq 0x10(%rbx), %r13
addq $0x8, %rbp
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x10(%rbx)
je 0x55d4
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x5560
jmp 0x55e2
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4ea3
cmpb $0x1, 0x5b(%r12)
jne 0x55fa
cmpl $0x0, 0x40(%r12)
jne 0x5607
cmpl $0x0, 0x44(%r12)
jne 0x5607
movq (%rbp), %rax
addq $0x8, %rbp
testq %rax, %rax
jne 0x55b6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_replace_stderr
static int
munit_replace_stderr (FILE* stderr_buf) {
  if (stderr_buf != NULL) {
    const int orig_stderr = dup(STDERR_FILENO);

    int errfd = fileno(stderr_buf);
    if (MUNIT_UNLIKELY(errfd == -1)) {
      exit (EXIT_FAILURE);
      }

    dup2(errfd, STDERR_FILENO);

    return orig_stderr;
  }

  return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x2, %edi
callq 0x3110
movl %eax, %ebx
movq %r14, %rdi
callq 0x3200
cmpl $-0x1, %eax
je 0x569d
movl %eax, %edi
movl $0x2, %esi
callq 0x30e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x3313
// File: /workspace/github_c_makefile_star2_O1/nemequ[P]safe-math/munit/munit.c
// Function: munit_test_runner_print_color
static void
munit_test_runner_print_color(const MunitTestRunner* runner, const char* string, char color) {
  if (runner->colorize)
    fprintf(MUNIT_OUTPUT_FILE, "\x1b[3%cm%s\x1b[39m", color, string);
  else
    fputs(string, MUNIT_OUTPUT_FILE);
}

// Assembly:
movq %rsi, %rcx
movq 0x477a(%rip), %rax      # 0x9fd0
movq (%rax), %rax
cmpb $0x1, 0x58(%rdi)
jne 0x5873
movzbl %dl, %edx
leaq 0x1828(%rip), %rsi      # 0x7091
movq %rax, %rdi
xorl %eax, %eax
jmp 0x31d0
movq %rcx, %rdi
movq %rax, %rsi
jmp 0x3120
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/st.c
// Function: tlinelen
int
tlinelen(int y)
{
	int i = term.col;

	if (term.line[y][i - 1].mode & ATTR_WRAP)
		return i;

	while (i > 0 && term.line[y][i - 1].u == ' ')
		--i;

	return i;
}

// Assembly:
movslq 0xf20b(%rip), %rax      # 0x15754
movq 0xf208(%rip), %rcx      # 0x15758
movslq %edi, %rdx
movq (%rcx,%rdx,8), %rcx
movq %rax, %rdx
shlq $0x4, %rdx
testb $0x1, -0xb(%rcx,%rdx)
jne 0x6585
testl %eax, %eax
jle 0x6585
addq $-0x10, %rcx
movl %eax, %edx
shlq $0x4, %rdx
cmpl $0x20, (%rcx,%rdx)
jne 0x6585
leal -0x1(%rax), %edx
cmpl $0x1, %eax
movl %edx, %eax
jg 0x656d
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/st.c
// Function: ttywrite
void
ttywrite(const char *s, size_t n, int may_echo)
{
	const char *next;

	if (may_echo && IS_SET(MODE_ECHO))
		twrite(s, n, 1);

	if (!IS_SET(MODE_CRLF)) {
		ttywriteraw(s, n);
		return;
	}

	/* This is similar to how the kernel handles ONLCR for ttys */
	while (n > 0) {
		if (*s == '\r') {
			next = s + 1;
			ttywriteraw("\r\n", 2);
		} else {
			next = memchr(s, '\r', n);
			DEFAULT(next, s + n);
			ttywriteraw(s, next - s);
		}
		n -= next - s;
		s = next;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x6c2d
testb $0x10, 0xeb80(%rip)     # 0x1579c
je 0x6c2d
movq %r14, %rdi
movl %ebx, %esi
movl $0x1, %edx
callq 0x6b13
testb $0x8, 0xeb68(%rip)      # 0x1579c
jne 0x6c49
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6ca9
testq %rbx, %rbx
je 0x6c9d
leaq 0x7a01(%rip), %r15      # 0xe656
cmpb $0xd, (%r14)
jne 0x6c69
leaq 0x1(%r14), %r12
movl $0x2, %esi
movq %r15, %rdi
jmp 0x6c8d
movq %r14, %rdi
movl $0xd, %esi
movq %rbx, %rdx
callq 0x5120
leaq (%r14,%rbx), %r12
testq %rax, %rax
cmovneq %rax, %r12
movq %r12, %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x6ca9
addq %r14, %rbx
movq %r12, %r14
subq %r12, %rbx
jne 0x6c55
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/st.c
// Function: tscrollup
void
tscrollup(int orig, int n)
{
	int i;
	Line temp;

	LIMIT(n, 0, term.bot-orig+1);

	tclearregion(0, orig, term.col-1, orig+n-1);
	tsetdirt(orig+n, term.bot);

	for (i = orig; i <= term.bot-n; i++) {
		temp = term.line[i];
		term.line[i] = term.line[i+n];
		term.line[i+n] = temp;
	}

	selscroll(orig, -n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
testl %esi, %esi
js 0x9790
movl 0xc017(%rip), %r14d     # 0x15798
subl %ebx, %r14d
incl %r14d
cmpl %esi, %r14d
cmovgel %esi, %r14d
jmp 0x9793
xorl %r14d, %r14d
movl 0xbfbb(%rip), %edx      # 0x15754
decl %edx
leal (%r14,%rbx), %ebp
leal (%r14,%rbx), %ecx
decl %ecx
xorl %edi, %edi
movl %ebx, %esi
callq 0x7623
movl 0xbfe4(%rip), %esi      # 0x15798
movl %ebp, %edi
callq 0x61fb
movl 0xbfd7(%rip), %eax      # 0x15798
subl %r14d, %eax
subl %ebx, %eax
jl 0x97fb
movslq %ebx, %rdx
movslq %r14d, %rcx
movq 0xbf83(%rip), %rsi      # 0x15758
addq %rdx, %rcx
leaq (%rsi,%rcx,8), %rcx
leaq (%rsi,%rdx,8), %rdx
incl %eax
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq (%rcx,%rsi,8), %r8
movq %r8, (%rdx,%rsi,8)
movq %rdi, (%rcx,%rsi,8)
incq %rsi
cmpl %esi, %eax
jne 0x97e4
negl %r14d
movl %ebx, %edi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x9e45
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/st.c
// Function: tscrolldown
void
tscrolldown(int orig, int n)
{
	int i;
	Line temp;

	LIMIT(n, 0, term.bot-orig+1);

	tsetdirt(orig, term.bot-n);
	tclearregion(0, term.bot-n+1, term.col-1, term.bot);

	for (i = term.bot; i >= orig+n; i--) {
		temp = term.line[i];
		term.line[i] = term.line[i-n];
		term.line[i-n] = temp;
	}

	selscroll(orig, n);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %esi, %esi
js 0x982c
movl 0xbf7b(%rip), %r14d     # 0x15798
subl %ebx, %r14d
incl %r14d
cmpl %esi, %r14d
cmovgel %esi, %r14d
jmp 0x982f
xorl %r14d, %r14d
movl 0xbf63(%rip), %esi      # 0x15798
subl %r14d, %esi
movl %ebx, %edi
callq 0x61fb
movl 0xbf53(%rip), %ecx      # 0x15798
movl %ecx, %esi
subl %r14d, %esi
incl %esi
movl 0xbf02(%rip), %edx      # 0x15754
decl %edx
xorl %edi, %edi
callq 0x7623
movslq 0xbf36(%rip), %rax      # 0x15798
leal (%r14,%rbx), %ecx
cmpl %ecx, %eax
jl 0x98a0
movslq %r14d, %rdi
movslq %ecx, %rcx
movq 0xbee1(%rip), %rdx      # 0x15758
incq %rax
shlq $0x3, %rdi
movq %rdx, %rsi
subq %rdi, %rsi
movq -0x8(%rdx,%rax,8), %rdi
movq -0x8(%rsi,%rax,8), %r8
movq %r8, -0x8(%rdx,%rax,8)
movq %rdi, -0x8(%rsi,%rax,8)
decq %rax
cmpq %rcx, %rax
jg 0x9884
movl %ebx, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9e45
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/x.c
// Function: xloadcols
void
xloadcols(void)
{
	int i;
	static int loaded;
	Color *cp;

	if (loaded) {
		for (cp = dc.col; cp < &dc.col[dc.collen]; ++cp)
			XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
	} else {
		dc.collen = MAX(LEN(colorname), 256);
		dc.col = xmalloc(dc.collen * sizeof(Color));
	}

	for (i = 0; i < dc.collen; i++)
		if (!xloadcolor(i, NULL, &dc.col[i])) {
			if (colorname[i])
				die("could not allocate color '%s'\n", colorname[i]);
			else
				die("could not allocate color %d\n", i);
		}
	loaded = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x1, 0xda72(%rip)      # 0x17b2c
jne 0xa107
cmpq $0x0, 0xda74(%rip)      # 0x17b38
jle 0xa123
movq 0xda63(%rip), %rbx      # 0x17b30
movq 0xdb54(%rip), %rdi      # 0x17c28
movq 0xdbc5(%rip), %rsi      # 0x17ca0
movq 0xdb4e(%rip), %rdx      # 0x17c30
movq %rbx, %rcx
callq 0x55c0
addq $0x10, %rbx
movq 0xda43(%rip), %rax      # 0x17b38
shlq $0x4, %rax
addq 0xda30(%rip), %rax      # 0x17b30
cmpq %rax, %rbx
jb 0xa0cd
jmp 0xa123
movq $0x104, 0xda26(%rip) # imm = 0x104
movl $0x1040, %edi           # imm = 0x1040
callq 0x5e7c
movq %rax, 0xda0d(%rip)      # 0x17b30
cmpq $0x0, 0xda0d(%rip)      # 0x17b38
je 0xa19d
leaq 0x88ec(%rip), %r12      # 0x12a20
leaq 0x4b7c(%rip), %rbx      # 0xecb7
leaq 0x4b56(%rip), %r14      # 0xec98
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0xd9e1(%rip), %rdx      # 0x17b30
addq %r13, %rdx
movl %r15d, %edi
xorl %esi, %esi
callq 0xa1ae
testl %eax, %eax
jne 0xa189
leaq -0x10(%r15), %rax
cmpq $0xf0, %rax
jae 0xa17b
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x5ea6
jmp 0xa189
movq (%r12), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5ea6
incq %r15
addq $0x8, %r12
addq $0x10, %r13
cmpq %r15, 0xd99d(%rip)      # 0x17b38
ja 0xa148
movb $0x1, 0xd988(%rip)      # 0x17b2c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/pajlada[P]st/x.c
// Function: xgetcolor
int
xgetcolor(int x, unsigned char *r, unsigned char *g, unsigned char *b)
{
	if (!BETWEEN(x, 0, dc.collen))
		return 1;

	*r = dc.col[x].color.red >> 8;
	*g = dc.col[x].color.green >> 8;
	*b = dc.col[x].color.blue >> 8;

	return 0;
}

// Assembly:
movl $0x1, %eax
testl %edi, %edi
js 0xa30b
movl %edi, %edi
cmpq %rdi, 0xd85c(%rip)      # 0x17b38
jb 0xa30b
movq 0xd84b(%rip), %rax      # 0x17b30
shlq $0x4, %rdi
movb 0x9(%rax,%rdi), %al
movb %al, (%rsi)
movq 0xd83a(%rip), %rax      # 0x17b30
movb 0xb(%rax,%rdi), %al
movb %al, (%rdx)
movq 0xd82d(%rip), %rax      # 0x17b30
movb 0xd(%rax,%rdi), %al
movb %al, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]kivaloo/bench/bulk_extract/main.c
// Function: callback_range
static int
callback_range(void * cookie,
    const struct kvldskey * key, const struct kvldskey * value)
{
	struct bulkextract_state * C = cookie;

	(void)key; /* UNUSED */
	(void)value; /* UNUSED */

	/* Notify the benchmarking code, and check if we should quit. */
	if (bench_tick(C->B, &C->done)) {
		warnp("bench_tick");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
movq 0x18(%rdi), %rax
leaq 0x14(%rdi), %rsi
movq %rax, %rdi
callq 0x5309
testl %eax, %eax
je 0x27b2
callq 0x2090
cmpl $0x0, (%rax)
je 0x27b6
movq %rax, %rbx
leaq 0x7908(%rip), %rdi      # 0xa0ab
xorl %eax, %eax
callq 0x4f1c
movl $0x0, (%rbx)
jmp 0x27c4
xorl %eax, %eax
jmp 0x27c9
leaq 0x78ee(%rip), %rdi      # 0xa0ab
xorl %eax, %eax
callq 0x503b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: strlcpy2
int strlcpy2(char *dst, const char *src, int size) {
    char *orig = dst;
    if (size) {
	while (--size && (*dst = *src)) {
	    src++; dst++;
	}
	*dst = 0;
    }
    return dst - orig;
}

// Assembly:
movq %rdi, %rax
testl %edx, %edx
je 0x29b5
movq %rdi, %rax
decl %edx
je 0x29b2
movl %edx, %ecx
xorl %eax, %eax
movb (%rsi,%rax), %dl
movb %dl, (%rdi,%rax)
testb %dl, %dl
je 0x29af
incq %rax
cmpl %eax, %ecx
jne 0x299e
addq %rdi, %rax
movb $0x0, (%rax)
subl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: Alert
void Alert(char *fmt, ...) {
    va_list argp;
    struct timeval tv;
    struct tm *tm;

    if (!(global.mode & MODE_QUIET) || (global.mode & (MODE_VERBOSE | MODE_STARTING))) {
	va_start(argp, fmt);

	gettimeofday(&tv, NULL);
	tm=localtime(&tv.tv_sec);
	fprintf(stderr, "[ALERT] %03d/%02d%02d%02d (%d) : ",
		tm->tm_yday, tm->tm_hour, tm->tm_min, tm->tm_sec, (int)getpid());
	vfprintf(stderr, fmt, argp);
	fflush(stderr);
	va_end(argp);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x68(%rsp)
testb %al, %al
je 0x2a6b
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movl $0xd0, %eax
andl 0xa952(%rip), %eax      # 0xd3c8
cmpl $0x10, %eax
jne 0x2a8d
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x130(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0x30(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x2190
movq %r15, %rdi
callq 0x2070
movq 0xa523(%rip), %rcx      # 0xcff8
movq (%rcx), %r15
movl 0x1c(%rax), %ebp
movl 0x8(%rax), %r12d
movl (%rax), %r13d
movl 0x4(%rax), %r14d
callq 0x2100
movl %eax, (%rsp)
leaq 0x765c(%rip), %rsi      # 0xa151
movq %r15, %rdi
movl %ebp, %edx
movl %r12d, %ecx
movl %r14d, %r8d
movl %r13d, %r9d
xorl %eax, %eax
callq 0x2230
movq 0xa4e7(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movq %rbx, %rsi
leaq 0x10(%rsp), %rdx
callq 0x2350
movq 0xa4d0(%rip), %rax      # 0xcff8
movq (%rax), %rdi
callq 0x22b0
jmp 0x2a7b
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: qfprintf
void qfprintf(FILE *out, char *fmt, ...) {
    va_list argp;

    if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
	va_start(argp, fmt);
	vfprintf(out, fmt, argp);
	fflush(out);
	va_end(argp);
    }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2cc1
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movl 0xa701(%rip), %eax      # 0xd3c8
andl $0x50, %eax
cmpl $0x10, %eax
je 0x2d04
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x2350
movq %rbx, %rdi
callq 0x22b0
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: str2sa
struct sockaddr_in *str2sa(char *str) {
    static struct sockaddr_in sa;
    char *c;
    int port;

    memset(&sa, 0, sizeof(sa));
    str=strdup(str);

    if ((c=strrchr(str,':')) != NULL) {
	*c++=0;
	port=atol(c);
    }
    else
	port=0;

    if (*str == '*' || *str == '\0') { /* INADDR_ANY */
	sa.sin_addr.s_addr = INADDR_ANY;
    }
    else if (!inet_pton(AF_INET, str, &sa.sin_addr)) {
	struct hostent *he;

	if ((he = gethostbyname(str)) == NULL) {
	    Alert("Invalid server name: '%s'\n", str);
	}
	else
	    sa.sin_addr = *(struct in_addr *) *(he->h_addr_list);
    }
    sa.sin_port=htons(port);
    sa.sin_family=AF_INET;

    free(str);
    return &sa;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0xa6c9(%rip)     # 0xd3e4
callq 0x23e0
movq %rax, %rbx
movq %rax, %rdi
movl $0x3a, %esi
callq 0x2180
testq %rax, %rax
je 0x2d48
movq %rax, %rdi
incq %rdi
movb $0x0, (%rax)
callq 0x2320
movq %rax, %r14
jmp 0x2d4b
xorl %r14d, %r14d
movzbl (%rbx), %eax
cmpl $0x2a, %eax
je 0x2d57
testl %eax, %eax
jne 0x2d63
movl $0x0, 0xa687(%rip)      # 0xd3e8
jmp 0x2daa
leaq 0xa67e(%rip), %rdx      # 0xd3e8
movl $0x2, %edi
movq %rbx, %rsi
callq 0x2260
testl %eax, %eax
jne 0x2daa
movq %rbx, %rdi
callq 0x2220
testq %rax, %rax
je 0x2d99
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0xa651(%rip)      # 0xd3e8
jmp 0x2daa
leaq 0x73f7(%rip), %rdi      # 0xa197
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2a00
rolw $0x8, %r14w
movw %r14w, 0xa62f(%rip)     # 0xd3e6
leaq 0xa626(%rip), %r14      # 0xd3e4
movw $0x2, 0xa61d(%rip)      # 0xd3e4
movq %rbx, %rdi
callq 0x2050
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: str2net
int str2net(char *str, struct in_addr *addr, struct in_addr *mask) {
    char *c;
    unsigned long len;

    memset(mask, 0, sizeof(*mask));
    memset(addr, 0, sizeof(*addr));
    str=strdup(str);

    if ((c = strrchr(str, '/')) != NULL) {
	*c++ = 0;
        /* c points to the mask */
	if (strchr(c, '.') != NULL) {	    /* dotted notation */
	    if (!inet_pton(AF_INET, c, mask))
		return 0;
	}
	else { /* mask length */
	    char *err;
	    len = strtol(c, &err, 10);
	    if (!*c || (err && *err) || (unsigned)len > 32)
		return 0;
	    if (len)
		mask->s_addr = htonl(0xFFFFFFFFUL << (32 - len));
	    else
		mask->s_addr = 0;
	}
    }
    else {
	mask->s_addr = 0xFFFFFFFF;
    }
    if (!inet_pton(AF_INET, str, addr)) {
	struct hostent *he;

	if ((he = gethostbyname(str)) == NULL) {
	    return 0;
	}
	else
	    *addr = *(struct in_addr *) *(he->h_addr_list);
    }
    free(str);
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rsi)
callq 0x23e0
movq %rax, %r14
movq %rax, %rdi
movl $0x2f, %esi
callq 0x2180
testq %rax, %rax
je 0x2e3c
movq %rax, %r12
incq %r12
movb $0x0, (%rax)
movq %r12, %rdi
movl $0x2e, %esi
callq 0x2160
testq %rax, %rax
je 0x2e7e
movl $0x2, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2260
testl %eax, %eax
jne 0x2e43
jmp 0x2ec9
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
movl $0x2, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2260
testl %eax, %eax
jne 0x2e6f
movq %r14, %rdi
callq 0x2220
testq %rax, %rax
je 0x2ec9
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x2050
movl $0x1, %eax
jmp 0x2ecb
movq %rsp, %rsi
movq %r12, %rdi
movl $0xa, %edx
callq 0x2240
cmpb $0x0, (%r12)
je 0x2ec9
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x2ea3
cmpb $0x0, (%rcx)
jne 0x2ec9
cmpl $0x20, %eax
ja 0x2ec9
leaq 0x20(%rax), %rcx
negq %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
shlq %cl, %rdx
xorl %ecx, %ecx
testq %rax, %rax
bswapl %edx
cmovel %ecx, %edx
movl %edx, (%r15)
jmp 0x2e43
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: tv_delta
unsigned long tv_delta(struct timeval *tv1, struct timeval *tv2) {
    int cmp;
    unsigned long ret;
  

    cmp = tv_cmp(tv1, tv2);
    if (!cmp)
	return 0; /* same dates, null diff */
    else if (cmp < 0) {
	struct timeval *tmp = tv1;
	tv1 = tv2;
	tv2 = tmp;
    }
    ret = (tv1->tv_sec - tv2->tv_sec) * 1000;
    if (tv1->tv_usec > tv2->tv_usec)
	ret += (tv1->tv_usec - tv2->tv_usec) / 1000;
    else
	ret -= (tv2->tv_usec - tv1->tv_usec) / 1000;
    return (unsigned long) ret;
}

// Assembly:
movq (%rsi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rcx, (%rdi)
jl 0x317e
movl $0x1, %eax
jg 0x317e
movq 0x8(%rsi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rcx, 0x8(%rdi)
jl 0x317e
setg %al
movzbl %al, %eax
testl %eax, %eax
je 0x31bc
movq %rsi, %rax
cmovsq %rdi, %rax
cmovsq %rsi, %rdi
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq (%rax), %rcx
imulq $0x3e8, %rcx, %rsi      # imm = 0x3E8
movq 0x8(%rax), %rax
movq %rdx, %rcx
subq %rax, %rcx
jle 0x31bf
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
jmp 0x31cf
xorl %eax, %eax
retq
subq %rdx, %rax
movabsq $-0x20c49ba5e353f7cf, %rcx # imm = 0xDF3B645A1CAC0831
imulq %rcx
movq %rdx, %rax
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x7, %rax
addq %rcx, %rax
addq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: tv_cmp2
static int tv_cmp2(struct timeval *tv1, struct timeval *tv2) {
    if (tv_iseternity(tv1))
	if (tv_iseternity(tv2))
	    return 0; /* same */
	else
	    return 1; /* tv1 later than tv2 */
    else if (tv_iseternity(tv2))
	return -1; /* tv2 later than tv1 */
    
    if (tv1->tv_sec > tv2->tv_sec)
	return 1;
    else if (tv1->tv_sec < tv2->tv_sec)
	return -1;
    else if (tv1->tv_usec > tv2->tv_usec)
	return 1;
    else if (tv1->tv_usec < tv2->tv_usec)
	return -1;
    else
	return 0;
}

// Assembly:
movq (%rdi), %rcx
testq %rcx, %rcx
jne 0x3340
cmpq $0x0, 0x8(%rdi)
je 0x3378
movq (%rsi), %rdx
testq %rdx, %rdx
jne 0x334f
cmpq $0x0, 0x8(%rsi)
je 0x338b
movl $0x1, %eax
cmpq %rdx, %rcx
jg 0x3377
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jl 0x3377
movq 0x8(%rsi), %rcx
movl $0x1, %eax
cmpq %rcx, 0x8(%rdi)
jg 0x3377
setl %al
movzbl %al, %eax
negl %eax
retq
cmpq $0x0, (%rsi)
jne 0x3385
cmpq $0x0, 0x8(%rsi)
je 0x3391
movl $0x1, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: tv_delayfrom
static struct timeval *tv_delayfrom(struct timeval *tv, struct timeval *from, int ms) {
    if (!tv || !from)
	return NULL;
    tv->tv_usec = from->tv_usec + (ms%1000)*1000;
    tv->tv_sec  = from->tv_sec  + (ms/1000);
    while (tv->tv_usec >= 1000000) {
	tv->tv_usec -= 1000000;
	tv->tv_sec++;
    }
    return tv;
}

// Assembly:
testq %rdi, %rdi
je 0x3637
movslq %esi, %rax
imulq $0x10624dd3, %rax, %rdx # imm = 0x10624DD3
movq %rdx, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rdx
addl %ecx, %edx
imull $0x3e8, %edx, %ecx      # imm = 0x3E8
subl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movslq %eax, %r8
addq 0x9e3a(%rip), %r8       # 0xd408
movq %r8, 0x8(%rdi)
movq 0x9e27(%rip), %rcx      # 0xd400
movslq %edx, %rsi
cmpq $0xf4240, %r8           # imm = 0xF4240
jl 0x3631
movl $0x1e847f, %edx         # imm = 0x1E847F
cmpq %rdx, %r8
cmovlq %r8, %rdx
movq %r8, %rax
subq %rdx, %rax
addq $0xf423f, %rax          # imm = 0xF423F
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
mulq %rdx
shrq $0x12, %rdx
addq %rdx, %rcx
imulq $-0xf4240, %rdx, %rax   # imm = 0xFFF0BDC0
movq $-0xf4240, %rdx         # imm = 0xFFF0BDC0
addq %r8, %rdx
addq %rax, %rdx
addq %rsi, %rcx
incq %rcx
movq %rdx, 0x8(%rdi)
jmp 0x3634
addq %rsi, %rcx
movq %rcx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: client_retnclose
void client_retnclose(struct session *s, int len, const char *msg) {
    my_fd_clr(s->cli_fd, StaticReadEvent);
    my_fd_set(s->cli_fd, StaticWriteEvent);
    tv_eternity(&s->crexpire);
    tv_delayfrom(&s->cwexpire, &now, s->proxy->clitimeout);
    shutdown(s->cli_fd, SHUT_RD);
    s->cli_state = CL_STDATA;
    strcpy(s->rep->data, msg);
    s->rep->l = len;
    s->rep->r = s->rep->h = s->rep->lr = s->rep->w = s->rep->data;
    s->rep->r += len;
    s->req->l = 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x48(%rdi), %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
roll %cl, %eax
movq 0x9a08(%rip), %rdi      # 0xd3f8
sarl $0x5, %ecx
movslq %ecx, %rcx
andl %eax, (%rdi,%rcx,4)
movq %rdx, %r14
movl 0x48(%rbx), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %esi, %ebp
movq 0x29a11(%rip), %rdx     # 0x2d420
sarl $0x5, %ecx
movslq %ecx, %rcx
orl %eax, (%rdx,%rcx,4)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
leaq 0x18(%rbx), %rdi
movq 0x40(%rbx), %rax
movl 0x30(%rax), %esi
callq 0x3596
movl 0x48(%rbx), %edi
xorl %esi, %esi
callq 0x2120
movl $0x3, 0x4c(%rbx)
movq 0x60(%rbx), %rax
movq 0x30(%rax), %rdi
movq %r14, %rsi
callq 0x20a0
movq 0x60(%rbx), %rax
movl %ebp, (%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x18(%rax)
movslq %ebp, %rdx
addq %rcx, %rdx
movq %rdx, 0x8(%rax)
movq 0x58(%rbx), %rax
movl $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: client_return
void client_return(struct session *s, int len, const char *msg) {
    my_fd_set(s->cli_fd, StaticWriteEvent);
    tv_delayfrom(&s->cwexpire, &now, s->proxy->clitimeout);
    strcpy(s->rep->data, msg);
    s->rep->l = len;
    s->rep->r = s->rep->h = s->rep->lr = s->rep->w = s->rep->data;
    s->rep->r += len;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x48(%rdi), %ecx
movl $0x1, %eax
shll %cl, %eax
movq %rdx, %r14
movq 0x29986(%rip), %rdx     # 0x2d420
sarl $0x5, %ecx
movslq %ecx, %rcx
orl %eax, (%rdx,%rcx,4)
movl %esi, %ebp
addq $0x18, %rdi
movq 0x40(%rbx), %rax
movl 0x30(%rax), %esi
callq 0x3596
movq 0x60(%rbx), %rax
movq 0x30(%rax), %rdi
movq %r14, %rsi
callq 0x20a0
movq 0x60(%rbx), %rax
movl %ebp, (%rax)
movq 0x30(%rax), %rcx
movq %rcx, 0x10(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, 0x18(%rax)
movslq %ebp, %rdx
addq %rcx, %rdx
movq %rdx, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: buffer_replace
int buffer_replace(struct buffer *b, char *pos, char *end, char *str) {
    int delta;
    int len;

    len = strlen(str);
    delta = len - (end - pos);

    if (delta + b->r >= b->data + BUFSIZE)
	return 0;  /* no space left */

    /* first, protect the end of the buffer */
    memmove(end + delta, end, b->data + b->l - end);

    /* now, copy str over pos */
    memcpy(pos, str,len);

    /* we only move data after the displaced zone */
    if (b->r  > pos) b->r  += delta;
    if (b->w  > pos) b->w  += delta;
    if (b->h  > pos) b->h  += delta;
    if (b->lr > pos) b->lr += delta;
    b->l += delta;

    return delta;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x2130
movq %r14, %rbp
subq %r12, %rbp
addq %rax, %rbp
movslq %ebp, %r13
movq 0x8(%rbx), %rsi
addq %r13, %rsi
movq 0x30(%rbx), %rdx
leaq 0x1000(%rdx), %rdi
xorl %ecx, %ecx
cmpq %rdi, %rsi
jae 0x439c
cltq
movq %rax, (%rsp)
leaq (%r12,%r13), %rdi
movl (%rbx), %eax
addq %rax, %rdx
subq %r12, %rdx
movq %r12, %rsi
callq 0x2300
movq %r14, %rdi
movq %r15, %rsi
movq (%rsp), %rdx
callq 0x2250
movq 0x8(%rbx), %rax
cmpq %r14, %rax
jbe 0x4368
addq %r13, %rax
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jbe 0x4378
addq %r13, %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq %r14, %rax
jbe 0x4388
addq %r13, %rax
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rax
cmpq %r14, %rax
jbe 0x4398
addq %r13, %rax
movq %rax, 0x20(%rbx)
addl %ebp, (%rbx)
movl %ebp, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: buffer_replace2
int buffer_replace2(struct buffer *b, char *pos, char *end, char *str, int len) {
    int delta;

    delta = len - (end - pos);

    if (delta + b->r >= b->data + BUFSIZE)
	return 0;  /* no space left */

    if (b->data + b->l < end)
	/* The data has been stolen, we could have crashed. Maybe we should abort() ? */
	return 0;

    /* first, protect the end of the buffer */
    memmove(end + delta, end, b->data + b->l - end);

    /* now, copy str over pos */
    if (len)
	memcpy(pos, str, len);

    /* we only move data after the displaced zone */
    if (b->r  > pos) b->r  += delta;
    if (b->w  > pos) b->w  += delta;
    if (b->h  > pos) b->h  += delta;
    if (b->lr > pos) b->lr += delta;
    b->l += delta;

    return delta;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl %r14d, %r12d
subl %edx, %r12d
addl %r8d, %r12d
movslq %r12d, %r13
movq 0x8(%rdi), %rsi
addq %r13, %rsi
movq 0x30(%rdi), %rcx
leaq 0x1000(%rcx), %rdi
xorl %eax, %eax
cmpq %rdi, %rsi
jae 0x445a
movl (%rbx), %esi
addq %rsi, %rcx
subq %rdx, %rcx
jb 0x445a
movl %r8d, %ebp
leaq (%rdx,%r13), %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x2300
testl %ebp, %ebp
je 0x4414
movslq %ebp, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2250
movq 0x8(%rbx), %rax
cmpq %r14, %rax
jbe 0x4424
addq %r13, %rax
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rax
cmpq %r14, %rax
jbe 0x4434
addq %r13, %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rax
cmpq %r14, %rax
jbe 0x4444
addq %r13, %rax
movq %rax, 0x18(%rbx)
movq 0x20(%rbx), %rax
cmpq %r14, %rax
jbe 0x4454
addq %r13, %rax
movq %rax, 0x20(%rbx)
addl %r12d, (%rbx)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: buffer_slow_realign
void buffer_slow_realign(struct buffer *buf)
{
    char *end = buf->data + BUFSIZE;
    int off   = buf->data + BUFSIZE - buf->w;

    /* two possible cases :
     *   - the buffer is in one contiguous block, we move it in-place
     *   - the buffer is in two blocks, we move it via the trash
     */
    if (buf->l) {
	int block1 = buf->l;
	int block2 = 0;
	if (buf->r <= buf->w) {
	    /* non-contiguous block */
	    block1 = buf->data + BUFSIZE - buf->w;
	    block2 = buf->r - buf->data;
	}
	if (block2)
	    memcpy(trash, buf->data, block2);
	memmove(buf->data, buf->w, block1);
	if (block2)
	    memcpy(buf->data + block1, trash, block2);
    }

    /* adjust all known pointers */
    buf->w    = buf->data;
    buf->r   += off; if (buf->r   >= end) buf->r   -= BUFSIZE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rsi
leaq 0x1000(%rsi), %r12
movq 0x10(%rdi), %rax
movq %r12, %r13
subq %rax, %r13
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x44f2
movq 0x8(%rbx), %rcx
movl %ecx, %edx
subl %esi, %edx
xorl %r14d, %r14d
cmpq %rax, %rcx
cmovbel %r13d, %ebp
cmovbel %edx, %r14d
movslq %r14d, %r15
testl %r14d, %r14d
je 0x44bf
leaq 0x28f79(%rip), %rdi     # 0x2d430
movq %r15, %rdx
callq 0x2250
movq %r15, (%rsp)
movq 0x10(%rbx), %rsi
movq 0x30(%rbx), %rdi
movslq %ebp, %r15
movq %r15, %rdx
callq 0x2300
testl %r14d, %r14d
je 0x44f2
addq 0x30(%rbx), %r15
leaq 0x28f4a(%rip), %rsi     # 0x2d430
movq %r15, %rdi
movq (%rsp), %rdx
callq 0x2250
movq 0x30(%rbx), %rax
movq %rax, 0x10(%rbx)
movslq %r13d, %rax
addq 0x8(%rbx), %rax
xorl %ecx, %ecx
cmpq %r12, %rax
setb %cl
shll $0xc, %ecx
addq %rcx, %rax
addq $-0x1000, %rax          # imm = 0xF000
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: fd_delete
static void fd_delete(int fd) {
    my_fd_clr(fd, StaticReadEvent);
    my_fd_clr(fd, StaticWriteEvent);
#if defined(ENABLE_EPOLL)
    if (PrevReadEvent) {
	my_fd_clr(fd, PrevReadEvent);
	my_fd_clr(fd, PrevWriteEvent);
    }
#endif

    close(fd);
    fdtab[fd].state = FD_STCLOSE;

    while ((maxfd-1 >= 0) && (fdtab[maxfd-1].state == FD_STCLOSE))
	    maxfd--;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movl %ebx, %ecx
roll %cl, %eax
movq 0x7cb8(%rip), %rcx      # 0xd3f8
movl %edi, %edx
sarl $0x5, %edx
movslq %edx, %rdx
andl %eax, (%rcx,%rdx,4)
movq 0x27cce(%rip), %rcx     # 0x2d420
andl %eax, (%rcx,%rdx,4)
callq 0x21b0
movq 0x7c1f(%rip), %rax      # 0xd380
movslq %ebx, %rcx
shlq $0x5, %rcx
movl $0x0, 0x18(%rax,%rcx)
movl 0x28cd6(%rip), %ecx     # 0x2e44c
testl %ecx, %ecx
jle 0x579a
addq $-0x8, %rax
movl %ecx, %edx
shlq $0x5, %rdx
cmpl $0x0, (%rax,%rdx)
jne 0x579a
leal -0x1(%rcx), %edx
movl %edx, 0x28cb9(%rip)     # 0x2e44c
cmpl $0x1, %ecx
movl %edx, %ecx
jg 0x577e
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: tv_cmp2_ms
static int tv_cmp2_ms(struct timeval *tv1, struct timeval *tv2) {
    if (tv_iseternity(tv1))
	if (tv_iseternity(tv2))
	    return 0; /* same */
	else
	    return 1; /* tv1 later than tv2 */
    else if (tv_iseternity(tv2))
	return -1; /* tv2 later than tv1 */
    
    if (tv1->tv_sec == tv2->tv_sec) {
	if (tv1->tv_usec >= tv2->tv_usec + 1000)
	    return 1;
	else if (tv2->tv_usec >= tv1->tv_usec + 1000)
	    return -1;
	else
	    return 0;
    }
    else if ((tv1->tv_sec > tv2->tv_sec + 1) ||
	     ((tv1->tv_sec == tv2->tv_sec + 1) && (tv1->tv_usec + 1000000 >= tv2->tv_usec + 1000)))
	return 1;
    else if ((tv2->tv_sec > tv1->tv_sec + 1) ||
	     ((tv2->tv_sec == tv1->tv_sec + 1) && (tv2->tv_usec + 1000000 >= tv1->tv_usec + 1000)))
	return -1;
    else
	return 0;
}

// Assembly:
movq (%rdi), %rcx
testq %rcx, %rcx
jne 0x57ab
cmpq $0x0, 0x8(%rdi)
je 0x5821
movq 0x7c4e(%rip), %rdx      # 0xd400
movq 0x7c4f(%rip), %rax      # 0xd408
orq %rdx, %rax
je 0x581b
cmpq %rdx, %rcx
jne 0x57f1
movq 0x8(%rdi), %rcx
movq 0x7c3a(%rip), %rdx      # 0xd408
leaq 0x3e8(%rdx), %rsi
movl $0x1, %eax
cmpq %rsi, %rcx
jge 0x5850
addq $0x3e8, %rcx            # imm = 0x3E8
xorl %eax, %eax
cmpq %rcx, %rdx
setge %al
negl %eax
retq
leaq 0x1(%rdx), %rsi
movl $0x1, %eax
cmpq %rsi, %rcx
jg 0x5850
jne 0x5813
movl $0xf3e58, %esi          # imm = 0xF3E58
addq 0x8(%rdi), %rsi
cmpq 0x7bf7(%rip), %rsi      # 0xd408
jge 0x5850
incq %rcx
cmpq %rcx, %rdx
jle 0x5835
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movq 0x7be0(%rip), %rcx      # 0xd408
xorl %eax, %eax
orq 0x7bcf(%rip), %rcx      # 0xd400
setne %al
retq
jne 0x584e
movl $0xf3e58, %ecx          # imm = 0xF3E58
addq 0x7bc5(%rip), %rcx      # 0xd408
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq 0x8(%rdi), %rcx
jge 0x5850
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: tv_cmp_ms
static int tv_cmp_ms(struct timeval *tv1, struct timeval *tv2) {
    if (tv1->tv_sec == tv2->tv_sec) {
	if (tv2->tv_usec >= tv1->tv_usec + 1000)
	    return -1;
	else if (tv1->tv_usec >= tv2->tv_usec + 1000)
	    return 1;
	else
	    return 0;
    }
    else if ((tv2->tv_sec > tv1->tv_sec + 1) ||
	     ((tv2->tv_sec == tv1->tv_sec + 1) && (tv2->tv_usec + 1000000 >= tv1->tv_usec + 1000)))
	return -1;
    else if ((tv1->tv_sec > tv2->tv_sec + 1) ||
	     ((tv1->tv_sec == tv2->tv_sec + 1) && (tv1->tv_usec + 1000000 >= tv2->tv_usec + 1000)))
	return 1;
    else
	return 0;
}

// Assembly:
movq (%rdi), %rcx
movq (%rsi), %rdx
cmpq %rdx, %rcx
jne 0x6078
movq 0x8(%rsi), %rcx
movq 0x8(%rdi), %rdx
leaq 0x3e8(%rdx), %rsi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rsi, %rcx
jge 0x60b8
addq $0x3e8, %rcx            # imm = 0x3E8
xorl %eax, %eax
cmpq %rcx, %rdx
setge %al
retq
leaq 0x1(%rcx), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %r8, %rdx
jg 0x60b8
jne 0x6098
movl $0xf3e58, %r8d          # imm = 0xF3E58
addq 0x8(%rsi), %r8
cmpq 0x8(%rdi), %r8
jge 0x60b8
incq %rdx
movl $0x1, %eax
cmpq %rdx, %rcx
jg 0x60b8
jne 0x60b6
movl $0xf3e58, %ecx          # imm = 0xF3E58
addq 0x8(%rdi), %rcx
cmpq 0x8(%rsi), %rcx
jge 0x60b8
xorl %eax, %eax
retq