#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 *, char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int integerA = 0;
  int integerB = 0;
  puts("Input two integers");
  printf("%s", "Give the First integer: ");
  scanf("%d", &integerA);
  printf("%s", "Give the Second integer: ");
  scanf("%d", &integerB);
  if ((integerB % integerA) == 0)
    puts("The first integer is a multiple of the second");
  if ((integerB % integerA) != 0)
    puts("The first integer is not a multiple of the second");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rdi
lea    0xeaf(%rip),%rsi
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe90(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11bb <main+0x8b>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
je     11d7 <main+0xa7>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%r14
lea    0xeb9(%rip),%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb2(%rip),%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    (%rsp),%eax
cltd
idivl  0x4(%rsp)
test   %edx,%edx
je     11b9 <main+0x89>
test   %edx,%edx
je     11af <main+0x7f>
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%eax
cltd
idivl  0x4(%rsp)
test   %edx,%edx
jne    11a3 <main+0x73>
jmp    11af <main+0x7f>

LLVM IR (-O0):
@.str = [19 x i8] c"Input two integers\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [25 x i8] c"Give the First integer: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [26 x i8] c"Give the Second integer: \00"
@.str.5 = [46 x i8] c"The first integer is a multiple of the second\00"
@.str.6 = [50 x i8] c"The first integer is not a multiple of the second\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = srem i32 %9, %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
br label %15
15: ; preds = %13, %0
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = srem i32 %16, %17
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
br label %22
22: ; preds = %20, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Input two integers\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [25 x i8] c"Give the First integer: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [26 x i8] c"Give the Second integer: \00"
@.str.5 = [46 x i8] c"The first integer is a multiple of the second\00"
@.str.6 = [50 x i8] c"The first integer is not a multiple of the second\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = srem i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %0
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.5, i64 0, i64 0))
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = srem i32 %16, %17
br label %19
19: ; preds = %14, %0
%20 = phi i32 [ %18, %14 ], [ %12, %0 ]
%21 = icmp eq i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
ret i32 0
}