int sys$trnlnm(unsigned int *attr, void *tabnam, void *lognam,
               unsigned char *acmode, void *itmlst) {
  return ({
    unsigned long resultvar;
    register long int _a5 asm("r8") = (long)(itmlst);
    register long int _a4 asm("r10") = (long)(acmode);
    register long int _a3 asm("rdx") = (long)(lognam);
    register long int _a2 asm("rsi") = (long)(tabnam);
    register long int _a1 asm("rdi") = (long)(attr);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(38), "r"(_a1), "r"(_a2), "r"(_a3), "r"(_a4), "r"(_a5)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$trnlnm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%r10
mov    -0x38(%rbp),%r8
mov    $0x26,%rax
int    $0x81
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$trnlnm>:
mov    %rcx,%r10
mov    $0x26,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$trnlnm"(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i32* %0, i32** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%18 = load i8*, i8** %10
%19 = ptrtoint i8* %18 to i64
store i64 %19, i64* %12
%20 = load i8*, i8** %9
%21 = ptrtoint i8* %20 to i64
store i64 %21, i64* %13
%22 = load i8*, i8** %8
%23 = ptrtoint i8* %22 to i64
store i64 %23, i64* %14
%24 = load i8*, i8** %7
%25 = ptrtoint i8* %24 to i64
store i64 %25, i64* %15
%26 = load i32*, i32** %6
%27 = ptrtoint i32* %26 to i64
store i64 %27, i64* %16
%28 = load i64, i64* %16
%29 = load i64, i64* %15
%30 = load i64, i64* %14
%31 = load i64, i64* %13
%32 = load i64, i64* %12
%33 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},{rsi},{rdx},{r10},{r8},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 38, i64 %28, i64 %29, i64 %30, i64 %31, i64 %32)
store i64 %33, i64* %11
%34 = load i64, i64* %11
store i64 %34, i64* %17
%35 = load i64, i64* %17
%36 = trunc i64 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @"sys$trnlnm"(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = ptrtoint i8* %4 to i64
%7 = ptrtoint i8* %3 to i64
%8 = ptrtoint i8* %2 to i64
%9 = ptrtoint i8* %1 to i64
%10 = ptrtoint i32* %0 to i64
%11 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},{rsi},{rdx},{r10},{r8},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 38, i64 %10, i64 %9, i64 %8, i64 %7, i64 %6)
%12 = trunc i64 %11 to i32
ret i32 %12
}