#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ShowHeader(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                              char *, char *, double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  double value;
  char ifname[20];
  char ofname[20] = "output.txt";
  FILE *input, *output;
  printf("File Name: ");
  scanf("%s", &ifname);
  ShowHeader(input, output, ifname, ofname, value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x40(%rbp)
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%rcx
movsd  -0x10(%rbp),%xmm0
call   1040 <ShowHeader@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rsp,%rcx
mov    %rbx,%rdx
call   1040 <ShowHeader@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.ofname = [20 x i8] c"output.txt\00\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"File Name: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = alloca i32*
%6 = alloca i32*
store i32 0, i32* %1
%7 = bitcast [20 x i8]* %4 to i8*
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = bitcast [20 x i8]* %3 to i8**
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %9)
%11 = load i32*, i32** %5
%12 = load i32*, i32** %6
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%15 = load double, double* %2
%16 = call i32 @ShowHeader(i32* %11, i32* %12, i8* %13, i8* %14, double %15)
ret i32 0
}

LLVM IR (-O2):
@__const.main.ofname = [20 x i8] c"output.txt\00\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"File Name: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = bitcast [20 x i8]* %1 to i8**
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %6)
%8 = call i32 @ShowHeader(i32* undef, i32* undef, i8* %3, i8* %4, double undef)
ret i32 0
}