#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*/ printf(char *, int, int, int);
int main() {
  int a, b, c;
  for (a = 1; a <= 9; a++) {
    for (b = 0; b <= 9; b++) {
      for (c = 1; c <= 9; c++) {
        if ((c + 10 * b + 100 * a + a + 10 * b + 100 * c) == 1333)
          printf("%d %d %d\n", a, b, c);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jg     11c9 <main+0xb9>
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jg     11b6 <main+0xa6>
movl   $0x1,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jg     11a3 <main+0x93>
mov    -0x10(%rbp),%eax
imul   $0xa,-0xc(%rbp),%ecx
add    %ecx,%eax
imul   $0x64,-0x8(%rbp),%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
imul   $0xa,-0xc(%rbp),%ecx
add    %ecx,%eax
imul   $0x64,-0x10(%rbp),%ecx
add    %ecx,%eax
cmp    $0x535,%eax
jne    1190 <main+0x80>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <main+0x85>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    11a8 <main+0x98>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    11bb <main+0xab>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%ebx
xor    %eax,%eax
lea    0xed4(%rip),%r14
jmp    1144 <main+0x34>
xchg   %ax,%ax
add    $0x1,%ebx
mov    0x20(%rsp),%rax
add    $0x65,%eax
cmp    $0xa,%ebx
je     128c <main+0x17c>
lea    -0x143(%rax),%ecx
mov    %ecx,0x1c(%rsp)
lea    -0x1a8(%rax),%ecx
mov    %ecx,0x18(%rsp)
lea    -0x20d(%rax),%ecx
mov    %ecx,0x14(%rsp)
lea    -0x272(%rax),%ecx
mov    %ecx,0x10(%rsp)
lea    -0x2d7(%rax),%ecx
mov    %ecx,0xc(%rsp)
lea    -0x33c(%rax),%r15d
mov    %rax,0x20(%rsp)
lea    -0x3a1(%rax),%r12d
xor    %r13d,%r13d
xor    %ebp,%ebp
jmp    11a0 <main+0x90>
add    $0x1,%ebp
add    $0xffffffec,%r13d
cmp    $0xffffff38,%r13d
je     1130 <main+0x20>
cmp    %r13d,%r12d
je     11e0 <main+0xd0>
cmp    %r13d,%r15d
je     11f6 <main+0xe6>
cmp    %r13d,0xc(%rsp)
je     120e <main+0xfe>
cmp    %r13d,0x10(%rsp)
je     1226 <main+0x116>
cmp    %r13d,0x14(%rsp)
je     123e <main+0x12e>
cmp    %r13d,0x18(%rsp)
je     125a <main+0x14a>
cmp    %r13d,0x1c(%rsp)
jne    1190 <main+0x80>
jmp    1276 <main+0x166>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x3,%ecx
call   1030 <printf@plt>
cmp    %r13d,%r15d
jne    11aa <main+0x9a>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x4,%ecx
call   1030 <printf@plt>
cmp    %r13d,0xc(%rsp)
jne    11b1 <main+0xa1>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x5,%ecx
call   1030 <printf@plt>
cmp    %r13d,0x10(%rsp)
jne    11b8 <main+0xa8>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x6,%ecx
call   1030 <printf@plt>
cmp    %r13d,0x14(%rsp)
jne    11bf <main+0xaf>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x7,%ecx
call   1030 <printf@plt>
cmp    %r13d,0x18(%rsp)
jne    11ca <main+0xba>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x8,%ecx
call   1030 <printf@plt>
cmp    %r13d,0x1c(%rsp)
jne    1190 <main+0x80>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    $0x9,%ecx
call   1030 <printf@plt>
jmp    1190 <main+0x80>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %5
5: ; preds = %47, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 9
br i1 %7, label %8, label %50
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %43, %8
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 9
br i1 %11, label %12, label %46
12: ; preds = %9
store i32 1, i32* %4
br label %13
13: ; preds = %39, %12
%14 = load i32, i32* %4
%15 = icmp sle i32 %14, 9
br i1 %15, label %16, label %42
16: ; preds = %13
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = mul nsw i32 10, %18
%20 = add nsw i32 %17, %19
%21 = load i32, i32* %2
%22 = mul nsw i32 100, %21
%23 = add nsw i32 %20, %22
%24 = load i32, i32* %2
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %3
%27 = mul nsw i32 10, %26
%28 = add nsw i32 %25, %27
%29 = load i32, i32* %4
%30 = mul nsw i32 100, %29
%31 = add nsw i32 %28, %30
%32 = icmp eq i32 %31, 1333
br i1 %32, label %33, label %38
33: ; preds = %16
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = load i32, i32* %4
%37 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %34, i32 %35, i32 %36)
br label %38
38: ; preds = %33, %16
br label %39
39: ; preds = %38
%40 = load i32, i32* %4
%41 = add nsw i32 %40, 1
store i32 %41, i32* %4
br label %13
42: ; preds = %13
br label %43
43: ; preds = %42
%44 = load i32, i32* %3
%45 = add nsw i32 %44, 1
store i32 %45, i32* %3
br label %9
46: ; preds = %9
br label %47
47: ; preds = %46
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %5
50: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %51
%2 = phi i32 [ 1, %0 ], [ %52, %51 ]
%3 = mul i32 %2, 100
%4 = mul i32 %2, 100
%5 = mul i32 %2, 100
%6 = mul i32 %2, 100
%7 = mul i32 %2, 100
%8 = mul i32 %2, 100
%9 = mul i32 %2, 100
br label %10
10: ; preds = %1, %48
%11 = phi i32 [ 0, %1 ], [ %49, %48 ]
%12 = mul nuw nsw i32 %11, 20
%13 = add nuw nsw i32 %12, %2
%14 = add i32 %13, %3
%15 = icmp eq i32 %14, 1030
br i1 %15, label %16, label %18
16: ; preds = %10
%17 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 3)
br label %18
18: ; preds = %16, %10
%19 = add i32 %13, %4
%20 = icmp eq i32 %19, 929
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 4)
br label %23
23: ; preds = %21, %18
%24 = add i32 %13, %5
%25 = icmp eq i32 %24, 828
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 5)
br label %28
28: ; preds = %26, %23
%29 = add i32 %13, %6
%30 = icmp eq i32 %29, 727
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 6)
br label %33
33: ; preds = %31, %28
%34 = add i32 %13, %7
%35 = icmp eq i32 %34, 626
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 7)
br label %38
38: ; preds = %36, %33
%39 = add i32 %13, %8
%40 = icmp eq i32 %39, 525
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 8)
br label %43
43: ; preds = %41, %38
%44 = add i32 %13, %9
%45 = icmp eq i32 %44, 424
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %11, i32 9)
br label %48
48: ; preds = %46, %43
%49 = add nuw nsw i32 %11, 1
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %10
51: ; preds = %48
%52 = add nuw nsw i32 %2, 1
%53 = icmp eq i32 %52, 10
br i1 %53, label %54, label %1
54: ; preds = %51
ret i32 0
}