#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 *);
int main() {
  int m, n, j, multiplo;
  scanf("%d%d", &m, &n);
  multiplo = 0;
  j = 1;
  while (j <= n) {
    if (j % m == 0) {
      multiplo = j;
    }
    j = j + 1;
  }
  if (multiplo != 0) {
    printf("%d", multiplo);
  } else {
    printf("sem multiplos menores que %d", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1181 <main+0x61>
mov    -0x10(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1173 <main+0x53>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1151 <main+0x31>
cmpl   $0x0,-0x14(%rbp)
je     119f <main+0x7f>
mov    -0x14(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    11ae <main+0x8e>
mov    -0xc(%rbp),%esi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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    (%rsp),%esi
test   %esi,%esi
jle    1170 <main+0x50>
mov    0x4(%rsp),%r9d
cmp    $0x1,%esi
jne    1180 <main+0x60>
mov    $0x1,%r8d
xor    %ecx,%ecx
test   $0x1,%sil
je     1161 <main+0x41>
mov    %r8d,%eax
cltd
idiv   %r9d
test   %edx,%edx
cmove  %r8d,%ecx
test   %ecx,%ecx
je     1170 <main+0x50>
lea    0xeb3(%rip),%rdi
mov    %ecx,%esi
jmp    1177 <main+0x57>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %esi,%r10d
and    $0xfffffffe,%r10d
mov    $0x1,%r8d
xor    %ecx,%ecx
jmp    11bb <main+0x9b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x1(%r8),%edi
mov    %edi,%eax
cltd
idiv   %r9d
test   %edx,%edx
mov    %r11d,%ecx
cmove  %edi,%ecx
add    $0x2,%r8d
cmp    %r10d,%edi
je     114e <main+0x2e>
mov    %r8d,%eax
cltd
idiv   %r9d
mov    %r8d,%r11d
test   %edx,%edx
je     11a0 <main+0x80>
mov    %ecx,%r11d
jmp    11a0 <main+0x80>

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\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 ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
store i32 0, i32* %5
store i32 1, i32* %4
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = srem i32 %12, %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = load i32, i32* %4
store i32 %17, i32* %5
br label %18
18: ; preds = %16, %11
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 1
store i32 %20, i32* %4
br label %7
21: ; preds = %7
%22 = load i32, i32* %5
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %5
%26 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %30
27: ; preds = %21
%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
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\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 ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1
br i1 %7, label %42, label %8
8: ; preds = %0
%9 = load i32, i32* %1
%10 = and i32 %6, 1
%11 = icmp eq i32 %6, 1
br i1 %11, label %28, label %12
12: ; preds = %8
%13 = and i32 %6, -2
br label %14
14: ; preds = %14, %12
%15 = phi i32 [ 0, %12 ], [ %24, %14 ]
%16 = phi i32 [ 1, %12 ], [ %25, %14 ]
%17 = phi i32 [ 0, %12 ], [ %26, %14 ]
%18 = srem i32 %16, %9
%19 = icmp eq i32 %18, 0
%20 = select i1 %19, i32 %16, i32 %15
%21 = add nuw i32 %16, 1
%22 = srem i32 %21, %9
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i32 %21, i32 %20
%25 = add nuw i32 %16, 2
%26 = add i32 %17, 2
%27 = icmp eq i32 %26, %13
br i1 %27, label %28, label %14
28: ; preds = %14, %8
%29 = phi i32 [ undef, %8 ], [ %24, %14 ]
%30 = phi i32 [ 0, %8 ], [ %24, %14 ]
%31 = phi i32 [ 1, %8 ], [ %25, %14 ]
%32 = icmp eq i32 %10, 0
br i1 %32, label %37, label %33
33: ; preds = %28
%34 = srem i32 %31, %9
%35 = icmp eq i32 %34, 0
%36 = select i1 %35, i32 %31, i32 %30
br label %37
37: ; preds = %28, %33
%38 = phi i32 [ %29, %28 ], [ %36, %33 ]
%39 = icmp eq i32 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %38)
br label %44
42: ; preds = %0, %37
%43 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %6)
br label %44
44: ; preds = %42, %40
ret i32 0
}