#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 begins(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, int);
int main() {
  char s1[100] = "a";
  char s2[100] = "abracadabra";
  printf("%s, %s, %i\n", s1, s2, begins(s1, s2));
  char s3[100] = "booster";
  char s4[100] = "booster seat";
  printf("%s, %s, %i\n", s3, s4, begins(s3, s4));
  char s5[100] = "tennis";
  char s6[100] = "hockey";
  printf("%s, %s, %i\n", s5, s6, begins(s5, s6));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x61,-0x70(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x64,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0x2d0(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0x2c8(%rbp)
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1060 <begins@plt>
mov    -0x2d0(%rbp),%rsi
mov    -0x2c8(%rbp),%rdx
mov    %eax,%ecx
lea    0xf86(%rip),%rdi
call   1030 <printf@plt>
lea    -0x150(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x64,%edx
call   1050 <memcpy@plt>
lea    -0x1c0(%rbp),%rdi
lea    0xef7(%rip),%rsi
mov    $0x64,%edx
call   1050 <memcpy@plt>
lea    -0x150(%rbp),%rax
mov    %rax,-0x2c0(%rbp)
lea    -0x1c0(%rbp),%rax
mov    %rax,-0x2b8(%rbp)
lea    -0x150(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1060 <begins@plt>
mov    -0x2c0(%rbp),%rsi
mov    -0x2b8(%rbp),%rdx
mov    %eax,%ecx
lea    0xf0b(%rip),%rdi
call   1030 <printf@plt>
lea    -0x230(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x74,-0x230(%rbp)
movb   $0x65,-0x22f(%rbp)
movb   $0x6e,-0x22e(%rbp)
movb   $0x6e,-0x22d(%rbp)
movb   $0x69,-0x22c(%rbp)
movb   $0x73,-0x22b(%rbp)
lea    -0x2a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x68,-0x2a0(%rbp)
movb   $0x6f,-0x29f(%rbp)
movb   $0x63,-0x29e(%rbp)
movb   $0x6b,-0x29d(%rbp)
movb   $0x65,-0x29c(%rbp)
movb   $0x79,-0x29b(%rbp)
lea    -0x230(%rbp),%rax
mov    %rax,-0x2b0(%rbp)
lea    -0x2a0(%rbp),%rax
mov    %rax,-0x2a8(%rbp)
lea    -0x230(%rbp),%rdi
lea    -0x2a0(%rbp),%rsi
call   1060 <begins@plt>
mov    -0x2b0(%rbp),%rsi
mov    -0x2a8(%rbp),%rdx
mov    %eax,%ecx
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2a0,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movl   $0x0,0x140(%rsp)
movb   $0x61,0xe0(%rsp)
61
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x280(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,0x270(%rsp)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x260(%rsp)
movaps 0xe7a(%rip),%xmm0
movaps %xmm0,0x250(%rsp)
movaps 0xe5b(%rip),%xmm0
movaps %xmm0,0x240(%rsp)
movaps 0xe3c(%rip),%xmm0
movaps %xmm0,0x230(%rsp)
movl   $0x0,0x290(%rsp)
lea    0xe0(%rsp),%rbx
lea    0x230(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <begins@plt>
lea    0xf4b(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
call   1030 <printf@plt>
movaps 0xeb0(%rip),%xmm0
movaps %xmm0,0x210(%rsp)
movaps 0xe91(%rip),%xmm0
movaps %xmm0,0x200(%rsp)
movaps 0xe72(%rip),%xmm0
movaps %xmm0,0x1f0(%rsp)
movaps 0xe53(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movaps 0xe34(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xe15(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movl   $0x0,0x220(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xe9c(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xe7d(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xe5e(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xe3f(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xe20(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movl   $0x0,0x1b0(%rsp)
lea    0x1c0(%rsp),%rbx
lea    0x150(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <begins@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movl   $0x0,0xd0(%rsp)
movl   $0x6e6e6574,0x70(%rsp)
6e
movw   $0x7369,0x74(%rsp)
movaps %xmm0,(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x60(%rsp)
movl   $0x6b636f68,(%rsp)
movw   $0x7965,0x4(%rsp)
lea    0x70(%rsp),%rbx
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <begins@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s2 = [100 x i8] c"abracadabra\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"%s, %s, %i\0A\00"
@__const.main.s3 = [100 x i8] c"booster\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.s4 = [100 x i8] c"booster seat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
store i32 0, i32* %1
%8 = bitcast [100 x i8]* %2 to i8*
%9 = bitcast i8* %8 to [100 x i8]*
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 0
store i8 97, i8* %10
%11 = bitcast [100 x i8]* %3 to i8*
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%16 = call i32 @begins(i8* %14, i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13, i32 %16)
%18 = bitcast [100 x i8]* %4 to i8*
%19 = bitcast [100 x i8]* %5 to i8*
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%24 = call i32 @begins(i8* %22, i8* %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %20, i8* %21, i32 %24)
%26 = bitcast [100 x i8]* %6 to i8*
%27 = bitcast i8* %26 to [100 x i8]*
%28 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 0
store i8 116, i8* %28
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 1
store i8 101, i8* %29
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 2
store i8 110, i8* %30
%31 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 3
store i8 110, i8* %31
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 4
store i8 105, i8* %32
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %27, i32 0, i32 5
store i8 115, i8* %33
%34 = bitcast [100 x i8]* %7 to i8*
%35 = bitcast i8* %34 to [100 x i8]*
%36 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 0
store i8 104, i8* %36
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 1
store i8 111, i8* %37
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 2
store i8 99, i8* %38
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 3
store i8 107, i8* %39
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 4
store i8 101, i8* %40
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %35, i32 0, i32 5
store i8 121, i8* %41
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%45 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%46 = call i32 @begins(i8* %44, i8* %45)
%47 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %42, i8* %43, i32 %46)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s2 = [100 x i8] c"abracadabra\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"%s, %s, %i\0A\00"
@__const.main.s3 = [100 x i8] c"booster\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.s4 = [100 x i8] c"booster seat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
store i8 97, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @begins(i8* %7, i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i32 %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%13 = call i32 @begins(i8* %11, i8* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i32 %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
store i8 116, i8* %15
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 1
store i8 101, i8* %16
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 2
store i8 110, i8* %17
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 3
store i8 110, i8* %18
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 4
store i8 105, i8* %19
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 5
store i8 115, i8* %20
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
store i8 104, i8* %21
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 1
store i8 111, i8* %22
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 2
store i8 99, i8* %23
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 3
store i8 107, i8* %24
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 4
store i8 101, i8* %25
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 5
store i8 121, i8* %26
%27 = call i32 @begins(i8* %15, i8* %21)
%28 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %21, i32 %27)
ret i32 0
}