user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<digitize_one>:
  endbr64
  push   %r12
  movapd %xmm0,%xmm2
  movapd %xmm1,%xmm3
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  imul   %rdi,%rbx
  sub    $0x20,%rsp
  test   %rsi,%rsi
  je     L383
  mov    %rdi,%r12
  lea    D98(%rip),%rsi
  mov    %rdx,%rdi
  mov    %rdx,%rbp
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  je     L348
  lea    D200(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  je     L366
  lea    D166(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  je     L431
  lea    D103(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  je     L342
  lea    D150(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  je     L91
  lea    D202(%rip),%rsi
  mov    %rbp,%rdi
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <strcmp@plt>
  mov    %eax,%r8d
  xor    %eax,%eax
  test   %r8d,%r8d
  jne    L79
  pxor   %xmm1,%xmm1
  pxor   %xmm4,%xmm4
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  cvtsi2sd %rbx,%xmm1
  ucomisd %xmm1,%xmm4
  ja     L346
  sqrtsd %xmm1,%xmm1
  cvttsd2si %xmm1,%rbx
  mov    %rbx,%rbp
L457:
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L297
L306:
  addsd  D204(%rip),%xmm3
  pxor   %xmm0,%xmm0
  movsd  %xmm2,(%rsp)
  mulsd  D70(%rip),%xmm3
  cvtsi2sd %rbp,%xmm0
  mulsd  %xmm3,%xmm0
  call   <floor@plt>
  movsd  (%rsp),%xmm2
  addsd  D204(%rip),%xmm2
  cvttsd2si %xmm0,%r12
  mulsd  D70(%rip),%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  mulsd  %xmm2,%xmm0
  call   <floor@plt>
  xor    %eax,%eax
  test   %r12,%r12
  lea    -0x1(%rbp),%rdx
  cvttsd2si %xmm0,%rcx
  cmovns %r12,%rax
  lea    -0x1(%rbx),%rsi
  cmp    %rbp,%r12
  cmovge %rdx,%rax
  xor    %edx,%edx
  test   %rcx,%rcx
  cmovns %rcx,%rdx
  cmp    %rcx,%rbx
  cmovle %rsi,%rdx
  imul   %rbx,%rax
  add    %rdx,%rax
  jmp    L79
  nopl   0x0(%rax,%rax,1)
L348:
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  comisd D148(%rip),%xmm0
  jbe    L189
  mov    D148(%rip),%rax
  pxor   %xmm4,%xmm4
  movq   %rax,%xmm0
L441:
  sqrtsd %xmm0,%xmm0
L262:
  ucomisd %xmm0,%xmm4
  ja     L440
  sqrtsd %xmm0,%xmm0
L379:
  ucomisd %xmm0,%xmm4
  ja     L233
  sqrtsd %xmm0,%xmm0
L154:
  pxor   %xmm1,%xmm1
  xor    %ebx,%ebx
  lea    -0x1(%r12),%rdx
  cvtsi2sd %r12,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm3,%xmm0
  cvttsd2si %xmm1,%rax
  movapd %xmm2,%xmm1
  test   %rax,%rax
  cmovns %rax,%rbx
  cmp    %rax,%r12
  cmovle %rdx,%rbx
  call   <atan2@plt>
  pxor   %xmm1,%xmm1
  addsd  D117(%rip),%xmm0
  xor    %eax,%eax
  lea    (%rbx,%rbx,1),%rbp
  divsd  D197(%rip),%xmm0
  lea    0x1(%rbp),%r12
  cvtsi2sd %r12,%xmm1
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rdx,%r12
  cmovg  %rax,%rbp
  imul   %rbx,%rbx
  add    $0x20,%rsp
  lea    (%rbx,%rbp,1),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L383:
  mulsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  mulsd  %xmm1,%xmm3
  addsd  %xmm3,%xmm2
  ucomisd %xmm2,%xmm0
  ja     L311
  sqrtsd %xmm2,%xmm2
L320:
  addsd  D148(%rip),%xmm2
  pxor   %xmm0,%xmm0
  mulsd  D163(%rip),%xmm2
  cvtsi2sd %rbx,%xmm0
  mulsd  %xmm2,%xmm0
  call   <floor@plt>
  xor    %eax,%eax
  lea    -0x1(%rbx),%rcx
  cvttsd2si %xmm0,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rdx,%rbx
  cmovle %rcx,%rax
L79:
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L189:
  pxor   %xmm4,%xmm4
  ucomisd %xmm0,%xmm4
  jbe    L441
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L262
  nopw   0x0(%rax,%rax,1)
L431:
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  cvtsi2sd %rbx,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L337
  sqrtsd %xmm0,%xmm0
L77:
  cvttsd2si %xmm0,%rbp
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L471
  sqrtsd %xmm0,%xmm0
L258:
  pxor   %xmm5,%xmm5
  movsd  %xmm4,0x18(%rsp)
  xor    %ebx,%ebx
  cvtsi2sd %rbp,%xmm5
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  mulsd  %xmm5,%xmm0
  movsd  %xmm5,(%rsp)
  call   <floor@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm3
  lea    -0x1(%rbp),%rdx
  cvttsd2si %xmm0,%rax
  movapd %xmm2,%xmm1
  movapd %xmm3,%xmm0
  test   %rax,%rax
  cmovns %rax,%rbx
  cmp    %rax,%rbp
  cmovle %rdx,%rbx
  call   <atan2@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  (%rsp),%xmm5
  movsd  D197(%rip),%xmm1
  comisd %xmm0,%xmm4
  ja     L356
L310:
  divsd  %xmm1,%xmm0
  mulsd  %xmm5,%xmm0
  call   <floor@plt>
  xor    %eax,%eax
  lea    -0x1(%rbp),%rcx
  cvttsd2si %xmm0,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rdx,%rbp
  cmovle %rcx,%rax
  imul   %rbp,%rbx
  add    %rbx,%rax
  jmp    L79
  nopl   0x0(%rax)
L366:
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  cvtsi2sd %rbx,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L412
  sqrtsd %xmm0,%xmm0
L462:
  cvttsd2si %xmm0,%rbp
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L450
  sqrtsd %xmm0,%xmm0
L161:
  ucomisd %xmm0,%xmm4
  ja     L343
  sqrtsd %xmm0,%xmm0
L190:
  pxor   %xmm1,%xmm1
  xor    %ebx,%ebx
  lea    -0x1(%rbp),%rdx
  movsd  %xmm4,(%rsp)
  cvtsi2sd %rbp,%xmm1
  mulsd  %xmm0,%xmm1
  movapd %xmm3,%xmm0
  cvttsd2si %xmm1,%rax
  movapd %xmm2,%xmm1
  test   %rax,%rax
  cmovns %rax,%rbx
  cmp    %rax,%rbp
  cmovle %rdx,%rbx
  call   <atan2@plt>
  movsd  (%rsp),%xmm4
  movsd  D197(%rip),%xmm1
  lea    (%rbx,%rbx,1),%rbp
  comisd %xmm0,%xmm4
  lea    0x1(%rbp),%r12
  jbe    L290
  addsd  %xmm1,%xmm0
L290:
  divsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  xor    %eax,%eax
  cvtsi2sd %r12,%xmm2
  mulsd  %xmm0,%xmm2
  cvttsd2si %xmm2,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rdx,%r12
  cmovg  %rax,%rbp
  imul   %rbx,%rbx
  add    $0x20,%rsp
  lea    (%rbx,%rbp,1),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L356:
  addsd  %xmm1,%xmm0
  jmp    L310
  nopl   0x0(%rax)
L342:
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  cvtsi2sd %rbx,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L97
  sqrtsd %xmm0,%xmm0
L408:
  cvttsd2si %xmm0,%rbp
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L42
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,(%rsp)
L196:
  movapd %xmm2,%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <atan2@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  D197(%rip),%xmm1
  comisd %xmm0,%xmm4
  jbe    L2
  addsd  %xmm1,%xmm0
L2:
  divsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  xor    %ebx,%ebx
  cvtsi2sd %rbp,%xmm2
  movsd  %xmm2,0x8(%rsp)
  mulsd  %xmm2,%xmm0
  call   <floor@plt>
  lea    -0x1(%rbp),%rdx
  movsd  0x8(%rsp),%xmm2
  cvttsd2si %xmm0,%rax
  movsd  (%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  test   %rax,%rax
  cmovns %rax,%rbx
  cmp    %rax,%rbp
  cmovle %rdx,%rbx
  test   $0x1,%bl
  jne    L413
  addsd  D163(%rip),%xmm0
L413:
  call   <floor@plt>
  xor    %eax,%eax
  lea    -0x1(%rbp),%rcx
  cvttsd2si %xmm0,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rbp,%rdx
  cmovge %rcx,%rax
  imul   %rbp,%rax
  add    %rbx,%rax
  jmp    L79
  nopl   (%rax)
L91:
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  cvtsi2sd %rbx,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L298
  sqrtsd %xmm0,%xmm0
L384:
  cvttsd2si %xmm0,%rbx
  movapd %xmm3,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L367
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,(%rsp)
L423:
  movapd %xmm2,%xmm1
  movapd %xmm3,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <atan2@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  D197(%rip),%xmm1
  comisd %xmm0,%xmm4
  jbe    L62
  addsd  %xmm1,%xmm0
L62:
  divsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  lea    -0x1(%rbx),%r12
  xor    %ebp,%ebp
  cvtsi2sd %rbx,%xmm2
  movsd  %xmm2,0x8(%rsp)
  mulsd  %xmm2,%xmm0
  call   <floor@plt>
  movsd  0x8(%rsp),%xmm2
  cvttsd2si %xmm0,%rax
  pxor   %xmm0,%xmm0
  test   %rax,%rax
  cmovns %rax,%rbp
  cmp    %rax,%rbx
  cmovle %r12,%rbp
  cvtsi2sd %rbp,%xmm0
  divsd  %xmm2,%xmm0
  mulsd  (%rsp),%xmm2
  addsd  %xmm2,%xmm0
  call   <floor@plt>
  xor    %eax,%eax
  cvttsd2si %xmm0,%rdx
  test   %rdx,%rdx
  cmovns %rdx,%rax
  cmp    %rdx,%rbx
  cmovle %r12,%rax
  imul   %rbx,%rax
  add    %rbp,%rax
  jmp    L79
L233:
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L154
L440:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L379
L311:
  movapd %xmm2,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm2
  jmp    L320
L412:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L462
L343:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L190
L450:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L161
L471:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L258
L337:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L77
L297:
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L306
L346:
  movapd %xmm1,%xmm0
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm1
  cvttsd2si %xmm0,%rbp
  movapd %xmm1,%xmm0
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  cvttsd2si %xmm0,%rbx
  movsd  0x8(%rsp),%xmm2
  jmp    L457
L367:
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm2
  movsd  %xmm0,(%rsp)
  jmp    L423
L298:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L384
L42:
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm2
  movsd  %xmm0,(%rsp)
  jmp    L196
L97:
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  jmp    L408
```

tool_calls: name: disassemble_data
arguments: tag: D98
data_type: string
name: disassemble_data
arguments: tag: D200
data_type: string
name: disassemble_data
arguments: tag: D166
data_type: string
name: disassemble_data
arguments: tag: D103
data_type: string
name: disassemble_data
arguments: tag: D150
data_type: string
name: disassemble_data
arguments: tag: D202
data_type: string
name: disassemble_data
arguments: tag: D204
data_type: f64
name: disassemble_data
arguments: tag: D70
data_type: f64
name: disassemble_data
arguments: tag: D148
data_type: f64[2]
name: disassemble_data
arguments: tag: D117
data_type: f64
name: disassemble_data
arguments: tag: D197
data_type: byte[8]
name: disassemble_data
arguments: tag: D163
data_type: f64

tool: D98: old

tool: D200: maze

tool: D166: dart

tool: D103: stagger

tool: D150: spiral

tool: D202: chess

tool: D204: 0.125

tool: D70: 4

tool: {"D148": [1.0,0.5]}

tool: D117: 3.141592653589793

tool: {"D197": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: D163: 0.5

assistant: ```c
long digitize_one(double c, double s, long nbin1, long idx, char *partition) {
  long is, ic, ir, ncol, nrow, nannuli, nsec;
  long one, nbin, nbin2, ibin1, ibin2;
  double angle, modulus, scaled, fs, fc, offset;
  nbin = nbin1 * nbin1;
  one = 0;
  if (idx == 0) {
    modulus = (c * c + s * s);
    modulus = sqrt(modulus);
    scaled = ((modulus + 1.0) / 2.0) * nbin;
    one = floor(scaled);
    if (one >= nbin)
      one = nbin - 1;
    else if (one < 0)
      one = 0;
  } else {
    if (strcmp(partition, "old") == 0) {
      modulus = (c * c + s * s);
      if (modulus < 0.0)
        modulus = 0.0;
      else if (modulus > 1.0)
        modulus = 1.0;
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      ibin1 = modulus * nbin1;
      if (ibin1 >= nbin1)
        ibin1 = nbin1 - 1;
      else if (ibin1 < 0)
        ibin1 = 0;
      nbin2 = 2 * ibin1 + 1;
      angle = 3.14159265358979323846 + atan2(s, c);
      ibin2 = nbin2 * (angle / (2 * 3.14159265358979323846));
      if (ibin2 >= nbin2)
        ibin2 = nbin2 - 1;
      else if (ibin2 < 0)
        ibin2 = 0;
      one = ibin1 * ibin1 + ibin2;
    } else if (strcmp(partition, "maze") == 0) {
      nannuli = sqrt((double)nbin);
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      modulus = sqrt(modulus);
      ir = (modulus * nannuli);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      nsec = 2 * ir + 1;
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = nsec * (angle / (2.0 * 3.14159265358979323846));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      one = ir * ir + is;
    } else if (strcmp(partition, "dart") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      ir = (long)floor((modulus * nannuli));
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "stagger") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      if (is % 2)
        ir = (long)floor(modulus * nannuli);
      else
        ir = (long)floor(modulus * nannuli + 0.5);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "spiral") == 0) {
      nannuli = (long)sqrt((double)nbin);
      nsec = nannuli;
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      angle = atan2(s, c);
      if (angle < 0.0)
        angle += 2.0 * 3.14159265358979323846;
      is = (long)floor((double)nsec * (angle / (2.0 * 3.14159265358979323846)));
      if (is >= nsec)
        is = nsec - 1;
      else if (is < 0)
        is = 0;
      offset = ((double)is) / ((double)nsec);
      ir = (long)floor(modulus * nannuli + offset);
      if (ir >= nannuli)
        ir = nannuli - 1;
      else if (ir < 0)
        ir = 0;
      one = ir * nsec + is;
    } else if (strcmp(partition, "chess") == 0) {
      nrow = (long)floor(sqrt((double)nbin));
      ncol = (long)floor(sqrt((double)nbin));
      modulus = (c * c + s * s);
      modulus = sqrt(modulus);
      fs = 4.0 * (s + 0.125) * nrow;
      is = (long)floor(fs);
      fc = 4.0 * (c + 0.125) * ncol;
      ic = (long)floor(fc);
      if (is >= nrow)
        is = nrow - 1;
      else if (is < 0)
        is = 0;
      if (ic >= ncol)
        ic = ncol - 1;
      else if (ic < 0)
        ic = 0;
      one = is * ncol + ic;
    } else
      return (0);
  }
  return (one);
}
```