user: Please show me the C implementation that matches the assembly code listed below:

```asm
<decode>:
  endbr64
  push   %r15
  mov    $0x8,%edx
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  xor    %esi,%esi
  push   %rbx
  sub    $0x48,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <getBinaryData@plt>
  lea    D186(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <strcpy@plt>
  cmp    $0x5,%r12d
  je     L21
  cmp    $0x69,%r12d
  jg     L657
  cmp    $0x26,%r12d
  jle    L364
  lea    -0x27(%r12),%eax
  cmp    $0x42,%eax
  ja     L170
  lea    D355(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nop
L657:
  cmp    $0xa5,%r12d
  je     L385
  cmp    $0xff,%r12d
  jne    L170
  lea    D189(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x20,%edx
  mov    $0x8,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  cmp    $0xffffffff,%eax
  je     L259
  mov    $0x14,%edx
  mov    $0x8,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  cmp    $0x947ff,%eax
  je     L278
  cmp    $0x96fff,%eax
  je     L324
  cmp    $0x807ff,%eax
  je     L796
  cmp    $0x82fff,%eax
  je     L514
  cmp    $0x857ff,%eax
  je     L362
  cmp    $0x87fff,%eax
  je     L604
  cmp    $0x88fff,%eax
  je     L198
  cmp    $0x8b7ff,%eax
  je     L95
  cmp    $0x8dfff,%eax
  je     L490
  cmp    $0x8e7ff,%eax
  je     L351
  cmp    $0x917ff,%eax
  je     L373
  cmp    $0x93fff,%eax
  je     L7
  lea    D11(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   0x0(%rax,%rax,1)
L364:
  cmp    $0xa,%r12d
  je     L543
  cmp    $0x11,%r12d
  jne    L170
  lea    D102(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  nopl   0x0(%rax,%rax,1)
L709:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L559
  add    $0x48,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
  lea    D60(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L709
  nopl   0x0(%rax)
L21:
  lea    D99(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x1,%edx
  mov    $0xc,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L428
L769:
  mov    $0x1,%edx
  mov    $0xd,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L572
L496:
  mov    $0x1,%edx
  mov    $0xe,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L669
L620:
  mov    $0x1,%edx
  mov    $0xf,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L230
L645:
  mov    $0x1,%edx
  mov    $0x10,%esi
  mov    %r13,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  je     L709
  lea    D409(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   (%rax)
L170:
  lea    D200(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L709
  nopl   0x0(%rax)
L385:
  mov    %r13,%rdi
  mov    $0x4,%edx
  mov    $0x9,%esi
  call   <getBinaryData@plt>
  lea    0x2c(%rsp),%r10
  lea    0x32(%rsp),%rbx
  mov    %r10,%rdi
  mov    %eax,%edx
  mov    %r10,0x18(%rsp)
  lea    0x34(%rsp),%r15
  lea    D85(%rip),%r14
  mov    %r14,%rsi
  call   <sprintf@plt>
  mov    %r13,%rdi
  mov    $0x4,%edx
  mov    $0xd,%esi
  call   <getBinaryData@plt>
  lea    0x2e(%rsp),%r9
  mov    %r14,%rsi
  mov    %r9,%rdi
  mov    %eax,%edx
  mov    %r9,0x10(%rsp)
  call   <sprintf@plt>
  mov    %r13,%rdi
  mov    $0x4,%edx
  mov    $0x13,%esi
  call   <getBinaryData@plt>
  lea    0x30(%rsp),%r8
  mov    %r14,%rsi
  mov    %r8,%rdi
  mov    %eax,%edx
  mov    %r8,0x8(%rsp)
  call   <sprintf@plt>
  mov    %r13,%rdi
  mov    $0x5,%edx
  mov    $0x17,%esi
  call   <getBinaryData@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    %eax,%edx
  call   <sprintf@plt>
  mov    %r13,%rdi
  mov    $0x5,%edx
  mov    $0x1c,%esi
  call   <getBinaryData@plt>
  mov    %r14,%rsi
  mov    %r15,%rdi
  mov    %eax,%edx
  call   <sprintf@plt>
  mov    %r13,%rdi
  mov    $0x6,%edx
  mov    $0x21,%esi
  call   <getBinaryData@plt>
  lea    0x36(%rsp),%r13
  mov    %r14,%rsi
  lea    D315(%rip),%r14
  mov    %eax,%edx
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rdi
  lea    D504(%rip),%rsi
  call   <strcpy@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  lea    D395(%rip),%rsi
  call   <strcat@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  lea    D69(%rip),%rsi
  call   <strcat@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   (%rax)
L543:
  lea    D345(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L709
  nopl   0x0(%rax)
L230:
  lea    D477(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L645
  nopl   0x0(%rax)
L669:
  lea    D336(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L620
  nopl   0x0(%rax)
L572:
  lea    D194(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L496
  nopl   0x0(%rax)
L428:
  lea    D363(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L769
  nopl   0x0(%rax)
  lea    D15(%rip),%rsi
L164:
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  mov    $0x8,%edx
  mov    $0x29,%esi
  call   <getBinaryData@plt>
  mov    %eax,%r13d
  test   $0x1,%al
  jne    L592
L699:
  test   $0x2,%r13b
  jne    L389
L416:
  test   $0x4,%r13b
  jne    L386
L817:
  test   $0x8,%r13b
  jne    L300
L583:
  test   $0x10,%r13b
  jne    L202
L665:
  test   $0x20,%r13b
  jne    L746
L829:
  test   $0x40,%r13b
  jne    L622
L818:
  and    $0x80,%r13d
  je     L709
  lea    D256(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   0x0(%rax)
  lea    D28(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %r13,%rdi
  mov    $0x8,%edx
  mov    $0x29,%esi
  call   <getBinaryData@plt>
  mov    %eax,%r13d
  test   $0x1,%al
  jne    L541
L110:
  test   $0x2,%r13b
  jne    L103
L539:
  test   $0x4,%r13b
  jne    L329
L754:
  test   $0x8,%r13b
  jne    L787
L745:
  test   $0x10,%r13b
  jne    L383
L612:
  test   $0x20,%r13b
  jne    L816
L638:
  test   $0x40,%r13b
  jne    L801
L263:
  and    $0x80,%r13d
  je     L709
  lea    D402(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   0x0(%rax)
  lea    D354(%rip),%rsi
  jmp    L164
  nopl   0x0(%rax)
  lea    D474(%rip),%rsi
  jmp    L164
  nopl   0x0(%rax)
L622:
  lea    D135(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L818
  nopl   0x0(%rax)
L746:
  lea    D101(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L829
  nopl   0x0(%rax)
L202:
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L665
  nopl   0x0(%rax)
L300:
  lea    D448(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L583
  nopl   0x0(%rax)
L386:
  lea    D95(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L817
  nopl   0x0(%rax)
L389:
  lea    D359(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L416
  nopl   0x0(%rax)
L592:
  lea    D281(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L699
  nopl   0x0(%rax)
L259:
  lea    D324(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
  nopl   0x0(%rax)
L541:
  lea    D347(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L110
  nopl   0x0(%rax)
L329:
  lea    D296(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L754
  nopl   0x0(%rax)
L103:
  lea    D217(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L539
  nopl   0x0(%rax)
L801:
  lea    D517(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L263
  nopl   0x0(%rax)
L816:
  lea    D396(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L638
  nopl   0x0(%rax)
L383:
  lea    D290(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L612
  nopl   0x0(%rax)
L787:
  lea    D146(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L745
L278:
  lea    D505(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L324:
  lea    D443(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L796:
  lea    D222(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L514:
  lea    D282(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L362:
  lea    D427(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L604:
  lea    D273(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L198:
  lea    D372(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L95:
  lea    D93(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L490:
  lea    D414(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L7:
  lea    D129(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L351:
  lea    D451(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L373:
  lea    D2(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L709
L559:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D186
type_guessed: string
name: retrieve_data
arguments: data_tag: D189
type_guessed: string
name: retrieve_data
arguments: data_tag: D11
type_guessed: string
name: retrieve_data
arguments: data_tag: D102
type_guessed: string
name: retrieve_data
arguments: data_tag: D60
type_guessed: string
name: retrieve_data
arguments: data_tag: D99
type_guessed: string
name: retrieve_data
arguments: data_tag: D409
type_guessed: string
name: retrieve_data
arguments: data_tag: D200
type_guessed: string
name: retrieve_data
arguments: data_tag: D85
type_guessed: string
name: retrieve_data
arguments: data_tag: D315
type_guessed: string
name: retrieve_data
arguments: data_tag: D504
type_guessed: string
name: retrieve_data
arguments: data_tag: D395
type_guessed: string
name: retrieve_data
arguments: data_tag: D69
type_guessed: string
name: retrieve_data
arguments: data_tag: D345
type_guessed: string
name: retrieve_data
arguments: data_tag: D477
type_guessed: string
name: retrieve_data
arguments: data_tag: D336
type_guessed: string
name: retrieve_data
arguments: data_tag: D194
type_guessed: string
name: retrieve_data
arguments: data_tag: D363
type_guessed: string
name: retrieve_data
arguments: data_tag: D15
type_guessed: string
name: retrieve_data
arguments: data_tag: D256
type_guessed: string
name: retrieve_data
arguments: data_tag: D28
type_guessed: string
name: retrieve_data
arguments: data_tag: D402
type_guessed: string
name: retrieve_data
arguments: data_tag: D354
type_guessed: string
name: retrieve_data
arguments: data_tag: D474
type_guessed: string
name: retrieve_data
arguments: data_tag: D135
type_guessed: string
name: retrieve_data
arguments: data_tag: D101
type_guessed: string
name: retrieve_data
arguments: data_tag: D368
type_guessed: string
name: retrieve_data
arguments: data_tag: D448
type_guessed: string
name: retrieve_data
arguments: data_tag: D95
type_guessed: string
name: retrieve_data
arguments: data_tag: D359
type_guessed: string
name: retrieve_data
arguments: data_tag: D281
type_guessed: string
name: retrieve_data
arguments: data_tag: D324
type_guessed: string
name: retrieve_data
arguments: data_tag: D347
type_guessed: string
name: retrieve_data
arguments: data_tag: D296
type_guessed: string
name: retrieve_data
arguments: data_tag: D217
type_guessed: string
name: retrieve_data
arguments: data_tag: D517
type_guessed: string
name: retrieve_data
arguments: data_tag: D396
type_guessed: string
name: retrieve_data
arguments: data_tag: D290
type_guessed: string
name: retrieve_data
arguments: data_tag: D146
type_guessed: string
name: retrieve_data
arguments: data_tag: D505
type_guessed: string
name: retrieve_data
arguments: data_tag: D443
type_guessed: string
name: retrieve_data
arguments: data_tag: D222
type_guessed: string
name: retrieve_data
arguments: data_tag: D282
type_guessed: string
name: retrieve_data
arguments: data_tag: D427
type_guessed: string
name: retrieve_data
arguments: data_tag: D273
type_guessed: string
name: retrieve_data
arguments: data_tag: D372
type_guessed: string
name: retrieve_data
arguments: data_tag: D93
type_guessed: string
name: retrieve_data
arguments: data_tag: D414
type_guessed: string
name: retrieve_data
arguments: data_tag: D129
type_guessed: string
name: retrieve_data
arguments: data_tag: D451
type_guessed: string
name: retrieve_data
arguments: data_tag: D2
type_guessed: string

tool: 

tool: D189: k->p 

tool: D11: unknown keypad msg

tool: D102: p->k Keypad query

tool: D60: p->k undefined command

tool: D99: p->k LED Status: 

tool: D409: Ready 

tool: D200: p->k unknown command.

tool: D85: %d

tool: D315: -

tool: D504: p->k Date: 20

tool: D395:  

tool: D69: :

tool: D345: p->k panel in program mode

tool: D477: Armed 

tool: D336: Memory 

tool: D194: Bypass 

tool: D363: Error 

tool: D15: p->k Zone2: 

tool: D256: 16 

tool: D28: p->k Zone1: 

tool: D402: 8 

tool: D354: p->k Zone4: 

tool: D474: p->k Zone3: 

tool: D135: 15 

tool: D101: 14 

tool: D368: 13 

tool: D448: 12 

tool: D95: 11 

tool: D359: 10 

tool: D281: 9 

tool: D324: idle

tool: D347: 1 

tool: D296: 3 

tool: D217: 2 

tool: D517: 7 

tool: D396: 6 

tool: D290: 5 

tool: D146: 4 

tool: D505: button * pressed

tool: D443: button # pressed

tool: D222: button 0 pressed

tool: D282: button 1 pressed

tool: D427: button 2 pressed

tool: D273: button 3 pressed

tool: D372: button 4 pressed

tool: D93: button 5 pressed

tool: D414: button 6 pressed

tool: D129: button 9 pressed

tool: D451: button 7 pressed

tool: D2: button 8 pressed

assistant: ```c
int decode(char *word, char *msg) {
  int cmd = 0, zones = 0, button = 0;
  char year3[2], year4[2], month[2], day[2], hour[2], minute[2];
  cmd = getBinaryData(word, 0, 8);
  strcpy(msg, "");
  if (cmd == 0x05) {
    strcpy(msg, "p->k LED Status: ");
    if (getBinaryData(word, 12, 1))
      strcat(msg, "Error ");
    if (getBinaryData(word, 13, 1))
      strcat(msg, "Bypass ");
    if (getBinaryData(word, 14, 1))
      strcat(msg, "Memory ");
    if (getBinaryData(word, 15, 1))
      strcat(msg, "Armed ");
    if (getBinaryData(word, 16, 1))
      strcat(msg, "Ready ");
  } else if (cmd == 0xa5) {
    sprintf(year3, "%d", getBinaryData(word, 9, 4));
    sprintf(year4, "%d", getBinaryData(word, 13, 4));
    sprintf(month, "%d", getBinaryData(word, 19, 4));
    sprintf(day, "%d", getBinaryData(word, 23, 5));
    sprintf(hour, "%d", getBinaryData(word, 28, 5));
    sprintf(minute, "%d", getBinaryData(word, 33, 6));
    strcpy(msg, "p->k Date: 20");
    strcat(msg, year3);
    strcat(msg, year4);
    strcat(msg, "-");
    strcat(msg, month);
    strcat(msg, "-");
    strcat(msg, day);
    strcat(msg, " ");
    strcat(msg, hour);
    strcat(msg, ":");
    strcat(msg, minute);
  } else if (cmd == 0x27) {
    strcpy(msg, "p->k Zone1: ");
    zones = getBinaryData(word, 41, 8);
    if (zones & 1)
      strcat(msg, "1 ");
    if (zones & 2)
      strcat(msg, "2 ");
    if (zones & 4)
      strcat(msg, "3 ");
    if (zones & 8)
      strcat(msg, "4 ");
    if (zones & 16)
      strcat(msg, "5 ");
    if (zones & 32)
      strcat(msg, "6 ");
    if (zones & 64)
      strcat(msg, "7 ");
    if (zones & 128)
      strcat(msg, "8 ");
  } else if (cmd == 0x2d) {
    strcpy(msg, "p->k Zone2: ");
    zones = getBinaryData(word, 41, 8);
    if (zones & 1)
      strcat(msg, "9 ");
    if (zones & 2)
      strcat(msg, "10 ");
    if (zones & 4)
      strcat(msg, "11 ");
    if (zones & 8)
      strcat(msg, "12 ");
    if (zones & 16)
      strcat(msg, "13 ");
    if (zones & 32)
      strcat(msg, "14 ");
    if (zones & 64)
      strcat(msg, "15 ");
    if (zones & 128)
      strcat(msg, "16 ");
  } else if (cmd == 0x34) {
    strcpy(msg, "p->k Zone3: ");
    zones = getBinaryData(word, 41, 8);
    if (zones & 1)
      strcat(msg, "9 ");
    if (zones & 2)
      strcat(msg, "10 ");
    if (zones & 4)
      strcat(msg, "11 ");
    if (zones & 8)
      strcat(msg, "12 ");
    if (zones & 16)
      strcat(msg, "13 ");
    if (zones & 32)
      strcat(msg, "14 ");
    if (zones & 64)
      strcat(msg, "15 ");
    if (zones & 128)
      strcat(msg, "16 ");
  } else if (cmd == 0x3e) {
    strcpy(msg, "p->k Zone4: ");
    zones = getBinaryData(word, 41, 8);
    if (zones & 1)
      strcat(msg, "9 ");
    if (zones & 2)
      strcat(msg, "10 ");
    if (zones & 4)
      strcat(msg, "11 ");
    if (zones & 8)
      strcat(msg, "12 ");
    if (zones & 16)
      strcat(msg, "13 ");
    if (zones & 32)
      strcat(msg, "14 ");
    if (zones & 64)
      strcat(msg, "15 ");
    if (zones & 128)
      strcat(msg, "16 ");
  } else if (cmd == 0x0a)
    strcpy(msg, "p->k panel in program mode");
  else if (cmd == 0x63)
    strcpy(msg, "p->k undefined command");
  else if (cmd == 0x64)
    strcpy(msg, "p->k undefined command");
  else if (cmd == 0x69)
    strcpy(msg, "p->k undefined command");
  else if (cmd == 0x5d)
    strcpy(msg, "p->k undefined command");
  else if (cmd == 0x39)
    strcpy(msg, "p->k undefined command");
  else if (cmd == 0x11)
    strcpy(msg, "p->k Keypad query");
  else if (cmd == 0xff) {
    strcpy(msg, "k->p ");
    if (getBinaryData(word, 8, 32) == 0xffffffff)
      strcat(msg, "idle");
    else {
      button = getBinaryData(word, 8, 20);
      if (button == 0x947ff)
        strcat(msg, "button * pressed");
      else if (button == 0x96fff)
        strcat(msg, "button # pressed");
      else if (button == 0x807ff)
        strcat(msg, "button 0 pressed");
      else if (button == 0x82fff)
        strcat(msg, "button 1 pressed");
      else if (button == 0x857ff)
        strcat(msg, "button 2 pressed");
      else if (button == 0x87fff)
        strcat(msg, "button 3 pressed");
      else if (button == 0x88fff)
        strcat(msg, "button 4 pressed");
      else if (button == 0x8b7ff)
        strcat(msg, "button 5 pressed");
      else if (button == 0x8dfff)
        strcat(msg, "button 6 pressed");
      else if (button == 0x8e7ff)
        strcat(msg, "button 7 pressed");
      else if (button == 0x917ff)
        strcat(msg, "button 8 pressed");
      else if (button == 0x93fff)
        strcat(msg, "button 9 pressed");
      else
        strcat(msg, "unknown keypad msg");
    }
  } else
    strcpy(msg, "p->k unknown command.");
  return cmd;
}
```