// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getdime
SOAP_FMAC2
soap_getdime(struct soap *soap)
{ while (soap->dime.flags & SOAP_DIME_CF)
  { if (soap_getdimehdr(soap))
      return soap->error;
    if (soap_move(soap, (long)soap->dime.size))
      return soap->error = SOAP_EOF;
  }
  if (soap_move(soap, (long)(((soap->dime.size+3)&(~3))-soap_tell(soap))))
    return soap->error = SOAP_EOF;
  for (;;)
  { register struct soap_multipart *content;
    if (soap_getdimehdr(soap))
      break;
    if (soap->fdimewriteopen && ((soap->dime.ptr = (char*)soap->fdimewriteopen(soap, soap->dime.id, soap->dime.type, soap->dime.options)) || soap->error))
    { const char *id, *type, *options;
      size_t size, n;
      if (!soap->dime.ptr)
        return soap->error;
      id = soap->dime.id;
      type = soap->dime.type;
      options = soap->dime.options;
      for (;;)
      { size = soap->dime.size;
        for (;;)
        { n = soap->buflen - soap->bufidx;
          if (size < n)
            n = size;
          if ((soap->error = soap->fdimewrite(soap, (void*)soap->dime.ptr, soap->buf + soap->bufidx, n)))
            break;
          size -= n;
          if (!size)
          { soap->bufidx += n;
            break;
          }
          if (soap_recv(soap))
          { soap->error = SOAP_EOF;
            goto end;
          }
        }
        if (soap_move(soap, -(long)soap->dime.size&3))
        { soap->error = SOAP_EOF;
          break;
        }
        if (!(soap->dime.flags & SOAP_DIME_CF))
          break;
        if (soap_getdimehdr(soap))
          break;
      }
end:
      if (soap->fdimewriteclose)
        soap->fdimewriteclose(soap, (void*)soap->dime.ptr);
      soap->dime.size = 0;
      soap->dime.id = id;
      soap->dime.type = type;
      soap->dime.options = options;
    }
    else if (soap->dime.flags & SOAP_DIME_CF)
    { const char *id, *type, *options;
      id = soap->dime.id;
      type = soap->dime.type;
      options = soap->dime.options;
      if (soap_new_block(soap) == NULL)
        return SOAP_EOM;
      for (;;)
      { register soap_wchar c;
        register size_t i;
        register char *s;
        s = (char*)soap_push_block(soap, NULL, soap->dime.size);
        if (!s)
          return soap->error = SOAP_EOM;
        for (i = soap->dime.size; i > 0; i--)
        { if ((int)(c = soap_get1(soap)) == EOF)
            return soap->error = SOAP_EOF;
          *s++ = (char)c;
        }
        if (soap_move(soap, -(long)soap->dime.size&3))
          return soap->error = SOAP_EOF;
        if (!(soap->dime.flags & SOAP_DIME_CF))
          break;
        if (soap_getdimehdr(soap))
          return soap->error;
      }
      soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
      if (!(soap->dime.ptr = soap_save_block(soap, NULL, NULL, 0)))
        return soap->error;
      soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
      soap->dime.id = id;
      soap->dime.type = type;
      soap->dime.options = options;
    }
    else
      soap->dime.ptr = soap_getdimefield(soap, soap->dime.size);
    content = soap_new_multipart(soap, &soap->dime.first, &soap->dime.last, soap->dime.ptr, soap->dime.size);
    if (!content)
      return soap->error = SOAP_EOM;
    content->id = soap->dime.id;
    content->type = soap->dime.type;
    content->options = soap->dime.options;
    if (soap->error)
      return soap->error;
    soap_resolve_attachment(soap, content);
  }
  if (soap->error != SOAP_DIME_END)
    return soap->error;
  return soap->error = SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x19248(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5db47
movq -0x10(%rbp), %rdi
callq 0x68da0
cmpl $0x0, %eax
je 0x5db12
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rsi
callq 0x50e80
cmpl $0x0, %eax
je 0x5db45
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e19c
jmp 0x5dadf
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rax
addq $0x3, %rax
andq $-0x4, %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x50ed0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdi
subq %rax, %rsi
callq 0x50e80
cmpl $0x0, %eax
je 0x5db9e
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e19c
jmp 0x5dba0
movq -0x10(%rbp), %rdi
callq 0x68da0
cmpl $0x0, %eax
je 0x5dbb3
jmp 0x5e16b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x6078(%rax)
je 0x5de01
movq -0x10(%rbp), %rax
movq 0x6078(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x19258(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq 0x19260(%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x19268(%rcx), %rcx
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x19250(%rcx)
cmpq $0x0, %rax
jne 0x5dc19
movq -0x10(%rbp), %rax
cmpl $0x0, 0x19214(%rax)
je 0x5de01
movq -0x10(%rbp), %rax
cmpq $0x0, 0x19250(%rax)
jne 0x5dc39
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rax
movq 0x19258(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x19260(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x19268(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x60f8(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x60f0(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x5dca1
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x6098(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x19250(%rcx), %rsi
movq -0x10(%rbp), %rdx
addq $0x6138, %rdx           # imm = 0x6138
movq -0x10(%rbp), %rcx
addq 0x60f0(%rcx), %rdx
movq -0x40(%rbp), %rcx
callq *%rax
movq -0x10(%rbp), %rcx
movl %eax, 0x19214(%rcx)
cmpl $0x0, %eax
je 0x5dce8
jmp 0x5dd39
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5dd16
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x60f0(%rax), %rcx
movq %rcx, 0x60f0(%rax)
jmp 0x5dd39
movq -0x10(%rbp), %rdi
callq 0x4f9f0
cmpl $0x0, %eax
je 0x5dd34
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
jmp 0x5dd96
jmp 0x5dc75
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %esi
subq 0x19230(%rax), %rsi
andq $0x3, %rsi
callq 0x50e80
cmpl $0x0, %eax
je 0x5dd6a
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
jmp 0x5dd94
movq -0x10(%rbp), %rax
movsbl 0x19248(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x5dd7f
jmp 0x5dd94
movq -0x10(%rbp), %rdi
callq 0x68da0
cmpl $0x0, %eax
je 0x5dd8f
jmp 0x5dd94
jmp 0x5dc66
jmp 0x5dd96
movq -0x10(%rbp), %rax
cmpq $0x0, 0x6088(%rax)
je 0x5ddc0
movq -0x10(%rbp), %rax
movq 0x6088(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x19250(%rcx), %rsi
callq *%rax
movq -0x10(%rbp), %rax
movq $0x0, 0x19230(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19258(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19260(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19268(%rax)
jmp 0x5e0a2
movq -0x10(%rbp), %rax
movsbl 0x19248(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x5e07e
movq -0x10(%rbp), %rax
movq 0x19258(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x19260(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x19268(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x539b0
cmpq $0x0, %rax
jne 0x5de60
movl $0x14, -0x4(%rbp)
jmp 0x5e19c
jmp 0x5de62
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x4f260
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x5de9f
movq -0x10(%rbp), %rax
movl $0x14, 0x19214(%rax)
movl $0x14, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jbe 0x5df66
movq -0x10(%rbp), %rax
movq 0x60f0(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60f8(%rcx), %rax
jb 0x5deec
movq -0x10(%rbp), %rdi
callq 0x4f9f0
cmpl $0x0, %eax
je 0x5deec
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x84(%rbp)
jmp 0x5df17
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rdx
movq 0x60f0(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x60f0(%rdx)
movzbl 0x6138(%rax,%rcx), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $-0x1, %eax
jne 0x5df3f
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e19c
movl -0x5c(%rbp), %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, (%rax)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x5deae
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %esi
subq 0x19230(%rax), %rsi
andq $0x3, %rsi
callq 0x50e80
cmpl $0x0, %eax
je 0x5dfa1
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5e19c
movq -0x10(%rbp), %rax
movsbl 0x19248(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x5dfb6
jmp 0x5dfdb
movq -0x10(%rbp), %rdi
callq 0x68da0
cmpl $0x0, %eax
je 0x5dfd6
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
jmp 0x5de62
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movq 0x10(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x19230(%rax)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rsi
callq 0x54220
movq -0x10(%rbp), %rcx
movq %rax, 0x19250(%rcx)
cmpq $0x0, %rax
jne 0x5e035
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rax
movq 0x19250(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x19230(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19258(%rax)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19260(%rax)
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19268(%rax)
jmp 0x5e0a0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %rsi
callq 0x69060
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19250(%rax)
jmp 0x5e0a2
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x19228, %rsi          # imm = 0x19228
addq $0x50, %rsi
movq -0x10(%rbp), %rdx
addq $0x19228, %rdx          # imm = 0x19228
addq $0x58, %rdx
movq -0x10(%rbp), %rax
movq 0x19250(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x19230(%rax), %r8
callq 0x5be40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5e104
movq -0x10(%rbp), %rax
movl $0x14, 0x19214(%rax)
movl $0x14, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rax
movq 0x19258(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x19260(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x19268(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x19214(%rax)
je 0x5e159
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5e1f0
jmp 0x5dba0
movq -0x10(%rbp), %rax
cmpl $0x23, 0x19214(%rax)
je 0x5e187
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x5e19c
movq -0x10(%rbp), %rax
movl $0x0, 0x19214(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)