#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*/ type;
};
typedef TYPE_1__ NETSCAPE_CERT_SEQUENCE;
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int ASN1_OP_NEW_POST;
int /*<<< orphan*/ NID_netscape_cert_sequence;
int /*<<< orphan*/ OBJ_nid2obj(int /*<<< orphan*/);
int nsseq_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) {
  if (operation == ASN1_OP_NEW_POST) {
    NETSCAPE_CERT_SEQUENCE *nsseq;
    nsseq = (NETSCAPE_CERT_SEQUENCE *)*pval;
    nsseq->type = OBJ_nid2obj(NID_netscape_cert_sequence);
  }
  return 1;
}


x86 assembly (clang, -O0):
<nsseq_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    1156 <nsseq_cb+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsseq_cb>:
push   %rbx
mov    0x2ed0(%rip),%rax
cmp    %edi,(%rax)
jne    112f <nsseq_cb+0x1f>
mov    (%rsi),%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
@ASN1_OP_NEW_POST = global i32 0
@NID_netscape_cert_sequence = global i32 0
define i32 @nsseq_cb(i32 %0, i32** %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32**
%6 = alloca i32*
%7 = alloca %struct.TYPE_2__*
store i32 %0, i32* %4
store i32** %1, i32*** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load i32, i32* @ASN1_OP_NEW_POST
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %3
%12 = load i32**, i32*** %5
%13 = load i32*, i32** %12
%14 = bitcast i32* %13 to %struct.TYPE_2__*
store %struct.TYPE_2__* %14, %struct.TYPE_2__** %7
%15 = load i32, i32* @NID_netscape_cert_sequence
%16 = call i32 @OBJ_nid2obj(i32 %15)
%17 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%18 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %17, i32 0, i32 0
store i32 %16, i32* %18
br label %19
19: ; preds = %11, %3
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32 }
@ASN1_OP_NEW_POST = global i32 0
@NID_netscape_cert_sequence = global i32 0
define i32 @nsseq_cb(i32 %0, i32** nocapture %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ASN1_OP_NEW_POST
%5 = icmp eq i32 %4, %0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = bitcast i32** %1 to %struct.TYPE_2__**
%8 = load %struct.TYPE_2__*, %struct.TYPE_2__** %7
%9 = load i32, i32* @NID_netscape_cert_sequence
%10 = tail call i32 @OBJ_nid2obj(i32 %9)
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i64 0, i32 0
store i32 %10, i32* %11
br label %12
12: ; preds = %6, %3
ret i32 1
}