#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 _ctype(int /*<<< orphan*/ *);
int _errno(int /*<<< orphan*/ *);
int _float(int /*<<< orphan*/ *);
int _limits(int /*<<< orphan*/ *);
int _math(int /*<<< orphan*/ *);
int _stdlib(int /*<<< orphan*/ *);
int _string(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int main() {
  FILE *output = fopen("gcc.txt", "a");
  fprintf(output, "%u\n", _ctype(output));
  fprintf(output, "%u\n", _errno(output));
  fprintf(output, "%u\n", _float(output));
  fprintf(output, "%u\n", _limits(output));
  fprintf(output, "%u\n", _math(output));
  fprintf(output, "%u\n", _stdlib(output));
  fprintf(output, "%u\n", _string(output));
  fclose(output);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe4a(%rip),%rdi
lea    0xe4b(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <_ctype@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%edx
lea    0xe26(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <_errno@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
lea    0xe03(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <_float@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
lea    0xde0(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_limits@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
lea    0xdbd(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <_math@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
lea    0xd9a(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <_stdlib@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
lea    0xd77(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <_string@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
lea    0xd54(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xe55(%rip),%rdi
lea    0xe56(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <_ctype@plt>
lea    0xe41(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   10a0 <_errno@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   10b0 <_float@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <_limits@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1070 <_math@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1090 <_stdlib@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <_string@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"gcc.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @_ctype(i32* %5)
%7 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %2
%9 = load i32*, i32** %2
%10 = call i32 @_errno(i32* %9)
%11 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = load i32*, i32** %2
%13 = load i32*, i32** %2
%14 = call i32 @_float(i32* %13)
%15 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = load i32*, i32** %2
%17 = load i32*, i32** %2
%18 = call i32 @_limits(i32* %17)
%19 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32*, i32** %2
%21 = load i32*, i32** %2
%22 = call i32 @_math(i32* %21)
%23 = call i32 @fprintf(i32* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = load i32*, i32** %2
%25 = load i32*, i32** %2
%26 = call i32 @_stdlib(i32* %25)
%27 = call i32 @fprintf(i32* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %26)
%28 = load i32*, i32** %2
%29 = load i32*, i32** %2
%30 = call i32 @_string(i32* %29)
%31 = call i32 @fprintf(i32* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %30)
%32 = load i32*, i32** %2
%33 = call i32 @fclose(i32* %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"gcc.txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @_ctype(i32* %1)
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 @_errno(i32* %1)
%5 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = tail call i32 @_float(i32* %1)
%7 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = tail call i32 @_limits(i32* %1)
%9 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = tail call i32 @_math(i32* %1)
%11 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %10)
%12 = tail call i32 @_stdlib(i32* %1)
%13 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %12)
%14 = tail call i32 @_string(i32* %1)
%15 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = tail call i32 @fclose(i32* %1)
ret i32 0
}