#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*/ div();
int /*<<< orphan*/ nodiv();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int a;
  printf("Enter a number");
  scanf("%d", &a);
  if (a % 5 == 0 && a % 7 == 0) {
    div();
  } else {
    nodiv();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1198 <main+0x58>
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1198 <main+0x58>
mov    $0x0,%al
call   1040 <div@plt>
jmp    119f <main+0x5f>
mov    $0x0,%al
call   1060 <nodiv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    %ecx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
imul   $0xffffffff92492493,%rax,%rdx
shr    $0x20,%rdx
add    %eax,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x2,%edx
add    %esi,%edx
lea    0x0(,%rdx,8),%esi
sub    %esi,%edx
add    %eax,%edx
sub    %ecx,%eax
or     %eax,%edx
je     11ad <main+0x6d>
xor    %eax,%eax
call   1060 <nodiv@plt>
pop    %rax
ret
xor    %eax,%eax
call   1040 <div@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a number\00"
@.str.1 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 5
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %1
%9 = srem i32 %8, 7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @div()
br label %15
13: ; preds = %7, %0
%14 = call i32 (...) @nodiv()
br label %15
15: ; preds = %13, %11
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a number\00"
@.str.1 = [3 x i8] c"%d\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(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, 5
%7 = srem i32 %5, 7
%8 = or i32 %6, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @div()
br label %14
12: ; preds = %0
%13 = call i32 (...) @nodiv()
br label %14
14: ; preds = %12, %10
ret void
}