#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__ ft_strcmp_m(char *, char *);
int /*<<< orphan*/ ft_strlowcase(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char **argv) {
  while (argc > 1) {
    ft_strlowcase(argv[argc - 1]);
    if (ft_strcmp_m(argv[argc - 1], "president") == 0 ||
        ft_strcmp_m(argv[argc - 1], "attack") == 0 ||
        ft_strcmp_m(argv[argc - 1], "powers") == 0) {
      write(1, "Alert!!!\n", 9);
      return (0);
    }
    argc--;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    120b <main+0xdb>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <ft_strlowcase@plt>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe82(%rip),%rsi
call   1040 <ft_strcmp_m@plt>
cmp    $0x0,%rax
je     11db <main+0xab>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe65(%rip),%rsi
call   1040 <ft_strcmp_m@plt>
cmp    $0x0,%rax
je     11db <main+0xab>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe45(%rip),%rsi
call   1040 <ft_strcmp_m@plt>
cmp    $0x0,%rax
jne    11fd <main+0xcd>
mov    $0x1,%edi
lea    0xe31(%rip),%rsi
mov    $0x9,%edx
call   1030 <write@plt>
movl   $0x0,-0x4(%rbp)
jmp    1212 <main+0xe2>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %edi,%r13d
lea    -0x1(%r13),%eax
lea    (%rsi,%rax,8),%rbx
lea    0xeb5(%rip),%r14
lea    0xeb8(%rip),%r15
lea    0xeb8(%rip),%r12
nopl   0x0(%rax)
cmp    $0x2,%r13d
jl     11bc <main+0x8c>
mov    (%rbx),%rdi
call   1050 <ft_strlowcase@plt>
mov    (%rbx),%rdi
mov    %r14,%rsi
call   1040 <ft_strcmp_m@plt>
test   %rax,%rax
je     11a6 <main+0x76>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1040 <ft_strcmp_m@plt>
test   %rax,%rax
je     11a6 <main+0x76>
mov    (%rbx),%rdi
mov    %r12,%rsi
call   1040 <ft_strcmp_m@plt>
add    $0xfffffffffffffff8,%rbx
add    $0xffffffff,%r13d
test   %rax,%rax
jne    1160 <main+0x30>
lea    0xe6b(%rip),%rsi
mov    $0x1,%edi
mov    $0x9,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %45, %2
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %48
9: ; preds = %6
%10 = load i8**, i8*** %5
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8*, i8** %10, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @ft_strlowcase(i8* %15)
%17 = load i8**, i8*** %5
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %17, i64 %20
%22 = load i8*, i8** %21
%23 = call i64 @ft_strcmp_m(i8* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %43, label %25
25: ; preds = %9
%26 = load i8**, i8*** %5
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %26, i64 %29
%31 = load i8*, i8** %30
%32 = call i64 @ft_strcmp_m(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %43, label %34
34: ; preds = %25
%35 = load i8**, i8*** %5
%36 = load i32, i32* %4
%37 = sub nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %35, i64 %38
%40 = load i8*, i8** %39
%41 = call i64 @ft_strcmp_m(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %34, %25, %9
%44 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
store i32 0, i32* %3
br label %49
45: ; preds = %34
%46 = load i32, i32* %4
%47 = add nsw i32 %46, -1
store i32 %47, i32* %4
br label %6
48: ; preds = %6
store i32 0, i32* %3
br label %49
49: ; preds = %48, %43
%50 = load i32, i32* %3
ret i32 %50
}

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) {
br label %3
3: ; preds = %19, %2
%4 = phi i32 [ %0, %2 ], [ %7, %19 ]
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %25
6: ; preds = %3
%7 = add nsw i32 %4, -1
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @ft_strlowcase(i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i64 @ft_strcmp_m(i8* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %23, label %15
15: ; preds = %6
%16 = load i8*, i8** %9
%17 = tail call i64 @ft_strcmp_m(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8*, i8** %9
%21 = tail call i64 @ft_strcmp_m(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %3
23: ; preds = %19, %15, %6
%24 = 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 %25
25: ; preds = %3, %23
ret i32 0
}