#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*/ breakdown(char *, long long *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ process(long long *);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  long long isbn[5] = {0};
  char arr[20] = {0};
  scanf("%s", arr);
  if (strlen(arr) == 17)
    breakdown(arr, isbn);
  else {
    printf("0");
    return 0;
  }
  process(isbn);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1060 <memset@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1060 <memset@plt>
lea    -0x50(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1080 <scanf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x11,%eax
jne    11c3 <main+0x63>
lea    -0x50(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <breakdown@plt>
jmp    11db <main+0x7b>
lea    0xe39(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11eb <main+0x8b>
lea    -0x30(%rbp),%rdi
call   1070 <process@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movq   $0x0,0x40(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xe82(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x11,%eax
jne    11b0 <main+0x60>
mov    %rsp,%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <breakdown@plt>
mov    %rbx,%rdi
call   1060 <process@plt>
jmp    11ba <main+0x6a>
mov    $0x30,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i64]
%3 = alloca [20 x i8]
store i32 0, i32* %1
%4 = bitcast [5 x i64]* %2 to i8*
%5 = bitcast [20 x i8]* %3 to i8*
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = icmp eq i32 %9, 17
br i1 %10, label %11, label %15
11: ; preds = %0
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 0
%14 = call i32 @breakdown(i8* %12, i64* %13)
br label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %20
17: ; preds = %11
%18 = getelementptr inbounds [5 x i64], [5 x i64]* %2, i64 0, i64 0
%19 = call i32 @process(i64* %18)
store i32 0, i32* %1
br label %20
20: ; preds = %17, %15
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [5 x i64]
%2 = alloca [20 x i8]
%3 = bitcast [5 x i64]* %1 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @strlen(i8* %4)
%7 = icmp eq i32 %6, 17
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = getelementptr inbounds [5 x i64], [5 x i64]* %1, i64 0, i64 0
%10 = call i32 @breakdown(i8* %4, i64* %9)
%11 = call i32 @process(i64* %9)
br label %14
12: ; preds = %0
%13 = call i32 @putchar(i32 48)
br label %14
14: ; preds = %8, %12
ret i32 0
}