#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 n;
  printf("Enter number: \n");
  scanf("%d", &n);
  int res = 1;
  if (n % 3 == 0 && n % 5 == 0 && n % 8 == 0) {
    res = 0;
  }
  switch (res) {
  case 1:
    printf("INCORECT NUMBER!!!");
    break;
  case 0:
    printf("SUCCESS!!!");
    break;
  }
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1195 <main+0x75>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1195 <main+0x75>
mov    -0x8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1195 <main+0x75>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     11ca <main+0xaa>
jmp    11a8 <main+0x88>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
jne    11d6 <main+0xb6>
jmp    11b9 <main+0x99>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    11d6 <main+0xb6>
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0xc(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %eax,%edx
sub    %ecx,%edx
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x21,%rcx
add    %esi,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %eax,%esi
sub    %ecx,%esi
or     %edx,%esi
and    $0x7,%eax
xor    %ebx,%ebx
or     %esi,%eax
setne  %bl
lea    0xe76(%rip),%rax
lea    0xe5c(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Enter number: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"INCORECT NUMBER!!!\00"
@.str.3 = [11 x i8] c"SUCCESS!!!\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
store i32 1, i32* %3
%6 = load i32, i32* %2
%7 = srem i32 %6, 3
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %0
%10 = load i32, i32* %2
%11 = srem i32 %10, 5
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32, i32* %2
%15 = srem i32 %14, 8
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 0, i32* %3
br label %18
18: ; preds = %17, %13, %9, %0
%19 = load i32, i32* %3
switch i32 %19, label %24 [
i32 1, label %20
i32 0, label %22
]
20: ; preds = %18
%21 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %24
22: ; preds = %18
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %18, %22, %20
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"INCORECT NUMBER!!!\00"
@.str.3 = [11 x i8] c"SUCCESS!!!\00"
@str = [15 x i8] c"Enter number: \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 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 = srem i32 %5, 3
%7 = srem i32 %5, 5
%8 = or i32 %6, %7
%9 = icmp eq i32 %8, 0
%10 = and i32 %5, 7
%11 = icmp eq i32 %10, 0
%12 = select i1 %9, i1 %11, i1 false
%13 = select i1 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0)
%14 = call i32 @printf(i8* dereferenceable(1) %13)
%15 = xor i1 %12, true
%16 = zext i1 %15 to i32
ret i32 %16
}