#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 *);
int /*<<< orphan*/ *strstr(char *, char *);
void CheckPublisher(char *isbn) {
  char BlueBridge[] = "933346";
  char Alyson[] = "55583";
  char FUNimation[] = "4210";
  char Pyramid[] = "01";
  if (strstr(isbn, BlueBridge) != NULL) {
    printf("\nBluebridge");
  }
  if (strstr(isbn, Alyson) != NULL) {
    printf("\nAlyson Books");
  }
  if (strstr(isbn, FUNimation) != NULL) {
    printf("\nFUNimation Productions, Ltd.");
  }
  if (strstr(isbn, Pyramid) != NULL) {
    printf("\nPyramid Books");
  }
}


x86 assembly (clang, -O0):
<CheckPublisher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0xf(%rbp)
mov    0xec8(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xec0(%rip),%al
mov    %al,-0x9(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x11(%rbp)
mov    0xeaa(%rip),%eax
mov    %eax,-0x1a(%rbp)
mov    0xea5(%rip),%al
mov    %al,-0x16(%rbp)
mov    0xe9c(%rip),%ax
mov    %ax,-0x1d(%rbp)
mov    0xe94(%rip),%al
mov    %al,-0x1b(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xf(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11a6 <CheckPublisher+0x86>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x15(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11c9 <CheckPublisher+0xa9>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x1a(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     11ec <CheckPublisher+0xcc>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x1d(%rbp),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     120f <CheckPublisher+0xef>
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckPublisher>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1141 <CheckPublisher+0x21>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1161 <CheckPublisher+0x41>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     1181 <CheckPublisher+0x61>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strstr@plt>
test   %rax,%rax
je     11a2 <CheckPublisher+0x82>
lea    0xeb1(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@__const.CheckPublisher.BlueBridge = [7 x i8] c"933346\00"
@__const.CheckPublisher.Alyson = [6 x i8] c"55583\00"
@__const.CheckPublisher.FUNimation = [5 x i8] c"4210\00"
@__const.CheckPublisher.Pyramid = [3 x i8] c"01\00"
@.str = [12 x i8] c"\0ABluebridge\00"
@.str.1 = [14 x i8] c"\0AAlyson Books\00"
@.str.2 = [30 x i8] c"\0AFUNimation Productions, Ltd.\00"
@.str.3 = [15 x i8] c"\0APyramid Books\00"
define void @CheckPublisher(i8* %0) {
%2 = alloca i8*
%3 = alloca [7 x i8]
%4 = alloca [6 x i8]
%5 = alloca [5 x i8]
%6 = alloca [3 x i8]
store i8* %0, i8** %2
%7 = bitcast [7 x i8]* %3 to i8*
%8 = bitcast [6 x i8]* %4 to i8*
%9 = bitcast [5 x i8]* %5 to i8*
%10 = bitcast [3 x i8]* %6 to i8*
%11 = load i8*, i8** %2
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%13 = call i32* @strstr(i8* %11, i8* %12)
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %1
%18 = load i8*, i8** %2
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%20 = call i32* @strstr(i8* %18, i8* %19)
%21 = icmp ne i32* %20, null
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %17
%25 = load i8*, i8** %2
%26 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%27 = call i32* @strstr(i8* %25, i8* %26)
%28 = icmp ne i32* %27, null
br i1 %28, label %29, label %31
29: ; preds = %24
%30 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %24
%32 = load i8*, i8** %2
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%34 = call i32* @strstr(i8* %32, i8* %33)
%35 = icmp ne i32* %34, null
br i1 %35, label %36, label %38
36: ; preds = %31
%37 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %38
38: ; preds = %36, %31
ret void
}

LLVM IR (-O2):
@__const.CheckPublisher.BlueBridge = [7 x i8] c"933346\00"
@__const.CheckPublisher.Alyson = [6 x i8] c"55583\00"
@__const.CheckPublisher.FUNimation = [5 x i8] c"4210\00"
@__const.CheckPublisher.Pyramid = [3 x i8] c"01\00"
@.str = [12 x i8] c"\0ABluebridge\00"
@.str.1 = [14 x i8] c"\0AAlyson Books\00"
@.str.2 = [30 x i8] c"\0AFUNimation Productions, Ltd.\00"
@.str.3 = [15 x i8] c"\0APyramid Books\00"
define void @CheckPublisher(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @__const.CheckPublisher.BlueBridge, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @__const.CheckPublisher.Alyson, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
%12 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @__const.CheckPublisher.FUNimation, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @__const.CheckPublisher.Pyramid, i64 0, i64 0))
%18 = icmp eq i32* %17, null
br i1 %18, label %21, label %19
19: ; preds = %16
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
ret void
}