#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void out_version(int v) {
  fprintf(stderr,
          " Optical Character Recognition --- gocr "
          "0.48"
          " "
          "20090802"
          "\n"
          " Copyright (C) 2001-2009 Joerg Schulenburg  GPG=1024D/53BDFBE3\n"
          " released under the GNU General Public License\n");
  if (v)
    fprintf(stderr, " use option -h for help\n");
  if (v & 2)
    exit(1);
  return;
}


x86 assembly (clang, -O0):
<out_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x0,-0x4(%rbp)
je     115f <out_version+0x3f>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xf4b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1178 <out_version+0x58>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_version>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
test   %ebx,%ebx
je     1154 <out_version+0x34>
mov    (%r14),%edi
lea    0xf5b(%rip),%rsi
call   1030 <fprintf@plt>
test   $0x2,%bl
jne    115c <out_version+0x3c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [165 x i8] c" Optical Character Recognition --- gocr 0.48 20090802\0A Copyright (C) 2001-2009 Joerg Schulenburg GPG=1024D/53BDFBE3\0A released under the GNU General Public License\0A\00"
@.str.1 = [25 x i8] c" use option -h for help\0A\00"
define void @out_version(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %2
%12 = and i32 %11, 2
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %10
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [165 x i8] c" Optical Character Recognition --- gocr 0.48 20090802\0A Copyright (C) 2001-2009 Joerg Schulenburg GPG=1024D/53BDFBE3\0A released under the GNU General Public License\0A\00"
@.str.1 = [25 x i8] c" use option -h for help\0A\00"
define void @out_version(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = and i32 %0, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %5
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %1, %5
ret void
}