#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 */
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
void pi_info_name(char *info_name, int size, const char *type,
                  const char *name) {
  if (type && name)
    snprintf(info_name, size, "%s_%s_PluginInfo", type, name);
  else if (type)
    snprintf(info_name, size, "%s_PluginInfo", type);
  else
    snprintf(info_name, size, "PluginInfo");
}


x86 assembly (clang, -O0):
<pi_info_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115f <pi_info_name+0x4f>
cmpq   $0x0,-0x20(%rbp)
je     115f <pi_info_name+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xead(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    11a2 <pi_info_name+0x92>
cmpq   $0x0,-0x18(%rbp)
je     1188 <pi_info_name+0x78>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
lea    0xe87(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    119d <pi_info_name+0x8d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe70(%rip),%rdx
mov    $0x0,%al
call   1030 <snprintf@plt>
jmp    11a2 <pi_info_name+0x92>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pi_info_name>:
mov    %rcx,%r8
mov    %rdx,%rcx
test   %rdx,%rdx
je     112e <pi_info_name+0x1e>
test   %r8,%r8
je     112e <pi_info_name+0x1e>
lea    0xed9(%rip),%rdx
xor    %eax,%eax
jmp    1030 <snprintf@plt>
test   %rcx,%rcx
je     1141 <pi_info_name+0x31>
lea    0xec9(%rip),%rdx
xor    %eax,%eax
jmp    1030 <snprintf@plt>
lea    0xebe(%rip),%rdx
xor    %eax,%eax
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s_%s_PluginInfo\00"
@.str.1 = [14 x i8] c"%s_PluginInfo\00"
@.str.2 = [11 x i8] c"PluginInfo\00"
define void @pi_info_name(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %20
11: ; preds = %4
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = load i8*, i8** %7
%18 = load i8*, i8** %8
%19 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %15, i32 %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
br label %33
20: ; preds = %11, %4
%21 = load i8*, i8** %7
%22 = icmp ne i8* %21, null
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i8*, i8** %5
%25 = load i32, i32* %6
%26 = load i8*, i8** %7
%27 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %24, i32 %25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %26)
br label %32
28: ; preds = %20
%29 = load i8*, i8** %5
%30 = load i32, i32* %6
%31 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %29, i32 %30, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %32
32: ; preds = %28, %23
br label %33
33: ; preds = %32, %14
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s_%s_PluginInfo\00"
@.str.1 = [14 x i8] c"%s_PluginInfo\00"
@.str.2 = [11 x i8] c"PluginInfo\00"
define void @pi_info_name(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = icmp ne i8* %2, null
%6 = icmp ne i8* %3, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
br label %15
10: ; preds = %4
br i1 %5, label %11, label %13
11: ; preds = %10
%12 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %15
13: ; preds = %10
%14 = tail call i32 (i8*, i32, i8*, ...) @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %11, %13, %8
ret void
}