// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getmimehdr
SOAP_FMAC2
soap_getmimehdr(struct soap *soap)
{ struct soap_multipart *content;
  do
  { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
      return soap->error;
  }
  while (!*soap->msgbuf);
  if (soap->msgbuf[0] == '-' && soap->msgbuf[1] == '-')
  { char *s = soap->msgbuf + strlen(soap->msgbuf) - 1;
    /* remove white space */
    while (soap_blank(*s))
      s--;
    s[1] = '\0';
    if (soap->mime.boundary)
    { if (strcmp(soap->msgbuf + 2, soap->mime.boundary))
        return soap->error = SOAP_MIME_ERROR;
    }
    else
      soap->mime.boundary = soap_strdup(soap, soap->msgbuf + 2);
    if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
      return soap->error;
  }
  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
    return soap->error = SOAP_EOM;
  content = soap->mime.last;
  for (;;)
  { register char *key = soap->msgbuf;
    register char *val;
    if (!*key)
      break;
    DBGLOG(TEST,SOAP_MESSAGE(fdebug, "MIME header: %s\n", key));
    val = strchr(soap->msgbuf, ':');
    if (val)
    { *val = '\0';
      do val++;
      while (*val && *val <= 32);
      if (!soap_tag_cmp(key, "Content-ID"))
        content->id = soap_strdup(soap, val);
      else if (!soap_tag_cmp(key, "Content-Location"))
        content->location = soap_strdup(soap, val);
      else if (!soap_tag_cmp(key, "Content-Disposition"))
        content->id = soap_strdup(soap, soap_get_header_attribute(soap, val, "name"));
      else if (!soap_tag_cmp(key, "Content-Type"))
        content->type = soap_strdup(soap, val);
      else if (!soap_tag_cmp(key, "Content-Description"))
        content->description = soap_strdup(soap, val);
      else if (!soap_tag_cmp(key, "Content-Transfer-Encoding"))
        content->encoding = (enum soap_mime_encoding)soap_code_int(mime_codes, val, (long)SOAP_MIME_NONE);
    }
    if (soap_getline(soap, key, sizeof(soap->msgbuf)))
      return soap->error;
  }
  return SOAP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x16138, %rsi          # imm = 0x16138
movl $0x400, %edx            # imm = 0x400
callq 0x688e0
cmpl $0x0, %eax
je 0x691fc
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x695a2
jmp 0x691fe
movq -0x10(%rbp), %rax
cmpb $0x0, 0x16138(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x691cc
movq -0x10(%rbp), %rax
movsbl 0x16138(%rax), %eax
cmpl $0x2d, %eax
jne 0x69350
movq -0x10(%rbp), %rax
movsbl 0x16139(%rax), %eax
cmpl $0x2d, %eax
jne 0x69350
movq -0x10(%rbp), %rax
addq $0x16138, %rax          # imm = 0x16138
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x16138, %rdi          # imm = 0x16138
callq 0x3100
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
jl 0x6928b
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setle %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x69294
jmp 0x692a2
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6926a
movq -0x20(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x19288(%rax)
je 0x692f8
movq -0x10(%rbp), %rdi
addq $0x16138, %rdi          # imm = 0x16138
addq $0x2, %rdi
movq -0x10(%rbp), %rax
movq 0x19288(%rax), %rsi
callq 0x3210
cmpl $0x0, %eax
je 0x692f6
movq -0x10(%rbp), %rax
movl $0x24, 0x19214(%rax)
movl $0x24, -0x4(%rbp)
jmp 0x695a2
jmp 0x6931e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x16138, %rsi          # imm = 0x16138
addq $0x2, %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x19288(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x16138, %rsi          # imm = 0x16138
movl $0x400, %edx            # imm = 0x400
callq 0x688e0
cmpl $0x0, %eax
je 0x6934e
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x695a2
jmp 0x69350
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r9d
xorl %ecx, %ecx
movq %r9, %rsi
movq %r9, %rdx
movq %r9, %r8
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x695b0
cmpl $0x0, %eax
je 0x69399
movq -0x10(%rbp), %rax
movl $0x14, 0x19214(%rax)
movl $0x14, -0x4(%rbp)
jmp 0x695a2
movq -0x10(%rbp), %rax
movq 0x192a8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x16138, %rax          # imm = 0x16138
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x693c4
jmp 0x6959b
movq -0x10(%rbp), %rdi
addq $0x16138, %rdi          # imm = 0x16138
movl $0x3a, %esi
callq 0x3130
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x69570
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x3a(%rbp)
je 0x6941c
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setle %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
testb $0x1, %al
jne 0x693ef
movq -0x28(%rbp), %rdi
leaq 0x117f0(%rip), %rsi     # 0x7ac1e
callq 0x4ff40
cmpl $0x0, %eax
jne 0x69455
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6956e
movq -0x28(%rbp), %rdi
leaq 0x117c9(%rip), %rsi     # 0x7ac29
callq 0x4ff40
cmpl $0x0, %eax
jne 0x69487
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x6956c
movq -0x28(%rbp), %rdi
leaq 0x117a8(%rip), %rsi     # 0x7ac3a
callq 0x4ff40
cmpl $0x0, %eax
jne 0x694d4
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
leaq 0x10140(%rip), %rdx     # 0x795f3
callq 0x696a0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6956a
movq -0x28(%rbp), %rdi
leaq 0x1176f(%rip), %rsi     # 0x7ac4e
callq 0x4ff40
cmpl $0x0, %eax
jne 0x69503
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x69568
movq -0x28(%rbp), %rdi
leaq 0x1174d(%rip), %rsi     # 0x7ac5b
callq 0x4ff40
cmpl $0x0, %eax
jne 0x69532
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x538b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x69566
movq -0x28(%rbp), %rdi
leaq 0x11732(%rip), %rsi     # 0x7ac6f
callq 0x4ff40
cmpl $0x0, %eax
jne 0x69564
movq -0x30(%rbp), %rsi
leaq 0x24f3e(%rip), %rdi     # 0x8e490
xorl %eax, %eax
movl %eax, %edx
callq 0x4fed0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
jmp 0x69566
jmp 0x69568
jmp 0x6956a
jmp 0x6956c
jmp 0x6956e
jmp 0x69570
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x688e0
cmpl $0x0, %eax
je 0x69596
movq -0x10(%rbp), %rax
movl 0x19214(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x695a2
jmp 0x693a8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)