#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 e_strcmp(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  char a[100] = "pinto";
  char b[100] = "pintoo";
  printf("%d\n", e_strcmp(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x70,-0x80(%rbp)
movb   $0x69,-0x7f(%rbp)
movb   $0x6e,-0x7e(%rbp)
movb   $0x74,-0x7d(%rbp)
movb   $0x6f,-0x7c(%rbp)
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
movb   $0x70,-0xf0(%rbp)
movb   $0x69,-0xef(%rbp)
movb   $0x6e,-0xee(%rbp)
movb   $0x74,-0xed(%rbp)
movb   $0x6f,-0xec(%rbp)
movb   $0x6f,-0xeb(%rbp)
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1050 <e_strcmp@plt>
mov    %eax,%esi
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xd8,%rsp
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   $0x746e6970,0x70(%rsp)
74
movb   $0x6f,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   $0x746e6970,(%rsp)
movw   $0x6f6f,0x4(%rsp)
lea    0x70(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <e_strcmp@plt>
lea    0xe4a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [100 x i8]* %6 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 112, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 1
store i8 105, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 2
store i8 110, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 3
store i8 116, i8* %13
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i32 0, i32 4
store i8 111, i8* %14
%15 = bitcast [100 x i8]* %7 to i8*
%16 = bitcast i8* %15 to [100 x i8]*
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 0
store i8 112, i8* %17
%18 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 1
store i8 105, i8* %18
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 2
store i8 110, i8* %19
%20 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 3
store i8 116, i8* %20
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 4
store i8 111, i8* %21
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %16, i32 0, i32 5
store i8 111, i8* %22
%23 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%25 = call i32 @e_strcmp(i8* %23, i8* %24)
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
store i8 112, i8* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 1
store i8 105, i8* %6
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 2
store i8 110, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 3
store i8 116, i8* %8
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 4
store i8 111, i8* %9
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
store i8 112, i8* %10
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 1
store i8 105, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 2
store i8 110, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 3
store i8 116, i8* %13
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 4
store i8 111, i8* %14
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 5
store i8 111, i8* %15
%16 = call i32 @e_strcmp(i8* %5, i8* %10)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}