#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 /*<<< orphan*/ ft_memdel(void *);
int pf_alloc_ret(int ret, char *s1, char *s2, char *s3) {
  (s1 ? ft_memdel((void *)&s1) : 0);
  (s2 ? ft_memdel((void *)&s2) : 0);
  (s3 ? ft_memdel((void *)&s3) : 0);
  return (ret);
}


x86 assembly (clang, -O0):
<pf_alloc_ret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <pf_alloc_ret+0x30>
lea    -0x10(%rbp),%rdi
call   1030 <ft_memdel@plt>
jmp    1145 <pf_alloc_ret+0x35>
jmp    1145 <pf_alloc_ret+0x35>
cmpq   $0x0,-0x18(%rbp)
je     115e <pf_alloc_ret+0x4e>
lea    -0x18(%rbp),%rdi
call   1030 <ft_memdel@plt>
jmp    1163 <pf_alloc_ret+0x53>
jmp    1163 <pf_alloc_ret+0x53>
cmpq   $0x0,-0x20(%rbp)
je     117c <pf_alloc_ret+0x6c>
lea    -0x20(%rbp),%rdi
call   1030 <ft_memdel@plt>
jmp    1181 <pf_alloc_ret+0x71>
jmp    1181 <pf_alloc_ret+0x71>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pf_alloc_ret>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%rbx
mov    %rdx,%rbp
mov    %edi,%r14d
mov    %rsi,0x18(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rcx,0x8(%rsp)
test   %rsi,%rsi
je     113f <pf_alloc_ret+0x2f>
lea    0x18(%rsp),%rdi
call   1030 <ft_memdel@plt>
test   %rbp,%rbp
je     114e <pf_alloc_ret+0x3e>
lea    0x10(%rsp),%rdi
call   1030 <ft_memdel@plt>
test   %rbx,%rbx
je     115d <pf_alloc_ret+0x4d>
lea    0x8(%rsp),%rdi
call   1030 <ft_memdel@plt>
mov    %r14d,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pf_alloc_ret(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = bitcast i8** %6 to i8*
%13 = call i32 @ft_memdel(i8* %12)
br label %15
14: ; preds = %4
br label %15
15: ; preds = %14, %11
%16 = phi i32 [ %13, %11 ], [ 0, %14 ]
%17 = load i8*, i8** %7
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = bitcast i8** %7 to i8*
%21 = call i32 @ft_memdel(i8* %20)
br label %23
22: ; preds = %15
br label %23
23: ; preds = %22, %19
%24 = phi i32 [ %21, %19 ], [ 0, %22 ]
%25 = load i8*, i8** %8
%26 = icmp ne i8* %25, null
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = bitcast i8** %8 to i8*
%29 = call i32 @ft_memdel(i8* %28)
br label %31
30: ; preds = %23
br label %31
31: ; preds = %30, %27
%32 = phi i32 [ %29, %27 ], [ 0, %30 ]
%33 = load i32, i32* %5
ret i32 %33
}

LLVM IR (-O2):
define i32 @pf_alloc_ret(i32 returned %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %1, i8** %5
store i8* %2, i8** %6
store i8* %3, i8** %7
%8 = icmp eq i8* %1, null
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = bitcast i8** %5 to i8*
%11 = call i32 @ft_memdel(i8* %10)
br label %12
12: ; preds = %4, %9
%13 = icmp eq i8* %2, null
br i1 %13, label %17, label %14
14: ; preds = %12
%15 = bitcast i8** %6 to i8*
%16 = call i32 @ft_memdel(i8* %15)
br label %17
17: ; preds = %12, %14
%18 = icmp eq i8* %3, null
br i1 %18, label %22, label %19
19: ; preds = %17
%20 = bitcast i8** %7 to i8*
%21 = call i32 @ft_memdel(i8* %20)
br label %22
22: ; preds = %17, %19
ret i32 %0
}