#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 *);
void main() {
  int num;
  printf("Digite um inteiro: ");
  scanf("%d", &num);
  if (num % 2 == 0 && num % 3 == 0)
    printf("\nMultiplo de 2 e 3.\n");
  else if (num % 2 == 0)
    printf("\nMultiplo de 2.\n");
  else if (num % 3 == 0)
    printf("\nMultiplo de 3.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117d <main+0x5d>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117d <main+0x5d>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    11cc <main+0xac>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a2 <main+0x82>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    11c7 <main+0xa7>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c2 <main+0xa2>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    11c7 <main+0xa7>
jmp    11cc <main+0xac>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%rax
mov    %eax,%ecx
and    $0x1,%ecx
imul   $0x55555556,%rax,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,2),%edx
sub    %edx,%eax
mov    %ecx,%edx
or     %eax,%edx
je     1193 <main+0x63>
lea    0xea9(%rip),%rdx
lea    0xe92(%rip),%rdi
test   %ecx,%ecx
cmove  %rdx,%rdi
je     119a <main+0x6a>
test   %eax,%eax
je     119a <main+0x6a>
pop    %rax
ret
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Digite um inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"\0AMultiplo de 2 e 3.\0A\00"
@.str.3 = [17 x i8] c"\0AMultiplo de 2.\0A\00"
@.str.4 = [17 x i8] c"\0AMultiplo de 3.\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 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, 2
%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, 3
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %27
13: ; preds = %7, %0
%14 = load i32, i32* %1
%15 = srem i32 %14, 2
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %26
19: ; preds = %13
%20 = load i32, i32* %1
%21 = srem i32 %20, 3
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %25
25: ; preds = %23, %19
br label %26
26: ; preds = %25, %17
br label %27
27: ; preds = %26, %11
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Digite um inteiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [16 x i8] c"\0AMultiplo de 3.\00"
@str.5 = [16 x i8] c"\0AMultiplo de 2.\00"
@str.6 = [20 x i8] c"\0AMultiplo de 2 e 3.\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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 = and i32 %5, 1
%7 = srem i32 %5, 3
%8 = or i32 %6, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = icmp eq i32 %7, 0
%12 = icmp eq i32 %6, 0
%13 = or i1 %12, %11
%14 = select i1 %12, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0)
br i1 %13, label %15, label %18
15: ; preds = %10, %0
%16 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.6, i64 0, i64 0), %0 ], [ %14, %10 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
br label %18
18: ; preds = %10, %15
ret void
}