#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, ...);
int scanf(char *, int *);
int main() {
  int n;
  while (scanf("%d", &n) == 1 && n != 0) {
    if (n > 100)
      printf("f91(%d) = %d\n", n, n - 10);
    else
      printf("f91(%d) = 91\n", n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x9(%rbp)
jne    1159 <main+0x39>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1169 <main+0x49>
jmp    11a5 <main+0x85>
cmpl   $0x64,-0x8(%rbp)
jle    118f <main+0x6f>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
sub    $0xa,%edx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <main+0x80>
mov    -0x8(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11a2 <main+0x82>
mov    0x4(%rsp),%esi
test   %esi,%esi
je     11a2 <main+0x82>
lea    0xeb6(%rip),%r14
lea    0xeac(%rip),%r15
lea    0x4(%rsp),%rbx
lea    0xeb1(%rip),%r12
cmp    $0x65,%esi
jl     1180 <main+0x60>
lea    -0xa(%rsi),%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    118a <main+0x6a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    11a2 <main+0x82>
mov    0x4(%rsp),%esi
test   %esi,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"f91(%d) = %d\0A\00"
@.str.2 = [14 x i8] c"f91(%d) = 91\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %22, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ false, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %23
11: ; preds = %9
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 100
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i32, i32* %2
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 10
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %15, i32 %17)
br label %22
19: ; preds = %11
%20 = load i32, i32* %2
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %14
br label %3
23: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [14 x i8] c"f91(%d) = %d\0A\00"
@.str.2 = [14 x i8] c"f91(%d) = 91\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 0
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %8, label %22
8: ; preds = %0, %16
%9 = phi i32 [ %19, %16 ], [ %5, %0 ]
%10 = icmp sgt i32 %9, 100
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = add nsw i32 %9, -10
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %12)
br label %16
14: ; preds = %8
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %16
16: ; preds = %14, %11
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%18 = icmp eq i32 %17, 1
%19 = load i32, i32* %1
%20 = icmp ne i32 %19, 0
%21 = select i1 %18, i1 %20, i1 false
br i1 %21, label %8, label %22
22: ; preds = %16, %0
ret i32 0
}