#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_FNumTypes(unsigned int *NFNumTypesOut, char ***FNumTypeOut) {
  unsigned int const NFNumTypes = 3;
  char **FNumType = malloc(NFNumTypes * sizeof *FNumType);
  for (size_t i = 0; i < NFNumTypes; i++)
    FNumType[i] = malloc(508 * sizeof *FNumType[i]);
  strcpy(FNumType[0], "LF     ");
  strcpy(FNumType[1], "RoePike");
  strcpy(FNumType[2], "Upwind ");
  *NFNumTypesOut = NFNumTypes;
  *FNumTypeOut = FNumType;
}


x86 assembly (clang, -O0):
<set_FNumTypes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0x3,-0x28(%rbp)
jae    1182 <set_FNumTypes+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_FNumTypes+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    0xe64(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe58(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_FNumTypes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x18,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    %rax,(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r13
mov    %rax,0x8(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    %rax,0x10(%rbx)
lea    0xe89(%rip),%rsi
mov    %r12,%rdi
call   1030 <strcpy@plt>
lea    0xe82(%rip),%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
lea    0xe7b(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcpy@plt>
movl   $0x3,(%r15)
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"LF \00"
@.str.1 = [8 x i8] c"RoePike\00"
@.str.2 = [8 x i8] c"Upwind \00"
define void @set_FNumTypes(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 3, i32* %5
%8 = call i8* @malloc(i32 24)
%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, 3
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 ([8 x i8], [8 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 ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%30 = load i8**, i8*** %6
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @strcpy(i8* %32, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%34 = load i32*, i32** %3
store i32 3, i32* %34
%35 = load i8**, i8*** %6
%36 = load i8***, i8**** %4
store i8** %35, i8*** %36
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"LF \00"
@.str.1 = [8 x i8] c"RoePike\00"
@.str.2 = [8 x i8] c"Upwind \00"
define void @set_FNumTypes(i32* nocapture writeonly %0, i8*** nocapture writeonly %1) {
%3 = tail call dereferenceable_or_null(24) i8* @malloc(i32 24)
%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 dereferenceable_or_null(508) i8* @malloc(i32 508)
%9 = getelementptr inbounds i8*, i8** %4, i64 2
store i8* %8, i8** %9
%10 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
store i32 3, i32* %0
%13 = bitcast i8*** %1 to i8**
store i8* %3, i8** %13
ret void
}