#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 abc;
  for (abc = 123; abc <= 329; abc++) {
    int def = abc * 2;
    int ghi = abc * 3;
    int big = abc * 1000000 + def * 1000 + ghi;
    int ok = 1, d;
    for (d = 1; d <= 9; d++) {
      int n = big;
      int seen = 0;
      while (n > 0) {
        if (n % 10 == d)
          seen = 1;
        n /= 10;
      }
      if (!seen) {
        ok = 0;
        break;
      }
    }
    if (ok)
      printf("%d %d %d\n", abc, def, ghi);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
cmpl   $0x149,-0x8(%rbp)
jg     1211 <main+0x101>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0x3,-0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0xf4240,-0x8(%rbp),%eax
imul   $0x3e8,-0xc(%rbp),%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x9,-0x1c(%rbp)
jg     11df <main+0xcf>
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    11b6 <main+0xa6>
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    -0x1c(%rbp),%edx
jne    11a3 <main+0x93>
movl   $0x1,-0x24(%rbp)
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
jmp    117e <main+0x6e>
cmpl   $0x0,-0x24(%rbp)
jne    11cc <main+0xbc>
movl   $0x0,-0x18(%rbp)
jmp    11df <main+0xcf>
jmp    11d1 <main+0xc1>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1167 <main+0x57>
cmpl   $0x0,-0x18(%rbp)
je     11fe <main+0xee>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe07(%rip),%rdi
call   1030 <printf@plt>
jmp    1203 <main+0xf3>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x7b,%r15d
mov    $0xcccccccd,%r12d
mov    $0x1,%r13d
lea    0xecc(%rip),%r14
jmp    1158 <main+0x48>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
add    $0x1,%r15d
cmp    $0x14a,%r15d
je     11cf <main+0xbf>
lea    (%r15,%r15,1),%edx
lea    (%r15,%r15,2),%ecx
imul   $0xf4a13,%r15d,%r8d
mov    $0x1,%r9b
mov    $0x1,%r10d
xor    %esi,%esi
mov    %r8d,%edi
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%ebx
imul   %r12,%rbx
shr    $0x23,%rbx
lea    (%rbx,%rbx,1),%ebp
lea    0x0(%rbp,%rbp,4),%ebp
mov    %edi,%eax
sub    %ebp,%eax
cmp    %r10d,%eax
cmove  %r13d,%esi
cmp    $0x9,%edi
mov    %ebx,%edi
ja     1180 <main+0x70>
test   %esi,%esi
je     11c0 <main+0xb0>
cmp    $0x9,%r10d
lea    0x1(%r10),%eax
setb   %r9b
mov    %eax,%r10d
cmp    $0xa,%eax
jne    1170 <main+0x60>
jmp    1140 <main+0x30>
nopl   (%rax)
test   $0x1,%r9b
je     1140 <main+0x30>
jmp    114b <main+0x3b>
xor    %eax,%eax
add    $0x8,%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
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 123, i32* %2
br label %10
10: ; preds = %59, %0
%11 = load i32, i32* %2
%12 = icmp sle i32 %11, 329
br i1 %12, label %13, label %62
13: ; preds = %10
%14 = load i32, i32* %2
%15 = mul nsw i32 %14, 2
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = mul nsw i32 %16, 3
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = mul nsw i32 %18, 1000000
%20 = load i32, i32* %3
%21 = mul nsw i32 %20, 1000
%22 = add nsw i32 %19, %21
%23 = load i32, i32* %4
%24 = add nsw i32 %22, %23
store i32 %24, i32* %5
store i32 1, i32* %6
store i32 1, i32* %7
br label %25
25: ; preds = %47, %13
%26 = load i32, i32* %7
%27 = icmp sle i32 %26, 9
br i1 %27, label %28, label %50
28: ; preds = %25
%29 = load i32, i32* %5
store i32 %29, i32* %8
store i32 0, i32* %9
br label %30
30: ; preds = %39, %28
%31 = load i32, i32* %8
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load i32, i32* %8
%35 = srem i32 %34, 10
%36 = load i32, i32* %7
%37 = icmp eq i32 %35, %36
br i1 %37, label %38, label %39
38: ; preds = %33
store i32 1, i32* %9
br label %39
39: ; preds = %38, %33
%40 = load i32, i32* %8
%41 = sdiv i32 %40, 10
store i32 %41, i32* %8
br label %30
42: ; preds = %30
%43 = load i32, i32* %9
%44 = icmp ne i32 %43, 0
br i1 %44, label %46, label %45
45: ; preds = %42
store i32 0, i32* %6
br label %50
46: ; preds = %42
br label %47
47: ; preds = %46
%48 = load i32, i32* %7
%49 = add nsw i32 %48, 1
store i32 %49, i32* %7
br label %25
50: ; preds = %45, %25
%51 = load i32, i32* %6
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %58
53: ; preds = %50
%54 = load i32, i32* %2
%55 = load i32, i32* %3
%56 = load i32, i32* %4
%57 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %54, i32 %55, i32 %56)
br label %58
58: ; preds = %53, %50
br label %59
59: ; preds = %58
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 1
store i32 %61, i32* %2
br label %10
62: ; preds = %10
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, %26
%2 = phi i32 [ 123, %0 ], [ %27, %26 ]
%3 = shl nuw nsw i32 %2, 1
%4 = mul nuw nsw i32 %2, 3
%5 = mul nuw nsw i32 %2, 1002003
br label %10
6: ; preds = %21
%7 = add nuw nsw i32 %12, 1
%8 = icmp ult i32 %12, 9
%9 = icmp eq i32 %7, 10
br i1 %9, label %24, label %10
10: ; preds = %1, %6
%11 = phi i1 [ true, %1 ], [ %8, %6 ]
%12 = phi i32 [ 1, %1 ], [ %7, %6 ]
br label %13
13: ; preds = %10, %13
%14 = phi i32 [ 0, %10 ], [ %18, %13 ]
%15 = phi i32 [ %5, %10 ], [ %19, %13 ]
%16 = urem i32 %15, 10
%17 = icmp eq i32 %16, %12
%18 = select i1 %17, i32 1, i32 %14
%19 = udiv i32 %15, 10
%20 = icmp ult i32 %15, 10
br i1 %20, label %21, label %13
21: ; preds = %13
%22 = icmp eq i32 %18, 0
br i1 %22, label %23, label %6
23: ; preds = %21
br i1 %11, label %26, label %24
24: ; preds = %6, %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
br label %26
26: ; preds = %24, %23
%27 = add nuw nsw i32 %2, 1
%28 = icmp eq i32 %27, 330
br i1 %28, label %29, label %1
29: ; preds = %26
ret i32 0
}