#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 /*<<< orphan*/ printf(char *, int);
int strcmp(char *, char *);
int main(int argc, char *argv[]) {
  printf("toto | tata => %d\n", strcmp("toto", "tata"));
  printf("toto | toto => %d\n", strcmp("toto", "toto"));
  printf("toto |  => %d\n", strcmp("toto", ""));
  printf(" | tata => %d\n", strcmp("", "tata"));
  printf("dqsfQSDFQSDFtoto | tata => %d\n", strcmp("dqsfQSDFQSDFtoto", "tata"));
  printf("toto | tataqdfqsdfsd => %d\n", strcmp("toto", "totoqdfqsdfsd"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xf15(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rsi
mov    %rsi,%rdi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0xea4(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    0xe5d(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
lea    0xe89(%rip),%rdi
lea    0xe3c(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
lea    0xe74(%rip),%rdi
lea    0xe8e(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%esi
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf16(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"toto | tata => %d\0A\00"
@.str.1 = [5 x i8] c"toto\00"
@.str.2 = [5 x i8] c"tata\00"
@.str.3 = [19 x i8] c"toto | toto => %d\0A\00"
@.str.4 = [15 x i8] c"toto | => %d\0A\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [15 x i8] c" | tata => %d\0A\00"
@.str.7 = [31 x i8] c"dqsfQSDFQSDFtoto | tata => %d\0A\00"
@.str.8 = [17 x i8] c"dqsfQSDFQSDFtoto\00"
@.str.9 = [28 x i8] c"toto | tataqdfqsdfsd => %d\0A\00"
@.str.10 = [14 x i8] c"totoqdfqsdfsd\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %12)
%14 = call i32 @strcmp(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 %14)
%16 = call i32 @strcmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"toto | tata => %d\0A\00"
@.str.3 = [19 x i8] c"toto | toto => %d\0A\00"
@.str.4 = [15 x i8] c"toto | => %d\0A\00"
@.str.6 = [15 x i8] c" | tata => %d\0A\00"
@.str.7 = [31 x i8] c"dqsfQSDFQSDFtoto | tata => %d\0A\00"
@.str.9 = [28 x i8] c"toto | tataqdfqsdfsd => %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 -1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0), i32 -1)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.9, i64 0, i64 0), i32 -1)
ret i32 0
}