// File: /workspace/github_cpp_makefile_star2_O1/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 0x30a9c1(%rip), %rbx    # 0x33f2e0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x9100
testq %rax, %rax
jne 0x34945
movq %rbx, %rdi
callq 0x9120
movl $0x7263732e, (%rbx,%rax) # imm = 0x7263732E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x30a994(%rip), %rdi    # 0x33f2e0
leaq 0xec988(%rip), %rsi     # 0x1212db
callq 0x9a4d
testq %rax, %rax
je 0x34b81
movq %rax, %rbx
leaq 0x1e67b5(%rip), %rax    # 0x21b120
movsd (%rax), %xmm0
leaq 0xe0de0(%rip), %rsi     # 0x115756
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6791(%rip), %rax    # 0x21b118
movsd (%rax), %xmm0
leaq 0xe0dde(%rip), %rsi     # 0x115770
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e676d(%rip), %rax    # 0x21b110
movsd (%rax), %xmm0
leaq 0xe0ddd(%rip), %rsi     # 0x11578b
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6769(%rip), %rax    # 0x21b128
movsd (%rax), %xmm0
leaq 0xe0ddb(%rip), %rsi     # 0x1157a5
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6725(%rip), %rax    # 0x21b100
movsd (%rax), %xmm0
leaq 0xe0dda(%rip), %rsi     # 0x1157c0
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6701(%rip), %rax    # 0x21b0f8
movsd (%rax), %xmm0
leaq 0xe0dd7(%rip), %rsi     # 0x1157d9
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66dd(%rip), %rax    # 0x21b0f0
movsd (%rax), %xmm0
leaq 0xe0dd5(%rip), %rsi     # 0x1157f3
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66d9(%rip), %rax    # 0x21b108
movsd (%rax), %xmm0
leaq 0xe0dd2(%rip), %rsi     # 0x11580c
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66ed(%rip), %rax    # 0x21b138
movsd (%rax), %xmm0
leaq 0xe0dd0(%rip), %rsi     # 0x115826
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66c9(%rip), %rax    # 0x21b130
movsd (%rax), %xmm0
leaq 0xe0dcd(%rip), %rsi     # 0x11583f
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66bd(%rip), %rax    # 0x21b140
movsd (%rax), %xmm0
leaq 0xe0dcb(%rip), %rsi     # 0x115859
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e66a9(%rip), %rax    # 0x21b148
movsd (%rax), %xmm0
leaq 0xe0dc7(%rip), %rsi     # 0x115871
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x1e6695(%rip), %rax    # 0x21b150
movsd (%rax), %xmm0
leaq 0xe0dc3(%rip), %rsi     # 0x115889
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d8309(%rip), %rax    # 0x30cde0
movsd (%rax), %xmm0
leaq 0xe0dbc(%rip), %rsi     # 0x11589e
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d82f5(%rip), %rax    # 0x30cde8
movsd (%rax), %xmm0
leaq 0xe0dc4(%rip), %rsi     # 0x1158c2
movq %rbx, %rdi
movb $0x1, %al
callq 0x9560
leaq 0x2d8305(%rip), %rax    # 0x30ce14
movzbl (%rax), %edx
leaq 0xe0dcd(%rip), %rsi     # 0x1158e6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d83a6(%rip), %rax    # 0x30ced0
movl (%rax), %edx
leaq 0xe0dd3(%rip), %rsi     # 0x115906
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d82cc(%rip), %rax    # 0x30ce10
movzbl (%rax), %edx
leaq 0xe0dd8(%rip), %rsi     # 0x115926
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
leaq 0x2d82b2(%rip), %rax    # 0x30ce11
movzbl (%rax), %edx
leaq 0xe0ddf(%rip), %rsi     # 0x115948
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9560
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9370
leaq 0x307698(%rip), %rbx    # 0x33c220
leaq 0xe06ab(%rip), %rsi     # 0x11523a
leaq 0x30a74a(%rip), %rdx    # 0x33f2e0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2326e