#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 *);
void main() {
  int numero1;
  int numero2;
  printf("Introdusza dos numeros enteros separados por espacio porfavor:\n "
         "verificaremos si el segundo es multiplo del primero\n");
  scanf("%d %d", &numero1, &numero2);
  if (!(numero1 % numero2))
    printf("%d es multiplo de %d\n", numero2, numero1);
  else
    printf("%d no es multiplo de %d\n", numero2, numero1);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf38(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1173 <main+0x53>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xf14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1187 <main+0x67>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xf11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%esi
mov    %ecx,%eax
cltd
idiv   %esi
test   %edx,%edx
lea    0xea0(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
mov    %ecx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [117 x i8] c"Introdusza dos numeros enteros separados por espacio porfavor:\0A verificaremos si el segundo es multiplo del primero\0A\00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [22 x i8] c"%d es multiplo de %d\0A\00"
@.str.3 = [25 x i8] c"%d no es multiplo de %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = srem i32 %5, %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %0
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
br label %17
13: ; preds = %0
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i32 %14, i32 %15)
br label %17
17: ; preds = %13, %9
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [22 x i8] c"%d es multiplo de %d\0A\00"
@.str.3 = [25 x i8] c"%d no es multiplo de %d\0A\00"
@str = [116 x i8] c"Introdusza dos numeros enteros separados por espacio porfavor:\0A verificaremos si el segundo es multiplo del primero\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %11, i32 %8, i32 %7)
ret void
}