#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*/ combi(int, int, int);
int /*<<< orphan*/ ft_putchar(char);
void ft_print_comb(void) {
  int first;
  int second;
  int third;
  first = '0';
  while (first <= '7') {
    second = first + 1;
    while (second <= '8') {
      third = second + 1;
      while (third <= '9') {
        combi(first, second, third);
        if (first != '7' || second != '8' || third != '9') {
          ft_putchar(',');
          ft_putchar(' ');
        }
        third = third + 1;
      }
      second = second + 1;
    }
    first = first + 1;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x30,-0x4(%rbp)
cmpl   $0x37,-0x4(%rbp)
jg     11c9 <ft_print_comb+0xa9>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x38,-0x8(%rbp)
jg     11bb <ft_print_comb+0x9b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x39,-0xc(%rbp)
jg     11ad <ft_print_comb+0x8d>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <combi@plt>
cmpl   $0x37,-0x4(%rbp)
jne    118b <ft_print_comb+0x6b>
cmpl   $0x38,-0x8(%rbp)
jne    118b <ft_print_comb+0x6b>
cmpl   $0x39,-0xc(%rbp)
je     119f <ft_print_comb+0x7f>
mov    $0x2c,%edi
call   1040 <ft_putchar@plt>
mov    $0x20,%edi
call   1040 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1155 <ft_print_comb+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <ft_print_comb+0x22>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <ft_print_comb+0xf>
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,%r15d
mov    %r15d,%r14d
lea    0x1(%r14),%r15d
mov    %r15d,%r13d
jmp    114a <ft_print_comb+0x2a>
nopl   (%rax)
add    $0x1,%r13d
cmp    $0x39,%r13d
je     11ac <ft_print_comb+0x8c>
cmp    $0x38,%r13d
ja     1140 <ft_print_comb+0x20>
mov    %r14d,%eax
xor    $0x37,%eax
mov    %r13d,%ecx
xor    $0x38,%ecx
or     %eax,%ecx
setne  %r12b
mov    %r13d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%ebx
lea    0x1(%rbx),%ebp
mov    %r14d,%edi
mov    %r13d,%esi
mov    %ebp,%edx
call   1030 <combi@plt>
cmp    $0x38,%ebx
sete   %al
mov    %r12d,%ecx
not    %cl
test   %al,%cl
jne    11b6 <ft_print_comb+0x96>
mov    $0x2c,%edi
call   1040 <ft_putchar@plt>
mov    $0x20,%edi
call   1040 <ft_putchar@plt>
cmp    $0x39,%ebp
jb     1170 <ft_print_comb+0x50>
jmp    1140 <ft_print_comb+0x20>
cmp    $0x38,%r15d
jne    1131 <ft_print_comb+0x11>
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 i32
%2 = alloca i32
%3 = alloca i32
store i32 48, i32* %1
br label %4
4: ; preds = %41, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 55
br i1 %6, label %7, label %44
7: ; preds = %4
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %10
10: ; preds = %38, %7
%11 = load i32, i32* %2
%12 = icmp sle i32 %11, 56
br i1 %12, label %13, label %41
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %16
16: ; preds = %35, %13
%17 = load i32, i32* %3
%18 = icmp sle i32 %17, 57
br i1 %18, label %19, label %38
19: ; preds = %16
%20 = load i32, i32* %1
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = call i32 @combi(i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* %1
%25 = icmp ne i32 %24, 55
br i1 %25, label %32, label %26
26: ; preds = %19
%27 = load i32, i32* %2
%28 = icmp ne i32 %27, 56
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %3
%31 = icmp ne i32 %30, 57
br i1 %31, label %32, label %35
32: ; preds = %29, %26, %19
%33 = call i32 @ft_putchar(i8 signext 44)
%34 = call i32 @ft_putchar(i8 signext 32)
br label %35
35: ; preds = %32, %29
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %16
38: ; preds = %16
%39 = load i32, i32* %2
%40 = add nsw i32 %39, 1
store i32 %40, i32* %2
br label %10
41: ; preds = %10
%42 = load i32, i32* %1
%43 = add nsw i32 %42, 1
store i32 %43, i32* %1
br label %4
44: ; preds = %4
ret void
}

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