#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 i, j, k;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      for (k = 0; k < 10; k++) {
        if ((i * 100 + j * 10 + k + j * 100 + k * 10 + k) == 532) {
          printf("%d %d %d\n", i, j, k);
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    11c7 <main+0xb7>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    11b4 <main+0xa4>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    11a1 <main+0x91>
imul   $0x64,-0x8(%rbp),%eax
imul   $0xa,-0xc(%rbp),%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
imul   $0x64,-0xc(%rbp),%ecx
add    %ecx,%eax
imul   $0xa,-0x10(%rbp),%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
cmp    $0x214,%eax
jne    118e <main+0x7e>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
jmp    1193 <main+0x83>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1148 <main+0x38>
jmp    11a6 <main+0x96>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    11b9 <main+0xa9>
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
push   %rax
xor    %r15d,%r15d
lea    0xedb(%rip),%r14
xor    %r12d,%r12d
jmp    1142 <main+0x32>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
add    $0x64,%r15d
cmp    $0xa,%r12d
je     12ee <main+0x1de>
mov    $0xfffffbb4,%r13d
xor    %ebx,%ebx
jmp    1159 <main+0x49>
nopl   0x0(%rax)
add    $0x1,%ebx
add    $0x6e,%r13d
je     1130 <main+0x20>
lea    (%r15,%r13,1),%ebp
cmp    $0xfffffdc8,%ebp
je     11d0 <main+0xc0>
cmp    $0xfffffdbc,%ebp
je     11e7 <main+0xd7>
cmp    $0xfffffdb0,%ebp
je     1205 <main+0xf5>
cmp    $0xfffffda4,%ebp
je     1223 <main+0x113>
cmp    $0xfffffd98,%ebp
je     1241 <main+0x131>
cmp    $0xfffffd8c,%ebp
je     125f <main+0x14f>
cmp    $0xfffffd80,%ebp
je     127d <main+0x16d>
cmp    $0xfffffd74,%ebp
je     129b <main+0x18b>
cmp    $0xfffffd68,%ebp
je     12b9 <main+0x1a9>
cmp    $0xfffffd5c,%ebp
jne    1150 <main+0x40>
jmp    12d7 <main+0x1c7>
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
cmp    $0xfffffdbc,%ebp
jne    116d <main+0x5d>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
cmp    $0xfffffdb0,%ebp
jne    1179 <main+0x69>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x2,%ecx
call   1030 <printf@plt>
cmp    $0xfffffda4,%ebp
jne    1185 <main+0x75>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x3,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd98,%ebp
jne    1191 <main+0x81>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x4,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd8c,%ebp
jne    119d <main+0x8d>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x5,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd80,%ebp
jne    11a9 <main+0x99>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x6,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd74,%ebp
jne    11b5 <main+0xa5>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x7,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd68,%ebp
jne    11c1 <main+0xb1>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x8,%ecx
call   1030 <printf@plt>
cmp    $0xfffffd5c,%ebp
jne    1150 <main+0x40>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    $0x9,%ecx
call   1030 <printf@plt>
jmp    1150 <main+0x40>
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
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %47, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
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 slt i32 %10, 10
br i1 %11, label %12, label %46
12: ; preds = %9
store i32 0, i32* %4
br label %13
13: ; preds = %39, %12
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 10
br i1 %15, label %16, label %42
16: ; preds = %13
%17 = load i32, i32* %2
%18 = mul nsw i32 %17, 100
%19 = load i32, i32* %3
%20 = mul nsw i32 %19, 10
%21 = add nsw i32 %18, %20
%22 = load i32, i32* %4
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %3
%25 = mul nsw i32 %24, 100
%26 = add nsw i32 %23, %25
%27 = load i32, i32* %4
%28 = mul nsw i32 %27, 10
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %4
%31 = add nsw i32 %29, %30
%32 = icmp eq i32 %31, 532
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, %70
%2 = phi i32 [ 0, %0 ], [ %71, %70 ]
br label %3
3: ; preds = %1, %68
%4 = phi i32 [ 0, %1 ], [ %13, %68 ]
%5 = add nuw nsw i32 %4, %2
%6 = mul nuw nsw i32 %5, 100
%7 = mul nuw nsw i32 %4, 10
%8 = add nuw nsw i32 %6, %7
%9 = icmp eq i32 %8, 532
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 0)
br label %12
12: ; preds = %3, %10
%13 = add nuw nsw i32 %4, 1
%14 = mul nuw nsw i32 %13, 10
%15 = or i32 %6, 2
%16 = add nuw nsw i32 %15, %14
%17 = icmp eq i32 %16, 532
br i1 %17, label %18, label %20
18: ; preds = %12
%19 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 1)
br label %20
20: ; preds = %18, %12
%21 = mul i32 %4, 10
%22 = add i32 %6, %21
%23 = icmp eq i32 %22, 508
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 2)
br label %26
26: ; preds = %24, %20
%27 = mul i32 %4, 10
%28 = add i32 %6, %27
%29 = icmp eq i32 %28, 496
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 3)
br label %32
32: ; preds = %30, %26
%33 = mul i32 %4, 10
%34 = add i32 %6, %33
%35 = icmp eq i32 %34, 484
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 4)
br label %38
38: ; preds = %36, %32
%39 = mul i32 %4, 10
%40 = add i32 %6, %39
%41 = icmp eq i32 %40, 472
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 5)
br label %44
44: ; preds = %42, %38
%45 = mul i32 %4, 10
%46 = add i32 %6, %45
%47 = icmp eq i32 %46, 460
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 6)
br label %50
50: ; preds = %48, %44
%51 = mul i32 %4, 10
%52 = add i32 %6, %51
%53 = icmp eq i32 %52, 448
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 7)
br label %56
56: ; preds = %54, %50
%57 = mul i32 %4, 10
%58 = add i32 %6, %57
%59 = icmp eq i32 %58, 436
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 8)
br label %62
62: ; preds = %60, %56
%63 = mul i32 %4, 10
%64 = add i32 %6, %63
%65 = icmp eq i32 %64, 424
br i1 %65, label %66, label %68
66: ; preds = %62
%67 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 9)
br label %68
68: ; preds = %66, %62
%69 = icmp eq i32 %13, 10
br i1 %69, label %70, label %3
70: ; preds = %68
%71 = add nuw nsw i32 %2, 1
%72 = icmp eq i32 %71, 10
br i1 %72, label %73, label %1
73: ; preds = %70
ret i32 0
}