// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: write_luxor_config()
void write_luxor_config()
{
FILE *file;

   if(!strchr(edit_buffer, '.')) strcat(edit_buffer, ".scr");

   file = topen(edit_buffer, "w");
   if(file == 0) {
      sprintf(out, "ERROR: could not write file: %s", edit_buffer);
      edit_error(out);
      return;
   }

   fprintf(file, "PL %f  ;BATT low voltage\n", batt_lvc);
   fprintf(file, "PH %f  ;BATT high voltage\n", batt_hvc);
   fprintf(file, "PC %f  ;BATT overcurrent\n", batt_ovc);
   fprintf(file, "PW %f  ;BATT over-wattage\n", batt_watts);
   fprintf(file, "PU %f  ;LED low voltage\n", load_lvc);
   fprintf(file, "PV %f  ;LED high voltage\n", load_hvc);
   fprintf(file, "PO %f  ;LED overcurrent\n", load_ovc);
   fprintf(file, "PP %f  ;LED over-wattage\n", load_watts);
   fprintf(file, "PZ %f  ;AUX low voltage\n", auxv_lvc);
   fprintf(file, "PX %f  ;AUX high voltage\n", auxv_hvc);
   fprintf(file, "PT %f  ;TEMP1 overtemp\n", tc1_ovt);
   fprintf(file, "PS %f  ;TEMP2 overtemp\n", tc2_ovt);
   fprintf(file, "PM %f  ;Msg timeout\n", msg_timeout);
   fprintf(file, "&E %f  ;IR1 temp sensor emissivity\n", emis1);
   fprintf(file, "&I %f  ;IR2 temp sensor emissivity\n", emis2);
   fprintf(file, "BP %-2d   ;BATT pwm resolution\n", batt_pwm_res);
   fprintf(file, "BR %-2d   ;BATT pwm sweep rate\n", sweep_rate);
   fprintf(file, "&L %-3d  ;LUX sensor sensitivity\n", lux1_time);
   fprintf(file, "&U %-3d  ;LUMEN sensor sensitivity\n", lux2_time);
   fclose(file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x30a8a4(%rip), %rbx    # 0x33f2e0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x9100
testq %rax, %rax
jne 0x34a62
movq %rbx, %rdi
callq 0x9120
movl $0x7263732e, (%rbx,%rax) # imm = 0x7263732E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x30a877(%rip), %rdi    # 0x33f2e0
leaq 0xec94b(%rip), %rsi     # 0x1213bb
callq 0x9a47
testq %rax, %rax
je 0x34c9e
movq %rax, %rbx
leaq 0x1e6698(%rip), %rax    # 0x21b120
movsd (%rax), %xmm0
leaq 0xe0d57(%rip), %rsi     # 0x1157ea
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6674(%rip), %rax    # 0x21b118
movsd (%rax), %xmm0
leaq 0xe0d55(%rip), %rsi     # 0x115804
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6650(%rip), %rax    # 0x21b110
movsd (%rax), %xmm0
leaq 0xe0d54(%rip), %rsi     # 0x11581f
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e664c(%rip), %rax    # 0x21b128
movsd (%rax), %xmm0
leaq 0xe0d52(%rip), %rsi     # 0x115839
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6608(%rip), %rax    # 0x21b100
movsd (%rax), %xmm0
leaq 0xe0d51(%rip), %rsi     # 0x115854
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65e4(%rip), %rax    # 0x21b0f8
movsd (%rax), %xmm0
leaq 0xe0d4e(%rip), %rsi     # 0x11586d
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65c0(%rip), %rax    # 0x21b0f0
movsd (%rax), %xmm0
leaq 0xe0d4c(%rip), %rsi     # 0x115887
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65bc(%rip), %rax    # 0x21b108
movsd (%rax), %xmm0
leaq 0xe0d49(%rip), %rsi     # 0x1158a0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65d0(%rip), %rax    # 0x21b138
movsd (%rax), %xmm0
leaq 0xe0d47(%rip), %rsi     # 0x1158ba
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65ac(%rip), %rax    # 0x21b130
movsd (%rax), %xmm0
leaq 0xe0d44(%rip), %rsi     # 0x1158d3
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e65a0(%rip), %rax    # 0x21b140
movsd (%rax), %xmm0
leaq 0xe0d42(%rip), %rsi     # 0x1158ed
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e658c(%rip), %rax    # 0x21b148
movsd (%rax), %xmm0
leaq 0xe0d3e(%rip), %rsi     # 0x115905
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6578(%rip), %rax    # 0x21b150
movsd (%rax), %xmm0
leaq 0xe0d3a(%rip), %rsi     # 0x11591d
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d81ec(%rip), %rax    # 0x30cde0
movsd (%rax), %xmm0
leaq 0xe0d33(%rip), %rsi     # 0x115932
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d81d8(%rip), %rax    # 0x30cde8
movsd (%rax), %xmm0
leaq 0xe0d3b(%rip), %rsi     # 0x115956
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d81e8(%rip), %rax    # 0x30ce14
movzbl (%rax), %edx
leaq 0xe0d44(%rip), %rsi     # 0x11597a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d8289(%rip), %rax    # 0x30ced0
movl (%rax), %edx
leaq 0xe0d4a(%rip), %rsi     # 0x11599a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d81af(%rip), %rax    # 0x30ce10
movzbl (%rax), %edx
leaq 0xe0d4f(%rip), %rsi     # 0x1159ba
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d8195(%rip), %rax    # 0x30ce11
movzbl (%rax), %edx
leaq 0xe0d56(%rip), %rsi     # 0x1159dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9370
leaq 0x30757b(%rip), %rbx    # 0x33c220
leaq 0xe0622(%rip), %rsi     # 0x1152ce
leaq 0x30a62d(%rip), %rdx    # 0x33f2e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x23027