// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/bzip2-1.0.6/bzlib.c
// Function: BZ2_bzDecompressInit
int BZ_API(BZ2_bzDecompressInit) 
                     ( bz_stream* strm, 
                       int        verbosity,
                       int        small )
{
   DState* s;

   if (!bz_config_ok()) return BZ_CONFIG_ERROR;

   if (strm == NULL) return BZ_PARAM_ERROR;
   if (small != 0 && small != 1) return BZ_PARAM_ERROR;
   if (verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR;

   if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
   if (strm->bzfree == NULL) strm->bzfree = default_bzfree;

   s = BZALLOC( sizeof(DState) );
   if (s == NULL) return BZ_MEM_ERROR;
   s->strm                  = strm;
   strm->state              = s;
   s->state                 = BZ_X_MAGIC_1;
   s->bsLive                = 0;
   s->bsBuff                = 0;
   s->calculatedCombinedCRC = 0;
   strm->total_in_lo32      = 0;
   strm->total_in_hi32      = 0;
   strm->total_out_lo32     = 0;
   strm->total_out_hi32     = 0;
   s->smallDecompress       = (Bool)small;
   s->ll4                   = NULL;
   s->ll16                  = NULL;
   s->tt                    = NULL;
   s->currBlockNo           = 0;
   s->verbosity             = verbosity;

   return BZ_OK;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
callq 0xc7f30
cmpl $0x0, %eax
jne 0xc85d8
movl $0xfffffff7, 0x24(%rsp) # imm = 0xFFFFFFF7
jmp 0xc876f
cmpq $0x0, 0x18(%rsp)
jne 0xc85ed
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0xc876f
cmpl $0x0, 0x10(%rsp)
je 0xc8608
cmpl $0x1, 0x10(%rsp)
je 0xc8608
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0xc876f
cmpl $0x0, 0x14(%rsp)
jl 0xc8616
cmpl $0x4, 0x14(%rsp)
jle 0xc8623
movl $0xfffffffe, 0x24(%rsp) # imm = 0xFFFFFFFE
jmp 0xc876f
movq 0x18(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xc863f
movq 0x18(%rsp), %rax
leaq -0x6fb(%rip), %rcx      # 0xc7f40
movq %rcx, 0x38(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0xc865b
movq 0x18(%rsp), %rax
leaq -0x6e7(%rip), %rcx      # 0xc7f70
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x48(%rcx), %rdi
movl $0xfa90, %esi           # imm = 0xFA90
movl $0x1, %edx
callq *%rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xc8693
movl $0xfffffffd, 0x24(%rsp) # imm = 0xFFFFFFFD
jmp 0xc876f
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rax
movl $0xa, 0x8(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x24(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x20(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0xc74(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x10(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x24(%rax)
movq 0x18(%rsp), %rax
movl $0x0, 0x28(%rax)
movl 0x10(%rsp), %eax
movb %al, %cl
movq 0x8(%rsp), %rax
movb %cl, 0x2c(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0xc60(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0xc58(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0xc50(%rax)
movq 0x8(%rsp), %rax
movl $0x0, 0x30(%rax)
movl 0x14(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x34(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)