#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*/ str_array_diff(char **, char **, int);
void test_str_array_diff() {
  char *first[] = {"dog", "cat", "monkey"};
  char *second[] = {"dog", "cat", "rat", "monkey"};
  int size = 3;
  str_array_diff(first, second, size);
}


x86 assembly (clang, -O0):
<test_str_array_diff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x2cc1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cbe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cbb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0x2cc0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2cba(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cb7(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x3,-0x44(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
call   1030 <str_array_diff@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_str_array_diff>:
sub    $0x48,%rsp
mov    0x2cd5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cb9(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0x2cde(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2cc2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
mov    $0x3,%edx
call   1030 <str_array_diff@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"dog\00"
@.str.1 = [4 x i8] c"cat\00"
@.str.2 = [7 x i8] c"monkey\00"
@__const.test_str_array_diff.first = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [4 x i8] c"rat\00"
@__const.test_str_array_diff.second = [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
define void @test_str_array_diff() {
%1 = alloca [3 x i8*]
%2 = alloca [4 x i8*]
%3 = alloca i32
%4 = bitcast [3 x i8*]* %1 to i8*
%5 = bitcast [4 x i8*]* %2 to i8*
store i32 3, i32* %3
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%7 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @str_array_diff(i8** %6, i8** %7, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"dog\00"
@.str.1 = [4 x i8] c"cat\00"
@.str.2 = [7 x i8] c"monkey\00"
@__const.test_str_array_diff.first = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [4 x i8] c"rat\00"
@__const.test_str_array_diff.second = [4 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i32 0, i32 0)]
define void @test_str_array_diff() {
%1 = alloca [3 x i8*]
%2 = alloca [4 x i8*]
%3 = bitcast [3 x i8*]* %1 to i8*
%4 = bitcast [4 x i8*]* %2 to i8*
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%7 = call i32 @str_array_diff(i8** %5, i8** %6, i32 3)
ret void
}