#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*/ assert_equal_pointers(int /*<<< orphan*/ *, char *, char *,
                                         char *);
char *pl_expandtabs(char *, int);
void test_expandtabs_no_params() {
  char *ret_val;
  ret_val = pl_expandtabs("", 5);
  assert_equal_pointers(NULL, ret_val, "test_expandtabs_no_params",
                        "Test 1: NULL not retruned.");
  ret_val = pl_expandtabs(NULL, 0);
  assert_equal_pointers(NULL, ret_val, "test_expandtabs_no_params",
                        "Test 2: NULL not returned.");
  ret_val = pl_expandtabs("asd\t", -1);
  assert_equal_pointers(NULL, ret_val, "test_expandtabs_no_params",
                        "Test 3: NULL not returned.");
}


x86 assembly (clang, -O0):
<test_expandtabs_no_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xf25(%rip),%rdi
mov    $0x5,%esi
call   1040 <pl_expandtabs@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xeb4(%rip),%rdx
lea    0xec7(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <pl_expandtabs@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xe8a(%rip),%rdx
lea    0xeb8(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
lea    0xec7(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <pl_expandtabs@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xe5a(%rip),%rdx
lea    0xea8(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_expandtabs_no_params>:
push   %rbx
lea    0xf2c(%rip),%rdi
mov    $0x5,%esi
call   1040 <pl_expandtabs@plt>
lea    0xec7(%rip),%rbx
lea    0xeda(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <assert_equal_pointers@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1040 <pl_expandtabs@plt>
lea    0xed8(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1030 <assert_equal_pointers@plt>
lea    0xedf(%rip),%rdi
mov    $0xffffffff,%esi
call   1040 <pl_expandtabs@plt>
lea    0xed3(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <assert_equal_pointers@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [26 x i8] c"test_expandtabs_no_params\00"
@.str.2 = [27 x i8] c"Test 1: NULL not retruned.\00"
@.str.3 = [27 x i8] c"Test 2: NULL not returned.\00"
@.str.4 = [5 x i8] c"asd\09\00"
@.str.5 = [27 x i8] c"Test 3: NULL not returned.\00"
define void @test_expandtabs_no_params() {
%1 = alloca i8*
%2 = call i8* @pl_expandtabs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 5)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @assert_equal_pointers(i32* null, i8* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%5 = call i8* @pl_expandtabs(i8* null, i32 0)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @assert_equal_pointers(i32* null, i8* %6, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%8 = call i8* @pl_expandtabs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -1)
store i8* %8, i8** %1
%9 = load i8*, i8** %1
%10 = call i32 @assert_equal_pointers(i32* null, i8* %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [26 x i8] c"test_expandtabs_no_params\00"
@.str.2 = [27 x i8] c"Test 1: NULL not retruned.\00"
@.str.3 = [27 x i8] c"Test 2: NULL not returned.\00"
@.str.4 = [5 x i8] c"asd\09\00"
@.str.5 = [27 x i8] c"Test 3: NULL not returned.\00"
define void @test_expandtabs_no_params() {
%1 = tail call i8* @pl_expandtabs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @assert_equal_pointers(i32* null, i8* %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i8* @pl_expandtabs(i8* null, i32 0)
%4 = tail call i32 @assert_equal_pointers(i32* null, i8* %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i8* @pl_expandtabs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 -1)
%6 = tail call i32 @assert_equal_pointers(i32* null, i8* %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
ret void
}