// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3StrAccumEnlarge
static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
  char *zNew;
  assert( p->nChar+(i64)N >= p->nAlloc ); /* Only called if really needed */
  if( p->accError ){
    testcase(p->accError==STRACCUM_TOOBIG);
    testcase(p->accError==STRACCUM_NOMEM);
    return 0;
  }
  if( p->mxAlloc==0 ){
    N = p->nAlloc - p->nChar - 1;
    setStrAccumError(p, STRACCUM_TOOBIG);
    return N;
  }else{
    char *zOld = p->bMalloced ? p->zText : 0;
    i64 szNew = p->nChar;
    assert( (p->zText==0 || p->zText==p->zBase)==(p->bMalloced==0) );
    szNew += N + 1;
    if( szNew+p->nChar<=p->mxAlloc ){
      /* Force exponential buffer size growth as long as it does not overflow,
      ** to avoid having to call this routine too often */
      szNew += p->nChar;
    }
    if( szNew > p->mxAlloc ){
      sqlite3StrAccumReset(p);
      setStrAccumError(p, STRACCUM_TOOBIG);
      return 0;
    }else{
      p->nAlloc = (int)szNew;
    }
    if( p->db ){
      zNew = sqlite3DbRealloc(p->db, zOld, p->nAlloc);
    }else{
      zNew = sqlite3_realloc64(zOld, p->nAlloc);
    }
    if( zNew ){
      assert( p->zText!=0 || p->nChar==0 );
      if( !p->bMalloced && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
      p->zText = zNew;
      p->nAlloc = sqlite3DbMallocSize(p->db, zNew);
      p->bMalloced = 1;
    }else{
      sqlite3StrAccumReset(p);
      setStrAccumError(p, STRACCUM_NOMEM);
      return 0;
    }
  }
  return N;
}

// Assembly:
xorl %eax, %eax
cmpb $0x0, 0x24(%rdi)
je 0x1be98
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %eax
testq %rax, %rax
je 0x1bebe
movl %esi, %r14d
movb 0x25(%rbx), %cl
testb %cl, %cl
je 0x1bed6
movq 0x10(%rbx), %r15
jmp 0x1bed9
movl 0x18(%rbx), %eax
notl %eax
addl 0x1c(%rbx), %eax
movb $0x2, 0x24(%rbx)
movl $0x0, 0x1c(%rbx)
jmp 0x1bfc9
xorl %r15d, %r15d
movl 0x18(%rbx), %edx
movslq %r14d, %rsi
leaq (%rsi,%rdx), %r12
incq %r12
addq %rdx, %rsi
addq %rsi, %rdx
incq %rdx
cmpq %rax, %rdx
cmovleq %rdx, %r12
cmpq %rax, %r12
jle 0x1bf20
testb %cl, %cl
je 0x1bf0f
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0xb752
movb $0x0, 0x25(%rbx)
movq $0x0, 0x10(%rbx)
movb $0x2, 0x24(%rbx)
jmp 0x1bfc0
movl %r12d, 0x1c(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1bf95
movl %r12d, %edx
movq %r15, %rsi
callq 0x1bfe2
movq %rax, %r15
testq %rax, %rax
je 0x1bf9e
cmpb $0x0, 0x25(%rbx)
jne 0x1bf59
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1bf59
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0xa320
movq %r15, 0x10(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x1bf80
cmpq %r15, 0x170(%rax)
ja 0x1bf80
cmpq %r15, 0x178(%rax)
jbe 0x1bf80
movzwl 0x150(%rax), %eax
jmp 0x1bf89
movq %r15, %rdi
callq *0x753e7(%rip)          # 0x91370
movl %eax, 0x1c(%rbx)
movb $0x1, 0x25(%rbx)
movl %r14d, %eax
jmp 0x1bfc9
callq 0xa080
testl %eax, %eax
je 0x1bfd2
cmpb $0x0, 0x25(%rbx)
je 0x1bfb4
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0xb752
movb $0x0, 0x25(%rbx)
movq $0x0, 0x10(%rbx)
movb $0x1, 0x24(%rbx)
movl $0x0, 0x1c(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, %esi
movq %r15, %rdi
callq 0xc2eb
jmp 0x1bf37