user: Translate the below assembly code into C programming language:

```asm
<getDimension>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <skipSpaces@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  mov    %eax,%ebx
  cmp    $0x74,%al
  je     L365
L99:
  cmp    $0x73,%bl
  je     L337
L315:
  lea    -0x2b(%rbx),%eax
  mov    $0x1,%r13d
  xor    %ebp,%ebp
  test   $0xfd,%al
  je     L96
L113:
  lea    0x10(%rsp),%r12
  cmp    $0x5c,%bl
  jne    L348
  jmp    L32
  xchg   %ax,%ax
L453:
  mov    %bl,(%r12,%rbp,1)
L188:
  xor    %eax,%eax
  add    $0x1,%rbp
  call   <getTexChar@plt>
  mov    %eax,%ebx
  cmp    $0x13,%ebp
  je     L155
L348:
  movsbl %bl,%r14d
  movslq %ebp,%r13
  mov    %r14d,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L86
  mov    %ebx,%eax
  and    $0xfffffffd,%eax
  cmp    $0x2c,%al
  jne    L281
L86:
  cmp    $0x2c,%bl
  jne    L453
  movb   $0x2e,(%r12,%rbp,1)
  jmp    L188
  nopl   0x0(%rax,%rax,1)
L32:
  movb   $0x31,0x10(%rsp,%rbp,1)
  mov    $0x5c,%r14d
  lea    0x10(%rsp),%r12
L281:
  mov    %r14d,%edi
  call   <ungetTexChar@plt>
  mov    %r12,%rdx
  mov    $0x4,%edi
  xor    %eax,%eax
  lea    D280(%rip),%rsi
  movb   $0x0,0x10(%rsp,%r13,1)
  call   <diagnostics@plt>
  lea    0xc(%rsp),%rdx
  lea    D1(%rip),%rsi
  mov    %r12,%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L230
L253:
  lea    D224(%rip),%rsi
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <diagnostics@plt>
  mov    %r12,%rdx
  mov    $0x1,%edi
  xor    %eax,%eax
  lea    D359(%rip),%rsi
  call   <diagnostics@plt>
  xor    %eax,%eax
L219:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L203
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L96:
  xor    %eax,%eax
  mov    %bl,0x10(%rsp)
  mov    $0x2,%r13d
  mov    $0x1,%ebp
  call   <skipSpaces@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  mov    %eax,%ebx
  jmp    L113
  nopl   0x0(%rax)
L230:
  xor    %eax,%eax
  call   <skipSpaces@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  movsbl %al,%edi
  call   <tolower@plt>
  mov    %al,0x10(%rsp)
  test   %al,%al
  je     L195
  cmp    $0x74,%al
  je     L426
L446:
  cmp    $0x5c,%al
  je     L279
  xor    %eax,%eax
  call   <getTexChar@plt>
  movsbl %al,%edi
  call   <tolower@plt>
  lea    D192(%rip),%rsi
  mov    $0x4,%edi
  mov    %r12,%rdx
  mov    %al,0x11(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x12(%rsp)
  call   <diagnostics@plt>
  lea    D81(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L195
  lea    D399(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L201
  movss  D358(%rip),%xmm0
  mulss  0xc(%rsp),%xmm0
  mulss  D135(%rip),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L219
  nop
L155:
  movsbl %al,%edi
  call   <ungetTexChar@plt>
  mov    %r12,%rdx
  mov    $0x4,%edi
  xor    %eax,%eax
  lea    D280(%rip),%rsi
  movb   $0x0,0x23(%rsp)
  call   <diagnostics@plt>
  jmp    L253
  nopl   0x0(%rax,%rax,1)
L337:
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  mov    %eax,%ebx
  jmp    L315
  nopl   0x0(%rax)
L365:
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  mov    %eax,%ebx
  jmp    L99
  nopl   (%rax)
L195:
  movss  D135(%rip),%xmm0
  mulss  0xc(%rsp),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L219
L201:
  lea    D78(%rip),%rbp
  mov    %r12,%rdi
  mov    %rbp,%rsi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L134
  lea    D175(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L378
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D199(%rip),%xmm0
  divsd  D201(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L279:
  mov    $0x5c,%edi
  call   <ungetTexChar@plt>
  xor    %eax,%eax
  call   <getSimpleCommand@plt>
  lea    D192(%rip),%rsi
  mov    $0x4,%edi
  lea    0x1(%rax),%r12
  mov    %rax,%rbp
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <diagnostics@plt>
  mov    %r12,%rdi
  call   <getLength@plt>
  mulss  0xc(%rsp),%xmm0
  mov    %rbp,%rdi
  movss  %xmm0,0xc(%rsp)
  call   <free@plt>
  cvttss2si 0xc(%rsp),%eax
  jmp    L219
L426:
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  xor    %eax,%eax
  call   <skipSpaces@plt>
  xor    %eax,%eax
  call   <getTexChar@plt>
  movsbl %al,%edi
  call   <tolower@plt>
  mov    %al,0x10(%rsp)
  jmp    L446
L134:
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D199(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L378:
  lea    D379(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L105
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D199(%rip),%xmm0
  divsd  D160(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L105:
  lea    D153(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L370
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D199(%rip),%xmm0
  divsd  D240(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L370:
  lea    D97(%rip),%r13
  mov    %r12,%rdi
  mov    %r13,%rsi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L320
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L320
  lea    D389(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L101
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D295(%rip),%xmm0
  divsd  D373(%rip),%xmm0
  mulsd  D156(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L320:
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D295(%rip),%xmm0
  divsd  D373(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L203:
  call   <__stack_chk_fail@plt>
L101:
  lea    D339(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  je     L34
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rsp),%xmm0
  mulsd  D293(%rip),%xmm0
  mulsd  D363(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L34:
  lea    D21(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L376
  lea    D115(%rip),%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L93
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <strstr@plt>
  test   %rax,%rax
  jne    L134
  movsbl 0x11(%rsp),%edi
  call   <ungetTexChar@plt>
  movsbl 0x10(%rsp),%edi
  call   <ungetTexChar@plt>
  cvttss2si 0xc(%rsp),%eax
  jmp    L219
L376:
  xor    %eax,%eax
  call   <CurrentFontSize@plt>
  mulss  0xc(%rsp),%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  D56(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  jmp    L219
L93:
  xor    %eax,%eax
  call   <CurrentFontSize@plt>
  mulss  0xc(%rsp),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L219
```

