#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 Send(int, void *, int /*<<< orphan*/, void *, int /*<<< orphan*/);
int /*<<< orphan*/ _assert(int, char *, int, char *);
void test_send_tid_nosuchtask(void) {
  int rc;
  rc = Send(2, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          81, "rc == -2");
  rc = Send(3, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          83, "rc == -2");
  rc = Send(59, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          85, "rc == -2");
  rc = Send(127, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          87, "rc == -2");
  rc = Send(256, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          89, "rc == -2");
  rc = Send(256 + 127, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          91, "rc == -2");
  rc = Send(512, ((void *)0), 0, ((void *)0), 0);
  _assert((rc == -2),
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/"
          "test/test_ipc.c",
          93, "rc == -2");
}


x86 assembly (clang, -O0):
<test_send_tid_nosuchtask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeab(%rip),%rsi
mov    $0x51,%edx
lea    0xf2f(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x3,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe6d(%rip),%rsi
mov    $0x53,%edx
lea    0xef1(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x3b,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe2f(%rip),%rsi
mov    $0x55,%edx
lea    0xeb3(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x7f,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdf1(%rip),%rsi
mov    $0x57,%edx
lea    0xe75(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x100,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdb3(%rip),%rsi
mov    $0x59,%edx
lea    0xe37(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x17f,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd75(%rip),%rsi
mov    $0x5b,%edx
lea    0xdf9(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x200,%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <Send@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd37(%rip),%rsi
mov    $0x5d,%edx
lea    0xdbb(%rip),%rcx
call   1040 <_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_send_tid_nosuchtask>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
lea    0xeb9(%rip),%rbx
lea    0xf42(%rip),%r14
mov    %rbx,%rsi
mov    $0x51,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x3,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x53,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x3b,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x55,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x57,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x100,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x59,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x17f,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x5b,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x200,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <Send@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x5d,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <_assert@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/test/test_ipc.c\00"
@.str.1 = [9 x i8] c"rc == -2\00"
define void @test_send_tid_nosuchtask() {
%1 = alloca i32
%2 = call i32 @Send(i32 2, i8* null, i32 0, i8* null, i32 0)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -2
%5 = zext i1 %4 to i32
%6 = call i32 @_assert(i32 %5, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @Send(i32 3, i8* null, i32 0, i8* null, i32 0)
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, -2
%10 = zext i1 %9 to i32
%11 = call i32 @_assert(i32 %10, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 83, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @Send(i32 59, i8* null, i32 0, i8* null, i32 0)
store i32 %12, i32* %1
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, -2
%15 = zext i1 %14 to i32
%16 = call i32 @_assert(i32 %15, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @Send(i32 127, i8* null, i32 0, i8* null, i32 0)
store i32 %17, i32* %1
%18 = load i32, i32* %1
%19 = icmp eq i32 %18, -2
%20 = zext i1 %19 to i32
%21 = call i32 @_assert(i32 %20, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 87, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 @Send(i32 256, i8* null, i32 0, i8* null, i32 0)
store i32 %22, i32* %1
%23 = load i32, i32* %1
%24 = icmp eq i32 %23, -2
%25 = zext i1 %24 to i32
%26 = call i32 @_assert(i32 %25, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 @Send(i32 383, i8* null, i32 0, i8* null, i32 0)
store i32 %27, i32* %1
%28 = load i32, i32* %1
%29 = icmp eq i32 %28, -2
%30 = zext i1 %29 to i32
%31 = call i32 @_assert(i32 %30, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 91, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @Send(i32 512, i8* null, i32 0, i8* null, i32 0)
store i32 %32, i32* %1
%33 = load i32, i32* %1
%34 = icmp eq i32 %33, -2
%35 = zext i1 %34 to i32
%36 = call i32 @_assert(i32 %35, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 93, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/mthiffau/HeatheRTOS/refs/heads/master/test/test_ipc.c\00"
@.str.1 = [9 x i8] c"rc == -2\00"
define void @test_send_tid_nosuchtask() {
%1 = tail call i32 @Send(i32 2, i8* null, i32 0, i8* null, i32 0)
%2 = icmp eq i32 %1, -2
%3 = zext i1 %2 to i32
%4 = tail call i32 @_assert(i32 %3, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 81, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @Send(i32 3, i8* null, i32 0, i8* null, i32 0)
%6 = icmp eq i32 %5, -2
%7 = zext i1 %6 to i32
%8 = tail call i32 @_assert(i32 %7, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 83, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @Send(i32 59, i8* null, i32 0, i8* null, i32 0)
%10 = icmp eq i32 %9, -2
%11 = zext i1 %10 to i32
%12 = tail call i32 @_assert(i32 %11, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 85, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @Send(i32 127, i8* null, i32 0, i8* null, i32 0)
%14 = icmp eq i32 %13, -2
%15 = zext i1 %14 to i32
%16 = tail call i32 @_assert(i32 %15, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 87, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @Send(i32 256, i8* null, i32 0, i8* null, i32 0)
%18 = icmp eq i32 %17, -2
%19 = zext i1 %18 to i32
%20 = tail call i32 @_assert(i32 %19, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 89, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @Send(i32 383, i8* null, i32 0, i8* null, i32 0)
%22 = icmp eq i32 %21, -2
%23 = zext i1 %22 to i32
%24 = tail call i32 @_assert(i32 %23, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 91, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%25 = tail call i32 @Send(i32 512, i8* null, i32 0, i8* null, i32 0)
%26 = icmp eq i32 %25, -2
%27 = zext i1 %26 to i32
%28 = tail call i32 @_assert(i32 %27, i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 93, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}