// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_char
static soap_wchar
soap_char(struct soap *soap)
{ char tmp[8];
  register int i;
  register soap_wchar c;
  register char *s = tmp;
  for (i = 0; i < 7; i++)
  { c = soap_get1(soap);
    if (c == ';' || (int)c == EOF)
      break;
    *s++ = (char)c;
  }
  *s = '\0';
  if (*tmp == '#')
  { if (tmp[1] == 'x' || tmp[1] == 'X')
      return (soap_wchar)soap_strtol(tmp + 2, NULL, 16);
    return (soap_wchar)soap_strtol(tmp + 1, NULL, 10);
  }
  if (!strcmp(tmp, "lt"))
    return '<';
  if (!strcmp(tmp, "gt"))
    return '>';
  if (!strcmp(tmp, "amp"))
    return '&';
  if (!strcmp(tmp, "quot"))
    return '"';
  if (!strcmp(tmp, "apos"))
    return '\'';
#ifndef WITH_LEAN
  return (soap_wchar)soap_code_int(html_entity_codes, tmp, SOAP_UNKNOWN_CHAR);
#else
  return SOAP_UNKNOWN_CHAR; /* use this to represent unknown code */
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x7, -0x1c(%rbp)
jge 0x50d65
movq -0x10(%rbp), %rax
movq 0x60f0(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x60f8(%rcx), %rax
jb 0x50d05
movq -0x10(%rbp), %rdi
callq 0x4f9f0
cmpl $0x0, %eax
je 0x50d05
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x2c(%rbp)
jmp 0x50d2d
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, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x3b, -0x20(%rbp)
je 0x50d3f
cmpl $-0x1, -0x20(%rbp)
jne 0x50d41
jmp 0x50d65
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x50ccb
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movsbl -0x18(%rbp), %eax
cmpl $0x23, %eax
jne 0x50dc3
movsbl -0x17(%rbp), %eax
cmpl $0x78, %eax
je 0x50d87
movsbl -0x17(%rbp), %eax
cmpl $0x58, %eax
jne 0x50da5
leaq -0x18(%rbp), %rdi
addq $0x2, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x3230
movl %eax, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
addq $0x1, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x3230
movl %eax, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
leaq 0x27dce(%rip), %rsi     # 0x78b9c
callq 0x3210
cmpl $0x0, %eax
jne 0x50de4
movl $0x3c, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
leaq 0x2a80c(%rip), %rsi     # 0x7b5fb
callq 0x3210
cmpl $0x0, %eax
jne 0x50e02
movl $0x3e, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
leaq 0x2a7f1(%rip), %rsi     # 0x7b5fe
callq 0x3210
cmpl $0x0, %eax
jne 0x50e20
movl $0x26, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
leaq 0x2a7d7(%rip), %rsi     # 0x7b602
callq 0x3210
cmpl $0x0, %eax
jne 0x50e3e
movl $0x22, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rdi
leaq 0x2a7be(%rip), %rsi     # 0x7b607
callq 0x3210
cmpl $0x0, %eax
jne 0x50e5c
movl $0x27, -0x4(%rbp)
jmp 0x50e74
leaq -0x18(%rbp), %rsi
leaq 0x3d6a9(%rip), %rdi     # 0x8e510
movl $0x7f, %edx
callq 0x4fed0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)