#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 Reply(int, void *, int /*<<< orphan*/);
int /*<<< orphan*/ _assert(int, char *, int, char *);
void test_rply_tid_nosuchtask(void) {
  int rc;
  rc = Reply(2, ((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",
          119, "rc == -2");
  rc = Reply(3, ((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",
          121, "rc == -2");
  rc = Reply(59, ((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",
          123, "rc == -2");
  rc = Reply(127, ((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",
          125, "rc == -2");
  rc = Reply(256, ((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",
          127, "rc == -2");
  rc = Reply(256 + 127, ((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",
          129, "rc == -2");
  rc = Reply(512, ((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",
          131, "rc == -2");
}


x86 assembly (clang, -O0):
<test_rply_tid_nosuchtask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xeb2(%rip),%rsi
mov    $0x77,%edx
lea    0xf36(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x3,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe7b(%rip),%rsi
mov    $0x79,%edx
lea    0xeff(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x3b,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe44(%rip),%rsi
mov    $0x7b,%edx
lea    0xec8(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x7f,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xe0d(%rip),%rsi
mov    $0x7d,%edx
lea    0xe91(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x100,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xdd6(%rip),%rsi
mov    $0x7f,%edx
lea    0xe5a(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x17f,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd9f(%rip),%rsi
mov    $0x81,%edx
lea    0xe23(%rip),%rcx
call   1040 <_assert@plt>
mov    $0x200,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xfffffffe,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xd68(%rip),%rsi
mov    $0x83,%edx
lea    0xdec(%rip),%rcx
call   1040 <_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rply_tid_nosuchtask>:
push   %r14
push   %rbx
push   %rax
mov    $0x2,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
lea    0xebe(%rip),%rbx
lea    0xf47(%rip),%r14
mov    %rbx,%rsi
mov    $0x77,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x3,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x79,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x3b,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x7b,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x7f,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x7d,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x100,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x7f,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x17f,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x81,%edx
mov    %r14,%rcx
call   1040 <_assert@plt>
mov    $0x200,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <Reply@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%eax
sete   %dil
mov    %rbx,%rsi
mov    $0x83,%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_rply_tid_nosuchtask() {
%1 = alloca i32
%2 = call i32 @Reply(i32 2, 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 119, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @Reply(i32 3, 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 121, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @Reply(i32 59, 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 123, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32 @Reply(i32 127, 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 125, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 @Reply(i32 256, 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 127, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%27 = call i32 @Reply(i32 383, 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 129, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @Reply(i32 512, 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 131, 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_rply_tid_nosuchtask() {
%1 = tail call i32 @Reply(i32 2, 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 119, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @Reply(i32 3, 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 121, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @Reply(i32 59, 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 123, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @Reply(i32 127, 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 125, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @Reply(i32 256, 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 127, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%21 = tail call i32 @Reply(i32 383, 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 129, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%25 = tail call i32 @Reply(i32 512, 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 131, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}