#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 */
char const *SWIG_UnpackData(char const *, void **, int);
scalar_t__ strcmp(char const *, char *);
__attribute__((unused)) const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c, "NULL") == 0) {
      *ptr = (void *)0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c, ptr, sizeof(void *));
}


x86 assembly (clang, -O0):
<SWIG_UnpackVoidPtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5f,%eax
je     1183 <SWIG_UnpackVoidPtr+0x63>
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1176 <SWIG_UnpackVoidPtr+0x56>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a1 <SWIG_UnpackVoidPtr+0x81>
movq   $0x0,-0x8(%rbp)
jmp    11a1 <SWIG_UnpackVoidPtr+0x81>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1040 <SWIG_UnpackData@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWIG_UnpackVoidPtr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmpb   $0x5f,(%rdi)
jne    1144 <SWIG_UnpackVoidPtr+0x24>
add    $0x1,%rdi
mov    %rbx,%rsi
mov    $0x8,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <SWIG_UnpackData@plt>
mov    %rdx,%r14
lea    0xeb2(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     115d <SWIG_UnpackVoidPtr+0x3d>
xor    %r14d,%r14d
jmp    1164 <SWIG_UnpackVoidPtr+0x44>
movq   $0x0,(%rbx)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"NULL\00"
define i8* @SWIG_UnpackVoidPtr(i8* %0, i8** %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 95
br i1 %11, label %12, label %20
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i8**, i8*** %6
store i8* null, i8** %17
%18 = load i8*, i8** %7
store i8* %18, i8** %4
br label %25
19: ; preds = %12
store i8* null, i8** %4
br label %25
20: ; preds = %3
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %5
%23 = load i8**, i8*** %6
%24 = call i8* @SWIG_UnpackData(i8* %22, i8** %23, i32 8)
store i8* %24, i8** %4
br label %25
25: ; preds = %20, %19, %16
%26 = load i8*, i8** %4
ret i8* %26
}

LLVM IR (-O2):
@.str = [5 x i8] c"NULL\00"
define i8* @SWIG_UnpackVoidPtr(i8* %0, i8** %1, i8* readnone %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 95
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
store i8* null, i8** %1
br label %13
10: ; preds = %3
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = tail call i8* @SWIG_UnpackData(i8* %11, i8** %1, i32 8)
br label %13
13: ; preds = %6, %10, %9
%14 = phi i8* [ %2, %9 ], [ %12, %10 ], [ null, %6 ]
ret i8* %14
}