// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x29f3
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x2a12
cmpq $0x0, 0x8(%rbx)
je 0x2a31
movl $0x1, %edi
movl $0x10, %esi
callq 0x2120
testq %rax, %rax
je 0x2a50
movq %rax, %r14
movl $0x1, %edi
movl $0x70, %esi
callq 0x2120
testq %rax, %rax
je 0x2a6f
movq %rax, %r15
leaq 0x48f5(%rip), %rsi      # 0x720a
movq %rax, %rdi
movl $0x70, %edx
callq 0x2180
testl %eax, %eax
jne 0x2a8e
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r15)
movq (%rbx), %rax
movq %rax, (%r15)
xorl %r12d, %r12d
cmpl $0x0, 0x20(%r15)
jne 0x2975
movq (%r14), %rdi
movq 0x8(%rbx), %rax
leaq (%rax,%rax,4), %rsi
addq %r12, %rsi
callq 0x22e8
testq %rax, %rax
je 0x29d4
movq %rax, (%r14)
addq %r12, %rax
movq %rax, 0x18(%r15)
movq 0x8(%rbx), %rax
leal (%rax,%rax,4), %ecx
movl %ecx, 0x20(%r15)
leaq (%rax,%rax,4), %rax
addq %rax, %r12
movq %r15, %rdi
movl $0x4, %esi
callq 0x2160
cmpl $-0x2, %eax
je 0x29b5
cmpl $0x0, 0x8(%r15)
jne 0x293a
movq 0x28(%r15), %rax
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x21d0
movq %r15, %rdi
callq 0x22d8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4865(%rip), %rdi      # 0x7221
leaq 0x46a1(%rip), %rsi      # 0x7064
leaq 0x486d(%rip), %rcx      # 0x7237
movl $0x5c, %edx
callq 0x2110
leaq 0x4842(%rip), %rdi      # 0x721d
leaq 0x4682(%rip), %rsi      # 0x7064
leaq 0x484e(%rip), %rcx      # 0x7237
movl $0x53, %edx
callq 0x2110
leaq 0x47aa(%rip), %rdi      # 0x71a4
leaq 0x4663(%rip), %rsi      # 0x7064
leaq 0x482f(%rip), %rcx      # 0x7237
movl $0x3c, %edx
callq 0x2110
leaq 0x47c3(%rip), %rdi      # 0x71dc
leaq 0x4644(%rip), %rsi      # 0x7064
leaq 0x4810(%rip), %rcx      # 0x7237
movl $0x3d, %edx
callq 0x2110
leaq 0x47b7(%rip), %rdi      # 0x71ef
leaq 0x4625(%rip), %rsi      # 0x7064
leaq 0x47f1(%rip), %rcx      # 0x7237
movl $0x3e, %edx
callq 0x2110
leaq 0x47a7(%rip), %rdi      # 0x71fe
leaq 0x4606(%rip), %rsi      # 0x7064
leaq 0x47d2(%rip), %rcx      # 0x7237
movl $0x44, %edx
callq 0x2110
leaq 0x478f(%rip), %rdi      # 0x7205
leaq 0x45e7(%rip), %rsi      # 0x7064
leaq 0x47b3(%rip), %rcx      # 0x7237
movl $0x47, %edx
callq 0x2110
leaq 0x477c(%rip), %rdi      # 0x7211
leaq 0x45c8(%rip), %rsi      # 0x7064
leaq 0x4794(%rip), %rcx      # 0x7237
movl $0x4a, %edx
callq 0x2110
nopl (%rax)