#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, k;
  int d[2] = {4, 2};
  float l;
  float m[2] = {1.5, 2.5};
  k = a * b;
  print("k  6");
  printid(k);
  k = c * b;
  print("k  -3");
  printid(k);
  k = d[0] * d[1];
  print("k  8");
  printid(k);
  l = m[0] * d[1];
  print("l  3.000000");
  printid(l);
  l = m[0] * 5;
  print("l  7.500000");
  printid(l);
  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    0xeb9(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xea9(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xe8e(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0x1c(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    0xe74(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x14(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x28(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
lea    0xe50(%rip),%rdi
call   1030 <print@plt>
movss  -0x20(%rbp),%xmm0
call   1040 <printid@plt>
movss  0xe15(%rip),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
lea    0xe34(%rip),%rdi
call   1030 <print@plt>
movss  -0x20(%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"k 6\00"
@.str.1 = [6 x i8] c"k -3\00"
@.str.2 = [5 x i8] c"k 8\00"
@.str.3 = [12 x i8] c"l 3.000000\00"
@.str.4 = [12 x i8] c"l 7.500000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [2 x i32]
%7 = alloca float
%8 = alloca [2 x float]
store i32 0, i32* %1
store i32 2, i32* %2
store i32 3, i32* %3
store i32 -1, i32* %4
%9 = bitcast [2 x i32]* %6 to i8*
%10 = bitcast [2 x float]* %8 to i8*
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %5
%14 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* %5
%16 = sitofp i32 %15 to float
%17 = call i32 @printid(float %16)
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %5
%21 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to float
%24 = call i32 @printid(float %23)
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%26 = load i32, i32* %25
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%28 = load i32, i32* %27
%29 = mul nsw i32 %26, %28
store i32 %29, i32* %5
%30 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%31 = load i32, i32* %5
%32 = sitofp i32 %31 to float
%33 = call i32 @printid(float %32)
%34 = getelementptr inbounds [2 x float], [2 x float]* %8, i64 0, i64 0
%35 = load float, float* %34
%36 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%37 = load i32, i32* %36
%38 = sitofp i32 %37 to float
%39 = fmul float %35, %38
store float %39, float* %7
%40 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%41 = load float, float* %7
%42 = call i32 @printid(float %41)
%43 = getelementptr inbounds [2 x float], [2 x float]* %8, i64 0, i64 0
%44 = load float, float* %43
%45 = fmul float %44, 5.000000e+00
store float %45, float* %7
%46 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%47 = load float, float* %7
%48 = call i32 @printid(float %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"k 6\00"
@.str.1 = [6 x i8] c"k -3\00"
@.str.2 = [5 x i8] c"k 8\00"
@.str.3 = [12 x i8] c"l 3.000000\00"
@.str.4 = [12 x i8] c"l 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
}