#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,
             void *exarg) {
  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    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb7(%rip),%rcx
cmp    (%rcx),%eax
jne    115a <nsseq_cb+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x30,%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, 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* %5
%11 = load i32, i32* @ASN1_OP_NEW_POST
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %4
%14 = load i32**, i32*** %6
%15 = load i32*, i32** %14
%16 = bitcast i32* %15 to %struct.TYPE_2__*
store %struct.TYPE_2__* %16, %struct.TYPE_2__** %9
%17 = load i32, i32* @NID_netscape_cert_sequence
%18 = call i32 @OBJ_nid2obj(i32 %17)
%19 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%20 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %19, i32 0, i32 0
store i32 %18, i32* %20
br label %21
21: ; preds = %13, %4
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, i8* nocapture readnone %3) {
%5 = load i32, i32* @ASN1_OP_NEW_POST
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = bitcast i32** %1 to %struct.TYPE_2__**
%9 = load %struct.TYPE_2__*, %struct.TYPE_2__** %8
%10 = load i32, i32* @NID_netscape_cert_sequence
%11 = tail call i32 @OBJ_nid2obj(i32 %10)
%12 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i64 0, i32 0
store i32 %11, i32* %12
br label %13
13: ; preds = %7, %4
ret i32 1
}