#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 fibs(long, long);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, long *, long *);
int main() {
  long low, high;
  while (scanf("%ld %ld", &low, &high)) {
    if (low == 0 && high == 0)
      break;
    printf("%d\n", fibs(low, high));
  }
  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
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     1198 <main+0x68>
cmpq   $0x0,-0x10(%rbp)
jne    1178 <main+0x48>
cmpq   $0x0,-0x18(%rbp)
jne    1178 <main+0x48>
jmp    1198 <main+0x68>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <fibs@plt>
mov    %eax,%esi
lea    0xe7a(%rip),%rdi
call   1030 <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   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebe(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
test   %rax,%rax
je     11a4 <main+0x74>
lea    0xeab(%rip),%r14
lea    0xe9c(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %rdi,%rax
or     %rsi,%rax
je     11a4 <main+0x74>
call   1050 <fibs@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
test   %rax,%rax
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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