#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_putchar(char);
int /*<<< orphan*/ js_putchar(char, char, char);
void ft_print_comb(void) {
  char a;
  char n;
  char i;
  n = '0';
  while (n <= '7') {
    i = n + 1;
    while (i <= '8') {
      a = i + 1;
      while (a <= '9') {
        js_putchar(n, i, a);
        if (n != '7' || i != '8' || a != '9') {
          ft_putchar(',');
          ft_putchar(' ');
        }
        a++;
      }
      i++;
    }
    n++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x37,%eax
jg     11de <ft_print_comb+0xbe>
movsbl -0x2(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x38,%eax
jg     11d1 <ft_print_comb+0xb1>
movsbl -0x3(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     11c4 <ft_print_comb+0xa4>
mov    -0x2(%rbp),%cl
mov    -0x3(%rbp),%al
movsbl %cl,%edi
movsbl %al,%esi
movsbl -0x1(%rbp),%edx
call   1030 <js_putchar@plt>
movsbl -0x2(%rbp),%eax
cmp    $0x37,%eax
jne    11a3 <ft_print_comb+0x83>
movsbl -0x3(%rbp),%eax
cmp    $0x38,%eax
jne    11a3 <ft_print_comb+0x83>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
je     11b7 <ft_print_comb+0x97>
mov    $0x2c,%edi
call   1040 <ft_putchar@plt>
mov    $0x20,%edi
call   1040 <ft_putchar@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    115a <ft_print_comb+0x3a>
mov    -0x3(%rbp),%al
add    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    1143 <ft_print_comb+0x23>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    112c <ft_print_comb+0xc>
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     11b1 <ft_print_comb+0x91>
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 <js_putchar@plt>
cmp    $0x38,%bl
sete   %al
mov    %r15d,%ecx
not    %cl
test   %al,%cl
jne    11be <ft_print_comb+0x9e>
mov    $0x2c,%edi
call   1040 <ft_putchar@plt>
mov    $0x20,%edi
call   1040 <ft_putchar@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 i8
%2 = alloca i8
%3 = alloca i8
store i8 48, i8* %2
br label %4
4: ; preds = %51, %0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 55
br i1 %7, label %8, label %54
8: ; preds = %4
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
store i8 %12, i8* %3
br label %13
13: ; preds = %48, %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 56
br i1 %16, label %17, label %51
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = add nsw i32 %19, 1
%21 = trunc i32 %20 to i8
store i8 %21, i8* %1
br label %22
22: ; preds = %45, %17
%23 = load i8, i8* %1
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %48
26: ; preds = %22
%27 = load i8, i8* %2
%28 = load i8, i8* %3
%29 = load i8, i8* %1
%30 = call i32 @js_putchar(i8 signext %27, i8 signext %28, i8 signext %29)
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 55
br i1 %33, label %42, label %34
34: ; preds = %26
%35 = load i8, i8* %3
%36 = sext i8 %35 to i32
%37 = icmp ne i32 %36, 56
br i1 %37, label %42, label %38
38: ; preds = %34
%39 = load i8, i8* %1
%40 = sext i8 %39 to i32
%41 = icmp ne i32 %40, 57
br i1 %41, label %42, label %45
42: ; preds = %38, %34, %26
%43 = call i32 @ft_putchar(i8 signext 44)
%44 = call i32 @ft_putchar(i8 signext 32)
br label %45
45: ; preds = %42, %38
%46 = load i8, i8* %1
%47 = add i8 %46, 1
store i8 %47, i8* %1
br label %22
48: ; preds = %22
%49 = load i8, i8* %3
%50 = add i8 %49, 1
store i8 %50, i8* %3
br label %13
51: ; preds = %13
%52 = load i8, i8* %2
%53 = add i8 %52, 1
store i8 %53, i8* %2
br label %4
54: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ft_print_comb() {
br label %1
1: ; preds = %26, %0
%2 = phi i8 [ 48, %0 ], [ %3, %26 ]
%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 %26, 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 ], [ %24, %21 ]
%18 = tail call i32 @js_putchar(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 %28
21: ; preds = %16
%22 = tail call i32 @ft_putchar(i8 signext 44)
%23 = tail call i32 @ft_putchar(i8 signext 32)
%24 = add nuw nsw i8 %17, 1
%25 = icmp ult i8 %17, 57
br i1 %25, label %16, label %5
26: ; preds = %5
%27 = icmp eq i8 %3, 56
br i1 %27, label %28, label %1
28: ; preds = %26, %16
ret void
}