// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/mathsupport.c
// Function: gt_mathsupport_unit_test
int gt_mathsupport_unit_test(GtError *err)
{
  int had_err = 0;
  GtUword i;
  double less_than_epsilon = 0.0000000000000001;
  gt_error_check(err);

  gt_ensure(!gt_double_equals_one(1.1));
  gt_ensure(gt_double_equals_one(1));
  gt_ensure(gt_double_equals_one(1+less_than_epsilon));
  gt_ensure(!gt_double_equals_one(-1-less_than_epsilon));

  gt_ensure(!gt_double_equals_double(1.0, 2.0));
  gt_ensure(!gt_double_equals_double(-1.0, 1.0));
  gt_ensure(!gt_double_equals_double(1.0, -1.0));
  gt_ensure(!gt_double_equals_double(-1.0, 1+less_than_epsilon));
  gt_ensure(!gt_double_equals_double(1.0, 1.1));
  gt_ensure(gt_double_equals_double(1.0, 1+less_than_epsilon));
  gt_ensure(gt_double_equals_double(1.0, 1.0));
  gt_ensure(gt_double_equals_double(0.0, 0.0));
  gt_ensure(gt_double_equals_double(-1.0, -1.0));
  gt_ensure(gt_double_equals_double(-1.0+less_than_epsilon, -1.0));
  gt_ensure(gt_double_equals_double(-1.0, -1.0+less_than_epsilon));
  gt_ensure(gt_double_equals_double(1.0+less_than_epsilon, 1.0));
  gt_ensure(gt_double_equals_double(1.0, 1.0+less_than_epsilon));

  gt_ensure(gt_double_compare(1.0, 1.0) == 0);
  gt_ensure(gt_double_compare(1.0, 1.1) < 0);
  gt_ensure(gt_double_compare(1.1, 1.0) > 0);
  gt_ensure(gt_double_compare(1.1, -1.0) > 0);
  gt_ensure(gt_double_compare(-1.1, -1.0) < 0);
  gt_ensure(gt_double_compare(1+less_than_epsilon, 1.0) == 0);
  gt_ensure(gt_double_compare(1+less_than_epsilon, -1.0) > 0);
  gt_ensure(gt_double_compare(-1+less_than_epsilon, -1.0) == 0);
  gt_ensure(gt_double_compare(-1+less_than_epsilon, 1.0) < 0);

  gt_ensure(gt_double_smaller_double(1.0, 1.1));
  gt_ensure(gt_double_smaller_double(-1.0, 1.1));
  gt_ensure(gt_double_smaller_double(-1.1, -1.0));
  gt_ensure(!gt_double_smaller_double(-1.0, -1.1));
  gt_ensure(!gt_double_smaller_double(1.0-less_than_epsilon, 1.0));

  gt_ensure(0L == gt_round_to_long(0.5));
  gt_ensure(1L == gt_round_to_long(0.51));
  gt_ensure(-1L == gt_round_to_long(-0.51));
  gt_ensure(0L == gt_round_to_long(-0.5));
  gt_ensure(-2L == gt_round_to_long(-1.5));
  gt_ensure(-2L == gt_round_to_long(-2.5));
  gt_ensure(-3L == gt_round_to_long(-2.51));

  for (i = 0; !had_err && i < GT_MAXLOG2VALUE; ++i) {
    gt_ensure(i+1 == gt_determinebitspervalue(1UL << i));
    gt_ensure((GtWord) i == gt_round_to_long(
               gt_log_base((double) (1UL << i), (double) 2.0)));
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x5930c
movq %rbx, %rdi
callq 0xc103
testb %al, %al
jne 0x5990a
movsd 0x815e4(%rip), %xmm0    # 0xda8f8
callq 0x58d0e
pushq $-0x1
popq %rbp
testb %al, %al
movq %rbx, (%rsp)
je 0x59351
leaq 0x72e2e(%rip), %rsi     # 0xcc159
leaq 0x81791(%rip), %rdx     # 0xdaac3
leaq 0x81771(%rip), %rcx     # 0xdaaaa
leaq 0x8160c(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x117, %r9d            # imm = 0x117
jmp 0x59451
movsd 0x71597(%rip), %xmm0    # 0xca8f0
callq 0x58d0e
testb %al, %al
je 0x593a0
movsd 0x7ad96(%rip), %xmm0    # 0xd4100
callq 0x58d0e
testb %al, %al
je 0x593cd
leaq 0x72ddf(%rip), %rsi     # 0xcc159
leaq 0x81775(%rip), %rdx     # 0xdaaf6
leaq 0x81722(%rip), %rcx     # 0xdaaaa
leaq 0x815bd(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x11a, %r9d            # imm = 0x11A
jmp 0x59451
leaq 0x72db2(%rip), %rsi     # 0xcc159
leaq 0x81730(%rip), %rdx     # 0xdaade
leaq 0x816f5(%rip), %rcx     # 0xdaaaa
leaq 0x81590(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x118, %r9d            # imm = 0x118
jmp 0x59451
movsd 0x7151b(%rip), %xmm0    # 0xca8f0
movapd %xmm0, %xmm1
callq 0x58d7f
testl %eax, %eax
je 0x5940c
leaq 0x72d70(%rip), %rsi     # 0xcc159
leaq 0x81732(%rip), %rdx     # 0xdab22
leaq 0x816b3(%rip), %rcx     # 0xdaaaa
leaq 0x8154e(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x12a, %r9d            # imm = 0x12A
jmp 0x59451
movsd 0x714dc(%rip), %xmm0    # 0xca8f0
movsd 0x814dc(%rip), %xmm1    # 0xda8f8
callq 0x58d7f
testl %eax, %eax
js 0x59524
leaq 0x72d29(%rip), %rsi     # 0xcc159
leaq 0x8170c(%rip), %rdx     # 0xdab43
leaq 0x8166c(%rip), %rcx     # 0xdaaaa
leaq 0x81507(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x12b, %r9d            # imm = 0x12B
xorl %eax, %eax
callq 0xc007
movl %ebp, %eax
xorl %ebx, %ebx
pushq $0x1
popq %rbp
leaq 0x81644(%rip), %r12     # 0xdaaaa
leaq 0x814df(%rip), %r13     # 0xda94c
testb $0x1, %r15b
je 0x59515
cmpq $0x3e, %rbx
ja 0x59515
leaq 0x1(%rbx), %r14
movq %rbp, %r15
movl %ebx, %ecx
shlq %cl, %r15
movq %r15, %rdi
callq 0x58fe7
movl %eax, %eax
cmpq %rax, %r14
jne 0x594bf
cvtsi2sd %r15, %xmm0
movsd 0x7b9d7(%rip), %xmm1    # 0xd4e80
callq 0x591f5
callq 0x590f8
cmpq %rax, %rbx
jne 0x594e2
xorl %eax, %eax
movb $0x1, %r15b
jmp 0x5950d
xorl %r15d, %r15d
movq (%rsp), %rdi
leaq 0x72c8c(%rip), %rsi     # 0xcc159
leaq 0x8191f(%rip), %rdx     # 0xdadf3
movq %r12, %rcx
movq %r13, %r8
movl $0x143, %r9d            # imm = 0x143
jmp 0x59503
xorl %r15d, %r15d
movq (%rsp), %rdi
leaq 0x72c69(%rip), %rsi     # 0xcc159
leaq 0x81926(%rip), %rdx     # 0xdae1d
movq %r12, %rcx
movq %r13, %r8
movl $0x145, %r9d            # imm = 0x145
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %rax
movq %r14, %rbx
jmp 0x5946d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x813cc(%rip), %xmm0    # 0xda8f8
movsd 0x713bc(%rip), %xmm1    # 0xca8f0
callq 0x58d7f
testl %eax, %eax
jle 0x595a0
movsd 0x813b3(%rip), %xmm0    # 0xda8f8
movsd 0x7abb3(%rip), %xmm1    # 0xd4100
callq 0x58d7f
testl %eax, %eax
jle 0x595cd
movsd 0x813a2(%rip), %xmm0    # 0xda900
movsd 0x7ab9a(%rip), %xmm1    # 0xd4100
callq 0x58d7f
testl %eax, %eax
js 0x595fa
leaq 0x72bdf(%rip), %rsi     # 0xcc159
leaq 0x81623(%rip), %rdx     # 0xdaba4
leaq 0x81522(%rip), %rcx     # 0xdaaaa
leaq 0x813bd(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x12e, %r9d            # imm = 0x12E
jmp 0x59451
leaq 0x72bb2(%rip), %rsi     # 0xcc159
leaq 0x815b5(%rip), %rdx     # 0xdab63
leaq 0x814f5(%rip), %rcx     # 0xdaaaa
leaq 0x81390(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x12c, %r9d            # imm = 0x12C
jmp 0x59451
leaq 0x72b85(%rip), %rsi     # 0xcc159
leaq 0x815a8(%rip), %rdx     # 0xdab83
leaq 0x814c8(%rip), %rcx     # 0xdaaaa
leaq 0x81363(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x12d, %r9d            # imm = 0x12D
jmp 0x59451
movsd 0x712ee(%rip), %xmm0    # 0xca8f0
movsd 0x7aaf6(%rip), %xmm1    # 0xd4100
callq 0x58d7f
testl %eax, %eax
jle 0x59659
movsd 0x812ed(%rip), %xmm0    # 0xda908
movsd 0x7aadd(%rip), %xmm1    # 0xd4100
callq 0x58d7f
testl %eax, %eax
je 0x59686
leaq 0x72b26(%rip), %rsi     # 0xcc159
leaq 0x815bd(%rip), %rdx     # 0xdabf7
leaq 0x81469(%rip), %rcx     # 0xdaaaa
leaq 0x81304(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x131, %r9d            # imm = 0x131
jmp 0x59451
leaq 0x72af9(%rip), %rsi     # 0xcc159
leaq 0x8155f(%rip), %rdx     # 0xdabc6
leaq 0x8143c(%rip), %rcx     # 0xdaaaa
leaq 0x812d7(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x130, %r9d            # imm = 0x130
jmp 0x59451
movsd 0x8127a(%rip), %xmm0    # 0xda908
movsd 0x7125a(%rip), %xmm1    # 0xca8f0
callq 0x58d7f
testl %eax, %eax
js 0x596cc
leaq 0x72ab3(%rip), %rsi     # 0xcc159
leaq 0x8157d(%rip), %rdx     # 0xdac2a
leaq 0x813f6(%rip), %rcx     # 0xdaaaa
leaq 0x81291(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x132, %r9d            # imm = 0x132
jmp 0x59451
movsd 0x7121c(%rip), %xmm0    # 0xca8f0
movsd 0x8121c(%rip), %xmm1    # 0xda8f8
callq 0x58dba
testb %al, %al
je 0x5976e
movsd 0x7aa0f(%rip), %xmm0    # 0xd4100
movsd 0x811ff(%rip), %xmm1    # 0xda8f8
callq 0x58dba
testb %al, %al
je 0x5979b
movsd 0x811f2(%rip), %xmm0    # 0xda900
movsd 0x7a9ea(%rip), %xmm1    # 0xd4100
callq 0x58dba
testb %al, %al
je 0x597c8
movsd 0x7a9d5(%rip), %xmm0    # 0xd4100
movsd 0x811cd(%rip), %xmm1    # 0xda900
callq 0x58dba
testb %al, %al
je 0x59800
leaq 0x72a12(%rip), %rsi     # 0xcc159
leaq 0x81579(%rip), %rdx     # 0xdacc7
leaq 0x81355(%rip), %rcx     # 0xdaaaa
leaq 0x811f0(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x137, %r9d            # imm = 0x137
jmp 0x597f1
leaq 0x729e4(%rip), %rsi     # 0xcc159
leaq 0x814df(%rip), %rdx     # 0xdac5b
leaq 0x81327(%rip), %rcx     # 0xdaaaa
leaq 0x811c2(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x134, %r9d            # imm = 0x134
jmp 0x59451
leaq 0x729b7(%rip), %rsi     # 0xcc159
leaq 0x814d5(%rip), %rdx     # 0xdac7e
leaq 0x812fa(%rip), %rcx     # 0xdaaaa
leaq 0x81195(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x135, %r9d            # imm = 0x135
jmp 0x59451
leaq 0x7298a(%rip), %rsi     # 0xcc159
leaq 0x814cc(%rip), %rdx     # 0xdaca2
leaq 0x812cd(%rip), %rcx     # 0xdaaaa
leaq 0x81168(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x136, %r9d            # imm = 0x136
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %rax
jmp 0x5945a
movsd 0x81108(%rip), %xmm0    # 0xda910
movsd 0x710e0(%rip), %xmm1    # 0xca8f0
callq 0x58dba
testb %al, %al
je 0x59844
leaq 0x72939(%rip), %rsi     # 0xcc159
leaq 0x814c6(%rip), %rdx     # 0xdaced
leaq 0x8127c(%rip), %rcx     # 0xdaaaa
leaq 0x81117(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x138, %r9d            # imm = 0x138
jmp 0x597f1
movsd 0x79df4(%rip), %xmm0    # 0xd3640
callq 0x590f8
testq %rax, %rax
je 0x59884
leaq 0x728fc(%rip), %rsi     # 0xcc159
leaq 0x814bf(%rip), %rdx     # 0xdad23
leaq 0x8123f(%rip), %rcx     # 0xdaaaa
leaq 0x810da(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13a, %r9d            # imm = 0x13A
jmp 0x597f1
movsd 0x8108c(%rip), %xmm0    # 0xda918
callq 0x590f8
cmpq $0x1, %rax
jne 0x598dc
movsd 0x81081(%rip), %xmm0    # 0xda920
callq 0x590f8
cmpq $-0x1, %rax
je 0x59942
leaq 0x728a4(%rip), %rsi     # 0xcc159
leaq 0x814a0(%rip), %rdx     # 0xdad5c
leaq 0x811e7(%rip), %rcx     # 0xdaaaa
leaq 0x81082(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13c, %r9d            # imm = 0x13C
jmp 0x597f1
leaq 0x72876(%rip), %rsi     # 0xcc159
leaq 0x81455(%rip), %rdx     # 0xdad3f
leaq 0x811b9(%rip), %rcx     # 0xdaaaa
leaq 0x81054(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13b, %r9d            # imm = 0x13B
jmp 0x597f1
movq 0xd46a7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x7074b(%rip), %rsi     # 0xca066
leaq 0x70d37(%rip), %rdx     # 0xca659
leaq 0x81181(%rip), %rcx     # 0xdaaaa
leaq 0x8101c(%rip), %r8      # 0xda94c
movl $0x115, %r9d            # imm = 0x115
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
movsd 0x7a7d6(%rip), %xmm0    # 0xd4120
callq 0x590f8
testq %rax, %rax
je 0x59982
leaq 0x727fe(%rip), %rsi     # 0xcc159
leaq 0x81419(%rip), %rdx     # 0xdad7b
leaq 0x81141(%rip), %rcx     # 0xdaaaa
leaq 0x80fdc(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13d, %r9d            # imm = 0x13D
jmp 0x597f1
movsd 0x80f9e(%rip), %xmm0    # 0xda928
callq 0x590f8
cmpq $-0x2, %rax
jne 0x599c5
movsd 0x80f93(%rip), %xmm0    # 0xda930
callq 0x590f8
cmpq $-0x2, %rax
jne 0x599f3
movsd 0x80f88(%rip), %xmm0    # 0xda938
callq 0x590f8
cmpq $-0x3, %rax
jne 0x59a21
xorl %eax, %eax
movb $0x1, %r15b
jmp 0x5945a
leaq 0x7278d(%rip), %rsi     # 0xcc159
leaq 0x813c5(%rip), %rdx     # 0xdad98
leaq 0x810d0(%rip), %rcx     # 0xdaaaa
leaq 0x80f6b(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13e, %r9d            # imm = 0x13E
jmp 0x597f1
leaq 0x7275f(%rip), %rsi     # 0xcc159
leaq 0x813b5(%rip), %rdx     # 0xdadb6
leaq 0x810a2(%rip), %rcx     # 0xdaaaa
leaq 0x80f3d(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x13f, %r9d            # imm = 0x13F
jmp 0x597f1
leaq 0x72731(%rip), %rsi     # 0xcc159
leaq 0x813a5(%rip), %rdx     # 0xdadd4
leaq 0x81074(%rip), %rcx     # 0xdaaaa
leaq 0x80f0f(%rip), %r8      # 0xda94c
xorl %r15d, %r15d
movq (%rsp), %rdi
movl $0x140, %r9d            # imm = 0x140
jmp 0x597f1
nop