// File: jkingan[P]ladyheather/heathgps.cpp
// Function: parse_venus_sawtooth()
void parse_venus_sawtooth()
{
int mode;
int survey_len;
float sawtooth;
float sdev1;
float sdev2;

  have_venus_timing |= 0x01;
  config_venus_timing();
  saw_timing_msg |= 0x08;

  if(get_msg_field()) {
     mode = atoi(msg_field);

     if(mode == 0) { // PVT mode
        minor_alarms &= (~MINOR_SURVEY);
        venus_hold_mode = 0;
        rcvr_mode = RCVR_MODE_3D;
     }
     else if(mode == 1) {  // surveying
        minor_alarms |= (MINOR_SURVEY);
        venus_hold_mode = 0;
        rcvr_mode = RCVR_MODE_SURVEY;
     }
     else if(mode == 2) {  // position hold
        minor_alarms &= (~MINOR_SURVEY);
        venus_hold_mode = 1;
        rcvr_mode = RCVR_MODE_HOLD;
     }
  }

  if(get_msg_field()) {
     survey_len = atoi(msg_field);
  }

  if(get_msg_field()) {
     sawtooth = (float) atof(msg_field);
     have_sawtooth = 1;

     if(lte_lite) ;   // we show dac voltage instead of sawtooth
     else {
        dac_voltage = sawtooth;
     }
  }

  if(get_msg_field()) {
     sdev1 = (float) atof(msg_field);
  }

  if(get_msg_field()) {
     sdev2 = (float) atof(msg_field);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x2e9fc9(%rip), %rax    # 0x39cfd8
movl (%rax), %ecx
orl $0x1, %ecx
leaq 0x2e9fbd(%rip), %rax    # 0x39cfd8
movl %ecx, (%rax)
callq 0xb2f30
leaq 0x2b95df(%rip), %rax    # 0x36c608
movl (%rax), %ecx
orl $0x8, %ecx
leaq 0x2b95d3(%rip), %rax    # 0x36c608
movl %ecx, (%rax)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb30eb
leaq 0x2e7bd4(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0xb3085
leaq 0x2b9357(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $-0x21, %ecx
leaq 0x2b934b(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x2b923d(%rip), %rax    # 0x36c2b3
movb $0x0, (%rax)
leaq 0x2b9230(%rip), %rax    # 0x36c2b0
movb $0x4, (%rax)
jmp 0xb30e9
cmpl $0x1, -0x4(%rbp)
jne 0xb30b6
leaq 0x2b9326(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
orl $0x20, %ecx
leaq 0x2b931a(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x2b920c(%rip), %rax    # 0x36c2b3
movb $0x0, (%rax)
leaq 0x2b91ff(%rip), %rax    # 0x36c2b0
movb $0xb, (%rax)
jmp 0xb30e7
cmpl $0x2, -0x4(%rbp)
jne 0xb30e5
leaq 0x2b92f5(%rip), %rax    # 0x36c3b8
movl (%rax), %ecx
andl $-0x21, %ecx
leaq 0x2b92e9(%rip), %rax    # 0x36c3b8
movl %ecx, (%rax)
leaq 0x2b91db(%rip), %rax    # 0x36c2b3
movb $0x1, (%rax)
leaq 0x2b91ce(%rip), %rax    # 0x36c2b0
movb $0x7, (%rax)
jmp 0xb30e7
jmp 0xb30e9
jmp 0xb30eb
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb3104
leaq 0x2e7b24(%rip), %rdi    # 0x39ac20
callq 0x95c0
movl %eax, -0x8(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb3154
leaq 0x2e7b0b(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
leaq 0x2b947a(%rip), %rax    # 0x36c5a4
movl $0x1, (%rax)
leaq 0x1c7079(%rip), %rax    # 0x27a1b0
cmpl $0x0, (%rax)
je 0xb313e
jmp 0xb3152
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2b8a92(%rip), %rax    # 0x36bbe0
movsd %xmm0, (%rax)
jmp 0xb3154
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb3173
leaq 0x2e7abb(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
callq 0xb0bd0
cmpl $0x0, %eax
je 0xb3192
leaq 0x2e7a9c(%rip), %rdi    # 0x39ac20
callq 0x9480
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)