#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 pow(int, int);
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y, a, b;
  scanf("x = %d, y = %d", &x, &y);
  printf("x + y : %d\n", x + y);
  printf("x - y : %d\n", x - y);
  printf("x * y : %d\n", x * y);
  printf("x / y quotient: %d, remainder: %d\n", x / y, x % y);
  a = pow(x, 2);
  b = pow(y, 3);
  printf("x ^ 2 : %d\n", a);
  printf("y ^ 3 : %d\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
sub    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    0x4(%rsp),%esi
lea    0xeba(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
sub    (%rsp),%esi
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%esi
imul   0x4(%rsp),%esi
lea    0xea7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xe9d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,%ebx
mov    (%rsp),%edi
mov    $0x3,%esi
call   1050 <pow@plt>
mov    %eax,%ebp
lea    0xe91(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8d(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"x = %d, y = %d\00"
@.str.1 = [12 x i8] c"x + y : %d\0A\00"
@.str.2 = [12 x i8] c"x - y : %d\0A\00"
@.str.3 = [12 x i8] c"x * y : %d\0A\00"
@.str.4 = [35 x i8] c"x / y quotient: %d, remainder: %d\0A\00"
@.str.5 = [12 x i8] c"x ^ 2 : %d\0A\00"
@.str.6 = [12 x i8] c"y ^ 3 : %d\0A\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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = mul nsw i32 %15, %16
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = sdiv i32 %19, %20
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = srem i32 %22, %23
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %21, i32 %24)
%26 = load i32, i32* %2
%27 = call i32 @pow(i32 %26, i32 2)
store i32 %27, i32* %4
%28 = load i32, i32* %3
%29 = call i32 @pow(i32 %28, i32 3)
store i32 %29, i32* %5
%30 = load i32, i32* %4
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %5
%33 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"x = %d, y = %d\00"
@.str.1 = [12 x i8] c"x + y : %d\0A\00"
@.str.2 = [12 x i8] c"x - y : %d\0A\00"
@.str.3 = [12 x i8] c"x * y : %d\0A\00"
@.str.4 = [35 x i8] c"x / y quotient: %d, remainder: %d\0A\00"
@.str.5 = [12 x i8] c"x ^ 2 : %d\0A\00"
@.str.6 = [12 x i8] c"y ^ 3 : %d\0A\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 ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, %6
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = sub nsw i32 %10, %11
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %1
%15 = load i32, i32* %2
%16 = mul nsw i32 %15, %14
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = sdiv i32 %18, %19
%21 = srem i32 %18, %19
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %20, i32 %21)
%23 = load i32, i32* %1
%24 = call i32 @pow(i32 %23, i32 2)
%25 = load i32, i32* %2
%26 = call i32 @pow(i32 %25, i32 3)
%27 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %24)
%28 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %26)
ret i32 0
}