// File: /workspace/github_c_makefile_star2_O1/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 0x1beab
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 0x1bed1
movl %esi, %r14d
movb 0x25(%rbx), %cl
testb %cl, %cl
je 0x1bee9
movq 0x10(%rbx), %r15
jmp 0x1beec
movl 0x18(%rbx), %eax
notl %eax
addl 0x1c(%rbx), %eax
movb $0x2, 0x24(%rbx)
movl $0x0, 0x1c(%rbx)
jmp 0x1bfe4
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 0x1bf33
testb %cl, %cl
je 0x1bf22
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0xb6df
movb $0x0, 0x25(%rbx)
movq $0x0, 0x10(%rbx)
movb $0x2, 0x24(%rbx)
jmp 0x1bfdb
movl %r12d, 0x1c(%rbx)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x1bf4f
movl %r12d, %edx
movq %r15, %rsi
callq 0x1bffd
movq %rax, %r15
jmp 0x1bf5f
callq 0xa080
testl %eax, %eax
je 0x1bfed
xorl %r15d, %r15d
movb 0x25(%rbx), %al
testq %r15, %r15
je 0x1bfbb
testb %al, %al
jne 0x1bf7f
movl 0x18(%rbx), %edx
testq %rdx, %rdx
je 0x1bf7f
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0xa310
movq %r15, 0x10(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x1bfa6
cmpq %r15, 0x170(%rax)
ja 0x1bfa6
cmpq %r15, 0x178(%rax)
jbe 0x1bfa6
movzwl 0x150(%rax), %eax
jmp 0x1bfaf
movq %r15, %rdi
callq *0x773b1(%rip)          # 0x93360
movl %eax, 0x1c(%rbx)
movb $0x1, 0x25(%rbx)
movl %r14d, %eax
jmp 0x1bfe4
testb %al, %al
je 0x1bfcf
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0xb6df
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 0xc1a4
jmp 0x1bf4a