#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(char *);
char *get_output_file(int *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
void c_show_output_file() {
  char *str;
  int pid;
  str = get_output_file(&pid);
  if (str == 0) {
    fprintf(stderr, "The output is not stored.\n");
    exit(-1);
  }
  printf("%s\n", str);
  free(str);
}


x86 assembly (clang, -O0):
<c_show_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1060 <get_output_file@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    118f <c_show_output_file+0x3f>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
lea    0xe80(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
mov    -0x8(%rbp),%rsi
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_show_output_file>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
call   1060 <get_output_file@plt>
test   %rax,%rax
je     1184 <c_show_output_file+0x34>
mov    %rax,%rbx
lea    0xead(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbx
ret
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
lea    0xe6c(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"The output is not stored.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @c_show_output_file() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* @get_output_file(i32* %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 -1)
unreachable
10: ; preds = %0
%11 = load i8*, i8** %1
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %1
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"The output is not stored.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @c_show_output_file() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i8* @get_output_file(i32* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%11 = call i32 @free(i8* %3)
ret void
}