#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 */
struct node {
  int dummy;
};

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ append(struct node *, int);
int /*<<< orphan*/ assert(int);
struct node *createNode(int);
int listMember(struct node *, int);
int listRemove(struct node *, int);
int listSize(struct node *);
int /*<<< orphan*/ printList(struct node *);
int main(int argc, char *argv[]) {
  struct node *list = createNode(0);
  assert(list != NULL);
  for (int i = 1; i <= 30; i++) {
    append(list, i);
  }
  assert(listSize(list) == 31);
  assert(listRemove(list, 24));
  assert(listSize(list) == 30);
  assert(listMember(list, 21));
  assert(listSize(NULL) == 0);
  assert(!listMember(NULL, 0));
  struct node *second = createNode(5);
  assert(listSize(second) == 1);
  assert(!listMember(second, 6));
  printList(list);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1060 <createNode@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x1e,-0x1c(%rbp)
jg     11ce <main+0x5e>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1050 <append@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11aa <main+0x3a>
mov    -0x18(%rbp),%rdi
call   1030 <listSize@plt>
cmp    $0x1f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    $0x18,%esi
call   1040 <listRemove@plt>
mov    %eax,%edi
call   1070 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1030 <listSize@plt>
cmp    $0x1e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x18(%rbp),%rdi
mov    $0x15,%esi
call   1080 <listMember@plt>
mov    %eax,%edi
call   1070 <assert@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <listSize@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1080 <listMember@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    $0x5,%edi
call   1060 <createNode@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <listSize@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x28(%rbp),%rdi
mov    $0x6,%esi
call   1080 <listMember@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1090 <printList@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1060 <createNode@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x11,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x15,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x16,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x17,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x1a,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x1b,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x1c,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x1d,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1050 <append@plt>
mov    %rbx,%rdi
call   1030 <listSize@plt>
xor    %edi,%edi
cmp    $0x1f,%eax
sete   %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
call   1040 <listRemove@plt>
mov    %eax,%edi
call   1070 <assert@plt>
mov    %rbx,%rdi
call   1030 <listSize@plt>
xor    %edi,%edi
cmp    $0x1e,%eax
sete   %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
mov    $0x15,%esi
call   1080 <listMember@plt>
mov    %eax,%edi
call   1070 <assert@plt>
xor    %edi,%edi
call   1030 <listSize@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1080 <listMember@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
mov    $0x5,%edi
call   1060 <createNode@plt>
mov    %rax,%r14
mov    %rax,%rdi
call   1030 <listSize@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1070 <assert@plt>
mov    %r14,%rdi
mov    $0x6,%esi
call   1080 <listMember@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
mov    %rbx,%rdi
call   1090 <printList@plt>
mov    0x2c04(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.node = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.node*
%7 = alloca i32
%8 = alloca %struct.node*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call %struct.node* @createNode(i32 0)
store %struct.node* %9, %struct.node** %6
%10 = load %struct.node*, %struct.node** %6
%11 = icmp ne %struct.node* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
store i32 1, i32* %7
br label %14
14: ; preds = %21, %2
%15 = load i32, i32* %7
%16 = icmp sle i32 %15, 30
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load %struct.node*, %struct.node** %6
%19 = load i32, i32* %7
%20 = call i32 @append(%struct.node* %18, i32 %19)
br label %21
21: ; preds = %17
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %14
24: ; preds = %14
%25 = load %struct.node*, %struct.node** %6
%26 = call i32 @listSize(%struct.node* %25)
%27 = icmp eq i32 %26, 31
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load %struct.node*, %struct.node** %6
%31 = call i32 @listRemove(%struct.node* %30, i32 24)
%32 = call i32 @assert(i32 %31)
%33 = load %struct.node*, %struct.node** %6
%34 = call i32 @listSize(%struct.node* %33)
%35 = icmp eq i32 %34, 30
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load %struct.node*, %struct.node** %6
%39 = call i32 @listMember(%struct.node* %38, i32 21)
%40 = call i32 @assert(i32 %39)
%41 = call i32 @listSize(%struct.node* null)
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = call i32 @listMember(%struct.node* null, i32 0)
%46 = icmp ne i32 %45, 0
%47 = xor i1 %46, true
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = call %struct.node* @createNode(i32 5)
store %struct.node* %50, %struct.node** %8
%51 = load %struct.node*, %struct.node** %8
%52 = call i32 @listSize(%struct.node* %51)
%53 = icmp eq i32 %52, 1
%54 = zext i1 %53 to i32
%55 = call i32 @assert(i32 %54)
%56 = load %struct.node*, %struct.node** %8
%57 = call i32 @listMember(%struct.node* %56, i32 6)
%58 = icmp ne i32 %57, 0
%59 = xor i1 %58, true
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = load %struct.node*, %struct.node** %6
%63 = call i32 @printList(%struct.node* %62)
%64 = load i32, i32* @EXIT_SUCCESS
ret i32 %64
}

LLVM IR (-O2):
%struct.node = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.node* @createNode(i32 0)
%4 = icmp ne %struct.node* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @append(%struct.node* %3, i32 1)
%8 = tail call i32 @append(%struct.node* %3, i32 2)
%9 = tail call i32 @append(%struct.node* %3, i32 3)
%10 = tail call i32 @append(%struct.node* %3, i32 4)
%11 = tail call i32 @append(%struct.node* %3, i32 5)
%12 = tail call i32 @append(%struct.node* %3, i32 6)
%13 = tail call i32 @append(%struct.node* %3, i32 7)
%14 = tail call i32 @append(%struct.node* %3, i32 8)
%15 = tail call i32 @append(%struct.node* %3, i32 9)
%16 = tail call i32 @append(%struct.node* %3, i32 10)
%17 = tail call i32 @append(%struct.node* %3, i32 11)
%18 = tail call i32 @append(%struct.node* %3, i32 12)
%19 = tail call i32 @append(%struct.node* %3, i32 13)
%20 = tail call i32 @append(%struct.node* %3, i32 14)
%21 = tail call i32 @append(%struct.node* %3, i32 15)
%22 = tail call i32 @append(%struct.node* %3, i32 16)
%23 = tail call i32 @append(%struct.node* %3, i32 17)
%24 = tail call i32 @append(%struct.node* %3, i32 18)
%25 = tail call i32 @append(%struct.node* %3, i32 19)
%26 = tail call i32 @append(%struct.node* %3, i32 20)
%27 = tail call i32 @append(%struct.node* %3, i32 21)
%28 = tail call i32 @append(%struct.node* %3, i32 22)
%29 = tail call i32 @append(%struct.node* %3, i32 23)
%30 = tail call i32 @append(%struct.node* %3, i32 24)
%31 = tail call i32 @append(%struct.node* %3, i32 25)
%32 = tail call i32 @append(%struct.node* %3, i32 26)
%33 = tail call i32 @append(%struct.node* %3, i32 27)
%34 = tail call i32 @append(%struct.node* %3, i32 28)
%35 = tail call i32 @append(%struct.node* %3, i32 29)
%36 = tail call i32 @append(%struct.node* %3, i32 30)
%37 = tail call i32 @listSize(%struct.node* %3)
%38 = icmp eq i32 %37, 31
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
%41 = tail call i32 @listRemove(%struct.node* %3, i32 24)
%42 = tail call i32 @assert(i32 %41)
%43 = tail call i32 @listSize(%struct.node* %3)
%44 = icmp eq i32 %43, 30
%45 = zext i1 %44 to i32
%46 = tail call i32 @assert(i32 %45)
%47 = tail call i32 @listMember(%struct.node* %3, i32 21)
%48 = tail call i32 @assert(i32 %47)
%49 = tail call i32 @listSize(%struct.node* null)
%50 = icmp eq i32 %49, 0
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
%53 = tail call i32 @listMember(%struct.node* null, i32 0)
%54 = icmp eq i32 %53, 0
%55 = zext i1 %54 to i32
%56 = tail call i32 @assert(i32 %55)
%57 = tail call %struct.node* @createNode(i32 5)
%58 = tail call i32 @listSize(%struct.node* %57)
%59 = icmp eq i32 %58, 1
%60 = zext i1 %59 to i32
%61 = tail call i32 @assert(i32 %60)
%62 = tail call i32 @listMember(%struct.node* %57, i32 6)
%63 = icmp eq i32 %62, 0
%64 = zext i1 %63 to i32
%65 = tail call i32 @assert(i32 %64)
%66 = tail call i32 @printList(%struct.node* %3)
%67 = load i32, i32* @EXIT_SUCCESS
ret i32 %67
}