LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_code_list
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_code_list(struct soap *soap, const struct soap_code_map *code_map, long code)
{ register char *t = soap->tmpbuf;
  if (code_map)
  { while (code_map->string)
    { if (code_map->code & code)
      { register const char *s = code_map->string;
        if (t != soap->tmpbuf)
          *t++ = ' ';
        while (*s && t < soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          *t++ = *s++;
        if (t == soap->tmpbuf + sizeof(soap->tmpbuf) - 1)
          break;
      }
      code_map++;
    }
  }
  *t = '\0';
  return soap->tmpbuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x1c598, %rax          # imm = 0x1C598
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1824a
jmp 0x1815b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x18248
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
je 0x18237
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x1c598, %rcx          # imm = 0x1C598
cmpq %rcx, %rax
je 0x181b1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x20, (%rax)
jmp 0x181b3
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x181e7
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x1c598, %rcx          # imm = 0x1C598
addq $0x400, %rcx            # imm = 0x400
addq $-0x1, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x181f0
jmp 0x18214
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x181b3
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
addq $0x1c598, %rcx          # imm = 0x1C598
addq $0x400, %rcx            # imm = 0x400
addq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x18235
jmp 0x18248
jmp 0x18237
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
jmp 0x1815b
jmp 0x1824a
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x1c598, %rax          # imm = 0x1C598
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_puthex
SOAP_FMAC2
soap_puthex(struct soap *soap, const unsigned char *s, int n)
{ char d[2];
  register int i;
#ifdef WITH_DOM
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (!(soap->dom->data = soap_s2hex(soap, s, NULL, n)))
      return soap->error;
    return SOAP_OK;
  }
#endif
  for (i = 0; i < n; i++)
  { register int m = *s++;
    d[0] = (char)((m >> 4) + (m > 159 ? '7' : '0'));
    m &= 0x0F;
    d[1] = (char)(m + (m > 9 ? '7' : '0'));
    if (soap_send_raw(soap, d, 2))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x193f6
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
sarl $0x4, %eax
movl -0x28(%rbp), %esi
movl $0x30, %ecx
movl $0x37, %edx
cmpl $0x9f, %esi
cmovgl %edx, %ecx
addl %ecx, %eax
movb %al, -0x1e(%rbp)
movl -0x28(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x28(%rbp), %esi
movl $0x30, %ecx
movl $0x37, %edx
cmpl $0x9, %esi
cmovgl %edx, %ecx
addl %ecx, %eax
movb %al, -0x1d(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x1e(%rbp), %rsi
movl $0x2, %edx
callq 0x16bc0
cmpl $0x0, %eax
je 0x193e6
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x193fd
jmp 0x193e8
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1935a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_element_begin_in
SOAP_FMAC2
soap_element_begin_in(struct soap *soap, const char *tag, int nillable, const char *type)
{ if (!soap_peek_element(soap))
  { if (soap->other)
      return soap->error = SOAP_TAG_MISMATCH;
    if (tag && *tag == '-')
      return SOAP_OK;
	//printf("soap_element_begin_in %s %s\r\n", soap->tag, tag);
    if (!(soap->error = soap_match_tag(soap, soap->tag, tag)))
    { soap->peeked = 0;
      if (type && *soap->type && soap_match_tag(soap, soap->type, type))
        return soap->error = SOAP_TYPE;
      if (!nillable && soap->null && (soap->mode & SOAP_XML_STRICT))
        return soap->error = SOAP_NULL;
      if (soap->body)
        soap->level++;
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Begin element found (level=%u) '%s'='%s'\n", soap->level, soap->tag, tag?tag:SOAP_STR_EOS ));
    }
	//else
	//	printf("soap_element_begin_in %s %s failed=%d\r\n", soap->tag, tag,soap->error);
  }
  else if (soap->error == SOAP_NO_TAG && tag && *tag == '-')
    soap->error = SOAP_OK;
  return soap->error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19f40
cmpl $0x0, %eax
jne 0x1b4a9
movq -0x10(%rbp), %rax
cmpw $0x0, 0x1e598(%rax)
je 0x1b3a1
movq -0x10(%rbp), %rax
movl $0x3, 0x1f274(%rax)
movl $0x3, -0x4(%rbp)
jmp 0x1b4e6
cmpq $0x0, -0x18(%rbp)
je 0x1b3c0
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b3c0
movl $0x0, -0x4(%rbp)
jmp 0x1b4e6
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1c998, %rsi          # imm = 0x1C998
movq -0x18(%rbp), %rdx
callq 0x1d4c0
movq -0x10(%rbp), %rcx
movl %eax, 0x1f274(%rcx)
cmpl $0x0, %eax
jne 0x1b4a7
movq -0x10(%rbp), %rax
movw $0x0, 0x1e5f6(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x1b446
movq -0x10(%rbp), %rax
movsbl 0x1d598(%rax), %eax
cmpl $0x0, %eax
je 0x1b446
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1d598, %rsi          # imm = 0x1D598
movq -0x28(%rbp), %rdx
callq 0x1d4c0
cmpl $0x0, %eax
je 0x1b446
movq -0x10(%rbp), %rax
movl $0x4, 0x1f274(%rax)
movl $0x4, -0x4(%rbp)
jmp 0x1b4e6
cmpl $0x0, -0x1c(%rbp)
jne 0x1b484
movq -0x10(%rbp), %rax
movswl 0x1e5ec(%rax), %eax
cmpl $0x0, %eax
je 0x1b484
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x1b484
movq -0x10(%rbp), %rax
movl $0x17, 0x1f274(%rax)
movl $0x17, -0x4(%rbp)
jmp 0x1b4e6
movq -0x10(%rbp), %rax
cmpw $0x0, 0xc166(%rax)
je 0x1b4a5
movq -0x10(%rbp), %rax
movl 0xc168(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc168(%rax)
jmp 0x1b4a7
jmp 0x1b4d9
movq -0x10(%rbp), %rax
cmpl $0x6, 0x1f274(%rax)
jne 0x1b4d7
cmpq $0x0, -0x18(%rbp)
je 0x1b4d7
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1b4d7
movq -0x10(%rbp), %rax
movl $0x0, 0x1f274(%rax)
jmp 0x1b4d9
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_dime_forward
SOAP_FMAC2
soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
{ struct soap_xlist *xp;
  *ptr = NULL;
  *size = 0;
  *id = NULL;
  *type = NULL;
  *options = NULL;
  if (!*soap->href)
    return SOAP_OK;
  *id = soap_strdup(soap, soap->href);
  xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
  if (!xp)
    return soap->error = SOAP_EOM;
  xp->next = soap->xlist;
  xp->ptr = ptr;
  xp->size = size;
  xp->id = *id;
  xp->type = type;
  xp->options = options;
  soap->xlist = xp;
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1d198(%rax)
jne 0x1b55f
movl $0x0, -0x4(%rbp)
jmp 0x1b610
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1d198, %rsi          # imm = 0x1D198
callq 0x1b870
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x30, %edi
callq 0x3250
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x1b5a9
movq -0x10(%rbp), %rax
movl $0x14, 0x1f274(%rax)
movl $0x14, -0x4(%rbp)
jmp 0x1b610
movq -0x10(%rbp), %rax
movq 0x1f310(%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1f310(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_strdup
SOAP_FMAC1
char *
SOAP_FMAC2
soap_strdup(struct soap *soap, const char *s)
{ char *t = NULL;
  if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
    strcpy(t, s);
  return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b8c7
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3100
movq -0x20(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
callq 0x19790
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1b8c7
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3080
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_wstrdup
SOAP_FMAC1
wchar_t *
SOAP_FMAC2
soap_wstrdup(struct soap *soap, const wchar_t *s)
{ wchar_t *t = NULL;
  if (s)
  { size_t n = 0;
    while (s[n])
      n++;
    if ((t = (wchar_t*)soap_malloc(soap, sizeof(wchar_t)*(n+1))))
      memcpy(t, s, sizeof(wchar_t)*(n+1));
  }
  return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1b95d
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x1b923
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1b907
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
shlq $0x2, %rsi
callq 0x19790
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1b95b
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
shlq $0x2, %rdx
callq 0x3230
jmp 0x1b95d
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_pop_block
SOAP_FMAC2
soap_pop_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  if (!b->ptr)
    return;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Pop block\n"));
  p = b->ptr;
  b->size -= *(size_t*)(p + sizeof(char*));
  b->ptr = *(char**)p;
  SOAP_FREE(soap, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1ba26
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1ba33
jmp 0x1ba6e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x3030
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_size_block
SOAP_FMAC2
soap_size_block(struct soap *soap, struct soap_blist *b, size_t n)
{ if (!b)
    b = soap->blist;
  if (b->ptr)
  { b->size -= *(size_t*)(b->ptr + sizeof(char*)) - n;
    *(size_t*)(b->ptr + sizeof(char*)) = n;
  }
  return b->size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1bf56
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1bf90
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
subq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_first_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_first_block(struct soap *soap, struct soap_blist *b)
{ char *p, *q, *r;
  if (!b)
    b = soap->blist;
  p = b->ptr;
  if (!p)
    return NULL;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
  r = NULL;
  do
  { q = *(char**)p;
    *(char**)p = r;
    r = p;
    p = q;
  } while (p);
  b->ptr = r;
  return r + sizeof(char*) + sizeof(size_t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1bfc2
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1bfdf
movq $0x0, -0x8(%rbp)
jmp 0x1c030
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1bfe7
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
addq $0x8, %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_next_block
SOAP_FMAC1
char*
SOAP_FMAC2
soap_next_block(struct soap *soap, struct soap_blist *b)
{ char *p;
  if (!b)
    b = soap->blist;
  p = b->ptr;
  if (p)
  { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Next block\n"));
    b->ptr = *(char**)p;
    SOAP_FREE(soap, p);
    if (b->ptr)
      return b->ptr + sizeof(char*) + sizeof(size_t);
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1c066
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1c0b4
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0x3030
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1c0b2
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c0bc
jmp 0x1c0b4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_putoffsets
SOAP_FMAC1
char *
SOAP_FMAC2
soap_putoffsets(struct soap *soap, const int *offset, int dim)
{ register int i;
  sprintf(soap->arrayOffset, "[%d", offset[0]);
  for (i = 1; i < dim; i++)
    sprintf(soap->arrayOffset + strlen(soap->arrayOffset), ",%d", offset[i]);
  strcat(soap->arrayOffset, "]");
  return soap->arrayOffset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1e198, %rdi          # imm = 0x1E198
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0x1cc2b(%rip), %rsi     # 0x394b6
movb $0x0, %al
callq 0x3320
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1c8ea
movq -0x8(%rbp), %rax
addq $0x1e198, %rax          # imm = 0x1E198
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1e198, %rdi          # imm = 0x1E198
callq 0x3100
movq -0x20(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
leaq 0x1cbe2(%rip), %rsi     # 0x394ba
movb $0x0, %al
callq 0x3320
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1c899
movq -0x8(%rbp), %rdi
addq $0x1e198, %rdi          # imm = 0x1E198
leaq 0x1dc0d(%rip), %rsi     # 0x3a509
callq 0x3310
movq -0x8(%rbp), %rax
addq $0x1e198, %rax          # imm = 0x1E198
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_size
SOAP_FMAC2
soap_size(const int *size, int dim)
{ register int i, n = size[0];
  for (i = 1; i < dim; i++)
    n *= size[i];
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1c960
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1c93b
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getoffsets
SOAP_FMAC2
soap_getoffsets(const char *attr, const int *size, int *offset, int dim)
{ register int i, j = 0;
  if (offset)
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += offset[i] = (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  else
    for (i = 0; i < dim && attr && *attr; i++)
    { attr++;
      j *= size[i];
      j += (int)soap_strtol(attr, NULL, 10);
      attr = strchr(attr, ',');
    }
  return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1ca38
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x25(%rbp)
jge 0x1c9c9
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x25(%rbp)
je 0x1c9c9
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x1c9d2
jmp 0x1ca33
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3220
movq -0x18(%rbp), %rcx
movslq -0x20(%rbp), %rdx
movl %eax, (%rcx,%rdx,4)
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2c, %esi
callq 0x3130
movq %rax, -0x8(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1c9a0
jmp 0x1cac9
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x26(%rbp)
jge 0x1ca68
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x26(%rbp)
je 0x1ca68
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x26(%rbp)
movb -0x26(%rbp), %al
testb $0x1, %al
jne 0x1ca71
jmp 0x1cac7
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
imull -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3220
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2c, %esi
callq 0x3130
movq %rax, -0x8(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1ca3f
jmp 0x1cac9
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getsizes
SOAP_FMAC2
soap_getsizes(const char *attr, int *size, int dim)
{ register int i, k, n;
  if (!*attr)
    return -1;
  i = (int)strlen(attr);
  n = 1;
  do
  { for (i = i-1; i >= 0; i--)
      if (attr[i] == '[' || attr[i] == ',' || attr[i] == ' ')
        break;
    k = (int)soap_strtol(attr + i + 1, NULL, 10);
    n *= size[--dim] = k;
    if (k < 0 || n > SOAP_MAXARRAYSIZE)
      return -1;
  } while (i >= 0 && attr[i] != '[');
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1cc68
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1cd54
movq -0x10(%rbp), %rdi
callq 0x3100
movl %eax, -0x20(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x1cccc
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5b, %eax
je 0x1ccbd
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
je 0x1ccbd
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x1ccbf
jmp 0x1cccc
jmp 0x1ccc1
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1cc84
movq -0x10(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
addq $0x1, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3220
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %edx
addl $-0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %edx, %rdx
movl %eax, (%rcx,%rdx,4)
imull -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x1cd18
cmpl $0xf4240, -0x28(%rbp)   # imm = 0xF4240
jle 0x1cd21
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1cd54
jmp 0x1cd23
xorl %eax, %eax
cmpl $0x0, -0x20(%rbp)
movb %al, -0x29(%rbp)
jl 0x1cd43
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5b, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x1cc7b
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_getposition
SOAP_FMAC2
soap_getposition(const char *attr, int *pos)
{ register int i, n;
  if (!*attr)
    return -1;
  n = 0;
  i = 1;
  do
  { pos[n++] = (int)soap_strtol(attr + i, NULL, 10);
    while (attr[i] && attr[i] != ',' && attr[i] != ']')
      i++;
    if (attr[i] == ',')
      i++;
  } while (n < SOAP_MAXDIMS && attr[i] && attr[i] != ']');
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x1cd85
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1ce7b
movl $0x0, -0x20(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3220
movl %eax, %edx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
je 0x1ce04
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2c, %ecx
movb %al, -0x21(%rbp)
je 0x1ce04
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1ce0d
jmp 0x1ce18
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1cdc3
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2c, %eax
jne 0x1ce32
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ce34
xorl %eax, %eax
cmpl $0x10, -0x20(%rbp)
movb %al, -0x22(%rbp)
jge 0x1ce6a
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x22(%rbp)
je 0x1ce6a
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0x1cd93
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: tcp_error
static const char*
tcp_error(struct soap *soap)
{ register const char *msg = NULL;
  switch (soap->errmode)
  { case 0:
      msg = soap_strerror(soap);
      break;
    case 1:
      msg = "WSAStartup failed";
      break;
    case 2:
    {
#ifndef WITH_LEAN
      msg = soap_code_str(h_error_codes, soap->errnum);
      if (!msg)
#endif
      { sprintf(soap->msgbuf, "TCP/UDP IP error %d", soap->errnum);
        msg = soap->msgbuf;
      }
    }
  }
  return msg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x1f278(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x1ddbb
jmp 0x1dda7
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x1ddca
jmp 0x1ddb1
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x1ddd7
jmp 0x1de2c
movq -0x8(%rbp), %rdi
callq 0x36960
movq %rax, -0x10(%rbp)
jmp 0x1de2c
leaq 0x1c9e6(%rip), %rax     # 0x3a7b7
movq %rax, -0x10(%rbp)
jmp 0x1de2c
movq -0x8(%rbp), %rax
movslq 0x1f27c(%rax), %rsi
leaq 0x25d27(%rip), %rdi     # 0x43b10
callq 0x17f70
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1de2a
movq -0x8(%rbp), %rdi
addq $0x1c198, %rdi          # imm = 0x1C198
movq -0x8(%rbp), %rax
movl 0x1f27c(%rax), %edx
leaq 0x1c9b4(%rip), %rsi     # 0x3a7c9
movb $0x0, %al
callq 0x3320
movq -0x8(%rbp), %rax
addq $0x1c198, %rax          # imm = 0x1C198
movq %rax, -0x10(%rbp)
jmp 0x1de2c
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_closesock
SOAP_FMAC2
soap_closesock(struct soap *soap)
{ register int status = soap->error;
#ifndef WITH_LEANER
  if (status) /* close on error: attachment state is not to be trusted */
  { soap->mime.first = NULL;
    soap->mime.last = NULL;
    soap->dime.first = NULL;
    soap->dime.last = NULL;
  }
#endif
  if (soap->fdisconnect && (soap->error = soap->fdisconnect(soap)))
    return soap->error;
  if (status == SOAP_EOF || status == SOAP_TCP_ERROR || status == SOAP_SSL_ERROR || !soap->keep_alive)
  { if (soap->fclose && (soap->error = soap->fclose(soap)))
      return soap->error;
    soap->keep_alive = 0;
  }
#ifdef WITH_ZLIB
  if (soap->zlib_state == SOAP_ZLIB_DEFLATE)
    deflateEnd(soap->d_stream);
  else if (soap->zlib_state == SOAP_ZLIB_INFLATE)
    inflateEnd(soap->d_stream);
  soap->zlib_state = SOAP_ZLIB_NONE;
#endif
  return soap->error = status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1de9b
movq -0x10(%rbp), %rax
movq $0x0, 0x1f300(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x1f308(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x1f2d8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x1f2e0(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0xbff8(%rax)
je 0x1ded8
movq -0x10(%rbp), %rax
movq 0xbff8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movl %eax, 0x1f274(%rcx)
cmpl $0x0, %eax
je 0x1ded8
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1df52
cmpl $-0x1, -0x14(%rbp)
je 0x1def8
cmpl $0x1c, -0x14(%rbp)
je 0x1def8
cmpl $0x1e, -0x14(%rbp)
je 0x1def8
movq -0x10(%rbp), %rax
cmpw $0x0, 0x1f22c(%rax)
jne 0x1df42
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc020(%rax)
je 0x1df35
movq -0x10(%rbp), %rax
movq 0xc020(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movl %eax, 0x1f274(%rcx)
cmpl $0x0, %eax
je 0x1df35
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1df52
movq -0x10(%rbp), %rax
movw $0x0, 0x1f22c(%rax)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x1f274(%rcx)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: fplugin
static void *
fplugin(struct soap *soap, const char *id)
{ register struct soap_plugin *p;
  for (p = soap->plugins; p; p = p->next)
    if (p->id == id || !strcmp(p->id, id))
      return p->data;
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xbf70(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x1f3c7
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x1f3aa
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x3200
cmpl $0x0, %eax
jne 0x1f3b8
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1f3cf
jmp 0x1f3ba
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1f37f
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_decode_val
SOAP_FMAC1
const char*
SOAP_FMAC2
soap_decode_val(char *buf, size_t len, const char *val)
{ if (*val != '=')
  { *buf = '\0';
    return val;
  }
  return soap_decode(buf, len, val + 1, ",;");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
je 0x22661
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x22681
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x1, %rdx
leaq 0x1713b(%rip), %rcx     # 0x397b3
callq 0x22690
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_hash
SOAP_FMAC2
soap_hash(register const char *s)
{ register size_t h = 0;
  while (*s)
    h = 65599*h + *s++;
  return h % SOAP_IDHASH;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x2302d
imulq $0x1003f, -0x10(%rbp), %rax # imm = 0x1003F
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movsbq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x23000
movq -0x10(%rbp), %rax
movl $0x7cf, %ecx            # imm = 0x7CF
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_is_single
SOAP_FMAC2
soap_is_single(struct soap *soap, struct soap_plist *pp)
{ if (soap->part == SOAP_IN_HEADER)
    return 1;
  if (!pp)
    return 0;
  if (soap->mode & SOAP_IO_LENGTH)
    return pp->mark1 == 0;
  return pp->mark2 == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movswl 0x1e5f0(%rax), %eax
cmpl $0x3, %eax
jne 0x234e5
movl $0x1, -0x4(%rbp)
jmp 0x23532
cmpq $0x0, -0x18(%rbp)
jne 0x234f5
movl $0x0, -0x4(%rbp)
jmp 0x23532
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2351c
movq -0x18(%rbp), %rax
movsbl 0x20(%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x23532
movq -0x18(%rbp), %rax
movsbl 0x21(%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_set_embedded
SOAP_FMAC2
soap_set_embedded(struct soap *soap, struct soap_plist *pp)
{ if (!pp)
    return;
  if (soap->mode & SOAP_IO_LENGTH)
    pp->mark1 = 1;
  else
    pp->mark2 = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x23555
jmp 0x23576
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2356e
movq -0x10(%rbp), %rax
movb $0x1, 0x20(%rax)
jmp 0x23576
movq -0x10(%rbp), %rax
movb $0x1, 0x21(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_free_ns
static void
soap_free_ns(struct soap *soap)
{ register struct soap_nlist *np, *nq;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free namespace stack\n"));
  for (np = soap->nlist; np; np = nq)
  { nq = np->next;
    SOAP_FREE(soap, np);
  }
  soap->nlist = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x239f0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3030
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x239cb
movq -0x8(%rbp), %rax
movq $0x0, 0x88(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_clr_attr
SOAP_FMAC2
soap_clr_attr(struct soap *soap)
{ register struct soap_attribute *tp;
#ifndef WITH_LEAN
  if ((soap->mode & SOAP_XML_CANONICAL))
  { while (soap->attributes)
    { tp = soap->attributes->next;
      if (soap->attributes->value)
        SOAP_FREE(soap, soap->attributes->value);
      SOAP_FREE(soap, soap->attributes);
      soap->attributes = tp;
    }
  }
  else
#endif
  { for (tp = soap->attributes; tp; tp = tp->next)
      tp->visible = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x23be8
jmp 0x23b7f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1e5e0(%rax)
je 0x23be6
movq -0x8(%rbp), %rax
movq 0x1e5e0(%rax), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x1e5e0(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x23bc5
movq -0x8(%rbp), %rax
movq 0x1e5e0(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x3030
movq -0x8(%rbp), %rax
movq 0x1e5e0(%rax), %rdi
callq 0x3030
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1e5e0(%rax)
jmp 0x23b7f
jmp 0x23c17
movq -0x8(%rbp), %rax
movq 0x1e5e0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x23c15
movq -0x10(%rbp), %rax
movw $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x23bf7
jmp 0x23c17
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_end_count
SOAP_FMAC2
soap_end_count(struct soap *soap)
{ DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End of count phase\n"));
#ifndef WITH_LEANER
  if ((soap->mode & SOAP_IO_LENGTH))
  { if (soap->fpreparefinalsend && (soap->error = soap->fpreparefinalsend(soap)))
      return soap->error;
  }
#endif
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x23d6a
movq -0x10(%rbp), %rax
cmpq $0x0, 0xc0a8(%rax)
je 0x23d68
movq -0x10(%rbp), %rax
movq 0xc0a8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movl %eax, 0x1f274(%rcx)
cmpl $0x0, %eax
je 0x23d68
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x23d71
jmp 0x23d6a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_embedded
SOAP_FMAC2
soap_embedded(struct soap *soap, const void *p, int t)
{ struct soap_plist *pp;
  if (soap_pointer_lookup(soap, p, t, &pp))
  { pp->mark1 = 1;
    pp->mark2 = 1;
    DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Embedded %p type=%d mark set to 1\n", p, t));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x20(%rbp), %rcx
callq 0x23340
cmpl $0x0, %eax
je 0x23dbc
movq -0x20(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x21(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_reference
SOAP_FMAC2
soap_reference(struct soap *soap, const void *p, int t)
{ struct soap_plist *pp;
  if (!p || (soap->mode & SOAP_XML_TREE))
    return 1;
  if (soap_pointer_lookup(soap, p, t, &pp))
  { if (pp->mark1 == 0)
    { pp->mark1 = 2;
      pp->mark2 = 2;
    }
  }
  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
  { pp->mark1 = 0;
    pp->mark2 = 0;
  }
  else
    return 1;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Reference %p type=%d (%d %d)\n", p, t, (int)pp->mark1, (int)pp->mark2));
  return pp->mark1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x23dfb
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x23e07
movl $0x1, -0x4(%rbp)
jmp 0x23e87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x28(%rbp), %rcx
callq 0x23340
cmpl $0x0, %eax
je 0x23e3f
movq -0x28(%rbp), %rax
movsbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x23e3d
movq -0x28(%rbp), %rax
movb $0x2, 0x20(%rax)
movq -0x28(%rbp), %rax
movb $0x2, 0x21(%rax)
jmp 0x23e7c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %r8d
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
leaq -0x28(%rbp), %r9
callq 0x23580
cmpl $0x0, %eax
je 0x23e71
movq -0x28(%rbp), %rax
movb $0x0, 0x20(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x21(%rax)
jmp 0x23e7a
movl $0x1, -0x4(%rbp)
jmp 0x23e87
jmp 0x23e7c
movq -0x28(%rbp), %rax
movsbl 0x20(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_array_reference
SOAP_FMAC2
soap_array_reference(struct soap *soap, const void *p, const struct soap_array *a, int n, int t)
{ register int i;
  struct soap_plist *pp;
  if (!p || !a->__ptr)
    return 1;
  i = soap_array_pointer_lookup(soap, p, a, n, t, &pp);
  if (i)
  { if (pp->mark1 == 0)
    { pp->mark1 = 2;
      pp->mark2 = 2;
    }
  }
  else if (!soap_pointer_enter(soap, p, a, n, t, &pp))
    return 1;
  else
  { pp->mark1 = 0;
    pp->mark2 = 0;
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Array reference %p ptr=%p dim=%d type=%d (%d %d)\n", p, a->__ptr, n, t, (int)pp->mark1, (int)pp->mark2));
  return pp->mark1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x23ebc
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x23ec8
movl $0x1, -0x4(%rbp)
jmp 0x23f53
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
leaq -0x38(%rbp), %r9
callq 0x23220
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x23f0c
movq -0x38(%rbp), %rax
movsbl 0x20(%rax), %eax
cmpl $0x0, %eax
jne 0x23f0a
movq -0x38(%rbp), %rax
movb $0x2, 0x20(%rax)
movq -0x38(%rbp), %rax
movb $0x2, 0x21(%rax)
jmp 0x23f48
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
leaq -0x38(%rbp), %r9
callq 0x23580
cmpl $0x0, %eax
jne 0x23f36
movl $0x1, -0x4(%rbp)
jmp 0x23f53
movq -0x38(%rbp), %rax
movb $0x0, 0x20(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0x21(%rax)
jmp 0x23f48
movq -0x38(%rbp), %rax
movsbl 0x20(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_element_begin_out
SOAP_FMAC2
soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *type)
{ if (*tag == '-')
    return SOAP_OK;
  if (soap_element(soap, tag, id, type))
    return soap->error;
#ifdef WITH_DOM
  if (soap_element_start_end_out(soap, NULL))
    return soap->error;
  if (soap->feltbegout)
    return soap->error = soap->feltbegout(soap, tag);
  return SOAP_OK;
#else
  return soap_element_start_end_out(soap, NULL);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x245bc
movl $0x0, -0x4(%rbp)
jmp 0x245f4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rcx
callq 0x28710
cmpl $0x0, %eax
je 0x245e4
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x245f4
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x29a20
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_element_end_out
SOAP_FMAC2
soap_element_end_out(struct soap *soap, const char *tag)
{
#ifndef WITH_LEAN
  const char *s;
#endif
  if (*tag == '-')
    return SOAP_OK;
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element ending tag='%s'\n", tag));
#ifdef WITH_DOM
  if (soap->feltendout && (soap->error = soap->feltendout(soap, tag)))
    return soap->error;
  if ((soap->mode & SOAP_XML_DOM) && soap->dom)
  { if (soap->dom->prnt)
      soap->dom = soap->dom->prnt;
    return SOAP_OK;
  }
#endif
#ifndef WITH_LEAN
  if (soap->mode & SOAP_XML_CANONICAL)
    soap_pop_namespace(soap);
  if (soap->mode & SOAP_XML_INDENT)
  { if (!soap->body)
    { if (soap_send_raw(soap, soap_indent, soap->level < sizeof(soap_indent) ? soap->level : sizeof(soap_indent) - 1))
        return soap->error;
    }
    soap->body = 0;
  }
  if ((soap->mode & SOAP_XML_DEFAULTNS) && (s = strchr(tag, ':')))
  { soap_pop_namespace(soap);
    tag = s + 1;
  }
#endif
  if (soap_send_raw(soap, "</", 2)
   || soap_send(soap, tag))
    return soap->error;
  soap->level--;	/* decrement level just before > */
  return soap_send_raw(soap, ">", 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x246a8
movl $0x0, -0x4(%rbp)
jmp 0x247f2
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x246c2
movq -0x10(%rbp), %rdi
callq 0x1d0d0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x2474e
movq -0x10(%rbp), %rax
cmpw $0x0, 0xc166(%rax)
jne 0x24741
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0xc168(%rax), %eax
cmpq $0xb, %rax
jae 0x24709
movq -0x10(%rbp), %rax
movl 0xc168(%rax), %eax
movq %rax, -0x30(%rbp)
jmp 0x24714
movl $0xa, %eax
movq %rax, -0x30(%rbp)
jmp 0x24714
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x14c97(%rip), %rsi     # 0x393ba
callq 0x16bc0
cmpl $0x0, %eax
je 0x2473f
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x247f2
jmp 0x24741
movq -0x10(%rbp), %rax
movw $0x0, 0xc166(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x2478c
movq -0x18(%rbp), %rdi
movl $0x3a, %esi
callq 0x3130
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x2478c
movq -0x10(%rbp), %rdi
callq 0x1d0d0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x15182(%rip), %rsi     # 0x39919
movl $0x2, %edx
callq 0x16bc0
cmpl $0x0, %eax
jne 0x247b8
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x170a0
cmpl $0x0, %eax
je 0x247c7
movq -0x10(%rbp), %rax
movl 0x1f274(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x247f2
movq -0x10(%rbp), %rax
movl 0xc168(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc168(%rax)
movq -0x10(%rbp), %rdi
leaq 0x15132(%rip), %rsi     # 0x39917
movl $0x1, %edx
callq 0x16bc0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_clr_mime
SOAP_FMAC2
soap_clr_mime(struct soap *soap)
{ soap->omode &= ~SOAP_ENC_MIME;
  soap->mime.first = NULL;
  soap->mime.last = NULL;
  soap->mime.boundary = NULL;
  soap->mime.start = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f300(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f308(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f2e8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x1f2f0(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/stdsoap2.c
// Function: soap_delegate_deletion
SOAP_FMAC2
soap_delegate_deletion(struct soap *soap, struct soap *soap_to)
{ register struct soap_clist *cp;
  register char **q;
#ifdef SOAP_MEM_DEBUG
  register void *p;
  register struct soap_mlist **mp, *mq;
  size_t h;
#endif
  for (q = (char**)&soap->alist; *q; q = *(char***)q)
  {
    if (*(unsigned short*)(char*)(*q - sizeof(unsigned short)) != (unsigned short)SOAP_CANARY)
    {
#ifdef SOAP_MEM_DEBUG
      fprintf(stderr, "Data corruption in dynamic allocation (see logs)\n");
#endif
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Data corruption:\n"));
      DBGHEX(TEST, *q - 200, 200);
      DBGLOG(TEST, SOAP_MESSAGE(fdebug, "\n"));
      soap->error = SOAP_MOE;
      return;
    }
#ifdef SOAP_MEM_DEBUG
    p = (void*)(*q - *(size_t*)(*q + sizeof(void*)));
    h = soap_hash_ptr(p);
    for (mp = &soap->mht[h]; *mp; mp = &(*mp)->next)
    { if ((*mp)->ptr == p)
      { mq = *mp;
        *mp = mq->next;
        mq->next = soap_to->mht[h];
        soap_to->mht[h] = mq;
        break;
      }
    }
#endif
  }
  *q = (char*)soap_to->alist;
  soap_to->alist = soap->alist;
  soap->alist = NULL;
  cp = soap_to->clist;
  if (cp)
  { while (cp->next)
      cp = cp->next;
    cp->next = soap->clist;
  }
  else
    soap_to->clist = soap->clist;
  soap->clist = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x24db8
movq -0x20(%rbp), %rax
movq (%rax), %rax
movzwl -0x2(%rax), %eax
cmpl $0xc0de, %eax           # imm = 0xC0DE
je 0x24da9
movq -0x8(%rbp), %rax
movl $0x15, 0x1f274(%rax)
jmp 0x24e57
jmp 0x24dab
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x24d7a
movq -0x10(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0xa0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x24e32
jmp 0x24e07
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x24e1e
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x24e07
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x24e48
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x98(%rax)
popq %rbp
retq
nopl (%rax)