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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x28(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%edi
mov    %ecx,%eax
cltd
idiv   %edi
mov    %eax,%r14d
mov    %edx,%r15d
lea    (%rdi,%rcx,1),%esi
mov    %edi,%r13d
imul   %ecx,%r13d
mov    %ecx,%r12d
mov    %ecx,%ebp
sub    %edi,%ebp
imul   %ecx,%r12d
mov    %edi,%ebx
imul   %edi,%ebx
imul   %edi,%ebx
lea    0xe9a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe9e(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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 = [11 x i8] c"y ^ 3 : %d\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
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %12, %13
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %5
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %6
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = sdiv i32 %21, %22
store i32 %23, i32* %7
%24 = load i32, i32* %2
%25 = load i32, i32* %2
%26 = mul nsw i32 %24, %25
store i32 %26, i32* %8
%27 = load i32, i32* %3
%28 = load i32, i32* %3
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %3
%31 = mul nsw i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %2
%33 = load i32, i32* %3
%34 = srem i32 %32, %33
store i32 %34, i32* %10
%35 = load i32, i32* %4
%36 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %5
%38 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %6
%40 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %7
%42 = load i32, i32* %10
%43 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %41, i32 %42)
%44 = load i32, i32* %8
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %9
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %46)
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 = [11 x i8] c"y ^ 3 : %d\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 = sub nsw i32 %6, %7
%10 = mul nsw i32 %7, %6
%11 = sdiv i32 %6, %7
%12 = mul nsw i32 %6, %6
%13 = mul nsw i32 %7, %7
%14 = mul nsw i32 %13, %7
%15 = srem i32 %6, %7
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %15)
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %14)
ret i32 0
}