#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 is_isbn(long long *);
int /*<<< orphan*/ printf(char *, ...);
void process(long long *num) {
  if (num[0] == 978 || num[0] == 979) {
    printf("%d", is_isbn(num));
    switch (num[2]) {
    case 933346:
      printf("\nBluebridge");
      break;
    case 55583:
      printf("\nAlyson Books");
      break;
    case 4210:
      printf("\nFUNimation Productions, Ltd.");
      break;
    case 01:
      printf("\nPyramid Books");
      break;
    }
  } else {
    printf("0");
  }
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x3d2,(%rax)
je     114e <process+0x2e>
mov    -0x8(%rbp),%rax
cmpq   $0x3d3,(%rax)
jne    120d <process+0xed>
mov    -0x8(%rbp),%rdi
call   1040 <is_isbn@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x10(%rbp)
sub    $0x1,%rax
je     11fa <process+0xda>
jmp    1182 <process+0x62>
mov    -0x10(%rbp),%rax
sub    $0x1072,%rax
je     11e7 <process+0xc7>
jmp    1197 <process+0x77>
mov    -0x10(%rbp),%rax
sub    $0xd91f,%rax
je     11d4 <process+0xb4>
jmp    11ac <process+0x8c>
mov    -0x10(%rbp),%rax
sub    $0xe3de2,%rax
jne    1208 <process+0xe8>
jmp    11c1 <process+0xa1>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <process+0xe8>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <process+0xe8>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1208 <process+0xe8>
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121b <process+0xfb>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process>:
push   %rbx
mov    (%rdi),%rax
and    $0xfffffffffffffffe,%rax
cmp    $0x3d2,%rax
jne    117b <process+0x4b>
mov    %rdi,%rbx
call   1050 <is_isbn@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%rax
cmp    $0xd91e,%rax
jg     1186 <process+0x56>
cmp    $0x1,%rax
je     11a1 <process+0x71>
cmp    $0x1072,%rax
jne    119f <process+0x6f>
lea    0xea4(%rip),%rdi
jmp    11b1 <process+0x81>
mov    $0x30,%edi
pop    %rbx
jmp    1030 <putchar@plt>
cmp    $0xd91f,%rax
je     11aa <process+0x7a>
cmp    $0xe3de2,%rax
jne    119f <process+0x6f>
lea    0xe66(%rip),%rdi
jmp    11b1 <process+0x81>
pop    %rbx
ret
lea    0xe93(%rip),%rdi
jmp    11b1 <process+0x81>
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"\0ABluebridge\00"
@.str.2 = [14 x i8] c"\0AAlyson Books\00"
@.str.3 = [30 x i8] c"\0AFUNimation Productions, Ltd.\00"
@.str.4 = [15 x i8] c"\0APyramid Books\00"
@.str.5 = [2 x i8] c"0\00"
define void @process(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 978
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, 979
br i1 %11, label %12, label %28
12: ; preds = %7, %1
%13 = load i64*, i64** %2
%14 = call i32 @is_isbn(i64* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i64*, i64** %2
%17 = getelementptr inbounds i64, i64* %16, i64 2
%18 = load i64, i64* %17
switch i64 %18, label %27 [
i64 933346, label %19
i64 55583, label %21
i64 4210, label %23
i64 1, label %25
]
19: ; preds = %12
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %27
21: ; preds = %12
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %27
23: ; preds = %12
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %27
25: ; preds = %12
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %12, %25, %23, %21, %19
br label %30
28: ; preds = %7
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %30
30: ; preds = %28, %27
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"\0ABluebridge\00"
@.str.2 = [14 x i8] c"\0AAlyson Books\00"
@.str.3 = [30 x i8] c"\0AFUNimation Productions, Ltd.\00"
@.str.4 = [15 x i8] c"\0APyramid Books\00"
define void @process(i64* %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, -2
%4 = icmp eq i64 %3, 978
br i1 %4, label %5, label %18
5: ; preds = %1
%6 = tail call i32 @is_isbn(i64* %0)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds i64, i64* %0, i64 2
%9 = load i64, i64* %8
switch i64 %9, label %20 [
i64 933346, label %10
i64 55583, label %12
i64 4210, label %14
i64 1, label %16
]
10: ; preds = %5
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %20
12: ; preds = %5
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %20
14: ; preds = %5
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %20
16: ; preds = %5
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %20
18: ; preds = %1
%19 = tail call i32 @putchar(i32 48)
br label %20
20: ; preds = %10, %12, %14, %16, %5, %18
ret void
}