// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/disc_distri.c
// Function: gt_disc_distri_unit_test
int gt_disc_distri_unit_test(GtError *err)
{
  GtDiscDistri *d;
  int had_err = 0;
  struct ForeachTesterData tdata;

  gt_error_check(err);

  d = gt_disc_distri_new();

  gt_ensure(gt_disc_distri_get(d, 0UL) == 0);
  gt_ensure(gt_disc_distri_get(d, 100UL) == 0);
  if (!had_err) {
    gt_disc_distri_add(d, 0);
    gt_disc_distri_add_multi(d, 100UL, 256ULL);
  }
  gt_ensure(gt_disc_distri_get(d, 0UL) == 1ULL);
  gt_ensure(gt_disc_distri_get(d, 100UL) == 256ULL);

  /* test foreach and foreach_in_reverse_order: */
  gt_disc_distri_add(d, 2UL);
  if (!had_err) {
    tdata.counter = -1;
    tdata.expkeys[0] = 0;
    tdata.expvalues[0] = 1;
    tdata.expkeys[1] = 2;
    tdata.expvalues[1] = 1;
    tdata.expkeys[2] = 100;
    tdata.expvalues[2] = 256;
    tdata.had_err = &had_err;
    tdata.err = err;
    gt_disc_distri_foreach(d, foreachtester, &tdata);
  }
  if (!had_err) {
    tdata.counter = -1;
    tdata.expkeys[0] = 100;
    tdata.expvalues[0] = 256;
    tdata.expkeys[1] = 2;
    tdata.expvalues[1] = 1;
    tdata.expkeys[2] = 0;
    tdata.expvalues[2] = 1;
    tdata.had_err = &had_err;
    tdata.err = err;
    gt_disc_distri_foreach_in_reverse_order(d, foreachtester, &tdata);
  }

  gt_disc_distri_delete(d);

  return had_err;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl $0x0, 0x34(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x112f91
movq 0x40(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x112f59
jmp 0x112f91
movq 0xa1078(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4b0fc(%rip), %rsi     # 0x15e066
leaq 0x4b6d7(%rip), %rdx     # 0x15e648
leaq 0x722e7(%rip), %rcx     # 0x18525f
leaq 0x72289(%rip), %r8      # 0x185208
movl $0xd5, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x112f93
callq 0x112810
movq %rax, 0x38(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x112ff0
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x112a20
cmpq $0x0, %rax
je 0x112fee
movq 0x40(%rsp), %rdi
leaq 0x4d1b3(%rip), %rsi     # 0x160177
leaq 0x722ad(%rip), %rdx     # 0x185278
leaq 0x7228d(%rip), %rcx     # 0x18525f
leaq 0x7222f(%rip), %r8      # 0x185208
movl $0xd9, %r9d
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x112ff0
jmp 0x112ff2
jmp 0x112ff4
cmpl $0x0, 0x34(%rsp)
jne 0x113048
movq 0x38(%rsp), %rdi
movl $0x64, %esi
callq 0x112a20
cmpq $0x0, %rax
je 0x113046
movq 0x40(%rsp), %rdi
leaq 0x4d15b(%rip), %rsi     # 0x160177
leaq 0x72275(%rip), %rdx     # 0x185298
leaq 0x72235(%rip), %rcx     # 0x18525f
leaq 0x721d7(%rip), %r8      # 0x185208
movl $0xda, %r9d
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x113048
jmp 0x11304a
cmpl $0x0, 0x34(%rsp)
jne 0x113073
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x112830
movq 0x38(%rsp), %rdi
movl $0x64, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x112860
jmp 0x113075
cmpl $0x0, 0x34(%rsp)
jne 0x1130c8
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x112a20
cmpq $0x1, %rax
je 0x1130c6
movq 0x40(%rsp), %rdi
leaq 0x4d0db(%rip), %rsi     # 0x160177
leaq 0x72217(%rip), %rdx     # 0x1852ba
leaq 0x721b5(%rip), %rcx     # 0x18525f
leaq 0x72157(%rip), %r8      # 0x185208
movl $0xdf, %r9d
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x1130c8
jmp 0x1130ca
jmp 0x1130cc
cmpl $0x0, 0x34(%rsp)
jne 0x113122
movq 0x38(%rsp), %rdi
movl $0x64, %esi
callq 0x112a20
cmpq $0x100, %rax            # imm = 0x100
je 0x113120
movq 0x40(%rsp), %rdi
leaq 0x4d081(%rip), %rsi     # 0x160177
leaq 0x721e0(%rip), %rdx     # 0x1852dd
leaq 0x7215b(%rip), %rcx     # 0x18525f
leaq 0x720fd(%rip), %r8      # 0x185208
movl $0xe0, %r9d
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x113122
jmp 0x113124
movq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x112830
cmpl $0x0, 0x34(%rsp)
jne 0x113199
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x0, 0x4(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x2, 0x8(%rsp)
movl $0x1, 0x14(%rsp)
movl $0x64, 0xc(%rsp)
movl $0x100, 0x18(%rsp)      # imm = 0x100
leaq 0x34(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x8f(%rip), %rsi        # 0x113220
movq %rsp, %rdx
callq 0x112d70
cmpl $0x0, 0x34(%rsp)
jne 0x1131ff
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
movl $0x64, 0x4(%rsp)
movl $0x100, 0x10(%rsp)      # imm = 0x100
movl $0x2, 0x8(%rsp)
movl $0x1, 0x14(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x1, 0x18(%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
leaq 0x29(%rip), %rsi        # 0x113220
movq %rsp, %rdx
callq 0x112ec0
movq 0x38(%rsp), %rdi
callq 0x113380
movl 0x34(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)