#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;
  int d[2] = {4, 2};
  float k;
  float m[2] = {2.6, 1.3};
  c = a / b;
  print("c  0");
  printid(c);
  c = d[0] / d[1];
  print("c  2");
  printid(c);
  k = m[0] / d[1];
  print("k  1.300000");
  printid(k);
  k = m[0] / m[1];
  print("k  2.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,-0x18(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
call   1040 <printid@plt>
mov    -0x18(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x10(%rbp)
lea    0xe91(%rip),%rdi
call   1030 <print@plt>
cvtsi2ssl -0x10(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x24(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xe6d(%rip),%rdi
call   1030 <print@plt>
movss  -0x1c(%rbp),%xmm0
call   1040 <printid@plt>
movss  -0x24(%rbp),%xmm0
divss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xe54(%rip),%rdi
call   1030 <print@plt>
movss  -0x1c(%rbp),%xmm0
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <print@plt>
xorps  %xmm0,%xmm0
call   1040 <printid@plt>
lea    0xed1(%rip),%rdi
call   1030 <print@plt>
movss  0xeb7(%rip),%xmm0
call   1040 <printid@plt>
lea    0xebd(%rip),%rdi
call   1030 <print@plt>
movss  0xea2(%rip),%xmm0
call   1040 <printid@plt>
lea    0xeb0(%rip),%rdi
call   1030 <print@plt>
movss  0xe85(%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 0x4004CCCCC0000000, float 0x3FF4CCCCC0000000]
@.str = [5 x i8] c"c 0\00"
@.str.1 = [5 x i8] c"c 2\00"
@.str.2 = [12 x i8] c"k 1.300000\00"
@.str.3 = [12 x i8] c"k 2.000000\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
%6 = alloca float
%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]* %5 to i8*
%9 = bitcast [2 x float]* %7 to i8*
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
store i32 %12, i32* %4
%13 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 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]* %5, i64 0, i64 0
%18 = load i32, i32* %17
%19 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%20 = load i32, i32* %19
%21 = sdiv 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]* %5, i64 0, i64 1
%29 = load i32, i32* %28
%30 = sitofp i32 %29 to float
%31 = fdiv float %27, %30
store float %31, float* %6
%32 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%33 = load float, float* %6
%34 = call i32 @printid(float %33)
%35 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 0
%36 = load float, float* %35
%37 = getelementptr inbounds [2 x float], [2 x float]* %7, i64 0, i64 1
%38 = load float, float* %37
%39 = fdiv float %36, %38
store float %39, float* %6
%40 = call i32 @print(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%41 = load float, float* %6
%42 = call i32 @printid(float %41)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"c 0\00"
@.str.1 = [5 x i8] c"c 2\00"
@.str.2 = [12 x i8] c"k 1.300000\00"
@.str.3 = [12 x i8] c"k 2.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 0.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 ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printid(float 0x3FF4CCCCC0000000)
%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 2.000000e+00)
ret i32 0
}