#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void *stub1();
int rpn_fortran_callback_(char *VERB, void *callback(), char *OPTIONS,
                          int *Private_data, int *Private_data_2, int l_VERB,
                          int l_OPTIONS) {
  fprintf(stderr, "rpn_fortran_callback: VERB[1] = '%c'\n", VERB[1]);
  fprintf(stderr, "rpn_fortran_callback: OPTIONS[0] = '%c'\n", OPTIONS[0]);
  fprintf(stderr, "rpn_fortran_callback: Private_data   = %d\n", *Private_data);
  fprintf(stderr, "rpn_fortran_callback: Private_data_2 = %d\n",
          *Private_data_2);
  fprintf(stderr, "rpn_fortran_callback: l_VERB = %d \n", l_VERB);
  fprintf(stderr, "rpn_fortran_callback: l_OPTIONS = %d \n", l_OPTIONS);
  fprintf(stderr, "rpn_fortran_callback: Private_data_2 = %16.16p\n",
          Private_data_2);
  fprintf(stderr, "rpn_fortran_callback: Private_data   = %16.16p\n",
          Private_data);
  fprintf(stderr, "rpn_fortran_callback: OPTIONS        = %16.16p\n", OPTIONS);
  fprintf(stderr, "rpn_fortran_callback: callback       = %16.16p\n", callback);
  fprintf(stderr, "rpn_fortran_callback: VERB           = %16.16p\n", VERB);
  fprintf(stderr, "calling callback\n");
  *(callback)();
  return (0);
}


x86 assembly (clang, -O0):
<rpn_fortran_callback_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
movsbl (%rax),%edx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e2f(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
mov    0x10(%rbp),%edx
lea    0xef2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rdx
lea    0xefe(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xf13(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xf28(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xf3d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d8f(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xf52(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
lea    0xf6b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x0,%al
call   *-0x10(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpn_fortran_callback_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebp
mov    %r8,%rbx
mov    %rcx,%r13
mov    %rdx,%r12
mov    %rsi,(%rsp)
mov    %rdi,%r15
mov    0x2eab(%rip),%r14
mov    (%r14),%edi
movsbl 0x1(%r15),%edx
lea    0xebc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
movsbl (%r12),%edx
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    0x0(%r13),%edx
lea    0xee0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
mov    (%rbx),%edx
lea    0xef8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf12(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf23(%rip),%rsi
mov    0x40(%rsp),%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf35(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf51(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf6d(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf89(%rip),%rsi
mov    (%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xfa1(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xfbd(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
call   *%rbx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"rpn_fortran_callback: VERB[1] = '%c'\0A\00"
@.str.1 = [41 x i8] c"rpn_fortran_callback: OPTIONS[0] = '%c'\0A\00"
@.str.2 = [43 x i8] c"rpn_fortran_callback: Private_data = %d\0A\00"
@.str.3 = [43 x i8] c"rpn_fortran_callback: Private_data_2 = %d\0A\00"
@.str.4 = [36 x i8] c"rpn_fortran_callback: l_VERB = %d \0A\00"
@.str.5 = [39 x i8] c"rpn_fortran_callback: l_OPTIONS = %d \0A\00"
@.str.6 = [48 x i8] c"rpn_fortran_callback: Private_data_2 = %16.16p\0A\00"
@.str.7 = [48 x i8] c"rpn_fortran_callback: Private_data = %16.16p\0A\00"
@.str.8 = [48 x i8] c"rpn_fortran_callback: OPTIONS = %16.16p\0A\00"
@.str.9 = [48 x i8] c"rpn_fortran_callback: callback = %16.16p\0A\00"
@.str.10 = [48 x i8] c"rpn_fortran_callback: VERB = %16.16p\0A\00"
@.str.11 = [18 x i8] c"calling callback\0A\00"
define i32 @rpn_fortran_callback_(i8* %0, i8* (...)* %1, i8* %2, i32* %3, i32* %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i8* (...)*
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i8* (...)* %1, i8* (...)** %9
store i8* %2, i8** %10
store i32* %3, i32** %11
store i32* %4, i32** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %8
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = load i32, i32* @stderr
%22 = load i8*, i8** %10
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = load i32, i32* @stderr
%28 = load i32*, i32** %11
%29 = load i32, i32* %28
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %29)
%31 = load i32, i32* @stderr
%32 = load i32*, i32** %12
%33 = load i32, i32* %32
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = load i32, i32* @stderr
%36 = load i32, i32* %13
%37 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %36)
%38 = load i32, i32* @stderr
%39 = load i32, i32* %14
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %39)
%41 = load i32, i32* @stderr
%42 = load i32*, i32** %12
%43 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32* %42)
%44 = load i32, i32* @stderr
%45 = load i32*, i32** %11
%46 = call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0), i32* %45)
%47 = load i32, i32* @stderr
%48 = load i8*, i8** %10
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %48)
%50 = load i32, i32* @stderr
%51 = load i8* (...)*, i8* (...)** %9
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0), i8* (...)* %51)
%53 = load i32, i32* @stderr
%54 = load i8*, i8** %8
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i8* %54)
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%58 = load i8* (...)*, i8* (...)** %9
%59 = call i8* (...) %58()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"rpn_fortran_callback: VERB[1] = '%c'\0A\00"
@.str.1 = [41 x i8] c"rpn_fortran_callback: OPTIONS[0] = '%c'\0A\00"
@.str.2 = [43 x i8] c"rpn_fortran_callback: Private_data = %d\0A\00"
@.str.3 = [43 x i8] c"rpn_fortran_callback: Private_data_2 = %d\0A\00"
@.str.4 = [36 x i8] c"rpn_fortran_callback: l_VERB = %d \0A\00"
@.str.5 = [39 x i8] c"rpn_fortran_callback: l_OPTIONS = %d \0A\00"
@.str.6 = [48 x i8] c"rpn_fortran_callback: Private_data_2 = %16.16p\0A\00"
@.str.7 = [48 x i8] c"rpn_fortran_callback: Private_data = %16.16p\0A\00"
@.str.8 = [48 x i8] c"rpn_fortran_callback: OPTIONS = %16.16p\0A\00"
@.str.9 = [48 x i8] c"rpn_fortran_callback: callback = %16.16p\0A\00"
@.str.10 = [48 x i8] c"rpn_fortran_callback: VERB = %16.16p\0A\00"
@.str.11 = [18 x i8] c"calling callback\0A\00"
define i32 @rpn_fortran_callback_(i8* %0, i8* (...)* %1, i8* %2, i32* %3, i32* %4, i32 %5, i32 %6) {
%8 = load i32, i32* @stderr
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stderr
%14 = load i8, i8* %2
%15 = sext i8 %14 to i32
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = load i32, i32* @stderr
%18 = load i32, i32* %3
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @stderr
%21 = load i32, i32* %4
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %5)
%25 = load i32, i32* @stderr
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %6)
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0), i32* %4)
%29 = load i32, i32* @stderr
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0), i8* %2)
%33 = load i32, i32* @stderr
%34 = tail call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0), i8* (...)* %1)
%35 = load i32, i32* @stderr
%36 = tail call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i8* %0)
%37 = load i32, i32* @stderr
%38 = tail call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%39 = tail call i8* (...) %1()
ret i32 0
}