#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 /*<<< orphan*/ system(char *);
main() {
  int A, B;
  scanf("%d %d", &A, &B);
  system("clear");
  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    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
lea    0xeac(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
je     117f <main+0x4f>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1190 <main+0x60>
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
jmp    119c <main+0x6c>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1040 <system@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%esi
mov    %ecx,%eax
cltd
idiv   %esi
test   %edx,%edx
je     117c <main+0x4c>
mov    %esi,%eax
cltd
idiv   %ecx
test   %edx,%edx
lea    0xeaf(%rip),%rax
lea    0xe96(%rip),%rdi
cmove  %rax,%rdi
jmp    1183 <main+0x53>
lea    0xe9b(%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 = [6 x i8] c"clear\00"
@.str.2 = [15 x i8] c"Sao Multiplos\0A\00"
@.str.3 = [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 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = srem i32 %6, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %10, %0
%16 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %19
17: ; preds = %10
%18 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"clear\00"
@str = [18 x i8] c"Nao sao Multiplos\00"
@str.4 = [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 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %0
%12 = srem i32 %8, %7
%13 = icmp eq i32 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0)
br label %15
15: ; preds = %11, %0
%16 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.4, i64 0, i64 0), %0 ], [ %14, %11 ]
%17 = call i32 @puts(i8* dereferenceable(1) %16)
ret i32 0
}