user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdx,%rbx
  mov    %rcx,%r13
  mov    0x50(%rsp),%rbp
  mov    0x60(%rsp),%r12
  mov    0x68(%rsp),%r15
  or     %r9d,%r8d
  mov    %r8d,0x4(%rsp)
  mov    0x4b0(%rdx),%eax
  test   %eax,%eax
  jle    L4086
  lea    -0x4(,%rax,4),%eax
  lea    0x12d(%rax),%edx
  movslq %edx,%rdx
  mov    (%rbx,%rdx,4),%ecx
  mov    %ecx,0xc(%rsp)
  cltq
  mov    0x4b8(%rbx,%rax,4),%eax
  mov    %eax,0x8(%rsp)
L1883:
  cmpl   $0x0,0x184(%rbx)
  jne    L2476
  movl   $0x1,0x1dc(%rbx)
  movl   $0x1,0x1e0(%rbx)
  movl   $0x1,0x198(%rbx)
  movl   $0x1,0x19c(%rbx)
  mov    $0x1388,%esi
  mov    $0x7,%edi
  call   *%r15
L2476:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L4030
L4207:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L4163
L2126:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2283
L2384:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1302
L3657:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2344
L3158:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1671
L3478:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1780
L4196:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1522
L2748:
  mov    $0x2714,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1555
L658:
  mov    $0x2714,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2894
L3823:
  mov    $0x2713,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L4258
L857:
  mov    $0x2713,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L4200
L2668:
  mov    $0x2711,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L888
L2794:
  mov    $0x2711,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L3194
L497:
  mov    $0x2712,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2827
L4263:
  mov    $0x2712,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L941
L1850:
  mov    $0x2713,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1810
L667:
  mov    $0x2713,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L3747
L3442:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L3728
  cmpl   $0x1,0x1d4(%rbx)
  je     L3700
L3728:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L1886
  cmpl   $0x0,0x1d4(%rbx)
  jne    L1886
  cmpl   $0x1,0x4c(%rbx)
  je     L3615
  cmpl   $0x1,0x50(%rbx)
  jne    L1886
