#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);
void ft_print_comb(void) {
  char first_char;
  char second_char;
  char third_char;
  first_char = '0';
  while (first_char <= '7') {
    second_char = first_char;
    while (second_char++ < '9') {
      third_char = second_char;
      while (third_char++ < '9') {
        ft_putchar(first_char);
        ft_putchar(second_char);
        ft_putchar(third_char);
        if (first_char != '7' || second_char != '8') {
          ft_putchar(',');
          ft_putchar(' ');
        }
      }
    }
    first_char++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x30,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x37,%eax
jg     11c3 <ft_print_comb+0xb3>
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,%cl
add    $0x1,%cl
mov    %cl,-0x2(%rbp)
movsbl %al,%eax
cmp    $0x39,%eax
jge    11b6 <ft_print_comb+0xa6>
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,%cl
add    $0x1,%cl
mov    %cl,-0x3(%rbp)
movsbl %al,%eax
cmp    $0x39,%eax
jge    11b1 <ft_print_comb+0xa1>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x37,%eax
jne    1198 <ft_print_comb+0x88>
movsbl -0x2(%rbp),%eax
cmp    $0x38,%eax
je     11ac <ft_print_comb+0x9c>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    114c <ft_print_comb+0x3c>
jmp    112f <ft_print_comb+0x1f>
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   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x30,%r12b
mov    $0x31,%r15b
jmp    113e <ft_print_comb+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12b
add    $0x1,%r15b
cmp    $0x38,%r12b
je     11bd <ft_print_comb+0xad>
mov    %r15d,%r14d
mov    %r12d,%ebp
jmp    115a <ft_print_comb+0x4a>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r14b
cmp    $0x39,%bpl
je     1130 <ft_print_comb+0x20>
mov    %ebp,%eax
lea    0x1(%rax),%ebp
cmp    $0x37,%al
ja     1150 <ft_print_comb+0x40>
mov    %r12d,%eax
xor    $0x37,%al
mov    %ebp,%ecx
xor    $0x38,%cl
or     %al,%cl
setne  %r13b
mov    %r14d,%ebx
jmp    1185 <ft_print_comb+0x75>
nopl   0x0(%rax,%rax,1)
cmp    $0x39,%bl
jae    1150 <ft_print_comb+0x40>
add    $0x1,%bl
movsbl %r12b,%edi
call   1030 <ft_putchar@plt>
movsbl %bpl,%edi
call   1030 <ft_putchar@plt>
movsbl %bl,%edi
call   1030 <ft_putchar@plt>
test   %r13b,%r13b
je     1180 <ft_print_comb+0x70>
mov    $0x2c,%edi
call   1030 <ft_putchar@plt>
mov    $0x20,%edi
call   1030 <ft_putchar@plt>
jmp    1180 <ft_print_comb+0x70>
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* %1
br label %4
4: ; preds = %41, %0
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp sle i32 %6, 55
br i1 %7, label %8, label %44
8: ; preds = %4
%9 = load i8, i8* %1
store i8 %9, i8* %2
br label %10
10: ; preds = %40, %8
%11 = load i8, i8* %2
%12 = add i8 %11, 1
store i8 %12, i8* %2
%13 = sext i8 %11 to i32
%14 = icmp slt i32 %13, 57
br i1 %14, label %15, label %41
15: ; preds = %10
%16 = load i8, i8* %2
store i8 %16, i8* %3
br label %17
17: ; preds = %39, %15
%18 = load i8, i8* %3
%19 = add i8 %18, 1
store i8 %19, i8* %3
%20 = sext i8 %18 to i32
%21 = icmp slt i32 %20, 57
br i1 %21, label %22, label %40
22: ; preds = %17
%23 = load i8, i8* %1
%24 = call i32 @ft_putchar(i8 signext %23)
%25 = load i8, i8* %2
%26 = call i32 @ft_putchar(i8 signext %25)
%27 = load i8, i8* %3
%28 = call i32 @ft_putchar(i8 signext %27)
%29 = load i8, i8* %1
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 55
br i1 %31, label %36, label %32
32: ; preds = %22
%33 = load i8, i8* %2
%34 = sext i8 %33 to i32
%35 = icmp ne i32 %34, 56
br i1 %35, label %36, label %39
36: ; preds = %32, %22
%37 = call i32 @ft_putchar(i8 signext 44)
%38 = call i32 @ft_putchar(i8 signext 32)
br label %39
39: ; preds = %36, %32
br label %17
40: ; preds = %17
br label %10
41: ; preds = %10
%42 = load i8, i8* %1
%43 = add i8 %42, 1
store i8 %43, i8* %1
br label %4
44: ; preds = %4
ret void
}

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