// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/range.c
// Function: gt_ranges_copy_to_opposite_strand
void gt_ranges_copy_to_opposite_strand(GtArray *outranges,
                                       const GtArray *inranges,
                                       GtUword gen_total_length,
                                       GtUword gen_offset)
{
  GtRange range;
  GtUword i;

  /* outranges are empty */
  gt_assert(!gt_array_size(outranges));
  /* inranges are not empty */
  gt_assert(gt_array_size(inranges));

  for (i = gt_array_size(inranges); i > 0; i--) {
    /* genomic offset is defined */
    gt_assert(gen_offset != GT_UNDEF_UWORD);
    range.start  = gen_total_length - 1
                  - (((GtRange*) gt_array_get(inranges, i-1))->end -
                     gen_offset)
                  + gen_offset;
    range.end = gen_total_length - 1
                  - (((GtRange*) gt_array_get(inranges, i-1))->start -
                     gen_offset)
                  + gen_offset;
    gt_array_add(outranges, range);
  }

  /* outranges has the same number of elements as inranges */
  gt_assert(gt_array_size(inranges) == gt_array_size(outranges));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4b988
testq %rax, %rax
jne 0x5e292
movq %r14, %rdi
callq 0x4b988
testq %rax, %rax
je 0x5e2c0
movq %r14, %rdi
callq 0x4b988
movq %rax, %r12
leaq -0x1(%r13,%r15,2), %r13
decq %r12
pushq $0x10
popq %rbp
cmpq $-0x1, %r12
je 0x5e22f
cmpq $-0x1, %r15
je 0x5e25a
movq %r14, %rdi
movq %r12, %rsi
callq 0x4b48e
movq %r13, %rcx
subq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x4b48e
movq %r13, %rcx
subq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x4b801
decq %r12
jmp 0x5e1e1
movq %r14, %rdi
callq 0x4b988
movq %rax, %r14
movq %rbx, %rdi
callq 0x4b988
cmpq %rax, %r14
jne 0x5e2ee
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcfd57(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6bdfb(%rip), %rsi     # 0xca066
leaq 0x7dac9(%rip), %rdx     # 0xdbd3b
leaq 0x7da88(%rip), %rcx     # 0xdbd01
leaq 0x7d506(%rip), %r8      # 0xdb786
movl $0x1f8, %r9d            # imm = 0x1F8
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
movq 0xcfd1f(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6bdc3(%rip), %rsi     # 0xca066
leaq 0x7da3d(%rip), %rdx     # 0xdbce7
leaq 0x7da50(%rip), %rcx     # 0xdbd01
leaq 0x7d4ce(%rip), %r8      # 0xdb786
movl $0x1f2, %r9d            # imm = 0x1F2
jmp 0x5e286
movq 0xcfcf1(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6bd95(%rip), %rsi     # 0xca066
leaq 0x7da4b(%rip), %rdx     # 0xdbd23
leaq 0x7da22(%rip), %rcx     # 0xdbd01
leaq 0x7d4a0(%rip), %r8      # 0xdb786
movl $0x1f4, %r9d            # imm = 0x1F4
jmp 0x5e286
movq 0xcfcc3(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x6bd67(%rip), %rsi     # 0xca066
leaq 0x7da52(%rip), %rdx     # 0xdbd58
leaq 0x7d9f4(%rip), %rcx     # 0xdbd01
leaq 0x7d472(%rip), %r8      # 0xdb786
movl $0x205, %r9d            # imm = 0x205
jmp 0x5e286