#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 */
typedef char uint32_t;

/* Variables and functions */
bool unicode_utf7_is_direct_char(uint32_t c) {
  if (c == '\n' || c == '\r')
    return true;
  return c >= 0x20 && c < 0x7F && c != (uint32_t)'+' && c != (uint32_t)'~' &&
         c != (uint32_t)'\\';
}


x86 assembly (clang, -O0):
<unicode_utf7_is_direct_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1124 <unicode_utf7_is_direct_char+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    1130 <unicode_utf7_is_direct_char+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1190 <unicode_utf7_is_direct_char+0x90>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x6(%rbp)
jl     1185 <unicode_utf7_is_direct_char+0x85>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7f,%ecx
mov    %al,-0x6(%rbp)
jge    1185 <unicode_utf7_is_direct_char+0x85>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2b,%ecx
mov    %al,-0x6(%rbp)
je     1185 <unicode_utf7_is_direct_char+0x85>
movsbl -0x5(%rbp),%ecx
xor    %eax,%eax
cmp    $0x7e,%ecx
mov    %al,-0x6(%rbp)
je     1185 <unicode_utf7_is_direct_char+0x85>
movsbl -0x5(%rbp),%eax
cmp    $0x5c,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_utf7_is_direct_char>:
mov    $0x1,%eax
cmp    $0xa,%dil
je     1111 <unicode_utf7_is_direct_char+0x11>
cmp    $0xd,%dil
jne    1112 <unicode_utf7_is_direct_char+0x12>
ret
cmp    $0x2b,%dil
setne  %al
lea    -0x20(%rdi),%ecx
cmp    $0x5e,%cl
setb   %cl
cmp    $0x5c,%dil
setne  %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @unicode_utf7_is_direct_char(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 10
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 13
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %35
12: ; preds = %7
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 32
br i1 %15, label %16, label %32
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp slt i32 %18, 127
br i1 %19, label %20, label %32
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 43
br i1 %23, label %24, label %32
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 126
br i1 %27, label %28, label %32
28: ; preds = %24
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = icmp ne i32 %30, 92
br label %32
32: ; preds = %28, %24, %20, %16, %12
%33 = phi i1 [ false, %24 ], [ false, %20 ], [ false, %16 ], [ false, %12 ], [ %31, %28 ]
%34 = zext i1 %33 to i32
store i32 %34, i32* %2
br label %35
35: ; preds = %32, %11
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @unicode_utf7_is_direct_char(i8 signext %0) {
switch i8 %0, label %2 [
i8 13, label %10
i8 10, label %10
]
2: ; preds = %1
%3 = icmp ne i8 %0, 43
%4 = add i8 %0, -32
%5 = icmp ult i8 %4, 94
%6 = and i1 %3, %5
%7 = icmp ne i8 %0, 92
%8 = and i1 %7, %6
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %1, %2
%11 = phi i32 [ %9, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %11
}