// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2945
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x295e
cmpq $0x0, 0x8(%rbx)
je 0x2977
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x2120
testq %rax, %rax
je 0x2990
movq %rax, %r14
pushq $0x1
popq %rdi
pushq $0x70
popq %rsi
callq 0x2120
testq %rax, %rax
je 0x29a9
movq %rax, %r15
leaq 0x499f(%rip), %rsi      # 0x720a
pushq $0x70
popq %rdx
movq %rax, %rdi
callq 0x2170
testl %eax, %eax
jne 0x29c5
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r15)
movq (%rbx), %rax
movq %rax, (%r15)
xorl %r12d, %r12d
pushq $0x4
popq %rbp
xorl %r13d, %r13d
cmpl $0x0, 0x20(%r15)
jne 0x28cf
imulq $0x5, 0x8(%rbx), %rsi
addq %r13, %rsi
movq %r12, %rdi
callq 0x22d8
testq %rax, %rax
je 0x2928
movq %rax, %r12
movq %rax, (%r14)
addq %r13, %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, %r13
movq %r15, %rdi
movl %ebp, %esi
callq 0x2150
cmpl $-0x2, %eax
je 0x290f
cmpl $0x0, 0x8(%r15)
jne 0x2894
movq 0x28(%r15), %rax
movq %rax, 0x8(%r14)
movq %r15, %rdi
callq 0x21c0
movq %r15, %rdi
callq 0x22c8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x490b(%rip), %rdi      # 0x7221
leaq 0x4747(%rip), %rsi      # 0x7064
leaq 0x4913(%rip), %rcx      # 0x7237
pushq $0x5c
jmp 0x293f
leaq 0x48ee(%rip), %rdi      # 0x721d
leaq 0x472e(%rip), %rsi      # 0x7064
leaq 0x48fa(%rip), %rcx      # 0x7237
pushq $0x53
popq %rdx
callq 0x2110
leaq 0x4858(%rip), %rdi      # 0x71a4
leaq 0x4711(%rip), %rsi      # 0x7064
leaq 0x48dd(%rip), %rcx      # 0x7237
pushq $0x3c
jmp 0x293f
leaq 0x4877(%rip), %rdi      # 0x71dc
leaq 0x46f8(%rip), %rsi      # 0x7064
leaq 0x48c4(%rip), %rcx      # 0x7237
pushq $0x3d
jmp 0x293f
leaq 0x4871(%rip), %rdi      # 0x71ef
leaq 0x46df(%rip), %rsi      # 0x7064
leaq 0x48ab(%rip), %rcx      # 0x7237
pushq $0x3e
jmp 0x293f
leaq 0x4867(%rip), %rdi      # 0x71fe
leaq 0x46c6(%rip), %rsi      # 0x7064
leaq 0x4892(%rip), %rcx      # 0x7237
pushq $0x44
jmp 0x293f
leaq 0x4855(%rip), %rdi      # 0x7205
leaq 0x46ad(%rip), %rsi      # 0x7064
leaq 0x4879(%rip), %rcx      # 0x7237
pushq $0x47
jmp 0x293f
leaq 0x4845(%rip), %rdi      # 0x7211
leaq 0x4691(%rip), %rsi      # 0x7064
leaq 0x485d(%rip), %rcx      # 0x7237
pushq $0x4a
jmp 0x293f