#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 *SWIG_PackData(char *, void **, int);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
__attribute__((unused)) char *SWIG_PackVoidPtr(char *buff, void *ptr,
                                               const char *name, size_t bsz) {
  char *r = buff;
  if ((2 * sizeof(void *) + 2) > bsz)
    return 0;
  *(r++) = '_';
  r = SWIG_PackData(r, &ptr, sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff)))
    return 0;
  strcpy(r, name);
  return buff;
}


x86 assembly (clang, -O0):
<SWIG_PackVoidPtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x12,%eax
cmp    -0x28(%rbp),%rax
jbe    116c <SWIG_PackVoidPtr+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    11de <SWIG_PackVoidPtr+0xae>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x30(%rbp)
movb   $0x5f,(%rax)
mov    -0x30(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <SWIG_PackData@plt>
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <strlen@plt>
add    $0x1,%rax
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%rdx
mov    -0x10(%rbp),%rsi
sub    %rsi,%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jbe    11c9 <SWIG_PackVoidPtr+0x99>
movq   $0x0,-0x8(%rbp)
jmp    11de <SWIG_PackVoidPtr+0xae>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWIG_PackVoidPtr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,(%rsp)
cmp    $0x12,%rcx
jb     117a <SWIG_PackVoidPtr+0x4a>
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rdi,%r15
add    $0x1,%rdi
movb   $0x5f,(%r15)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <SWIG_PackData@plt>
mov    %rax,%r12
mov    %r14,%rdi
call   1050 <strlen@plt>
add    $0x1,%rax
add    %r15,%rbx
sub    %r12,%rbx
cmp    %rbx,%rax
jbe    117f <SWIG_PackVoidPtr+0x4f>
xor    %r15d,%r15d
jmp    118a <SWIG_PackVoidPtr+0x5a>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @SWIG_PackVoidPtr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
%11 = load i8*, i8** %6
store i8* %11, i8** %10
%12 = load i64, i64* %9
%13 = icmp ugt i64 18, %12
br i1 %13, label %14, label %15
14: ; preds = %4
store i8* null, i8** %5
br label %37
15: ; preds = %4
%16 = load i8*, i8** %10
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %10
store i8 95, i8* %16
%18 = load i8*, i8** %10
%19 = call i8* @SWIG_PackData(i8* %18, i8** %7, i32 8)
store i8* %19, i8** %10
%20 = load i8*, i8** %8
%21 = call i64 @strlen(i8* %20)
%22 = add i64 %21, 1
%23 = load i64, i64* %9
%24 = load i8*, i8** %10
%25 = load i8*, i8** %6
%26 = ptrtoint i8* %24 to i64
%27 = ptrtoint i8* %25 to i64
%28 = sub i64 %26, %27
%29 = sub i64 %23, %28
%30 = icmp ugt i64 %22, %29
br i1 %30, label %31, label %32
31: ; preds = %15
store i8* null, i8** %5
br label %37
32: ; preds = %15
%33 = load i8*, i8** %10
%34 = load i8*, i8** %8
%35 = call i32 @strcpy(i8* %33, i8* %34)
%36 = load i8*, i8** %6
store i8* %36, i8** %5
br label %37
37: ; preds = %32, %31, %14
%38 = load i8*, i8** %5
ret i8* %38
}

LLVM IR (-O2):
define i8* @SWIG_PackVoidPtr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
store i8* %1, i8** %5
%6 = icmp ult i64 %3, 18
br i1 %6, label %19, label %7
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %0, i64 1
store i8 95, i8* %0
%9 = call i8* @SWIG_PackData(i8* %8, i8** %5, i32 8)
%10 = call i64 @strlen(i8* dereferenceable(1) %2)
%11 = add i64 %10, 1
%12 = ptrtoint i8* %9 to i64
%13 = ptrtoint i8* %0 to i64
%14 = add i64 %13, %3
%15 = sub i64 %14, %12
%16 = icmp ugt i64 %11, %15
br i1 %16, label %19, label %17
17: ; preds = %7
%18 = call i32 @strcpy(i8* %9, i8* %2)
br label %19
19: ; preds = %7, %4, %17
%20 = phi i8* [ %0, %17 ], [ null, %4 ], [ null, %7 ]
ret i8* %20
}