#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 /*<<< orphan*/ system(char *);
int main() {
  int x, count;
  do {
    printf("Digite um número inteiro maior que 0 e menor que 10: ");
    scanf("%d", &x);
  } while ((x < 1) || (x > 10));
  for (count = x; count <= 500; count++) {
    if ((count % x) == 0) {
      printf("Número %d: Este número é multiplo!\n", count);
    } else {
      printf("Número %d: Este número não é multiplo!\n", count);
    }
  }
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xee3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     1176 <main+0x46>
cmpl   $0xa,-0x8(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    113f <main+0xf>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1f4,-0xc(%rbp)
jg     11de <main+0xae>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11ba <main+0x8a>
mov    -0xc(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11cb <main+0x9b>
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11d0 <main+0xa0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1187 <main+0x57>
lea    0xea8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%r14
lea    0xef1(%rip),%r15
lea    0x4(%rsp),%r12
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ebx
lea    -0xb(%rbx),%eax
cmp    $0xfffffff6,%eax
jb     1150 <main+0x20>
lea    0xec2(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x1f5,%ebx
jne    11a9 <main+0x79>
lea    0xef7(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xeb1(%rip),%r15
jmp    11d4 <main+0xa4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebx
cmp    $0x1f5,%ebx
je     118f <main+0x5f>
mov    %ebx,%eax
cltd
idivl  0x4(%rsp)
mov    %r14,%rdi
test   %edx,%edx
je     11c0 <main+0x90>
mov    %r15,%rdi
jmp    11c0 <main+0x90>

LLVM IR (-O0):
@.str = [55 x i8] c"Digite um n\C3\BAmero inteiro maior que 0 e menor que 10: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"N\C3\BAmero %d: Este n\C3\BAmero \C3\A9 multiplo!\0A\00"
@.str.3 = [44 x i8] c"N\C3\BAmero %d: Este n\C3\BAmero n\C3\A3o \C3\A9 multiplo!\0A\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %13, %0
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 10
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ true, %7 ], [ %12, %10 ]
br i1 %14, label %4, label %15
15: ; preds = %13
%16 = load i32, i32* %2
store i32 %16, i32* %3
br label %17
17: ; preds = %32, %15
%18 = load i32, i32* %3
%19 = icmp sle i32 %18, 500
br i1 %19, label %20, label %35
20: ; preds = %17
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = srem i32 %21, %22
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = load i32, i32* %3
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %26)
br label %31
28: ; preds = %20
%29 = load i32, i32* %3
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28, %25
br label %32
32: ; preds = %31
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 1
store i32 %34, i32* %3
br label %17
35: ; preds = %17
%36 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [55 x i8] c"Digite um n\C3\BAmero inteiro maior que 0 e menor que 10: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [39 x i8] c"N\C3\BAmero %d: Este n\C3\BAmero \C3\A9 multiplo!\0A\00"
@.str.3 = [44 x i8] c"N\C3\BAmero %d: Este n\C3\BAmero n\C3\A3o \C3\A9 multiplo!\0A\00"
@.str.4 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -11
%8 = icmp ult i32 %7, -10
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%11 = add i32 %6, 1
%12 = icmp eq i32 %11, 501
br i1 %12, label %22, label %13
13: ; preds = %9, %13
%14 = phi i32 [ %20, %13 ], [ %11, %9 ]
%15 = load i32, i32* %1
%16 = srem i32 %14, %15
%17 = icmp eq i32 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %18, i32 %14)
%20 = add i32 %14, 1
%21 = icmp eq i32 %20, 501
br i1 %21, label %22, label %13
22: ; preds = %13, %9
%23 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}