#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ new_free();
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ transform_stream();
int /*<<< orphan*/ writable_stream();
int main(void) {
  fputs("\n\x1b[34m# [stream] "
        "new_free"
        "\x1b[0m\n",
        stderr);
  new_free();
  ;
  fputs("\n\x1b[34m# [stream] "
        "writable_stream"
        "\x1b[0m\n",
        stderr);
  writable_stream();
  ;
  fputs("\n\x1b[34m# [stream] "
        "transform_stream"
        "\x1b[0m\n",
        stderr);
  transform_stream();
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1050 <new_free@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%esi
lea    0xea4(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1060 <writable_stream@plt>
mov    0x2e52(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <transform_stream@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2e98(%rip),%rbx
mov    (%rbx),%esi
lea    0xeaf(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1050 <new_free@plt>
mov    (%rbx),%esi
lea    0xeb9(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1060 <writable_stream@plt>
mov    (%rbx),%esi
lea    0xeca(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <transform_stream@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\0A\1B[34m# [stream] new_free\1B[0m\0A\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"\0A\1B[34m# [stream] writable_stream\1B[0m\0A\00"
@.str.2 = [39 x i8] c"\0A\1B[34m# [stream] transform_stream\1B[0m\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @new_free()
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @writable_stream()
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @transform_stream()
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\0A\1B[34m# [stream] new_free\1B[0m\0A\00"
@stderr = global i32 0
@.str.1 = [38 x i8] c"\0A\1B[34m# [stream] writable_stream\1B[0m\0A\00"
@.str.2 = [39 x i8] c"\0A\1B[34m# [stream] transform_stream\1B[0m\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @new_free()
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @writable_stream()
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @transform_stream()
ret i32 0
}