#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*/ print(char *);
int /*<<< orphan*/ printid(float);
int main() {
  int a = 2, b = 3, c;
  float k;
  int d[2] = {4, 2};
  float m[2] = {1.5, 2.5};
  c = a - b;
  print("c  -1");
  printid(c);
  c = d[0] - d[1];
  print("c  2");
  printid(c);
  k = m[0] - d[1];
  print("k  -0.500000");
  printid(k);
  k = m[1] - m[0];
  print("k  1.000000");
  printid(k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xead(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0x1c(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xe94(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x24(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe70(%rip),%rdi
call   1030 <print@plt>
movss  -0x14(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x20(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xe58(%rip),%rdi
call   1030 <print@plt>
movss  -0x14(%rbp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print@plt>
movss  0xecb(%rip),%xmm0
call   1040 <printid@plt>
lea    0xed5(%rip),%rdi
call   1030 <print@plt>
movss  0xeb6(%rip),%xmm0
call   1040 <printid@plt>
lea    0xec1(%rip),%rdi
call   1030 <print@plt>
movss  0xea1(%rip),%xmm0
call   1040 <printid@plt>
lea    0xeb5(%rip),%rdi
call   1030 <print@plt>
movss  0xe8c(%rip),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.d = [2 x i32] [i32 4, i32 2]
@__const.main.m = [2 x float] [float 1.500000e+00, float 2.500000e+00]
@.str = [6 x i8] c"c -1\00"
@.str.1 = [5 x i8] c"c 2\00"
@.str.2 = [13 x i8] c"k -0.500000\00"
@.str.3 = [12 x i8] c"k 1.000000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca [2 x i32]
%7 = alloca [2 x float]
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%8 = bitcast [2 x i32]* %6 to i8*
%9 = bitcast [2 x float]* %7 to i8*
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %4
%13 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to float
%16 = call i32 @printid(float %15)
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%18 = load i32, i32* %17
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%20 = load i32, i32* %19
%21 = sub nsw i32 %18, %20
store i32 %21, i32* %4
%22 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* %4
%24 = sitofp i32 %23 to float
%25 = call i32 @printid(float %24)
%26 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 0
%27 = load float, float* %26
%28 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%29 = load i32, i32* %28
%30 = sitofp i32 %29 to float
%31 = fsub float %27, %30
store float %31, float* %5
%32 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%33 = load float, float* %5
%34 = call i32 @printid(float %33)
%35 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 1
%36 = load float, float* %35
%37 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 0
%38 = load float, float* %37
%39 = fsub float %36, %38
store float %39, float* %5
%40 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%41 = load float, float* %5
%42 = call i32 @printid(float %41)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"c -1\00"
@.str.1 = [5 x i8] c"c 2\00"
@.str.2 = [13 x i8] c"k -0.500000\00"
@.str.3 = [12 x i8] c"k 1.000000\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(float -1.000000e+00)
%3 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printid(float 2.000000e+00)
%5 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printid(float -5.000000e-01)
%7 = tail call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @printid(float 1.000000e+00)
ret i32 0
}