#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*/ print(int, int, int);
void ft_print_comb(void) {
  int tableau[3];
  tableau[0] = 48;
  tableau[1] = 48;
  tableau[2] = 48;
  while (tableau[0] < 58) {
    tableau[1] = tableau[0] + 1;
    while (tableau[1] < 58) {
      tableau[2] = tableau[1] + 1;
      while (tableau[2] < 58) {
        if (tableau[0] < tableau[1] && tableau[1] < tableau[2]) {
          print(tableau[0], tableau[1], tableau[2]);
        }
        tableau[2]++;
      }
      tableau[1]++;
    }
    tableau[0]++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x30,-0xc(%rbp)
movl   $0x30,-0x8(%rbp)
movl   $0x30,-0x4(%rbp)
cmpl   $0x3a,-0xc(%rbp)
jge    11ad <ft_print_comb+0x9d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3a,-0x8(%rbp)
jge    119f <ft_print_comb+0x8f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x3a,-0x4(%rbp)
jge    1191 <ft_print_comb+0x81>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1183 <ft_print_comb+0x73>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1183 <ft_print_comb+0x73>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <print@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <ft_print_comb+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <ft_print_comb+0x30>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <ft_print_comb+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_comb>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x30,%r15d
jmp    1126 <ft_print_comb+0x16>
cmp    $0x3a,%r15d
je     117f <ft_print_comb+0x6f>
mov    %r15d,%r14d
lea    0x1(%r14),%r15d
mov    %r15d,%r12d
cmp    $0x38,%r14d
jbe    1146 <ft_print_comb+0x36>
jmp    1120 <ft_print_comb+0x10>
nopl   0x0(%rax,%rax,1)
cmp    $0x3a,%r12d
je     1120 <ft_print_comb+0x10>
mov    %r12d,%ebx
lea    0x1(%rbx),%r12d
cmp    $0x38,%ebx
ja     1140 <ft_print_comb+0x30>
mov    %ebx,%ebp
jmp    1165 <ft_print_comb+0x55>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x39,%ebp
jae    1140 <ft_print_comb+0x30>
add    $0x1,%ebp
cmp    %ebx,%r14d
jae    1160 <ft_print_comb+0x50>
cmp    %ebp,%ebx
jae    1160 <ft_print_comb+0x50>
mov    %r14d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <print@plt>
jmp    1160 <ft_print_comb+0x50>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ft_print_comb() {
%1 = alloca [3 x i32]
%2 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
store i32 48, i32* %2
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 48, i32* %3
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 48, i32* %4
br label %5
5: ; preds = %55, %0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 58
br i1 %8, label %9, label %59
9: ; preds = %5
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
store i32 %12, i32* %13
br label %14
14: ; preds = %51, %9
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%16 = load i32, i32* %15
%17 = icmp slt i32 %16, 58
br i1 %17, label %18, label %55
18: ; preds = %14
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%20 = load i32, i32* %19
%21 = add nsw i32 %20, 1
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
store i32 %21, i32* %22
br label %23
23: ; preds = %47, %18
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%25 = load i32, i32* %24
%26 = icmp slt i32 %25, 58
br i1 %26, label %27, label %51
27: ; preds = %23
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%29 = load i32, i32* %28
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%31 = load i32, i32* %30
%32 = icmp slt i32 %29, %31
br i1 %32, label %33, label %47
33: ; preds = %27
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%35 = load i32, i32* %34
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%37 = load i32, i32* %36
%38 = icmp slt i32 %35, %37
br i1 %38, label %39, label %47
39: ; preds = %33
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%41 = load i32, i32* %40
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%43 = load i32, i32* %42
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%45 = load i32, i32* %44
%46 = call i32 @print(i32 %41, i32 %43, i32 %45)
br label %47
47: ; preds = %39, %33, %27
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 2
%49 = load i32, i32* %48
%50 = add nsw i32 %49, 1
store i32 %50, i32* %48
br label %23
51: ; preds = %23
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 1
%53 = load i32, i32* %52
%54 = add nsw i32 %53, 1
store i32 %54, i32* %52
br label %14
55: ; preds = %14
%56 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%57 = load i32, i32* %56
%58 = add nsw i32 %57, 1
store i32 %58, i32* %56
br label %5
59: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ft_print_comb() {
br label %3
1: ; preds = %7, %3
%2 = icmp eq i32 %5, 58
br i1 %2, label %24, label %3
3: ; preds = %0, %1
%4 = phi i32 [ 48, %0 ], [ %5, %1 ]
%5 = add nuw nsw i32 %4, 1
%6 = icmp ult i32 %4, 57
br i1 %6, label %9, label %1
7: ; preds = %21, %9
%8 = icmp eq i32 %11, 58
br i1 %8, label %1, label %9
9: ; preds = %3, %7
%10 = phi i32 [ %11, %7 ], [ %5, %3 ]
%11 = add nuw nsw i32 %10, 1
%12 = icmp ult i32 %10, 57
br i1 %12, label %13, label %7
13: ; preds = %9
%14 = icmp ult i32 %4, %10
br label %15
15: ; preds = %13, %21
%16 = phi i32 [ %11, %13 ], [ %22, %21 ]
%17 = icmp ult i32 %10, %16
%18 = select i1 %14, i1 %17, i1 false
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = tail call i32 @print(i32 %4, i32 %10, i32 %16)
br label %21
21: ; preds = %19, %15
%22 = add nuw nsw i32 %16, 1
%23 = icmp ult i32 %16, 57
br i1 %23, label %15, label %7
24: ; preds = %1
ret void
}