void eldexp(x, pwr2, y) unsigned short x[];
long pwr2;
unsigned short y[];
{
  unsigned short xi[(6 + 3)];
  long li;
  int i;
  emovi(x, xi);
  li = xi[1];
  li += pwr2;
  i = 0;
  emdnorm(xi, i, i, li, 64);
  emovo(xi, y);
}


x86 assembly (clang, -O0):
<eldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <emovi@plt>
movzwl -0x2e(%rbp),%eax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x38(%rbp),%rcx
mov    $0x40,%r8d
mov    $0x0,%al
call   1050 <emdnorm@plt>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <emovo@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eldexp>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%r15
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <emovi@plt>
movzwl 0x2(%rsp),%ecx
add    %rbx,%rcx
mov    %r15,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x40,%r8d
xor    %eax,%eax
call   1050 <emdnorm@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <emovo@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @eldexp(i16* %0, i64 %1, i16* %2) {
%4 = alloca i16*
%5 = alloca i64
%6 = alloca i16*
%7 = alloca [9 x i16]
%8 = alloca i64
%9 = alloca i32
store i16* %0, i16** %4
store i64 %1, i64* %5
store i16* %2, i16** %6
%10 = load i16*, i16** %4
%11 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 0
%12 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @emovi to i32 (i16*, i16*, ...)*)(i16* %10, i16* %11)
%13 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 1
%14 = load i16, i16* %13
%15 = zext i16 %14 to i64
store i64 %15, i64* %8
%16 = load i64, i64* %5
%17 = load i64, i64* %8
%18 = add nsw i64 %17, %16
store i64 %18, i64* %8
store i32 0, i32* %9
%19 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 0
%20 = load i32, i32* %9
%21 = load i32, i32* %9
%22 = load i64, i64* %8
%23 = call i32 (i16*, i32, i32, i64, i32, ...) bitcast (i32 (...)* @emdnorm to i32 (i16*, i32, i32, i64, i32, ...)*)(i16* %19, i32 %20, i32 %21, i64 %22, i32 64)
%24 = getelementptr inbounds [9 x i16], [9 x i16]* %7, i64 0, i64 0
%25 = load i16*, i16** %6
%26 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @emovo to i32 (i16*, i16*, ...)*)(i16* %24, i16* %25)
ret void
}

LLVM IR (-O2):
define void @eldexp(i16* %0, i64 %1, i16* %2) {
%4 = alloca [9 x i16]
%5 = bitcast [9 x i16]* %4 to i8*
%6 = getelementptr inbounds [9 x i16], [9 x i16]* %4, i64 0, i64 0
%7 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @emovi to i32 (i16*, i16*, ...)*)(i16* %0, i16* %6)
%8 = getelementptr inbounds [9 x i16], [9 x i16]* %4, i64 0, i64 1
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = add nsw i64 %10, %1
%12 = call i32 (i16*, i32, i32, i64, i32, ...) bitcast (i32 (...)* @emdnorm to i32 (i16*, i32, i32, i64, i32, ...)*)(i16* %6, i32 0, i32 0, i64 %11, i32 64)
%13 = call i32 (i16*, i16*, ...) bitcast (i32 (...)* @emovo to i32 (i16*, i16*, ...)*)(i16* %6, i16* %2)
ret void
}