#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 *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  char b[8], a[8];
  strcpy(a, "banana");
  strcpy(b, "abacate");
  if (a < b)
    printf("%s vem antes de %s no dicionário", a, b);
  else
    printf("%s vem depois de %s no dicionário", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x14(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xc(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x14(%rbp),%rax
lea    -0xc(%rbp),%rcx
cmp    %rcx,%rax
jae    1179 <main+0x59>
lea    -0x14(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
jmp    118d <main+0x6d>
lea    -0x14(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%rsi
lea    0x8(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
lea    0xec5(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
cmp    %rbx,%r14
lea    0xeb6(%rip),%rax
lea    0xed1(%rip),%rdi
cmovb  %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"banana\00"
@.str.1 = [8 x i8] c"abacate\00"
@.str.2 = [34 x i8] c"%s vem antes de %s no dicion\C3\A1rio\00"
@.str.3 = [35 x i8] c"%s vem depois de %s no dicion\C3\A1rio\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%10 = icmp ult i8* %8, %9
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %12, i8* %13)
br label %19
15: ; preds = %0
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0), i8* %16, i8* %17)
br label %19
19: ; preds = %15, %11
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str = [7 x i8] c"banana\00"
@.str.1 = [8 x i8] c"abacate\00"
@.str.2 = [34 x i8] c"%s vem antes de %s no dicion\C3\A1rio\00"
@.str.3 = [35 x i8] c"%s vem depois de %s no dicion\C3\A1rio\00"
define i32 @main() {
%1 = alloca [8 x i8]
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ult [8 x i8]* %2, %1
%8 = select i1 %7, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0)
%9 = call i32 @printf(i8* %8, i8* %4, i8* %3)
ret i32 0
}