#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_BTypes(unsigned int *NBTypesOut, char ***BTypeOut) {
  unsigned int const NBTypes = 12;
  char **BType = malloc(NBTypes * sizeof *BType);
  for (size_t i = 0; i < NBTypes; i++)
    BType[i] = malloc(508 * sizeof *BType[i]);
  strcpy(BType[0], "SlipWall         ");
  strcpy(BType[1], "Riemann          ");
  strcpy(BType[2], "BackPressure     ");
  strcpy(BType[3], "Total_TP         ");
  strcpy(BType[4], "SupersonicIn     ");
  strcpy(BType[5], "SupersonicOut    ");
  strcpy(BType[6], "NoSlip_Dirichlet ");
  strcpy(BType[7], "NoSlip_Adiabatic ");
  strcpy(BType[8], "Poisson_Dirichlet");
  strcpy(BType[9], "Poisson_Neumann  ");
  strcpy(BType[10], "Advection_Inflow ");
  strcpy(BType[11], "Advection_Outflow");
  *NBTypesOut = NBTypes;
  *BTypeOut = BType;
}


x86 assembly (clang, -O0):
<set_BTypes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xc,-0x14(%rbp)
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
cmpq   $0xc,-0x28(%rbp)
jae    1182 <set_BTypes+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_BTypes+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    0xe6e(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe6c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe6a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xe68(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x28(%rax),%rdi
lea    0xe66(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x30(%rax),%rdi
lea    0xe64(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x38(%rax),%rdi
lea    0xe62(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x40(%rax),%rdi
lea    0xe60(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x48(%rax),%rdi
lea    0xe5e(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x50(%rax),%rdi
lea    0xe5c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    0x58(%rax),%rdi
lea    0xe5a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
movl   $0xc,(%rax)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_BTypes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,0x30(%rsp)
mov    %rdi,0x28(%rsp)
mov    $0x60,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x10(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    %rax,0x18(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r13
mov    %rax,0x20(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    %rax,0x28(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rax,0x30(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    %rax,0x38(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rax,0x40(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %rax,0x48(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rax,0x50(%rbx)
mov    $0x1fc,%edi
call   1040 <malloc@plt>
mov    %rax,(%rsp)
mov    %rax,0x58(%rbx)
lea    0xde6(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    0x8(%rbx),%rdi
lea    0xde5(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rdi
lea    0xde7(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xded(%rip),%rsi
mov    %r12,%rdi
call   1030 <strcpy@plt>
lea    0xdf0(%rip),%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
lea    0xdf3(%rip),%rsi
mov    %rbp,%rdi
call   1030 <strcpy@plt>
lea    0xdf6(%rip),%rsi
mov    0x20(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdf7(%rip),%rsi
mov    %r15,%rdi
call   1030 <strcpy@plt>
lea    0xdfa(%rip),%rsi
mov    0x18(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdfb(%rip),%rsi
mov    0x10(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdfc(%rip),%rsi
mov    0x8(%rsp),%rdi
call   1030 <strcpy@plt>
lea    0xdfd(%rip),%rsi
mov    (%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x28(%rsp),%rax
movl   $0xc,(%rax)
mov    0x30(%rsp),%rax
mov    %rbx,(%rax)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"SlipWall \00"
@.str.1 = [18 x i8] c"Riemann \00"
@.str.2 = [18 x i8] c"BackPressure \00"
@.str.3 = [18 x i8] c"Total_TP \00"
@.str.4 = [18 x i8] c"SupersonicIn \00"
@.str.5 = [18 x i8] c"SupersonicOut \00"
@.str.6 = [18 x i8] c"NoSlip_Dirichlet \00"
@.str.7 = [18 x i8] c"NoSlip_Adiabatic \00"
@.str.8 = [18 x i8] c"Poisson_Dirichlet\00"
@.str.9 = [18 x i8] c"Poisson_Neumann \00"
@.str.10 = [18 x i8] c"Advection_Inflow \00"
@.str.11 = [18 x i8] c"Advection_Outflow\00"
define void @set_BTypes(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 12, i32* %5
%8 = call i8* @malloc(i32 96)
%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, 12
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 ([18 x i8], [18 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 ([18 x i8], [18 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 ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%34 = load i8**, i8*** %6
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
%37 = call i32 @strcpy(i8* %36, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%38 = load i8**, i8*** %6
%39 = getelementptr inbounds i8*, i8** %38, i64 4
%40 = load i8*, i8** %39
%41 = call i32 @strcpy(i8* %40, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%42 = load i8**, i8*** %6
%43 = getelementptr inbounds i8*, i8** %42, i64 5
%44 = load i8*, i8** %43
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%46 = load i8**, i8*** %6
%47 = getelementptr inbounds i8*, i8** %46, i64 6
%48 = load i8*, i8** %47
%49 = call i32 @strcpy(i8* %48, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%50 = load i8**, i8*** %6
%51 = getelementptr inbounds i8*, i8** %50, i64 7
%52 = load i8*, i8** %51
%53 = call i32 @strcpy(i8* %52, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%54 = load i8**, i8*** %6
%55 = getelementptr inbounds i8*, i8** %54, i64 8
%56 = load i8*, i8** %55
%57 = call i32 @strcpy(i8* %56, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%58 = load i8**, i8*** %6
%59 = getelementptr inbounds i8*, i8** %58, i64 9
%60 = load i8*, i8** %59
%61 = call i32 @strcpy(i8* %60, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%62 = load i8**, i8*** %6
%63 = getelementptr inbounds i8*, i8** %62, i64 10
%64 = load i8*, i8** %63
%65 = call i32 @strcpy(i8* %64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%66 = load i8**, i8*** %6
%67 = getelementptr inbounds i8*, i8** %66, i64 11
%68 = load i8*, i8** %67
%69 = call i32 @strcpy(i8* %68, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
%70 = load i32*, i32** %3
store i32 12, i32* %70
%71 = load i8**, i8*** %6
%72 = load i8***, i8**** %4
store i8** %71, i8*** %72
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"SlipWall \00"
@.str.1 = [18 x i8] c"Riemann \00"
@.str.2 = [18 x i8] c"BackPressure \00"
@.str.3 = [18 x i8] c"Total_TP \00"
@.str.4 = [18 x i8] c"SupersonicIn \00"
@.str.5 = [18 x i8] c"SupersonicOut \00"
@.str.6 = [18 x i8] c"NoSlip_Dirichlet \00"
@.str.7 = [18 x i8] c"NoSlip_Adiabatic \00"
@.str.8 = [18 x i8] c"Poisson_Dirichlet\00"
@.str.9 = [18 x i8] c"Poisson_Neumann \00"
@.str.10 = [18 x i8] c"Advection_Inflow \00"
@.str.11 = [18 x i8] c"Advection_Outflow\00"
define void @set_BTypes(i32* nocapture writeonly %0, i8*** nocapture writeonly %1) {
%3 = tail call dereferenceable_or_null(96) i8* @malloc(i32 96)
%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 dereferenceable_or_null(508) i8* @malloc(i32 508)
%11 = getelementptr inbounds i8*, i8** %4, i64 3
store i8* %10, i8** %11
%12 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%13 = getelementptr inbounds i8*, i8** %4, i64 4
store i8* %12, i8** %13
%14 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%15 = getelementptr inbounds i8*, i8** %4, i64 5
store i8* %14, i8** %15
%16 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%17 = getelementptr inbounds i8*, i8** %4, i64 6
store i8* %16, i8** %17
%18 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%19 = getelementptr inbounds i8*, i8** %4, i64 7
store i8* %18, i8** %19
%20 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%21 = getelementptr inbounds i8*, i8** %4, i64 8
store i8* %20, i8** %21
%22 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%23 = getelementptr inbounds i8*, i8** %4, i64 9
store i8* %22, i8** %23
%24 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%25 = getelementptr inbounds i8*, i8** %4, i64 10
store i8* %24, i8** %25
%26 = tail call dereferenceable_or_null(508) i8* @malloc(i32 508)
%27 = getelementptr inbounds i8*, i8** %4, i64 11
store i8* %26, i8** %27
%28 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%29 = load i8*, i8** %7
%30 = tail call i32 @strcpy(i8* %29, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%31 = load i8*, i8** %9
%32 = tail call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%33 = tail call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
%34 = tail call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%35 = tail call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%36 = tail call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%37 = tail call i32 @strcpy(i8* %18, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%38 = tail call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0))
%39 = tail call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%40 = tail call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%41 = tail call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
store i32 12, i32* %0
%42 = bitcast i8*** %1 to i8**
store i8* %3, i8** %42
ret void
}