#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 main() {
  int sum;
  int sub;
  int multi;
  int div;
  int mod;
  int valOne;
  int valTwo;
  valOne = 5;
  valTwo = 4;
  sum = valOne + valTwo;
  sub = valOne - valTwo;
  multi = valOne * valTwo;
  div = valOne / valTwo;
  mod = valOne % valTwo;
  printf("The sum is: %d \n", sum);
  printf("The subtracted value is: %d \n", sub);
  printf("The multiplied value is: %d \n", multi);
  printf("The divided value is: %d \n", div);
  printf("The modulo value is: %d \n", mod);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x1c(%rbp),%eax
imul   -0x20(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x20(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x20(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"The sum is: %d \0A\00"
@.str.1 = [30 x i8] c"The subtracted value is: %d \0A\00"
@.str.2 = [30 x i8] c"The multiplied value is: %d \0A\00"
@.str.3 = [27 x i8] c"The divided value is: %d \0A\00"
@.str.4 = [26 x i8] c"The modulo value is: %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %7
store i32 4, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %8
%11 = add nsw i32 %9, %10
store i32 %11, i32* %2
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %3
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = mul nsw i32 %15, %16
store i32 %17, i32* %4
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = sdiv i32 %18, %19
store i32 %20, i32* %5
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = srem i32 %21, %22
store i32 %23, i32* %6
%24 = load i32, i32* %2
%25 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %4
%29 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %28)
%30 = load i32, i32* %5
%31 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %6
%33 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"The sum is: %d \0A\00"
@.str.1 = [30 x i8] c"The subtracted value is: %d \0A\00"
@.str.2 = [30 x i8] c"The multiplied value is: %d \0A\00"
@.str.3 = [27 x i8] c"The divided value is: %d \0A\00"
@.str.4 = [26 x i8] c"The modulo value is: %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 20)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 1)
ret i32 0
}