#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*/ fprintf(int /*<<< orphan*/ *, char *, char *, char const *,
                           char *, char *, char *, char *, char *, char *,
                           char *, char *, char *, char *, char *, char *,
                           char *, char *, char *, char *, char *, char *,
                           char *, char *, char *, char *, char *, char *,
                           char *, char *, char *);
void make_template_top(FILE *f, const char *source_name) {
  fprintf(f,
          "%s%s%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%"
          "s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",
          "    .file   \"", source_name, "\"", "    .comm   tape,4000,32",
          "    .globl  i", "    .data", "    .align 8",
          "    .type   i, @object", "    .size   i, 8",
          "i:", "    .quad   tape", "    .text", "    .globl  main",
          "    .type   main, @function",
          ".LC0:", "    .string \"stty -icanon\"", "    .text",
          "    .globl  main", "    .type   main, @function",
          "main:", ".LFB0:", "    .cfi_startproc", "    pushq   %rbp",
          "    .cfi_def_cfa_offset 16", "    .cfi_offset 6, -16",
          "    movq    %rsp, %rbp", "    .cfi_def_cfa_register 6",
          "    movl    $.LC0, %edi", "    call    system");
}


x86 assembly (clang, -O0):
<make_template_top>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rcx
lea    0xec5(%rip),%rsi
lea    0xf14(%rip),%rdx
lea    0xf19(%rip),%r8
lea    0xf14(%rip),%r9
lea    0xf26(%rip),%rax
mov    %rax,-0xb0(%rbp)
lea    0xf26(%rip),%rax
mov    %rax,-0xa8(%rbp)
lea    0xf22(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xf21(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xf2a(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xf2d(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xf22(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    0xf28(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xf27(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xf2d(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xf3e(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    0xf39(%rip),%rax
mov    %rax,-0x70(%rbp)
lea    0xf49(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xf44(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xf40(%rip),%r13
lea    0xf4c(%rip),%r12
lea    0xf56(%rip),%r15
lea    0xf6a(%rip),%r14
lea    0xf7a(%rip),%rbx
lea    0xf8a(%rip),%r11
lea    0xf9f(%rip),%r10
lea    0xfb0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rax,(%rsp)
mov    -0xa8(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0xa0(%rbp),%rax
mov    %rax,0x10(%rsp)
mov    -0x98(%rbp),%rax
mov    %rax,0x18(%rsp)
mov    -0x90(%rbp),%rax
mov    %rax,0x20(%rsp)
mov    -0x88(%rbp),%rax
mov    %rax,0x28(%rsp)
mov    -0x80(%rbp),%rax
mov    %rax,0x30(%rsp)
mov    -0x68(%rbp),%rax
mov    %rax,0x38(%rsp)
mov    -0x60(%rbp),%rax
mov    %rax,0x40(%rsp)
mov    -0x58(%rbp),%rax
mov    %rax,0x48(%rsp)
mov    -0x78(%rbp),%rax
mov    %rax,0x50(%rsp)
mov    -0x70(%rbp),%rax
mov    %rax,0x58(%rsp)
mov    -0x68(%rbp),%rax
mov    %rax,0x60(%rsp)
mov    -0x60(%rbp),%rax
mov    %rax,0x68(%rsp)
mov    -0x58(%rbp),%rax
mov    %rax,0x70(%rsp)
mov    -0x50(%rbp),%rax
mov    %rax,0x78(%rsp)
mov    -0x48(%rbp),%rax
mov    %rax,0x80(%rsp)
mov    -0x40(%rbp),%rax
mov    %r13,0x88(%rsp)
mov    %r12,0x90(%rsp)
mov    %r15,0x98(%rsp)
mov    %r14,0xa0(%rsp)
mov    %rbx,0xa8(%rsp)
mov    %r11,0xb0(%rsp)
mov    %r10,0xb8(%rsp)
mov    %rax,0xc0(%rsp)
call   1030 <fprintf@plt>
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_template_top>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rcx
sub    $0x8,%rsp
lea    0x10bb(%rip),%r11
lea    0x109c(%rip),%r14
lea    0x1079(%rip),%r15
lea    0x105b(%rip),%r12
lea    0x103d(%rip),%r13
lea    0x101b(%rip),%rbp
lea    0xfa6(%rip),%rax
lea    0xf8e(%rip),%r10
lea    0xf7d(%rip),%rbx
lea    0xe98(%rip),%rsi
lea    0xee7(%rip),%rdx
lea    0xeec(%rip),%r8
lea    0xee7(%rip),%r9
push   %r11
push   %r14
push   %r15
push   %r12
push   %r13
push   %rbp
lea    0xfc7(%rip),%rbp
push   %rbp
lea    0xfac(%rip),%rbp
push   %rbp
lea    0xf9d(%rip),%rbp
push   %rbp
lea    0xf8f(%rip),%rbp
push   %rbp
push   %rax
push   %r10
push   %rbx
lea    0xf68(%rip),%rbp
push   %rbp
lea    0xf5a(%rip),%rbp
push   %rbp
push   %rax
push   %r10
push   %rbx
lea    0xf06(%rip),%rax
push   %rax
lea    0xefb(%rip),%rax
push   %rax
lea    0xee2(%rip),%rax
push   %rax
lea    0xec3(%rip),%rax
push   %rax
lea    0xeae(%rip),%rax
push   %rax
lea    0xe9c(%rip),%rax
push   %rax
lea    0xe86(%rip),%rax
push   %rax
call   1030 <fprintf@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [86 x i8] c"%s%s%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A\00"
@.str.1 = [14 x i8] c" .file \22\00"
@.str.2 = [2 x i8] c"\22\00"
@.str.3 = [25 x i8] c" .comm tape,4000,32\00"
@.str.4 = [14 x i8] c" .globl i\00"
@.str.5 = [10 x i8] c" .data\00"
@.str.6 = [13 x i8] c" .align 8\00"
@.str.7 = [23 x i8] c" .type i, @object\00"
@.str.8 = [17 x i8] c" .size i, 8\00"
@.str.9 = [3 x i8] c"i:\00"
@.str.10 = [17 x i8] c" .quad tape\00"
@.str.11 = [10 x i8] c" .text\00"
@.str.12 = [17 x i8] c" .globl main\00"
@.str.13 = [28 x i8] c" .type main, @function\00"
@.str.14 = [6 x i8] c".LC0:\00"
@.str.15 = [27 x i8] c" .string \22stty -icanon\22\00"
@.str.16 = [6 x i8] c"main:\00"
@.str.17 = [7 x i8] c".LFB0:\00"
@.str.18 = [19 x i8] c" .cfi_startproc\00"
@.str.19 = [17 x i8] c" pushq %rbp\00"
@.str.20 = [27 x i8] c" .cfi_def_cfa_offset 16\00"
@.str.21 = [23 x i8] c" .cfi_offset 6, -16\00"
@.str.22 = [23 x i8] c" movq %rsp, %rbp\00"
@.str.23 = [28 x i8] c" .cfi_def_cfa_register 6\00"
@.str.24 = [24 x i8] c" movl $.LC0, %edi\00"
@.str.25 = [19 x i8] c" call system\00"
define void @make_template_top(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [86 x i8] c"%s%s%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A%s\0A\00"
@.str.1 = [14 x i8] c" .file \22\00"
@.str.2 = [2 x i8] c"\22\00"
@.str.3 = [25 x i8] c" .comm tape,4000,32\00"
@.str.4 = [14 x i8] c" .globl i\00"
@.str.5 = [10 x i8] c" .data\00"
@.str.6 = [13 x i8] c" .align 8\00"
@.str.7 = [23 x i8] c" .type i, @object\00"
@.str.8 = [17 x i8] c" .size i, 8\00"
@.str.9 = [3 x i8] c"i:\00"
@.str.10 = [17 x i8] c" .quad tape\00"
@.str.11 = [10 x i8] c" .text\00"
@.str.12 = [17 x i8] c" .globl main\00"
@.str.13 = [28 x i8] c" .type main, @function\00"
@.str.14 = [6 x i8] c".LC0:\00"
@.str.15 = [27 x i8] c" .string \22stty -icanon\22\00"
@.str.16 = [6 x i8] c"main:\00"
@.str.17 = [7 x i8] c".LFB0:\00"
@.str.18 = [19 x i8] c" .cfi_startproc\00"
@.str.19 = [17 x i8] c" pushq %rbp\00"
@.str.20 = [27 x i8] c" .cfi_def_cfa_offset 16\00"
@.str.21 = [23 x i8] c" .cfi_offset 6, -16\00"
@.str.22 = [23 x i8] c" movq %rsp, %rbp\00"
@.str.23 = [28 x i8] c" .cfi_def_cfa_register 6\00"
@.str.24 = [24 x i8] c" movl $.LC0, %edi\00"
@.str.25 = [19 x i8] c" call system\00"
define void @make_template_top(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.20, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.25, i64 0, i64 0))
ret void
}