#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ allocate(int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int make_size(int);
long long malloc_profile_get_alloc_count_by_size_wrapper(size_t);
long long malloc_profile_get_alloc_count_wrapper();
int /*<<< orphan*/ malloc_profile_pause_wrapper();
int /*<<< orphan*/ malloc_profile_reset_wrapper();
int /*<<< orphan*/ malloc_profile_resume_wrapper();
int /*<<< orphan*/ malloc_profile_set_trace_cpu_wrapper(int);
int /*<<< orphan*/ stdout;
int main() {
  const int actual_num_allocs = 10;
  malloc_profile_reset_wrapper();
  for (int i = 0; i < actual_num_allocs; i++) {
    allocate(make_size(i));
  }
  malloc_profile_pause_wrapper();
  const long long measured_num_allocs =
      malloc_profile_get_alloc_count_wrapper();
  fprintf(stdout, "Allocations: real %d, measured %lld\n", actual_num_allocs,
          measured_num_allocs);
  assert(actual_num_allocs == measured_num_allocs);
  for (int i = 0; i < actual_num_allocs; i++) {
    size_t size = make_size(i);
    const long long actual_allocs = 1;
    const long long measured_allocs =
        malloc_profile_get_alloc_count_by_size_wrapper(size);
    fprintf(stdout, "Allocations of size %lu: real %lld, measured %lld\n", size,
            actual_allocs, measured_allocs);
    assert(actual_allocs == measured_allocs);
  }
  fprintf(stdout, "All tests have passed.\n");
  fprintf(stdout, "Checking backtrace support (you should see one now)...\n");
  malloc_profile_resume_wrapper();
  malloc_profile_set_trace_cpu_wrapper(1000);
  allocate(900);
  allocate(1100);
  malloc_profile_pause_wrapper();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    $0x0,%al
call   1090 <malloc_profile_reset_wrapper@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11eb <main+0x4b>
mov    -0xc(%rbp),%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c4 <main+0x24>
mov    $0x0,%al
call   10c0 <malloc_profile_pause_wrapper@plt>
mov    $0x0,%al
call   1040 <malloc_profile_get_alloc_count_wrapper@plt>
mov    %rax,-0x18(%rbp)
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rcx
lea    0xdef(%rip),%rsi
mov    $0xa,%edx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0xa,%eax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    12af <main+0x10f>
mov    -0x1c(%rbp),%edi
call   1080 <make_size@plt>
cltq
mov    %rax,-0x28(%rbp)
movq   $0x1,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,-0x38(%rbp)
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
mov    -0x38(%rbp),%r8
lea    0xda6(%rip),%rsi
mov    $0x1,%ecx
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x1,%eax
cmp    -0x38(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    123a <main+0x9a>
mov    0x2d2a(%rip),%rax
mov    (%rax),%edi
lea    0xd99(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    0x2d13(%rip),%rax
mov    (%rax),%edi
lea    0xd9a(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1030 <malloc_profile_resume_wrapper@plt>
mov    $0x3e8,%edi
call   10b0 <malloc_profile_set_trace_cpu_wrapper@plt>
mov    $0x384,%edi
call   10a0 <allocate@plt>
mov    $0x44c,%edi
call   10a0 <allocate@plt>
mov    $0x0,%al
call   10c0 <malloc_profile_pause_wrapper@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1090 <malloc_profile_reset_wrapper@plt>
xor    %edi,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x1,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x2,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x3,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x4,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x5,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x6,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x7,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x8,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
mov    $0x9,%edi
call   1080 <make_size@plt>
mov    %eax,%edi
call   10a0 <allocate@plt>
xor    %eax,%eax
call   10c0 <malloc_profile_pause_wrapper@plt>
xor    %eax,%eax
call   1040 <malloc_profile_get_alloc_count_wrapper@plt>
mov    %rax,%rbx
mov    0x2d72(%rip),%r12
mov    (%r12),%edi
lea    0xd87(%rip),%rsi
mov    $0xa,%edx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0xa,%rbx
sete   %dil
call   1060 <assert@plt>
xor    %edi,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
lea    0xd6e(%rip),%r14
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x1,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x2,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x3,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x4,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x5,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x6,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x7,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x8,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    $0x9,%edi
call   1080 <make_size@plt>
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc_profile_get_alloc_count_by_size_wrapper@plt>
mov    %rax,%rbx
mov    (%r12),%edi
mov    $0x1,%ecx
mov    %r14,%rsi
mov    %r15,%rdx
mov    %rax,%r8
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %edi,%edi
cmp    $0x1,%rbx
sete   %dil
call   1060 <assert@plt>
mov    (%r12),%edi
lea    0xb32(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%r12),%edi
lea    0xb38(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1030 <malloc_profile_resume_wrapper@plt>
mov    $0x3e8,%edi
call   10b0 <malloc_profile_set_trace_cpu_wrapper@plt>
mov    $0x384,%edi
call   10a0 <allocate@plt>
mov    $0x44c,%edi
call   10a0 <allocate@plt>
xor    %eax,%eax
call   10c0 <malloc_profile_pause_wrapper@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [37 x i8] c"Allocations: real %d, measured %lld\0A\00"
@.str.1 = [51 x i8] c"Allocations of size %lu: real %lld, measured %lld\0A\00"
@.str.2 = [24 x i8] c"All tests have passed.\0A\00"
@.str.3 = [56 x i8] c"Checking backtrace support (you should see one now)...\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %1
store i32 10, i32* %2
%9 = call i32 (...) @malloc_profile_reset_wrapper()
store i32 0, i32* %3
br label %10
10: ; preds = %17, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %3
%15 = call i32 @make_size(i32 %14)
%16 = call i32 @allocate(i32 %15)
br label %17
17: ; preds = %13
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %10
20: ; preds = %10
%21 = call i32 (...) @malloc_profile_pause_wrapper()
%22 = call i64 (...) @malloc_profile_get_alloc_count_wrapper()
store i64 %22, i64* %4
%23 = load i32, i32* @stdout
%24 = load i64, i64* %4
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 10, i64 %24)
%26 = load i64, i64* %4
%27 = icmp eq i64 10, %26
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
store i32 0, i32* %5
br label %30
30: ; preds = %47, %20
%31 = load i32, i32* %5
%32 = icmp slt i32 %31, 10
br i1 %32, label %33, label %50
33: ; preds = %30
%34 = load i32, i32* %5
%35 = call i32 @make_size(i32 %34)
%36 = sext i32 %35 to i64
store i64 %36, i64* %6
store i64 1, i64* %7
%37 = load i64, i64* %6
%38 = call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %37)
store i64 %38, i64* %8
%39 = load i32, i32* @stdout
%40 = load i64, i64* %6
%41 = load i64, i64* %8
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %40, i64 1, i64 %41)
%43 = load i64, i64* %8
%44 = icmp eq i64 1, %43
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
br label %47
47: ; preds = %33
%48 = load i32, i32* %5
%49 = add nsw i32 %48, 1
store i32 %49, i32* %5
br label %30
50: ; preds = %30
%51 = load i32, i32* @stdout
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%53 = load i32, i32* @stdout
%54 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%55 = call i32 (...) @malloc_profile_resume_wrapper()
%56 = call i32 @malloc_profile_set_trace_cpu_wrapper(i32 1000)
%57 = call i32 @allocate(i32 900)
%58 = call i32 @allocate(i32 1100)
%59 = call i32 (...) @malloc_profile_pause_wrapper()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [37 x i8] c"Allocations: real %d, measured %lld\0A\00"
@.str.1 = [51 x i8] c"Allocations of size %lu: real %lld, measured %lld\0A\00"
@.str.2 = [24 x i8] c"All tests have passed.\0A\00"
@.str.3 = [56 x i8] c"Checking backtrace support (you should see one now)...\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @malloc_profile_reset_wrapper()
%2 = tail call i32 @make_size(i32 0)
%3 = tail call i32 @allocate(i32 %2)
%4 = tail call i32 @make_size(i32 1)
%5 = tail call i32 @allocate(i32 %4)
%6 = tail call i32 @make_size(i32 2)
%7 = tail call i32 @allocate(i32 %6)
%8 = tail call i32 @make_size(i32 3)
%9 = tail call i32 @allocate(i32 %8)
%10 = tail call i32 @make_size(i32 4)
%11 = tail call i32 @allocate(i32 %10)
%12 = tail call i32 @make_size(i32 5)
%13 = tail call i32 @allocate(i32 %12)
%14 = tail call i32 @make_size(i32 6)
%15 = tail call i32 @allocate(i32 %14)
%16 = tail call i32 @make_size(i32 7)
%17 = tail call i32 @allocate(i32 %16)
%18 = tail call i32 @make_size(i32 8)
%19 = tail call i32 @allocate(i32 %18)
%20 = tail call i32 @make_size(i32 9)
%21 = tail call i32 @allocate(i32 %20)
%22 = tail call i32 (...) @malloc_profile_pause_wrapper()
%23 = tail call i64 (...) @malloc_profile_get_alloc_count_wrapper()
%24 = load i32, i32* @stdout
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 10, i64 %23)
%26 = icmp eq i64 %23, 10
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @make_size(i32 0)
%30 = sext i32 %29 to i64
%31 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %30)
%32 = load i32, i32* @stdout
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %30, i64 1, i64 %31)
%34 = icmp eq i64 %31, 1
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %35)
%37 = tail call i32 @make_size(i32 1)
%38 = sext i32 %37 to i64
%39 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %38)
%40 = load i32, i32* @stdout
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %38, i64 1, i64 %39)
%42 = icmp eq i64 %39, 1
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = tail call i32 @make_size(i32 2)
%46 = sext i32 %45 to i64
%47 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %46)
%48 = load i32, i32* @stdout
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %46, i64 1, i64 %47)
%50 = icmp eq i64 %47, 1
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
%53 = tail call i32 @make_size(i32 3)
%54 = sext i32 %53 to i64
%55 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %54)
%56 = load i32, i32* @stdout
%57 = tail call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %54, i64 1, i64 %55)
%58 = icmp eq i64 %55, 1
%59 = zext i1 %58 to i32
%60 = tail call i32 @assert(i32 %59)
%61 = tail call i32 @make_size(i32 4)
%62 = sext i32 %61 to i64
%63 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %62)
%64 = load i32, i32* @stdout
%65 = tail call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %62, i64 1, i64 %63)
%66 = icmp eq i64 %63, 1
%67 = zext i1 %66 to i32
%68 = tail call i32 @assert(i32 %67)
%69 = tail call i32 @make_size(i32 5)
%70 = sext i32 %69 to i64
%71 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %70)
%72 = load i32, i32* @stdout
%73 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %70, i64 1, i64 %71)
%74 = icmp eq i64 %71, 1
%75 = zext i1 %74 to i32
%76 = tail call i32 @assert(i32 %75)
%77 = tail call i32 @make_size(i32 6)
%78 = sext i32 %77 to i64
%79 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %78)
%80 = load i32, i32* @stdout
%81 = tail call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %78, i64 1, i64 %79)
%82 = icmp eq i64 %79, 1
%83 = zext i1 %82 to i32
%84 = tail call i32 @assert(i32 %83)
%85 = tail call i32 @make_size(i32 7)
%86 = sext i32 %85 to i64
%87 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %86)
%88 = load i32, i32* @stdout
%89 = tail call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %86, i64 1, i64 %87)
%90 = icmp eq i64 %87, 1
%91 = zext i1 %90 to i32
%92 = tail call i32 @assert(i32 %91)
%93 = tail call i32 @make_size(i32 8)
%94 = sext i32 %93 to i64
%95 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %94)
%96 = load i32, i32* @stdout
%97 = tail call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %94, i64 1, i64 %95)
%98 = icmp eq i64 %95, 1
%99 = zext i1 %98 to i32
%100 = tail call i32 @assert(i32 %99)
%101 = tail call i32 @make_size(i32 9)
%102 = sext i32 %101 to i64
%103 = tail call i64 @malloc_profile_get_alloc_count_by_size_wrapper(i64 %102)
%104 = load i32, i32* @stdout
%105 = tail call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i64 %102, i64 1, i64 %103)
%106 = icmp eq i64 %103, 1
%107 = zext i1 %106 to i32
%108 = tail call i32 @assert(i32 %107)
%109 = load i32, i32* @stdout
%110 = tail call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%111 = load i32, i32* @stdout
%112 = tail call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%113 = tail call i32 (...) @malloc_profile_resume_wrapper()
%114 = tail call i32 @malloc_profile_set_trace_cpu_wrapper(i32 1000)
%115 = tail call i32 @allocate(i32 900)
%116 = tail call i32 @allocate(i32 1100)
%117 = tail call i32 (...) @malloc_profile_pause_wrapper()
ret i32 0
}