#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_translate(char *, unsigned char *, char *);
void test_translate_empty_params() {
  char *ret_val;
  ret_val = pl_translate("", (unsigned char *)"123", "321");
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 1: NULL not returned.");
  ret_val = pl_translate(NULL, (unsigned char *)"123", "321");
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 2: NULL not returned.");
  ret_val = pl_translate("spam eggs and ham", (unsigned char *)"", "321");
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 3: NULL not returned.");
  ret_val = pl_translate("spam eggs and ham", (unsigned char *)"ega", "");
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 4: NULL not returned.");
  ret_val = pl_translate("spam eggs and ham", (unsigned char *)"ega", NULL);
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 5: NULL not returned.");
  ret_val = pl_translate("", (unsigned char *)"", "");
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 6: NULL not returned.");
  ret_val = pl_translate(NULL, NULL, NULL);
  assert_equal_pointers(NULL, ret_val, "test_translate_empty_params",
                        "Test 7: Null not returned.");
}


x86 assembly (clang, -O0):
<test_translate_empty_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xf0f(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xec7(%rip),%rdx
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xeb3(%rip),%rdx
lea    0xec8(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xe94(%rip),%rsi
lea    0xe91(%rip),%rdx
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xe7d(%rip),%rdx
lea    0xead(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
lea    0xebc(%rip),%rdi
lea    0xe99(%rip),%rsi
lea    0xe58(%rip),%rdx
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xe44(%rip),%rdx
lea    0xea1(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
lea    0xe83(%rip),%rdi
lea    0xea9(%rip),%rsi
lea    0xe59(%rip),%rdx
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xe0b(%rip),%rdx
lea    0xe87(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
lea    0xe4a(%rip),%rdi
lea    0xe70(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xdd5(%rip),%rdx
lea    0xe6c(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
lea    0xdf8(%rip),%rdx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xda4(%rip),%rdx
lea    0xe56(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1040 <pl_translate@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
lea    0xd76(%rip),%rdx
lea    0xe43(%rip),%rcx
call   1030 <assert_equal_pointers@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_translate_empty_params>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
lea    0xf0e(%rip),%r14
lea    0xec9(%rip),%rbx
lea    0xec6(%rip),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <pl_translate@plt>
lea    0xeb5(%rip),%r12
lea    0xeca(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <pl_translate@plt>
lea    0xec4(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
lea    0xecb(%rip),%r13
mov    %r13,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <pl_translate@plt>
lea    0xec8(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
lea    0xecf(%rip),%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <pl_translate@plt>
lea    0xebe(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <pl_translate@plt>
lea    0xeb8(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
mov    %r14,%rdi
mov    %r14,%rsi
mov    %r14,%rdx
call   1040 <pl_translate@plt>
lea    0xeb1(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
call   1030 <assert_equal_pointers@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <pl_translate@plt>
lea    0xead(%rip),%rcx
xor    %edi,%edi
mov    %rax,%rsi
mov    %r12,%rdx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <assert_equal_pointers@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"123\00"
@.str.2 = [4 x i8] c"321\00"
@.str.3 = [28 x i8] c"test_translate_empty_params\00"
@.str.4 = [27 x i8] c"Test 1: NULL not returned.\00"
@.str.5 = [27 x i8] c"Test 2: NULL not returned.\00"
@.str.6 = [18 x i8] c"spam eggs and ham\00"
@.str.7 = [27 x i8] c"Test 3: NULL not returned.\00"
@.str.8 = [4 x i8] c"ega\00"
@.str.9 = [27 x i8] c"Test 4: NULL not returned.\00"
@.str.10 = [27 x i8] c"Test 5: NULL not returned.\00"
@.str.11 = [27 x i8] c"Test 6: NULL not returned.\00"
@.str.12 = [27 x i8] c"Test 7: Null not returned.\00"
define void @test_translate_empty_params() {
%1 = alloca i8*
%2 = call i8* @pl_translate(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @assert_equal_pointers(i32* null, i8* %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%5 = call i8* @pl_translate(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 @assert_equal_pointers(i32* null, i8* %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%8 = call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %8, i8** %1
%9 = load i8*, i8** %1
%10 = call i32 @assert_equal_pointers(i32* null, i8* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%11 = call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %11, i8** %1
%12 = load i8*, i8** %1
%13 = call i32 @assert_equal_pointers(i32* null, i8* %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
%14 = call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* null)
store i8* %14, i8** %1
%15 = load i8*, i8** %1
%16 = call i32 @assert_equal_pointers(i32* null, i8* %15, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%17 = call i8* @pl_translate(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %1
%18 = load i8*, i8** %1
%19 = call i32 @assert_equal_pointers(i32* null, i8* %18, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
%20 = call i8* @pl_translate(i8* null, i8* null, i8* null)
store i8* %20, i8** %1
%21 = load i8*, i8** %1
%22 = call i32 @assert_equal_pointers(i32* null, i8* %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"123\00"
@.str.2 = [4 x i8] c"321\00"
@.str.3 = [28 x i8] c"test_translate_empty_params\00"
@.str.4 = [27 x i8] c"Test 1: NULL not returned.\00"
@.str.5 = [27 x i8] c"Test 2: NULL not returned.\00"
@.str.6 = [18 x i8] c"spam eggs and ham\00"
@.str.7 = [27 x i8] c"Test 3: NULL not returned.\00"
@.str.8 = [4 x i8] c"ega\00"
@.str.9 = [27 x i8] c"Test 4: NULL not returned.\00"
@.str.10 = [27 x i8] c"Test 5: NULL not returned.\00"
@.str.11 = [27 x i8] c"Test 6: NULL not returned.\00"
@.str.12 = [27 x i8] c"Test 7: Null not returned.\00"
define void @test_translate_empty_params() {
%1 = tail call i8* @pl_translate(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @assert_equal_pointers(i32* null, i8* %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i8* @pl_translate(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @assert_equal_pointers(i32* null, i8* %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @assert_equal_pointers(i32* null, i8* %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%7 = tail call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @assert_equal_pointers(i32* null, i8* %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
%9 = tail call i8* @pl_translate(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* null)
%10 = tail call i32 @assert_equal_pointers(i32* null, i8* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0))
%11 = tail call i8* @pl_translate(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @assert_equal_pointers(i32* null, i8* %11, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i8* @pl_translate(i8* null, i8* null, i8* null)
%14 = tail call i32 @assert_equal_pointers(i32* null, i8* %13, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
ret void
}