#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_print(char, char, char);
void ft_print_comb(void) {
  char a;
  char b;
  char c;
  a = '0';
  while (a <= '9') {
    b = a + 1;
    while (b <= '9') {
      c = b + 1;
      while (c <= '9') {
        ft_print(a, b, c);
        c++;
      }
      b++;
    }
    a++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1193 <ft_print_comb+0x83>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1186 <ft_print_comb+0x76>
movsbl -0x2(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x39,%eax
jg     1179 <ft_print_comb+0x69>
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
movsbl %cl,%edi
movsbl %al,%esi
movsbl -0x3(%rbp),%edx
call   1030 <ft_print@plt>
mov    -0x3(%rbp),%al
add    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    114a <ft_print_comb+0x3a>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    1133 <ft_print_comb+0x23>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    111c <ft_print_comb+0xc>
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,%r14b
jmp    1129 <ft_print_comb+0x19>
nopl   (%rax)
mov    %r15d,%r14d
cmp    $0x3a,%r15b
je     117d <ft_print_comb+0x6d>
lea    0x1(%r14),%r15d
mov    %r15d,%eax
mov    %r14d,%r12d
cmp    $0x38,%r14b
jbe    1149 <ft_print_comb+0x39>
jmp    1120 <ft_print_comb+0x10>
nopl   0x0(%rax,%rax,1)
lea    0x1(%r12),%eax
cmp    $0x3a,%al
je     1120 <ft_print_comb+0x10>
mov    %r12d,%ecx
mov    %eax,%r12d
cmp    $0x37,%cl
ja     1140 <ft_print_comb+0x30>
mov    %r12d,%ebx
nopw   0x0(%rax,%rax,1)
add    $0x1,%bl
movsbl %r14b,%edi
movsbl %r12b,%esi
movsbl %bl,%ebp
mov    %ebp,%edx
call   1030 <ft_print@plt>
cmp    $0x39,%bpl
jb     1160 <ft_print_comb+0x50>
jmp    1140 <ft_print_comb+0x30>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @ft_print_comb() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 48, i8* %1
br label %4
4: ; preds = %36, %0
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 57
br i1 %7, label %8, label %39
8: ; preds = %4
%9 = load i8, i8* %1
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %13
13: ; preds = %33, %8
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 57
br i1 %16, label %17, label %36
17: ; preds = %13
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = add nsw i32 %19, 1
%21 = trunc i32 %20 to i8
store i8 %21, i8* %3
br label %22
22: ; preds = %26, %17
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %33
26: ; preds = %22
%27 = load i8, i8* %1
%28 = load i8, i8* %2
%29 = load i8, i8* %3
%30 = call i32 @ft_print(i8 signext %27, i8 signext %28, i8 signext %29)
%31 = load i8, i8* %3
%32 = add i8 %31, 1
store i8 %32, i8* %3
br label %22
33: ; preds = %22
%34 = load i8, i8* %2
%35 = add i8 %34, 1
store i8 %35, i8* %2
br label %13
36: ; preds = %13
%37 = load i8, i8* %1
%38 = add i8 %37, 1
store i8 %38, i8* %1
br label %4
39: ; preds = %4
ret void
}

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