#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 /*<<< orphan*/ same(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int main(int argc, char *argv[]) {
  for (int i = 102;; i++) {
    char s1[64] = {'\0'};
    sprintf(s1, "%i", i);
    if (s1[0] != '1')
      continue;
    bool found = true;
    for (int x = 2; x <= 6; x++) {
      char s2[64] = {'\0'};
      sprintf(s2, "%i", i * x);
      if (!same(s1, s2)) {
        found = false;
        break;
      }
    }
    if (found) {
      printf("%i", i);
      break;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x66,-0x14(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe82(%rip),%rsi
call   1060 <sprintf@plt>
movsbl -0x60(%rbp),%eax
cmp    $0x31,%eax
je     1195 <main+0x55>
jmp    1235 <main+0xf5>
movl   $0x1,-0x64(%rbp)
movl   $0x2,-0x68(%rbp)
cmpl   $0x6,-0x68(%rbp)
jg     1212 <main+0xd2>
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x14(%rbp),%edx
imul   -0x68(%rbp),%edx
lea    0xe2b(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1050 <same@plt>
cmp    $0x0,%eax
jne    11ff <main+0xbf>
movl   $0x0,-0x64(%rbp)
jmp    1212 <main+0xd2>
jmp    1204 <main+0xc4>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11a3 <main+0x63>
cmpl   $0x0,-0x64(%rbp)
je     1230 <main+0xf0>
mov    -0x14(%rbp),%esi
lea    0xdda(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x103>
jmp    1235 <main+0xf5>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1160 <main+0x20>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    $0x66,%r13d
mov    $0x198,%ebx
mov    $0xcc,%ebp
movl   $0x264,0x4(%rsp)
movl   $0x1fe,0x8(%rsp)
movl   $0x132,0xc(%rsp)
xorps  %xmm0,%xmm0
lea    0xe8d(%rip),%r15
lea    0x50(%rsp),%r12
jmp    119c <main+0x6c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r13d
add    $0x4,%ebx
add    $0x2,%ebp
addl   $0x6,0x4(%rsp)
addl   $0x5,0x8(%rsp)
addl   $0x3,0xc(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r13d,%edx
call   1050 <sprintf@plt>
cmpb   $0x31,0x50(%rsp)
jne    1180 <main+0x50>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <same@plt>
test   %eax,%eax
je     1180 <main+0x50>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    %ebp,%r14d
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
call   1050 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14d,%ebp
call   1040 <same@plt>
test   %eax,%eax
je     1180 <main+0x50>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14d,%ebp
call   1040 <same@plt>
test   %eax,%eax
je     1180 <main+0x50>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0x8(%rsp),%edx
call   1050 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14d,%ebp
call   1040 <same@plt>
test   %eax,%eax
je     1180 <main+0x50>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    0x4(%rsp),%edx
call   1050 <sprintf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
mov    %r14d,%ebp
call   1040 <same@plt>
test   %eax,%eax
je     1180 <main+0x50>
lea    0xcf4(%rip),%rdi
mov    %r13d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
br label %7
7: ; preds = %37, %2
%8 = phi i32 [ 102, %2 ], [ %38, %37 ]
%9 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8, i8* %5
%11 = icmp eq i8 %10, 49
br i1 %11, label %12, label %37
12: ; preds = %7
%13 = shl nuw nsw i32 %8, 1
%14 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @same(i8* %5, i8* %6)
%16 = icmp eq i32 %15, 0
br i1 %16, label %37, label %17
17: ; preds = %12
%18 = mul nuw nsw i32 %8, 3
%19 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = call i32 @same(i8* %5, i8* %6)
%21 = icmp eq i32 %20, 0
br i1 %21, label %37, label %22
22: ; preds = %17
%23 = shl nuw nsw i32 %8, 2
%24 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %23)
%25 = call i32 @same(i8* %5, i8* %6)
%26 = icmp eq i32 %25, 0
br i1 %26, label %37, label %27
27: ; preds = %22
%28 = mul nuw nsw i32 %8, 5
%29 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = call i32 @same(i8* %5, i8* %6)
%31 = icmp eq i32 %30, 0
br i1 %31, label %37, label %32
32: ; preds = %27
%33 = mul nuw nsw i32 %8, 6
%34 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %33)
%35 = call i32 @same(i8* %5, i8* %6)
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %12, %17, %22, %27, %32, %7
%38 = add nuw nsw i32 %8, 1
br label %7
39: ; preds = %32
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}