#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*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcat(char *, char const *const);
int /*<<< orphan*/ strcpy(char *, char const *const);
char *set_print_name_container_member(const char *const name_container,
                                      int ind_container,
                                      const char *const name_member) {
  static char print_name[508];
  strcpy(print_name, name_container);
  strcat(print_name, "[");
  char ind_str[60];
  sprintf(ind_str, "%d", ind_container);
  strcat(print_name, ind_str);
  strcat(print_name, "]::");
  strcat(print_name, name_member);
  return print_name;
}


x86 assembly (clang, -O0):
<set_print_name_container_member>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f02(%rip),%rdi
call   1030 <strcpy@plt>
lea    0x2ef6(%rip),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <strcat@plt>
lea    -0x60(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe8e(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x60(%rbp),%rsi
lea    0x2ecc(%rip),%rdi
call   1040 <strcat@plt>
lea    0x2ec0(%rip),%rdi
lea    0xe6e(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x18(%rbp),%rsi
lea    0x2ea9(%rip),%rdi
call   1040 <strcat@plt>
lea    0x2e9d(%rip),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_print_name_container_member>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rsi
lea    0x2f07(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xea8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
lea    0xe9b(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcat@plt>
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
mov    %rbx,%rax
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@set_print_name_container_member.print_name = internal global [508 x i8] zeroinitializer
@.str = [2 x i8] c"[\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"]::\00"
define i8* @set_print_name_container_member(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [60 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = call i32 @strcpy(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %8)
%10 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [60 x i8], [60 x i8]* %7, i64 0, i64 0
%12 = load i32, i32* %5
%13 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [60 x i8], [60 x i8]* %7, i64 0, i64 0
%15 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %14)
%16 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%17 = load i8*, i8** %6
%18 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %17)
ret i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0)
}

LLVM IR (-O2):
@set_print_name_container_member.print_name = internal global [508 x i8] zeroinitializer
@.str = [2 x i8] c"[\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"]::\00"
define i8* @set_print_name_container_member(i8* %0, i32 %1, i8* %2) {
%4 = alloca [60 x i8]
%5 = tail call i32 @strcpy(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %0)
%6 = tail call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [60 x i8], [60 x i8]* %4, i64 0, i64 0
%8 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%9 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %7)
%10 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @strcat(i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0), i8* %2)
ret i8* getelementptr inbounds ([508 x i8], [508 x i8]* @set_print_name_container_member.print_name, i64 0, i64 0)
}