#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__ gpg(char *, char *);
int /*<<< orphan*/ printf(char *);
int main() {
  if (gpg("/home/vmiklos/.gnupg/pubring.gpg", "good/pacman-3.3.2.tar.gz.asc"))
    printf("ok\n");
  else
    printf("failed\n");
  if (gpg("/home/vmiklos/.gnupg/pubring.gpg", "bad/pacman-3.3.2.tar.gz.asc"))
    printf("ok\n");
  else
    printf("failed\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <gpg@plt>
cmp    $0x0,%rax
je     115d <main+0x3d>
lea    0xeeb(%rip),%rdi
call   1040 <printf@plt>
jmp    1169 <main+0x49>
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
lea    0xe90(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <gpg@plt>
cmp    $0x0,%rax
je     1197 <main+0x77>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
jmp    11a3 <main+0x83>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%r14
lea    0xeee(%rip),%rsi
mov    %r14,%rdi
call   1040 <gpg@plt>
test   %rax,%rax
lea    0xf15(%rip),%r15
lea    0xf15(%rip),%rbx
mov    %rbx,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rsi
mov    %r14,%rdi
call   1040 <gpg@plt>
test   %rax,%rax
cmove  %r15,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"/home/vmiklos/.gnupg/pubring.gpg\00"
@.str.1 = [29 x i8] c"good/pacman-3.3.2.tar.gz.asc\00"
@.str.2 = [4 x i8] c"ok\0A\00"
@.str.3 = [8 x i8] c"failed\0A\00"
@.str.4 = [28 x i8] c"bad/pacman-3.3.2.tar.gz.asc\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @gpg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = call i64 @gpg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"/home/vmiklos/.gnupg/pubring.gpg\00"
@.str.1 = [29 x i8] c"good/pacman-3.3.2.tar.gz.asc\00"
@.str.4 = [28 x i8] c"bad/pacman-3.3.2.tar.gz.asc\00"
@str.5 = [7 x i8] c"failed\00"
@str.7 = [3 x i8] c"ok\00"
define i32 @main() {
%1 = tail call i64 @gpg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.7, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = tail call i64 @gpg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.7, i64 0, i64 0)
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}