// File: 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
subq $0x10, %rsp
leaq 0x354141(%rip), %rdi    # 0x39e4c0
movl $0x2e, %esi
callq 0x9100
cmpq $0x0, %rax
jne 0x4a3a2
leaq 0x35412a(%rip), %rdi    # 0x39e4c0
leaq 0x1383c3(%rip), %rsi    # 0x182760
callq 0x96a0
leaq 0x354117(%rip), %rdi    # 0x39e4c0
leaq 0x13a29b(%rip), %rsi    # 0x18464b
callq 0x9b20
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x4a3ed
leaq 0x351039(%rip), %rdi    # 0x39b400
leaq 0x12f89c(%rip), %rsi    # 0x179c6a
leaq 0x3540eb(%rip), %rdx    # 0x39e4c0
movb $0x0, %al
callq 0x9060
leaq 0x35101d(%rip), %rdi    # 0x39b400
callq 0x30d60
jmp 0x4a618
movq -0x8(%rbp), %rdi
leaq 0x22ff08(%rip), %rax    # 0x27a300
movsd (%rax), %xmm0
leaq 0x12fd94(%rip), %rsi    # 0x17a197
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fee3(%rip), %rax    # 0x27a2f8
movsd (%rax), %xmm0
leaq 0x12fd91(%rip), %rsi    # 0x17a1b1
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22febe(%rip), %rax    # 0x27a2f0
movsd (%rax), %xmm0
leaq 0x12fd8f(%rip), %rsi    # 0x17a1cc
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22feb9(%rip), %rax    # 0x27a308
movsd (%rax), %xmm0
leaq 0x12fd8c(%rip), %rsi    # 0x17a1e6
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe74(%rip), %rax    # 0x27a2e0
movsd (%rax), %xmm0
leaq 0x12fd8a(%rip), %rsi    # 0x17a201
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe4f(%rip), %rax    # 0x27a2d8
movsd (%rax), %xmm0
leaq 0x12fd86(%rip), %rsi    # 0x17a21a
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe2a(%rip), %rax    # 0x27a2d0
movsd (%rax), %xmm0
leaq 0x12fd83(%rip), %rsi    # 0x17a234
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe25(%rip), %rax    # 0x27a2e8
movsd (%rax), %xmm0
leaq 0x12fd7f(%rip), %rsi    # 0x17a24d
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe38(%rip), %rax    # 0x27a318
movsd (%rax), %xmm0
leaq 0x12fd7c(%rip), %rsi    # 0x17a267
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe13(%rip), %rax    # 0x27a310
movsd (%rax), %xmm0
leaq 0x12fd78(%rip), %rsi    # 0x17a280
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fe06(%rip), %rax    # 0x27a320
movsd (%rax), %xmm0
leaq 0x12fd75(%rip), %rsi    # 0x17a29a
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fdf1(%rip), %rax    # 0x27a328
movsd (%rax), %xmm0
leaq 0x12fd70(%rip), %rsi    # 0x17a2b2
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x22fddc(%rip), %rax    # 0x27a330
movsd (%rax), %xmm0
leaq 0x12fd6b(%rip), %rsi    # 0x17a2ca
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x321a4f(%rip), %rax    # 0x36bfc0
movsd (%rax), %xmm0
leaq 0x12fd63(%rip), %rsi    # 0x17a2df
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x321a3a(%rip), %rax    # 0x36bfc8
movsd (%rax), %xmm0
leaq 0x12fd6a(%rip), %rsi    # 0x17a303
movb $0x1, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x321a49(%rip), %rax    # 0x36bff4
movzbl (%rax), %edx
leaq 0x12fd72(%rip), %rsi    # 0x17a327
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x321ae9(%rip), %rax    # 0x36c0b0
movl (%rax), %edx
leaq 0x12fd77(%rip), %rsi    # 0x17a347
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x321a0e(%rip), %rax    # 0x36bff0
movzbl (%rax), %edx
leaq 0x12fd7b(%rip), %rsi    # 0x17a367
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
leaq 0x3219f3(%rip), %rax    # 0x36bff1
movzbl (%rax), %edx
leaq 0x12fd81(%rip), %rsi    # 0x17a389
movb $0x0, %al
callq 0x9550
movq -0x8(%rbp), %rdi
callq 0x9380
addq $0x10, %rsp
popq %rbp
retq
nop