#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_int(int, int, char *, char *);
int pl_count(char *, char *);
void test_count_empty_params() {
  int ret_val = 0;
  ret_val = pl_count("", "One");
  assert_equal_int(-1, ret_val, "test_count_empty_params",
                   "Test 1: Error code not returned.");
  ret_val = pl_count(NULL, "one");
  assert_equal_int(-1, ret_val, "test_count_empty_params",
                   "Test 2: Error code not returned.");
  ret_val = pl_count("one three three seven", "");
  assert_equal_int(-1, ret_val, "test_count_empty_params",
                   "Test 3: Error code not returned.");
  ret_val = pl_count("one three three seven", NULL);
  assert_equal_int(-1, ret_val, "test_count_empty_params",
                   "Test 4: Error code not returned.");
}


x86 assembly (clang, -O0):
<test_count_empty_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf06(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1030 <pl_count@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
lea    0xeb0(%rip),%rdx
lea    0xec1(%rip),%rcx
call   1040 <assert_equal_int@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xed2(%rip),%rsi
call   1030 <pl_count@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
lea    0xe82(%rip),%rdx
lea    0xeb8(%rip),%rcx
call   1040 <assert_equal_int@plt>
lea    0xecd(%rip),%rdi
lea    0xea0(%rip),%rsi
call   1030 <pl_count@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
lea    0xe51(%rip),%rdx
lea    0xebe(%rip),%rcx
call   1040 <assert_equal_int@plt>
lea    0xe9c(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pl_count@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
lea    0xe23(%rip),%rdx
lea    0xeb1(%rip),%rcx
call   1040 <assert_equal_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_count_empty_params>:
push   %r15
push   %r14
push   %rbx
lea    0xf10(%rip),%r14
lea    0xecd(%rip),%rsi
mov    %r14,%rdi
call   1030 <pl_count@plt>
lea    0xec2(%rip),%r15
lea    0xed3(%rip),%rcx
mov    $0xffffffff,%edi
mov    %eax,%esi
mov    %r15,%rdx
call   1040 <assert_equal_int@plt>
lea    0xede(%rip),%rsi
xor    %edi,%edi
call   1030 <pl_count@plt>
lea    0xed4(%rip),%rcx
mov    $0xffffffff,%edi
mov    %eax,%esi
mov    %r15,%rdx
call   1040 <assert_equal_int@plt>
lea    0xedf(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <pl_count@plt>
lea    0xee3(%rip),%rcx
mov    $0xffffffff,%edi
mov    %eax,%esi
mov    %r15,%rdx
call   1040 <assert_equal_int@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <pl_count@plt>
lea    0xee4(%rip),%rcx
mov    $0xffffffff,%edi
mov    %eax,%esi
mov    %r15,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <assert_equal_int@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"One\00"
@.str.2 = [24 x i8] c"test_count_empty_params\00"
@.str.3 = [33 x i8] c"Test 1: Error code not returned.\00"
@.str.4 = [4 x i8] c"one\00"
@.str.5 = [33 x i8] c"Test 2: Error code not returned.\00"
@.str.6 = [22 x i8] c"one three three seven\00"
@.str.7 = [33 x i8] c"Test 3: Error code not returned.\00"
@.str.8 = [33 x i8] c"Test 4: Error code not returned.\00"
define void @test_count_empty_params() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @pl_count(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))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @assert_equal_int(i32 -1, i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @pl_count(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @assert_equal_int(i32 -1, i32 %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @pl_count(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @assert_equal_int(i32 -1, i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @pl_count(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* null)
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = call i32 @assert_equal_int(i32 -1, i32 %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"One\00"
@.str.2 = [24 x i8] c"test_count_empty_params\00"
@.str.3 = [33 x i8] c"Test 1: Error code not returned.\00"
@.str.4 = [4 x i8] c"one\00"
@.str.5 = [33 x i8] c"Test 2: Error code not returned.\00"
@.str.6 = [22 x i8] c"one three three seven\00"
@.str.7 = [33 x i8] c"Test 3: Error code not returned.\00"
@.str.8 = [33 x i8] c"Test 4: Error code not returned.\00"
define void @test_count_empty_params() {
%1 = tail call i32 @pl_count(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))
%2 = tail call i32 @assert_equal_int(i32 -1, i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @pl_count(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @assert_equal_int(i32 -1, i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 @pl_count(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @assert_equal_int(i32 -1, i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%7 = tail call i32 @pl_count(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8* null)
%8 = tail call i32 @assert_equal_int(i32 -1, i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
ret void
}