L3615:
  movl   $0x0,0x1d0(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
L1886:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2435
L38:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2590
L1172:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L2116
  cmpl   $0x1,0x1d0(%rbx)
  je     L1200
L2116:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L2511
  cmpl   $0x0,0x1d0(%rbx)
  jne    L2511
  cmpl   $0x1,0x1d4(%rbx)
  je     L3557
L2511:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L700
L1680:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L3673
L1415:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L4026
  cmpl   $0x1,0x1d0(%rbx)
  je     L3605
L4026:
  mov    $0x6,%edi
  call   *%r12
  test   %eax,%eax
  jne    L3815
  cmpl   $0x0,0x1d0(%rbx)
  jne    L3815
  cmpl   $0x1,0x1d8(%rbx)
  je     L204
L3815:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L682
  movl   $0x0,0x28(%rbx)
L682:
  mov    $0x2711,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L584
  movl   $0x0,0x2c(%rbx)
L584:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1657
  movl   $0x0,0x30(%rbx)
L1657:
  mov    $0x2712,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L640
  movl   $0x0,0x34(%rbx)
L640:
  mov    $0x2714,%esi
  mov    $0x4,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L437
  movl   $0x0,0x38(%rbx)
L437:
  mov    $0x2713,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L3977
  movl   $0x0,0x3c(%rbx)
L3977:
  mov    $0x2711,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2689
  movl   $0x0,0x40(%rbx)
L2689:
  mov    $0x2712,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2633
  movl   $0x0,0x44(%rbx)
L2633:
  mov    $0x2713,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L31
  movl   $0x0,0x48(%rbx)
L31:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2140
  movl   $0x0,0x4c(%rbx)
L2140:
  mov    $0x2714,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2089
  movl   $0x0,0x50(%rbx)
L2089:
  mov    $0x17,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L4209
  mov    $0x9c41,%esi
  mov    $0x1,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  0x34(%r13),%xmm0
  movss  %xmm0,0x34(%r13)
  movss  D237(%rip),%xmm0
  addss  0x3c(%r13),%xmm0
  movss  %xmm0,0x3c(%r13)
L1263:
  push   $0x1
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L2060
  movl   $0x0,0x140(%rbx)
L2060:
  push   $0x3
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x10,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L1870
  cmpl   $0x0,0x190(%rbx)
  jne    L1870
  cmpl   $0x0,0x140(%rbx)
  jne    L1870
  pxor   %xmm0,%xmm0
  cvtss2sd 0x38(%r13),%xmm0
  movsd  D654(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L1870
  movl   $0x1,0x140(%rbx)
  movl   $0x1,0x1a4(%rbx)
L1870:
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L3282
  mov    $0xfa0,%esi
  mov    $0xa,%edi
  call   *%r15
L3282:
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1420
  cmpl   $0x0,0x1c4(%rbx)
  jne    L1420
  cmpl   $0x1,0x1e0(%rbx)
  jne    L1210
  movl   $0x1,0x1c4(%rbx)
L178:
  mov    $0xa,%edi
  call   *%r12
  test   %eax,%eax
  je     L1975
  cmpl   $0x0,0x1e0(%rbx)
  jne    L1210
L1975:
  movl   $0x0,0x1c4(%rbx)
  jmp    L1210
L4086:
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0xc(%rsp)
  jmp    L1883
L4030:
  cmpl   $0x0,0x1a4(%rbx)
  jne    L4207
  cmpl   $0x0,0x28(%rbx)
  jne    L4207
  movl   $0x1,0x1a4(%rbx)
  movl   $0x1,0x28(%rbx)
  jmp    L4207
L4163:
  cmpl   $0x1,0x1a4(%rbx)
  jne    L2126
  cmpl   $0x0,0x28(%rbx)
  jne    L2126
  movl   $0x0,0x1a4(%rbx)
  movl   $0x1,0x28(%rbx)
  jmp    L2126
L2283:
  cmpl   $0x0,0x1a8(%rbx)
  jne    L2384
  cmpl   $0x0,0x2c(%rbx)
  jne    L2384
  movl   $0x1,0x1a8(%rbx)
  movl   $0x1,0x2c(%rbx)
  jmp    L2384
L1302:
  cmpl   $0x1,0x1a8(%rbx)
  jne    L3657
  cmpl   $0x0,0x2c(%rbx)
  jne    L3657
  movl   $0x0,0x1a8(%rbx)
  movl   $0x1,0x2c(%rbx)
  jmp    L3657
L2344:
  cmpl   $0x0,0x1ac(%rbx)
  jne    L3158
  cmpl   $0x0,0x30(%rbx)
  jne    L3158
  movl   $0x1,0x1ac(%rbx)
  movl   $0x1,0x30(%rbx)
  jmp    L3158
L1671:
  cmpl   $0x1,0x1ac(%rbx)
  jne    L3478
  cmpl   $0x0,0x30(%rbx)
  jne    L3478
  movl   $0x0,0x1ac(%rbx)
  movl   $0x1,0x30(%rbx)
  jmp    L3478
L1780:
  cmpl   $0x0,0x1b0(%rbx)
  jne    L4196
  cmpl   $0x0,0x34(%rbx)
  jne    L4196
  movl   $0x1,0x1b0(%rbx)
  movl   $0x1,0x34(%rbx)
  jmp    L4196
L1522:
  cmpl   $0x1,0x1b0(%rbx)
  jne    L2748
  cmpl   $0x0,0x34(%rbx)
  jne    L2748
  movl   $0x0,0x1b0(%rbx)
  movl   $0x1,0x34(%rbx)
  jmp    L2748
L1555:
  cmpl   $0x0,0x1b4(%rbx)
  jne    L658
  cmpl   $0x0,0x38(%rbx)
  jne    L658
  movl   $0x1,0x1b4(%rbx)
  movl   $0x1,0x38(%rbx)
  jmp    L658
L2894:
  cmpl   $0x1,0x1b4(%rbx)
  jne    L3823
  cmpl   $0x0,0x38(%rbx)
  jne    L3823
  movl   $0x0,0x1b4(%rbx)
  movl   $0x1,0x38(%rbx)
  jmp    L3823
L4258:
  cmpl   $0x0,0x1b8(%rbx)
  jne    L857
  cmpl   $0x0,0x3c(%rbx)
  jne    L857
  movl   $0x1,0x1b8(%rbx)
  movl   $0x1,0x3c(%rbx)
  jmp    L857
L4200:
  cmpl   $0x1,0x1b8(%rbx)
  jne    L2668
  cmpl   $0x0,0x3c(%rbx)
  jne    L2668
  movl   $0x0,0x1b8(%rbx)
  movl   $0x1,0x3c(%rbx)
  jmp    L2668
L888:
  cmpl   $0x0,0x1c0(%rbx)
  jne    L2794
  cmpl   $0x0,0x40(%rbx)
  jne    L2794
  movl   $0x1,0x1c0(%rbx)
  movl   $0x1,0x40(%rbx)
  jmp    L2794
L3194:
  cmpl   $0x1,0x1c0(%rbx)
  jne    L497
  cmpl   $0x0,0x40(%rbx)
  jne    L497
  movl   $0x0,0x1c0(%rbx)
  movl   $0x1,0x40(%rbx)
  jmp    L497
L2827:
  cmpl   $0x0,0x1cc(%rbx)
  jne    L4263
  cmpl   $0x0,0x44(%rbx)
  jne    L4263
  movl   $0x1,0x1cc(%rbx)
  movl   $0x1,0x44(%rbx)
  jmp    L4263
L941:
  cmpl   $0x1,0x1cc(%rbx)
  jne    L1850
  cmpl   $0x0,0x44(%rbx)
  jne    L1850
  movl   $0x0,0x1cc(%rbx)
  movl   $0x1,0x44(%rbx)
  jmp    L1850
L1810:
  cmpl   $0x0,0x1d0(%rbx)
  jne    L667
  cmpl   $0x0,0x48(%rbx)
  jne    L667
  movl   $0x1,0x1d0(%rbx)
  movl   $0x1,0x48(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L667
L3747:
  cmpl   $0x1,0x1d0(%rbx)
  jne    L3442
  cmpl   $0x0,0x48(%rbx)
  jne    L3442
  movl   $0x0,0x1d0(%rbx)
  movl   $0x1,0x48(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L3442
L3700:
  cmpl   $0x1,0x4c(%rbx)
  je     L4069
  cmpl   $0x1,0x50(%rbx)
  jne    L3728
L4069:
  movl   $0x1,0x1d0(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L3728
L2435:
  cmpl   $0x0,0x1d4(%rbx)
  jne    L38
  cmpl   $0x0,0x4c(%rbx)
  jne    L38
  movl   $0x1,0x1d4(%rbx)
  movl   $0x1,0x4c(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L38
L2590:
  cmpl   $0x1,0x1d4(%rbx)
  jne    L1172
  cmpl   $0x0,0x4c(%rbx)
  jne    L1172
  movl   $0x0,0x1d4(%rbx)
  movl   $0x1,0x4c(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L1172
L1200:
  cmpl   $0x0,0x1d4(%rbx)
  jne    L2116
  cmpl   $0x1,0x48(%rbx)
  jne    L2116
  movl   $0x1,0x1d4(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L2116
L3557:
  cmpl   $0x1,0x48(%rbx)
  jne    L2511
  movl   $0x0,0x1d4(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L2511
L700:
  cmpl   $0x0,0x1d8(%rbx)
  jne    L1680
  cmpl   $0x0,0x50(%rbx)
  jne    L1680
  movl   $0x1,0x1d8(%rbx)
  movl   $0x1,0x50(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L1680
L3673:
  cmpl   $0x1,0x1d8(%rbx)
  jne    L1415
  cmpl   $0x0,0x50(%rbx)
  jne    L1415
  movl   $0x0,0x1d8(%rbx)
  movl   $0x1,0x50(%rbx)
  mov    $0x46,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L1415
L3605:
  cmpl   $0x0,0x1d8(%rbx)
  jne    L4026
  cmpl   $0x1,0x48(%rbx)
  jne    L4026
  movl   $0x1,0x1d8(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L4026
L204:
  cmpl   $0x1,0x48(%rbx)
  jne    L3815
  movl   $0x0,0x1d8(%rbx)
  mov    $0xffffffff,%esi
  mov    $0x6,%edi
  call   *%r15
  jmp    L3815
L4209:
  movss  0x3c(%r13),%xmm1
  pxor   %xmm0,%xmm0
  comiss D179(%rip),%xmm1
  jbe    L3720
  movss  0x34(%r13),%xmm0
  divss  %xmm1,%xmm0
  mulss  D552(%rip),%xmm0
L3720:
  movss  %xmm0,0x38(%r13)
  movl   $0x0,0x34(%r13)
  movl   $0x0,0x3c(%r13)
  mov    $0x1770,%esi
  mov    $0x17,%edi
  call   *%r15
  jmp    L1263
L1420:
  cmpl   $0x1,0x1c4(%rbx)
  je     L178
L1210:
  mov    $0x2713,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1641
  mov    $0xbb8,%esi
  mov    $0xb,%edi
  call   *%r15
  movl   $0x1,0x144(%rbx)
L1641:
  mov    $0x2713,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2244
  cmpl   $0x0,0x1bc(%rbx)
  jne    L2244
  cmpl   $0x1,0x1dc(%rbx)
  jne    L4237
  movl   $0x1,0x1bc(%rbx)
L644:
  mov    $0xb,%edi
  call   *%r12
  test   %eax,%eax
  je     L244
  cmpl   $0x0,0x1dc(%rbx)
  jne    L4237
L244:
  movl   $0x0,0x1bc(%rbx)
  jmp    L4237
L2244:
  cmpl   $0x1,0x1bc(%rbx)
  je     L644
L4237:
  cmpl   $0x0,0x4(%rsp)
  jne    L2135
  cmpl   $0x0,0x190(%rbx)
  jne    L2135
  mov    $0x0,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L2971
L2135:
  mov    $0x0,%r14d
  movl   $0x0,(%rsp)
  cmpl   $0x1,0x190(%rbx)
  je     L1722
L3281:
  mov    $0x1,%edi
  call   *%r12
  cmp    $0x64,%eax
  je     L1410
L1852:
  mov    $0x1,%edi
  call   *%r12
  cmp    $0x50,%eax
  je     L1480
L3802:
  mov    $0x1,%edi
  call   *%r12
  cmp    $0x3c,%eax
  je     L1074
L3366:
  mov    $0x1,%edi
  call   *%r12
  cmp    $0x28,%eax
  je     L2980
L1179:
  mov    $0x1,%edi
  call   *%r12
  cmp    $0x14,%eax
  je     L118
L1631:
  mov    $0x1,%edi
  call   *%r12
  test   %eax,%eax
  jne    L699
  movl   $0x0,0x194(%rbx)
L699:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0xa0,%eax
  je     L2832
L1317:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x96,%eax
  je     L1960
L3023:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x82,%eax
  je     L3434
L689:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x5a,%eax
  je     L3340
L2181:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x46,%eax
  je     L2264
L1082:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x3c,%eax
  je     L1218
L3737:
  mov    $0x2,%edi
  call   *%r12
  cmp    $0x28,%eax
  je     L643
L987:
  mov    $0x2,%edi
  call   *%r12
  test   %eax,%eax
  jne    L145
  movl   $0x0,0x194(%rbx)
L145:
  cmpl   $0x2,0x190(%rbx)
  je     L1994
L147:
  cmpl   $0x0,0x4(%rsp)
  jne    L805
  cmpl   $0x2,0x190(%rbx)
  jle    L805
  movl   $0x0,0x190(%rbx)
  movl   $0x0,0x194(%rbx)
  mov    $0x12c,%esi
  mov    $0x0,%edi
  call   *%r15
  mov    $0x6e,%esi
  mov    $0x1,%edi
  call   *%r15
  mov    $0x1,%r14d
  movl   $0x3,(%rsp)
L805:
  mov    $0x2711,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2457
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2457
  mov    $0x2713,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2457
  mov    $0x2711,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2457
  mov    $0x2712,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L4011
L2457:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L2393
L4011:
  mov    $0x2711,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1208
  mov    $0x2712,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1208
  mov    $0x2713,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L69
L1208:
  movl   $0x4,0x190(%rbx)
  mov    $0x3e8,%esi
  mov    $0x0,%edi
  call   *%r15
  mov    $0x2712,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  mov    $0x6,%eax
  cmove  %eax,%r14d
  mov    $0x2711,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  mov    $0x7,%eax
  cmove  %eax,%r14d
  mov    $0x2713,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  mov    $0x8,%eax
  cmove  %eax,%r14d
  movl   $0x5,(%rsp)
L69:
  mov    $0x0,%edi
  call   *%r12
  mov    (%rsp),%ecx
  mov    %ecx,0x4(%rsp)
  cmp    $0xffffffff,%eax
  je     L368
L1815:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L3236
L1259:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0x1d4bf,%eax
  je     L269
L3390:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0x1c907,%eax
  je     L1385
L3055:
  cmpl   $0x4,0x190(%rbx)
  je     L3249
L2409:
  cmpl   $0x5,0x190(%rbx)
  je     L3484
L3446:
  mov    $0x14,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L3178
  mov    $0x9c42,%esi
  mov    $0x2,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  0x10(%r13),%xmm0
  movss  %xmm0,0x10(%r13)
  movss  D237(%rip),%xmm0
  addss  0x18(%r13),%xmm0
  movss  %xmm0,0x18(%r13)
L1476:
  mov    $0x15,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L4201
  mov    $0x9c43,%esi
  mov    $0x2,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  0x1c(%r13),%xmm0
  movss  %xmm0,0x1c(%r13)
  movss  D237(%rip),%xmm0
  addss  0x24(%r13),%xmm0
  movss  %xmm0,0x24(%r13)
L937:
  mov    $0x16,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  je     L1918
  mov    $0x9c41,%esi
  mov    $0x7,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  0x28(%r13),%xmm0
  movss  %xmm0,0x28(%r13)
  movss  D237(%rip),%xmm0
  addss  0x30(%r13),%xmm0
  movss  %xmm0,0x30(%r13)
L4272:
  mov    $0x9c41,%esi
  mov    $0x5,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  D269(%rip),%xmm0
  subsd  D603(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x4(%r13)
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  jae    L278
L1022:
  movss  0x0(%r13),%xmm0
  movss  D213(%rip),%xmm1
  comiss %xmm0,%xmm1
  ja     L2643
  comiss D567(%rip),%xmm0
  jbe    L4275
L2643:
  movl   $0x41f00000,0x0(%r13)
L4275:
  movss  0x4(%r13),%xmm1
  movss  0x0(%r13),%xmm0
  movaps %xmm0,%xmm2
  subss  D237(%rip),%xmm2
  comiss %xmm1,%xmm2
  jbe    L3344
  cmpl   $0x1,0x198(%rbx)
  je     L2905
L257:
  cmpl   $0x0,0x198(%rbx)
  jne    L754
  movl   $0x0,0x188(%rbx)
L754:
  mov    $0x9c41,%esi
  mov    $0x6,%edi
  call   *%rbp
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  D269(%rip),%xmm0
  subsd  D603(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0xc(%r13)
  movss  D213(%rip),%xmm1
  comiss %xmm0,%xmm1
  jbe    L507
  mov    $0x7,%edi
  call   *%r12
  test   %eax,%eax
  jne    L507
  movl   $0x0,0x19c(%rbx)
L507:
  movss  0x8(%r13),%xmm0
  movss  D213(%rip),%xmm1
  comiss %xmm0,%xmm1
  ja     L4221
  comiss D567(%rip),%xmm0
  jbe    L1089
L4221:
  movl   $0x41f80000,0x8(%r13)
L1089:
  movss  0xc(%r13),%xmm1
  movss  0x8(%r13),%xmm0
  movaps %xmm0,%xmm2
  subss  D237(%rip),%xmm2
  comiss %xmm1,%xmm2
  jbe    L2489
  cmpl   $0x1,0x19c(%rbx)
  je     L1268
L2932:
  cmpl   $0x0,0x19c(%rbx)
  jne    L133
  movl   $0x0,0x18c(%rbx)
L133:
  mov    0x1a4(%rbx),%eax
  cmp    $0x1,%eax
  je     L2407
  test   %eax,%eax
  jne    L862
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1442
L862:
  mov    0x1ac(%rbx),%eax
  cmp    $0x1,%eax
  je     L523
  test   %eax,%eax
  jne    L1509
  mov    $0x2,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L702
L1509:
  mov    0x1b4(%rbx),%eax
  cmp    $0x1,%eax
  je     L36
  test   %eax,%eax
  jne    L1358
  mov    $0x2,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2032
L1358:
  mov    0x1b8(%rbx),%eax
  cmp    $0x1,%eax
  je     L1827
  mov    0x1bc(%rbx),%edx
  cmp    $0x1,%edx
  je     L1447
  or     %edx,%eax
  je     L478
L3322:
  mov    0x1c0(%rbx),%eax
  cmp    $0x1,%eax
  je     L2641
  mov    0x1c4(%rbx),%edx
  cmp    $0x1,%edx
  je     L2722
  or     %edx,%eax
  je     L2776
L1401:
  mov    0x1cc(%rbx),%eax
  cmp    $0x1,%eax
  je     L1452
  test   %eax,%eax
  jne    L1807
  mov    $0x1,%esi
  mov    $0x3,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1224
L1807:
  mov    0x1d0(%rbx),%eax
  cmp    $0x1,%eax
  je     L3128
  test   %eax,%eax
  jne    L1103
  mov    $0x4,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2819
L1103:
  mov    0x1d4(%rbx),%eax
  cmp    $0x1,%eax
  je     L4173
  test   %eax,%eax
  jne    L2351
  mov    $0x2,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L694
L2351:
  mov    0x194(%rbx),%eax
  cmp    $0x1,%eax
  je     L715
  test   %eax,%eax
  jne    L2809
  mov    $0x4,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2541
L2809:
  mov    0x188(%rbx),%eax
  cmp    $0x1,%eax
  je     L3883
  test   %eax,%eax
  jne    L2846
  mov    $0x3,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1007
L2846:
  mov    0x18c(%rbx),%eax
  cmp    $0x1,%eax
  je     L2437
  test   %eax,%eax
  jne    L1506
  mov    $0x3,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1157
L1506:
  cmpl   $0x0,0x4(%rsp)
  jle    L3846
  cmpl   $0x13,0x4b0(%rbx)
  jle    L453
  movl   $0x0,0x4b0(%rbx)
L453:
  mov    0x4b0(%rbx),%eax
  lea    0x12d(,%rax,4),%eax
  cltq
  mov    0x4(%rsp),%ecx
  mov    %ecx,(%rbx,%rax,4)
  mov    0x4b0(%rbx),%eax
  shl    $0x2,%eax
  cltq
  mov    %r14d,0x4b8(%rbx,%rax,4)
  mov    0x4b0(%rbx),%eax
  shl    $0x2,%eax
  cltq
  movl   $0x0,0x4bc(%rbx,%rax,4)
  mov    0x4b0(%rbx),%eax
  shl    $0x2,%eax
  cltq
  movl   $0x0,0x4c0(%rbx,%rax,4)
  addl   $0x1,0x4b0(%rbx)
L3846:
  cmpl   $0x0,0x184(%rbx)
  jne    L1039
  movl   $0x1,0x184(%rbx)
L1039:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2971:
  movl   $0x1,0x190(%rbx)
L1722:
  mov    $0x2711,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L4101
L3334:
  movl   $0x0,0x190(%rbx)
  mov    $0x12c,%esi
  mov    $0x0,%edi
  call   *%r15
  mov    $0xa0,%esi
  mov    $0x2,%edi
  call   *%r15
  mov    $0x2711,%esi
  mov    $0x7,%edi
  call   *%rbp
  mov    %eax,(%rsp)
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  mov    $0x2,%r14d
  test   %eax,%eax
  je     L1776
  cmpl   $0x0,(%rsp)
  sete   %r14b
  movzbl %r14b,%r14d
L1776:
  mov    $0x2711,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x3,%eax
  cmove  %eax,%r14d
  mov    $0x2712,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x4,%eax
  cmove  %eax,%r14d
  movl   $0x1,(%rsp)
  jmp    L3281
L4101:
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L3334
  mov    $0x2711,%esi
  mov    $0x3,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L3334
  mov    $0x2712,%esi
  mov    $0x3,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L3334
  mov    $0xffffffff,%esi
  mov    $0xa,%edi
  call   *%r15
  movl   $0x0,0x1a4(%rbx)
  movl   $0x0,0x1a8(%rbx)
  movl   $0x0,0x1ac(%rbx)
  movl   $0x0,0x1b0(%rbx)
  movl   $0x0,0x1b4(%rbx)
  movl   $0x0,0x1c0(%rbx)
  movl   $0x0,0x1c4(%rbx)
  movl   $0x0,0x1c8(%rbx)
  movl   $0x0,0x1cc(%rbx)
  movl   $0x0,0x1d0(%rbx)
  movl   $0x0,0x1d4(%rbx)
  movl   $0x0,0x1d8(%rbx)
  movl   $0x2,0x190(%rbx)
  mov    $0xbb8,%esi
  mov    $0x0,%edi
  call   *%r15
  mov    $0x64,%esi
  mov    $0x1,%edi
  call   *%r15
  cmpl   $0x0,0x4(%rsp)
  sete   %r14b
  movzbl %r14b,%r14d
  movl   $0x2,(%rsp)
  jmp    L3281
L1410:
  movl   $0x1,0x194(%rbx)
  jmp    L1852
L1480:
  movl   $0x0,0x194(%rbx)
  jmp    L3802
L1074:
  movl   $0x1,0x194(%rbx)
  jmp    L3366
L2980:
  movl   $0x0,0x194(%rbx)
  jmp    L1179
L118:
  movl   $0x1,0x194(%rbx)
  jmp    L1631
L2832:
  movl   $0x1,0x194(%rbx)
  jmp    L1317
L1960:
  movl   $0x0,0x194(%rbx)
  jmp    L3023
L3434:
  movl   $0x1,0x194(%rbx)
  jmp    L689
L3340:
  movl   $0x0,0x194(%rbx)
  jmp    L2181
L2264:
  movl   $0x1,0x194(%rbx)
  jmp    L1082
L1218:
  movl   $0x0,0x194(%rbx)
  jmp    L3737
L643:
  movl   $0x1,0x194(%rbx)
  jmp    L987
L1994:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0xffffffff,%eax
  jne    L147
  mov    $0xffffffff,%esi
  mov    $0xb,%edi
  call   *%r15
  movl   $0x0,0x1b8(%rbx)
  movl   $0x0,0x1bc(%rbx)
  movl   $0x3,0x190(%rbx)
  mov    $0x32,%esi
  mov    $0x2,%edi
  call   *%r15
  cmpl   $0x2,0xc(%rsp)
  sete   %al
  cmpl   $0x1,0x8(%rsp)
  jne    L3305
  test   %al,%al
  jne    L2124
L3305:
  cmpl   $0x2,0x8(%rsp)
  jne    L4106
  test   %al,%al
  jne    L569
L4106:
  cmpl   $0x2,0xc(%rsp)
  jne    L147
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D295(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L147
L2124:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D295(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L147
L569:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D295(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L147
L2393:
  mov    0x190(%rbx),%eax
  mov    %eax,0x4(%rsp)
  cmp    $0x3,%eax
  jne    L4011
  movl   $0x4,0x190(%rbx)
  mov    $0x3e8,%esi
  mov    $0x0,%edi
  call   *%r15
  mov    $0x2711,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x1,%eax
  cmove  %eax,%r14d
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x2,%eax
  cmove  %eax,%r14d
  mov    $0x2713,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  cmove  0x4(%rsp),%r14d
  mov    $0x2711,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x4,%eax
  cmove  %eax,%r14d
  mov    $0x2712,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  mov    $0x5,%eax
  cmove  %eax,%r14d
  movl   $0x5,(%rsp)
  jmp    L4011
L368:
  mov    0x190(%rbx),%eax
  mov    %eax,0x4(%rsp)
  cmp    $0x4,%eax
  je     L1623
  mov    (%rsp),%eax
  mov    %eax,0x4(%rsp)
  jmp    L1815
L1623:
  movl   $0x5,0x190(%rbx)
  mov    $0x2711,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2937
  mov    $0x2712,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L486
  mov    $0x2713,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  je     L815
  mov    $0x2711,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  je     L2030
  mov    $0x2712,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  je     L550
  mov    $0x2712,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L3785
  mov    $0x2711,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1702
  mov    $0x2713,%esi
  mov    $0x4,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1056
  cmpl   $0x5,0xc(%rsp)
  cmove  0x8(%rsp),%r14d
  jmp    L1815
L2937:
  mov    $0x1,%r14d
  jmp    L1815
L486:
  mov    $0x2,%r14d
  jmp    L1815
L815:
  mov    $0x3,%r14d
  jmp    L1815
L2030:
  mov    0x4(%rsp),%r14d
  jmp    L1815
L550:
  mov    $0x5,%r14d
  jmp    L1815
L3785:
  mov    $0x6,%r14d
  jmp    L1815
L1702:
  mov    $0x7,%r14d
  jmp    L1815
L1056:
  mov    $0x8,%r14d
  jmp    L1815
L3236:
  cmpl   $0x5,0x190(%rbx)
  jne    L1259
  mov    $0x1d4c0,%esi
  mov    $0x0,%edi
  call   *%r15
  jmp    L1259
L269:
  cmpl   $0x5,0x190(%rbx)
  jne    L3390
  mov    0xc(%rsp),%eax
  lea    -0x4(%rax),%edx
  cmp    $0x1,%edx
  setbe  %al
  cmpl   $0x1,0x8(%rsp)
  jne    L3915
  test   %al,%al
  jne    L411
L3915:
  cmpl   $0x2,0x8(%rsp)
  jne    L3342
  test   %al,%al
  jne    L2529
L3342:
  cmpl   $0x3,0x8(%rsp)
  jne    L1572
  test   %al,%al
  jne    L752
L1572:
  cmpl   $0x4,0x8(%rsp)
  jne    L3455
  test   %al,%al
  jne    L998
L3455:
  cmpl   $0x5,0x8(%rsp)
  jne    L1571
  test   %al,%al
  jne    L3064
L1571:
  cmpl   $0x6,0x8(%rsp)
  jne    L2960
  test   %al,%al
  jne    L341
L2960:
  cmpl   $0x7,0x8(%rsp)
  jne    L907
  test   %al,%al
  jne    L3923
L907:
  cmpl   $0x8,0x8(%rsp)
  jne    L2217
  test   %al,%al
  jne    L1461
L2217:
  cmp    $0x1,%edx
  ja     L3390
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D134(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L411:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D90(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L2529:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D286(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L752:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D330(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L998:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D657(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L3064:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D145(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L341:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D655(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L3923:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D631(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L1461:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D551(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3390
L1385:
  cmpl   $0x5,0x190(%rbx)
  je     L1127
  cmpl   $0x4,0x190(%rbx)
  jne    L3446
L3249:
  mov    $0x0,%edi
  call   *%r12
  mov    $0x64,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L3613
  movl   $0x1,0x194(%rbx)
L3613:
  mov    $0x0,%edi
  call   *%r12
  sub    $0x32,%eax
  mov    $0x64,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L2409
  movl   $0x0,0x194(%rbx)
  jmp    L2409
L1127:
  mov    0xc(%rsp),%eax
  sub    $0x4,%eax
  cmp    $0x1,%eax
  setbe  %dl
  cmpl   $0x1,0x8(%rsp)
  jne    L1526
  test   %dl,%dl
  jne    L3144
L1526:
  cmpl   $0x2,0x8(%rsp)
  jne    L3422
  test   %dl,%dl
  jne    L3531
L3422:
  cmpl   $0x3,0x8(%rsp)
  jne    L1507
  test   %dl,%dl
  jne    L4253
L1507:
  cmpl   $0x4,0x8(%rsp)
  jne    L2456
  test   %dl,%dl
  jne    L3893
L2456:
  cmpl   $0x5,0x8(%rsp)
  jne    L2015
  test   %dl,%dl
  jne    L332
L2015:
  cmpl   $0x6,0x8(%rsp)
  jne    L3735
  test   %dl,%dl
  jne    L4090
L3735:
  cmpl   $0x7,0x8(%rsp)
  jne    L1113
  test   %dl,%dl
  jne    L3568
L1113:
  cmpl   $0x8,0x8(%rsp)
  jne    L284
  test   %dl,%dl
  jne    L911
L284:
  cmp    $0x1,%eax
  jbe    L2182
L3484:
  mov    $0x0,%edi
  call   *%r12
  cmp    $0x1bd50,%eax
  jle    L580
  mov    $0x0,%edi
  call   *%r12
  mov    $0x12c,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L855
  movl   $0x1,0x194(%rbx)
L855:
  mov    $0x0,%edi
  call   *%r12
  sub    $0x64,%eax
  mov    $0x12c,%ecx
  cltd
  idiv   %ecx
  test   %edx,%edx
  jne    L3446
  movl   $0x0,0x194(%rbx)
  jmp    L3446
L3144:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D90(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L3531:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D286(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L4253:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D330(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L3893:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D657(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L332:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D145(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L4090:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D655(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L3568:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D631(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L911:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D551(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L2182:
  mov    $0x0,%ecx
  mov    $0x0,%edx
  lea    D134(%rip),%rsi
  lea    D149(%rip),%rdi
  call   *0x78(%rsp)
  jmp    L3055
L580:
  cmpl   $0x5,0x190(%rbx)
  jne    L3446
  cmpl   $0x1,0x194(%rbx)
  jne    L3446
  movl   $0x0,0x194(%rbx)
  jmp    L3446
L3178:
  movss  0x18(%r13),%xmm1
  pxor   %xmm0,%xmm0
  comiss D179(%rip),%xmm1
  jbe    L4180
  movss  0x10(%r13),%xmm0
  divss  %xmm1,%xmm0
  mulss  D552(%rip),%xmm0
L4180:
  movss  %xmm0,0x14(%r13)
  movl   $0x0,0x10(%r13)
  movl   $0x0,0x18(%r13)
  mov    $0x1770,%esi
  mov    $0x14,%edi
  call   *%r15
  jmp    L1476
L4201:
  movss  0x24(%r13),%xmm1
  pxor   %xmm0,%xmm0
  comiss D179(%rip),%xmm1
  jbe    L2491
  movss  0x1c(%r13),%xmm0
  divss  %xmm1,%xmm0
  mulss  D552(%rip),%xmm0
L2491:
  movss  %xmm0,0x20(%r13)
  movl   $0x0,0x1c(%r13)
  movl   $0x0,0x24(%r13)
  mov    $0x1770,%esi
  mov    $0x15,%edi
  call   *%r15
  jmp    L937
L1918:
  movss  0x30(%r13),%xmm1
  pxor   %xmm0,%xmm0
  comiss D179(%rip),%xmm1
  jbe    L1073
  movss  0x28(%r13),%xmm0
  divss  %xmm1,%xmm0
  mulss  D552(%rip),%xmm0
L1073:
  movss  %xmm0,0x2c(%r13)
  movl   $0x0,0x28(%r13)
  movl   $0x0,0x30(%r13)
  mov    $0x1770,%esi
  mov    $0x16,%edi
  call   *%r15
  jmp    L4272
L278:
  mov    $0x7,%edi
  call   *%r12
  test   %eax,%eax
  jne    L1022
  movl   $0x0,0x198(%rbx)
  jmp    L1022
L2905:
  movl   $0x1,0x188(%rbx)
  movss  D237(%rip),%xmm0
  addss  0x0(%r13),%xmm0
  movss  0x4(%r13),%xmm1
  comiss %xmm0,%xmm1
  ja     L165
  jmp    L754
L3344:
  addss  D237(%rip),%xmm0
  comiss %xmm0,%xmm1
  jbe    L257
  cmpl   $0x1,0x198(%rbx)
  jne    L257
L165:
  movl   $0x0,0x188(%rbx)
  jmp    L754
L1268:
  movl   $0x1,0x18c(%rbx)
  movss  D237(%rip),%xmm0
  addss  0x8(%r13),%xmm0
  movss  0xc(%r13),%xmm1
  comiss %xmm0,%xmm1
  ja     L2922
  jmp    L133
L2489:
  addss  D237(%rip),%xmm0
  comiss %xmm0,%xmm1
  jbe    L2932
  cmpl   $0x1,0x19c(%rbx)
  jne    L2932
L2922:
  movl   $0x0,0x18c(%rbx)
  jmp    L133
L2407:
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L862
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L862
L1442:
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L862
L523:
  mov    $0x2,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1509
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L1509
L702:
  mov    $0x0,%edx
  mov    $0x2,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L1509
L36:
  mov    $0x2,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1358
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L1358
L2032:
  mov    $0x0,%edx
  mov    $0x2,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L1358
L1447:
  push   $0x3
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x12,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L1496
  push   $0x4
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x1e,%r8d
  mov    $0x17,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  je     L1827
L1496:
  cmpl   $0x3,0x190(%rbx)
  jle    L1839
L1827:
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1839
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
L1839:
  cmpl   $0x1,0x1b8(%rbx)
  je     L1784
  push   $0x3
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x12,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L2415
  push   $0x4
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x1e,%r8d
  mov    $0x17,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  je     L1784
L2415:
  push   $0x3
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x1e,%r8d
  mov    $0x17,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  je     L1784
  push   $0x4
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x7,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  je     L1784
  cmpl   $0x3,0x190(%rbx)
  jle    L3322
L1784:
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L3322
  mov    $0x1,%edx
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L3322
L478:
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L2321
L3866:
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L3322
  mov    $0x0,%edx
  mov    $0x3,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L3322
L2321:
  mov    $0x0,%edx
  mov    $0x4,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L3866
L2722:
  push   $0x3
  push   $0xff
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x7,%ecx
  mov    $0xff,%edx
  mov    $0xff,%esi
  mov    $0xff,%edi
  call   *0x98(%rsp)
  add    $0x10,%rsp
  test   %eax,%eax
  jne    L2251
L2641:
  mov    $0x1,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2251
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
L2251:
  mov    $0x1,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1401
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L1401
L2776:
  mov    $0x1,%esi
  mov    $0x7,%edi
  call   *%rbp
  cmp    $0x1,%eax
  je     L1934
L619:
  mov    $0x1,%esi
  mov    $0x2,%edi
  call   *%rbp
  cmp    $0x1,%eax
  jne    L1401
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L1401
L1934:
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L619
L1452:
  mov    $0x1,%esi
  mov    $0x3,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1807
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    $0x3,%edi
  call   *0x58(%rsp)
  jmp    L1807
L1224:
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    $0x3,%edi
  call   *0x58(%rsp)
  jmp    L1807
L3128:
  mov    $0x4,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1103
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L1103
L2819:
  mov    $0x0,%edx
  mov    $0x4,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L1103
L4173:
  mov    $0x2,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2351
  mov    $0x1,%edx
  mov    $0x2,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L2351
L694:
  mov    $0x0,%edx
  mov    $0x2,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L2351
L715:
  mov    $0x4,%esi
  mov    $0x2,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2809
  mov    $0x1,%edx
  mov    $0x4,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L2809
L2541:
  mov    $0x0,%edx
  mov    $0x4,%esi
  mov    $0x2,%edi
  call   *0x58(%rsp)
  jmp    L2809
L3883:
  mov    $0x3,%esi
  mov    $0x7,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L2846
  mov    $0x1,%edx
  mov    $0x3,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L2846
L1007:
  mov    $0x0,%edx
  mov    $0x3,%esi
  mov    $0x7,%edi
  call   *0x58(%rsp)
  jmp    L2846
L2437:
  mov    $0x3,%esi
  mov    $0x1,%edi
  call   *%rbp
  test   %eax,%eax
  jne    L1506
  mov    $0x1,%edx
  mov    $0x3,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L1506
L1157:
  mov    $0x0,%edx
  mov    $0x3,%esi
  mov    $0x1,%edi
  call   *0x58(%rsp)
  jmp    L1506
```

tool_calls: name: extract_symbolic_data
arguments: label: D237
type_infered: byte[4]
name: extract_symbolic_data
arguments: label: D654
type_infered: f64
name: extract_symbolic_data
arguments: label: D179
type_infered: byte[4]
name: extract_symbolic_data
arguments: label: D552
type_infered: f32
name: extract_symbolic_data
arguments: label: D269
type_infered: f64
name: extract_symbolic_data
arguments: label: D603
type_infered: f64
name: extract_symbolic_data
arguments: label: D213
type_infered: byte[4]
name: extract_symbolic_data
arguments: label: D567
type_infered: byte[4]
name: extract_symbolic_data
arguments: label: D295
type_infered: string
name: extract_symbolic_data
arguments: label: D149
type_infered: string
name: extract_symbolic_data
arguments: label: D134
type_infered: string
name: extract_symbolic_data
arguments: label: D90
type_infered: string
name: extract_symbolic_data
arguments: label: D286
type_infered: string
name: extract_symbolic_data
arguments: label: D330
type_infered: string
name: extract_symbolic_data
arguments: label: D657
type_infered: string
name: extract_symbolic_data
arguments: label: D145
type_infered: string
name: extract_symbolic_data
arguments: label: D655
type_infered: string
name: extract_symbolic_data
arguments: label: D631
type_infered: string
name: extract_symbolic_data
arguments: label: D551
type_infered: string

tool: {"D237": [0x00,0x00,0x80,0x3f]}

tool: D654: 0.02

tool: {"D179": [0x00,0x00,0x00,0x00]}

tool: D552: 0.0234375

tool: D269: 0.01

tool: D603: 327.67

tool: {"D213": [0x00,0x00,0x20,0x41]}

tool: {"D567": [0x00,0x00,0x20,0x42]}

tool: D295: 041F043E044104420430043D043E0432043A04300020043D04300020043E044504400430043D0443

tool: D149: +791........

tool: D134: 0422044004350432043E043304300021

tool: D90: 0422044004350432043E043304300021002004140432043804360435043D043804350020043200200433043E044104420438043D043D043E0439

tool: D286: 0422044004350432043E043304300021002004140432043804360435043D0438043500200432002004320430043D043D043E0439

tool: D330: 0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043E044004380434043E04400435

tool: D657: 0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043004310438043D043504420435

tool: D145: 0422044004350432043E043304300021002004140432043804360435043D043804350020043200200441043F0430043B044C043D0435

tool: D655: 0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043F043E0434002004320430043D043D043E0439

tool: D631: 0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043D0430002004410442043E044F043A0435

tool: D551: 0422044004350432043E0433043000210020041F0440043E044204350447043A04300020043D04300020043A04430445043D0435

assistant: ```c
void main(int *pTmpInt, float *pTmpFlt, int(*pInts), float(*pFloats), int(pKeyH), int(pKeyL), int (*pGetNodeVar)(unsigned short dev_addr, unsigned short reg_addr), int (*pSetNodeVar)(unsigned short dev_addr, unsigned short reg_addr, unsigned short val), int (*pGetTimer)(unsigned short TimerNum), int (*pSetTimer)(unsigned short TimerNum, int TimerVal), int (*pReceiveSMS)(const char *smsnum, const char *smstext, int *parInt, float *parFlt), int (*pSendSMS)(const char *smsnum, const char *smstext, int *parInt, float *parFlt), int (*pSendCom2)(const char *TxData, unsigned short TxLen, const char *RxData, unsigned short RxLen), int (*pTimeCmp)(unsigned char date, unsigned char month, unsigned char year, unsigned char hour, unsigned char minute, unsigned char second, unsigned char day, unsigned char act), float (*pSinf)(float _X), float (*pCosf)(float _X), float (*pLogf)(float _X), float (*pExpf)(float _X), float (*pPowf)(float _X1, float _X2), float (*pSqrtf)(float _X)) {
  int put2log[4] = {0, 0, 0, 0};
  int lastlog[4] = {0, 0, 0, 0};
  int *LogCounter = &pInts[300];
  int *GlobalInit = &pInts[97];
  int *Livingroom1ButtonPressed = &pInts[10];
  int *Livingroom2ButtonPressed = &pInts[11];
  int *Kitchen1ButtonPressed = &pInts[12];
  int *Kitchen2ButtonPressed = &pInts[13];
  int *ClosetButtonPressed = &pInts[14];
  int *CorridorButtonPressed = &pInts[15];
  int *BathroomButtonPressed = &pInts[16];
  int *StudyButtonPressed = &pInts[17];
  int *Bedroom1ButtonPressed = &pInts[18];
  int *Bedroom2ButtonPressed = &pInts[19];
  int *Bedroom3ButtonPressed = &pInts[20];
  int *Livingroom1LightSensorWorked = &pInts[80];
  int *CorridorMoveDetected = &pInts[81];
  int *BathroomFloorStatus = &pInts[98];
  int *KitchenFloorStatus = &pInts[99];
  int *GuardStatus = &pInts[100];
  int *BuzzerStatus = &pInts[101];
  int *BathroomFloorEnabled = &pInts[102];
  int *KitchenFloorEnabled = &pInts[103];
  int *Livingroom1LightStatus = &pInts[105];
  int *Livingroom2LightStatus = &pInts[106];
  int *Kitchen1LightStatus = &pInts[107];
  int *Kitchen2LightStatus = &pInts[108];
  int *ClosetLightStatus = &pInts[109];
  int *CorridorLightStatus = &pInts[110];
  int *CorridorLightStatusMove = &pInts[111];
  int *CorridorLightStatusMoveEnabled = &pInts[119];
  int *BathroomLightStatus = &pInts[112];
  int *BathroomLightStatusMove = &pInts[113];
  int *BathroomLightStatusMoveEnabled = &pInts[120];
  int *BathroomVentStatus = &pInts[114];
  int *StudyLightStatus = &pInts[115];
  int *Bedroom1LightStatus = &pInts[116];
  int *Bedroom2LightStatus = &pInts[117];
  int *Bedroom3LightStatus = &pInts[118];
  float *BathroomFloorTempExpected = &pFloats[0];
  float *BathroomFloorTempCurrent = &pFloats[1];
  float *KitchenFloorTempExpected = &pFloats[2];
  float *KitchenFloorTempCurrent = &pFloats[3];
  float *BathroomWaterSum1 = &pFloats[4];
  float *BathroomWaterAvg1 = &pFloats[5];
  float *BathroomWaterCount1 = &pFloats[6];
  float *BathroomWaterSum2 = &pFloats[7];
  float *BathroomWaterAvg2 = &pFloats[8];
  float *BathroomWaterCount2 = &pFloats[9];
  float *KitchenWaterSum = &pFloats[10];
  float *KitchenWaterAvg = &pFloats[11];
  float *KitchenWaterCount = &pFloats[12];
  float *LivingroomLightSum = &pFloats[13];
  float *LivingroomLightAvg = &pFloats[14];
  float *LivingroomLightCount = &pFloats[15];
  int KeyIgor = (pKeyH == 0 && pKeyL == 0) ? 1 : 0;
  int KeyOlga = (pKeyH == 0 && pKeyL == 0) ? 1 : 0;
  int KeyReserve = (pKeyH == 0 && pKeyL == 0) ? 1 : 0;
  if (*LogCounter > 0 && pInts[300] > 0) {
    lastlog[0] = pInts[300 + 1 + (*LogCounter - 1) * 4];
    lastlog[1] = pInts[300 + 1 + (*LogCounter - 1) * 4 + 1];
    lastlog[2] = pInts[300 + 1 + (*LogCounter - 1) * 4 + 2];
    lastlog[3] = pInts[300 + 1 + (*LogCounter - 1) * 4 + 3];
  }
  if ((*GlobalInit) == 0) {
    *CorridorLightStatusMoveEnabled = 1;
    *BathroomLightStatusMoveEnabled = 1;
    *BathroomFloorEnabled = 1;
    *KitchenFloorEnabled = 1;
    pSetTimer(7, 5000);
  }
  if ((pGetNodeVar(1, 10001) == 1) && *Livingroom1LightStatus == 0 && (*Livingroom1ButtonPressed == 0)) {
    *Livingroom1LightStatus = 1;
    *Livingroom1ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10001) == 1) && *Livingroom1LightStatus == 1 && (*Livingroom1ButtonPressed == 0)) {
    *Livingroom1LightStatus = 0;
    *Livingroom1ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10001) == 1) && *Livingroom2LightStatus == 0 && (*Livingroom2ButtonPressed == 0)) {
    *Livingroom2LightStatus = 1;
    *Livingroom2ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10001) == 1) && *Livingroom2LightStatus == 1 && (*Livingroom2ButtonPressed == 0)) {
    *Livingroom2LightStatus = 0;
    *Livingroom2ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10002) == 1) && *Kitchen1LightStatus == 0 && (*Kitchen1ButtonPressed == 0)) {
    *Kitchen1LightStatus = 1;
    *Kitchen1ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10002) == 1) && *Kitchen1LightStatus == 1 && (*Kitchen1ButtonPressed == 0)) {
    *Kitchen1LightStatus = 0;
    *Kitchen1ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10002) == 1) && *Kitchen2LightStatus == 0 && (*Kitchen2ButtonPressed == 0)) {
    *Kitchen2LightStatus = 1;
    *Kitchen2ButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10002) == 1) && *Kitchen2LightStatus == 1 && (*Kitchen2ButtonPressed == 0)) {
    *Kitchen2LightStatus = 0;
    *Kitchen2ButtonPressed = 1;
  }
  if ((pGetNodeVar(4, 10004) == 1) && *ClosetLightStatus == 0 && (*ClosetButtonPressed == 0)) {
    *ClosetLightStatus = 1;
    *ClosetButtonPressed = 1;
  }
  if ((pGetNodeVar(4, 10004) == 1) && *ClosetLightStatus == 1 && (*ClosetButtonPressed == 0)) {
    *ClosetLightStatus = 0;
    *ClosetButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10003) == 1) && *CorridorLightStatus == 0 && (*CorridorButtonPressed == 0)) {
    *CorridorLightStatus = 1;
    *CorridorButtonPressed = 1;
  }
  if ((pGetNodeVar(1, 10003) == 1) && *CorridorLightStatus == 1 && (*CorridorButtonPressed == 0)) {
    *CorridorLightStatus = 0;
    *CorridorButtonPressed = 1;
  }
  if ((pGetNodeVar(2, 10001) == 1) && *BathroomLightStatus == 0 && (*BathroomButtonPressed == 0)) {
    *BathroomLightStatus = 1;
    *BathroomButtonPressed = 1;
  }
  if ((pGetNodeVar(2, 10001) == 1) && *BathroomLightStatus == 1 && (*BathroomButtonPressed == 0)) {
    *BathroomLightStatus = 0;
    *BathroomButtonPressed = 1;
  }
  if ((pGetNodeVar(2, 10002) == 1) && *StudyLightStatus == 0 && (*StudyButtonPressed == 0)) {
    *StudyLightStatus = 1;
    *StudyButtonPressed = 1;
  }
  if ((pGetNodeVar(2, 10002) == 1) && *StudyLightStatus == 1 && (*StudyButtonPressed == 0)) {
    *StudyLightStatus = 0;
    *StudyButtonPressed = 1;
  }
  if ((pGetNodeVar(2, 10003) == 1) && *Bedroom1LightStatus == 0 && (*Bedroom1ButtonPressed == 0)) {
    *Bedroom1LightStatus = 1;
    *Bedroom1ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if ((pGetNodeVar(2, 10003) == 1) && *Bedroom1LightStatus == 1 && (*Bedroom1ButtonPressed == 0)) {
    *Bedroom1LightStatus = 0;
    *Bedroom1ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if (pGetTimer(6) == 0 && (*Bedroom2LightStatus == 1) && ((*Bedroom2ButtonPressed == 1) || (*Bedroom3ButtonPressed == 1))) {
    *Bedroom1LightStatus = 1;
    pSetTimer(6, -1);
  }
  if (pGetTimer(6) == 0 && (*Bedroom2LightStatus == 0) && ((*Bedroom2ButtonPressed == 1) || (*Bedroom3ButtonPressed == 1))) {
    *Bedroom1LightStatus = 0;
    pSetTimer(6, -1);
  }
  if ((pGetNodeVar(1, 10004) == 1) && *Bedroom2LightStatus == 0 && (*Bedroom2ButtonPressed == 0)) {
    *Bedroom2LightStatus = 1;
    *Bedroom2ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if ((pGetNodeVar(1, 10004) == 1) && *Bedroom2LightStatus == 1 && (*Bedroom2ButtonPressed == 0)) {
    *Bedroom2LightStatus = 0;
    *Bedroom2ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if (pGetTimer(6) == 0 && (*Bedroom1LightStatus == 1) && (*Bedroom2LightStatus == 0) && (*Bedroom1ButtonPressed == 1)) {
    *Bedroom2LightStatus = 1;
    pSetTimer(6, -1);
  }
  if (pGetTimer(6) == 0 && (*Bedroom1LightStatus == 0) && (*Bedroom2LightStatus == 1) && (*Bedroom1ButtonPressed == 1)) {
    *Bedroom2LightStatus = 0;
    pSetTimer(6, -1);
  }
  if ((pGetNodeVar(1, 10004) == 1) && *Bedroom3LightStatus == 0 && (*Bedroom3ButtonPressed == 0)) {
    *Bedroom3LightStatus = 1;
    *Bedroom3ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if ((pGetNodeVar(1, 10004) == 1) && *Bedroom3LightStatus == 1 && (*Bedroom3ButtonPressed == 0)) {
    *Bedroom3LightStatus = 0;
    *Bedroom3ButtonPressed = 1;
    pSetTimer(6, 70);
  }
  if (pGetTimer(6) == 0 && (*Bedroom1LightStatus == 1) && (*Bedroom3LightStatus == 0) && (*Bedroom1ButtonPressed == 1)) {
    *Bedroom3LightStatus = 1;
    pSetTimer(6, -1);
  }
  if (pGetTimer(6) == 0 && (*Bedroom1LightStatus == 0) && (*Bedroom3LightStatus == 1) && (*Bedroom1ButtonPressed == 1)) {
    *Bedroom3LightStatus = 0;
    pSetTimer(6, -1);
  }
  if ((pGetNodeVar(1, 10001) == 0)) {
    *Livingroom1ButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10001) == 0)) {
    *Livingroom2ButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10002) == 0)) {
    *Kitchen1ButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10002) == 0)) {
    *Kitchen2ButtonPressed = 0;
  }
  if ((pGetNodeVar(4, 10004) == 0)) {
    *ClosetButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10003) == 0)) {
    *CorridorButtonPressed = 0;
  }
  if ((pGetNodeVar(2, 10001) == 0)) {
    *BathroomButtonPressed = 0;
  }
  if ((pGetNodeVar(2, 10002) == 0)) {
    *StudyButtonPressed = 0;
  }
  if ((pGetNodeVar(2, 10003) == 0)) {
    *Bedroom1ButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10004) == 0)) {
    *Bedroom2ButtonPressed = 0;
  }
  if ((pGetNodeVar(1, 10004) == 0)) {
    *Bedroom3ButtonPressed = 0;
  }
  if (pGetTimer(23) == -1) {
    *LivingroomLightAvg = *LivingroomLightCount > 0 ? *LivingroomLightSum / (*LivingroomLightCount) * 0.0234375 : 0;
    *LivingroomLightSum = 0;
    *LivingroomLightCount = 0;
    pSetTimer(23, 6000);
  } else {
    *LivingroomLightSum += pGetNodeVar(1, 40001);
    (*LivingroomLightCount)++;
  }
  if (pTimeCmp(0xFF, 0xFF, 0xFF, 0, 0, 0, 0xFF, 1) == 0)
    *Livingroom1LightSensorWorked = 0;
  if (pTimeCmp(0xFF, 0xFF, 0xFF, 16, 0, 0, 0xFF, 3) == 0 && *GuardStatus == 0 && *Livingroom1LightSensorWorked == 0 && *LivingroomLightAvg < 0.02) {
    *Livingroom1LightSensorWorked = 1;
    *Livingroom1LightStatus = 1;
  }
  if ((pGetNodeVar(7, 10002) == 0)) {
    pSetTimer(10, 4000);
  }
  if ((pGetNodeVar(7, 10002) == 0) && (*BathroomLightStatusMove == 0) && (*BathroomLightStatusMoveEnabled == 1)) {
    *BathroomLightStatusMove = 1;
  }
  if ((*BathroomLightStatusMove == 1) && ((pGetTimer(10) == 0) || (*BathroomLightStatusMoveEnabled == 0))) {
    *BathroomLightStatusMove = 0;
  }
  if ((pGetNodeVar(7, 10003) == 0)) {
    pSetTimer(11, 3000);
    *CorridorMoveDetected = 1;
  }
  if ((pGetNodeVar(7, 10003) == 0) && (*CorridorLightStatusMove == 0) && (*CorridorLightStatusMoveEnabled == 1)) {
    *CorridorLightStatusMove = 1;
  }
  if ((*CorridorLightStatusMove == 1) && ((pGetTimer(11) == 0) || (*CorridorLightStatusMoveEnabled == 0))) {
    *CorridorLightStatusMove = 0;
  }
  if ((KeyIgor == 1 || KeyOlga == 1 || KeyReserve == 1) && *GuardStatus == 0 && (pGetTimer(0) == -1)) {
    *GuardStatus = 1;
  }
  if (*GuardStatus == 1) {
    if (pGetNodeVar(7, 10001) == 1 && pGetNodeVar(7, 10002) == 1 && pGetNodeVar(3, 10001) == 1 && pGetNodeVar(3, 10002) == 1) {
      pSetTimer(10, -1);
      *Livingroom1LightStatus = 0;
      *Livingroom2LightStatus = 0;
      *Kitchen1LightStatus = 0;
      *Kitchen2LightStatus = 0;
      *ClosetLightStatus = 0;
      *BathroomLightStatus = 0;
      *BathroomLightStatusMove = 0;
      *BathroomVentStatus = 0;
      *StudyLightStatus = 0;
      *Bedroom1LightStatus = 0;
      *Bedroom2LightStatus = 0;
      *Bedroom3LightStatus = 0;
      *GuardStatus = 2;
      pSetTimer(0, 3000);
      pSetTimer(1, 100);
      put2log[0] = 2;
      if (KeyIgor == 1)
        put2log[1] = 1;
      else if (KeyOlga == 1)
        put2log[1] = 2;
      else if (KeyReserve == 1)
        put2log[1] = 3;
      else
        put2log[1] = 0;
    } else {
      *GuardStatus = 0;
      pSetTimer(0, 300);
      pSetTimer(2, 160);
      put2log[0] = 1;
      if (pGetNodeVar(7, 10001) == 0)
        put2log[1] = 1;
      if (pGetNodeVar(7, 10002) == 0)
        put2log[1] = 2;
      if (pGetNodeVar(3, 10001) == 0)
        put2log[1] = 3;
      if (pGetNodeVar(3, 10002) == 0)
        put2log[1] = 4;
    }
  }
  if (pGetTimer(1) == 100)
    *BuzzerStatus = 1;
  if (pGetTimer(1) == 80)
    *BuzzerStatus = 0;
  if (pGetTimer(1) == 60)
    *BuzzerStatus = 1;
  if (pGetTimer(1) == 40)
    *BuzzerStatus = 0;
  if (pGetTimer(1) == 20)
    *BuzzerStatus = 1;
  if (pGetTimer(1) == 0)
    *BuzzerStatus = 0;
  if (pGetTimer(2) == 160)
    *BuzzerStatus = 1;
  if (pGetTimer(2) == 150)
    *BuzzerStatus = 0;
  if (pGetTimer(2) == 130)
    *BuzzerStatus = 1;
  if (pGetTimer(2) == 90)
    *BuzzerStatus = 0;
  if (pGetTimer(2) == 70)
    *BuzzerStatus = 1;
  if (pGetTimer(2) == 60)
    *BuzzerStatus = 0;
  if (pGetTimer(2) == 40)
    *BuzzerStatus = 1;
  if (pGetTimer(2) == 0)
    *BuzzerStatus = 0;
  if ((*GuardStatus == 2) && (pGetTimer(0) == -1)) {
    pSetTimer(11, -1);
    *CorridorLightStatus = 0;
    *CorridorLightStatusMove = 0;
    *GuardStatus = 3;
    pSetTimer(2, 50);
    if (lastlog[0] == 2 && lastlog[1] == 1)
      pSendSMS("+791........", "041F043E044104420430043D043E0432043A04300020043D04300020043E044504400430043D0443", ((void *)0x00000000), ((void *)0x00000000));
    else if (lastlog[0] == 2 && lastlog[1] == 2)
      pSendSMS("+791........", "041F043E044104420430043D043E0432043A04300020043D04300020043E044504400430043D0443", ((void *)0x00000000), ((void *)0x00000000));
    else if (lastlog[0] == 2)
      pSendSMS("+791........", "041F043E044104420430043D043E0432043A04300020043D04300020043E044504400430043D0443", ((void *)0x00000000), ((void *)0x00000000));
  }
  if ((KeyIgor == 1 || KeyOlga == 1 || KeyReserve == 1) && *GuardStatus >= 3) {
    *GuardStatus = 0;
    *BuzzerStatus = 0;
    pSetTimer(0, 300);
    pSetTimer(1, 110);
    put2log[0] = 3;
    if (KeyIgor == 1)
      put2log[1] = 1;
    else if (KeyOlga == 1)
      put2log[1] = 2;
    else if (KeyReserve == 1)
      put2log[1] = 3;
    else
      put2log[1] = 0;
  }
  if ((pGetNodeVar(7, 10001) == 0 || pGetNodeVar(7, 10002) == 0 || pGetNodeVar(7, 10003) == 0 || pGetNodeVar(3, 10001) == 0 || pGetNodeVar(3, 10002) == 0) && pGetTimer(0) == -1 && *GuardStatus == 3) {
    *GuardStatus = 4;
    pSetTimer(0, 1000);
    put2log[0] = 5;
    if (pGetNodeVar(7, 10001) == 0)
      put2log[1] = 1;
    if (pGetNodeVar(7, 10002) == 0)
      put2log[1] = 2;
    if (pGetNodeVar(7, 10003) == 0)
      put2log[1] = 3;
    if (pGetNodeVar(3, 10001) == 0)
      put2log[1] = 4;
    if (pGetNodeVar(3, 10002) == 0)
      put2log[1] = 5;
  }
  if (pGetNodeVar(4, 10001) == 1 || pGetNodeVar(4, 10002) == 1 || pGetNodeVar(4, 10003) == 1) {
    *GuardStatus = 4;
    pSetTimer(0, 1000);
    put2log[0] = 5;
    if (pGetNodeVar(4, 10002) == 1)
      put2log[1] = 6;
    if (pGetNodeVar(4, 10001) == 1)
      put2log[1] = 7;
    if (pGetNodeVar(4, 10003) == 1)
      put2log[1] = 8;
  }
  if ((pGetTimer(0) == -1) && (*GuardStatus == 4)) {
    *GuardStatus = 5;
    put2log[0] = 4;
    if (pGetNodeVar(7, 10001) == 0)
      put2log[1] = 1;
    else if (pGetNodeVar(7, 10002) == 0)
      put2log[1] = 2;
    else if (pGetNodeVar(7, 10003) == 0)
      put2log[1] = 3;
    else if (pGetNodeVar(3, 10001) == 0)
      put2log[1] = 4;
    else if (pGetNodeVar(3, 10002) == 0)
      put2log[1] = 5;
    else if (pGetNodeVar(4, 10002) == 1)
      put2log[1] = 6;
    else if (pGetNodeVar(4, 10001) == 1)
      put2log[1] = 7;
    else if (pGetNodeVar(4, 10003) == 1)
      put2log[1] = 8;
    else if (lastlog[0] == 5)
      put2log[1] = lastlog[1];
  }
  if ((pGetTimer(0) == -1) && (*GuardStatus == 5)) {
    pSetTimer(0, 120000);
  }
  if ((pGetTimer(0) == 119999) && (*GuardStatus == 5)) {
    if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 1) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D043804350020043200200433043E044104420438043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 2) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D0438043500200432002004320430043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 3) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043E044004380434043E04400435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 4) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043004310438043D043504420435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 5) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D043804350020043200200441043F0430043B044C043D0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 6) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043F043E0434002004320430043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 7) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043D0430002004410442043E044F043A0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 8) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A04300020043D04300020043A04430445043D0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if (lastlog[0] == 4 || lastlog[0] == 5) {
      pSendSMS("+791........", "0422044004350432043E043304300021", ((void *)0x00000000), ((void *)0x00000000));
    }
  }
  if ((pGetTimer(0) == 116999) && (*GuardStatus == 5)) {
    if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 1) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D043804350020043200200433043E044104420438043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 2) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D0438043500200432002004320430043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 3) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043E044004380434043E04400435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 4) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D04380435002004320020043A043004310438043D043504420435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 5) {
      pSendSMS("+791........", "0422044004350432043E043304300021002004140432043804360435043D043804350020043200200441043F0430043B044C043D0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 6) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043F043E0434002004320430043D043D043E0439", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 7) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A043000200432002004320430043D043D043E04390020043D0430002004410442043E044F043A0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if ((lastlog[0] == 4 || lastlog[0] == 5) && lastlog[1] == 8) {
      pSendSMS("+791........", "0422044004350432043E0433043000210020041F0440043E044204350447043A04300020043D04300020043A04430445043D0435", ((void *)0x00000000), ((void *)0x00000000));
    } else if (lastlog[0] == 4 || lastlog[0] == 5) {
      pSendSMS("+791........", "0422044004350432043E043304300021", ((void *)0x00000000), ((void *)0x00000000));
    }
  }
  if (*GuardStatus == 4) {
    if (pGetTimer(0) % 100 == 0)
      *BuzzerStatus = 1;
    if ((pGetTimer(0) - 50) % 100 == 0)
      *BuzzerStatus = 0;
  }
  if (*GuardStatus == 5 && pGetTimer(0) > 114000) {
    if (pGetTimer(0) % 300 == 0)
      *BuzzerStatus = 1;
    if ((pGetTimer(0) - 100) % 300 == 0)
      *BuzzerStatus = 0;
  } else if (*GuardStatus == 5 && *BuzzerStatus == 1) {
    *BuzzerStatus = 0;
  }
  if (pGetTimer(20) == -1) {
    *BathroomWaterAvg1 = *BathroomWaterCount1 > 0 ? *BathroomWaterSum1 / (*BathroomWaterCount1) * 0.0234375 : 0;
    *BathroomWaterSum1 = 0;
    *BathroomWaterCount1 = 0;
    pSetTimer(20, 6000);
  } else {
    *BathroomWaterSum1 += pGetNodeVar(2, 40002);
    (*BathroomWaterCount1)++;
  }
  if (pGetTimer(21) == -1) {
    *BathroomWaterAvg2 = *BathroomWaterCount2 > 0 ? *BathroomWaterSum2 / (*BathroomWaterCount2) * 0.0234375 : 0;
    *BathroomWaterSum2 = 0;
    *BathroomWaterCount2 = 0;
    pSetTimer(21, 6000);
  } else {
    *BathroomWaterSum2 += pGetNodeVar(2, 40003);
    (*BathroomWaterCount2)++;
  }
  if (pGetTimer(22) == -1) {
    *KitchenWaterAvg = *KitchenWaterCount > 0 ? *KitchenWaterSum / (*KitchenWaterCount) * 0.0234375 : 0;
    *KitchenWaterSum = 0;
    *KitchenWaterCount = 0;
    pSetTimer(22, 6000);
  } else {
    *KitchenWaterSum += pGetNodeVar(7, 40001);
    (*KitchenWaterCount)++;
  }
  *BathroomFloorTempCurrent = pGetNodeVar(5, 40001) * 0.01 - 327.67;
  if (*BathroomFloorTempCurrent <= 0 && pGetTimer(7) == 0)
    *BathroomFloorEnabled = 0;
  if (*BathroomFloorTempExpected < 10 || *BathroomFloorTempExpected > 40) {
    *BathroomFloorTempExpected = 30;
  }
  if (*BathroomFloorTempCurrent < *BathroomFloorTempExpected - 1 && *BathroomFloorEnabled == 1) {
    *BathroomFloorStatus = 1;
  }
  if (*BathroomFloorTempCurrent > *BathroomFloorTempExpected + 1 && *BathroomFloorEnabled == 1) {
    *BathroomFloorStatus = 0;
  }
  if (*BathroomFloorEnabled == 0) {
    *BathroomFloorStatus = 0;
  }
  *KitchenFloorTempCurrent = pGetNodeVar(6, 40001) * 0.01 - 327.67;
  if (*KitchenFloorTempCurrent < 10 && pGetTimer(7) == 0)
    *KitchenFloorEnabled = 0;
  if (*KitchenFloorTempExpected < 10 || *KitchenFloorTempExpected > 40) {
    *KitchenFloorTempExpected = 31;
  }
  if (*KitchenFloorTempCurrent < *KitchenFloorTempExpected - 1 && *KitchenFloorEnabled == 1) {
    *KitchenFloorStatus = 1;
  }
  if (*KitchenFloorTempCurrent > *KitchenFloorTempExpected + 1 && *KitchenFloorEnabled == 1) {
    *KitchenFloorStatus = 0;
  }
  if (*KitchenFloorEnabled == 0) {
    *KitchenFloorStatus = 0;
  }
  if (*Livingroom1LightStatus == 1) {
    if (pGetNodeVar(1, 1) == 0) {
      pSetNodeVar(1, 1, 1);
    }
  } else if (*Livingroom1LightStatus == 0) {
    if (pGetNodeVar(1, 1) == 1)
      pSetNodeVar(1, 1, 0);
  }
  if (*Kitchen1LightStatus == 1) {
    if (pGetNodeVar(1, 2) == 0)
      pSetNodeVar(1, 2, 1);
  } else if (*Kitchen1LightStatus == 0) {
    if (pGetNodeVar(1, 2) == 1)
      pSetNodeVar(1, 2, 0);
  }
  if (*ClosetLightStatus == 1) {
    if (pGetNodeVar(7, 2) == 0)
      pSetNodeVar(7, 2, 1);
  } else if (*ClosetLightStatus == 0) {
    if (pGetNodeVar(7, 2) == 1)
      pSetNodeVar(7, 2, 0);
  }
  if (*CorridorLightStatus == 1 || *CorridorLightStatusMove == 1) {
    if ((*CorridorLightStatus == 1 || pTimeCmp(0xFF, 0xFF, 0xFF, 18, 0, 0, 0xFF, 3) == 0 && pTimeCmp(0xFF, 0xFF, 0xFF, 23, 30, 0, 0xFF, 4) == 0 || *GuardStatus > 3) && pGetNodeVar(1, 4) == 0)
      pSetNodeVar(1, 4, 1);
    if ((*CorridorLightStatus == 1 || pTimeCmp(0xFF, 0xFF, 0xFF, 18, 0, 0, 0xFF, 3) == 0 && pTimeCmp(0xFF, 0xFF, 0xFF, 23, 30, 0, 0xFF, 4) == 0 || pTimeCmp(0xFF, 0xFF, 0xFF, 23, 30, 0, 0xFF, 3) == 0 || pTimeCmp(0xFF, 0xFF, 0xFF, 7, 0, 0, 0xFF, 4) == 0 || *GuardStatus > 3) && pGetNodeVar(2, 3) == 0)
      pSetNodeVar(2, 3, 1);
  } else if (*CorridorLightStatus == 0 && *CorridorLightStatusMove == 0) {
    if (pGetNodeVar(1, 4) == 1)
      pSetNodeVar(1, 4, 0);
    if (pGetNodeVar(2, 3) == 1)
      pSetNodeVar(2, 3, 0);
  }
  if (*BathroomLightStatus == 1 || *BathroomLightStatusMove == 1) {
    if ((*BathroomLightStatus == 1 || pTimeCmp(0xFF, 0xFF, 0xFF, 7, 0, 0, 0xFF, 3) == 0) && pGetNodeVar(7, 1) == 0)
      pSetNodeVar(7, 1, 1);
    if (pGetNodeVar(2, 1) == 0)
      pSetNodeVar(2, 1, 1);
  } else if (*BathroomLightStatus == 0 && *BathroomLightStatusMove == 0) {
    if (pGetNodeVar(7, 1) == 1)
      pSetNodeVar(7, 1, 0);
    if (pGetNodeVar(2, 1) == 1)
      pSetNodeVar(2, 1, 0);
  }
  if (*StudyLightStatus == 1) {
    if (pGetNodeVar(3, 1) == 0)
      pSetNodeVar(3, 1, 1);
  } else if (*StudyLightStatus == 0) {
    if (pGetNodeVar(3, 1) == 1)
      pSetNodeVar(3, 1, 0);
  }
  if (*Bedroom1LightStatus == 1) {
    if (pGetNodeVar(7, 4) == 0)
      pSetNodeVar(7, 4, 1);
  } else if (*Bedroom1LightStatus == 0) {
    if (pGetNodeVar(7, 4) == 1)
      pSetNodeVar(7, 4, 0);
  }
  if (*Bedroom2LightStatus == 1) {
    if (pGetNodeVar(2, 2) == 0)
      pSetNodeVar(2, 2, 1);
  } else if (*Bedroom2LightStatus == 0) {
    if (pGetNodeVar(2, 2) == 1)
      pSetNodeVar(2, 2, 0);
  }
  if (*BuzzerStatus == 1) {
    if (pGetNodeVar(2, 4) == 0)
      pSetNodeVar(2, 4, 1);
  } else if (*BuzzerStatus == 0) {
    if (pGetNodeVar(2, 4) == 1)
      pSetNodeVar(2, 4, 0);
  }
  if (*BathroomFloorStatus == 1) {
    if (pGetNodeVar(7, 3) == 0)
      pSetNodeVar(7, 3, 1);
  } else if (*BathroomFloorStatus == 0) {
    if (pGetNodeVar(7, 3) == 1)
      pSetNodeVar(7, 3, 0);
  }
  if (*KitchenFloorStatus == 1) {
    if (pGetNodeVar(1, 3) == 0)
      pSetNodeVar(1, 3, 1);
  } else if (*KitchenFloorStatus == 0) {
    if (pGetNodeVar(1, 3) == 1)
      pSetNodeVar(1, 3, 0);
  }
  if (put2log[0] > 0) {
    if (*LogCounter >= 20) {
      *LogCounter = 0;
    }
    pInts[300 + 1 + *LogCounter * 4] = put2log[0];
    pInts[300 + 1 + *LogCounter * 4 + 1] = put2log[1];
    pInts[300 + 1 + *LogCounter * 4 + 2] = put2log[2];
    pInts[300 + 1 + *LogCounter * 4 + 3] = put2log[3];
    *LogCounter = *LogCounter + 1;
  }
  if ((*GlobalInit) == 0) {
    *GlobalInit = 1;
  }
}
```