#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*/ assert(int);
scalar_t__ isalpha(int);
int is_fixed_value(int ch) {
  if (ch == '#')
    return 1;
  if (isalpha(ch))
    return 1;
  assert(ch == '.' || ch == '0' || ch == '1');
  return 0;
}


x86 assembly (clang, -O0):
<is_fixed_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x23,-0x8(%rbp)
jne    1141 <is_fixed_value+0x21>
movl   $0x1,-0x4(%rbp)
jmp    119b <is_fixed_value+0x7b>
mov    -0x8(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     115f <is_fixed_value+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    119b <is_fixed_value+0x7b>
mov    $0x1,%al
cmpl   $0x2e,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1187 <is_fixed_value+0x67>
mov    $0x1,%al
cmpl   $0x30,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1187 <is_fixed_value+0x67>
cmpl   $0x31,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_fixed_value>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x23,%edi
je     1158 <is_fixed_value+0x38>
mov    %edi,%ebx
call   1040 <isalpha@plt>
test   %rax,%rax
jne    1158 <is_fixed_value+0x38>
mov    $0x1,%edi
cmp    $0x2e,%ebx
je     1151 <is_fixed_value+0x31>
cmp    $0x30,%ebx
je     1151 <is_fixed_value+0x31>
xor    %edi,%edi
cmp    $0x31,%ebx
sete   %dil
call   1030 <assert@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_fixed_value(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 35
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %25
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i64 @isalpha(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %25
12: ; preds = %7
%13 = load i32, i32* %3
%14 = icmp eq i32 %13, 46
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 48
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 49
br label %21
21: ; preds = %18, %15, %12
%22 = phi i1 [ true, %15 ], [ true, %12 ], [ %20, %18 ]
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
store i32 0, i32* %2
br label %25
25: ; preds = %21, %11, %6
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_fixed_value(i32 %0) {
%2 = icmp eq i32 %0, 35
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = tail call i64 @isalpha(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
switch i32 %0, label %7 [
i32 48, label %10
i32 46, label %10
]
7: ; preds = %6
%8 = icmp eq i32 %0, 49
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %6, %7
%11 = phi i32 [ 1, %6 ], [ %9, %7 ], [ 1, %6 ]
%12 = tail call i32 @assert(i32 %11)
br label %13
13: ; preds = %3, %1, %10
%14 = phi i32 [ 0, %10 ], [ 1, %1 ], [ 1, %3 ]
ret i32 %14
}