void tml_dr_vIntToFloat(const void *src, double *dst, int len, int wordSize) {
  int i;
  int Sbytes = (int)(wordSize / 8);
  if (Sbytes == sizeof(char))
    for (i = 0; i < len; i++)
      dst[i] = (double)(((char *)src)[i]);
  else {
    if (Sbytes == sizeof(short))
      for (i = 0; i < len; i++)
        dst[i] = (double)(((short *)src)[i]);
    else {
      if (Sbytes == sizeof(int))
        for (i = 0; i < len; i++)
          dst[i] = (double)(((int *)src)[i]);
      else {
        if (Sbytes == sizeof(long))
          for (i = 0; i < len; i++)
            dst[i] = (double)(((long *)src)[i]);
        else {
          if (Sbytes == sizeof(long long))
            for (i = 0; i < len; i++)
              dst[i] = (double)(((long long *)src)[i]);
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<tml_dr_vIntToFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
movslq -0x20(%rbp),%rax
cmp    $0x1,%rax
jne    1171 <tml_dr_vIntToFloat+0x71>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    116c <tml_dr_vIntToFloat+0x6c>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1135 <tml_dr_vIntToFloat+0x35>
jmp    12c2 <tml_dr_vIntToFloat+0x1c2>
movslq -0x20(%rbp),%rax
cmp    $0x2,%rax
jne    11c2 <tml_dr_vIntToFloat+0xc2>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11bd <tml_dr_vIntToFloat+0xbd>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cvtsi2sd %eax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1186 <tml_dr_vIntToFloat+0x86>
jmp    12bd <tml_dr_vIntToFloat+0x1bd>
movslq -0x20(%rbp),%rax
cmp    $0x4,%rax
jne    1210 <tml_dr_vIntToFloat+0x110>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    120b <tml_dr_vIntToFloat+0x10b>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d7 <tml_dr_vIntToFloat+0xd7>
jmp    12b8 <tml_dr_vIntToFloat+0x1b8>
movslq -0x20(%rbp),%rax
cmp    $0x8,%rax
jne    125f <tml_dr_vIntToFloat+0x15f>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    125a <tml_dr_vIntToFloat+0x15a>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cvtsi2sdq (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1225 <tml_dr_vIntToFloat+0x125>
jmp    12b3 <tml_dr_vIntToFloat+0x1b3>
movslq -0x20(%rbp),%rax
cmp    $0x8,%rax
jne    12ae <tml_dr_vIntToFloat+0x1ae>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12a9 <tml_dr_vIntToFloat+0x1a9>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cvtsi2sdq (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1274 <tml_dr_vIntToFloat+0x174>
jmp    12ae <tml_dr_vIntToFloat+0x1ae>
jmp    12b3 <tml_dr_vIntToFloat+0x1b3>
jmp    12b8 <tml_dr_vIntToFloat+0x1b8>
jmp    12bd <tml_dr_vIntToFloat+0x1bd>
jmp    12c2 <tml_dr_vIntToFloat+0x1c2>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tml_dr_vIntToFloat>:
add    $0xfffffff8,%ecx
shr    $0x3,%ecx
cmp    $0x7,%ecx
ja     1557 <tml_dr_vIntToFloat+0x457>
lea    0xeea(%rip),%rax
movslq (%rax,%rcx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
test   %edx,%edx
jle    1557 <tml_dr_vIntToFloat+0x457>
mov    %edx,%r9d
cmp    $0x4,%edx
jb     1149 <tml_dr_vIntToFloat+0x49>
lea    (%rdi,%r9,1),%rax
cmp    %rsi,%rax
jbe    1558 <tml_dr_vIntToFloat+0x458>
lea    (%rsi,%r9,8),%rax
cmp    %rdi,%rax
jbe    1558 <tml_dr_vIntToFloat+0x458>
xor    %ecx,%ecx
mov    %rcx,%r8
not    %r8
add    %r9,%r8
mov    %r9,%rdx
and    $0x3,%rdx
je     117a <tml_dr_vIntToFloat+0x7a>
nopl   (%rax)
movsbl (%rdi,%rcx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdx
jne    1160 <tml_dr_vIntToFloat+0x60>
cmp    $0x3,%r8
jb     1557 <tml_dr_vIntToFloat+0x457>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rdi,%rcx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
movsbl 0x1(%rdi,%rcx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsi,%rcx,8)
movsbl 0x2(%rdi,%rcx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsi,%rcx,8)
movsbl 0x3(%rdi,%rcx,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsi,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1190 <tml_dr_vIntToFloat+0x90>
jmp    1557 <tml_dr_vIntToFloat+0x457>
test   %edx,%edx
jle    1557 <tml_dr_vIntToFloat+0x457>
mov    %edx,%r9d
cmp    $0x4,%edx
jae    1231 <tml_dr_vIntToFloat+0x131>
xor    %ecx,%ecx
jmp    1310 <tml_dr_vIntToFloat+0x210>
test   %edx,%edx
jle    1557 <tml_dr_vIntToFloat+0x457>
mov    %edx,%r9d
cmp    $0x4,%edx
jae    132e <tml_dr_vIntToFloat+0x22e>
xor    %ecx,%ecx
jmp    13c0 <tml_dr_vIntToFloat+0x2c0>
test   %edx,%edx
jle    1557 <tml_dr_vIntToFloat+0x457>
mov    %edx,%r9d
cmp    $0x4,%edx
jae    13db <tml_dr_vIntToFloat+0x2db>
xor    %ecx,%ecx
jmp    1540 <tml_dr_vIntToFloat+0x440>
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     1621 <tml_dr_vIntToFloat+0x521>
mov    %r8,%rax
and    $0xfffffffffffffffe,%rax
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movd   (%rdi,%rdx,2),%xmm0
movd   0x4(%rdi,%rdx,2),%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
movups %xmm0,(%rsi,%rdx,8)
movups %xmm1,0x10(%rsi,%rdx,8)
movd   0x8(%rdi,%rdx,2),%xmm0
movd   0xc(%rdi,%rdx,2),%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
movupd %xmm0,0x20(%rsi,%rdx,8)
movupd %xmm1,0x30(%rsi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rax
jne    1260 <tml_dr_vIntToFloat+0x160>
test   $0x1,%r8b
je     1306 <tml_dr_vIntToFloat+0x206>
movd   (%rdi,%rdx,2),%xmm0
movd   0x4(%rdi,%rdx,2),%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x10,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x10,%xmm1
cvtdq2pd %xmm1,%xmm1
movupd %xmm0,(%rsi,%rdx,8)
movupd %xmm1,0x10(%rsi,%rdx,8)
cmp    %r9,%rcx
je     1557 <tml_dr_vIntToFloat+0x457>
nop
movswl (%rdi,%rcx,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r9
jne    1310 <tml_dr_vIntToFloat+0x210>
jmp    1557 <tml_dr_vIntToFloat+0x457>
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     1610 <tml_dr_vIntToFloat+0x510>
mov    %r8,%rax
and    $0xfffffffffffffffe,%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cvtdq2pd (%rdi,%rdx,4),%xmm0
cvtdq2pd 0x8(%rdi,%rdx,4),%xmm1
movups %xmm0,(%rsi,%rdx,8)
movups %xmm1,0x10(%rsi,%rdx,8)
cvtdq2pd 0x10(%rdi,%rdx,4),%xmm0
cvtdq2pd 0x18(%rdi,%rdx,4),%xmm1
movupd %xmm0,0x20(%rsi,%rdx,8)
movupd %xmm1,0x30(%rsi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rax
jne    1360 <tml_dr_vIntToFloat+0x260>
test   $0x1,%r8b
je     13b2 <tml_dr_vIntToFloat+0x2b2>
cvtdq2pd (%rdi,%rdx,4),%xmm0
cvtdq2pd 0x8(%rdi,%rdx,4),%xmm1
movupd %xmm0,(%rsi,%rdx,8)
movupd %xmm1,0x10(%rsi,%rdx,8)
cmp    %r9,%rcx
je     1557 <tml_dr_vIntToFloat+0x457>
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sdl (%rdi,%rcx,4),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r9
jne    13c0 <tml_dr_vIntToFloat+0x2c0>
jmp    1557 <tml_dr_vIntToFloat+0x457>
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     1632 <tml_dr_vIntToFloat+0x532>
mov    %r8,%r10
and    $0xfffffffffffffffe,%r10
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movdqu (%rdi,%rdx,8),%xmm0
movdqu 0x10(%rdi,%rdx,8),%xmm1
movq   %xmm0,%rax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
pshufd $0xee,%xmm0,%xmm0
movq   %xmm0,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
unpcklpd %xmm0,%xmm2
movq   %xmm1,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
pshufd $0xee,%xmm1,%xmm1
movq   %xmm1,%rax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm2,(%rsi,%rdx,8)
movupd %xmm0,0x10(%rsi,%rdx,8)
movdqu 0x20(%rdi,%rdx,8),%xmm0
movdqu 0x30(%rdi,%rdx,8),%xmm1
movq   %xmm0,%rax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
pshufd $0xee,%xmm0,%xmm0
movq   %xmm0,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
unpcklpd %xmm0,%xmm2
movq   %xmm1,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
pshufd $0xee,%xmm1,%xmm1
movq   %xmm1,%rax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm2,0x20(%rsi,%rdx,8)
movupd %xmm0,0x30(%rsi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%r10
jne    1410 <tml_dr_vIntToFloat+0x310>
test   $0x1,%r8b
je     1537 <tml_dr_vIntToFloat+0x437>
movdqu (%rdi,%rdx,8),%xmm0
movq   %xmm0,%rax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
pshufd $0xee,%xmm0,%xmm0
movq   %xmm0,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movdqu 0x10(%rdi,%rdx,8),%xmm2
movq   %xmm2,%rax
cvtsi2sd %rax,%xmm3
pshufd $0xee,%xmm2,%xmm2
movq   %xmm2,%rax
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
unpcklpd %xmm0,%xmm1
unpcklpd %xmm2,%xmm3
movupd %xmm1,(%rsi,%rdx,8)
movupd %xmm3,0x10(%rsi,%rdx,8)
cmp    %r9,%rcx
je     1557 <tml_dr_vIntToFloat+0x457>
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sdq (%rdi,%rcx,8),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r9
jne    1540 <tml_dr_vIntToFloat+0x440>
ret
mov    %r9d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rax
mov    %rax,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rax,%rax
je     1643 <tml_dr_vIntToFloat+0x543>
mov    %r8,%r10
and    $0xfffffffffffffffe,%r10
xor    %edx,%edx
nop
movzwl (%rdi,%rdx,1),%eax
movd   %eax,%xmm0
punpcklbw %xmm0,%xmm0
movzwl 0x2(%rdi,%rdx,1),%eax
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movups %xmm0,(%rsi,%rdx,8)
movups %xmm1,0x10(%rsi,%rdx,8)
movzwl 0x4(%rdi,%rdx,1),%eax
movd   %eax,%xmm0
punpcklbw %xmm0,%xmm0
movzwl 0x6(%rdi,%rdx,1),%eax
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movupd %xmm0,0x20(%rsi,%rdx,8)
movupd %xmm1,0x30(%rsi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%r10
jne    1580 <tml_dr_vIntToFloat+0x480>
jmp    1645 <tml_dr_vIntToFloat+0x545>
xor    %edx,%edx
test   $0x1,%r8b
jne    139c <tml_dr_vIntToFloat+0x29c>
jmp    13b2 <tml_dr_vIntToFloat+0x2b2>
xor    %edx,%edx
test   $0x1,%r8b
jne    12d4 <tml_dr_vIntToFloat+0x1d4>
jmp    1306 <tml_dr_vIntToFloat+0x206>
xor    %edx,%edx
test   $0x1,%r8b
jne    14de <tml_dr_vIntToFloat+0x3de>
jmp    1537 <tml_dr_vIntToFloat+0x437>
xor    %edx,%edx
test   $0x1,%r8b
je     168b <tml_dr_vIntToFloat+0x58b>
movzwl (%rdi,%rdx,1),%eax
movd   %eax,%xmm0
movzwl 0x2(%rdi,%rdx,1),%eax
punpcklbw %xmm0,%xmm0
pshuflw $0x60,%xmm0,%xmm0
psrad  $0x18,%xmm0
cvtdq2pd %xmm0,%xmm0
movd   %eax,%xmm1
punpcklbw %xmm1,%xmm1
pshuflw $0x60,%xmm1,%xmm1
psrad  $0x18,%xmm1
cvtdq2pd %xmm1,%xmm1
movupd %xmm0,(%rsi,%rdx,8)
movupd %xmm1,0x10(%rsi,%rdx,8)
cmp    %r9,%rcx
je     1557 <tml_dr_vIntToFloat+0x457>
jmp    114b <tml_dr_vIntToFloat+0x4b>

LLVM IR (-O0):
define void @tml_dr_vIntToFloat(i8* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %8
%12 = sdiv i32 %11, 8
store i32 %12, i32* %10
%13 = load i32, i32* %10
%14 = sext i32 %13 to i64
%15 = icmp eq i64 %14, 1
br i1 %15, label %16, label %36
16: ; preds = %4
store i32 0, i32* %9
br label %17
17: ; preds = %32, %16
%18 = load i32, i32* %9
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %35
21: ; preds = %17
%22 = load i8*, i8** %5
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sitofp i8 %26 to double
%28 = load double*, double** %6
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
store double %27, double* %31
br label %32
32: ; preds = %21
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
store i32 %34, i32* %9
br label %17
35: ; preds = %17
br label %140
36: ; preds = %4
%37 = load i32, i32* %10
%38 = sext i32 %37 to i64
%39 = icmp eq i64 %38, 2
br i1 %39, label %40, label %61
40: ; preds = %36
store i32 0, i32* %9
br label %41
41: ; preds = %57, %40
%42 = load i32, i32* %9
%43 = load i32, i32* %7
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %60
45: ; preds = %41
%46 = load i8*, i8** %5
%47 = bitcast i8* %46 to i16*
%48 = load i32, i32* %9
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i16, i16* %47, i64 %49
%51 = load i16, i16* %50
%52 = sitofp i16 %51 to double
%53 = load double*, double** %6
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %53, i64 %55
store double %52, double* %56
br label %57
57: ; preds = %45
%58 = load i32, i32* %9
%59 = add nsw i32 %58, 1
store i32 %59, i32* %9
br label %41
60: ; preds = %41
br label %139
61: ; preds = %36
%62 = load i32, i32* %10
%63 = sext i32 %62 to i64
%64 = icmp eq i64 %63, 4
br i1 %64, label %65, label %86
65: ; preds = %61
store i32 0, i32* %9
br label %66
66: ; preds = %82, %65
%67 = load i32, i32* %9
%68 = load i32, i32* %7
%69 = icmp slt i32 %67, %68
br i1 %69, label %70, label %85
70: ; preds = %66
%71 = load i8*, i8** %5
%72 = bitcast i8* %71 to i32*
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %72, i64 %74
%76 = load i32, i32* %75
%77 = sitofp i32 %76 to double
%78 = load double*, double** %6
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
store double %77, double* %81
br label %82
82: ; preds = %70
%83 = load i32, i32* %9
%84 = add nsw i32 %83, 1
store i32 %84, i32* %9
br label %66
85: ; preds = %66
br label %138
86: ; preds = %61
%87 = load i32, i32* %10
%88 = sext i32 %87 to i64
%89 = icmp eq i64 %88, 8
br i1 %89, label %90, label %111
90: ; preds = %86
store i32 0, i32* %9
br label %91
91: ; preds = %107, %90
%92 = load i32, i32* %9
%93 = load i32, i32* %7
%94 = icmp slt i32 %92, %93
br i1 %94, label %95, label %110
95: ; preds = %91
%96 = load i8*, i8** %5
%97 = bitcast i8* %96 to i64*
%98 = load i32, i32* %9
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i64, i64* %97, i64 %99
%101 = load i64, i64* %100
%102 = sitofp i64 %101 to double
%103 = load double*, double** %6
%104 = load i32, i32* %9
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
store double %102, double* %106
br label %107
107: ; preds = %95
%108 = load i32, i32* %9
%109 = add nsw i32 %108, 1
store i32 %109, i32* %9
br label %91
110: ; preds = %91
br label %137
111: ; preds = %86
%112 = load i32, i32* %10
%113 = sext i32 %112 to i64
%114 = icmp eq i64 %113, 8
br i1 %114, label %115, label %136
115: ; preds = %111
store i32 0, i32* %9
br label %116
116: ; preds = %132, %115
%117 = load i32, i32* %9
%118 = load i32, i32* %7
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %135
120: ; preds = %116
%121 = load i8*, i8** %5
%122 = bitcast i8* %121 to i64*
%123 = load i32, i32* %9
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i64, i64* %122, i64 %124
%126 = load i64, i64* %125
%127 = sitofp i64 %126 to double
%128 = load double*, double** %6
%129 = load i32, i32* %9
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %128, i64 %130
store double %127, double* %131
br label %132
132: ; preds = %120
%133 = load i32, i32* %9
%134 = add nsw i32 %133, 1
store i32 %134, i32* %9
br label %116
135: ; preds = %116
br label %136
136: ; preds = %135, %111
br label %137
137: ; preds = %136, %110
br label %138
138: ; preds = %137, %85
br label %139
139: ; preds = %138, %60
br label %140
140: ; preds = %139, %35
ret void
}

LLVM IR (-O2):
define void @tml_dr_vIntToFloat(i8* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = bitcast double* %1 to i8*
%6 = add i32 %3, -8
%7 = lshr i32 %6, 3
switch i32 %7, label %342 [
i32 0, label %206
i32 1, label %140
i32 3, label %74
i32 7, label %8
]
8: ; preds = %4
%9 = icmp sgt i32 %2, 0
br i1 %9, label %10, label %342
10: ; preds = %8
%11 = bitcast i8* %0 to i64*
%12 = zext i32 %2 to i64
%13 = icmp ult i32 %2, 4
br i1 %13, label %72, label %14
14: ; preds = %10
%15 = and i64 %12, 4294967292
%16 = add nsw i64 %15, -4
%17 = lshr exact i64 %16, 2
%18 = add nuw nsw i64 %17, 1
%19 = and i64 %18, 1
%20 = icmp eq i64 %16, 0
br i1 %20, label %54, label %21
21: ; preds = %14
%22 = and i64 %18, 9223372036854775806
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %51, %23 ]
%25 = phi i64 [ 0, %21 ], [ %52, %23 ]
%26 = getelementptr inbounds i64, i64* %11, i64 %24
%27 = bitcast i64* %26 to <2 x i64>*
%28 = load <2 x i64>, <2 x i64>* %27
%29 = getelementptr inbounds i64, i64* %26, i64 2
%30 = bitcast i64* %29 to <2 x i64>*
%31 = load <2 x i64>, <2 x i64>* %30
%32 = sitofp <2 x i64> %28 to <2 x double>
%33 = sitofp <2 x i64> %31 to <2 x double>
%34 = getelementptr inbounds double, double* %1, i64 %24
%35 = bitcast double* %34 to <2 x double>*
store <2 x double> %32, <2 x double>* %35
%36 = getelementptr inbounds double, double* %34, i64 2
%37 = bitcast double* %36 to <2 x double>*
store <2 x double> %33, <2 x double>* %37
%38 = or i64 %24, 4
%39 = getelementptr inbounds i64, i64* %11, i64 %38
%40 = bitcast i64* %39 to <2 x i64>*
%41 = load <2 x i64>, <2 x i64>* %40
%42 = getelementptr inbounds i64, i64* %39, i64 2
%43 = bitcast i64* %42 to <2 x i64>*
%44 = load <2 x i64>, <2 x i64>* %43
%45 = sitofp <2 x i64> %41 to <2 x double>
%46 = sitofp <2 x i64> %44 to <2 x double>
%47 = getelementptr inbounds double, double* %1, i64 %38
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> %45, <2 x double>* %48
%49 = getelementptr inbounds double, double* %47, i64 2
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> %46, <2 x double>* %50
%51 = add nuw i64 %24, 8
%52 = add i64 %25, 2
%53 = icmp eq i64 %52, %22
br i1 %53, label %54, label %23
54: ; preds = %23, %14
%55 = phi i64 [ 0, %14 ], [ %51, %23 ]
%56 = icmp eq i64 %19, 0
br i1 %56, label %70, label %57
57: ; preds = %54
%58 = getelementptr inbounds i64, i64* %11, i64 %55
%59 = bitcast i64* %58 to <2 x i64>*
%60 = load <2 x i64>, <2 x i64>* %59
%61 = getelementptr inbounds i64, i64* %58, i64 2
%62 = bitcast i64* %61 to <2 x i64>*
%63 = load <2 x i64>, <2 x i64>* %62
%64 = sitofp <2 x i64> %60 to <2 x double>
%65 = sitofp <2 x i64> %63 to <2 x double>
%66 = getelementptr inbounds double, double* %1, i64 %55
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> %64, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> %65, <2 x double>* %69
br label %70
70: ; preds = %54, %57
%71 = icmp eq i64 %15, %12
br i1 %71, label %342, label %72
72: ; preds = %10, %70
%73 = phi i64 [ 0, %10 ], [ %15, %70 ]
br label %334
74: ; preds = %4
%75 = icmp sgt i32 %2, 0
br i1 %75, label %76, label %342
76: ; preds = %74
%77 = bitcast i8* %0 to i32*
%78 = zext i32 %2 to i64
%79 = icmp ult i32 %2, 4
br i1 %79, label %138, label %80
80: ; preds = %76
%81 = and i64 %78, 4294967292
%82 = add nsw i64 %81, -4
%83 = lshr exact i64 %82, 2
%84 = add nuw nsw i64 %83, 1
%85 = and i64 %84, 1
%86 = icmp eq i64 %82, 0
br i1 %86, label %120, label %87
87: ; preds = %80
%88 = and i64 %84, 9223372036854775806
br label %89
89: ; preds = %89, %87
%90 = phi i64 [ 0, %87 ], [ %117, %89 ]
%91 = phi i64 [ 0, %87 ], [ %118, %89 ]
%92 = getelementptr inbounds i32, i32* %77, i64 %90
%93 = bitcast i32* %92 to <2 x i32>*
%94 = load <2 x i32>, <2 x i32>* %93
%95 = getelementptr inbounds i32, i32* %92, i64 2
%96 = bitcast i32* %95 to <2 x i32>*
%97 = load <2 x i32>, <2 x i32>* %96
%98 = sitofp <2 x i32> %94 to <2 x double>
%99 = sitofp <2 x i32> %97 to <2 x double>
%100 = getelementptr inbounds double, double* %1, i64 %90
%101 = bitcast double* %100 to <2 x double>*
store <2 x double> %98, <2 x double>* %101
%102 = getelementptr inbounds double, double* %100, i64 2
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> %99, <2 x double>* %103
%104 = or i64 %90, 4
%105 = getelementptr inbounds i32, i32* %77, i64 %104
%106 = bitcast i32* %105 to <2 x i32>*
%107 = load <2 x i32>, <2 x i32>* %106
%108 = getelementptr inbounds i32, i32* %105, i64 2
%109 = bitcast i32* %108 to <2 x i32>*
%110 = load <2 x i32>, <2 x i32>* %109
%111 = sitofp <2 x i32> %107 to <2 x double>
%112 = sitofp <2 x i32> %110 to <2 x double>
%113 = getelementptr inbounds double, double* %1, i64 %104
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> %111, <2 x double>* %114
%115 = getelementptr inbounds double, double* %113, i64 2
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> %112, <2 x double>* %116
%117 = add nuw i64 %90, 8
%118 = add i64 %91, 2
%119 = icmp eq i64 %118, %88
br i1 %119, label %120, label %89
120: ; preds = %89, %80
%121 = phi i64 [ 0, %80 ], [ %117, %89 ]
%122 = icmp eq i64 %85, 0
br i1 %122, label %136, label %123
123: ; preds = %120
%124 = getelementptr inbounds i32, i32* %77, i64 %121
%125 = bitcast i32* %124 to <2 x i32>*
%126 = load <2 x i32>, <2 x i32>* %125
%127 = getelementptr inbounds i32, i32* %124, i64 2
%128 = bitcast i32* %127 to <2 x i32>*
%129 = load <2 x i32>, <2 x i32>* %128
%130 = sitofp <2 x i32> %126 to <2 x double>
%131 = sitofp <2 x i32> %129 to <2 x double>
%132 = getelementptr inbounds double, double* %1, i64 %121
%133 = bitcast double* %132 to <2 x double>*
store <2 x double> %130, <2 x double>* %133
%134 = getelementptr inbounds double, double* %132, i64 2
%135 = bitcast double* %134 to <2 x double>*
store <2 x double> %131, <2 x double>* %135
br label %136
136: ; preds = %120, %123
%137 = icmp eq i64 %81, %78
br i1 %137, label %342, label %138
138: ; preds = %76, %136
%139 = phi i64 [ 0, %76 ], [ %81, %136 ]
br label %326
140: ; preds = %4
%141 = icmp sgt i32 %2, 0
br i1 %141, label %142, label %342
142: ; preds = %140
%143 = bitcast i8* %0 to i16*
%144 = zext i32 %2 to i64
%145 = icmp ult i32 %2, 4
br i1 %145, label %204, label %146
146: ; preds = %142
%147 = and i64 %144, 4294967292
%148 = add nsw i64 %147, -4
%149 = lshr exact i64 %148, 2
%150 = add nuw nsw i64 %149, 1
%151 = and i64 %150, 1
%152 = icmp eq i64 %148, 0
br i1 %152, label %186, label %153
153: ; preds = %146
%154 = and i64 %150, 9223372036854775806
br label %155
155: ; preds = %155, %153
%156 = phi i64 [ 0, %153 ], [ %183, %155 ]
%157 = phi i64 [ 0, %153 ], [ %184, %155 ]
%158 = getelementptr inbounds i16, i16* %143, i64 %156
%159 = bitcast i16* %158 to <2 x i16>*
%160 = load <2 x i16>, <2 x i16>* %159
%161 = getelementptr inbounds i16, i16* %158, i64 2
%162 = bitcast i16* %161 to <2 x i16>*
%163 = load <2 x i16>, <2 x i16>* %162
%164 = sitofp <2 x i16> %160 to <2 x double>
%165 = sitofp <2 x i16> %163 to <2 x double>
%166 = getelementptr inbounds double, double* %1, i64 %156
%167 = bitcast double* %166 to <2 x double>*
store <2 x double> %164, <2 x double>* %167
%168 = getelementptr inbounds double, double* %166, i64 2
%169 = bitcast double* %168 to <2 x double>*
store <2 x double> %165, <2 x double>* %169
%170 = or i64 %156, 4
%171 = getelementptr inbounds i16, i16* %143, i64 %170
%172 = bitcast i16* %171 to <2 x i16>*
%173 = load <2 x i16>, <2 x i16>* %172
%174 = getelementptr inbounds i16, i16* %171, i64 2
%175 = bitcast i16* %174 to <2 x i16>*
%176 = load <2 x i16>, <2 x i16>* %175
%177 = sitofp <2 x i16> %173 to <2 x double>
%178 = sitofp <2 x i16> %176 to <2 x double>
%179 = getelementptr inbounds double, double* %1, i64 %170
%180 = bitcast double* %179 to <2 x double>*
store <2 x double> %177, <2 x double>* %180
%181 = getelementptr inbounds double, double* %179, i64 2
%182 = bitcast double* %181 to <2 x double>*
store <2 x double> %178, <2 x double>* %182
%183 = add nuw i64 %156, 8
%184 = add i64 %157, 2
%185 = icmp eq i64 %184, %154
br i1 %185, label %186, label %155
186: ; preds = %155, %146
%187 = phi i64 [ 0, %146 ], [ %183, %155 ]
%188 = icmp eq i64 %151, 0
br i1 %188, label %202, label %189
189: ; preds = %186
%190 = getelementptr inbounds i16, i16* %143, i64 %187
%191 = bitcast i16* %190 to <2 x i16>*
%192 = load <2 x i16>, <2 x i16>* %191
%193 = getelementptr inbounds i16, i16* %190, i64 2
%194 = bitcast i16* %193 to <2 x i16>*
%195 = load <2 x i16>, <2 x i16>* %194
%196 = sitofp <2 x i16> %192 to <2 x double>
%197 = sitofp <2 x i16> %195 to <2 x double>
%198 = getelementptr inbounds double, double* %1, i64 %187
%199 = bitcast double* %198 to <2 x double>*
store <2 x double> %196, <2 x double>* %199
%200 = getelementptr inbounds double, double* %198, i64 2
%201 = bitcast double* %200 to <2 x double>*
store <2 x double> %197, <2 x double>* %201
br label %202
202: ; preds = %186, %189
%203 = icmp eq i64 %147, %144
br i1 %203, label %342, label %204
204: ; preds = %142, %202
%205 = phi i64 [ 0, %142 ], [ %147, %202 ]
br label %318
206: ; preds = %4
%207 = icmp sgt i32 %2, 0
br i1 %207, label %208, label %342
208: ; preds = %206
%209 = zext i32 %2 to i64
%210 = icmp ult i32 %2, 4
br i1 %210, label %276, label %211
211: ; preds = %208
%212 = getelementptr double, double* %1, i64 %209
%213 = bitcast double* %212 to i8*
%214 = getelementptr i8, i8* %0, i64 %209
%215 = icmp ugt i8* %214, %5
%216 = icmp ugt i8* %213, %0
%217 = and i1 %215, %216
br i1 %217, label %276, label %218
218: ; preds = %211
%219 = and i64 %209, 4294967292
%220 = add nsw i64 %219, -4
%221 = lshr exact i64 %220, 2
%222 = add nuw nsw i64 %221, 1
%223 = and i64 %222, 1
%224 = icmp eq i64 %220, 0
br i1 %224, label %258, label %225
225: ; preds = %218
%226 = and i64 %222, 9223372036854775806
br label %227
227: ; preds = %227, %225
%228 = phi i64 [ 0, %225 ], [ %255, %227 ]
%229 = phi i64 [ 0, %225 ], [ %256, %227 ]
%230 = getelementptr inbounds i8, i8* %0, i64 %228
%231 = bitcast i8* %230 to <2 x i8>*
%232 = load <2 x i8>, <2 x i8>* %231
%233 = getelementptr inbounds i8, i8* %230, i64 2
%234 = bitcast i8* %233 to <2 x i8>*
%235 = load <2 x i8>, <2 x i8>* %234
%236 = sitofp <2 x i8> %232 to <2 x double>
%237 = sitofp <2 x i8> %235 to <2 x double>
%238 = getelementptr inbounds double, double* %1, i64 %228
%239 = bitcast double* %238 to <2 x double>*
store <2 x double> %236, <2 x double>* %239
%240 = getelementptr inbounds double, double* %238, i64 2
%241 = bitcast double* %240 to <2 x double>*
store <2 x double> %237, <2 x double>* %241
%242 = or i64 %228, 4
%243 = getelementptr inbounds i8, i8* %0, i64 %242
%244 = bitcast i8* %243 to <2 x i8>*
%245 = load <2 x i8>, <2 x i8>* %244
%246 = getelementptr inbounds i8, i8* %243, i64 2
%247 = bitcast i8* %246 to <2 x i8>*
%248 = load <2 x i8>, <2 x i8>* %247
%249 = sitofp <2 x i8> %245 to <2 x double>
%250 = sitofp <2 x i8> %248 to <2 x double>
%251 = getelementptr inbounds double, double* %1, i64 %242
%252 = bitcast double* %251 to <2 x double>*
store <2 x double> %249, <2 x double>* %252
%253 = getelementptr inbounds double, double* %251, i64 2
%254 = bitcast double* %253 to <2 x double>*
store <2 x double> %250, <2 x double>* %254
%255 = add nuw i64 %228, 8
%256 = add i64 %229, 2
%257 = icmp eq i64 %256, %226
br i1 %257, label %258, label %227
258: ; preds = %227, %218
%259 = phi i64 [ 0, %218 ], [ %255, %227 ]
%260 = icmp eq i64 %223, 0
br i1 %260, label %274, label %261
261: ; preds = %258
%262 = getelementptr inbounds i8, i8* %0, i64 %259
%263 = bitcast i8* %262 to <2 x i8>*
%264 = load <2 x i8>, <2 x i8>* %263
%265 = getelementptr inbounds i8, i8* %262, i64 2
%266 = bitcast i8* %265 to <2 x i8>*
%267 = load <2 x i8>, <2 x i8>* %266
%268 = sitofp <2 x i8> %264 to <2 x double>
%269 = sitofp <2 x i8> %267 to <2 x double>
%270 = getelementptr inbounds double, double* %1, i64 %259
%271 = bitcast double* %270 to <2 x double>*
store <2 x double> %268, <2 x double>* %271
%272 = getelementptr inbounds double, double* %270, i64 2
%273 = bitcast double* %272 to <2 x double>*
store <2 x double> %269, <2 x double>* %273
br label %274
274: ; preds = %258, %261
%275 = icmp eq i64 %219, %209
br i1 %275, label %342, label %276
276: ; preds = %211, %208, %274
%277 = phi i64 [ 0, %211 ], [ 0, %208 ], [ %219, %274 ]
%278 = xor i64 %277, -1
%279 = add nsw i64 %278, %209
%280 = and i64 %209, 3
%281 = icmp eq i64 %280, 0
br i1 %281, label %292, label %282
282: ; preds = %276, %282
%283 = phi i64 [ %289, %282 ], [ %277, %276 ]
%284 = phi i64 [ %290, %282 ], [ 0, %276 ]
%285 = getelementptr inbounds i8, i8* %0, i64 %283
%286 = load i8, i8* %285
%287 = sitofp i8 %286 to double
%288 = getelementptr inbounds double, double* %1, i64 %283
store double %287, double* %288
%289 = add nuw nsw i64 %283, 1
%290 = add i64 %284, 1
%291 = icmp eq i64 %290, %280
br i1 %291, label %292, label %282
292: ; preds = %282, %276
%293 = phi i64 [ %277, %276 ], [ %289, %282 ]
%294 = icmp ult i64 %279, 3
br i1 %294, label %342, label %295
295: ; preds = %292, %295
%296 = phi i64 [ %316, %295 ], [ %293, %292 ]
%297 = getelementptr inbounds i8, i8* %0, i64 %296
%298 = load i8, i8* %297
%299 = sitofp i8 %298 to double
%300 = getelementptr inbounds double, double* %1, i64 %296
store double %299, double* %300
%301 = add nuw nsw i64 %296, 1
%302 = getelementptr inbounds i8, i8* %0, i64 %301
%303 = load i8, i8* %302
%304 = sitofp i8 %303 to double
%305 = getelementptr inbounds double, double* %1, i64 %301
store double %304, double* %305
%306 = add nuw nsw i64 %296, 2
%307 = getelementptr inbounds i8, i8* %0, i64 %306
%308 = load i8, i8* %307
%309 = sitofp i8 %308 to double
%310 = getelementptr inbounds double, double* %1, i64 %306
store double %309, double* %310
%311 = add nuw nsw i64 %296, 3
%312 = getelementptr inbounds i8, i8* %0, i64 %311
%313 = load i8, i8* %312
%314 = sitofp i8 %313 to double
%315 = getelementptr inbounds double, double* %1, i64 %311
store double %314, double* %315
%316 = add nuw nsw i64 %296, 4
%317 = icmp eq i64 %316, %209
br i1 %317, label %342, label %295
318: ; preds = %204, %318
%319 = phi i64 [ %324, %318 ], [ %205, %204 ]
%320 = getelementptr inbounds i16, i16* %143, i64 %319
%321 = load i16, i16* %320
%322 = sitofp i16 %321 to double
%323 = getelementptr inbounds double, double* %1, i64 %319
store double %322, double* %323
%324 = add nuw nsw i64 %319, 1
%325 = icmp eq i64 %324, %144
br i1 %325, label %342, label %318
326: ; preds = %138, %326
%327 = phi i64 [ %332, %326 ], [ %139, %138 ]
%328 = getelementptr inbounds i32, i32* %77, i64 %327
%329 = load i32, i32* %328
%330 = sitofp i32 %329 to double
%331 = getelementptr inbounds double, double* %1, i64 %327
store double %330, double* %331
%332 = add nuw nsw i64 %327, 1
%333 = icmp eq i64 %332, %78
br i1 %333, label %342, label %326
334: ; preds = %72, %334
%335 = phi i64 [ %340, %334 ], [ %73, %72 ]
%336 = getelementptr inbounds i64, i64* %11, i64 %335
%337 = load i64, i64* %336
%338 = sitofp i64 %337 to double
%339 = getelementptr inbounds double, double* %1, i64 %335
store double %338, double* %339
%340 = add nuw nsw i64 %335, 1
%341 = icmp eq i64 %340, %12
br i1 %341, label %342, label %334
342: ; preds = %334, %326, %318, %292, %295, %70, %136, %202, %274, %8, %74, %140, %206, %4
ret void
}