#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*/ printf(char *, char *, char *);
int strlen(char *);
void ShowVersion() {
  char wipe_c[] = "$Id: options.c 319 2010-10-04 17:12:49Z nail $";
  int i, j, x, len;
  char rev[20];
  len = strlen(wipe_c);
  for (i = 0, x = 0, j = 0; i < len; i++) {
    if (' ' == wipe_c[i]) {
      x++;
    }
    if (x > 3) {
      break;
    }
    if (x < 2) {
      continue;
    }
    rev[j++] = wipe_c[i];
  }
  rev[j] = 0;
  printf("bcwipe version %s rev%s  Copyright 1994-2010 Jetico, Inc.\n",
         "1.2.11", rev);
}


x86 assembly (clang, -O0):
<ShowVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x2f,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    11de <ShowVersion+0xae>
movslq -0x34(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%ecx
mov    $0x20,%eax
cmp    %ecx,%eax
jne    1199 <ShowVersion+0x69>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x3,-0x3c(%rbp)
jle    11a8 <ShowVersion+0x78>
jmp    11de <ShowVersion+0xae>
cmpl   $0x2,-0x3c(%rbp)
jge    11b7 <ShowVersion+0x87>
jmp    11d0 <ShowVersion+0xa0>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,1),%cl
mov    -0x38(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x38(%rbp)
cltq
mov    %cl,-0x60(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    116e <ShowVersion+0x3e>
movslq -0x38(%rbp),%rax
movb   $0x0,-0x60(%rbp,%rax,1)
lea    -0x60(%rbp),%rdx
lea    0xe3d(%rip),%rdi
lea    0xe71(%rip),%rsi
call   1040 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowVersion>:
sub    $0x58,%rsp
movups 0xef4(%rip),%xmm0
movups %xmm0,0x3f(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11a0 <ShowVersion+0x80>
mov    %eax,%r8d
xor    %edx,%edx
xor    %esi,%esi
xor    %eax,%eax
jmp    1179 <ShowVersion+0x59>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
cmp    %rdx,%r8
je     11a2 <ShowVersion+0x82>
mov    %esi,%edi
movzbl 0x20(%rsp,%rdx,1),%ecx
xor    %esi,%esi
cmp    $0x20,%cl
sete   %sil
add    %edi,%esi
cmp    $0x3,%esi
ja     11a2 <ShowVersion+0x82>
cmp    $0x2,%esi
jb     1170 <ShowVersion+0x50>
movslq %eax,%rdi
add    $0x1,%eax
mov    %cl,(%rsp,%rdi,1)
jmp    1170 <ShowVersion+0x50>
xor    %eax,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xe80(%rip),%rdi
lea    0xeb4(%rip),%rsi
mov    %rsp,%rdx
call   1040 <printf@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.ShowVersion.wipe_c = [47 x i8] c"$Id: options.c 319 2010-10-04 17:12:49Z nail $\00"
@.str = [59 x i8] c"bcwipe version %s rev%s Copyright 1994-2010 Jetico, Inc.\0A\00"
@.str.1 = [7 x i8] c"1.2.11\00"
define void @ShowVersion() {
%1 = alloca [47 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [20 x i8]
%7 = bitcast [47 x i8]* %1 to i8*
%8 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %5
store i32 0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %10
10: ; preds = %41, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %44
14: ; preds = %10
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 32, %19
br i1 %20, label %21, label %24
21: ; preds = %14
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %21, %14
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 3
br i1 %26, label %27, label %28
27: ; preds = %24
br label %44
28: ; preds = %24
%29 = load i32, i32* %4
%30 = icmp slt i32 %29, 2
br i1 %30, label %31, label %32
31: ; preds = %28
br label %41
32: ; preds = %28
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
%39 = sext i32 %37 to i64
%40 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %39
store i8 %36, i8* %40
br label %41
41: ; preds = %32, %31
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %10
44: ; preds = %27, %10
%45 = load i32, i32* %3
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 %46
store i8 0, i8* %47
%48 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%49 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %48)
ret void
}

LLVM IR (-O2):
@__const.ShowVersion.wipe_c = [47 x i8] c"$Id: options.c 319 2010-10-04 17:12:49Z nail $\00"
@.str = [59 x i8] c"bcwipe version %s rev%s Copyright 1994-2010 Jetico, Inc.\0A\00"
@.str.1 = [7 x i8] c"1.2.11\00"
define void @ShowVersion() {
%1 = alloca [47 x i8]
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @strlen(i8* %3)
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %29
7: ; preds = %0
%8 = zext i32 %5 to i64
br label %9
9: ; preds = %7, %25
%10 = phi i64 [ 0, %7 ], [ %27, %25 ]
%11 = phi i32 [ 0, %7 ], [ %17, %25 ]
%12 = phi i32 [ 0, %7 ], [ %26, %25 ]
%13 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 32
%16 = zext i1 %15 to i32
%17 = add nuw nsw i32 %11, %16
%18 = icmp ugt i32 %17, 3
br i1 %18, label %29, label %19
19: ; preds = %9
%20 = icmp ult i32 %17, 2
br i1 %20, label %25, label %21
21: ; preds = %19
%22 = add nsw i32 %12, 1
%23 = sext i32 %12 to i64
%24 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %23
store i8 %14, i8* %24
br label %25
25: ; preds = %19, %21
%26 = phi i32 [ %12, %19 ], [ %22, %21 ]
%27 = add nuw nsw i64 %10, 1
%28 = icmp eq i64 %27, %8
br i1 %28, label %29, label %9
29: ; preds = %25, %9, %0
%30 = phi i32 [ 0, %0 ], [ %12, %9 ], [ %26, %25 ]
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %31
store i8 0, i8* %32
%33 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}