#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);
scalar_t__ scanf(char *, int *);
int main() {
  int a, r;
  while (scanf("%d", &a) && a) {
    if (a <= 100)
      r = 91;
    else
      r = a - 10;
    printf("f91(%d) = %d\n", a, r);
  }
  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    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
je     115b <main+0x3b>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116b <main+0x4b>
jmp    11a1 <main+0x81>
cmpl   $0x64,-0x8(%rbp)
jg     1181 <main+0x61>
movl   $0x5b,-0xc(%rbp)
jmp    118a <main+0x6a>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     1189 <main+0x69>
mov    0x4(%rsp),%esi
test   %esi,%esi
je     1189 <main+0x69>
mov    $0x5b,%ebp
lea    0xeb2(%rip),%r14
lea    0xea8(%rip),%r15
lea    0x4(%rsp),%rbx
nopl   (%rax)
lea    -0xa(%rsi),%edx
cmp    $0x65,%esi
cmovl  %ebp,%edx
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     1189 <main+0x69>
mov    0x4(%rsp),%esi
test   %esi,%esi
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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