#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*/ chk(char *, char *);
int main(int argc, char *argv[]) {
  int r;
  for (r = 0; *++argv != NULL;) {
    chk(*argv, "F_ISSET(");
    chk(*argv, "F_CLR(");
    chk(*argv, "F_SET(");
  }
  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)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
cmpq   $0x0,0x8(%rax)
je     1185 <main+0x75>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeab(%rip),%rsi
call   1030 <chk@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xea1(%rip),%rsi
call   1030 <chk@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xe95(%rip),%rsi
call   1030 <chk@plt>
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x8(%rsi),%rdi
test   %rdi,%rdi
je     116b <main+0x5b>
mov    %rsi,%rbx
add    $0x8,%rbx
lea    0xed1(%rip),%r14
lea    0xed3(%rip),%r15
lea    0xed3(%rip),%r12
nopl   (%rax)
mov    %r14,%rsi
call   1030 <chk@plt>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1030 <chk@plt>
mov    (%rbx),%rdi
mov    %r12,%rsi
call   1030 <chk@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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