#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*/ putchar(char);
void ft_print_comb(void) {
  int c, d, u, i;
  char c2;
  char d2;
  char u2;
  i = 0;
  while (i < 790) {
    c = (i / 100);
    d = ((i - (c * 100)) / 10);
    u = (i - (c * 100)) - (d * 10);
    if (c < d && d < u) {
      c2 = c + '0';
      d2 = d + '0';
      u2 = u + '0';
      putchar(c2);
      putchar(d2);
      putchar(u2);
      if (i < 789) {
        putchar(',');
        putchar(' ');
      }
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_print_comb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x10(%rbp)
cmpl   $0x316,-0x10(%rbp)
jge    11e2 <ft_print_comb+0xd2>
mov    -0x10(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
imul   $0x64,-0x4(%rbp),%ecx
sub    %ecx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
imul   $0x64,-0x4(%rbp),%ecx
sub    %ecx,%eax
imul   $0xa,-0x8(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d4 <ft_print_comb+0xc4>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11d4 <ft_print_comb+0xc4>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x12(%rbp)
mov    -0xc(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x13(%rbp)
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x12(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x13(%rbp),%edi
call   1030 <putchar@plt>
cmpl   $0x315,-0x10(%rbp)
jge    11cf <ft_print_comb+0xbf>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11d4 <ft_print_comb+0xc4>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <ft_print_comb+0xf>
add    $0x20,%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
xor    %r13d,%r13d
mov    $0x316,%r15d
mov    $0x30,%r14b
xor    %ebp,%ebp
jmp    1145 <ft_print_comb+0x35>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0x1,%r13d
add    $0x1,%r14b
add    $0xffffffff,%r15d
je     11e8 <ft_print_comb+0xd8>
mov    %ebp,%eax
imul   $0x51eb851f,%rax,%rax
shr    $0x25,%rax
imul   $0x64,%eax,%ecx
mov    %r13d,%edx
sub    %ecx,%edx
movzwl %bp,%eax
shr    $0x2,%eax
imul   $0x147b,%eax,%eax
shr    $0x11,%eax
movswl %dx,%edx
imul   $0x6667,%edx,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x12,%edx
add    %esi,%edx
cmp    %edx,%eax
jge    1130 <ft_print_comb+0x20>
mov    %ebp,%esi
sub    %ecx,%esi
lea    (%rdx,%rdx,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
cmp    %edx,%esi
jle    1130 <ft_print_comb+0x20>
mov    %r14d,%esi
sub    %cl,%sil
add    $0x30,%al
mov    %edx,%r12d
add    $0x30,%r12b
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%ebx
neg    %ebx
add    %sil,%bl
movsbl %al,%edi
call   1030 <putchar@plt>
movsbl %r12b,%edi
call   1030 <putchar@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
cmp    $0x314,%ebp
ja     1130 <ft_print_comb+0x20>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1130 <ft_print_comb+0x20>
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
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i32 0, i32* %4
br label %8
8: ; preds = %55, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 790
br i1 %10, label %11, label %58
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sdiv i32 %12, 100
store i32 %13, i32* %1
%14 = load i32, i32* %4
%15 = load i32, i32* %1
%16 = mul nsw i32 %15, 100
%17 = sub nsw i32 %14, %16
%18 = sdiv i32 %17, 10
store i32 %18, i32* %2
%19 = load i32, i32* %4
%20 = load i32, i32* %1
%21 = mul nsw i32 %20, 100
%22 = sub nsw i32 %19, %21
%23 = load i32, i32* %2
%24 = mul nsw i32 %23, 10
%25 = sub nsw i32 %22, %24
store i32 %25, i32* %3
%26 = load i32, i32* %1
%27 = load i32, i32* %2
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %55
29: ; preds = %11
%30 = load i32, i32* %2
%31 = load i32, i32* %3
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %55
33: ; preds = %29
%34 = load i32, i32* %1
%35 = add nsw i32 %34, 48
%36 = trunc i32 %35 to i8
store i8 %36, i8* %5
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 48
%39 = trunc i32 %38 to i8
store i8 %39, i8* %6
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 48
%42 = trunc i32 %41 to i8
store i8 %42, i8* %7
%43 = load i8, i8* %5
%44 = call i32 @putchar(i8 signext %43)
%45 = load i8, i8* %6
%46 = call i32 @putchar(i8 signext %45)
%47 = load i8, i8* %7
%48 = call i32 @putchar(i8 signext %47)
%49 = load i32, i32* %4
%50 = icmp slt i32 %49, 789
br i1 %50, label %51, label %54
51: ; preds = %33
%52 = call i32 @putchar(i8 signext 44)
%53 = call i32 @putchar(i8 signext 32)
br label %54
54: ; preds = %51, %33
br label %55
55: ; preds = %54, %29, %11
%56 = load i32, i32* %4
%57 = add nsw i32 %56, 1
store i32 %57, i32* %4
br label %8
58: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @ft_print_comb() {
br label %1
1: ; preds = %0, %30
%2 = phi i32 [ 0, %0 ], [ %31, %30 ]
%3 = trunc i32 %2 to i16
%4 = udiv i16 %3, 100
%5 = zext i16 %4 to i32
%6 = mul nsw i32 %5, -100
%7 = add nsw i32 %6, %2
%8 = trunc i32 %7 to i16
%9 = sdiv i16 %8, 10
%10 = sext i16 %9 to i32
%11 = mul nsw i32 %10, -10
%12 = add nsw i32 %11, %7
%13 = icmp slt i32 %5, %10
%14 = icmp sgt i32 %12, %10
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %16, label %30
16: ; preds = %1
%17 = trunc i16 %4 to i8
%18 = add nuw nsw i8 %17, 48
%19 = trunc i16 %9 to i8
%20 = add nsw i8 %19, 48
%21 = trunc i32 %12 to i8
%22 = add i8 %21, 48
%23 = tail call i32 @putchar(i8 signext %18)
%24 = tail call i32 @putchar(i8 signext %20)
%25 = tail call i32 @putchar(i8 signext %22)
%26 = icmp ult i32 %2, 789
br i1 %26, label %27, label %30
27: ; preds = %16
%28 = tail call i32 @putchar(i8 signext 44)
%29 = tail call i32 @putchar(i8 signext 32)
br label %30
30: ; preds = %16, %27, %1
%31 = add nuw nsw i32 %2, 1
%32 = icmp eq i32 %31, 790
br i1 %32, label %33, label %1
33: ; preds = %30
ret void
}