#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 */
scalar_t__ dp();
scalar_t__ input();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int i;
  for (i = 1; input(); ++i) {
    printf("Collection #%d:\n", i);
    puts(dp() ? "Can be divided.\n" : "Can't be divided.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <input@plt>
cmp    $0x0,%rax
je     11a9 <main+0x69>
mov    -0x8(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <dp@plt>
mov    %rax,%rcx
lea    0xe9b(%rip),%rdi
lea    0xe83(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <input@plt>
test   %rax,%rax
je     119f <main+0x5f>
mov    $0x1,%ebx
lea    0xea0(%rip),%r14
lea    0xebb(%rip),%r15
lea    0xea3(%rip),%r12
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <dp@plt>
test   %rax,%rax
mov    %r12,%rdi
cmove  %r15,%rdi
call   1040 <puts@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1030 <input@plt>
test   %rax,%rax
jne    1170 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Collection #%d:\0A\00"
@.str.1 = [17 x i8] c"Can be divided.\0A\00"
@.str.2 = [19 x i8] c"Can't be divided.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %14, %0
%4 = call i64 (...) @input()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i64 (...) @dp()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0)
%13 = call i32 @puts(i8* %12)
br label %14
14: ; preds = %6
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Collection #%d:\0A\00"
@.str.1 = [17 x i8] c"Can be divided.\0A\00"
@.str.2 = [19 x i8] c"Can't be divided.\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @input()
%2 = icmp eq i64 %1, 0
br i1 %2, label %13, label %3
3: ; preds = %0, %3
%4 = phi i32 [ %10, %3 ], [ 1, %0 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i64 (...) @dp()
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
%10 = add nuw nsw i32 %4, 1
%11 = tail call i64 (...) @input()
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %0
ret i32 0
}