#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 fun_stub_base_13_stub(long long, int, long long);
int /*<<< orphan*/ printf(char *, int, ...);
int fun_stub_base_13_call(long long a, int b, long long c) {
  printf("fun_stub_base_13_call:a = %lld, b = %d, c = %lld\n", a, b, c);
  int x = fun_stub_base_13_stub(a, b, c);
  printf("fun_stub_base_13_stub return %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<fun_stub_base_13_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <fun_stub_base_13_stub@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_13_call>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1040 <fun_stub_base_13_stub@plt>
mov    %eax,%ebx
lea    0xedb(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"fun_stub_base_13_call:a = %lld, b = %d, c = %lld\0A\00"
@.str.1 = [33 x i8] c"fun_stub_base_13_stub return %d\0A\00"
define i32 @fun_stub_base_13_call(i64 %0, i32 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = load i32, i32* %5
%11 = load i64, i64* %6
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i64 %11)
%13 = load i64, i64* %4
%14 = load i32, i32* %5
%15 = load i64, i64* %6
%16 = call i32 @fun_stub_base_13_stub(i64 %13, i32 %14, i64 %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [50 x i8] c"fun_stub_base_13_call:a = %lld, b = %d, c = %lld\0A\00"
@.str.1 = [33 x i8] c"fun_stub_base_13_stub return %d\0A\00"
define i32 @fun_stub_base_13_call(i64 %0, i32 %1, i64 %2) {
%4 = trunc i64 %0 to i32
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %1, i64 %2)
%6 = tail call i32 @fun_stub_base_13_stub(i64 %0, i32 %1, i64 %2)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 %6
}