__float128 plm_lnPlm(int l, int m, __float128 x, int *sign) {
  __float128 plm[l - m + 1];
  int signs[l - m + 1];
  _lnplm_array(l, m, x, plm, signs);
  *sign = signs[l - m];
  return plm[l - m];
}


x86 assembly (clang, -O0):
<plm_lnPlm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movaps %xmm0,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    %ecx,%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
shl    $0x4,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x50(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    %ecx,%eax
add    $0x1,%eax
lea    0xf(,%rax,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movaps -0x20(%rbp),%xmm0
mov    $0x1,%al
call   1030 <_lnplm_array@plt>
mov    -0x50(%rbp),%rcx
mov    -0x48(%rbp),%rax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
sub    %esi,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,4),%edx
mov    -0x28(%rbp),%rax
mov    %edx,(%rax)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    %edx,%eax
cltq
shl    $0x4,%rax
mov    %rcx,%rdx
add    %rax,%rdx
movaps (%rax,%rcx,1),%xmm0
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plm_lnPlm>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %edi,%r12d
sub    %esi,%r12d
lea    0x1(%r12),%eax
lea    0xf(,%rax,4),%rcx
shl    $0x4,%rax
mov    %rsp,%r15
sub    %rax,%r15
mov    %r15,%rsp
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rbx
sub    %rcx,%rbx
mov    %rbx,%rsp
mov    %r15,%rdx
mov    %rbx,%rcx
mov    $0x1,%al
call   1030 <_lnplm_array@plt>
movslq %r12d,%rax
mov    (%rbx,%rax,4),%ecx
mov    %ecx,(%r14)
shl    $0x4,%rax
movaps (%rax,%r15,1),%xmm0
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define fp128 @plm_lnPlm(i32 %0, i32 %1, fp128 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca fp128
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store fp128 %2, fp128* %7
store i32* %3, i32** %8
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = add nsw i32 %14, 1
%16 = zext i32 %15 to i64
%17 = call i8* @llvm.stacksave()
store i8* %17, i8** %9
%18 = alloca fp128, i64 %16
store i64 %16, i64* %10
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = sub nsw i32 %19, %20
%22 = add nsw i32 %21, 1
%23 = zext i32 %22 to i64
%24 = alloca i32, i64 %23
store i64 %23, i64* %11
%25 = load i32, i32* %5
%26 = load i32, i32* %6
%27 = load fp128, fp128* %7
%28 = call i32 (i32, i32, fp128, fp128*, i32*, ...) bitcast (i32 (...)* @_lnplm_array to i32 (i32, i32, fp128, fp128*, i32*, ...)*)(i32 %25, i32 %26, fp128 %27, fp128* %18, i32* %24)
%29 = load i32, i32* %5
%30 = load i32, i32* %6
%31 = sub nsw i32 %29, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %24, i64 %32
%34 = load i32, i32* %33
%35 = load i32*, i32** %8
store i32 %34, i32* %35
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = sub nsw i32 %36, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds fp128, fp128* %18, i64 %39
%41 = load fp128, fp128* %40
%42 = load i8*, i8** %9
ret fp128 %41
}

LLVM IR (-O2):
define fp128 @plm_lnPlm(i32 %0, i32 %1, fp128 %2, i32* nocapture writeonly %3) {
%5 = sub nsw i32 %0, %1
%6 = add nsw i32 %5, 1
%7 = zext i32 %6 to i64
%8 = alloca fp128, i64 %7
%9 = alloca i32, i64 %7
%10 = call i32 (i32, i32, fp128, fp128*, i32*, ...) bitcast (i32 (...)* @_lnplm_array to i32 (i32, i32, fp128, fp128*, i32*, ...)*)(i32 %0, i32 %1, fp128 %2, fp128* %8, i32* %9)
%11 = sext i32 %5 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %3
%14 = getelementptr inbounds fp128, fp128* %8, i64 %11
%15 = load fp128, fp128* %14
ret fp128 %15
}