// File: /workspace/github_c_makefile_star2_O0/loversmile[P]sugarcrm/sugar_stdsoap2.c
// Function: soap_push_ns
static struct soap_nlist *
soap_push_ns(struct soap *soap, const char *id, const char *ns, short utilized)
{ register struct soap_nlist *np;
  size_t n, k;
  if (soap_strsearch(soap->c14nexclude, id))
    return NULL;
  if (!utilized)
  { for (np = soap->nlist; np; np = np->next)
    { if (!strcmp(np->id, id) && (!np->ns || !strcmp(np->ns, ns)))
        break;
    }
    if (np)
    { if ((np->level < soap->level || !np->ns) && np->index == 1)
        utilized = 1;
      else
        return NULL;
    }
  }
  DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Adding namespace binding (level=%u) '%s' '%s' utilized=%d\n", soap->level, id, ns?ns:"(null)", utilized));
  n = strlen(id);
  if (ns)
    k = strlen(ns);
  else
    k = 0;
  np = (struct soap_nlist*)SOAP_MALLOC(soap, sizeof(struct soap_nlist) + n + k + 1);
  if (!np)
  { soap->error = SOAP_EOM;
    return NULL;
  }
  np->next = soap->nlist;
  soap->nlist = np;
  strcpy(np->id, id);
  if (ns)
    np->ns = strcpy(np->id + n + 1, ns);
  else
    np->ns = NULL;
  np->level = soap->level;
  np->index = utilized;
  return np;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %cx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movw %ax, -0x22(%rbp)
movq -0x10(%rbp), %rax
movq 0x1b2f0(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5f770
cmpq $0x0, %rax
je 0x60272
movq $0x0, -0x8(%rbp)
jmp 0x6041c
cmpw $0x0, -0x22(%rbp)
jne 0x60326
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x602db
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x3210
cmpl $0x0, %eax
jne 0x602cc
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x602ca
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x3210
cmpl $0x0, %eax
jne 0x602cc
jmp 0x602db
jmp 0x602ce
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x6028c
cmpq $0x0, -0x30(%rbp)
je 0x60324
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x6108(%rcx), %eax
jb 0x60300
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x60315
movq -0x30(%rbp), %rax
movswl 0xc(%rax), %eax
cmpl $0x1, %eax
jne 0x60315
movw $0x1, -0x22(%rbp)
jmp 0x60322
movq $0x0, -0x8(%rbp)
jmp 0x6041c
jmp 0x60324
jmp 0x60326
movq -0x18(%rbp), %rdi
callq 0x3100
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x60349
movq -0x20(%rbp), %rdi
callq 0x3100
movq %rax, -0x40(%rbp)
jmp 0x60351
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
addq -0x40(%rbp), %rdi
addq $0x1, %rdi
callq 0x3290
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x6038c
movq -0x10(%rbp), %rax
movl $0x14, 0x19214(%rax)
movq $0x0, -0x8(%rbp)
jmp 0x6041c
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x3090
cmpq $0x0, -0x20(%rbp)
je 0x603eb
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
addq -0x38(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
callq 0x3090
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x603f7
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x6108(%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movw -0x22(%rbp), %cx
movq -0x30(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)