#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*/ Globals_assert(int, char *);
int /*<<< orphan*/ UDP_ReceiveData(int, char *, int);
int /*<<< orphan*/ strcmp(char *, char *);
void *Receiver_Test_Thread_Run(void *sockfd_receiver_address) {
  int sockfd_receiver = *((int *)sockfd_receiver_address);
  int receive_size = 1024;
  char receive_data[receive_size];
  UDP_ReceiveData(sockfd_receiver, receive_data, receive_size);
  Globals_assert(!strcmp(receive_data, "<(a &/ ^left) =/> g>."),
                 "We didn't receive what we sent!");
  return NULL;
}


x86 assembly (clang, -O0):
<Receiver_Test_Thread_Run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x400,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x28(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%edx
call   1040 <UDP_ReceiveData@plt>
mov    -0x28(%rbp),%rdi
lea    0xe78(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe75(%rip),%rsi
call   1050 <Globals_assert@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Receiver_Test_Thread_Run>:
sub    $0x408,%rsp
mov    (%rdi),%edi
mov    %rsp,%rsi
mov    $0x400,%edx
call   1030 <UDP_ReceiveData@plt>
movdqu 0x6(%rsp),%xmm0
pcmpeqb 0xebc(%rip),%xmm0
movdqa (%rsp),%xmm1
pcmpeqb 0xebf(%rip),%xmm1
pand   %xmm0,%xmm1
pmovmskb %xmm1,%eax
xor    %edi,%edi
cmp    $0xffff,%eax
sete   %dil
lea    0xecb(%rip),%rsi
call   1040 <Globals_assert@plt>
xor    %eax,%eax
add    $0x408,%rsp
ret

LLVM IR (-O0):
@.str = [22 x i8] c"<(a &/ ^left) =/> g>.\00"
@.str.1 = [32 x i8] c"We didn't receive what we sent!\00"
define i8* @Receiver_Test_Thread_Run(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %2
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %3
store i32 1024, i32* %4
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %5
%13 = alloca i8, i64 %11
store i64 %11, i64* %6
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = call i32 @UDP_ReceiveData(i32 %14, i8* %13, i32 %15)
%17 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
%21 = call i32 @Globals_assert(i32 %20, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%22 = load i8*, i8** %5
ret i8* null
}

LLVM IR (-O2):
@.str = [22 x i8] c"<(a &/ ^left) =/> g>.\00"
@.str.1 = [32 x i8] c"We didn't receive what we sent!\00"
define noalias i8* @Receiver_Test_Thread_Run(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @UDP_ReceiveData(i32 %3, i8* %5, i32 1024)
%7 = call i32 @bcmp(i8* dereferenceable(22) %5, i8* dereferenceable(22) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 22)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @Globals_assert(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}