#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 bclist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bclist_add(struct bclist *, int);
int /*<<< orphan*/ bclist_delete(struct bclist *, int);
struct bclist *bclist_init(int /*<<< orphan*/);
int /*<<< orphan*/ bclist_print(struct bclist *);
int /*<<< orphan*/ bclist_release(struct bclist *);
int main(int argc, char **argv) {
  const int ret = 0;
  struct bclist *h = NULL;
  h = bclist_init(0);
  bclist_add(h, 1);
  bclist_add(h, 2);
  bclist_add(h, 3);
  bclist_add(h, 2);
  bclist_print(h);
  bclist_delete(h, 2);
  bclist_add(h, 5);
  bclist_print(h);
  bclist_release(h);
  bclist_print(h);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
xor    %edi,%edi
call   1050 <bclist_init@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x1,%esi
call   1060 <bclist_add@plt>
mov    -0x20(%rbp),%rdi
mov    $0x2,%esi
call   1060 <bclist_add@plt>
mov    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1060 <bclist_add@plt>
mov    -0x20(%rbp),%rdi
mov    $0x2,%esi
call   1060 <bclist_add@plt>
mov    -0x20(%rbp),%rdi
call   1070 <bclist_print@plt>
mov    -0x20(%rbp),%rdi
mov    $0x2,%esi
call   1040 <bclist_delete@plt>
mov    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1060 <bclist_add@plt>
mov    -0x20(%rbp),%rdi
call   1070 <bclist_print@plt>
mov    -0x20(%rbp),%rdi
call   1030 <bclist_release@plt>
mov    -0x20(%rbp),%rdi
call   1070 <bclist_print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <bclist_init@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1,%esi
call   1060 <bclist_add@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1060 <bclist_add@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1060 <bclist_add@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1060 <bclist_add@plt>
mov    %rbx,%rdi
call   1070 <bclist_print@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <bclist_delete@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1060 <bclist_add@plt>
mov    %rbx,%rdi
call   1070 <bclist_print@plt>
mov    %rbx,%rdi
call   1030 <bclist_release@plt>
mov    %rbx,%rdi
call   1070 <bclist_print@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.bclist = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.bclist*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store %struct.bclist* null, %struct.bclist** %7
%8 = call %struct.bclist* @bclist_init(i32 0)
store %struct.bclist* %8, %struct.bclist** %7
%9 = load %struct.bclist*, %struct.bclist** %7
%10 = call i32 @bclist_add(%struct.bclist* %9, i32 1)
%11 = load %struct.bclist*, %struct.bclist** %7
%12 = call i32 @bclist_add(%struct.bclist* %11, i32 2)
%13 = load %struct.bclist*, %struct.bclist** %7
%14 = call i32 @bclist_add(%struct.bclist* %13, i32 3)
%15 = load %struct.bclist*, %struct.bclist** %7
%16 = call i32 @bclist_add(%struct.bclist* %15, i32 2)
%17 = load %struct.bclist*, %struct.bclist** %7
%18 = call i32 @bclist_print(%struct.bclist* %17)
%19 = load %struct.bclist*, %struct.bclist** %7
%20 = call i32 @bclist_delete(%struct.bclist* %19, i32 2)
%21 = load %struct.bclist*, %struct.bclist** %7
%22 = call i32 @bclist_add(%struct.bclist* %21, i32 5)
%23 = load %struct.bclist*, %struct.bclist** %7
%24 = call i32 @bclist_print(%struct.bclist* %23)
%25 = load %struct.bclist*, %struct.bclist** %7
%26 = call i32 @bclist_release(%struct.bclist* %25)
%27 = load %struct.bclist*, %struct.bclist** %7
%28 = call i32 @bclist_print(%struct.bclist* %27)
ret i32 0
}

LLVM IR (-O2):
%struct.bclist = type { i32 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.bclist* @bclist_init(i32 0)
%4 = tail call i32 @bclist_add(%struct.bclist* %3, i32 1)
%5 = tail call i32 @bclist_add(%struct.bclist* %3, i32 2)
%6 = tail call i32 @bclist_add(%struct.bclist* %3, i32 3)
%7 = tail call i32 @bclist_add(%struct.bclist* %3, i32 2)
%8 = tail call i32 @bclist_print(%struct.bclist* %3)
%9 = tail call i32 @bclist_delete(%struct.bclist* %3, i32 2)
%10 = tail call i32 @bclist_add(%struct.bclist* %3, i32 5)
%11 = tail call i32 @bclist_print(%struct.bclist* %3)
%12 = tail call i32 @bclist_release(%struct.bclist* %3)
%13 = tail call i32 @bclist_print(%struct.bclist* %3)
ret i32 0
}