#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 */
scalar_t__ strcmp(char const *, char *);
int Get_var_grid(void *self, const char *name, int *grid) {
  if ((strcmp(name, "atmosphere_air_flow__east_component_of_velocity") == 0) ||
      (strcmp(name, "atmosphere_air_flow__north_component_of_velocity") == 0)) {
    *grid = 0;
    return (0);
  } else if (strcmp(name, "model_grid_cell__row_index") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "model_grid_cell__column_index") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "cyclone__magnitude_of_velocity") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "cyclone__azimuth_angle_of_velocity") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "atmosphere_bottom_air__pressure") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "atmosphere_bottom_air__reference_pressure") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "cyclone_air_flow_max_speed__radius") == 0) {
    *grid = 1;
    return (0);
  } else if (strcmp(name, "cyclone__radius") == 0) {
    *grid = 1;
    return (0);
  } else {
    *grid = -1;
    return (1);
  }
}


x86 assembly (clang, -O0):
<Get_var_grid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1158 <Get_var_grid+0x48>
mov    -0x18(%rbp),%rdi
lea    0xee7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    116e <Get_var_grid+0x5e>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    119e <Get_var_grid+0x8e>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xed3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11ce <Get_var_grid+0xbe>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11fe <Get_var_grid+0xee>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    122e <Get_var_grid+0x11e>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    125e <Get_var_grid+0x14e>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xe93(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    128e <Get_var_grid+0x17e>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12be <Get_var_grid+0x1ae>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x18(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12ee <Get_var_grid+0x1de>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    12ff <Get_var_grid+0x1ef>
mov    -0x20(%rbp),%rax
movl   $0xffffffff,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_var_grid>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xedc(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %r15d,%r15d
test   %rax,%rax
je     120c <Get_var_grid+0xfc>
lea    0xef1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120c <Get_var_grid+0xfc>
lea    0xf0a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf0e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf19(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf28(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf34(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf4a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     120e <Get_var_grid+0xfe>
lea    0xf59(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %r15d,%r15d
test   %rax,%rax
setne  %r15b
neg    %rax
sbb    %ebp,%ebp
or     $0x1,%ebp
jmp    120e <Get_var_grid+0xfe>
xor    %ebp,%ebp
mov    %ebp,(%r14)
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"atmosphere_air_flow__east_component_of_velocity\00"
@.str.1 = [49 x i8] c"atmosphere_air_flow__north_component_of_velocity\00"
@.str.2 = [27 x i8] c"model_grid_cell__row_index\00"
@.str.3 = [30 x i8] c"model_grid_cell__column_index\00"
@.str.4 = [31 x i8] c"cyclone__magnitude_of_velocity\00"
@.str.5 = [35 x i8] c"cyclone__azimuth_angle_of_velocity\00"
@.str.6 = [32 x i8] c"atmosphere_bottom_air__pressure\00"
@.str.7 = [42 x i8] c"atmosphere_bottom_air__reference_pressure\00"
@.str.8 = [35 x i8] c"cyclone_air_flow_max_speed__radius\00"
@.str.9 = [16 x i8] c"cyclone__radius\00"
define i32 @Get_var_grid(i8* %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
%8 = load i8*, i8** %6
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = load i8*, i8** %6
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11, %3
%16 = load i32*, i32** %7
store i32 0, i32* %16
store i32 0, i32* %4
br label %67
17: ; preds = %11
%18 = load i8*, i8** %6
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = load i32*, i32** %7
store i32 1, i32* %22
store i32 0, i32* %4
br label %67
23: ; preds = %17
%24 = load i8*, i8** %6
%25 = call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = load i32*, i32** %7
store i32 1, i32* %28
store i32 0, i32* %4
br label %67
29: ; preds = %23
%30 = load i8*, i8** %6
%31 = call i64 @strcmp(i8* %30, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29
%34 = load i32*, i32** %7
store i32 1, i32* %34
store i32 0, i32* %4
br label %67
35: ; preds = %29
%36 = load i8*, i8** %6
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = load i32*, i32** %7
store i32 1, i32* %40
store i32 0, i32* %4
br label %67
41: ; preds = %35
%42 = load i8*, i8** %6
%43 = call i64 @strcmp(i8* %42, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = load i32*, i32** %7
store i32 1, i32* %46
store i32 0, i32* %4
br label %67
47: ; preds = %41
%48 = load i8*, i8** %6
%49 = call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = load i32*, i32** %7
store i32 1, i32* %52
store i32 0, i32* %4
br label %67
53: ; preds = %47
%54 = load i8*, i8** %6
%55 = call i64 @strcmp(i8* %54, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = load i32*, i32** %7
store i32 1, i32* %58
store i32 0, i32* %4
br label %67
59: ; preds = %53
%60 = load i8*, i8** %6
%61 = call i64 @strcmp(i8* %60, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = load i32*, i32** %7
store i32 1, i32* %64
store i32 0, i32* %4
br label %67
65: ; preds = %59
%66 = load i32*, i32** %7
store i32 -1, i32* %66
store i32 1, i32* %4
br label %67
67: ; preds = %65, %63, %57, %51, %45, %39, %33, %27, %21, %15
%68 = load i32, i32* %4
ret i32 %68
}

LLVM IR (-O2):
@.str = [48 x i8] c"atmosphere_air_flow__east_component_of_velocity\00"
@.str.1 = [49 x i8] c"atmosphere_air_flow__north_component_of_velocity\00"
@.str.2 = [27 x i8] c"model_grid_cell__row_index\00"
@.str.3 = [30 x i8] c"model_grid_cell__column_index\00"
@.str.4 = [31 x i8] c"cyclone__magnitude_of_velocity\00"
@.str.5 = [35 x i8] c"cyclone__azimuth_angle_of_velocity\00"
@.str.6 = [32 x i8] c"atmosphere_bottom_air__pressure\00"
@.str.7 = [42 x i8] c"atmosphere_bottom_air__reference_pressure\00"
@.str.8 = [35 x i8] c"cyclone_air_flow_max_speed__radius\00"
@.str.9 = [16 x i8] c"cyclone__radius\00"
define i32 @Get_var_grid(i8* nocapture readnone %0, i8* %1, i32* nocapture writeonly %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %36, label %6
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %36, label %9
9: ; preds = %6
%10 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %36, label %12
12: ; preds = %9
%13 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %36, label %15
15: ; preds = %12
%16 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %36, label %18
18: ; preds = %15
%19 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %36, label %21
21: ; preds = %18
%22 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %36, label %24
24: ; preds = %21
%25 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %36, label %27
27: ; preds = %24
%28 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %36, label %30
30: ; preds = %27
%31 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
%33 = select i1 %32, i32 1, i32 -1
%34 = xor i1 %32, true
%35 = zext i1 %34 to i32
br label %36
36: ; preds = %30, %27, %24, %21, %18, %15, %12, %9, %3, %6
%37 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %18 ], [ 1, %21 ], [ 1, %24 ], [ 1, %27 ], [ %33, %30 ]
%38 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %9 ], [ 0, %12 ], [ 0, %15 ], [ 0, %18 ], [ 0, %21 ], [ 0, %24 ], [ 0, %27 ], [ %35, %30 ]
store i32 %37, i32* %2
ret i32 %38
}