#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 */
scalar_t__ strcmp(char *, char *);
int PennIsPunct(char *tag) {
  return ((((tag)[0] == (":")[0]) && (strcmp((tag), (":")) == 0)) ||
          (((tag)[0] == (".")[0]) && (strcmp((tag), (".")) == 0)));
}


x86 assembly (clang, -O0):
<PennIsPunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl 0xed6(%rip),%ecx
cmp    %ecx,%eax
jne    1154 <PennIsPunct+0x44>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     118f <PennIsPunct+0x7f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
movsbl 0xea0(%rip),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0xa(%rbp)
jne    1189 <PennIsPunct+0x79>
mov    -0x8(%rbp),%rdi
lea    0xe88(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PennIsPunct>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%cl
cmp    $0x3a,%cl
jne    1131 <PennIsPunct+0x21>
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1154 <PennIsPunct+0x44>
mov    (%rbx),%cl
xor    %eax,%eax
cmp    $0x2e,%cl
jne    1152 <PennIsPunct+0x42>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

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