// File: /workspace/github_c_makefile_star2_O0/hkshenSmart[P]ONVIF-discovery_cs/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 0x2aca7
movq -0x10(%rbp), %rdi
callq 0x18260
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x35, %eax
ja 0x2ac61
movq -0x40(%rbp), %rax
leaq 0xe387(%rip), %rcx      # 0x38ee0
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, 0xc160(%rax)
jmp 0x2ac94
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x3c, (%rax)
jmp 0x2ac94
cmpl $0x20, -0x24(%rbp)
jne 0x2abc4
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc160(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2acbc
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x3e, (%rax)
jmp 0x2ac94
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x2abf6
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2acbc
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x22, (%rax)
jmp 0x2ac94
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x2ac28
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2acbc
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
jmp 0x2ac94
cmpl $0x20, -0x24(%rbp)
jne 0x2ac5f
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc160(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2acbc
jmp 0x2ac61
cmpl $-0x1, -0x34(%rbp)
jne 0x2ac7e
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x1f274(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2acbc
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 0x2ac96
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x2ab1f
movq -0x10(%rbp), %rax
movl $0x14, 0x1f274(%rax)
movl $0x14, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)