#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*/ ft_char(char, char, char);
int /*<<< orphan*/ ft_space();
void ft_print_comb(void) {
  char tab[3];
  tab[0] = '0';
  tab[1] = '1';
  tab[2] = '2';
  while (tab[0] <= '7') {
    tab[1] = tab[0] + 1;
    while (tab[1] <= '8') {
      tab[2] = tab[1] + 1;
      while (tab[2] <= '9') {
        ft_char(tab[0], tab[1], tab[2]);
        if (tab[0] != '7' || tab[1] != '8' || tab[2] != '9')
          ft_space();
        tab[2]++;
      }
      tab[1]++;
    }
    tab[0]++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x3(%rbp)
movb   $0x31,-0x2(%rbp)
movb   $0x32,-0x1(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x37,%eax
jg     11d9 <ft_print_comb+0xb9>
movsbl -0x3(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x38,%eax
jg     11cc <ft_print_comb+0xac>
movsbl -0x2(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     11bf <ft_print_comb+0x9f>
mov    -0x3(%rbp),%cl
mov    -0x2(%rbp),%al
movsbl %cl,%edi
movsbl %al,%esi
movsbl -0x1(%rbp),%edx
call   1030 <ft_char@plt>
movsbl -0x3(%rbp),%eax
cmp    $0x37,%eax
jne    11ab <ft_print_comb+0x8b>
movsbl -0x2(%rbp),%eax
cmp    $0x38,%eax
jne    11ab <ft_print_comb+0x8b>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
je     11b2 <ft_print_comb+0x92>
mov    $0x0,%al
call   1040 <ft_space@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1162 <ft_print_comb+0x42>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    114b <ft_print_comb+0x2b>
mov    -0x3(%rbp),%al
add    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    1134 <ft_print_comb+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_comb>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x30,%r12b
lea    0x1(%r12),%r14d
mov    %r14d,%eax
mov    %r12d,%r13d
jmp    1148 <ft_print_comb+0x28>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r13),%eax
cmp    $0x39,%al
je     11a4 <ft_print_comb+0x84>
mov    %r13d,%ecx
mov    %eax,%r13d
cmp    $0x37,%cl
ja     1140 <ft_print_comb+0x20>
mov    %r12d,%eax
xor    $0x37,%al
mov    %r13d,%ecx
xor    $0x38,%cl
or     %al,%cl
setne  %r15b
mov    %r13d,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebp,%ebx
lea    0x1(%rbx),%ebp
movsbl %r12b,%edi
movsbl %r13b,%esi
movsbl %bpl,%edx
call   1030 <ft_char@plt>
cmp    $0x38,%bl
sete   %al
mov    %r15d,%ecx
not    %cl
test   %al,%cl
jne    11ad <ft_print_comb+0x8d>
xor    %eax,%eax
call   1040 <ft_space@plt>
cmp    $0x39,%bpl
jb     1170 <ft_print_comb+0x50>
jmp    1140 <ft_print_comb+0x20>
mov    %r14d,%r12d
cmp    $0x38,%r14b
jne    112e <ft_print_comb+0xe>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_print_comb() {
br label %1
1: ; preds = %25, %0
%2 = phi i8 [ 48, %0 ], [ %3, %25 ]
%3 = add nuw nsw i8 %2, 1
%4 = icmp ne i8 %2, 55
br label %8
5: ; preds = %21, %8
%6 = add nuw nsw i8 %9, 1
%7 = icmp eq i8 %6, 57
br i1 %7, label %25, label %8
8: ; preds = %1, %5
%9 = phi i8 [ %3, %1 ], [ %6, %5 ]
%10 = phi i8 [ %2, %1 ], [ %9, %5 ]
%11 = icmp ult i8 %10, 56
br i1 %11, label %12, label %5
12: ; preds = %8
%13 = add nuw nsw i8 %10, 2
%14 = icmp ne i8 %9, 56
%15 = select i1 %4, i1 true, i1 %14
br label %16
16: ; preds = %12, %21
%17 = phi i8 [ %13, %12 ], [ %23, %21 ]
%18 = tail call i32 @ft_char(i8 signext %2, i8 signext %9, i8 signext %17)
%19 = icmp ne i8 %17, 57
%20 = or i1 %15, %19
br i1 %20, label %21, label %27
21: ; preds = %16
%22 = tail call i32 (...) @ft_space()
%23 = add nuw nsw i8 %17, 1
%24 = icmp ult i8 %17, 57
br i1 %24, label %16, label %5
25: ; preds = %5
%26 = icmp eq i8 %3, 56
br i1 %26, label %27, label %1
27: ; preds = %25, %16
ret void
}