#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 *, ...);
void printSkipMap(int start, int end, unsigned char skipMap[]) {
  int i;
  char haveSkip = 0;
  printf("Scan range: %02x - %02x\n", start, end);
  printf("Skipping: ");
  for (i = 0; i < 256; i++) {
    if (skipMap[i] == 255) {
      printf("%x ", i);
      haveSkip = 1;
    }
  }
  if (haveSkip == 0)
    printf("None");
  printf("\n------------------------------------\n");
}


x86 assembly (clang, -O0):
<printSkipMap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movb   $0x0,-0x15(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    119b <printSkipMap+0x8b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0xff,%eax
jne    1188 <printSkipMap+0x78>
mov    -0x14(%rbp),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x1,-0x15(%rbp)
jmp    118d <printSkipMap+0x7d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <printSkipMap+0x3f>
movsbl -0x15(%rbp),%eax
cmp    $0x0,%eax
jne    11b6 <printSkipMap+0xa6>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSkipMap>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%edx
mov    %edi,%esi
lea    0xecb(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%bpl
lea    0xece(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
cmpb   $0xff,(%r14,%rbx,1)
je     1176 <printSkipMap+0x56>
add    $0x1,%rbx
cmp    $0x100,%rbx
jne    1160 <printSkipMap+0x40>
jmp    1196 <printSkipMap+0x76>
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1(%rbx),%rax
cmp    $0xff,%rbx
mov    %rax,%rbx
jne    1160 <printSkipMap+0x40>
jmp    11aa <printSkipMap+0x8a>
test   $0x1,%bpl
je     11aa <printSkipMap+0x8a>
lea    0xe85(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7c(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Scan range: %02x - %02x\0A\00"
@.str.1 = [11 x i8] c"Skipping: \00"
@.str.2 = [4 x i8] c"%x \00"
@.str.3 = [5 x i8] c"None\00"
@.str.4 = [39 x i8] c"\0A------------------------------------\0A\00"
define void @printSkipMap(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i8 0, i8* %8
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %7
br label %13
13: ; preds = %28, %3
%14 = load i32, i32* %7
%15 = icmp slt i32 %14, 256
br i1 %15, label %16, label %31
16: ; preds = %13
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %22, 255
br i1 %23, label %24, label %27
24: ; preds = %16
%25 = load i32, i32* %7
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %25)
store i8 1, i8* %8
br label %27
27: ; preds = %24, %16
br label %28
28: ; preds = %27
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
br label %13
31: ; preds = %13
%32 = load i8, i8* %8
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35, %31
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Scan range: %02x - %02x\0A\00"
@.str.1 = [11 x i8] c"Skipping: \00"
@.str.2 = [4 x i8] c"%x \00"
@.str.3 = [5 x i8] c"None\00"
@str = [38 x i8] c"\0A------------------------------------\00"
define void @printSkipMap(i32 %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %17, %3
%7 = phi i64 [ %20, %17 ], [ 0, %3 ]
%8 = phi i1 [ false, %17 ], [ true, %3 ]
br label %9
9: ; preds = %6, %14
%10 = phi i64 [ %15, %14 ], [ %7, %6 ]
%11 = getelementptr inbounds i8, i8* %2, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, -1
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, 256
br i1 %16, label %22, label %9
17: ; preds = %9
%18 = trunc i64 %10 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %10, 1
%21 = icmp eq i64 %20, 256
br i1 %21, label %25, label %6
22: ; preds = %14
br i1 %8, label %23, label %25
23: ; preds = %22
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %17, %23, %22
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}