#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 *, double);
int main() {
  double xs[2] = {1.2, 1e-12};
  double ys[2] = {0.5, 1e12};
  double x, y, z;
  for (int i = 0; i < 2; ++i) {
    x = xs[i];
    y = ys[i];
    z = (x + y) - y;
    printf("%f\n", z);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x2,-0x4c(%rbp)
jge    11ad <main+0x9d>
movslq -0x4c(%rbp),%rax
movsd  -0x20(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movslq -0x4c(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1152 <main+0x42>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef0(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.xs = [2 x double] [double 1.200000e+00, double 0x3D719799812DEA11]
@__const.main.ys = [2 x double] [double 5.000000e-01, double 1.000000e+12]
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x double]
%3 = alloca [2 x double]
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [2 x double]* %2 to i8*
%9 = bitcast [2 x double]* %3 to i8*
store i32 0, i32* %7
br label %10
10: ; preds = %29, %0
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %32
13: ; preds = %10
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [2 x double], [2 x double]* %2, i64 0, i64 %15
%17 = load double, double* %16
store double %17, double* %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 %19
%21 = load double, double* %20
store double %21, double* %5
%22 = load double, double* %4
%23 = load double, double* %5
%24 = fadd double %22, %23
%25 = load double, double* %5
%26 = fsub double %24, %25
store double %26, double* %6
%27 = load double, double* %6
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %27)
br label %29
29: ; preds = %13
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %10
32: ; preds = %10
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.200000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 0.000000e+00)
ret i32 0
}