#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 code_table_4_0(unsigned char **);
unsigned char *
number_of_forecasts_in_the_ensemble_location(unsigned char **sec) {
  int pdt, nb;
  unsigned char *p;
  pdt = code_table_4_0(sec);
  switch (pdt) {
  case 1:
  case 11:
  case 60:
  case 61:
    p = sec[4] + 36;
    break;
  case 2:
  case 3:
  case 4:
  case 12:
  case 13:
    p = sec[4] + 35;
    break;
  case 33:
  case 34:
    nb = sec[4][22];
    p = sec[4] + 25 + 11 * nb;
    break;
  case 41:
  case 43:
    p = sec[4] + 38;
    break;
  case 71:
  case 73:
    p = sec[4] + 41;
    break;
  default:
    p = NULL;
    break;
  }
  return p;
}


x86 assembly (clang, -O0):
<number_of_forecasts_in_the_ensemble_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <code_table_4_0@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x48,%eax
ja     11d3 <number_of_forecasts_in_the_ensemble_location+0xc3>
mov    -0x20(%rbp),%rax
lea    0xeb8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x24,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <number_of_forecasts_in_the_ensemble_location+0xcb>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x23,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <number_of_forecasts_in_the_ensemble_location+0xcb>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
movzbl 0x16(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x19,%rax
imul   $0xb,-0x10(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <number_of_forecasts_in_the_ensemble_location+0xcb>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x26,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <number_of_forecasts_in_the_ensemble_location+0xcb>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rax
add    $0x29,%rax
mov    %rax,-0x18(%rbp)
jmp    11db <number_of_forecasts_in_the_ensemble_location+0xcb>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_forecasts_in_the_ensemble_location>:
push   %rbx
mov    %rdi,%rbx
call   1030 <code_table_4_0@plt>
mov    %eax,%ecx
xor    %eax,%eax
add    $0xffffffff,%ecx
cmp    $0x48,%ecx
ja     116a <number_of_forecasts_in_the_ensemble_location+0x5a>
lea    0xed4(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    0x20(%rbx),%rax
add    $0x23,%rax
pop    %rbx
ret
mov    0x20(%rbx),%rax
add    $0x24,%rax
pop    %rbx
ret
mov    0x20(%rbx),%rax
movzbl 0x16(%rax),%ecx
lea    (%rcx,%rcx,4),%rdx
lea    (%rcx,%rdx,2),%rcx
add    %rcx,%rax
add    $0x19,%rax
pop    %rbx
ret
mov    0x20(%rbx),%rax
add    $0x29,%rax
pop    %rbx
ret
mov    0x20(%rbx),%rax
add    $0x26,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @number_of_forecasts_in_the_ensemble_location(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i8** %0, i8*** %2
%6 = load i8**, i8*** %2
%7 = call i32 @code_table_4_0(i8** %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
switch i32 %8, label %44 [
i32 1, label %9
i32 11, label %9
i32 60, label %9
i32 61, label %9
i32 2, label %14
i32 3, label %14
i32 4, label %14
i32 12, label %14
i32 13, label %14
i32 33, label %19
i32 34, label %19
i32 41, label %34
i32 43, label %34
i32 71, label %39
i32 73, label %39
]
9: ; preds = %1, %1, %1, %1
%10 = load i8**, i8*** %2
%11 = getelementptr inbounds i8*, i8** %10, i64 4
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 36
store i8* %13, i8** %5
br label %45
14: ; preds = %1, %1, %1, %1, %1
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 4
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8, i8* %17, i64 35
store i8* %18, i8** %5
br label %45
19: ; preds = %1, %1
%20 = load i8**, i8*** %2
%21 = getelementptr inbounds i8*, i8** %20, i64 4
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
store i32 %25, i32* %4
%26 = load i8**, i8*** %2
%27 = getelementptr inbounds i8*, i8** %26, i64 4
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 25
%30 = load i32, i32* %4
%31 = mul nsw i32 11, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %29, i64 %32
store i8* %33, i8** %5
br label %45
34: ; preds = %1, %1
%35 = load i8**, i8*** %2
%36 = getelementptr inbounds i8*, i8** %35, i64 4
%37 = load i8*, i8** %36
%38 = getelementptr inbounds i8, i8* %37, i64 38
store i8* %38, i8** %5
br label %45
39: ; preds = %1, %1
%40 = load i8**, i8*** %2
%41 = getelementptr inbounds i8*, i8** %40, i64 4
%42 = load i8*, i8** %41
%43 = getelementptr inbounds i8, i8* %42, i64 41
store i8* %43, i8** %5
br label %45
44: ; preds = %1
store i8* null, i8** %5
br label %45
45: ; preds = %44, %39, %34, %19, %14, %9
%46 = load i8*, i8** %5
ret i8* %46
}

LLVM IR (-O2):
define i8* @number_of_forecasts_in_the_ensemble_location(i8** %0) {
%2 = tail call i32 @code_table_4_0(i8** %0)
switch i32 %2, label %28 [
i32 1, label %3
i32 11, label %3
i32 60, label %3
i32 61, label %3
i32 2, label %7
i32 3, label %7
i32 4, label %7
i32 12, label %7
i32 13, label %7
i32 33, label %11
i32 34, label %11
i32 41, label %20
i32 43, label %20
i32 71, label %24
i32 73, label %24
]
3: ; preds = %1, %1, %1, %1
%4 = getelementptr inbounds i8*, i8** %0, i64 4
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 36
br label %28
7: ; preds = %1, %1, %1, %1, %1
%8 = getelementptr inbounds i8*, i8** %0, i64 4
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 35
br label %28
11: ; preds = %1, %1
%12 = getelementptr inbounds i8*, i8** %0, i64 4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 22
%15 = load i8, i8* %14
%16 = zext i8 %15 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 25
%18 = mul nuw nsw i64 %16, 11
%19 = getelementptr inbounds i8, i8* %17, i64 %18
br label %28
20: ; preds = %1, %1
%21 = getelementptr inbounds i8*, i8** %0, i64 4
%22 = load i8*, i8** %21
%23 = getelementptr inbounds i8, i8* %22, i64 38
br label %28
24: ; preds = %1, %1
%25 = getelementptr inbounds i8*, i8** %0, i64 4
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8, i8* %26, i64 41
br label %28
28: ; preds = %1, %24, %20, %11, %7, %3
%29 = phi i8* [ %27, %24 ], [ %23, %20 ], [ %19, %11 ], [ %10, %7 ], [ %6, %3 ], [ null, %1 ]
ret i8* %29
}