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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
imul   %eax,%ecx
mov    -0x4(%rbp),%r8d
mov    -0x8(%rbp),%r9d
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
imul   %edi,%eax
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
imul   %edi,%eax
lea    0xe8e(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    %esi,%ecx
sub    %edx,%ecx
imul   %ecx,%ecx
lea    (%rdx,%rsi,1),%eax
mov    %eax,%edi
imul   %eax,%edi
imul   %eax,%edi
mov    %edi,(%rsp)
lea    0xea8(%rip),%rdi
mov    %esi,%r8d
mov    %edx,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [39 x i8] c"(%d - %d) ^ 2 = %d\0A(%d + %d) ^ 3 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %6, %7
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = mul nsw i32 %8, %11
%13 = load i32, i32* %1
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = add nsw i32 %18, %19
%21 = mul nsw i32 %17, %20
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = add nsw i32 %22, %23
%25 = mul nsw i32 %21, %24
%26 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5, i32 %12, i32 %13, i32 %14, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [39 x i8] c"(%d - %d) ^ 2 = %d\0A(%d + %d) ^ 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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %6, %7
%9 = mul nsw i32 %8, %8
%10 = add nsw i32 %7, %6
%11 = mul nsw i32 %10, %10
%12 = mul nsw i32 %11, %10
%13 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7, i32 %9, i32 %6, i32 %7, i32 %12)
ret i32 0
}