tool_calls: name: parse_data
arguments: label: D280
data_type: string
name: parse_data
arguments: label: D1
data_type: string
name: parse_data
arguments: label: D224
data_type: string
name: parse_data
arguments: label: D359
data_type: string
name: parse_data
arguments: label: D192
data_type: string
name: parse_data
arguments: label: D81
data_type: string
name: parse_data
arguments: label: D399
data_type: string
name: parse_data
arguments: label: D358
data_type: f32
name: parse_data
arguments: label: D135
data_type: byte[4]
name: parse_data
arguments: label: D78
data_type: string
name: parse_data
arguments: label: D175
data_type: string
name: parse_data
arguments: label: D199
data_type: f64
name: parse_data
arguments: label: D201
data_type: byte[8]
name: parse_data
arguments: label: D363
data_type: byte[8]
name: parse_data
arguments: label: D379
data_type: string
name: parse_data
arguments: label: D160
data_type: f64
name: parse_data
arguments: label: D153
data_type: string
name: parse_data
arguments: label: D240
data_type: f64
name: parse_data
arguments: label: D97
data_type: string
name: parse_data
arguments: label: D389
data_type: string
name: parse_data
arguments: label: D295
data_type: f64
name: parse_data
arguments: label: D373
data_type: f64
name: parse_data
arguments: label: D156
data_type: byte[8]
name: parse_data
arguments: label: D339
data_type: string
name: parse_data
arguments: label: D293
data_type: byte[8]
name: parse_data
arguments: label: D21
data_type: string
name: parse_data
arguments: label: D115
data_type: string
name: parse_data
arguments: label: D56
data_type: f64

tool: D280: getDimension() raw number is <%s>

tool: D1: %f

tool: D224: Screwy number in TeX dimension

tool: D359: getDimension() number is <%s>

