#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void help(char *name) {
  fprintf(stderr, "Usage: %s [OPTIONS] NUMERATOR [[/] DENOMINATOR]\n", name);
  fprintf(
      stderr,
      "    -m, --maxden=integer    max denominator\n"
      "        --maxnum=integer    max numerator\n"
      "    -n, --number=integer    max number of continued fraction coeffs\n"
      "\n"
      "    -w, --welformed         welformed style\n"
      "    -p, --plain             plain style\n"
      "\n"
      "    -r, --report            report result\n"
      "    -c, --cont              display continued fraction\n"
      "    -g, --gcd               display gcd of two integers\n"
      "    -s, --simple            display approximate simple fraction\n"
      "                            print the best rational for float in round "
      "convention\n"
      "    -l, --list              list iteration process\n"
      "\n"
      "    -v, --reverse           convert a continued fraction into fraction\n"
      "\n"
      "        --sqrt              square root\n"
      "        --int-bits=bits     integer precision in bits to calculate "
      "bihomographic\n"
      "        --root=m/n          root of {}^{m/n}\n"
      "    -f  --float=precision   generate float expression\n"
      "\n"
      "    -h, --help              display this help\n"
      "    --version               output version information\n"
      "    --                      following minus number not parsed as "
      "option(s)\n");
  fprintf(stderr, "\nExample:\n");
  fprintf(stderr, "    %s 144 89\n", name);
  fprintf(stderr, "    %s -c 89 144\n", name);
  fprintf(stderr, "    %s -c -p 55 144\n", name);
  fprintf(stderr, "    %s -c -n 4 3.14159\n", name);
  fprintf(stderr, "    %s -s 3.142\n", name);
  fprintf(stderr, "    %s -s 3.1416\n", name);
  fprintf(stderr, "    %s -rv 3 7 16\n", name);
  fprintf(stderr, "    %s -c -p -n 18 2.71828182845964\n", name);
  fprintf(stderr, "    %s -l 1920 1080\n", name);
  fprintf(stderr, "    %s -cp -- -16 9\n", name);
  fprintf(stderr, "    %s -n400 --int-bits=1024 --sqrt 3 13\n", name);
  fprintf(stderr,
          "\nReport bugs to: http://github.com/zighouse/cfr/issues .\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeea(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0x12f8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12e8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12dc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12d3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12cd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12ca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12c0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dd2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12b7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12af(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12b9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12b3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x12ad(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
lea    0x12c0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef5(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x1309(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x1303(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fe(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fd(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x1301(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fe(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x12fb(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x130c(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x130d(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x130e(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0x1324(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s [OPTIONS] NUMERATOR [[/] DENOMINATOR]\0A\00"
@.str.1 = [1061 x i8] c" -m, --maxden=integer max denominator\0A --maxnum=integer max numerator\0A -n, --number=integer max number of continued fraction coeffs\0A\0A -w, --welformed welformed style\0A -p, --plain plain style\0A\0A -r, --report report result\0A -c, --cont display continued fraction\0A -g, --gcd display gcd of two integers\0A -s, --simple display approximate simple fraction\0A print the best rational for float in round convention\0A -l, --list list iteration process\0A\0A -v, --reverse convert a continued fraction into fraction\0A\0A --sqrt square root\0A --int-bits=bits integer precision in bits to calculate bihomographic\0A --root=m/n root of {}^{m/n}\0A -f --float=precision generate float expression\0A\0A -h, --help display this help\0A --version output version information\0A -- following minus number not parsed as option(s)\0A\00"
@.str.2 = [11 x i8] c"\0AExample:\0A\00"
@.str.3 = [15 x i8] c" %s 144 89\0A\00"
@.str.4 = [18 x i8] c" %s -c 89 144\0A\00"
@.str.5 = [21 x i8] c" %s -c -p 55 144\0A\00"
@.str.6 = [24 x i8] c" %s -c -n 4 3.14159\0A\00"
@.str.7 = [17 x i8] c" %s -s 3.142\0A\00"
@.str.8 = [18 x i8] c" %s -s 3.1416\0A\00"
@.str.9 = [19 x i8] c" %s -rv 3 7 16\0A\00"
@.str.10 = [37 x i8] c" %s -c -p -n 18 2.71828182845964\0A\00"
@.str.11 = [21 x i8] c" %s -l 1920 1080\0A\00"
@.str.12 = [21 x i8] c" %s -cp -- -16 9\0A\00"
@.str.13 = [42 x i8] c" %s -n400 --int-bits=1024 --sqrt 3 13\0A\00"
@.str.14 = [58 x i8] c"\0AReport bugs to: http://github.com/zighouse/cfr/issues .\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([1061 x i8], [1061 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %2
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @stderr
%14 = load i8*, i8** %2
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %2
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %17)
%19 = load i32, i32* @stderr
%20 = load i8*, i8** %2
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %2
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %23)
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %2
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %26)
%28 = load i32, i32* @stderr
%29 = load i8*, i8** %2
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %29)
%31 = load i32, i32* @stderr
%32 = load i8*, i8** %2
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* %32)
%34 = load i32, i32* @stderr
%35 = load i8*, i8** %2
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8* %35)
%37 = load i32, i32* @stderr
%38 = load i8*, i8** %2
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i8* %38)
%40 = load i32, i32* @stderr
%41 = load i8*, i8** %2
%42 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i8* %41)
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"Usage: %s [OPTIONS] NUMERATOR [[/] DENOMINATOR]\0A\00"
@.str.1 = [1061 x i8] c" -m, --maxden=integer max denominator\0A --maxnum=integer max numerator\0A -n, --number=integer max number of continued fraction coeffs\0A\0A -w, --welformed welformed style\0A -p, --plain plain style\0A\0A -r, --report report result\0A -c, --cont display continued fraction\0A -g, --gcd display gcd of two integers\0A -s, --simple display approximate simple fraction\0A print the best rational for float in round convention\0A -l, --list list iteration process\0A\0A -v, --reverse convert a continued fraction into fraction\0A\0A --sqrt square root\0A --int-bits=bits integer precision in bits to calculate bihomographic\0A --root=m/n root of {}^{m/n}\0A -f --float=precision generate float expression\0A\0A -h, --help display this help\0A --version output version information\0A -- following minus number not parsed as option(s)\0A\00"
@.str.2 = [11 x i8] c"\0AExample:\0A\00"
@.str.3 = [15 x i8] c" %s 144 89\0A\00"
@.str.4 = [18 x i8] c" %s -c 89 144\0A\00"
@.str.5 = [21 x i8] c" %s -c -p 55 144\0A\00"
@.str.6 = [24 x i8] c" %s -c -n 4 3.14159\0A\00"
@.str.7 = [17 x i8] c" %s -s 3.142\0A\00"
@.str.8 = [18 x i8] c" %s -s 3.1416\0A\00"
@.str.9 = [19 x i8] c" %s -rv 3 7 16\0A\00"
@.str.10 = [37 x i8] c" %s -c -p -n 18 2.71828182845964\0A\00"
@.str.11 = [21 x i8] c" %s -l 1920 1080\0A\00"
@.str.12 = [21 x i8] c" %s -cp -- -16 9\0A\00"
@.str.13 = [42 x i8] c" %s -n400 --int-bits=1024 --sqrt 3 13\0A\00"
@.str.14 = [58 x i8] c"\0AReport bugs to: http://github.com/zighouse/cfr/issues .\0A\00"
define void @help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([1061 x i8], [1061 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %0)
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8* %0)
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %0)
%22 = load i32, i32* @stderr
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0), i8* %0)
%24 = load i32, i32* @stderr
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8* %0)
%26 = load i32, i32* @stderr
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i8* %0)
%28 = load i32, i32* @stderr
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0), i8* %0)
%30 = load i32, i32* @stderr
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.14, i64 0, i64 0))
ret void
}