#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 */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *dpname;
};
typedef TYPE_1__ DIST_POINT_NAME;
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
#define ASN1_OP_FREE_POST 129
#define ASN1_OP_NEW_POST 128
int /*<<< orphan*/ X509_NAME_free(int /*<<< orphan*/ *);
int dpn_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) {
  DIST_POINT_NAME *dpn = (DIST_POINT_NAME *)*pval;
  switch (operation) {
  case ASN1_OP_NEW_POST:
    dpn->dpname = NULL;
    break;
  case ASN1_OP_FREE_POST:
    if (dpn->dpname)
      X509_NAME_free(dpn->dpname);
    break;
  }
  return 1;
}


x86 assembly (clang, -O0):
<dpn_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x80,%eax
je     115b <dpn_cb+0x4b>
jmp    1148 <dpn_cb+0x38>
mov    -0x2c(%rbp),%eax
sub    $0x81,%eax
je     116b <dpn_cb+0x5b>
jmp    118a <dpn_cb+0x7a>
mov    -0x28(%rbp),%rax
movq   $0x0,(%rax)
jmp    118a <dpn_cb+0x7a>
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
je     1185 <dpn_cb+0x75>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1030 <X509_NAME_free@plt>
jmp    118a <dpn_cb+0x7a>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpn_cb>:
push   %rax
mov    (%rsi),%rax
cmp    $0x81,%edi
je     112d <dpn_cb+0x1d>
cmp    $0x80,%edi
jne    113a <dpn_cb+0x2a>
movq   $0x0,(%rax)
jmp    113a <dpn_cb+0x2a>
mov    (%rax),%rdi
test   %rdi,%rdi
je     113a <dpn_cb+0x2a>
call   1030 <X509_NAME_free@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define i32 @dpn_cb(i32 %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca %struct.TYPE_2__*
store i32 %0, i32* %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%10 = load i32**, i32*** %6
%11 = load i32*, i32** %10
%12 = bitcast i32* %11 to %struct.TYPE_2__*
store %struct.TYPE_2__* %12, %struct.TYPE_2__** %9
%13 = load i32, i32* %5
switch i32 %13, label %28 [
i32 128, label %14
i32 129, label %17
]
14: ; preds = %4
%15 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%16 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %15, i32 0, i32 0
store i32* null, i32** %16
br label %28
17: ; preds = %4
%18 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%19 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %18, i32 0, i32 0
%20 = load i32*, i32** %19
%21 = icmp ne i32* %20, null
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%24 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %23, i32 0, i32 0
%25 = load i32*, i32** %24
%26 = call i32 @X509_NAME_free(i32* %25)
br label %27
27: ; preds = %22, %17
br label %28
28: ; preds = %4, %27, %14
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32* }
define i32 @dpn_cb(i32 %0, i32** nocapture %1, i32* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = bitcast i32** %1 to %struct.TYPE_2__**
%6 = load %struct.TYPE_2__*, %struct.TYPE_2__** %5
switch i32 %0, label %15 [
i32 128, label %7
i32 129, label %9
]
7: ; preds = %4
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i64 0, i32 0
store i32* null, i32** %8
br label %15
9: ; preds = %4
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i64 0, i32 0
%11 = load i32*, i32** %10
%12 = icmp eq i32* %11, null
br i1 %12, label %15, label %13
13: ; preds = %9
%14 = tail call i32 @X509_NAME_free(i32* %11)
br label %15
15: ; preds = %9, %13, %4, %7
ret i32 1
}