// File: /workspace/github_c_makefile_star2_O0/tomcatzh[P]RealityBenchmark/zlib_bench.c
// Function: inflateContent
static CONTENTS *inflateContent(const CONTENTS *data) {
  assert(data != NULL);
  assert(data->body != NULL);
  assert(data->size > 0);

  int ret;
  size_t bufSize = 0;

  CONTENTS *result = calloc(1, sizeof(CONTENTS));
  assert(result);

  z_stream *strm = (z_stream *)calloc(1, sizeof(z_stream));
  assert(strm);

  ret = inflateInit(strm);
  assert(ret == Z_OK);

  strm->avail_in = data->size;
  strm->next_in = data->body;

   do {
    if (strm->avail_out == 0) {
      unsigned char *ptr =
          (unsigned char *)realloc(result->body, bufSize + data->size * 5);
      assert(ptr);

      result->body = ptr;
      strm->next_out = ptr + bufSize;
      strm->avail_out = data->size * 5;
      bufSize += data->size * 5;
    }

    ret = inflate(strm, Z_FINISH);
    assert(ret != Z_STREAM_ERROR);
  } while (strm->avail_in > 0);

  result->size = strm->total_out;

  (void)inflateEnd(strm);
  free(strm);

  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2965
jmp 0x2984
leaq 0x88ec(%rip), %rdi      # 0xb258
leaq 0x87a5(%rip), %rsi      # 0xb118
movl $0x3c, %edx
leaq 0x896c(%rip), %rcx      # 0xb2eb
callq 0x2120
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2990
jmp 0x29af
leaq 0x88f9(%rip), %rdi      # 0xb290
leaq 0x877a(%rip), %rsi      # 0xb118
movl $0x3d, %edx
leaq 0x8941(%rip), %rcx      # 0xb2eb
callq 0x2120
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x29bc
jmp 0x29db
leaq 0x88e0(%rip), %rdi      # 0xb2a3
leaq 0x874e(%rip), %rsi      # 0xb118
movl $0x3e, %edx
leaq 0x8915(%rip), %rcx      # 0xb2eb
callq 0x2120
movq $0x0, -0x18(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x2130
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x29ff
jmp 0x2a1e
leaq 0x88ac(%rip), %rdi      # 0xb2b2
leaq 0x870b(%rip), %rsi      # 0xb118
movl $0x44, %edx
leaq 0x88d2(%rip), %rcx      # 0xb2eb
callq 0x2120
movl $0x1, %edi
movl $0x70, %esi
callq 0x2130
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2a3a
jmp 0x2a59
leaq 0x8878(%rip), %rdi      # 0xb2b9
leaq 0x86d0(%rip), %rsi      # 0xb118
movl $0x47, %edx
leaq 0x8897(%rip), %rcx      # 0xb2eb
callq 0x2120
movq -0x28(%rbp), %rdi
leaq 0x885a(%rip), %rsi      # 0xb2be
movl $0x70, %edx
callq 0x2190
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2a79
jmp 0x2a98
leaq 0x8845(%rip), %rdi      # 0xb2c5
leaq 0x8691(%rip), %rsi      # 0xb118
movl $0x4a, %edx
leaq 0x8858(%rip), %rcx      # 0xb2eb
callq 0x2120
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x2b4b
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
imulq $0x5, 0x8(%rax), %rax
addq %rax, %rsi
callq 0x2308
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2aee
jmp 0x2b0d
leaq 0x87dc(%rip), %rdi      # 0xb2d1
leaq 0x861c(%rip), %rsi      # 0xb118
movl $0x53, %edx
leaq 0x87e3(%rip), %rcx      # 0xb2eb
callq 0x2120
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
imulq $0x5, 0x8(%rax), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
imulq $0x5, 0x8(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
movl $0x4, %esi
callq 0x2170
movl %eax, -0xc(%rbp)
cmpl $-0x2, -0xc(%rbp)
je 0x2b64
jmp 0x2b83
leaq 0x876a(%rip), %rdi      # 0xb2d5
leaq 0x85a6(%rip), %rsi      # 0xb118
movl $0x5c, %edx
leaq 0x876d(%rip), %rcx      # 0xb2eb
callq 0x2120
jmp 0x2b85
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
ja 0x2ab7
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rdi
callq 0x21f0
movq -0x28(%rbp), %rdi
callq 0x22f8
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop