#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(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sanity_check(int track, int sector) {
  if (!(track >= 0 && track <= 35)) {
    fprintf(stderr, "error: track must be between 0 and 35..\n");
    exit(1);
  }
  if (!(sector >= 0 && sector <= 16)) {
    fprintf(stderr, "error: sector must be between 0 and 16..\n");
    exit(1);
  }
  return;
}


x86 assembly (clang, -O0):
<sanity_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1142 <sanity_check+0x22>
cmpl   $0x23,-0x4(%rbp)
jle    1161 <sanity_check+0x41>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1175 <sanity_check+0x55>
cmpl   $0x10,-0x8(%rbp)
jle    1194 <sanity_check+0x74>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sanity_check>:
push   %rax
cmp    $0x24,%edi
jae    112d <sanity_check+0xd>
cmp    $0x11,%esi
jae    113f <sanity_check+0x1f>
pop    %rax
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
jmp    114f <sanity_check+0x2f>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"error: track must be between 0 and 35..\0A\00"
@.str.1 = [42 x i8] c"error: sector must be between 0 and 16..\0A\00"
define void @sanity_check(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 35
br i1 %9, label %14, label %10
10: ; preds = %7, %2
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %7
%15 = load i32, i32* %4
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp sle i32 %18, 16
br i1 %19, label %24, label %20
20: ; preds = %17, %14
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %17
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"error: track must be between 0 and 35..\0A\00"
@.str.1 = [42 x i8] c"error: sector must be between 0 and 16..\0A\00"
define void @sanity_check(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 36
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = icmp ult i32 %1, 17
br i1 %9, label %14, label %10
10: ; preds = %8
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %8
ret void
}