#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*/ isSharp(int /*<<< orphan*/);
char *skipBlank(char *);
int /*<<< orphan*/ startsWithWord(char *, char *);
char isPragma(char *p) {
  p = skipBlank(p);
  if (!isSharp(*p++))
    return 0;
  p = skipBlank(p);
  if (!startsWithWord(p, "pragma"))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isPragma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <skipBlank@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1040 <isSharp@plt>
cmp    $0x0,%eax
jne    1172 <isPragma+0x42>
movb   $0x0,-0x1(%rbp)
jmp    11a5 <isPragma+0x75>
mov    -0x10(%rbp),%rdi
call   1050 <skipBlank@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe76(%rip),%rsi
call   1030 <startsWithWord@plt>
cmp    $0x0,%eax
jne    11a1 <isPragma+0x71>
movb   $0x0,-0x1(%rbp)
jmp    11a5 <isPragma+0x75>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPragma>:
push   %rbx
call   1050 <skipBlank@plt>
mov    %rax,%rbx
movsbl (%rax),%edi
call   1040 <isSharp@plt>
test   %eax,%eax
je     1167 <isPragma+0x37>
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <skipBlank@plt>
lea    0xea8(%rip),%rsi
mov    %rax,%rdi
call   1030 <startsWithWord@plt>
test   %eax,%eax
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"pragma\00"
define signext i8 @isPragma(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @skipBlank(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = call i32 @isSharp(i32 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %1
store i8 0, i8* %2
br label %21
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i8* @skipBlank(i8* %14)
store i8* %15, i8** %3
%16 = load i8*, i8** %3
%17 = call i32 @startsWithWord(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %20, label %19
19: ; preds = %13
store i8 0, i8* %2
br label %21
20: ; preds = %13
store i8 1, i8* %2
br label %21
21: ; preds = %20, %19, %12
%22 = load i8, i8* %2
ret i8 %22
}

LLVM IR (-O2):
@.str = [7 x i8] c"pragma\00"
define signext i8 @isPragma(i8* %0) {
%2 = tail call i8* @skipBlank(i8* %0)
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = tail call i32 @isSharp(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %2, i64 1
%9 = tail call i8* @skipBlank(i8* %8)
%10 = tail call i32 @startsWithWord(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i8
br label %13
13: ; preds = %7, %1
%14 = phi i8 [ 0, %1 ], [ %12, %7 ]
ret i8 %14
}