int main() {
  int a = 2, b = 3;
  int d[2] = {4, 2};
  float m[2] = {2.6, 1.3};
  float k;
  printid(d);
  printid(m);
  print(m[1]);
  a /= b;
  print(m[1]);
  print("a 0");
  printid(a);
  print(m[1]);
  d[0] /= d[1];
  b = d[0];
  print("b 2");
  printid(b);
  m[0] /= d[1];
  k = m[0];
  print("k 1.300000");
  printid(k);
  m[0] /= m[1];
  k = m[0];
  print("k 1.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)
lea    -0x14(%rbp),%rdi
mov    $0x0,%al
call   1040 <printid@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x0,%al
call   1040 <printid@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <printid@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
mov    -0xc(%rbp),%edi
mov    $0x0,%al
call   1040 <printid@plt>
cvtsi2ssl -0x10(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printid@plt>
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1030 <print@plt>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x200000004,%rax
mov    %rax,0x18(%rsp)
movabs $0x3fa6666640266666,%rax
66 a6 3f
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
xor    %eax,%eax
call   1040 <printid@plt>
lea    0x8(%rsp),%rdi
xor    %eax,%eax
call   1040 <printid@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
lea    0xe7c(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1040 <printid@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1030 <print@plt>
mov    0x18(%rsp),%eax
cltd
idivl  0x1c(%rsp)
mov    %eax,%ebx
mov    %eax,0x18(%rsp)
lea    0xe49(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <printid@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x1c(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,0x14(%rsp)
movss  %xmm1,0x8(%rsp)
lea    0xe17(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printid@plt>
movss  0x8(%rsp),%xmm0
divss  0xc(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
movss  %xmm0,0x8(%rsp)
lea    0xdeb(%rip),%rdi
xor    %eax,%eax
call   1030 <print@plt>
movss  0x14(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
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 = [4 x i8] c"a 0\00"
@.str.1 = [4 x i8] c"b 2\00"
@.str.2 = [11 x i8] c"k 1.300000\00"
@.str.3 = [11 x i8] c"k 1.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 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @printid to i32 (i32*, ...)*)(i32* %9)
%11 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%12 = call i32 (float*, ...) bitcast (i32 (...)* @printid to i32 (float*, ...)*)(float* %11)
%13 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %15)
%17 = load i32, i32* %3
%18 = load i32, i32* %2
%19 = sdiv i32 %18, %17
store i32 %19, i32* %2
%20 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%21 = load float, float* %20
%22 = fpext float %21 to double
%23 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %22)
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%25 = load i32, i32* %2
%26 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 %25)
%27 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%28 = load float, float* %27
%29 = fpext float %28 to double
%30 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %29)
%31 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%32 = load i32, i32* %31
%33 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%34 = load i32, i32* %33
%35 = sdiv i32 %34, %32
store i32 %35, i32* %33
%36 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%37 = load i32, i32* %36
store i32 %37, i32* %3
%38 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* %3
%40 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 %39)
%41 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%42 = load i32, i32* %41
%43 = sitofp i32 %42 to float
%44 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%45 = load float, float* %44
%46 = fdiv float %45, %43
store float %46, float* %44
%47 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%48 = load float, float* %47
store float %48, float* %6
%49 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%50 = load float, float* %6
%51 = fpext float %50 to double
%52 = call i32 (double, ...) bitcast (i32 (...)* @printid to i32 (double, ...)*)(double %51)
%53 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 1
%54 = load float, float* %53
%55 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%56 = load float, float* %55
%57 = fdiv float %56, %54
store float %57, float* %55
%58 = getelementptr inbounds [2 x float], [2 x float]* %5, i64 0, i64 0
%59 = load float, float* %58
store float %59, float* %6
%60 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%61 = load float, float* %6
%62 = fpext float %61 to double
%63 = call i32 (double, ...) bitcast (i32 (...)* @printid to i32 (double, ...)*)(double %62)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"a 0\00"
@.str.1 = [4 x i8] c"b 2\00"
@.str.2 = [11 x i8] c"k 1.300000\00"
@.str.3 = [11 x i8] c"k 1.000000\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to [2 x i32]*
%3 = alloca i64
%4 = bitcast i64* %3 to [2 x float]*
%5 = bitcast i64* %1 to i8*
store i64 8589934596, i64* %1
%6 = bitcast i64* %3 to i8*
store i64 4586465859872384614, i64* %3
%7 = bitcast i64* %1 to i32*
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @printid to i32 (i32*, ...)*)(i32* %7)
%9 = bitcast i64* %3 to float*
%10 = call i32 (float*, ...) bitcast (i32 (...)* @printid to i32 (float*, ...)*)(float* %9)
%11 = getelementptr inbounds [2 x float], [2 x float]* %4, i64 0, i64 1
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %13)
%15 = load float, float* %11
%16 = fpext float %15 to double
%17 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %16)
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 0)
%20 = load float, float* %11
%21 = fpext float %20 to double
%22 = call i32 (double, ...) bitcast (i32 (...)* @print to i32 (double, ...)*)(double %21)
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%24 = load i32, i32* %23
%25 = load i32, i32* %7
%26 = sdiv i32 %25, %24
store i32 %26, i32* %7
%27 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (i32, ...) bitcast (i32 (...)* @printid to i32 (i32, ...)*)(i32 %26)
%29 = load i32, i32* %23
%30 = sitofp i32 %29 to float
%31 = load float, float* %9
%32 = fdiv float %31, %30
store float %32, float* %9
%33 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%34 = fpext float %32 to double
%35 = call i32 (double, ...) bitcast (i32 (...)* @printid to i32 (double, ...)*)(double %34)
%36 = load float, float* %11
%37 = load float, float* %9
%38 = fdiv float %37, %36
store float %38, float* %9
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @print to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%40 = fpext float %38 to double
%41 = call i32 (double, ...) bitcast (i32 (...)* @printid to i32 (double, ...)*)(double %40)
ret i32 0
}