#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 */
struct argp_option {
  int flags;
  int key;
};

/* Variables and functions */
int UCHAR_MAX;
scalar_t__ isprint(int);
int _option_is_short(const struct argp_option *__opt) {
  if (__opt->flags & 0x8)
    return 0;
  else {
    int __key = __opt->key;
    return __key > 0 && __key <= UCHAR_MAX && isprint(__key);
  }
}


x86 assembly (clang, -O0):
<_option_is_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     113a <_option_is_short+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1187 <_option_is_short+0x77>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jle    117c <_option_is_short+0x6c>
mov    -0x14(%rbp),%ecx
xor    %eax,%eax
mov    0x2e91(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x15(%rbp)
jg     117c <_option_is_short+0x6c>
mov    -0x14(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_option_is_short>:
push   %rax
xor    %eax,%eax
testb  $0x8,(%rdi)
jne    113a <_option_is_short+0x2a>
mov    0x4(%rdi),%edi
test   %edi,%edi
jle    113a <_option_is_short+0x2a>
mov    0x2eca(%rip),%rcx
cmp    (%rcx),%edi
jg     113a <_option_is_short+0x2a>
call   1030 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.argp_option = type { i32, i32 }
@UCHAR_MAX = global i32 0
define i32 @_option_is_short(%struct.argp_option* %0) {
%2 = alloca i32
%3 = alloca %struct.argp_option*
%4 = alloca i32
store %struct.argp_option* %0, %struct.argp_option** %3
%5 = load %struct.argp_option*, %struct.argp_option** %3
%6 = getelementptr inbounds %struct.argp_option, %struct.argp_option* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = and i32 %7, 8
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %28
11: ; preds = %1
%12 = load %struct.argp_option*, %struct.argp_option** %3
%13 = getelementptr inbounds %struct.argp_option, %struct.argp_option* %12, i32 0, i32 1
%14 = load i32, i32* %13
store i32 %14, i32* %4
%15 = load i32, i32* %4
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %25
17: ; preds = %11
%18 = load i32, i32* %4
%19 = load i32, i32* @UCHAR_MAX
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i32, i32* %4
%23 = call i64 @isprint(i32 %22)
%24 = icmp ne i64 %23, 0
br label %25
25: ; preds = %21, %17, %11
%26 = phi i1 [ false, %17 ], [ false, %11 ], [ %24, %21 ]
%27 = zext i1 %26 to i32
store i32 %27, i32* %2
br label %28
28: ; preds = %25, %10
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
%struct.argp_option = type { i32, i32 }
@UCHAR_MAX = global i32 0
define i32 @_option_is_short(%struct.argp_option* nocapture %0) {
%2 = getelementptr inbounds %struct.argp_option, %struct.argp_option* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = and i32 %3, 8
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %1
%7 = getelementptr inbounds %struct.argp_option, %struct.argp_option* %0, i64 0, i32 1
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 1
%10 = load i32, i32* @UCHAR_MAX
%11 = icmp sgt i32 %8, %10
%12 = select i1 %9, i1 true, i1 %11
br i1 %12, label %17, label %13
13: ; preds = %6
%14 = tail call i64 @isprint(i32 %8)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %6, %13, %1
%18 = phi i32 [ 0, %1 ], [ 0, %6 ], [ %16, %13 ]
ret i32 %18
}