tool: D192: getDimension() dimension is <%s>

tool: D81: pt

tool: D399: pc

tool: D358: 12

tool: {"D135": [0x00,0x00,0xa0,0x41]}

tool: D78: in

tool: D175: bp

tool: D199: 72.27

tool: {"D201": [0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x40]}

tool: {"D363": [0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x40]}

tool: D379: cm

tool: D160: 2.54

tool: D153: mm

tool: D240: 25.4

tool: D97: dd

tool: D389: cc

tool: D295: 1238

tool: D373: 1157

tool: {"D156": [0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x40]}

tool: D339: sp

tool: {"D293": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3e]}

tool: D21: ex

tool: D115: em

tool: D56: 0.5

assistant: ```c
int getDimension(void) {
  char cThis, buffer[20];
  int i = 0;
  float num;
  skipSpaces();
  cThis = getTexChar();
  if (cThis == 't') {
    getTexChar();
    cThis = getTexChar();
  }
  if (cThis == 's') {
    getTexChar();
    getTexChar();
    getTexChar();
    getTexChar();
    getTexChar();
    cThis = getTexChar();
  }
  if (cThis == '-' || cThis == '+') {
    buffer[i++] = cThis;
    skipSpaces();
    cThis = getTexChar();
  }
  if (cThis == '\\')
    buffer[i++] = '1';
  else {
    while (i < 19 && (isdigit((int)cThis) || cThis == '.' || cThis == ',')) {
      if (cThis == ',')
        cThis = '.';
      buffer[i++] = cThis;
      cThis = getTexChar();
    }
  }
  ungetTexChar(cThis);
  buffer[i] = '\0';
  diagnostics(4, "getDimension() raw number is <%s>", buffer);
  if (i == 19 || sscanf(buffer, "%f", &num) != 1) {
    diagnostics(1, "Screwy number in TeX dimension");
    diagnostics(1, "getDimension() number is <%s>", buffer);
    return 0;
  }
  skipSpaces();
  buffer[0] = tolower((int)getTexChar());
  if (buffer[0] == '\0')
    return (int)(num * 20);
  if (buffer[0] == 't') {
    getTexChar();
    getTexChar();
    getTexChar();
    skipSpaces();
    buffer[0] = tolower((int)getTexChar());
  }
  if (buffer[0] != '\\') {
    buffer[1] = tolower((int)getTexChar());
    buffer[2] = '\0';
    diagnostics(4, "getDimension() dimension is <%s>", buffer);
    if (strstr(buffer, "pt"))
      return (int)(num * 20);
    else if (strstr(buffer, "pc"))
      return (int)(num * 12 * 20);
    else if (strstr(buffer, "in"))
      return (int)(num * 72.27 * 20);
    else if (strstr(buffer, "bp"))
      return (int)(num * 72.27 / 72 * 20);
    else if (strstr(buffer, "cm"))
      return (int)(num * 72.27 / 2.54 * 20);
    else if (strstr(buffer, "mm"))
      return (int)(num * 72.27 / 25.4 * 20);
    else if (strstr(buffer, "dd"))
      return (int)(num * 1238.0 / 1157.0 * 20);
    else if (strstr(buffer, "dd"))
      return (int)(num * 1238.0 / 1157 * 20);
    else if (strstr(buffer, "cc"))
      return (int)(num * 1238.0 / 1157.0 * 12.0 * 20);
    else if (strstr(buffer, "sp"))
      return (int)(num / 65536.0 * 20);
    else if (strstr(buffer, "ex"))
      return (int)(num * CurrentFontSize() * 0.5);
    else if (strstr(buffer, "em"))
      return (int)(num * CurrentFontSize());
    else if (strstr(buffer, "in"))
      return (int)(num * 72.27 * 20);
    else {
      ungetTexChar(buffer[1]);
      ungetTexChar(buffer[0]);
      return (int)num;
    }
  } else {
    char *s, *t;
    ungetTexChar(buffer[0]);
    s = getSimpleCommand();
    t = s + 1;
    diagnostics(4, "getDimension() dimension is <%s>", t);
    num *= getLength(t);
    free(s);
    return (int)num;
  }
}
```