#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 = -1;
  int d[2] = {4, 2};
  float m[2] = {1.5, 2.5};
  float k;
  a *= b;
  print("a  6");
  printid(a);
  c *= b;
  print("c  -3");
  printid(c);
  d[0] *= d[1];
  b = d[0];
  print("b  8");
  printid(b);
  m[0] *= d[1];
  k = m[0];
  print("k  3.000000");
  printid(k);
  m[0] *= m[1];
  k = m[0];
  print("k  7.500000");
  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)
movl   $0xffffffff,-0x10(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xea5(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xe8a(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xe6a(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0xc(%rbp),%xmm0
call   1040 <printid@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
lea    0xe40(%rip),%rdi
call   1030 <print@plt>
movss  -0x24(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x1c(%rbp),%xmm0
mulss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
lea    0xe1d(%rip),%rdi
call   1030 <print@plt>
movss  -0x24(%rbp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
call   1030 <print@plt>
movss  0xecb(%rip),%xmm0
call   1040 <printid@plt>
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
movss  0xeb6(%rip),%xmm0
call   1040 <printid@plt>
lea    0xec5(%rip),%rdi
call   1030 <print@plt>
movss  0xea1(%rip),%xmm0
call   1040 <printid@plt>
lea    0xeb1(%rip),%rdi
call   1030 <print@plt>
movss  0xe8c(%rip),%xmm0
call   1040 <printid@plt>
lea    0xea4(%rip),%rdi
call   1030 <print@plt>
movss  0xe77(%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 6\00"
@.str.1 = [6 x i8] c"c -3\00"
@.str.2 = [5 x i8] c"b 8\00"
@.str.3 = [12 x i8] c"k 3.000000\00"
@.str.4 = [12 x i8] c"k 7.500000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca [2 x float]
%7 = alloca float
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
store i32 -1, i32* %4
%8 = bitcast [2 x i32]* %5 to i8*
%9 = bitcast [2 x float]* %6 to i8*
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = mul nsw i32 %11, %10
store i32 %12, i32* %2
%13 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to float
%16 = call i32 @printid(float %15)
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = mul nsw i32 %18, %17
store i32 %19, i32* %4
%20 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %4
%22 = sitofp i32 %21 to float
%23 = call i32 @printid(float %22)
%24 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%25 = load i32, i32* %24
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%27 = load i32, i32* %26
%28 = mul nsw i32 %27, %25
store i32 %28, i32* %26
%29 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%30 = load i32, i32* %29
store i32 %30, i32* %3
%31 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%32 = load i32, i32* %3
%33 = sitofp i32 %32 to float
%34 = call i32 @printid(float %33)
%35 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%36 = load i32, i32* %35
%37 = sitofp i32 %36 to float
%38 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0, i64 0
%39 = load float, float* %38
%40 = fmul float %39, %37
store float %40, float* %38
%41 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0, i64 0
%42 = load float, float* %41
store float %42, float* %7
%43 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%44 = load float, float* %7
%45 = call i32 @printid(float %44)
%46 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0, i64 1
%47 = load float, float* %46
%48 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0, i64 0
%49 = load float, float* %48
%50 = fmul float %49, %47
store float %50, float* %48
%51 = getelementptr inbounds [2 x float], [2 x float]* %6, i64 0, i64 0
%52 = load float, float* %51
store float %52, float* %7
%53 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%54 = load float, float* %7
%55 = call i32 @printid(float %54)
ret i32 0
}

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