#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 */
void *malloc(unsigned int const);
int /*<<< orphan*/ strcpy(char *, char *);
void set_FiTypes(unsigned int *NFiTypesOut, char ***FiTypeOut) {
  unsigned int const NFiTypes = 2;
  char **FiType = malloc(NFiTypes * sizeof *FiType);
  for (size_t i = 0; i < NFiTypes; i++)
    FiType[i] = malloc(508 * sizeof *FiType[i]);
  strcpy(FiType[0], "Advection");
  strcpy(FiType[1], "Euler    ");
  *NFiTypesOut = NFiTypes;
  *FiTypeOut = FiType;
}


x86 assembly (clang, -O0):
<set_FiTypes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x2,-0x28(%rbp)
jae    1182 <set_FiTypes+0x62>
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    114d <set_FiTypes+0x2d>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
lea    0xe70(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe66(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_FiTypes>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,(%r12)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r13
mov    %rax,0x8(%r12)
lea    0xe9a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe95(%rip),%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
movl   $0x2,(%r15)
mov    %r12,(%r14)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"Advection\00"
@.str.1 = [10 x i8] c"Euler \00"
define void @set_FiTypes(i32* nocapture writeonly %0, i8*** nocapture writeonly %1) {
%3 = tail call dereferenceable_or_null(16) i8* @malloc(i32 16)
%4 = bitcast i8* %3 to i8**
%5 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
store i8* %5, i8** %4
%6 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%7 = getelementptr inbounds i8*, i8** %4, i64 1
store i8* %6, i8** %7
%8 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store i32 2, i32* %0
%10 = bitcast i8*** %1 to i8**
store i8* %3, i8** %10
ret void
}