#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 /*<<< orphan*/ strncpy(char *, char *, int);
int Get_var_units(void *self, const char *name, char *units) {
  if (strcmp(name, "model_grid_cell__row_index") == 0) {
    strncpy(units, "count", (2048));
    return (0);
  } else if (strcmp(name, "model_grid_cell__column_index") == 0) {
    strncpy(units, "count", (2048));
    return (0);
  } else if (strcmp(name, "cyclone__magnitude_of_velocity") == 0) {
    strncpy(units, "meters second-1", (2048));
    return (0);
  } else if (strcmp(name, "cyclone__azimuth_angle_of_velocity") == 0) {
    strncpy(units, "degrees", (2048));
    return (0);
  } else if (strcmp(name, "atmosphere_bottom_air__pressure") == 0) {
    strncpy(units, "pascals", (2048));
    return (0);
  } else if (strcmp(name, "atmosphere_bottom_air__reference_pressure") == 0) {
    strncpy(units, "pascals", (2048));
    return (0);
  } else if (strcmp(name, "cyclone_air_flow_max_speed__radius") == 0) {
    strncpy(units, "meters", (2048));
    return (0);
  } else if (strcmp(name, "cyclone__radius") == 0) {
    strncpy(units, "meters", (2048));
    return (0);
  } else if (strcmp(name, "atmosphere_air_flow__east_component_of_velocity") ==
             0) {
    strncpy(units, "meters second-1", (2048));
    return (0);
  } else if (strcmp(name, "atmosphere_air_flow__north_component_of_velocity") ==
             0) {
    strncpy(units, "meters second-1", (2048));
    return (0);
  } else {
    units[0] = '\0';
    return (1);
  }
}


x86 assembly (clang, -O0):
<Get_var_units>:
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    0xec1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    116f <Get_var_units+0x4f>
mov    -0x20(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11aa <Get_var_units+0x8a>
mov    -0x20(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11e5 <Get_var_units+0xc5>
mov    -0x20(%rbp),%rdi
lea    0xe8f(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe7e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1220 <Get_var_units+0x100>
mov    -0x20(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe6e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    125b <Get_var_units+0x13b>
mov    -0x20(%rbp),%rdi
lea    0xe74(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe5b(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1296 <Get_var_units+0x176>
mov    -0x20(%rbp),%rdi
lea    0xe39(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe4a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12d1 <Get_var_units+0x1b1>
mov    -0x20(%rbp),%rdi
lea    0xe53(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe39(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    130c <Get_var_units+0x1ec>
mov    -0x20(%rbp),%rdi
lea    0xe18(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1347 <Get_var_units+0x227>
mov    -0x20(%rbp),%rdi
lea    0xd2d(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x18(%rbp),%rdi
lea    0xe03(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1382 <Get_var_units+0x262>
mov    -0x20(%rbp),%rdi
lea    0xcf2(%rip),%rsi
mov    $0x800,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1390 <Get_var_units+0x270>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Get_var_units>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1211 <Get_var_units+0xf1>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1211 <Get_var_units+0xf1>
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     121a <Get_var_units+0xfa>
lea    0xef5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     122c <Get_var_units+0x10c>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1223 <Get_var_units+0x103>
lea    0xf18(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1223 <Get_var_units+0x103>
lea    0xf2e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1235 <Get_var_units+0x115>
lea    0xf44(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1235 <Get_var_units+0x115>
lea    0xf40(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     121a <Get_var_units+0xfa>
lea    0xf5c(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     121a <Get_var_units+0xfa>
movb   $0x0,(%r14)
mov    $0x1,%eax
jmp    124b <Get_var_units+0x12b>
lea    0xe03(%rip),%rsi
jmp    123c <Get_var_units+0x11c>
lea    0xe3d(%rip),%rsi
jmp    123c <Get_var_units+0x11c>
lea    0xe8f(%rip),%rsi
jmp    123c <Get_var_units+0x11c>
lea    0xe5e(%rip),%rsi
jmp    123c <Get_var_units+0x11c>
lea    0xed2(%rip),%rsi
mov    %r14,%rdi
mov    $0x800,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"model_grid_cell__row_index\00"
@.str.1 = [6 x i8] c"count\00"
@.str.2 = [30 x i8] c"model_grid_cell__column_index\00"
@.str.3 = [31 x i8] c"cyclone__magnitude_of_velocity\00"
@.str.4 = [16 x i8] c"meters second-1\00"
@.str.5 = [35 x i8] c"cyclone__azimuth_angle_of_velocity\00"
@.str.6 = [8 x i8] c"degrees\00"
@.str.7 = [32 x i8] c"atmosphere_bottom_air__pressure\00"
@.str.8 = [8 x i8] c"pascals\00"
@.str.9 = [42 x i8] c"atmosphere_bottom_air__reference_pressure\00"
@.str.10 = [35 x i8] c"cyclone_air_flow_max_speed__radius\00"
@.str.11 = [7 x i8] c"meters\00"
@.str.12 = [16 x i8] c"cyclone__radius\00"
@.str.13 = [48 x i8] c"atmosphere_air_flow__east_component_of_velocity\00"
@.str.14 = [49 x i8] c"atmosphere_air_flow__north_component_of_velocity\00"
define i32 @Get_var_units(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 2048)
br label %54
8: ; preds = %3
%9 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 2048)
br label %54
13: ; preds = %8
%14 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 2048)
br label %54
18: ; preds = %13
%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 %21, label %23
21: ; preds = %18
%22 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 2048)
br label %54
23: ; preds = %18
%24 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 2048)
br label %54
28: ; preds = %23
%29 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.9, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 2048)
br label %54
33: ; preds = %28
%34 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %33
%37 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 2048)
br label %54
38: ; preds = %33
%39 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %38
%42 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 2048)
br label %54
43: ; preds = %38
%44 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.13, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 2048)
br label %54
48: ; preds = %43
%49 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %53
51: ; preds = %48
%52 = tail call i32 @strncpy(i8* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 2048)
br label %54
53: ; preds = %48
store i8 0, i8* %2
br label %54
54: ; preds = %53, %51, %46, %41, %36, %31, %26, %21, %16, %11, %6
%55 = phi i32 [ 0, %6 ], [ 0, %11 ], [ 0, %16 ], [ 0, %21 ], [ 0, %26 ], [ 0, %31 ], [ 0, %36 ], [ 0, %41 ], [ 0, %46 ], [ 0, %51 ], [ 1, %53 ]
ret i32 %55
}