#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*/ exist;

/* Variables and functions */
int /*<<< orphan*/ fit(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char const *);
int /*<<< orphan*/ sprintf(char *, char *, double, char *);
char *strcat(char *, char *);
int strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strncat(char *, char *, int);
int strncmp(char *, char *, int);
char *strncpy(char *, char const *, int);
int main(void) {
  char msg[] = "Things should be as simple as possible,"
               "but not simpler";
  char ninjas[] = "Fighting ninjas is ";
  char exist[13] = "I am ";
  char exist2[13];
  puts("strlen");
  puts(msg);
  fit(msg, 38);
  puts(msg);
  printf("The rest of the string: ");
  puts(msg + 39);
  puts("\nstr(n)cat");
  puts(strcat(ninjas, msg + 43));
  printf("%s is %d chars long with an array sizeof %d\n", exist, strlen(exist),
         sizeof(exist) / sizeof(exist[0]));
  puts(strncat(exist, msg + 39,
               (sizeof(exist) / sizeof(exist[0])) - strlen(exist)));
  puts("\nstr(n)cmp");
  printf("A to A: %d\n", strcmp("A", "A"));
  printf("A to B: %d\n", strcmp("A", "B"));
  printf("B to A: %d\n", strcmp("B", "A"));
  printf("[n = 5] apple to apples: %d\n", strncmp("apple", "apples", 5));
  printf("[n = 6] apple to apples: %d\n", strncmp("apple", "apples", 6));
  puts("\nstr(n)copy");
  strcpy(exist2, exist);
  puts(exist2);
  const char *orig = "beast";
  char copy[40] = "be the best that you can be.";
  char *ps;
  puts(orig);
  puts(copy);
  ps = strncpy(copy + 7, orig, 3);
  puts(copy);
  puts(ps);
  ps = strncpy(copy + 7, orig, 40 - 8);
  puts(copy);
  puts(ps);
  puts("\nsprintf");
  char charge[40];
  sprintf(charge, "You own $%.2f so pay up %s\n", 64.1239, "Billy Boy");
  puts(charge);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe33(%rip),%rsi
mov    $0x37,%edx
call   10b0 <memcpy@plt>
mov    0xe62(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe5f(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe5d(%rip),%eax
mov    %eax,-0x50(%rbp)
mov    0xe63(%rip),%rax
mov    %rax,-0x6d(%rbp)
mov    0xe61(%rip),%eax
mov    %eax,-0x65(%rbp)
mov    0xe5c(%rip),%al
mov    %al,-0x61(%rbp)
lea    0xe7e(%rip),%rdi
call   1060 <puts@plt>
lea    -0x40(%rbp),%rdi
call   1060 <puts@plt>
lea    -0x40(%rbp),%rdi
mov    $0x26,%esi
call   10d0 <fit@plt>
lea    -0x40(%rbp),%rdi
call   1060 <puts@plt>
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x40(%rbp),%rdi
add    $0x27,%rdi
call   1060 <puts@plt>
lea    0xe57(%rip),%rdi
call   1060 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    -0x40(%rbp),%rsi
add    $0x2b,%rsi
call   10c0 <strcat@plt>
mov    %rax,%rdi
call   1060 <puts@plt>
lea    -0x6d(%rbp),%rax
mov    %rax,-0xf8(%rbp)
lea    -0x6d(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0xf8(%rbp),%rsi
mov    %eax,%edx
lea    0xe20(%rip),%rdi
mov    $0xd,%ecx
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x6d(%rbp),%rax
mov    %rax,-0xf0(%rbp)
lea    -0x40(%rbp),%rax
add    $0x27,%rax
mov    %rax,-0xe8(%rbp)
lea    -0x6d(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0xf0(%rbp),%rdi
mov    -0xe8(%rbp),%rsi
movslq %eax,%rcx
mov    $0xd,%eax
sub    %rcx,%rax
mov    %eax,%edx
call   1090 <strncat@plt>
mov    %rax,%rdi
call   1060 <puts@plt>
lea    0xdef(%rip),%rdi
call   1060 <puts@plt>
lea    0xdfa(%rip),%rsi
mov    %rsi,%rdi
call   10a0 <strcmp@plt>
mov    %eax,%esi
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xddb(%rip),%rdi
lea    0xde2(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %eax,%esi
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xdc6(%rip),%rdi
lea    0xdb1(%rip),%rsi
call   10a0 <strcmp@plt>
mov    %eax,%esi
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xdce(%rip),%rdi
lea    0xdcd(%rip),%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
mov    %eax,%esi
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xda6(%rip),%rdi
lea    0xda5(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
mov    %eax,%esi
lea    0xd99(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    0xda8(%rip),%rdi
call   1060 <puts@plt>
lea    -0x7a(%rbp),%rdi
lea    -0x6d(%rbp),%rsi
call   1050 <strcpy@plt>
lea    -0x7a(%rbp),%rdi
call   1060 <puts@plt>
lea    0xd92(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xc77(%rip),%rsi
mov    $0x28,%edx
call   10b0 <memcpy@plt>
mov    -0x88(%rbp),%rdi
call   1060 <puts@plt>
lea    -0xb0(%rbp),%rdi
call   1060 <puts@plt>
lea    -0xb0(%rbp),%rdi
add    $0x7,%rdi
mov    -0x88(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %rax,-0xb8(%rbp)
lea    -0xb0(%rbp),%rdi
call   1060 <puts@plt>
mov    -0xb8(%rbp),%rdi
call   1060 <puts@plt>
lea    -0xb0(%rbp),%rdi
add    $0x7,%rdi
mov    -0x88(%rbp),%rsi
mov    $0x20,%edx
call   1030 <strncpy@plt>
mov    %rax,-0xb8(%rbp)
lea    -0xb0(%rbp),%rdi
call   1060 <puts@plt>
mov    -0xb8(%rbp),%rdi
call   1060 <puts@plt>
lea    0xce4(%rip),%rdi
call   1060 <puts@plt>
lea    -0xe0(%rbp),%rdi
lea    0xcda(%rip),%rsi
movsd  0xb3d(%rip),%xmm0
lea    0xce7(%rip),%rdx
call   10e0 <sprintf@plt>
lea    -0xe0(%rbp),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xd8,%rsp
movaps 0xe7b(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe5f(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe43(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x72656c706d6973,%rax
mov    %rax,0x5f(%rsp)
movaps 0xe68(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x207369,0x20(%rsp)
movabs $0x206d612049,%rax
mov    %rax,(%rsp)
movq   $0x0,0x5(%rsp)
lea    0xe95(%rip),%rdi
call   1060 <puts@plt>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
mov    $0x26,%esi
call   10b0 <fit@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
lea    0xe6e(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0x57(%rsp),%r14
mov    %r14,%rdi
call   1060 <puts@plt>
lea    0xe6c(%rip),%rdi
call   1060 <puts@plt>
lea    0x5b(%rsp),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
mov    %rsp,%r15
mov    %r15,%rdi
call   1070 <strlen@plt>
lea    0xe46(%rip),%rdi
mov    $0xd,%ecx
mov    %r15,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
call   1070 <strlen@plt>
mov    $0xd,%edx
sub    %eax,%edx
mov    %r15,%rdi
mov    %r14,%rsi
call   1090 <strncat@plt>
mov    %rax,%rdi
call   1060 <puts@plt>
lea    0xe39(%rip),%rdi
call   1060 <puts@plt>
lea    0xe38(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xe43(%rip),%rbx
lea    0xe42(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x5,%edx
call   1040 <strncmp@plt>
lea    0xe08(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
lea    0xe12(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xe1f(%rip),%rdi
call   1060 <puts@plt>
lea    0xa3(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcpy@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
movaps 0xd12(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xcf3(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movq   $0x0,0x90(%rsp)
lea    0xddd(%rip),%r12
mov    %r12,%rdi
call   1060 <puts@plt>
lea    0x70(%rsp),%r14
mov    %r14,%rdi
call   1060 <puts@plt>
lea    0x77(%rsp),%r15
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x20,%edx
call   1030 <strncpy@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1060 <puts@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
lea    0xd7c(%rip),%rdi
call   1060 <puts@plt>
lea    0xd79(%rip),%rsi
lea    0xd8e(%rip),%rdx
lea    0xb0(%rsp),%rbx
movsd  0xbd1(%rip),%xmm0
mov    %rbx,%rdi
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <puts@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.msg = [55 x i8] c"Things should be as simple as possible,but not simpler\00"
@__const.main.ninjas = [20 x i8] c"Fighting ninjas is \00"
@__const.main.exist = [13 x i8] c"I am \00\00\00\00\00\00\00\00"
@.str = [7 x i8] c"strlen\00"
@.str.1 = [25 x i8] c"The rest of the string: \00"
@.str.2 = [11 x i8] c"\0Astr(n)cat\00"
@.str.3 = [45 x i8] c"%s is %d chars long with an array sizeof %d\0A\00"
@.str.4 = [11 x i8] c"\0Astr(n)cmp\00"
@.str.5 = [12 x i8] c"A to A: %d\0A\00"
@.str.6 = [2 x i8] c"A\00"
@.str.7 = [12 x i8] c"A to B: %d\0A\00"
@.str.8 = [2 x i8] c"B\00"
@.str.9 = [12 x i8] c"B to A: %d\0A\00"
@.str.10 = [29 x i8] c"[n = 5] apple to apples: %d\0A\00"
@.str.11 = [6 x i8] c"apple\00"
@.str.12 = [7 x i8] c"apples\00"
@.str.13 = [29 x i8] c"[n = 6] apple to apples: %d\0A\00"
@.str.14 = [12 x i8] c"\0Astr(n)copy\00"
@.str.15 = [6 x i8] c"beast\00"
@__const.main.copy = [40 x i8] c"be the best that you can be.\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.16 = [9 x i8] c"\0Asprintf\00"
@.str.17 = [28 x i8] c"You own $%.2f so pay up %s\0A\00"
@.str.18 = [10 x i8] c"Billy Boy\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [55 x i8]
%3 = alloca [20 x i8]
%4 = alloca [13 x i8]
%5 = alloca [13 x i8]
%6 = alloca i8*
%7 = alloca [40 x i8]
%8 = alloca i8*
%9 = alloca [40 x i8]
store i32 0, i32* %1
%10 = bitcast [55 x i8]* %2 to i8*
%11 = bitcast [20 x i8]* %3 to i8*
%12 = bitcast [13 x i8]* %4 to i8*
%13 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%15 = call i32 @puts(i8* %14)
%16 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%17 = call i32 @fit(i8* %16, i32 38)
%18 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%19 = call i32 @puts(i8* %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%21 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%22 = getelementptr inbounds i8, i8* %21, i64 39
%23 = call i32 @puts(i8* %22)
%24 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%26 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%27 = getelementptr inbounds i8, i8* %26, i64 43
%28 = call i8* @strcat(i8* %25, i8* %27)
%29 = call i32 @puts(i8* %28)
%30 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%31 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%32 = call i32 @strlen(i8* %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %30, i32 %32, i64 13)
%34 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%35 = getelementptr inbounds [55 x i8], [55 x i8]* %2, i64 0, i64 0
%36 = getelementptr inbounds i8, i8* %35, i64 39
%37 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%38 = call i32 @strlen(i8* %37)
%39 = sext i32 %38 to i64
%40 = sub i64 13, %39
%41 = trunc i64 %40 to i32
%42 = call i8* @strncat(i8* %34, i8* %36, i32 %41)
%43 = call i32 @puts(i8* %42)
%44 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %45)
%47 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 %47)
%49 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %49)
%51 = call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 5)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i32 %51)
%53 = call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 6)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i32 %53)
%55 = call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%56 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 0
%57 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%58 = call i32 @strcpy(i8* %56, i8* %57)
%59 = getelementptr inbounds [13 x i8], [13 x i8]* %5, i64 0, i64 0
%60 = call i32 @puts(i8* %59)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i8** %6
%61 = bitcast [40 x i8]* %7 to i8*
%62 = load i8*, i8** %6
%63 = call i32 @puts(i8* %62)
%64 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%65 = call i32 @puts(i8* %64)
%66 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%67 = getelementptr inbounds i8, i8* %66, i64 7
%68 = load i8*, i8** %6
%69 = call i8* @strncpy(i8* %67, i8* %68, i32 3)
store i8* %69, i8** %8
%70 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%71 = call i32 @puts(i8* %70)
%72 = load i8*, i8** %8
%73 = call i32 @puts(i8* %72)
%74 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%75 = getelementptr inbounds i8, i8* %74, i64 7
%76 = load i8*, i8** %6
%77 = call i8* @strncpy(i8* %75, i8* %76, i32 32)
store i8* %77, i8** %8
%78 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%79 = call i32 @puts(i8* %78)
%80 = load i8*, i8** %8
%81 = call i32 @puts(i8* %80)
%82 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%83 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%84 = call i32 @sprintf(i8* %83, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0), double 6.412390e+01, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%85 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%86 = call i32 @puts(i8* %85)
ret i32 0
}

LLVM IR (-O2):
@__const.main.msg = [55 x i8] c"Things should be as simple as possible,but not simpler\00"
@__const.main.ninjas = [20 x i8] c"Fighting ninjas is \00"
@__const.main.exist = [13 x i8] c"I am \00\00\00\00\00\00\00\00"
@.str = [7 x i8] c"strlen\00"
@.str.1 = [25 x i8] c"The rest of the string: \00"
@.str.2 = [11 x i8] c"\0Astr(n)cat\00"
@.str.3 = [45 x i8] c"%s is %d chars long with an array sizeof %d\0A\00"
@.str.4 = [11 x i8] c"\0Astr(n)cmp\00"
@.str.5 = [12 x i8] c"A to A: %d\0A\00"
@.str.7 = [12 x i8] c"A to B: %d\0A\00"
@.str.9 = [12 x i8] c"B to A: %d\0A\00"
@.str.10 = [29 x i8] c"[n = 5] apple to apples: %d\0A\00"
@.str.11 = [6 x i8] c"apple\00"
@.str.12 = [7 x i8] c"apples\00"
@.str.13 = [29 x i8] c"[n = 6] apple to apples: %d\0A\00"
@.str.14 = [12 x i8] c"\0Astr(n)copy\00"
@.str.15 = [6 x i8] c"beast\00"
@__const.main.copy = [40 x i8] c"be the best that you can be.\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.16 = [9 x i8] c"\0Asprintf\00"
@.str.17 = [28 x i8] c"You own $%.2f so pay up %s\0A\00"
@.str.18 = [10 x i8] c"Billy Boy\00"
define i32 @main() {
%1 = alloca [55 x i8]
%2 = alloca [20 x i8]
%3 = alloca [13 x i8]
%4 = alloca [13 x i8]
%5 = alloca [40 x i8]
%6 = alloca [40 x i8]
%7 = getelementptr inbounds [55 x i8], [55 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @puts(i8* %7)
%13 = call i32 @fit(i8* %7, i32 38)
%14 = call i32 @puts(i8* %7)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds [55 x i8], [55 x i8]* %1, i64 0, i64 39
%17 = call i32 @puts(i8* %16)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%19 = getelementptr inbounds [55 x i8], [55 x i8]* %1, i64 0, i64 43
%20 = call i8* @strcat(i8* %8, i8* %19)
%21 = call i32 @puts(i8* %8)
%22 = call i32 @strlen(i8* %9)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %9, i32 %22, i64 13)
%24 = call i32 @strlen(i8* %9)
%25 = sub i32 13, %24
%26 = call i8* @strncat(i8* %9, i8* %16, i32 %25)
%27 = call i32 @puts(i8* dereferenceable(1) %26)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 0)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32 -1)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 1)
%32 = call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 5)
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0), i32 %32)
%34 = call i32 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i32 6)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0), i32 %34)
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
%37 = call i32 @strcpy(i8* %10, i8* %9)
%38 = call i32 @puts(i8* %10)
%39 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%41 = call i32 @puts(i8* %39)
%42 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 7
%43 = call i8* @strncpy(i8* %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 3)
%44 = call i32 @puts(i8* %39)
%45 = call i32 @puts(i8* dereferenceable(1) %43)
%46 = call i8* @strncpy(i8* %42, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0), i32 32)
%47 = call i32 @puts(i8* %39)
%48 = call i32 @puts(i8* dereferenceable(1) %46)
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%50 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%51 = call i32 @sprintf(i8* %50, i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.17, i64 0, i64 0), double 6.412390e+01, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%52 = call i32 @puts(i8* %50)
ret i32 0
}