#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 */
void free(void *);
void CRYPTO_get_mem_ex_functions(void *(**m)(size_t, const char *, int),
                                 void *(**r)(void *, size_t, const char *, int),
                                 void (**f)(void *)) {
  if (m != NULL)
    *m = NULL;
  if (r != NULL)
    *r = NULL;
  if (f != NULL)
    *f = free;
}


x86 assembly (clang, -O0):
<CRYPTO_get_mem_ex_functions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1126 <CRYPTO_get_mem_ex_functions+0x26>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113c <CRYPTO_get_mem_ex_functions+0x3c>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1155 <CRYPTO_get_mem_ex_functions+0x55>
mov    -0x18(%rbp),%rax
mov    0x2e86(%rip),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_get_mem_ex_functions>:
test   %rdi,%rdi
je     110c <CRYPTO_get_mem_ex_functions+0xc>
movq   $0x0,(%rdi)
test   %rsi,%rsi
je     1118 <CRYPTO_get_mem_ex_functions+0x18>
movq   $0x0,(%rsi)
test   %rdx,%rdx
je     1127 <CRYPTO_get_mem_ex_functions+0x27>
mov    0x2eb4(%rip),%rax
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @CRYPTO_get_mem_ex_functions(i8* (i64, i8*, i32)** %0, i8* (i8*, i64, i8*, i32)** %1, void (i8*)** %2) {
%4 = alloca i8* (i64, i8*, i32)**
%5 = alloca i8* (i8*, i64, i8*, i32)**
%6 = alloca void (i8*)**
store i8* (i64, i8*, i32)** %0, i8* (i64, i8*, i32)*** %4
store i8* (i8*, i64, i8*, i32)** %1, i8* (i8*, i64, i8*, i32)*** %5
store void (i8*)** %2, void (i8*)*** %6
%7 = load i8* (i64, i8*, i32)**, i8* (i64, i8*, i32)*** %4
%8 = icmp ne i8* (i64, i8*, i32)** %7, null
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load i8* (i64, i8*, i32)**, i8* (i64, i8*, i32)*** %4
store i8* (i64, i8*, i32)* null, i8* (i64, i8*, i32)** %10
br label %11
11: ; preds = %9, %3
%12 = load i8* (i8*, i64, i8*, i32)**, i8* (i8*, i64, i8*, i32)*** %5
%13 = icmp ne i8* (i8*, i64, i8*, i32)** %12, null
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i8* (i8*, i64, i8*, i32)**, i8* (i8*, i64, i8*, i32)*** %5
store i8* (i8*, i64, i8*, i32)* null, i8* (i8*, i64, i8*, i32)** %15
br label %16
16: ; preds = %14, %11
%17 = load void (i8*)**, void (i8*)*** %6
%18 = icmp ne void (i8*)** %17, null
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load void (i8*)**, void (i8*)*** %6
store void (i8*)* @free, void (i8*)** %20
br label %21
21: ; preds = %19, %16
ret void
}

LLVM IR (-O2):
define void @CRYPTO_get_mem_ex_functions(i8* (i64, i8*, i32)** writeonly %0, i8* (i8*, i64, i8*, i32)** writeonly %1, void (i8*)** writeonly %2) {
%4 = icmp eq i8* (i64, i8*, i32)** %0, null
br i1 %4, label %6, label %5
5: ; preds = %3
store i8* (i64, i8*, i32)* null, i8* (i64, i8*, i32)** %0
br label %6
6: ; preds = %5, %3
%7 = icmp eq i8* (i8*, i64, i8*, i32)** %1, null
br i1 %7, label %9, label %8
8: ; preds = %6
store i8* (i8*, i64, i8*, i32)* null, i8* (i8*, i64, i8*, i32)** %1
br label %9
9: ; preds = %8, %6
%10 = icmp eq void (i8*)** %2, null
br i1 %10, label %12, label %11
11: ; preds = %9
store void (i8*)* @free, void (i8*)** %2
br label %12
12: ; preds = %11, %9
ret void
}