// File: /workspace/github_c_makefile_star2_O1/mcaimi[P]st/x.c
// Function: main
int
main(int argc, char *argv[])
{
  xw.l = xw.t = 0;
  xw.isfixed = False;
  xsetcursor(cursorshape);

  ARGBEGIN {
  case 'a':
    allowaltscreen = 0;
    break;
  case 'c':
    opt_class = EARGF(usage());
    break;
  case 'e':
    if (argc > 0)
      --argc, ++argv;
    goto run;
  case 'f':
    opt_font = EARGF(usage());
    break;
  case 'g':
    xw.gm = XParseGeometry(EARGF(usage()),
        &xw.l, &xw.t, &cols, &rows);
    geometryMode = CellGeometry;
    break;
  case 'G':
    xw.gm = XParseGeometry(EARGF(usage()),
        &xw.l, &xw.t, &width, &height);
    geometryMode = PixelGeometry;
    break;
  case 'i':
    xw.isfixed = 1;
    break;
  case 'o':
    opt_io = EARGF(usage());
    break;
  case 'l':
    opt_line = EARGF(usage());
    break;
  case 'n':
    opt_name = EARGF(usage());
    break;
  case 't':
  case 'T':
    opt_title = EARGF(usage());
    break;
  case 'w':
    opt_embed = EARGF(usage());
    break;
  case 'v':
    die("%s " VERSION "\n", argv0);
    break;
  default:
    usage();
  } ARGEND;

run:
  if (argc > 0) /* eat all remaining arguments */
    opt_cmd = argv;

  if (!opt_title && !opt_line)
    opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0];

  setlocale(LC_CTYPE, "");
  XSetLocaleModifiers("");

  if(!(xw.dpy = XOpenDisplay(NULL)))
    die("can't open display\n");

  config_init();
  switch (geometryMode) {
    case CellGeometry:
      xinit(cols, rows);
      break;
    case PixelGeometry:
      xinit(width, height);
      cols = (win.w - 2 * borderpx) / win.cw;
      rows = (win.h - 2 * borderpx) / win.ch;
      break;
  }
  cols = MAX(cols, 1);
  rows = MAX(rows, 1);
  tnew(cols, rows);
  signal(SIGUSR1, reload);
  xsetenv();
  selinit();
  run();

  /* free history */
  histfree();

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbp
movq $0x0, 0x12c42(%rip) # 0x20cf4
movl $0x0, 0x12c30(%rip)     # 0x20cec
movl 0xfd3e(%rip), %eax      # 0x1de00
cmpl $0x7, %eax
ja 0xe0cd
movl %eax, 0x12c6b(%rip)     # 0x20d38
movq (%rbp), %rax
movq %rax, 0x12cd8(%rip)     # 0x20db0
leaq 0x4af5(%rip), %r12      # 0x12bd4
leal -0x1(%rdi), %r15d
movq 0x8(%rbp), %rax
testq %rax, %rax
je 0xe416
cmpb $0x2d, (%rax)
jne 0xe416
movzbl 0x1(%rax), %ecx
cmpl $0x2d, %ecx
je 0xe10b
testl %ecx, %ecx
jne 0xe115
jmp 0xe416
cmpb $0x0, 0x2(%rax)
je 0xe3e4
leaq 0x8(%rbp), %rax
movq 0x8(%rbp), %rdi
movb 0x1(%rdi), %cl
movb $0x1, %dl
testb %cl, %cl
je 0xe3f3
movl $0x8, %ebx
xorl %r13d, %r13d
movl $0x2, %r14d
movzbl %cl, %ecx
leal -0x61(%rcx), %edx
cmpl $0x16, %edx
ja 0xe15b
movslq (%r12,%rdx,4), %rcx
addq %r12, %rcx
jmpq *%rcx
movl $0x0, 0xf43a(%rip)      # 0x1d590
jmp 0xe3bd
cmpl $0x47, %ecx
je 0xe363
cmpl $0x54, %ecx
jne 0xe19b
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe18f
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe18f
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12baa(%rip)     # 0x20d40
jmp 0xe3b7
movq 0x12c0e(%rip), %rdx     # 0x20db0
leaq 0x8fa4(%rip), %rdi      # 0x1714d
movq %rdx, %rsi
xorl %eax, %eax
callq 0x714f
jmp 0xe3bd
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe1de
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe1de
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12bb3(%rip)     # 0x20d98
jmp 0xe3b7
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe210
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe210
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12ba1(%rip)     # 0x20db8
jmp 0xe3b7
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe242
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe242
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12ab7(%rip)     # 0x20d00
jmp 0xe3b7
movl $0x1, 0x12a94(%rip)     # 0x20cec
jmp 0xe3bd
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe283
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe283
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12b46(%rip)     # 0x20dd0
jmp 0xe3b7
movq 0x12b1a(%rip), %rsi     # 0x20db0
leaq 0x8d31(%rip), %rdi      # 0x16fce
xorl %eax, %eax
callq 0x714f
jmp 0xe3bd
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe2cf
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe2cf
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
leaq 0x12a1e(%rip), %rsi     # 0x20cf4
leaq 0x12a1b(%rip), %rdx     # 0x20cf8
leaq 0xfb20(%rip), %rcx      # 0x1de04
leaq 0xfb1d(%rip), %r8       # 0x1de08
callq 0x6a60
movl %eax, 0x12a06(%rip)     # 0x20cfc
movb $0x0, 0x12ac3(%rip)     # 0x20dc0
jmp 0xe3b7
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe328
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe328
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12a71(%rip)     # 0x20da0
jmp 0xe3b7
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe35a
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe35a
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
movq %rdi, 0x12a67(%rip)     # 0x20dc8
jmp 0xe3b7
movb (%rdi,%r14), %cl
addq %r14, %rdi
testb %cl, %cl
jne 0xe389
cmpq $0x0, 0x8(%rax)
je 0xe9d4
testb %cl, %cl
jne 0xe389
decl %r15d
movq 0x8(%rbp,%rbx), %rdi
addq $0x8, %rbx
leaq 0x12964(%rip), %rsi     # 0x20cf4
leaq 0x12961(%rip), %rdx     # 0x20cf8
leaq 0xfa6e(%rip), %rcx      # 0x1de0c
leaq 0xfa6b(%rip), %r8       # 0x1de10
callq 0x6a60
movl %eax, 0x1294c(%rip)     # 0x20cfc
movb $0x1, 0x12a09(%rip)     # 0x20dc0
movl $0x1, %r13d
leaq (%rbx,%rbp), %rax
cmpq $0x8, %rbx
jne 0xe3e0
movq (%rbp,%rbx), %rdi
movb (%rdi,%r14), %cl
testb %cl, %cl
je 0xe3e0
incq %r14
testl %r13d, %r13d
je 0xe138
movb $0x1, %dl
jmp 0xe3f3
addq $0x10, %rbp
addl $-0x2, %edi
xorl %edx, %edx
movq %rbp, %rax
movl %edi, %r15d
movq %rax, %rbp
movl %r15d, %edi
testb %dl, %dl
jne 0xe0df
jmp 0xe41d
xorl %ecx, %ecx
testl %r15d, %r15d
setg %cl
leaq (%rax,%rcx,8), %rax
subl %ecx, %r15d
xorl %edx, %edx
jmp 0xe3f3
addq $0x8, %rbp
movq %rbp, %rax
testl %r15d, %r15d
jle 0xe429
movq %rax, 0x129af(%rip)     # 0x20dd8
movq 0x129a0(%rip), %rax     # 0x20dd0
orq 0x12909(%rip), %rax     # 0x20d40
jne 0xe458
movq 0x12998(%rip), %rax     # 0x20dd8
testq %rax, %rax
je 0xe44a
movq (%rax), %rax
jmp 0xe451
leaq 0x8aed(%rip), %rax      # 0x16f3e
movq %rax, 0x128e8(%rip)     # 0x20d40
leaq 0x93ff(%rip), %rbx      # 0x1785e
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6930
movq %rbx, %rdi
callq 0x6860
xorl %edi, %edi
callq 0x6310
movq %rax, 0x12749(%rip)     # 0x20bc8
testq %rax, %rax
jne 0xe492
leaq 0x8b4d(%rip), %rdi      # 0x16fd8
xorl %eax, %eax
callq 0x714f
callq 0xd876
cmpb $0x0, 0x12922(%rip)     # 0x20dc0
je 0xe4e5
movl 0xf966(%rip), %edi      # 0x1de0c
movl 0xf964(%rip), %esi      # 0x1de10
callq 0xe9f6
movl 0x12861(%rip), %eax     # 0x20d18
movl 0x12923(%rip), %ecx     # 0x20de0
addl %ecx, %ecx
subl %ecx, %eax
cltd
idivl 0x12864(%rip)           # 0x20d2c
movl %eax, 0xf936(%rip)      # 0x1de04
movl 0x12848(%rip), %eax     # 0x20d1c
subl %ecx, %eax
cltd
idivl 0x1284b(%rip)           # 0x20d28
movl %eax, 0xf925(%rip)      # 0x1de08
jmp 0xe4f6
movl 0xf919(%rip), %edi      # 0x1de04
movl 0xf917(%rip), %esi      # 0x1de08
callq 0xe9f6
movl 0xf908(%rip), %edi      # 0x1de04
cmpl $0x1, %edi
adcl $0x0, %edi
movl %edi, 0xf8fc(%rip)      # 0x1de04
movl 0xf8fa(%rip), %esi      # 0x1de08
cmpl $0x1, %esi
adcl $0x0, %esi
movl %esi, 0xf8ee(%rip)      # 0x1de08
callq 0x843f
leaq -0x9cb(%rip), %rsi      # 0xdb5b
movl $0xa, %edi
callq 0x6070
movq 0x126a1(%rip), %rcx     # 0x20bd8
leaq 0x8d66(%rip), %rdx      # 0x172a4
leaq 0xf0(%rsp), %rbx
movl $0x41, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60d0
leaq 0x8f15(%rip), %rdi      # 0x17471
movq %rbx, %rsi
movl $0x1, %edx
callq 0x65d0
callq 0x72b8
movl 0x127a3(%rip), %r15d    # 0x20d18
movl 0x127a1(%rip), %ebp     # 0x20d1c
movq 0x12646(%rip), %rdi     # 0x20bc8
callq 0x62c0
movl %eax, %r13d
movq 0x12637(%rip), %rdi     # 0x20bc8
movq %rbx, %rsi
callq 0x6460
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6370
movl 0xf0(%rsp), %ecx
movl %ecx, %edx
xorl $0x16, %edx
orl %eax, %edx
jne 0xe5c2
movl 0x12c(%rsp), %ebp
movl 0x128(%rsp), %r15d
cmpl $0x13, %ecx
jne 0xe58a
movq 0x12802(%rip), %rdi     # 0x20dd0
movq 0xef93(%rip), %rsi      # 0x1d568
movq 0x127ec(%rip), %rdx     # 0x20dc8
movq 0x127f5(%rip), %rcx     # 0x20dd8
callq 0x795b
movl %r15d, %edi
movq %rax, %r15
movl %ebp, %esi
callq 0xdf4d
leal 0x3f(%r15), %eax
testl %r15d, %r15d
cmovnsl %r15d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r15d, %ecx
subl %edx, %ecx
movl $0x1, %ebp
movl $0x1, %r12d
shlq %cl, %r12
sarl $0x6, %eax
leal 0x3f(%r13), %edx
testl %r13d, %r13d
cmovnsl %r13d, %edx
movl %edx, %esi
andl $-0x40, %esi
movl %r13d, %ecx
subl %esi, %ecx
shlq %cl, %rbp
movslq %eax, %r14
sarl $0x6, %edx
movslq %edx, %rbx
cmpl %r15d, %r13d
cmovgl %r13d, %r15d
incl %r15d
movsd 0x8612(%rip), %xmm0     # 0x16c60
leaq 0xf0(%rsp), %r13
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq %r15, 0x48(%rsp)
movq %rbp, 0x40(%rsp)
movl $0x0, 0xc(%rsp)
movapd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
orq %r12, 0x70(%rsp,%r14,8)
orq %rbp, 0x70(%rsp,%rbx,8)
movq 0x124ee(%rip), %rdi     # 0x20bc8
callq 0x6a30
testl %eax, %eax
jne 0xe6f4
xorl %eax, %eax
callq 0x7e37
movapd 0x10(%rsp), %xmm1
testl %eax, %eax
je 0xe6f8
xorpd %xmm1, %xmm1
movapd %xmm1, %xmm0
divsd 0x8574(%rip), %xmm0     # 0x16c78
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rax, 0x60(%rsp)
mulsd 0x8562(%rip), %xmm0     # 0x16c80
addsd %xmm1, %xmm0
mulsd 0x38de(%rip), %xmm0     # 0x12008
cvttsd2si %xmm0, %rax
movapd %xmm1, 0x10(%rsp)
ucomisd 0x8533(%rip), %xmm1     # 0x16c70
movq %rax, 0x68(%rsp)
movl $0x0, %r8d
leaq 0x60(%rsp), %rax
cmovaeq %rax, %r8
movl %r15d, %edi
leaq 0x70(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x6340
testl %eax, %eax
jns 0xe78f
callq 0x6620
movl (%rax), %edi
cmpl $0x4, %edi
je 0xe680
callq 0x64b0
leaq 0x4085(%rip), %rdi      # 0x1280a
movq %rax, %rsi
xorl %eax, %eax
callq 0x714f
movl $0x1, %edi
leaq 0x20(%rsp), %rsi
callq 0x6150
movb $0x1, %r15b
testq %r12, 0x70(%rsp,%r14,8)
jne 0xe7b5
xorl %eax, %eax
callq 0x7e37
testl %eax, %eax
setne %r15b
testb %r15b, %r15b
je 0xe7bf
callq 0x7e3f
movq 0x12402(%rip), %rdi     # 0x20bc8
callq 0x6a30
movl %eax, %ebp
testl %eax, %eax
je 0xe821
movq 0x123f0(%rip), %rdi     # 0x20bc8
movq %r13, %rsi
callq 0x6460
movq %r13, %rdi
xorl %esi, %esi
callq 0x6370
testl %eax, %eax
jne 0xe813
movslq 0xf0(%rsp), %rax
movabsq $0xd2fbb698b, %rcx      # imm = 0xD2FBB698B
btq %rax, %rcx
jb 0xe813
movq %r13, %rdi
leaq 0xca40(%rip), %rcx      # 0x1b250
callq *(%rcx,%rax,8)
movq 0x123ae(%rip), %rdi     # 0x20bc8
callq 0x6a30
jmp 0xe7cd
testl %ebp, %ebp
sete %al
notb %r15b
testb %al, %r15b
jne 0xe8c4
cmpl $0x0, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x58(%rsp), %rdx
cmoveq %rcx, %rdx
movq 0x50(%rsp), %rsi
cmoveq %rax, %rsi
movq %rsi, 0x50(%rsp)
subq %rsi, %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rdx, 0x58(%rsp)
subq %rdx, %rcx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
movsd 0xf59e(%rip), %xmm2     # 0x1de20
divsd 0x377e(%rip), %xmm1     # 0x12008
addsd %xmm0, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
mulsd 0xf576(%rip), %xmm0     # 0x1de18
movl $0x1, 0xc(%rsp)
ucomisd 0x83be(%rip), %xmm0     # 0x16c70
movq 0x48(%rsp), %r15
movq 0x40(%rsp), %rbp
ja 0xe67a
jmp 0xe8ce
movq 0x48(%rsp), %r15
movq 0x40(%rsp), %rbp
movl 0xf560(%rip), %edi      # 0x1de34
callq 0x70ac
testl %eax, %eax
je 0xe8ea
movsd 0xf533(%rip), %xmm0     # 0x1de18
jmp 0xe67a
cmpl $0x0, 0xf537(%rip)      # 0x1de28
je 0xe960
movl $0x10, %edi
callq 0x8381
testl %eax, %eax
je 0xe960
movl 0xf521(%rip), %eax      # 0x1de28
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq 0x30(%rsp), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
subq 0x38(%rsp), %rcx
xorps %xmm2, %xmm2
cvtsi2sd %rcx, %xmm2
divsd 0x36c6(%rip), %xmm2     # 0x12008
addsd %xmm1, %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm3, %xmm1
jae 0xe96a
movapd %xmm3, 0x10(%rsp)
jmp 0xe9b8
movsd 0x82f8(%rip), %xmm0     # 0x16c60
jmp 0xe9b2
xorpd 0x833e(%rip), %xmm3     # 0x16cb0
ucomisd %xmm0, %xmm3
jbe 0xe97f
orb $0x8, 0x123b6(%rip)     # 0x20d35
xorb $0x8, 0x123af(%rip)     # 0x20d35
movl $0x10, %edi
callq 0x83d6
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0xf47e(%rip), %eax      # 0x1de28
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movapd %xmm0, 0x10(%rsp)
callq 0x9215
movq 0x12204(%rip), %rdi     # 0x20bc8
callq 0x6630
movapd 0x10(%rsp), %xmm0
jmp 0xe672
callq 0xe9de
callq 0x6130