// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_getattrval
static int
soap_getattrval(struct soap *soap, char *s, size_t n, soap_wchar d)
{ register size_t i;
  for (i = 0; i < n; i++)
  { register soap_wchar c = soap_get(soap);
    switch (c)
    {
    case SOAP_TT:
      *s++ = '<';
      soap_unget(soap, '/');
      break;
    case SOAP_LT:
      *s++ = '<';
      break;
    case SOAP_GT:
      if (d == ' ')
      { soap_unget(soap, c);
        *s = '\0';
        return SOAP_OK;
      }
      *s++ = '>';
      break;
    case SOAP_QT:
      if (c == d)
      { *s = '\0';
        return SOAP_OK;
      }
      *s++ = '"';
      break;
    case SOAP_AP:
      if (c == d)
      { *s = '\0';
        return SOAP_OK;
      }
      *s++ = '\'';
      break;
    case '\t':
    case '\n':
    case '\r':
    case ' ':
    case '/':
      if (d == ' ')
      { soap_unget(soap, c);
        *s = '\0';
        return SOAP_OK;
      }
    default:
      if ((int)c == EOF)
        return soap->error = SOAP_EOF;
      *s++ = (char)c;
    }
  }
  return soap->error = SOAP_EOM;
}

// 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)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x61d57
movq -0x10(%rbp), %rdi
callq 0x503c0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x35, %eax
ja 0x61d11
movq -0x40(%rbp), %rax
leaq 0x184e3(%rip), %rcx     # 0x7a0ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x3c, (%rax)
movq -0x10(%rbp), %rax
movl $0x2f, 0x6100(%rax)
jmp 0x61d44
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x3c, (%rax)
jmp 0x61d44
cmpl $0x20, -0x24(%rbp)
jne 0x61c74
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6100(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x61d6c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x3e, (%rax)
jmp 0x61d44
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x61ca6
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x61d6c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x22, (%rax)
jmp 0x61d44
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x61cd8
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x61d6c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
jmp 0x61d44
cmpl $0x20, -0x24(%rbp)
jne 0x61d0f
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x6100(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x61d6c
jmp 0x61d11
cmpl $-0x1, -0x34(%rbp)
jne 0x61d2e
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x19214(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x61d6c
movl -0x34(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x61d46
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x61bcf
movq -0x10(%rbp), %rax
movl $0x14, 0x19214(%rax)
movl $0x14, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)