#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 /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  printf("Enter Two Numbers: ");
  scanf("%d %d", &x, &y);
  printf("A: %.2f \t B: %.2f \t C:%d \n", ((x + y) / (float)(x - y)),
         ((x + y) / (float)2), ((x + y) * (x - y)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm1
movss  0xe81(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
imul   %eax,%esi
lea    0xe81(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
lea    (%rax,%rsi,1),%ecx
cvtsi2ss %ecx,%xmm1
sub    %eax,%esi
cvtsi2ss %esi,%xmm0
movaps %xmm1,%xmm2
divss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mulss  0xe93(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
imul   %ecx,%esi
lea    0xea3(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter Two Numbers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [27 x i8] c"A: %.2f \09 B: %.2f \09 C:%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add nsw i32 %6, %7
%9 = sitofp i32 %8 to float
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
%13 = sitofp i32 %12 to float
%14 = fdiv float %9, %13
%15 = fpext float %14 to double
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = add nsw i32 %16, %17
%19 = sitofp i32 %18 to float
%20 = fdiv float %19, 2.000000e+00
%21 = fpext float %20 to double
%22 = load i32, i32* %2
%23 = load i32, i32* %3
%24 = add nsw i32 %22, %23
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = sub nsw i32 %25, %26
%28 = mul nsw i32 %24, %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %15, double %21, i32 %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter Two Numbers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [27 x i8] c"A: %.2f \09 B: %.2f \09 C:%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 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = sitofp i32 %9 to float
%11 = sub nsw i32 %7, %8
%12 = sitofp i32 %11 to float
%13 = fdiv float %10, %12
%14 = fpext float %13 to double
%15 = fmul float %10, 5.000000e-01
%16 = fpext float %15 to double
%17 = mul nsw i32 %9, %11
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double %14, double %16, i32 %17)
ret i32 0
}