#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 sscanf(char *, char *, int *);
int _parse_range(char *arg, int *option, int low, int high) {
  return 1 != sscanf(arg, "%d", option) || !(low <= *option && *option <= high);
}


x86 assembly (clang, -O0):
<_parse_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xecb(%rip),%rsi
call   1030 <sscanf@plt>
mov    %eax,%edx
mov    $0x1,%al
mov    $0x1,%ecx
cmp    %edx,%ecx
mov    %al,-0x19(%rbp)
jne    1179 <_parse_range+0x69>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rdx),%ecx
mov    %al,-0x1a(%rbp)
jg     1171 <_parse_range+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x18(%rbp),%eax
setle  %al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_parse_range>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xedd(%rip),%rsi
mov    %rbx,%rdx
call   1030 <sscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
jne    1149 <_parse_range+0x39>
mov    (%rbx),%eax
cmp    %ebp,%eax
setl   %cl
cmp    %r14d,%eax
setg   %al
or     %cl,%al
movzbl %al,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @_parse_range(i8* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%12 = icmp ne i32 1, %11
br i1 %12, label %26, label %13
13: ; preds = %4
%14 = load i32, i32* %7
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = icmp sle i32 %14, %16
br i1 %17, label %18, label %23
18: ; preds = %13
%19 = load i32*, i32** %6
%20 = load i32, i32* %19
%21 = load i32, i32* %8
%22 = icmp sle i32 %20, %21
br label %23
23: ; preds = %18, %13
%24 = phi i1 [ false, %13 ], [ %22, %18 ]
%25 = xor i1 %24, true
br label %26
26: ; preds = %23, %4
%27 = phi i1 [ true, %4 ], [ %25, %23 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @_parse_range(i8* nocapture %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, %2
%10 = icmp sgt i32 %8, %3
%11 = or i1 %9, %10
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %7, %4
%14 = phi i32 [ 1, %4 ], [ %12, %7 ]
ret i32 %14
}