int enkf_wrapper_r8(int argc, void *argv[]) {
  extern void enkf_driver_r8_();
  int ret;
  enkf_driver_r8_((int *)argv[0], (int *)argv[1], (int *)argv[2],
                  (double *)argv[3], (double *)argv[4], (double *)argv[5],
                  (double *)argv[6]);
  return ret;
}


x86 assembly (clang, -O0):
<enkf_wrapper_r8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%r8
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%r9
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <enkf_driver_r8_@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enkf_wrapper_r8>:
push   %rax
mov    (%rsi),%rdi
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rdx
mov    0x18(%rsi),%rcx
mov    0x20(%rsi),%r8
mov    0x28(%rsi),%r9
mov    0x30(%rsi),%rsi
mov    %rsi,(%rsp)
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <enkf_driver_r8_@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @enkf_wrapper_r8(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = bitcast i8* %8 to i32*
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = bitcast i8* %12 to i32*
%14 = load i8**, i8*** %4
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = load i8*, i8** %15
%17 = bitcast i8* %16 to i32*
%18 = load i8**, i8*** %4
%19 = getelementptr inbounds i8*, i8** %18, i64 3
%20 = load i8*, i8** %19
%21 = bitcast i8* %20 to double*
%22 = load i8**, i8*** %4
%23 = getelementptr inbounds i8*, i8** %22, i64 4
%24 = load i8*, i8** %23
%25 = bitcast i8* %24 to double*
%26 = load i8**, i8*** %4
%27 = getelementptr inbounds i8*, i8** %26, i64 5
%28 = load i8*, i8** %27
%29 = bitcast i8* %28 to double*
%30 = load i8**, i8*** %4
%31 = getelementptr inbounds i8*, i8** %30, i64 6
%32 = load i8*, i8** %31
%33 = bitcast i8* %32 to double*
%34 = load i32, i32* %5
ret i32 %34
}

LLVM IR (-O2):
define i32 @enkf_wrapper_r8(i32 %0, i8** nocapture %1) {
%3 = bitcast i8** %1 to i32**
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = bitcast i8** %5 to i32**
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = bitcast i8** %8 to i32**
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = bitcast i8** %11 to double**
%13 = load double*, double** %12
%14 = getelementptr inbounds i8*, i8** %1, i64 4
%15 = bitcast i8** %14 to double**
%16 = load double*, double** %15
%17 = getelementptr inbounds i8*, i8** %1, i64 5
%18 = bitcast i8** %17 to double**
%19 = load double*, double** %18
%20 = getelementptr inbounds i8*, i8** %1, i64 6
%21 = bitcast i8** %20 to double**
%22 = load double*, double** %21
tail call void (i32*, i32*, i32*, double*, double*, double*, double*, ...) bitcast (void (...)* @enkf_driver_r8_ to void (i32*, i32*, i32*, double*, double*, double*, double*, ...)*)(i32* %4, i32* %7, i32* %10, double* %13, double* %16, double* %19, double* %22)
ret i32 undef
}