#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 /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void throwError(int errorCode) {
  switch (errorCode) {
  case 0:
    fprintf(stderr,
            "Usage:\n"
            "sudo check_dht22 -p <gpio_pin> [-w tmp_warn_range,hum_warn_range] "
            "[-c tmp_crit_range,hum_crit_range]\n"
            "Example: sudo check_dht22 -p 7 -w 10:40,30:70 -c 5:45,25:75\n");
    break;
  case 1:
    fprintf(stderr, "Invalid GPIO pin specified.\n"
                    "Acceptable range: 0-31\n");
    break;
  case 2:
    fprintf(stderr, "Invalid threshold range.\n"
                    "Acceptable formats: N:N, N:, :N, or N\n");
    break;
  case 3:
    fprintf(stderr,
            "Invalid temperature range.\n"
            "Acceptable values: from %d to %d\n",
            -40, 80);
    break;
  case 4:
    fprintf(stderr,
            "Invalid humidity range.\n"
            "Acceptable values: from %d to %d\n",
            0, 100);
    break;
  case 5:
    fprintf(stderr, "The temperature warning threshold range must be a subset "
                    "of the temperature critical threshold range.\n");
    break;
  case 6:
    fprintf(stderr, "The humidity warning threshold range must be a subset of "
                    "the humidity critical threshold range.\n");
    break;
  }
  fflush(stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<throwError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x6,%rax
ja     1230 <throwError+0x100>
mov    -0x10(%rbp),%rax
lea    0xea9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
lea    0xf39(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
lea    0xf51(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
lea    0xf75(%rip),%rsi
mov    $0xffffffd8,%edx
mov    $0x50,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2dff(%rip),%rax
mov    (%rax),%edi
lea    0xf8c(%rip),%rsi
xor    %edx,%edx
mov    $0x64,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
lea    0xfa3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    1230 <throwError+0x100>
mov    0x2dc0(%rip),%rax
mov    (%rax),%edi
lea    0xfee(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2d93(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<throwError>:
push   %rax
cmp    $0x6,%edi
ja     11ea <throwError+0xba>
mov    %edi,%eax
lea    0xebd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
jmp    11e3 <throwError+0xb3>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xf54(%rip),%rsi
jmp    11e3 <throwError+0xb3>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
lea    0xf76(%rip),%rsi
jmp    11e3 <throwError+0xb3>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
lea    0xfa4(%rip),%rsi
mov    $0xffffffd8,%edx
mov    $0x50,%ecx
jmp    11b8 <throwError+0x88>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
lea    0xfc5(%rip),%rsi
xor    %edx,%edx
mov    $0x64,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    11ea <throwError+0xba>
mov    0x2e18(%rip),%rax
mov    (%rax),%edi
lea    0xfdf(%rip),%rsi
jmp    11e3 <throwError+0xb3>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
lea    0x1034(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2dd9(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [169 x i8] c"Usage:\0Asudo check_dht22 -p <gpio_pin> [-w tmp_warn_range,hum_warn_range] [-c tmp_crit_range,hum_crit_range]\0AExample: sudo check_dht22 -p 7 -w 10:40,30:70 -c 5:45,25:75\0A\00"
@.str.1 = [52 x i8] c"Invalid GPIO pin specified.\0AAcceptable range: 0-31\0A\00"
@.str.2 = [64 x i8] c"Invalid threshold range.\0AAcceptable formats: N:N, N:, :N, or N\0A\00"
@.str.3 = [61 x i8] c"Invalid temperature range.\0AAcceptable values: from %d to %d\0A\00"
@.str.4 = [58 x i8] c"Invalid humidity range.\0AAcceptable values: from %d to %d\0A\00"
@.str.5 = [103 x i8] c"The temperature warning threshold range must be a subset of the temperature critical threshold range.\0A\00"
@.str.6 = [97 x i8] c"The humidity warning threshold range must be a subset of the humidity critical threshold range.\0A\00"
@EXIT_FAILURE = global i32 0
define void @throwError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %25 [
i32 0, label %4
i32 1, label %7
i32 2, label %10
i32 3, label %13
i32 4, label %16
i32 5, label %19
i32 6, label %22
]
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0))
br label %25
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
br label %25
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
br label %25
13: ; preds = %1
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), i32 -40, i32 80)
br label %25
16: ; preds = %1
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 100)
br label %25
19: ; preds = %1
%20 = load i32, i32* @stderr
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.5, i64 0, i64 0))
br label %25
22: ; preds = %1
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.6, i64 0, i64 0))
br label %25
25: ; preds = %1, %22, %19, %16, %13, %10, %7, %4
%26 = load i32, i32* @stderr
%27 = call i32 @fflush(i32 %26)
%28 = load i32, i32* @EXIT_FAILURE
%29 = call i32 @exit(i32 %28)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [169 x i8] c"Usage:\0Asudo check_dht22 -p <gpio_pin> [-w tmp_warn_range,hum_warn_range] [-c tmp_crit_range,hum_crit_range]\0AExample: sudo check_dht22 -p 7 -w 10:40,30:70 -c 5:45,25:75\0A\00"
@.str.1 = [52 x i8] c"Invalid GPIO pin specified.\0AAcceptable range: 0-31\0A\00"
@.str.2 = [64 x i8] c"Invalid threshold range.\0AAcceptable formats: N:N, N:, :N, or N\0A\00"
@.str.3 = [61 x i8] c"Invalid temperature range.\0AAcceptable values: from %d to %d\0A\00"
@.str.4 = [58 x i8] c"Invalid humidity range.\0AAcceptable values: from %d to %d\0A\00"
@.str.5 = [103 x i8] c"The temperature warning threshold range must be a subset of the temperature critical threshold range.\0A\00"
@.str.6 = [97 x i8] c"The humidity warning threshold range must be a subset of the humidity critical threshold range.\0A\00"
@EXIT_FAILURE = global i32 0
define void @throwError(i32 %0) {
switch i32 %0, label %23 [
i32 0, label %2
i32 1, label %5
i32 2, label %8
i32 3, label %11
i32 4, label %14
i32 5, label %17
i32 6, label %20
]
2: ; preds = %1
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0))
br label %23
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
br label %23
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
br label %23
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0), i32 -40, i32 80)
br label %23
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 100)
br label %23
17: ; preds = %1
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.5, i64 0, i64 0))
br label %23
20: ; preds = %1
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.6, i64 0, i64 0))
br label %23
23: ; preds = %1, %20, %17, %14, %11, %8, %5, %2
%24 = load i32, i32* @stderr
%25 = tail call i32 @fflush(i32 %24)
%26 = load i32, i32* @EXIT_FAILURE
%27 = tail call i32 @exit(i32 %26)
unreachable
}