LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_md5_init
void cs_md5_init(cs_md5_ctx *ctx) {
  ctx->buf[0] = 0x67452301;
  ctx->buf[1] = 0xefcdab89;
  ctx->buf[2] = 0x98badcfe;
  ctx->buf[3] = 0x10325476;

  ctx->bits[0] = 0;
  ctx->bits[1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x67452301, (%rax)     # imm = 0x67452301
movq -0x8(%rbp), %rax
movl $0xefcdab89, 0x4(%rax)  # imm = 0xEFCDAB89
movq -0x8(%rbp), %rax
movl $0x98badcfe, 0x8(%rax)  # imm = 0x98BADCFE
movq -0x8(%rbp), %rax
movl $0x10325476, 0xc(%rax)  # imm = 0x10325476
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_md5_update
void cs_md5_update(cs_md5_ctx *ctx, const unsigned char *buf, size_t len) {
  uint32_t t;

  t = ctx->bits[0];
  if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t) ctx->bits[1]++;
  ctx->bits[1] += (uint32_t) len >> 29;

  t = (t >> 3) & 0x3f;

  if (t) {
    unsigned char *p = (unsigned char *) ctx->in + t;

    t = 64 - t;
    if (len < t) {
      memcpy(p, buf, len);
      return;
    }
    memcpy(p, buf, t);
    byteReverse(ctx->in, 16);
    cs_md5_transform(ctx->buf, (uint32_t *) ctx->in);
    buf += t;
    len -= t;
  }

  while (len >= 64) {
    memcpy(ctx->in, buf, 64);
    byteReverse(ctx->in, 16);
    cs_md5_transform(ctx->buf, (uint32_t *) ctx->in);
    buf += 64;
    len -= 64;
  }

  memcpy(ctx->in, buf, len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
shll $0x3, %ecx
addl %ecx, %eax
movq -0x8(%rbp), %rcx
movl %eax, 0x10(%rcx)
cmpl -0x1c(%rbp), %eax
jae 0x5233
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
shrl $0x1d, %ecx
movq -0x8(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl -0x1c(%rbp), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x52f0
movq -0x8(%rbp), %rax
addq $0x18, %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl $0x40, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x529b
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33b0
jmp 0x5361
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x33b0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movl $0x10, %esi
callq 0x5370
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
callq 0x53e0
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x52f2
cmpq $0x40, -0x18(%rbp)
jb 0x534c
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %edx
callq 0x33b0
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movl $0x10, %esi
callq 0x5370
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x18, %rsi
callq 0x53e0
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x40, %rax
movq %rax, -0x18(%rbp)
jmp 0x52f2
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33b0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: byteReverse
static void byteReverse(unsigned char *buf, unsigned longs) {
/* Forrest: MD5 expect LITTLE_ENDIAN, swap if BIG_ENDIAN */
#if BYTE_ORDER == BIG_ENDIAN
  do {
    uint32_t t = (uint32_t)((unsigned) buf[3] << 8 | buf[2]) << 16 |
                 ((unsigned) buf[1] << 8 | buf[0]);
    *(uint32_t *) buf = t;
    buf += 4;
  } while (--longs);
#else
  (void) buf;
  (void) longs;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
orl %ecx, %eax
shll $0x10, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
movq -0x8(%rbp), %rdx
movzbl (%rdx), %edx
orl %edx, %ecx
orl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x537b
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_md5_final
void cs_md5_final(unsigned char digest[16], cs_md5_ctx *ctx) {
  unsigned count;
  unsigned char *p;
  uint32_t *a;

  count = (ctx->bits[0] >> 3) & 0x3F;

  p = ctx->in + count;
  *p++ = 0x80;
  count = 64 - 1 - count;
  if (count < 8) {
    memset(p, 0, count);
    byteReverse(ctx->in, 16);
    cs_md5_transform(ctx->buf, (uint32_t *) ctx->in);
    memset(ctx->in, 0, 56);
  } else {
    memset(p, 0, count - 8);
  }
  byteReverse(ctx->in, 14);

  a = (uint32_t *) ctx->in;
  a[14] = ctx->bits[0];
  a[15] = ctx->bits[1];

  cs_md5_transform(ctx->buf, (uint32_t *) ctx->in);
  byteReverse((unsigned char *) ctx->buf, 4);
  memcpy(digest, ctx->buf, 16);
  memset((char *) ctx, 0, sizeof(*ctx));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x18, %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $-0x80, (%rax)
movl $0x3f, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jae 0x637e
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x3260
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl $0x10, %esi
callq 0x5370
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x53e0
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x3260
jmp 0x6393
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
subl $0x8, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x3260
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movl $0xe, %esi
callq 0x5370
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x53e0
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5370
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x3260
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: blk0
static uint32_t blk0(union char64long16 *block, int i) {
/* Forrest: SHA expect BIG_ENDIAN, swap if LITTLE_ENDIAN */
#if BYTE_ORDER == LITTLE_ENDIAN
  block->l[i] =
      (rol(block->l[i], 24) & 0xFF00FF00) | (rol(block->l[i], 8) & 0x00FF00FF);
#endif
  return block->l[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
shll $0x18, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shrl $0x8, %eax
orl %eax, %edx
andl $0xff00ff00, %edx       # imm = 0xFF00FF00
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movslq -0xc(%rbp), %rsi
movl (%rcx,%rsi,4), %ecx
shrl $0x18, %ecx
orl %ecx, %eax
andl $0xff00ff, %eax         # imm = 0xFF00FF
orl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_sha1_update
void cs_sha1_update(cs_sha1_ctx *context, const unsigned char *data,
                    uint32_t len) {
  uint32_t i, j;

  j = context->count[0];
  if ((context->count[0] += len << 3) < j) context->count[1]++;
  context->count[1] += (len >> 29);
  j = (j >> 3) & 63;
  if ((j + len) > 63) {
    memcpy(&context->buffer[j], data, (i = 64 - j));
    cs_sha1_transform(context->state, context->buffer);
    for (; i + 63 < len; i += 64) {
      cs_sha1_transform(context->state, &data[i]);
    }
    j = 0;
  } else
    i = 0;
  memcpy(&context->buffer[j], &data[i], len - i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
shll $0x3, %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
movl %eax, 0x14(%rcx)
cmpl -0x1c(%rbp), %eax
jae 0x825f
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movl -0x14(%rbp), %ecx
shrl $0x1d, %ecx
movq -0x8(%rbp), %rax
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movl -0x1c(%rbp), %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl -0x14(%rbp), %eax
cmpl $0x3f, %eax
jbe 0x82ef
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
movl -0x1c(%rbp), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movl %eax, %eax
movl %eax, %edx
callq 0x33b0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1c, %rsi
callq 0x6420
movl -0x18(%rbp), %eax
addl $0x3f, %eax
cmpl -0x14(%rbp), %eax
jae 0x82e6
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
addq %rax, %rsi
callq 0x6420
movl -0x18(%rbp), %eax
addl $0x40, %eax
movl %eax, -0x18(%rbp)
jmp 0x82bd
movl $0x0, -0x1c(%rbp)
jmp 0x82f6
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
movl -0x1c(%rbp), %eax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
addq %rax, %rsi
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x33b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_sha1_final
void cs_sha1_final(unsigned char digest[20], cs_sha1_ctx *context) {
  unsigned i;
  unsigned char finalcount[8], c;

  for (i = 0; i < 8; i++) {
    finalcount[i] = (unsigned char) ((context->count[(i >= 4 ? 0 : 1)] >>
                                      ((3 - (i & 3)) * 8)) &
                                     255);
  }
  c = 0200;
  cs_sha1_update(context, &c, 1);
  while ((context->count[0] & 504) != 448) {
    c = 0000;
    cs_sha1_update(context, &c, 1);
  }
  cs_sha1_update(context, finalcount, 8);
  for (i = 0; i < 20; i++) {
    digest[i] =
        (unsigned char) ((context->state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255);
  }
  memset(context, '\0', sizeof(*context));
  memset(&finalcount, '\0', sizeof(finalcount));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jae 0x8393
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %esi
movl $0x1, %ecx
xorl %edx, %edx
cmpl $0x4, %esi
cmovael %edx, %ecx
movslq %ecx, %rcx
movl 0x14(%rax,%rcx,4), %eax
movl -0x14(%rbp), %edx
andl $0x3, %edx
movl $0x3, %ecx
subl %edx, %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
movb %al, %cl
movl -0x14(%rbp), %eax
movb %cl, -0x1c(%rbp,%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8347
movb $-0x80, -0x1d(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1d(%rbp), %rsi
movl $0x1, %edx
callq 0x8220
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0x1f8, %eax            # imm = 0x1F8
cmpl $0x1c0, %eax            # imm = 0x1C0
je 0x83d4
movb $0x0, -0x1d(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1d(%rbp), %rsi
movl $0x1, %edx
callq 0x8220
jmp 0x83a9
movq -0x10(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
movl $0x8, %edx
callq 0x8220
movl $0x0, -0x14(%rbp)
cmpl $0x14, -0x14(%rbp)
jae 0x8430
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0x14(%rbp), %edx
andl $0x3, %edx
movl $0x3, %ecx
subl %edx, %ecx
shll $0x3, %ecx
shrl %cl, %eax
andl $0xff, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x83ed
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x5c, %edx
callq 0x3260
leaq -0x1c(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3260
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_hmac_sha1
void cs_hmac_sha1(const unsigned char *key, size_t keylen,
                  const unsigned char *data, size_t datalen,
                  unsigned char out[20]) {
  cs_sha1_ctx ctx;
  unsigned char buf1[64], buf2[64], tmp_key[20], i;

  if (keylen > sizeof(buf1)) {
    cs_sha1_init(&ctx);
    cs_sha1_update(&ctx, key, keylen);
    cs_sha1_final(tmp_key, &ctx);
    key = tmp_key;
    keylen = sizeof(tmp_key);
  }

  memset(buf1, 0, sizeof(buf1));
  memset(buf2, 0, sizeof(buf2));
  memcpy(buf1, key, keylen);
  memcpy(buf2, key, keylen);

  for (i = 0; i < sizeof(buf1); i++) {
    buf1[i] ^= 0x36;
    buf2[i] ^= 0x5c;
  }

  cs_sha1_init(&ctx);
  cs_sha1_update(&ctx, buf1, sizeof(buf1));
  cs_sha1_update(&ctx, data, datalen);
  cs_sha1_final(out, &ctx);

  cs_sha1_init(&ctx);
  cs_sha1_update(&ctx, buf2, sizeof(buf2));
  cs_sha1_update(&ctx, out, 20);
  cs_sha1_final(out, &ctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x40, -0x10(%rbp)
jbe 0x84ce
leaq -0x84(%rbp), %rdi
callq 0x81c0
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movl %eax, %edx
leaq -0x84(%rbp), %rdi
callq 0x8220
leaq -0x130(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x8330
leaq -0x130(%rbp), %rax
movq %rax, -0x8(%rbp)
movq $0x14, -0x10(%rbp)
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x3260
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x3260
leaq -0xd0(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x33b0
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x33b0
movb $0x0, -0x131(%rbp)
movzbl -0x131(%rbp), %eax
cmpq $0x40, %rax
jae 0x8572
movzbl -0x131(%rbp), %eax
movzbl -0xd0(%rbp,%rax), %ecx
xorl $0x36, %ecx
movb %cl, -0xd0(%rbp,%rax)
movzbl -0x131(%rbp), %eax
movzbl -0x110(%rbp,%rax), %ecx
xorl $0x5c, %ecx
movb %cl, -0x110(%rbp,%rax)
movb -0x131(%rbp), %al
addb $0x1, %al
movb %al, -0x131(%rbp)
jmp 0x8523
leaq -0x84(%rbp), %rdi
callq 0x81c0
leaq -0xd0(%rbp), %rsi
leaq -0x84(%rbp), %rdi
movl $0x40, %edx
callq 0x8220
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq -0x84(%rbp), %rdi
callq 0x8220
movq -0x28(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x8330
leaq -0x84(%rbp), %rdi
callq 0x81c0
leaq -0x110(%rbp), %rsi
leaq -0x84(%rbp), %rdi
movl $0x40, %edx
callq 0x8220
movq -0x28(%rbp), %rsi
leaq -0x84(%rbp), %rdi
movl $0x14, %edx
callq 0x8220
movq -0x28(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0x8330
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mbuf_resize
void mbuf_resize(struct mbuf *a, size_t new_size) {
  if (new_size > a->size || (new_size < a->size && new_size >= a->len)) {
    char *buf = (char *) MBUF_REALLOC(a->buf, new_size);
    /*
     * In case realloc fails, there's not much we can do, except keep things as
     * they are. Note that NULL is a valid return value from realloc when
     * size == 0, but that is covered too.
     */
    if (buf == NULL && new_size != 0) return;
    a->buf = buf;
    a->size = new_size;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x869a
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x86d5
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x86d5
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x34d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x86be
cmpq $0x0, -0x10(%rbp)
je 0x86be
jmp 0x86d5
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_vcmp
int mg_vcmp(const struct mg_str *str1, const char *str2) {
  size_t n2 = strlen(str2), n1 = str1->len;
  int r = strncmp(str1->p, str2, (n1 < n2) ? n1 : n2);
  if (r == 0) {
    return n1 - n2;
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3180
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8b20
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x8b28
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
callq 0x30b0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x8b4f
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x8b55
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_vcasecmp
int mg_vcasecmp(const struct mg_str *str1, const char *str2) {
  size_t n2 = strlen(str2), n1 = str1->len;
  int r = mg_ncasecmp(str1->p, str2, (n1 < n2) ? n1 : n2);
  if (r == 0) {
    return n1 - n2;
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3180
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8bb0
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x8bb8
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rdx
callq 0x8bf0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x8bdf
movq -0x28(%rbp), %rax
subq -0x20(%rbp), %rax
movl %eax, -0x4(%rbp)
jmp 0x8be5
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_ncasecmp
int mg_ncasecmp(const char *s1, const char *s2, size_t len) {
  int diff = 0;

  if (len > 0) do {
      diff = str_util_lowercase(s1++) - str_util_lowercase(s2++);
    } while (diff == 0 && s1[-1] != '\0' && --len > 0);

  return diff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x8c85
jmp 0x8c14
movq -0x8(%rbp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
callq 0xa0a0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
callq 0xa0a0
movl %eax, %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x21(%rbp)
jne 0x8c7c
movq -0x8(%rbp), %rax
movsbl -0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
je 0x8c7c
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
seta %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x8c14
jmp 0x8c85
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_strdup_common
static struct mg_str mg_strdup_common(const struct mg_str s,
                                      int nul_terminate) {
  struct mg_str r = {NULL, 0};
  if (s.len > 0 && s.p != NULL) {
    char *sc = (char *) MG_MALLOC(s.len + (nul_terminate ? 1 : 0));
    if (sc != NULL) {
      memcpy(sc, s.p, s.len);
      if (nul_terminate) sc[s.len] = '\0';
      r.p = sc;
      r.len = s.len;
    }
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x24(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x3260
cmpq $0x0, -0x18(%rbp)
jbe 0x8d5f
cmpq $0x0, -0x20(%rbp)
je 0x8d5f
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cltq
addq %rax, %rdi
callq 0x3420
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8d5d
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x33b0
cmpl $0x0, -0x24(%rbp)
je 0x8d4d
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8d5f
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_strchr
const char *mg_strchr(const struct mg_str s, int c) {
  size_t i;
  for (i = 0; i < s.len; i++) {
    if (s.p[i] == c) return &s.p[i];
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x8e00
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl -0x1c(%rbp), %eax
jne 0x8df0
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8e08
jmp 0x8df2
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x8dc7
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_strcmp
int mg_strcmp(const struct mg_str str1, const struct mg_str str2) {
  size_t i = 0;
  while (i < str1.len && i < str2.len) {
    if (str1.p[i] < str2.p[i]) return -1;
    if (str1.p[i] > str2.p[i]) return 1;
    i++;
  }
  if (i < str1.len) return 1;
  if (i < str2.len) return -1;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x31(%rbp)
jae 0x8e49
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x8e52
jmp 0x8eaa
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jge 0x8e77
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ed7
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jle 0x8e9c
movl $0x1, -0x4(%rbp)
jmp 0x8ed7
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8e2c
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x8ebd
movl $0x1, -0x4(%rbp)
jmp 0x8ed7
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8ed0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8ed7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_strncmp
int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n) {
  struct mg_str s1 = str1;
  struct mg_str s2 = str2;

  if (s1.len > n) {
    s1.len = n;
  }
  if (s2.len > n) {
    s2.len = n;
  }
  return mg_strcmp(s1, s2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x8f2e
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x8f40
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
callq 0x8e10
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_strstr
const char *mg_strstr(const struct mg_str haystack,
                      const struct mg_str needle) {
  size_t i;
  if (needle.len > haystack.len) return NULL;
  for (i = 0; i <= haystack.len - needle.len; i++) {
    if (memcmp(haystack.p + i, needle.p, needle.len) == 0) {
      return haystack.p + i;
    }
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x8f8c
movq $0x0, -0x8(%rbp)
jmp 0x8fe5
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq -0x20(%rbp), %rcx
cmpq %rcx, %rax
ja 0x8fdd
movq -0x18(%rbp), %rdi
addq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x3300
cmpl $0x0, %eax
jne 0x8fcd
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x8fe5
jmp 0x8fcf
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8f94
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: c_itoa
static int c_itoa(char *buf, size_t buf_size, int64_t num, int base, int flags,
                  int field_width) {
  char tmp[40];
  int i = 0, k = 0, neg = 0;

  if (num < 0) {
    neg++;
    num = -num;
  }

  /* Print into temporary buffer - in reverse order */
  do {
    int rem = num % base;
    if (rem < 10) {
      tmp[k++] = '0' + rem;
    } else {
      tmp[k++] = 'a' + (rem - 10);
    }
    num /= base;
  } while (num > 0);

  /* Zero padding */
  if (flags && C_SNPRINTF_FLAG_ZERO) {
    while (k < field_width && k < (int) sizeof(tmp) - 1) {
      tmp[k++] = '0';
    }
  }

  /* And sign */
  if (neg) {
    tmp[k++] = '-';
  }

  /* Now output */
  while (--k >= 0) {
    C_SNPRINTF_APPEND_CHAR(tmp[k]);
  }

  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movl $0x0, -0x54(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
cmpq $0x0, -0x18(%rbp)
jge 0x9cba
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
xorl %eax, %eax
subq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x9cbc
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x60(%rbp)
cmpl $0xa, -0x60(%rbp)
jge 0x9cef
movl -0x60(%rbp), %eax
addl $0x30, %eax
movb %al, %cl
movl -0x58(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x58(%rbp)
cltq
movb %cl, -0x50(%rbp,%rax)
jmp 0x9d0b
movl -0x60(%rbp), %eax
subl $0xa, %eax
addl $0x61, %eax
movb %al, %cl
movl -0x58(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x58(%rbp)
cltq
movb %cl, -0x50(%rbp,%rax)
movslq -0x1c(%rbp), %rcx
movq -0x18(%rbp), %rax
cqto
idivq %rcx
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jg 0x9cbc
cmpl $0x0, -0x20(%rbp)
je 0x9d61
jmp 0x9d2b
movl -0x58(%rbp), %ecx
xorl %eax, %eax
cmpl -0x24(%rbp), %ecx
movb %al, -0x61(%rbp)
jge 0x9d42
cmpl $0x27, -0x58(%rbp)
setl %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x9d4b
jmp 0x9d5f
movl -0x58(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x58(%rbp)
cltq
movb $0x30, -0x50(%rbp,%rax)
jmp 0x9d2b
jmp 0x9d61
cmpl $0x0, -0x5c(%rbp)
je 0x9d79
movl -0x58(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x58(%rbp)
cltq
movb $0x2d, -0x50(%rbp,%rax)
jmp 0x9d7b
movl -0x58(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, %eax
jl 0x9db4
jmp 0x9d8b
movl -0x54(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl %ecx, %eax
jge 0x9da9
movslq -0x58(%rbp), %rax
movb -0x50(%rbp,%rax), %dl
movq -0x8(%rbp), %rax
movslq -0x54(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x9d7b
movl -0x54(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: c_snprintf
int c_snprintf(char *buf, size_t buf_size, const char *fmt, ...) {
  int result;
  va_list ap;
  va_start(ap, fmt);
  result = c_vsnprintf(buf, buf_size, fmt, ap);
  va_end(ap);
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x9dfb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x18, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x9050
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: c_strnstr
const char *c_strnstr(const char *s, const char *find, size_t slen) {
  size_t find_length = strlen(find);
  size_t i;

  for (i = 0; i < slen; i++) {
    if (i + find_length > slen) {
      return NULL;
    }

    if (strncmp(&s[i], find, find_length) == 0) {
      return &s[i];
    }
  }

  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3180
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x9ef3
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x9ebb
movq $0x0, -0x8(%rbp)
jmp 0x9efb
movq -0x10(%rbp), %rdi
addq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x30b0
cmpl $0x0, %eax
jne 0x9ee3
movq -0x10(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x9efb
jmp 0x9ee5
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x9e99
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_to_hex
void cs_to_hex(char *to, const unsigned char *p, size_t len) {
  static const char *hex = "0123456789abcdef";

  for (; len--; p++) {
    *to++ = hex[p[0] >> 4];
    *to++ = hex[p[0] & 0x0f];
  }
  *to = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x9f93
movq 0x1d45c(%rip), %rax     # 0x27398
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
sarl $0x4, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq 0x1d434(%rip), %rax     # 0x27398
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x9f20
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: cs_from_hex
void cs_from_hex(char *to, const char *p, size_t len) {
  size_t i;

  for (i = 0; i < len; i += 2) {
    *to++ = (fourbit(p[i]) << 4) + fourbit(p[i + 1]);
  }
  *to = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xa017
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0xa030
shll $0x4, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %edi
callq 0xa030
movl %eax, %ecx
movl -0x24(%rbp), %eax
addl %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x9fbc
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: fourbit
static int fourbit(int ch) {
  if (ch >= '0' && ch <= '9') {
    return ch - '0';
  } else if (ch >= 'a' && ch <= 'f') {
    return ch - 'a' + 10;
  } else if (ch >= 'A' && ch <= 'F') {
    return ch - 'A' + 10;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x30, -0x8(%rbp)
jl 0xa04e
cmpl $0x39, -0x8(%rbp)
jg 0xa04e
movl -0x8(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x4(%rbp)
jmp 0xa08d
cmpl $0x61, -0x8(%rbp)
jl 0xa068
cmpl $0x66, -0x8(%rbp)
jg 0xa068
movl -0x8(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0xa08d
cmpl $0x41, -0x8(%rbp)
jl 0xa082
cmpl $0x46, -0x8(%rbp)
jg 0xa082
movl -0x8(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movl %eax, -0x4(%rbp)
jmp 0xa08d
jmp 0xa084
jmp 0xa086
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_if_timer
void mg_if_timer(struct mg_connection *c, double now) {
  if (c->ev_timer_time > 0 && now >= c->ev_timer_time) {
    double old_value = c->ev_timer_time;
    c->ev_timer_time = 0;
    mg_call(c, NULL, c->user_data, MG_EV_TIMER, &old_value);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsd 0x78(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xa8ce
movsd -0x10(%rbp), %xmm0
movq -0x8(%rbp), %rax
ucomisd 0x78(%rax), %xmm0
jb 0xa8ce
movq -0x8(%rbp), %rax
movsd 0x78(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x78(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
movl $0x6, %ecx
leaq -0x18(%rbp), %r8
callq 0xa8e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_destroy_conn
void mg_destroy_conn(struct mg_connection *conn, int destroy_if) {
  if (destroy_if) conn->iface->vtable->destroy_conn(conn);
  if (conn->proto_data != NULL && conn->proto_data_destructor != NULL) {
    conn->proto_data_destructor(conn->proto_data);
  }
#if MG_ENABLE_SSL
  mg_ssl_if_conn_free(conn);
#endif
  mbuf_free(&conn->recv_mbuf);
  mbuf_free(&conn->send_mbuf);

  memset(conn, 0, sizeof(*conn));
  MG_FREE(conn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xac1e
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0xac52
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0xac52
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x88(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
addq $0x40, %rdi
callq 0x86e0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x86e0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xd0, %edx
callq 0x3260
movq -0x8(%rbp), %rdi
callq 0x3050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_if_create_iface
struct mg_iface *mg_if_create_iface(const struct mg_iface_vtable *vtable,
                                    struct mg_mgr *mgr) {
  struct mg_iface *iface = (struct mg_iface *) MG_CALLOC(1, sizeof(*iface));
  iface->mgr = mgr;
  iface->data = NULL;
  iface->vtable = vtable;
  return iface;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x3330
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_mgr_free
void mg_mgr_free(struct mg_mgr *m) {
  struct mg_connection *conn, *tmp_conn;

  DBG(("%p", m));
  if (m == NULL) return;
  /* Do one last poll, see https://github.com/cesanta/mongoose/issues/286 */
  mg_mgr_poll(m, 0);

#if MG_ENABLE_BROADCAST
  if (m->ctl[0] != INVALID_SOCKET) closesocket(m->ctl[0]);
  if (m->ctl[1] != INVALID_SOCKET) closesocket(m->ctl[1]);
  m->ctl[0] = m->ctl[1] = INVALID_SOCKET;
#endif

  for (conn = m->active_connections; conn != NULL; conn = tmp_conn) {
    tmp_conn = conn->next;
    mg_close_conn(conn);
  }

  {
    int i;
    for (i = 0; i < m->num_ifaces; i++) {
      m->ifaces[i]->vtable->free(m->ifaces[i]);
      MG_FREE(m->ifaces[i]);
    }
    MG_FREE(m->ifaces);
  }

  MG_FREE((char *) m->nameserver);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x4, %edi
leaq 0x146ed(%rip), %rsi     # 0x1f605
leaq 0x1462b(%rip), %rdx     # 0x1f54a
callq 0x4650
cmpl $0x0, %eax
je 0xaf3b
movq -0x8(%rbp), %rsi
leaq 0x151b9(%rip), %rdi     # 0x200ed
movb $0x0, %al
callq 0x47a0
jmp 0xaf3d
cmpq $0x0, -0x8(%rbp)
jne 0xaf49
jmp 0xb03d
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xb050
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
je 0xaf6a
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x32a0
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x14(%rax)
je 0xaf80
movq -0x8(%rbp), %rax
movl 0x14(%rax), %edi
callq 0x32a0
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x14(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xafc6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb110
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xafa1
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0xb023
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x3050
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xafcd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3050
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3050
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_mgr_poll
time_t mg_mgr_poll(struct mg_mgr *m, int timeout_ms) {
  int i;
  time_t now = 0; /* oh GCC, seriously ? */

  if (m->num_ifaces == 0) {
    LOG(LL_ERROR, ("cannot poll: no interfaces"));
    return 0;
  }

  for (i = 0; i < m->num_ifaces; i++) {
    now = m->ifaces[i]->vtable->poll(m->ifaces[i], timeout_ms);
  }
  return now;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0xb0a7
jmp 0xb073
xorl %edi, %edi
leaq 0x14595(%rip), %rsi     # 0x1f611
leaq 0x144c7(%rip), %rdx     # 0x1f54a
callq 0x4650
cmpl $0x0, %eax
je 0xb09b
leaq 0x14589(%rip), %rdi     # 0x1f61d
movb $0x0, %al
callq 0x47a0
jmp 0xb09d
movq $0x0, -0x8(%rbp)
jmp 0xb0fe
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0xb0f6
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movslq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rdi
movl -0x14(%rbp), %esi
callq *%rax
movq %rax, -0x20(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb0ae
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_close_conn
void mg_close_conn(struct mg_connection *conn) {
  DBG(("%p %lu %d", conn, conn->flags, conn->sock));
#if MG_ENABLE_SSL
  if (conn->flags & MG_F_SSL_HANDSHAKE_DONE) {
    mg_ssl_if_conn_close_notify(conn);
  }
#endif
  mg_remove_conn(conn);
  conn->iface->vtable->destroy_conn(conn);
  mg_call(conn, NULL, conn->user_data, MG_EV_CLOSE, NULL);
  mg_destroy_conn(conn, 0 /* destroy_if */);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x4, %edi
leaq 0x15097(%rip), %rsi     # 0x201bf
leaq 0x1441b(%rip), %rdx     # 0x1f54a
callq 0x4650
cmpl $0x0, %eax
je 0xb15d
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
leaq 0x15077(%rip), %rdi     # 0x201cd
movb $0x0, %al
callq 0x47a0
jmp 0xb15f
movq -0x8(%rbp), %rdi
callq 0x19820
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rdx
xorl %eax, %eax
movl %eax, %r8d
movl $0x5, %ecx
movq %r8, %rsi
callq 0xa8e0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xabf0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_vprintf
int mg_vprintf(struct mg_connection *nc, const char *fmt, va_list ap) {
  char mem[MG_VPRINTF_BUFFER_SIZE], *buf = mem;
  int len;

  if ((len = mg_avprintf(&buf, sizeof(mem), fmt, ap)) > 0) {
    mg_send(nc, buf, len);
  }
  if (buf != mem && buf != NULL) {
    MG_FREE(buf); /* LCOV_EXCL_LINE */
  }               /* LCOV_EXCL_LINE */

  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x64, %esi
callq 0xa1a0
movl %eax, -0x8c(%rbp)
cmpl $0x0, %eax
jle 0xb21c
movq -0x8(%rbp), %rdi
movq -0x88(%rbp), %rsi
movl -0x8c(%rbp), %edx
callq 0xb260
movq -0x88(%rbp), %rax
leaq -0x80(%rbp), %rcx
cmpq %rcx, %rax
je 0xb242
cmpq $0x0, -0x88(%rbp)
je 0xb242
movq -0x88(%rbp), %rdi
callq 0x3050
movl -0x8c(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_send
void mg_send(struct mg_connection *nc, const void *buf, int len) {
  nc->last_io_time = (time_t) mg_time();
  if (nc->flags & MG_F_UDP) {
    nc->iface->vtable->udp_send(nc, buf, len);
  } else {
    nc->iface->vtable->tcp_send(nc, buf, len);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
callq 0xb6e0
cvttsd2si %xmm0, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0xb2bd
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x50(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq *%rax
jmp 0xb2de
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_printf
int mg_printf(struct mg_connection *conn, const char *fmt, ...) {
  int len;
  va_list ap;
  va_start(ap, fmt);
  len = mg_vprintf(conn, fmt, ap);
  va_end(ap);
  return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xb328
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0xb1c0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sfeakes[P]unifi-motion/mongoose.c
// Function: mg_if_accept_new_conn
struct mg_connection *mg_if_accept_new_conn(struct mg_connection *lc) {
  struct mg_add_sock_opts opts;
  struct mg_connection *nc;
  memset(&opts, 0, sizeof(opts));
  nc = mg_create_connection(lc->mgr, lc->handler, opts);
  if (nc == NULL) return NULL;
  nc->listener = lc;
  nc->proto_handler = lc->proto_handler;
  nc->user_data = lc->user_data;
  nc->recv_mbuf_limit = lc->recv_mbuf_limit;
  nc->iface = lc->iface;
  if (lc->flags & MG_F_SSL) nc->flags |= MG_F_SSL;
  mg_add_conn(nc->mgr, nc);
  DBG(("%p %p %d %d", lc, nc, nc->sock, (int) nc->flags));
  return nc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3260
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xb500
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xb402
movq $0x0, -0x8(%rbp)
jmp 0xb4ee
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq 0xc0(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xb48b
movq -0x38(%rbp), %rax
movq 0xc8(%rax), %rcx
orq $0x10, %rcx
movq %rcx, 0xc8(%rax)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0xb5c0
movl $0x4, %edi
leaq 0x14190(%rip), %rsi     # 0x1f638
leaq 0x1409b(%rip), %rdx     # 0x1f54a
callq 0x4650
cmpl $0x0, %eax
je 0xb4e4
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x38(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x38(%rbp), %rax
movq 0xc8(%rax), %rax
movl %eax, %r8d
leaq 0x14171(%rip), %rdi     # 0x1f64e
movb $0x0, %al
callq 0x47a0
jmp 0xb4e6
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)