#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*/ perror(char *);
scalar_t__ revoke(char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char **d;
  int error = 0;
  if (argc == 1)
    usage();
  for (d = &argv[1]; *d != NULL; d++) {
    if (revoke(*d) != 0) {
      perror(*d);
      error = 1;
    }
  }
  return (error);
}


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,-0x1c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    115e <main+0x2e>
mov    $0x0,%al
call   1030 <usage@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     11b7 <main+0x87>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1050 <revoke@plt>
cmp    $0x0,%rax
je     11a1 <main+0x71>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x1c(%rbp)
jmp    11a6 <main+0x76>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    116a <main+0x3a>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x1,%edi
jne    1142 <main+0x12>
xor    %eax,%eax
call   1030 <usage@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     1186 <main+0x56>
add    $0x10,%rbx
xor    %ebp,%ebp
jmp    116c <main+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
je     1188 <main+0x58>
call   1050 <revoke@plt>
test   %rax,%rax
je     1160 <main+0x30>
mov    -0x8(%rbx),%rdi
call   1040 <perror@plt>
mov    $0x1,%ebp
jmp    1160 <main+0x30>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @usage()
br label %12
12: ; preds = %10, %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
store i8** %14, i8*** %6
br label %15
15: ; preds = %29, %12
%16 = load i8**, i8*** %6
%17 = load i8*, i8** %16
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i8**, i8*** %6
%21 = load i8*, i8** %20
%22 = call i64 @revoke(i8* %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %19
%25 = load i8**, i8*** %6
%26 = load i8*, i8** %25
%27 = call i32 @perror(i8* %26)
store i32 1, i32* %7
br label %28
28: ; preds = %24, %19
br label %29
29: ; preds = %28
%30 = load i8**, i8*** %6
%31 = getelementptr inbounds i8*, i8** %30, i32 1
store i8** %31, i8*** %6
br label %15
32: ; preds = %15
%33 = load i32, i32* %7
ret i32 %33
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %24, label %10
10: ; preds = %6, %19
%11 = phi i8* [ %22, %19 ], [ %8, %6 ]
%12 = phi i8** [ %21, %19 ], [ %7, %6 ]
%13 = phi i32 [ %20, %19 ], [ 0, %6 ]
%14 = tail call i64 @revoke(i8* %11)
%15 = icmp eq i64 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %10
%17 = load i8*, i8** %12
%18 = tail call i32 @perror(i8* %17)
br label %19
19: ; preds = %10, %16
%20 = phi i32 [ 1, %16 ], [ %13, %10 ]
%21 = getelementptr inbounds i8*, i8** %12, i64 1
%22 = load i8*, i8** %21
%23 = icmp eq i8* %22, null
br i1 %23, label %24, label %10
24: ; preds = %19, %6
%25 = phi i32 [ 0, %6 ], [ %20, %19 ]
ret i32 %25
}