#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 */
struct mm_cache {
  int dummy;
};

/* Variables and functions */
struct mm_cache *mm_cache_create(char *, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ mm_cache_destroy(struct mm_cache *);
int /*<<< orphan*/ mm_show();
int main(int argc, char **argv) {
  struct mm_cache *mc1 = mm_cache_create("mc1", 100, 0, NULL, NULL);
  struct mm_cache *mc2 = mm_cache_create("mc2", 200, 0, NULL, NULL);
  struct mm_cache *mc3 = mm_cache_create("mc3", 300, 0, NULL, NULL);
  struct mm_cache *mc4 = mm_cache_create("mc4", 400, 0, NULL, NULL);
  struct mm_cache *mc5 = mm_cache_create("mc5", 500, 0, NULL, NULL);
  struct mm_cache *mc6 = mm_cache_create("mc6", 600, 0, NULL, NULL);
  struct mm_cache *mc7 = mm_cache_create("mc7", 700, 0, NULL, NULL);
  mm_show();
  mm_cache_destroy(mc1);
  mm_cache_destroy(mc5);
  mm_cache_destroy(mc7);
  mm_show();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x64,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x18(%rbp)
lea    0xe98(%rip),%rdi
mov    $0xc8,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x20(%rbp)
lea    0xe7d(%rip),%rdi
mov    $0x12c,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x28(%rbp)
lea    0xe62(%rip),%rdi
mov    $0x190,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x30(%rbp)
lea    0xe47(%rip),%rdi
mov    $0x1f4,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x38(%rbp)
lea    0xe2c(%rip),%rdi
mov    $0x258,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x40(%rbp)
lea    0xe11(%rip),%rdi
mov    $0x2bc,%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <mm_cache_create@plt>
mov    %rax,-0x48(%rbp)
mov    $0x0,%al
call   1050 <mm_show@plt>
mov    -0x18(%rbp),%rdi
call   1040 <mm_cache_destroy@plt>
mov    -0x38(%rbp),%rdi
call   1040 <mm_cache_destroy@plt>
mov    -0x48(%rbp),%rdi
call   1040 <mm_cache_destroy@plt>
mov    $0x0,%al
call   1050 <mm_show@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%rdi
mov    $0x64,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
mov    %rax,%r14
lea    0xead(%rip),%rdi
mov    $0xc8,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
lea    0xe99(%rip),%rdi
mov    $0x12c,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
lea    0xe85(%rip),%rdi
mov    $0x190,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
lea    0xe71(%rip),%rdi
mov    $0x1f4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
mov    %rax,%r15
lea    0xe5a(%rip),%rdi
mov    $0x258,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
lea    0xe46(%rip),%rdi
mov    $0x2bc,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mm_cache_create@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <mm_show@plt>
mov    %r14,%rdi
call   1040 <mm_cache_destroy@plt>
mov    %r15,%rdi
call   1040 <mm_cache_destroy@plt>
mov    %rbx,%rdi
call   1040 <mm_cache_destroy@plt>
xor    %eax,%eax
call   1050 <mm_show@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.mm_cache = type { i32 }
@.str = [4 x i8] c"mc1\00"
@.str.1 = [4 x i8] c"mc2\00"
@.str.2 = [4 x i8] c"mc3\00"
@.str.3 = [4 x i8] c"mc4\00"
@.str.4 = [4 x i8] c"mc5\00"
@.str.5 = [4 x i8] c"mc6\00"
@.str.6 = [4 x i8] c"mc7\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.mm_cache*
%7 = alloca %struct.mm_cache*
%8 = alloca %struct.mm_cache*
%9 = alloca %struct.mm_cache*
%10 = alloca %struct.mm_cache*
%11 = alloca %struct.mm_cache*
%12 = alloca %struct.mm_cache*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 100, i32 0, i32* null, i32* null)
store %struct.mm_cache* %13, %struct.mm_cache** %6
%14 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 200, i32 0, i32* null, i32* null)
store %struct.mm_cache* %14, %struct.mm_cache** %7
%15 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 300, i32 0, i32* null, i32* null)
store %struct.mm_cache* %15, %struct.mm_cache** %8
%16 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 400, i32 0, i32* null, i32* null)
store %struct.mm_cache* %16, %struct.mm_cache** %9
%17 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 500, i32 0, i32* null, i32* null)
store %struct.mm_cache* %17, %struct.mm_cache** %10
%18 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 600, i32 0, i32* null, i32* null)
store %struct.mm_cache* %18, %struct.mm_cache** %11
%19 = call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 700, i32 0, i32* null, i32* null)
store %struct.mm_cache* %19, %struct.mm_cache** %12
%20 = call i32 (...) @mm_show()
%21 = load %struct.mm_cache*, %struct.mm_cache** %6
%22 = call i32 @mm_cache_destroy(%struct.mm_cache* %21)
%23 = load %struct.mm_cache*, %struct.mm_cache** %10
%24 = call i32 @mm_cache_destroy(%struct.mm_cache* %23)
%25 = load %struct.mm_cache*, %struct.mm_cache** %12
%26 = call i32 @mm_cache_destroy(%struct.mm_cache* %25)
%27 = call i32 (...) @mm_show()
ret i32 0
}

LLVM IR (-O2):
%struct.mm_cache = type { i32 }
@.str = [4 x i8] c"mc1\00"
@.str.1 = [4 x i8] c"mc2\00"
@.str.2 = [4 x i8] c"mc3\00"
@.str.3 = [4 x i8] c"mc4\00"
@.str.4 = [4 x i8] c"mc5\00"
@.str.5 = [4 x i8] c"mc6\00"
@.str.6 = [4 x i8] c"mc7\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 100, i32 0, i32* null, i32* null)
%4 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 200, i32 0, i32* null, i32* null)
%5 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 300, i32 0, i32* null, i32* null)
%6 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 400, i32 0, i32* null, i32* null)
%7 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 500, i32 0, i32* null, i32* null)
%8 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 600, i32 0, i32* null, i32* null)
%9 = tail call %struct.mm_cache* @mm_cache_create(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 700, i32 0, i32* null, i32* null)
%10 = tail call i32 (...) @mm_show()
%11 = tail call i32 @mm_cache_destroy(%struct.mm_cache* %3)
%12 = tail call i32 @mm_cache_destroy(%struct.mm_cache* %7)
%13 = tail call i32 @mm_cache_destroy(%struct.mm_cache* %9)
%14 = tail call i32 (...) @mm_show()
ret i32 0
}