#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*/ test_trivial(char *, char *);
int main(void) {
  test_trivial("abcabba", "cbabac");
  test_trivial("aaabbbcdaabcc", "aaabbcdaabeca");
  test_trivial("aaaaaaaa", "bbbbbbbb");
  test_trivial("aaaaaaaa", "");
  test_trivial("", "bbbbbbbb");
  test_trivial("", "");
  test_trivial("aaaaaaaa", "aaaaaaaabbbbbbbb");
  test_trivial("aaaaaaaa", "bbbbbbbbaaaaaaaa");
  test_trivial("aaaaaaaabbbbbbbb", "aaaaaaaa");
  test_trivial("aaaaaaaabbbbbbbb", "bbbbbbbb");
  test_trivial("aaaaaaaabbbbbbbb", "bbbbbbbb");
  test_trivial("abababababababab", "babababababababa");
  test_trivial("aababcabcdabcde", "aababcabcdabcde");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xed6(%rip),%rdi
lea    0xedd(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xef8(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xee5(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xeda(%rip),%rdi
lea    0xeba(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xec7(%rip),%rsi
mov    %rsi,%rdi
call   1030 <test_trivial@plt>
lea    0xeb0(%rip),%rdi
lea    0xe90(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe9d(%rip),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe71(%rip),%rdi
lea    0xe83(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe5e(%rip),%rdi
lea    0xe5f(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe4b(%rip),%rdi
lea    0xe4c(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe5a(%rip),%rdi
lea    0xe64(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe69(%rip),%rsi
mov    %rsi,%rdi
call   1030 <test_trivial@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xee4(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xee0(%rip),%rdi
lea    0xee7(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xf02(%rip),%r15
lea    0xeea(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <test_trivial@plt>
lea    0xef1(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <test_trivial@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_trivial@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <test_trivial@plt>
lea    0xea8(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <test_trivial@plt>
lea    0xea7(%rip),%rsi
mov    %r15,%rdi
call   1030 <test_trivial@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <test_trivial@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_trivial@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <test_trivial@plt>
lea    0xe88(%rip),%rdi
lea    0xe92(%rip),%rsi
call   1030 <test_trivial@plt>
lea    0xe97(%rip),%rdi
mov    %rdi,%rsi
call   1030 <test_trivial@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"abcabba\00"
@.str.1 = [7 x i8] c"cbabac\00"
@.str.2 = [14 x i8] c"aaabbbcdaabcc\00"
@.str.3 = [14 x i8] c"aaabbcdaabeca\00"
@.str.4 = [9 x i8] c"aaaaaaaa\00"
@.str.5 = [9 x i8] c"bbbbbbbb\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [17 x i8] c"aaaaaaaabbbbbbbb\00"
@.str.8 = [17 x i8] c"bbbbbbbbaaaaaaaa\00"
@.str.9 = [17 x i8] c"abababababababab\00"
@.str.10 = [17 x i8] c"babababababababa\00"
@.str.11 = [16 x i8] c"aababcabcdabcde\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test_trivial(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @test_trivial(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 @test_trivial(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @test_trivial(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @test_trivial(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"abcabba\00"
@.str.1 = [7 x i8] c"cbabac\00"
@.str.2 = [14 x i8] c"aaabbbcdaabcc\00"
@.str.3 = [14 x i8] c"aaabbcdaabeca\00"
@.str.4 = [9 x i8] c"aaaaaaaa\00"
@.str.5 = [9 x i8] c"bbbbbbbb\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [17 x i8] c"aaaaaaaabbbbbbbb\00"
@.str.8 = [17 x i8] c"bbbbbbbbaaaaaaaa\00"
@.str.9 = [17 x i8] c"abababababababab\00"
@.str.10 = [17 x i8] c"babababababababa\00"
@.str.11 = [16 x i8] c"aababcabcdabcde\00"
define i32 @main() {
%1 = tail call i32 @test_trivial(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_trivial(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%5 = tail call i32 @test_trivial(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @test_trivial(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0))
%7 = tail call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%8 = tail call i32 @test_trivial(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%9 = tail call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @test_trivial(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%13 = tail call i32 @test_trivial(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}