#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 *, int *);
int main(void) {
  int number;
  int a, b, c;
  int k, l, m;
  int x, y, z, q;
  int p, r, s, t;
  int sth;
  printf("Enter the number that will be decrypt: ");
  scanf("%d", &number);
  a = number / 1000;
  k = number % 1000;
  b = k / 100;
  l = k % 100;
  c = l / 10;
  m = l % 10;
  x = c + 3;
  y = m + 3;
  z = a + 3;
  q = b + 3;
  p = x % 10;
  r = y % 10;
  s = z % 10;
  t = q % 10;
  printf("\n\n       Decrypted number:  %d %d %d %d\n", p, r, s, t);
  printf("\n\n        Created by: MCHD\n\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x34(%rbp)
mov    -0x28(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x40(%rbp)
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x3c(%rbp),%ecx
mov    -0x40(%rbp),%r8d
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rdx
mov    %rdx,%r8
shr    $0x3f,%r8
sar    $0x26,%rdx
lea    (%rdx,%r8,1),%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%ecx
movswl %cx,%eax
imul   $0x147b,%eax,%r9d
mov    %r9d,%edi
shr    $0x1f,%edi
sar    $0x13,%r9d
add    %edi,%r9d
imul   $0x64,%r9d,%edi
sub    %edi,%ecx
movsbl %cl,%edi
imul   $0x67,%edi,%edi
movzwl %di,%edi
movswl %di,%esi
shr    $0xf,%edi
shr    $0xa,%esi
add    %dil,%sil
movzbl %sil,%esi
lea    (%rsi,%rsi,1),%edi
lea    (%rdi,%rdi,4),%edi
sub    %dil,%cl
add    $0x3,%sil
add    $0x3,%cl
add    %edx,%r8d
add    $0x3,%r8d
movsbl %sil,%edx
imul   $0x67,%edx,%esi
movzwl %si,%edi
shr    $0xa,%esi
shr    $0xf,%edi
add    %sil,%dil
movzbl %dil,%esi
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
sub    %sil,%dl
movsbl %dl,%esi
movsbl %cl,%ecx
imul   $0x67,%ecx,%edx
movzwl %dx,%edi
shr    $0xa,%edx
shr    $0xf,%edi
add    %dl,%dil
movzbl %dil,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movsbl %cl,%edx
movslq %r8d,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
add    %edi,%edi
lea    (%rdi,%rdi,4),%eax
sub    %eax,%ecx
add    $0x3,%r9b
movsbl %r9b,%eax
imul   $0x67,%eax,%r8d
movzwl %r8w,%edi
shr    $0xa,%r8d
shr    $0xf,%edi
add    %r8b,%dil
movzbl %dil,%edi
add    %edi,%edi
lea    (%rdi,%rdi,4),%edi
sub    %dil,%al
movsbl %al,%r8d
lea    0xdda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdf5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Enter the number that will be decrypt: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"\0A\0A Decrypted number: %d %d %d %d\0A\00"
@.str.3 = [30 x i8] c"\0A\0A Created by: MCHD\0A\0A\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
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%20 = load i32, i32* %2
%21 = sdiv i32 %20, 1000
store i32 %21, i32* %3
%22 = load i32, i32* %2
%23 = srem i32 %22, 1000
store i32 %23, i32* %6
%24 = load i32, i32* %6
%25 = sdiv i32 %24, 100
store i32 %25, i32* %4
%26 = load i32, i32* %6
%27 = srem i32 %26, 100
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = sdiv i32 %28, 10
store i32 %29, i32* %5
%30 = load i32, i32* %7
%31 = srem i32 %30, 10
store i32 %31, i32* %8
%32 = load i32, i32* %5
%33 = add nsw i32 %32, 3
store i32 %33, i32* %9
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 3
store i32 %35, i32* %10
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 3
store i32 %37, i32* %11
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 3
store i32 %39, i32* %12
%40 = load i32, i32* %9
%41 = srem i32 %40, 10
store i32 %41, i32* %13
%42 = load i32, i32* %10
%43 = srem i32 %42, 10
store i32 %43, i32* %14
%44 = load i32, i32* %11
%45 = srem i32 %44, 10
store i32 %45, i32* %15
%46 = load i32, i32* %12
%47 = srem i32 %46, 10
store i32 %47, i32* %16
%48 = load i32, i32* %13
%49 = load i32, i32* %14
%50 = load i32, i32* %15
%51 = load i32, i32* %16
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %48, i32 %49, i32 %50, i32 %51)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Enter the number that will be decrypt: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [41 x i8] c"\0A\0A Decrypted number: %d %d %d %d\0A\00"
@str = [29 x i8] c"\0A\0A Created by: MCHD\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 1000
%7 = srem i32 %5, 1000
%8 = trunc i32 %7 to i16
%9 = sdiv i16 %8, 100
%10 = srem i16 %8, 100
%11 = trunc i16 %10 to i8
%12 = sdiv i8 %11, 10
%13 = srem i8 %11, 10
%14 = add nsw i8 %12, 3
%15 = add nsw i8 %13, 3
%16 = add nsw i32 %6, 3
%17 = srem i8 %14, 10
%18 = sext i8 %17 to i32
%19 = srem i8 %15, 10
%20 = sext i8 %19 to i32
%21 = srem i32 %16, 10
%22 = trunc i16 %9 to i8
%23 = add nsw i8 %22, 3
%24 = srem i8 %23, 10
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %20, i32 %21, i32 %25)
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}