#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 pminisock_key {
  int dummy;
};
struct ParsedPMinisock_cell {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ParsedPMinisock_deleteCell(struct ParsedPMinisock_cell *);
int ParsedPMinisock_find_helper(struct pminisock_key *,
                                struct ParsedPMinisock_cell **);
int ParsedPMinisock_delete(struct pminisock_key *key) {
  struct ParsedPMinisock_cell *cell = ((void *)0);
  int found = ParsedPMinisock_find_helper(key, &cell);
  if ((found)) {
    ParsedPMinisock_deleteCell(cell);
  };
  return found;
}


x86 assembly (clang, -O0):
<ParsedPMinisock_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <ParsedPMinisock_find_helper@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1157 <ParsedPMinisock_delete+0x37>
mov    -0x10(%rbp),%rdi
call   1030 <ParsedPMinisock_deleteCell@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ParsedPMinisock_delete>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1040 <ParsedPMinisock_find_helper@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1148 <ParsedPMinisock_delete+0x28>
mov    0x8(%rsp),%rdi
call   1030 <ParsedPMinisock_deleteCell@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.pminisock_key = type { i32 }
%struct.ParsedPMinisock_cell = type { i32 }
define i32 @ParsedPMinisock_delete(%struct.pminisock_key* %0) {
%2 = alloca %struct.pminisock_key*
%3 = alloca %struct.ParsedPMinisock_cell*
%4 = alloca i32
store %struct.pminisock_key* %0, %struct.pminisock_key** %2
store %struct.ParsedPMinisock_cell* null, %struct.ParsedPMinisock_cell** %3
%5 = load %struct.pminisock_key*, %struct.pminisock_key** %2
%6 = call i32 @ParsedPMinisock_find_helper(%struct.pminisock_key* %5, %struct.ParsedPMinisock_cell** %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load %struct.ParsedPMinisock_cell*, %struct.ParsedPMinisock_cell** %3
%11 = call i32 @ParsedPMinisock_deleteCell(%struct.ParsedPMinisock_cell* %10)
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
%struct.pminisock_key = type { i32 }
%struct.ParsedPMinisock_cell = type { i32 }
define i32 @ParsedPMinisock_delete(%struct.pminisock_key* %0) {
%2 = alloca %struct.ParsedPMinisock_cell*
%3 = bitcast %struct.ParsedPMinisock_cell** %2 to i8*
store %struct.ParsedPMinisock_cell* null, %struct.ParsedPMinisock_cell** %2
%4 = call i32 @ParsedPMinisock_find_helper(%struct.pminisock_key* %0, %struct.ParsedPMinisock_cell** %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load %struct.ParsedPMinisock_cell*, %struct.ParsedPMinisock_cell** %2
%8 = call i32 @ParsedPMinisock_deleteCell(%struct.ParsedPMinisock_cell* %7)
br label %9
9: ; preds = %6, %1
ret i32 %4
}