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


x86 assembly (clang, -O0):
<fun_stub_base_6_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
movsbl -0x5(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
movsbl %al,%esi
call   1030 <fun_stub_base_6_stub@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_6_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   1040 <printf@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <fun_stub_base_6_stub@plt>
mov    %eax,%ebx
lea    0xed8(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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