// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbMallocRawNN
SQLITE_PRIVATE void *sqlite3DbMallocRawNN(sqlite3 *db, u64 n){
#ifndef SQLITE_OMIT_LOOKASIDE
  LookasideSlot *pBuf;
  assert( db!=0 );
  assert( sqlite3_mutex_held(db->mutex) );
  assert( db->pnBytesFreed==0 );
  if( n>db->lookaside.sz ){
    if( !db->lookaside.bDisable ){
      db->lookaside.anStat[1]++;
    }else if( db->mallocFailed ){
      return 0;
    }
    return dbMallocRawFinish(db, n);
  }
#ifndef SQLITE_OMIT_TWOSIZE_LOOKASIDE
  if( n<=LOOKASIDE_SMALL ){
    if( (pBuf = db->lookaside.pSmallFree)!=0 ){
      db->lookaside.pSmallFree = pBuf->pNext;
      db->lookaside.anStat[0]++;
      return (void*)pBuf;
    }else if( (pBuf = db->lookaside.pSmallInit)!=0 ){
      db->lookaside.pSmallInit = pBuf->pNext;
      db->lookaside.anStat[0]++;
      return (void*)pBuf;
    }
  }
#endif
  if( (pBuf = db->lookaside.pFree)!=0 ){
    db->lookaside.pFree = pBuf->pNext;
    db->lookaside.anStat[0]++;
    return (void*)pBuf;
  }else if( (pBuf = db->lookaside.pInit)!=0 ){
    db->lookaside.pInit = pBuf->pNext;
    db->lookaside.anStat[0]++;
    return (void*)pBuf;
  }else{
    db->lookaside.anStat[2]++;
  }
#else
  assert( db!=0 );
  assert( sqlite3_mutex_held(db->mutex) );
  assert( db->pnBytesFreed==0 );
  if( db->mallocFailed ){
    return 0;
  }
#endif
  return dbMallocRawFinish(db, n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl 0x174(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x3d6315
movq -0x10(%rbp), %rax
cmpl $0x0, 0x170(%rax)
jne 0x3d62e6
movq -0x10(%rbp), %rax
movl 0x184(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x184(%rax)
jmp 0x3d62ff
movq -0x10(%rbp), %rax
cmpb $0x0, 0x61(%rax)
je 0x3d62fd
movq $0x0, -0x8(%rbp)
jmp 0x3d6463
jmp 0x3d62ff
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d6540
movq %rax, -0x8(%rbp)
jmp 0x3d6463
cmpq $0x80, -0x18(%rbp)
ja 0x3d63b5
movq -0x10(%rbp), %rax
movq 0x1a8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3d636a
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1a8(%rax)
movq -0x10(%rbp), %rax
movl 0x180(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x180(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d6463
movq -0x10(%rbp), %rax
movq 0x1a0(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3d63b1
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x1a0(%rax)
movq -0x10(%rbp), %rax
movl 0x180(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x180(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d6463
jmp 0x3d63b3
jmp 0x3d63b5
movq -0x10(%rbp), %rax
movq 0x198(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3d63f9
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x198(%rax)
movq -0x10(%rbp), %rax
movl 0x180(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x180(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d6463
movq -0x10(%rbp), %rax
movq 0x190(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x3d643d
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x10(%rbp), %rax
movl 0x180(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x180(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x3d6463
movq -0x10(%rbp), %rax
movl 0x188(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x188(%rax)
jmp 0x3d6452
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3d6540
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)