#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__ cmp(char *, char *);
int /*<<< orphan*/ lowc(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int ac, char **av) {
  int alert;
  int i;
  alert = 0;
  i = 0;
  while (++i < ac) {
    lowc(av[i]);
    if (cmp("president", av[i]) == 0)
      alert = 1;
    if (cmp("attack", av[i]) == 0)
      alert = 1;
    if (cmp("powers", av[i]) == 0)
      alert = 1;
  }
  if (alert == 1)
    write(1, "Alert!!!\n", 9);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmp    -0x8(%rbp),%eax
jge    11f7 <main+0xc7>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <lowc@plt>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe76(%rip),%rdi
call   1040 <cmp@plt>
cmp    $0x0,%rax
jne    11a0 <main+0x70>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe57(%rip),%rdi
call   1040 <cmp@plt>
cmp    $0x0,%rax
jne    11c9 <main+0x99>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe35(%rip),%rdi
call   1040 <cmp@plt>
cmp    $0x0,%rax
jne    11f2 <main+0xc2>
movl   $0x1,-0x14(%rbp)
jmp    1154 <main+0x24>
cmpl   $0x1,-0x14(%rbp)
jne    1217 <main+0xe7>
mov    $0x1,%edi
lea    0xe0b(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     11ed <main+0xbd>
mov    %rsi,%r13
mov    %edi,%r14d
xor    %r12d,%r12d
mov    $0x1,%r15d
jmp    1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r15
cmp    %r15,%r14
je     11d1 <main+0xa1>
mov    0x0(%r13,%r15,8),%rdi
call   1050 <lowc@plt>
mov    0x0(%r13,%r15,8),%rsi
lea    0xe81(%rip),%rdi
call   1040 <cmp@plt>
mov    %rax,%rbx
mov    0x0(%r13,%r15,8),%rsi
lea    0xe77(%rip),%rdi
call   1040 <cmp@plt>
mov    %rax,%rbp
mov    0x0(%r13,%r15,8),%rsi
lea    0xe6a(%rip),%rdi
call   1040 <cmp@plt>
test   %rbx,%rbx
mov    $0x1,%edx
cmove  %edx,%r12d
test   %rbp,%rbp
mov    %r12d,%ecx
cmove  %edx,%ecx
mov    $0x1,%r12d
test   %rax,%rax
je     1160 <main+0x30>
mov    %ecx,%r12d
jmp    1160 <main+0x30>
cmp    $0x1,%r12d
jne    11ed <main+0xbd>
lea    0xe3a(%rip),%rsi
mov    $0x1,%edi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"president\00"
@.str.1 = [7 x i8] c"attack\00"
@.str.2 = [7 x i8] c"powers\00"
@.str.3 = [10 x i8] c"Alert!!!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %46, %2
%9 = load i32, i32* %7
%10 = add nsw i32 %9, 1
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %47
13: ; preds = %8
%14 = load i8**, i8*** %5
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @lowc(i8* %18)
%20 = load i8**, i8*** %5
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i64 @cmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %13
store i32 1, i32* %6
br label %28
28: ; preds = %27, %13
%29 = load i8**, i8*** %5
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = call i64 @cmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %28
store i32 1, i32* %6
br label %37
37: ; preds = %36, %28
%38 = load i8**, i8*** %5
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8*, i8** %38, i64 %40
%42 = load i8*, i8** %41
%43 = call i64 @cmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %37
store i32 1, i32* %6
br label %46
46: ; preds = %45, %37
br label %8
47: ; preds = %8
%48 = load i32, i32* %6
%49 = icmp eq i32 %48, 1
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
br label %52
52: ; preds = %50, %47
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"president\00"
@.str.1 = [7 x i8] c"attack\00"
@.str.2 = [7 x i8] c"powers\00"
@.str.3 = [10 x i8] c"Alert!!!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %30
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %24, %6 ]
%8 = phi i32 [ 0, %4 ], [ %23, %6 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %7
%10 = load i8*, i8** %9
%11 = tail call i32 @lowc(i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i64 @cmp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = icmp eq i64 %13, 0
%15 = load i8*, i8** %9
%16 = tail call i64 @cmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = icmp eq i64 %16, 0
%18 = load i8*, i8** %9
%19 = tail call i64 @cmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %18)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i1 true, i1 %17
%22 = select i1 %21, i1 true, i1 %14
%23 = select i1 %22, i32 1, i32 %8
%24 = add nuw nsw i64 %7, 1
%25 = icmp eq i64 %24, %5
br i1 %25, label %26, label %6
26: ; preds = %6
%27 = icmp eq i32 %23, 1
br i1 %27, label %28, label %30
28: ; preds = %26
%29 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
br label %30
30: ; preds = %2, %28, %26
ret i32 0
}