#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;
  int d[2] = {4, 2};
  float m[2] = {1.5, 2.5};
  float k;
  a += b;
  print("a  5");
  printid(a);
  d[0] += d[1];
  b = d[0];
  print("b  6");
  printid(b);
  m[0] += d[1];
  k = m[0];
  print("k  3.500000");
  printid(k);
  m[0] += m[1];
  k = m[0];
  print("k  6.000000");
  printid(k);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee4(%rip),%rdi
call   1030 <print@plt>
movss  0xecb(%rip),%xmm0
call   1040 <printid@plt>
lea    0xed0(%rip),%rdi
call   1030 <print@plt>
movss  0xeb6(%rip),%xmm0
call   1040 <printid@plt>
lea    0xebc(%rip),%rdi
call   1030 <print@plt>
movss  0xea1(%rip),%xmm0
call   1040 <printid@plt>
lea    0xeaf(%rip),%rdi
call   1030 <print@plt>
movss  0xe84(%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 = [5 x i8] c"a 5\00"
@.str.1 = [5 x i8] c"b 6\00"
@.str.2 = [12 x i8] c"k 3.500000\00"
@.str.3 = [12 x i8] c"k 6.000000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x i32]
%5 = alloca [2 x float]
%6 = alloca float
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
%7 = bitcast [2 x i32]* %4 to i8*
%8 = bitcast [2 x float]* %5 to i8*
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
store i32 %11, i32* %2
%12 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to float
%15 = call i32 @printid(float %14)
%16 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%17 = load i32, i32* %16
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%19 = load i32, i32* %18
%20 = add nsw i32 %19, %17
store i32 %20, i32* %18
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%22 = load i32, i32* %21
store i32 %22, i32* %3
%23 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* %3
%25 = sitofp i32 %24 to float
%26 = call i32 @printid(float %25)
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%28 = load i32, i32* %27
%29 = sitofp i32 %28 to float
%30 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%31 = load float, float* %30
%32 = fadd float %31, %29
store float %32, float* %30
%33 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%34 = load float, float* %33
store float %34, float* %6
%35 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%36 = load float, float* %6
%37 = call i32 @printid(float %36)
%38 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%39 = load float, float* %38
%40 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%41 = load float, float* %40
%42 = fadd float %41, %39
store float %42, float* %40
%43 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%44 = load float, float* %43
store float %44, float* %6
%45 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%46 = load float, float* %6
%47 = call i32 @printid(float %46)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"a 5\00"
@.str.1 = [5 x i8] c"b 6\00"
@.str.2 = [12 x i8] c"k 3.500000\00"
@.str.3 = [12 x i8] c"k 6.000000\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(float 5.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 6.000000e+00)
%5 = tail call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printid(float 3.500000e+00)
%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 6.000000e+00)
ret i32 0
}