#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 publishing_house(int *parsed_isbn_number) {
  int position_counter = 6;
  int counter = 0;
  int publishing_house_array[30] = {0};
  while (parsed_isbn_number[position_counter] != -3) {
    publishing_house_array[counter] = parsed_isbn_number[position_counter];
    position_counter++;
    counter++;
  }
  if (publishing_house_array[0] == 5 && publishing_house_array[1] == 5 &&
      publishing_house_array[2] == 5 && publishing_house_array[3] == 8 &&
      publishing_house_array[4] == 3) {
    printf("Alyson Books\n");
  } else if (publishing_house_array[0] == 9 && publishing_house_array[1] == 3 &&
             publishing_house_array[2] == 3 && publishing_house_array[3] == 3 &&
             publishing_house_array[4] == 4 && publishing_house_array[5] == 6) {
    printf("Bluebridge\n");
  } else if (publishing_house_array[0] == 4 && publishing_house_array[1] == 2 &&
             publishing_house_array[2] == 1 && publishing_house_array[3] == 0) {
    printf("FUNimation Productions, Ltd.\n");
  } else if (publishing_house_array[0] == 0 && publishing_house_array[1] == 1) {
    printf("Pyramid Books\n");
  }
}


x86 assembly (clang, -O0):
<publishing_house>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x78,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0xfffffffd,(%rax,%rcx,4)
je     118f <publishing_house+0x6f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
movslq -0x10(%rbp),%rax
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1150 <publishing_house+0x30>
cmpl   $0x5,-0x90(%rbp)
jne    11de <publishing_house+0xbe>
cmpl   $0x5,-0x8c(%rbp)
jne    11de <publishing_house+0xbe>
cmpl   $0x5,-0x88(%rbp)
jne    11de <publishing_house+0xbe>
cmpl   $0x8,-0x84(%rbp)
jne    11de <publishing_house+0xbe>
cmpl   $0x3,-0x80(%rbp)
jne    11de <publishing_house+0xbe>
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
jmp    12b1 <publishing_house+0x191>
cmpl   $0x9,-0x90(%rbp)
jne    1237 <publishing_house+0x117>
cmpl   $0x3,-0x8c(%rbp)
jne    1237 <publishing_house+0x117>
cmpl   $0x3,-0x88(%rbp)
jne    1237 <publishing_house+0x117>
cmpl   $0x3,-0x84(%rbp)
jne    1237 <publishing_house+0x117>
cmpl   $0x4,-0x80(%rbp)
jne    1237 <publishing_house+0x117>
cmpl   $0x6,-0x7c(%rbp)
jne    1237 <publishing_house+0x117>
lea    0xde1(%rip),%rdi
call   1030 <printf@plt>
jmp    12ac <publishing_house+0x18c>
cmpl   $0x4,-0x90(%rbp)
jne    127c <publishing_house+0x15c>
cmpl   $0x2,-0x8c(%rbp)
jne    127c <publishing_house+0x15c>
cmpl   $0x1,-0x88(%rbp)
jne    127c <publishing_house+0x15c>
cmpl   $0x0,-0x84(%rbp)
jne    127c <publishing_house+0x15c>
lea    0xda8(%rip),%rdi
call   1030 <printf@plt>
jmp    12a7 <publishing_house+0x187>
cmpl   $0x0,-0x90(%rbp)
jne    12a2 <publishing_house+0x182>
cmpl   $0x1,-0x8c(%rbp)
jne    12a2 <publishing_house+0x182>
lea    0xd9b(%rip),%rdi
call   1030 <printf@plt>
jmp    12a7 <publishing_house+0x187>
jmp    12ac <publishing_house+0x18c>
jmp    12b1 <publishing_house+0x191>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<publishing_house>:
xorps  %xmm0,%xmm0
movaps %xmm0,-0x18(%rsp)
movaps %xmm0,-0x28(%rsp)
movaps %xmm0,-0x38(%rsp)
movaps %xmm0,-0x48(%rsp)
movaps %xmm0,-0x58(%rsp)
movaps %xmm0,-0x68(%rsp)
movaps %xmm0,-0x78(%rsp)
movq   $0x0,-0x8(%rsp)
mov    0x18(%rdi),%eax
xor    %edx,%edx
mov    $0x0,%r8d
mov    $0x0,%esi
mov    $0x0,%r9d
mov    $0x0,%ecx
cmp    $0xfffffffd,%eax
je     1197 <publishing_house+0x87>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,-0x78(%rsp,%rcx,1)
mov    0x1c(%rdi,%rcx,1),%eax
add    $0x4,%rcx
cmp    $0xfffffffd,%eax
jne    1170 <publishing_house+0x60>
mov    -0x78(%rsp),%ecx
mov    -0x74(%rsp),%r9d
mov    -0x70(%rsp),%esi
mov    -0x6c(%rsp),%r8d
mov    -0x68(%rsp),%edx
cmp    $0x5,%ecx
jne    11be <publishing_house+0xae>
cmp    $0x5,%r9d
jne    11be <publishing_house+0xae>
cmp    $0x5,%esi
jne    11be <publishing_house+0xae>
cmp    $0x8,%r8d
jne    11be <publishing_house+0xae>
cmp    $0x3,%edx
jne    11be <publishing_house+0xae>
lea    0xe7d(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x9,%ecx
jne    11ec <publishing_house+0xdc>
cmp    $0x3,%r9d
jne    11ec <publishing_house+0xdc>
cmp    $0x3,%esi
jne    11ec <publishing_house+0xdc>
cmp    $0x3,%r8d
jne    11ec <publishing_house+0xdc>
cmp    $0x4,%edx
jne    11ec <publishing_house+0xdc>
cmpl   $0x6,-0x64(%rsp)
jne    11ec <publishing_house+0xdc>
lea    0xe44(%rip),%rdi
jmp    1030 <puts@plt>
cmp    $0x4,%ecx
jne    120d <publishing_house+0xfd>
cmp    $0x2,%r9d
jne    120d <publishing_house+0xfd>
cmp    $0x1,%esi
jne    120d <publishing_house+0xfd>
test   %r8d,%r8d
jne    120d <publishing_house+0xfd>
lea    0xe06(%rip),%rdi
jmp    1030 <puts@plt>
test   %ecx,%ecx
jne    1223 <publishing_house+0x113>
cmp    $0x1,%r9d
jne    1223 <publishing_house+0x113>
lea    0xde2(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Alyson Books\0A\00"
@.str.1 = [12 x i8] c"Bluebridge\0A\00"
@.str.2 = [30 x i8] c"FUNimation Productions, Ltd.\0A\00"
@.str.3 = [15 x i8] c"Pyramid Books\0A\00"
define void @publishing_house(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [30 x i32]
store i32* %0, i32** %2
store i32 6, i32* %3
store i32 0, i32* %4
%6 = bitcast [30 x i32]* %5 to i8*
br label %7
7: ; preds = %14, %1
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, -3
br i1 %13, label %14, label %27
14: ; preds = %7
%15 = load i32*, i32** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 %21
store i32 %19, i32* %22
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %7
27: ; preds = %7
%28 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%29 = load i32, i32* %28
%30 = icmp eq i32 %29, 5
br i1 %30, label %31, label %49
31: ; preds = %27
%32 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 1
%33 = load i32, i32* %32
%34 = icmp eq i32 %33, 5
br i1 %34, label %35, label %49
35: ; preds = %31
%36 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 2
%37 = load i32, i32* %36
%38 = icmp eq i32 %37, 5
br i1 %38, label %39, label %49
39: ; preds = %35
%40 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 3
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 8
br i1 %42, label %43, label %49
43: ; preds = %39
%44 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 4
%45 = load i32, i32* %44
%46 = icmp eq i32 %45, 3
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %106
49: ; preds = %43, %39, %35, %31, %27
%50 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 9
br i1 %52, label %53, label %75
53: ; preds = %49
%54 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 1
%55 = load i32, i32* %54
%56 = icmp eq i32 %55, 3
br i1 %56, label %57, label %75
57: ; preds = %53
%58 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 2
%59 = load i32, i32* %58
%60 = icmp eq i32 %59, 3
br i1 %60, label %61, label %75
61: ; preds = %57
%62 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 3
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 3
br i1 %64, label %65, label %75
65: ; preds = %61
%66 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 4
%67 = load i32, i32* %66
%68 = icmp eq i32 %67, 4
br i1 %68, label %69, label %75
69: ; preds = %65
%70 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 5
%71 = load i32, i32* %70
%72 = icmp eq i32 %71, 6
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %105
75: ; preds = %69, %65, %61, %57, %53, %49
%76 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 4
br i1 %78, label %79, label %93
79: ; preds = %75
%80 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 1
%81 = load i32, i32* %80
%82 = icmp eq i32 %81, 2
br i1 %82, label %83, label %93
83: ; preds = %79
%84 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 2
%85 = load i32, i32* %84
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %93
87: ; preds = %83
%88 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 3
%89 = load i32, i32* %88
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %93
91: ; preds = %87
%92 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %104
93: ; preds = %87, %83, %79, %75
%94 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %103
97: ; preds = %93
%98 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 1
%99 = load i32, i32* %98
%100 = icmp eq i32 %99, 1
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %103
103: ; preds = %101, %97, %93
br label %104
104: ; preds = %103, %91
br label %105
105: ; preds = %104, %73
br label %106
106: ; preds = %105, %47
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Pyramid Books\00"
@str.4 = [29 x i8] c"FUNimation Productions, Ltd.\00"
@str.5 = [11 x i8] c"Bluebridge\00"
@str.6 = [13 x i8] c"Alyson Books\00"
define void @publishing_house(i32* nocapture %0) {
%2 = alloca [30 x i32]
%3 = bitcast [30 x i32]* %2 to i8*
%4 = getelementptr inbounds i32, i32* %0, i64 6
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, -3
br i1 %6, label %28, label %7
7: ; preds = %1, %7
%8 = phi i64 [ %12, %7 ], [ 6, %1 ]
%9 = phi i64 [ %13, %7 ], [ 0, %1 ]
%10 = phi i32 [ %15, %7 ], [ %5, %1 ]
%11 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %9
store i32 %10, i32* %11
%12 = add nuw nsw i64 %8, 1
%13 = add nuw i64 %9, 1
%14 = getelementptr inbounds i32, i32* %0, i64 %12
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, -3
br i1 %16, label %17, label %7
17: ; preds = %7
%18 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%19 = load i32, i32* %18
%20 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 1
%21 = load i32, i32* %20
%22 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 2
%23 = load i32, i32* %22
%24 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 3
%25 = load i32, i32* %24
%26 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 4
%27 = load i32, i32* %26
br label %28
28: ; preds = %17, %1
%29 = phi i32 [ %27, %17 ], [ 0, %1 ]
%30 = phi i32 [ %25, %17 ], [ 0, %1 ]
%31 = phi i32 [ %23, %17 ], [ 0, %1 ]
%32 = phi i32 [ %21, %17 ], [ 0, %1 ]
%33 = phi i32 [ %19, %17 ], [ 0, %1 ]
%34 = icmp eq i32 %33, 5
%35 = icmp eq i32 %32, 5
%36 = select i1 %34, i1 %35, i1 false
%37 = icmp eq i32 %31, 5
%38 = select i1 %36, i1 %37, i1 false
%39 = icmp eq i32 %30, 8
%40 = select i1 %38, i1 %39, i1 false
%41 = icmp eq i32 %29, 3
%42 = select i1 %40, i1 %41, i1 false
br i1 %42, label %69, label %43
43: ; preds = %28
%44 = icmp eq i32 %33, 9
%45 = icmp eq i32 %32, 3
%46 = select i1 %44, i1 %45, i1 false
%47 = icmp eq i32 %31, 3
%48 = select i1 %46, i1 %47, i1 false
%49 = icmp eq i32 %30, 3
%50 = select i1 %48, i1 %49, i1 false
%51 = icmp eq i32 %29, 4
%52 = select i1 %50, i1 %51, i1 false
%53 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 5
%54 = load i32, i32* %53
%55 = icmp eq i32 %54, 6
%56 = select i1 %52, i1 %55, i1 false
br i1 %56, label %69, label %57
57: ; preds = %43
%58 = icmp eq i32 %33, 4
%59 = icmp eq i32 %32, 2
%60 = select i1 %58, i1 %59, i1 false
%61 = icmp eq i32 %31, 1
%62 = select i1 %60, i1 %61, i1 false
%63 = icmp eq i32 %30, 0
%64 = select i1 %62, i1 %63, i1 false
br i1 %64, label %69, label %65
65: ; preds = %57
%66 = icmp eq i32 %33, 0
%67 = icmp eq i32 %32, 1
%68 = select i1 %66, i1 %67, i1 false
br i1 %68, label %69, label %72
69: ; preds = %65, %57, %43, %28
%70 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0), %28 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.5, i64 0, i64 0), %43 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @str.4, i64 0, i64 0), %57 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0), %65 ]
%71 = tail call i32 @puts(i8* dereferenceable(1) %70)
br label %72
72: ; preds = %69, %65
ret void
}