user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<decode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    $0x8,%edx
  mov    $0x0,%esi
  call   <getBinaryData@plt>
  mov    %eax,%ebx
  lea    D220(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  cmp    $0x5,%ebx
  je     L1002
  cmp    $0x69,%ebx
  jg     L956
  cmp    $0x26,%ebx
  jle    L1146
  lea    -0x27(%rbx),%eax
  cmp    $0x42,%eax
  ja     L179
  mov    %eax,%eax
  lea    D361(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L1002:
  lea    D529(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x1,%edx
  mov    $0xc,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L535
L576:
  mov    $0x1,%edx
  mov    $0xd,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L343
L243:
  mov    $0x1,%edx
  mov    $0xe,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L669
L1130:
  mov    $0x1,%edx
  mov    $0xf,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L21
L321:
  mov    $0x1,%edx
  mov    $0x10,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  test   %eax,%eax
  jne    L769
L451:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L768
  mov    %ebx,%eax
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L535:
  lea    D46(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L576
L343:
  lea    D363(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L243
L669:
  lea    D689(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1130
L21:
  lea    D610(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L321
L769:
  lea    D146(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L1146:
  cmp    $0xa,%ebx
  je     L116
  cmp    $0x11,%ebx
  jne    L179
  lea    D514(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
L956:
  cmp    $0xa5,%ebx
  je     L272
  cmp    $0xff,%ebx
  jne    L179
  lea    D449(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x20,%edx
  mov    $0x8,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  cmp    $0xffffffff,%eax
  je     L687
  mov    $0x14,%edx
  mov    $0x8,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  cmp    $0x947ff,%eax
  je     L135
  cmp    $0x96fff,%eax
  je     L958
  cmp    $0x807ff,%eax
  je     L417
  cmp    $0x82fff,%eax
  je     L494
  cmp    $0x857ff,%eax
  je     L653
  cmp    $0x87fff,%eax
  je     L164
  cmp    $0x88fff,%eax
  je     L271
  cmp    $0x8b7ff,%eax
  je     L778
  cmp    $0x8dfff,%eax
  je     L194
  cmp    $0x8e7ff,%eax
  je     L660
  cmp    $0x917ff,%eax
  je     L568
  cmp    $0x93fff,%eax
  je     L1158
  lea    D571(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L272:
  mov    $0x4,%edx
  mov    $0x9,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x2c(%rsp),%r15
  lea    D712(%rip),%r13
  mov    %r13,%rsi
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    $0x4,%edx
  mov    $0xd,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x2e(%rsp),%r14
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <sprintf@plt>
  mov    $0x4,%edx
  mov    $0x13,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x30(%rsp),%rax
  mov    %r13,%rsi
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    $0x5,%edx
  mov    $0x17,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x32(%rsp),%rax
  mov    %r13,%rsi
  mov    %rax,0x10(%rsp)
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    $0x5,%edx
  mov    $0x1c,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x34(%rsp),%rax
  mov    %r13,%rsi
  mov    %rax,0x18(%rsp)
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    $0x6,%edx
  mov    $0x21,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%edx
  lea    0x36(%rsp),%r12
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  lea    D631(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D385(%rip),%r13
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0x10(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D271(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    0x18(%rsp),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D412(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
  lea    D66(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x8,%edx
  mov    $0x29,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%r12d
  test   $0x1,%al
  jne    L938
L260:
  test   $0x2,%r12b
  jne    L1105
L721:
  test   $0x4,%r12b
  jne    L609
L540:
  test   $0x8,%r12b
  jne    L851
L426:
  test   $0x10,%r12b
  jne    L929
L1097:
  test   $0x20,%r12b
  jne    L538
L1017:
  test   $0x40,%r12b
  jne    L109
L690:
  test   $0x80,%r12b
  je     L451
  lea    D329(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L938:
  lea    D503(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L260
L1105:
  lea    D353(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L721
L609:
  lea    D172(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L540
L851:
  lea    D195(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L426
L929:
  lea    D17(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1097
L538:
  lea    D268(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1017
L109:
  lea    D640(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L690
  lea    D378(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x8,%edx
  mov    $0x29,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%r12d
  test   $0x1,%al
  jne    L59
L378:
  test   $0x2,%r12b
  jne    L327
L1159:
  test   $0x4,%r12b
  jne    L1014
L844:
  test   $0x8,%r12b
  jne    L765
L884:
  test   $0x10,%r12b
  jne    L488
L375:
  test   $0x20,%r12b
  jne    L593
L294:
  test   $0x40,%r12b
  jne    L234
L849:
  test   $0x80,%r12b
  je     L451
  lea    D310(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L59:
  lea    D493(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L378
L327:
  lea    D55(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1159
L1014:
  lea    D307(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L844
L765:
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L884
L488:
  lea    D403(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L375
L593:
  lea    D204(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L294
L234:
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L849
  lea    D489(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x8,%edx
  mov    $0x29,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%r12d
  test   $0x1,%al
  jne    L227
L512:
  test   $0x2,%r12b
  jne    L602
L26:
  test   $0x4,%r12b
  jne    L450
L622:
  test   $0x8,%r12b
  jne    L679
L1126:
  test   $0x10,%r12b
  jne    L916
L968:
  test   $0x20,%r12b
  jne    L608
L770:
  test   $0x40,%r12b
  jne    L178
L1178:
  test   $0x80,%r12b
  je     L451
  lea    D310(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L227:
  lea    D493(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L512
L602:
  lea    D55(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L26
L450:
  lea    D307(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L622
L679:
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1126
L916:
  lea    D403(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L968
L608:
  lea    D204(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L770
L178:
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1178
  lea    D611(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x8,%edx
  mov    $0x29,%esi
  mov    %r12,%rdi
  call   <getBinaryData@plt>
  mov    %eax,%r12d
  test   $0x1,%al
  jne    L640
L1031:
  test   $0x2,%r12b
  jne    L302
L461:
  test   $0x4,%r12b
  jne    L1056
L154:
  test   $0x8,%r12b
  jne    L1121
L590:
  test   $0x10,%r12b
  jne    L868
L484:
  test   $0x20,%r12b
  jne    L1180
L1120:
  test   $0x40,%r12b
  jne    L574
L70:
  test   $0x80,%r12b
  je     L451
  lea    D310(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L640:
  lea    D493(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1031
L302:
  lea    D55(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L461
L1056:
  lea    D307(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L154
L1121:
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L590
L868:
  lea    D403(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L484
L1180:
  lea    D204(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L1120
L574:
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L70
L116:
  lea    D110(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
  lea    D368(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
L687:
  lea    D665(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L135:
  lea    D186(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L958:
  lea    D420(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L417:
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L494:
  lea    D246(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L653:
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L164:
  lea    D448(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L271:
  lea    D469(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L778:
  lea    D602(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L194:
  lea    D309(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L660:
  lea    D553(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L568:
  lea    D298(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L1158:
  lea    D710(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L451
L179:
  lea    D696(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L451
L768:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D220
type: string
name: unpack_data
arguments: label: D529
type: string
name: unpack_data
arguments: label: D46
type: string
name: unpack_data
arguments: label: D363
type: string
name: unpack_data
arguments: label: D689
type: string
name: unpack_data
arguments: label: D610
type: string
name: unpack_data
arguments: label: D146
type: string
name: unpack_data
arguments: label: D514
type: string
name: unpack_data
arguments: label: D449
type: string
name: unpack_data
arguments: label: D571
type: string
name: unpack_data
arguments: label: D712
type: string
name: unpack_data
arguments: label: D631
type: string
name: unpack_data
arguments: label: D385
type: string
name: unpack_data
arguments: label: D271
type: string
name: unpack_data
arguments: label: D412
type: string
name: unpack_data
arguments: label: D66
type: string
name: unpack_data
arguments: label: D329
type: string
name: unpack_data
arguments: label: D503
type: string
name: unpack_data
arguments: label: D353
type: string
name: unpack_data
arguments: label: D172
type: string
name: unpack_data
arguments: label: D195
type: string
name: unpack_data
arguments: label: D17
type: string
name: unpack_data
arguments: label: D268
type: string
name: unpack_data
arguments: label: D640
type: string
name: unpack_data
arguments: label: D378
type: string
name: unpack_data
arguments: label: D310
type: string
name: unpack_data
arguments: label: D493
type: string
name: unpack_data
arguments: label: D55
type: string
name: unpack_data
arguments: label: D307
type: string
name: unpack_data
arguments: label: D3
type: string
name: unpack_data
arguments: label: D403
type: string
name: unpack_data
arguments: label: D204
type: string
name: unpack_data
arguments: label: D79
type: string
name: unpack_data
arguments: label: D489
type: string
name: unpack_data
arguments: label: D611
type: string
name: unpack_data
arguments: label: D110
type: string
name: unpack_data
arguments: label: D368
type: string
name: unpack_data
arguments: label: D665
type: string
name: unpack_data
arguments: label: D186
type: string
name: unpack_data
arguments: label: D420
type: string
name: unpack_data
arguments: label: D153
type: string
name: unpack_data
arguments: label: D246
type: string
name: unpack_data
arguments: label: D29
type: string
name: unpack_data
arguments: label: D448
type: string
name: unpack_data
arguments: label: D469
type: string
name: unpack_data
arguments: label: D602
type: string
name: unpack_data
arguments: label: D309
type: string
name: unpack_data
arguments: label: D553
type: string
name: unpack_data
arguments: label: D298
type: string
name: unpack_data
arguments: label: D710
type: string
name: unpack_data
arguments: label: D696
type: string

tool: 

tool: D529: p->k LED Status: 

tool: D46: Error 

tool: D363: Bypass 

tool: D689: Memory 

tool: D610: Armed 

tool: D146: Ready 

tool: D514: p->k Keypad query

tool: D449: k->p 

tool: D571: unknown keypad msg

tool: D712: %d

tool: D631: p->k Date: 20

tool: D385: -

tool: D271:  

tool: D412: :

tool: D66: p->k Zone1: 

tool: D329: 8 

tool: D503: 1 

tool: D353: 2 

tool: D172: 3 

tool: D195: 4 

tool: D17: 5 

tool: D268: 6 

tool: D640: 7 

tool: D378: p->k Zone2: 

tool: D310: 16 

tool: D493: 9 

tool: D55: 10 

tool: D307: 11 

tool: D3: 12 

tool: D403: 13 

tool: D204: 14 

tool: D79: 15 

tool: D489: p->k Zone3: 

tool: D611: p->k Zone4: 

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

tool: D368: p->k undefined command

tool: D665: idle

tool: D186: button * pressed

tool: D420: button # pressed

tool: D153: button 0 pressed

tool: D246: button 1 pressed

tool: D29: button 2 pressed

tool: D448: button 3 pressed

tool: D469: button 4 pressed

tool: D602: button 5 pressed

tool: D309: button 6 pressed

tool: D553: button 7 pressed

tool: D298: button 8 pressed

tool: D710: button 9 pressed

tool: D696: p->k unknown command.

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;
}
```