#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 /*<<< orphan*/ scanf(char *, unsigned long *);
int main() {
  unsigned long int n;
  int s = 0;
  scanf("%lu", &n);
  printf("%lu", n);
  while (n != 0) {
    int x = n % 10;
    n /= 10;
    const int k = x;
    x = n % 10;
    n /= 10;
    if (x == k)
      s++;
  }
  if (s == 6)
    printf("Sorry ,Sorry\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     11cd <main+0xad>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jne    11c8 <main+0xa8>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1158 <main+0x38>
cmpl   $0x6,-0x14(%rbp)
jne    11e5 <main+0xc5>
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    (%rsp),%rsi
xor    %ebp,%ebp
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%rdx
test   %rdx,%rdx
je     11dd <main+0xad>
movabs $0xcccccccccccccccd,%rdi
cc cc cc
movabs $0x28f5c28f5c28f5c3,%r8
c2 f5 28
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rdx,%rcx
mov    %rdx,%rax
mul    %rdi
mov    %rdx,%rsi
shr    $0x3,%rsi
lea    (%rsi,%rsi,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%ebx
sub    %eax,%ebx
mov    %rsi,%rax
mul    %rdi
shr    $0x3,%rdx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%esi
mov    %rcx,%rax
shr    $0x2,%rax
mul    %r8
shr    $0x2,%rdx
xor    %eax,%eax
cmp    %ebx,%esi
sete   %al
add    %eax,%ebp
cmp    $0x63,%rcx
ja     1180 <main+0x50>
mov    %rdx,(%rsp)
cmp    $0x6,%ebp
jne    11dd <main+0xad>
lea    0xe2c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
@.str.1 = [14 x i8] c"Sorry ,Sorry\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%7 = load i64, i64* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
br label %9
9: ; preds = %30, %0
%10 = load i64, i64* %2
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %31
12: ; preds = %9
%13 = load i64, i64* %2
%14 = urem i64 %13, 10
%15 = trunc i64 %14 to i32
store i32 %15, i32* %4
%16 = load i64, i64* %2
%17 = udiv i64 %16, 10
store i64 %17, i64* %2
%18 = load i32, i32* %4
store i32 %18, i32* %5
%19 = load i64, i64* %2
%20 = urem i64 %19, 10
%21 = trunc i64 %20 to i32
store i32 %21, i32* %4
%22 = load i64, i64* %2
%23 = udiv i64 %22, 10
store i64 %23, i64* %2
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = icmp eq i32 %24, %25
br i1 %26, label %27, label %30
27: ; preds = %12
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %30
30: ; preds = %27, %12
br label %9
31: ; preds = %9
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 6
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
%37 = load i32, i32* %1
ret i32 %37
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
@str = [13 x i8] c"Sorry ,Sorry\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %4)
%6 = load i64, i64* %1
%7 = icmp eq i64 %6, 0
br i1 %7, label %25, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %19, %8 ], [ 0, %0 ]
%10 = phi i64 [ %16, %8 ], [ %6, %0 ]
%11 = urem i64 %10, 10
%12 = trunc i64 %11 to i32
%13 = udiv i64 %10, 10
%14 = urem i64 %13, 10
%15 = trunc i64 %14 to i32
%16 = udiv i64 %10, 100
%17 = icmp eq i32 %15, %12
%18 = zext i1 %17 to i32
%19 = add nuw nsw i32 %9, %18
%20 = icmp ult i64 %10, 100
br i1 %20, label %21, label %8
21: ; preds = %8
store i64 %16, i64* %1
%22 = icmp eq i32 %19, 6
br i1 %22, label %23, label %25
23: ; preds = %21
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %25
25: ; preds = %0, %23, %21
ret i32 0
}