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


x86 assembly (clang, -O0):
<fun_stub_base_5_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x1(%rbp),%esi
mov    -0x8(%rbp),%edx
movsbl -0x9(%rbp),%ecx
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
movsbl %al,%edi
movsbl -0x9(%rbp),%edx
call   1040 <fun_stub_base_5_stub@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_5_call>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xece(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <fun_stub_base_5_stub@plt>
mov    %eax,%ebx
lea    0xed8(%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 = [45 x i8] c"fun_stub_base_5_call:a = %d, b = %d, c = %d\0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_5_stub return %d\0A\00"
define i32 @fun_stub_base_5_call(i8 signext %0, i32 %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = load i32, i32* %5
%11 = load i8, i8* %6
%12 = sext i8 %11 to i32
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %12)
%14 = load i8, i8* %4
%15 = load i32, i32* %5
%16 = load i8, i8* %6
%17 = call i32 @fun_stub_base_5_stub(i8 signext %14, i32 %15, i8 signext %16)
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@.str = [45 x i8] c"fun_stub_base_5_call:a = %d, b = %d, c = %d\0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_5_stub return %d\0A\00"
define i32 @fun_stub_base_5_call(i8 signext %0, i32 %1, i8 signext %2) {
%4 = sext i8 %0 to i32
%5 = sext i8 %2 to i32
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %1, i32 %5)
%7 = tail call i32 @fun_stub_base_5_stub(i8 signext %0, i32 %1, i8 signext %2)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 %7
}