#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 int wint_t;

/* Variables and functions */
int iswpunct(wint_t wc) {
  return (wc >= 0 && wc < 128
              ? wc >= '!' && wc <= '~' &&
                    !((wc >= '0' && wc <= '9') ||
                      ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))
              : 1);
}


x86 assembly (clang, -O0):
<iswpunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1196 <iswpunct+0x96>
cmpl   $0x80,-0x4(%rbp)
jge    1196 <iswpunct+0x96>
xor    %eax,%eax
cmpl   $0x21,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1186 <iswpunct+0x86>
xor    %eax,%eax
cmpl   $0x7e,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1186 <iswpunct+0x86>
cmpl   $0x30,-0x4(%rbp)
jl     1155 <iswpunct+0x55>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jle    117e <iswpunct+0x7e>
mov    -0x4(%rbp),%ecx
and    $0xffffffdf,%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x7(%rbp)
jl     1178 <iswpunct+0x78>
mov    -0x4(%rbp),%eax
and    $0xffffffdf,%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
jmp    11a3 <iswpunct+0xa3>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a3 <iswpunct+0xa3>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswpunct>:
mov    $0x1,%eax
cmp    $0x7f,%edi
ja     1130 <iswpunct+0x30>
xor    %eax,%eax
cmp    $0x21,%edi
jb     1130 <iswpunct+0x30>
cmp    $0x7f,%edi
je     1130 <iswpunct+0x30>
lea    -0x3a(%rdi),%eax
cmp    $0xfffffff6,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffa5,%edi
cmp    $0xffffffe6,%edi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iswpunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %36
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br i1 %7, label %8, label %36
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 33
br i1 %10, label %11, label %33
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 126
br i1 %13, label %14, label %33
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 48
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br i1 %19, label %30, label %20
20: ; preds = %17, %14
%21 = load i32, i32* %2
%22 = and i32 %21, -33
%23 = icmp sge i32 %22, 65
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %2
%26 = and i32 %25, -33
%27 = icmp sle i32 %26, 90
br label %28
28: ; preds = %24, %20
%29 = phi i1 [ false, %20 ], [ %27, %24 ]
br label %30
30: ; preds = %28, %17
%31 = phi i1 [ true, %17 ], [ %29, %28 ]
%32 = xor i1 %31, true
br label %33
33: ; preds = %30, %11, %8
%34 = phi i1 [ false, %11 ], [ false, %8 ], [ %32, %30 ]
%35 = zext i1 %34 to i32
br label %37
36: ; preds = %5, %1
br label %37
37: ; preds = %36, %33
%38 = phi i32 [ %35, %33 ], [ 1, %36 ]
ret i32 %38
}

LLVM IR (-O2):
define i32 @iswpunct(i32 %0) {
%2 = icmp ult i32 %0, 128
br i1 %2, label %3, label %15
3: ; preds = %1
%4 = icmp ugt i32 %0, 32
%5 = icmp ne i32 %0, 127
%6 = and i1 %4, %5
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = add nsw i32 %0, -58
%9 = icmp ult i32 %8, -10
%10 = and i32 %0, -33
%11 = add nsw i32 %10, -91
%12 = icmp ult i32 %11, -26
%13 = select i1 %9, i1 %12, i1 false
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %3, %7, %1
%16 = phi i32 [ 1, %1 ], [ 0, %3 ], [ %14, %7 ]
ret i32 %16
}