#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*/ printf(char *, int, int);
int /*<<< orphan*/ show_int_vec(int *, int);
void show_Classes(int **classes, int nbClass) {
  int c;
  for (c = 0; c <= nbClass; c++) {
    printf("Class %i : %i nodes\n", c, classes[c][0]);
    show_int_vec(classes[c] + 1, classes[c][0]);
  }
}


x86 assembly (clang, -O0):
<show_Classes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1190 <show_Classes+0x70>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%edx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%esi
call   1040 <show_int_vec@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <show_Classes+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_Classes>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
js     1168 <show_Classes+0x48>
mov    %esi,%r14d
mov    %rdi,%r15
add    $0x1,%r14d
xor    %ebx,%ebx
lea    0xec1(%rip),%r12
nop
mov    (%r15,%rbx,8),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    (%r15,%rbx,8),%rdi
mov    (%rdi),%esi
add    $0x4,%rdi
call   1040 <show_int_vec@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <show_Classes+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Class %i : %i nodes\0A\00"
define void @show_Classes(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %34, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %37
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32**, i32*** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32*, i32** %12, i64 %14
%16 = load i32*, i32** %15
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %18)
%20 = load i32**, i32*** %3
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32*, i32** %20, i64 %22
%24 = load i32*, i32** %23
%25 = getelementptr inbounds i32, i32* %24, i64 1
%26 = load i32**, i32*** %3
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32*, i32** %26, i64 %28
%30 = load i32*, i32** %29
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = load i32, i32* %31
%33 = call i32 @show_int_vec(i32* %25, i32 %32)
br label %34
34: ; preds = %10
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
br label %6
37: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Class %i : %i nodes\0A\00"
define void @show_Classes(i32** nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %20, label %4
4: ; preds = %2
%5 = add nuw i32 %1, 1
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %18, %7 ]
%9 = getelementptr inbounds i32*, i32** %0, i64 %8
%10 = load i32*, i32** %9
%11 = load i32, i32* %10
%12 = trunc i64 %8 to i32
%13 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %11)
%14 = load i32*, i32** %9
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %14
%17 = tail call i32 @show_int_vec(i32* %15, i32 %16)
%18 = add nuw nsw i64 %8, 1
%19 = icmp eq i64 %18, %6
br i1 %19, label %20, label %7
20: ; preds = %7, %2
ret void
}