#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num1, num2;
  scanf("%d", &num1);
  scanf("%d", &num2);
  if (num1 > num2) {
    int temp = num1;
    num1 = num2;
    num2 = temp;
  }
  int multiplo = (num2 / num1) * num1;
  if (multiplo <= num2)
    printf("%d\n", multiplo);
  else
    printf("sem multiplos menores que %d", num2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee8(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xed8(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    116d <main+0x4d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     119b <main+0x7b>
mov    -0x14(%rbp),%esi
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
mov    -0xc(%rbp),%esi
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xef2(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%eax
cmp    %eax,%ecx
jle    115e <main+0x3e>
mov    %eax,0xc(%rsp)
mov    %ecx,0x8(%rsp)
mov    %eax,%esi
jmp    1162 <main+0x42>
mov    %ecx,%esi
mov    %eax,%ecx
mov    %ecx,%eax
cltd
idiv   %esi
mov    %ecx,%esi
sub    %edx,%esi
cmp    %ecx,%esi
jle    117a <main+0x5a>
lea    0xe8e(%rip),%rdi
mov    %ecx,%esi
jmp    1181 <main+0x61>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [29 x i8] c"sem multiplos menores que %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = load i32, i32* %2
store i32 %12, i32* %4
%13 = load i32, i32* %3
store i32 %13, i32* %2
%14 = load i32, i32* %4
store i32 %14, i32* %3
br label %15
15: ; preds = %11, %0
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = sdiv i32 %16, %17
%19 = load i32, i32* %2
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = load i32, i32* %3
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %27
24: ; preds = %15
%25 = load i32, i32* %5
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %30
27: ; preds = %15
%28 = load i32, i32* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %27, %24
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [29 x i8] c"sem multiplos menores que %d\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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 %8, i32* %1
store i32 %7, i32* %2
br label %11
11: ; preds = %10, %0
%12 = phi i32 [ %8, %10 ], [ %7, %0 ]
%13 = phi i32 [ %7, %10 ], [ %8, %0 ]
%14 = srem i32 %13, %12
%15 = sub i32 %13, %14
%16 = icmp sgt i32 %15, %13
br i1 %16, label %19, label %17
17: ; preds = %11
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %15)
br label %21
19: ; preds = %11
%20 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %13)
br label %21
21: ; preds = %19, %17
ret i32 0
}