#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 the number to check whether is divisible by 5 or not: ");
  scanf("%d", &n);
  if ((n % 5 == 0) && (n % 11 != 0))
    printf("\nThe number is exactly divisible by 5 but not by 11");
  else
    printf("\nThe number is not exactly divisible by 5");
  return 0;
}


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    0xefb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1184 <main+0x64>
mov    -0x8(%rbp),%eax
mov    $0xb,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1184 <main+0x64>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x70>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
imul   $0xcccccccd,%eax,%ecx
add    $0x19999999,%ecx
imul   $0xba2e8ba3,%eax,%eax
add    $0xba2e8ba,%eax
cmp    $0x1745d175,%eax
lea    0xf0f(%rip),%rax
lea    0xed4(%rip),%rdi
cmovb  %rax,%rdi
cmp    $0x33333333,%ecx
cmovae %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Enter the number to check whether is divisible by 5 or not: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [52 x i8] c"\0AThe number is exactly divisible by 5 but not by 11\00"
@.str.3 = [42 x i8] c"\0AThe number is not exactly divisible by 5\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 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* %2)
%5 = load i32, i32* %2
%6 = srem i32 %5, 5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = load i32, i32* %2
%10 = srem i32 %9, 11
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
br label %16
14: ; preds = %8, %0
%15 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [61 x i8] c"Enter the number to check whether is divisible by 5 or not: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [52 x i8] c"\0AThe number is exactly divisible by 5 but not by 11\00"
@.str.3 = [42 x i8] c"\0AThe number is not exactly divisible by 5\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 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, 5
%7 = icmp ne i32 %6, 0
%8 = srem i32 %5, 11
%9 = icmp eq i32 %8, 0
%10 = or i1 %7, %9
%11 = select i1 %10, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0)
%12 = call i32 @printf(i8* dereferenceable(1) %11)
ret i32 0
}