#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 *, float, float, float);
int /*<<< orphan*/ propagate(float *, float *);
int main() {
  float input[2];
  float output;
  input[0] = 0;
  input[1] = 0;
  propagate(input, &output);
  printf("%f ^ %f = %f\n", input[0], input[1], output);
  input[0] = 0;
  input[1] = 1;
  propagate(input, &output);
  printf("%f ^ %f = %f\n", input[0], input[1], output);
  input[0] = 1;
  input[1] = 0;
  propagate(input, &output);
  printf("%f ^ %f = %f\n", input[0], input[1], output);
  input[0] = 1;
  input[1] = 1;
  propagate(input, &output);
  printf("%f ^ %f = %f\n", input[0], input[1], output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <propagate@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe89(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <propagate@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
movss  0xe54(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <propagate@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
movss  0xe17(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe0a(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <propagate@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
lea    0xde6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x4(%rsp)
lea    0x4(%rsp),%r15
lea    0xc(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <propagate@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
movabs $0x3f80000000000000,%rax
mov    %rax,0x4(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <propagate@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
movq   $0x3f800000,0x4(%rsp)
80 3f
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <propagate@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
movabs $0x3f8000003f800000,%rax
mov    %rax,0x4(%rsp)
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <propagate@plt>
movss  0x4(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%f ^ %f = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x float]
%3 = alloca float
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float 0.000000e+00, float* %4
%5 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 0.000000e+00, float* %5
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%7 = call i32 @propagate(float* %6, float* %3)
%8 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%9 = load float, float* %8
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%11 = load float, float* %10
%12 = load float, float* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %9, float %11, float %12)
%14 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float 0.000000e+00, float* %14
%15 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 1.000000e+00, float* %15
%16 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%17 = call i32 @propagate(float* %16, float* %3)
%18 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%19 = load float, float* %18
%20 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%21 = load float, float* %20
%22 = load float, float* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %19, float %21, float %22)
%24 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float 1.000000e+00, float* %24
%25 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 0.000000e+00, float* %25
%26 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%27 = call i32 @propagate(float* %26, float* %3)
%28 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%29 = load float, float* %28
%30 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%31 = load float, float* %30
%32 = load float, float* %3
%33 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %29, float %31, float %32)
%34 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float 1.000000e+00, float* %34
%35 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 1.000000e+00, float* %35
%36 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%37 = call i32 @propagate(float* %36, float* %3)
%38 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%39 = load float, float* %38
%40 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%41 = load float, float* %40
%42 = load float, float* %3
%43 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %39, float %41, float %42)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%f ^ %f = %f\0A\00"
define i32 @main() {
%1 = alloca [2 x float]
%2 = alloca float
%3 = bitcast [2 x float]* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 0, i64 0
store float 0.000000e+00, float* %5
%6 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 0, i64 1
store float 0.000000e+00, float* %6
%7 = call i32 @propagate(float* %5, float* %2)
%8 = load float, float* %5
%9 = load float, float* %6
%10 = load float, float* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %8, float %9, float %10)
store float 0.000000e+00, float* %5
store float 1.000000e+00, float* %6
%12 = call i32 @propagate(float* %5, float* %2)
%13 = load float, float* %5
%14 = load float, float* %6
%15 = load float, float* %2
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %13, float %14, float %15)
store float 1.000000e+00, float* %5
store float 0.000000e+00, float* %6
%17 = call i32 @propagate(float* %5, float* %2)
%18 = load float, float* %5
%19 = load float, float* %6
%20 = load float, float* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %18, float %19, float %20)
store float 1.000000e+00, float* %5
store float 1.000000e+00, float* %6
%22 = call i32 @propagate(float* %5, float* %2)
%23 = load float, float* %5
%24 = load float, float* %6
%25 = load float, float* %2
%26 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %23, float %24, float %25)
ret i32 0
}