#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ make_readme(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               char *);
int main() {
  FILE *in, *out = fopen("readme", "w");
  fprintf(out, "Okay, you can use this code -- \"keys\".\n");
  fprintf(out, "You can know how to use it by these commets:\n\n");
  fprintf(out, "Warning!!\n");
  fprintf(out, "\tIf you use \"make clean\" to uninstall this code,\n");
  fprintf(out, "\tyou will delete \"token.txt\" and \"data.txt\".\n\n");
  in = fopen("put_token.c", "r");
  make_readme(in, out, "put_token.c");
  fclose(in);
  in = fopen("put.c", "r");
  make_readme(in, out, "put.c");
  fclose(in);
  in = fopen("get.c", "r");
  make_readme(in, out, "get.c");
  fclose(in);
  fclose(out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
lea    0xeec(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xf0f(%rip),%rdi
lea    0xf14(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xef0(%rip),%rdx
call   1050 <make_readme@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xee9(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xeca(%rip),%rdx
call   1050 <make_readme@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xebb(%rip),%rdi
lea    0xeac(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe9c(%rip),%rdx
call   1050 <make_readme@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xeb1(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r12
lea    0xea4(%rip),%rdi
mov    $0x27,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
lea    0xeb3(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fwrite@plt>
lea    0xec9(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fwrite@plt>
lea    0xebb(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fwrite@plt>
lea    0xed4(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %r12,%rcx
call   1060 <fwrite@plt>
lea    0xeea(%rip),%r15
lea    0xeef(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1040 <make_readme@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xec6(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1040 <make_readme@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xea1(%rip),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1040 <make_readme@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r12,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"readme\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [40 x i8] c"Okay, you can use this code -- \22keys\22.\0A\00"
@.str.3 = [47 x i8] c"You can know how to use it by these commets:\0A\0A\00"
@.str.4 = [11 x i8] c"Warning!!\0A\00"
@.str.5 = [50 x i8] c"\09If you use \22make clean\22 to uninstall this code,\0A\00"
@.str.6 = [47 x i8] c"\09you will delete \22token.txt\22 and \22data.txt\22.\0A\0A\00"
@.str.7 = [12 x i8] c"put_token.c\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [6 x i8] c"put.c\00"
@.str.10 = [6 x i8] c"get.c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32*, i32** %3
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32*, i32** %3
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32*, i32** %3
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %15, i32** %2
%16 = load i32*, i32** %2
%17 = load i32*, i32** %3
%18 = call i32 @make_readme(i32* %16, i32* %17, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 @fclose(i32* %19)
%21 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %21, i32** %2
%22 = load i32*, i32** %2
%23 = load i32*, i32** %3
%24 = call i32 @make_readme(i32* %22, i32* %23, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%25 = load i32*, i32** %2
%26 = call i32 @fclose(i32* %25)
%27 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %27, i32** %2
%28 = load i32*, i32** %2
%29 = load i32*, i32** %3
%30 = call i32 @make_readme(i32* %28, i32* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%31 = load i32*, i32** %2
%32 = call i32 @fclose(i32* %31)
%33 = load i32*, i32** %3
%34 = call i32 @fclose(i32* %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"readme\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [40 x i8] c"Okay, you can use this code -- \22keys\22.\0A\00"
@.str.3 = [47 x i8] c"You can know how to use it by these commets:\0A\0A\00"
@.str.4 = [11 x i8] c"Warning!!\0A\00"
@.str.5 = [50 x i8] c"\09If you use \22make clean\22 to uninstall this code,\0A\00"
@.str.6 = [47 x i8] c"\09you will delete \22token.txt\22 and \22data.txt\22.\0A\0A\00"
@.str.7 = [12 x i8] c"put_token.c\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [6 x i8] c"put.c\00"
@.str.10 = [6 x i8] c"get.c\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([7 x i8], [7 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 i64 @fwrite(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 39, i64 1, i32* %1)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i64 46, i64 1, i32* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i64 10, i64 1, i32* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0), i64 49, i64 1, i32* %1)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i64 46, i64 1, i32* %1)
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%8 = tail call i32 @make_readme(i32* %7, i32* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @fclose(i32* %7)
%10 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%11 = tail call i32 @make_readme(i32* %10, i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
%12 = tail call i32 @fclose(i32* %10)
%13 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%14 = tail call i32 @make_readme(i32* %13, i32* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%15 = tail call i32 @fclose(i32* %13)
%16 = tail call i32 @fclose(i32* %1)
ret i32 0
}