#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__ EOF;
int /*<<< orphan*/ f91(unsigned long);
int /*<<< orphan*/ printf(char *, unsigned long, int /*<<< orphan*/);
scalar_t__ scanf(char *, unsigned long *);
int main() {
  unsigned long int n;
  while (scanf("%lu", &n) != EOF) {
    if (n == 0)
      continue;
    printf("f91(%lu) = %lu\n", n, f91(n));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%rax
je     1197 <main+0x67>
cmpq   $0x0,-0x10(%rbp)
jne    116f <main+0x3f>
jmp    113f <main+0xf>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <f91@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e93(%rip),%r13
cmp    0x0(%r13),%rax
jne    116b <main+0x3b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
lea    0xe8e(%rip),%r14
lea    0x8(%rsp),%r12
lea    0xe86(%rip),%r15
jmp    1191 <main+0x61>
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     115b <main+0x2b>
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     1180 <main+0x50>
mov    %rbx,%rdi
call   1030 <f91@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <printf@plt>
jmp    1180 <main+0x50>

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
@EOF = global i64 0
@.str.1 = [16 x i8] c"f91(%lu) = %lu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
br label %3
3: ; preds = %11, %10, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %2)
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %16
7: ; preds = %3
%8 = load i64, i64* %2
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
br label %3
11: ; preds = %7
%12 = load i64, i64* %2
%13 = load i64, i64* %2
%14 = call i32 @f91(i64 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 %12, i32 %14)
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
@EOF = global i64 0
@.str.1 = [16 x i8] c"f91(%lu) = %lu\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %16, label %6
6: ; preds = %0, %12
%7 = load i64, i64* %1
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = call i32 @f91(i64 %7)
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 %7, i32 %10)
br label %12
12: ; preds = %9, %6
%13 = call i64 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %6
16: ; preds = %12, %0
ret i32 0
}