#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 test(char *, char *);
int main(void) {
  char s[26] = "car";
  char t[26] = "rat";
  if (test(s, t) == 1) {
    printf("true\n");
  } else {
    printf("false\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec1(%rip),%ax
mov    %ax,-0x8(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb5(%rip),%ax
mov    %ax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <test@plt>
cmp    $0x1,%eax
jne    11ae <main+0x8e>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    11ba <main+0x9a>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movups 0xedf(%rip),%xmm0
movups %xmm0,0x2a(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xee7(%rip),%xmm0
movups %xmm0,0xa(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <test@plt>
cmp    $0x1,%eax
lea    0xed6(%rip),%rax
lea    0xec9(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [26 x i8] c"car\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.t = [26 x i8] c"rat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [6 x i8] c"true\0A\00"
@.str.1 = [7 x i8] c"false\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [26 x i8]
%3 = alloca [26 x i8]
store i32 0, i32* %1
%4 = bitcast [26 x i8]* %2 to i8*
%5 = bitcast [26 x i8]* %3 to i8*
%6 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%8 = call i32 @test(i8* %6, i8* %7)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@__const.main.s = [26 x i8] c"car\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.t = [26 x i8] c"rat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@str = [6 x i8] c"false\00"
@str.2 = [5 x i8] c"true\00"
define i32 @main() {
%1 = alloca [26 x i8]
%2 = alloca [26 x i8]
%3 = getelementptr inbounds [26 x i8], [26 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%5 = call i32 @test(i8* %3, i8* %4)
%6 = icmp eq i32 %5, 1
%7 = select i1 %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}