#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*/ strcpy(char *, char *);
char **getConservativeVariableNames(char *names[]) {
  char *consVarNames[] = {"rho", "rho u", "E"};
  int var;
  for (var = 0; var < 3; var++) {
    strcpy(names[var], consVarNames[var]);
  }
  return names;
}


x86 assembly (clang, -O0):
<getConservativeVariableNames>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2cdd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    1176 <getConservativeVariableNames+0x66>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rsi
call   1030 <strcpy@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1144 <getConservativeVariableNames+0x34>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getConservativeVariableNames>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0xee2(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x8(%rbx),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rdi
lea    0xecc(%rip),%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"rho\00"
@.str.1 = [6 x i8] c"rho u\00"
@.str.2 = [2 x i8] c"E\00"
@__const.getConservativeVariableNames.consVarNames = [3 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)]
define i8** @getConservativeVariableNames(i8** %0) {
%2 = alloca i8**
%3 = alloca [3 x i8*]
%4 = alloca i32
store i8** %0, i8*** %2
%5 = bitcast [3 x i8*]* %3 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %20, %1
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i8**, i8*** %2
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %10, i64 %12
%14 = load i8*, i8** %13
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @strcpy(i8* %14, i8* %18)
br label %20
20: ; preds = %9
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %6
23: ; preds = %6
%24 = load i8**, i8*** %2
ret i8** %24
}

LLVM IR (-O2):
@.str = [4 x i8] c"rho\00"
@.str.1 = [6 x i8] c"rho u\00"
@.str.2 = [2 x i8] c"E\00"
define i8** @getConservativeVariableNames(i8** returned %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds i8*, i8** %0, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds i8*, i8** %0, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i8** %0
}