#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(int /*<<< orphan*/, char *);
int /*<<< orphan*/ trim(char *);
void testTrim(void) {
  test(trim("abcde"), "abcde");
  test(trim("    abcde"), "abcde");
  test(trim("abcde    "), "abcde");
  test(trim("\tabcde  "), "abcde");
  test(trim(""), "");
}


x86 assembly (clang, -O0):
<testTrim>:
push   %rbp
mov    %rsp,%rbp
lea    0xed9(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
lea    0xecb(%rip),%rsi
call   1040 <test@plt>
lea    0xebb(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
lea    0xeb1(%rip),%rsi
call   1040 <test@plt>
lea    0xeab(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
lea    0xe97(%rip),%rsi
call   1040 <test@plt>
lea    0xe9b(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
lea    0xe7d(%rip),%rsi
call   1040 <test@plt>
lea    0xe80(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
lea    0xe72(%rip),%rsi
call   1040 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTrim>:
push   %rbx
lea    0xedc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <trim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <test@plt>
lea    0xebf(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <test@plt>
lea    0xeb3(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <test@plt>
lea    0xea7(%rip),%rdi
call   1030 <trim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <test@plt>
lea    0xe90(%rip),%rbx
mov    %rbx,%rdi
call   1030 <trim@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <test@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [10 x i8] c" abcde\00"
@.str.2 = [10 x i8] c"abcde \00"
@.str.3 = [9 x i8] c"\09abcde \00"
@.str.4 = [1 x i8] zeroinitializer
define void @testTrim() {
%1 = call i32 @trim(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @test(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @trim(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @test(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @trim(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @test(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @trim(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @test(i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @trim(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @test(i32 %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [10 x i8] c" abcde\00"
@.str.2 = [10 x i8] c"abcde \00"
@.str.3 = [9 x i8] c"\09abcde \00"
@.str.4 = [1 x i8] zeroinitializer
define void @testTrim() {
%1 = tail call i32 @trim(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @test(i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @trim(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @test(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @trim(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @test(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @trim(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @test(i32 %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @trim(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @test(i32 %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0))
ret void
}