#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 *);
int main(void) {
  int a, b;
  scanf("%d %d", &a, &b);
  if (a % b == 0 || b % a == 0) {
    printf("Sao Multiplos\n");
  } else {
    printf("Nao sao Multiplos\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
je     1163 <main+0x43>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1174 <main+0x54>
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x60>
lea    0xe9a(%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
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%esi
mov    %ecx,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1160 <main+0x40>
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
lea    0xec5(%rip),%rax
lea    0xeac(%rip),%rdi
cmove  %rax,%rdi
jmp    1167 <main+0x47>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [15 x i8] c"Sao Multiplos\0A\00"
@.str.2 = [19 x i8] c"Nao sao Multiplos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %0
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = srem i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9, %0
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %18
16: ; preds = %9
%17 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@str = [18 x i8] c"Nao sao Multiplos\00"
@str.3 = [14 x i8] c"Sao Multiplos\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = srem i32 %6, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %0
%11 = srem i32 %7, %6
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0)
br label %14
14: ; preds = %10, %0
%15 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.3, i64 0, i64 0), %0 ], [ %13, %10 ]
%16 = call i32 @puts(i8* dereferenceable(1) %15)
ret i32 0
}