#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*/ printf(char *, ...);
char fn_ret_char(int i, double f, char c, char *s) {
  printf("%d\n", i);
  printf("%lf\n", f);
  printf("%c\n", c);
  printf("%s\n", s);
  return c;
}


x86 assembly (clang, -O0):
<fn_ret_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xebd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ret_char>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebx
movsd  %xmm0,(%rsp)
mov    %edi,%esi
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [5 x i8] c"%lf\0A\00"
@.str.2 = [4 x i8] c"%c\0A\00"
define signext i8 @fn_ret_char(i32 %0, double %1, i8 returned signext %2, i8* nocapture %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %1)
%7 = sext i8 %2 to i32
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i8 %2
}