// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_get_http_body
static char*
soap_get_http_body(struct soap *soap)
{
#ifndef WITH_LEAN
  register size_t l = 0, n = 0;
  register char *s;
  /* get HTML body of HTTP error content */
  if (!(soap->mode & SOAP_ENC_ZLIB) && (soap->mode & SOAP_IO) != SOAP_IO_CHUNK)
  { n = soap->length;
    if (!n)
      return NULL;
  }
#ifdef WITH_FAST
  soap->labidx = 0;			/* use look-aside buffer */
#else
  if (soap_new_block(soap) == NULL)
    return NULL;
#endif
  for (;;)
  { 
#ifdef WITH_FAST
    register size_t i, k;
    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */
      return NULL;
    s = soap->labbuf + soap->labidx;	/* space to populate */
    k = soap->lablen - soap->labidx;	/* number of bytes available */
    soap->labidx = soap->lablen;	/* claim this space */
#else
    register size_t i, k = SOAP_BLKLEN;
    if (!(s = (char*)soap_push_block(soap, NULL, k)))
      return NULL;
#endif
    for (i = 0; i < k; i++)
    { register soap_wchar c = soap_getchar(soap);
      if ((int)c == EOF)
        goto end;
      *s++ = (char)(c & 0xFF);
      l++;
      if (n > 0 && l >= n)
        goto end;
    }
  }
end:
  *s = '\0';
#ifdef WITH_FAST
  s = soap_strdup(soap, soap->labbuf);
#else
  soap_size_block(soap, NULL, i+1);
  s = soap_save_block(soap, NULL, 0);
#endif
  return s;
#else
  return NULL;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
jne 0x6eac1
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
je 0x6eac1
movq -0x10(%rbp), %rax
movq 0x6118(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6eabf
movq $0x0, -0x8(%rbp)
jmp 0x6ebd8
jmp 0x6eac1
movq -0x10(%rbp), %rax
movq $0x0, 0x6130(%rax)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x51780
cmpl $0x0, %eax
je 0x6eaf2
movq $0x0, -0x8(%rbp)
jmp 0x6ebd8
movq -0x10(%rbp), %rax
movq 0x6120(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x6130(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x6128(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x6130(%rcx), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x6128(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x6130(%rax)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x6ebac
movq -0x10(%rbp), %rdi
callq 0x4fdb0
movl %eax, -0x3c(%rbp)
cmpl $-0x1, -0x3c(%rbp)
jne 0x6eb62
jmp 0x6ebb1
movl -0x3c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x6eb9c
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x6eb9c
jmp 0x6ebb1
jmp 0x6eb9e
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6eb44
jmp 0x6ead0
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x6120(%rax), %rsi
callq 0x538b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)