// File: /workspace/github_c_makefile_star2_O3/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
movl %edi, %ebx
movq $0x0, 0x12657(%rip) # 0x20cf4
movl $0x0, 0x12645(%rip)     # 0x20cec
movl 0xf753(%rip), %eax      # 0x1de00
cmpl $0x7, %eax
ja 0xe6b8
movl %eax, 0x12680(%rip)     # 0x20d38
movq (%rsi), %rax
movq %rax, 0x126ee(%rip)     # 0x20db0
leal -0x1(%rbx), %eax
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
je 0xea30
leaq 0x1261f(%rip), %r15     # 0x20cf8
leaq 0x4518(%rip), %r13      # 0x12bf8
movq %rsi, %r12
cmpb $0x2d, (%rdi)
jne 0xea2d
movzbl 0x1(%rdi), %ecx
cmpl $0x2d, %ecx
je 0xe6fe
testl %ecx, %ecx
jne 0xe708
jmp 0xea2d
cmpb $0x0, 0x2(%rdi)
je 0xefe9
leaq 0x8(%r12), %rsi
movl $0x2, %ebp
movl %eax, %ebx
movzbl %cl, %eax
leal -0x61(%rax), %ecx
cmpl $0x16, %ecx
ja 0xe738
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x0, 0xee5d(%rip)      # 0x1d590
jmp 0xe7fc
cmpl $0x47, %eax
je 0xe851
cmpl $0x54, %eax
jne 0xe75e
cmpb $0x0, (%rdi,%rbp)
je 0xe869
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe881
movq 0x1264b(%rip), %rdx     # 0x20db0
leaq 0x8a01(%rip), %rdi      # 0x1716d
movq %rdx, %rsi
xorl %eax, %eax
callq 0x714f
jmp 0xe7fc
cmpb $0x0, (%rdi,%rbp)
je 0xe88d
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe8a5
cmpb $0x0, (%rdi,%rbp)
je 0xe8b1
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe8c9
cmpb $0x0, (%rdi,%rbp)
je 0xe8d5
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe8ed
movl $0x1, 0x1251f(%rip)     # 0x20cec
jmp 0xe7fc
cmpb $0x0, (%rdi,%rbp)
je 0xe8f9
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe911
movq 0x125c2(%rip), %rsi     # 0x20db0
leaq 0x87f9(%rip), %rdi      # 0x16fee
xorl %eax, %eax
callq 0x714f
movb $0x1, %al
movl $0x8, %r14d
jmp 0xe9ea
cmpb $0x0, (%rdi,%rbp)
je 0xe91d
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe935
cmpb $0x0, (%rdi,%rbp)
je 0xe964
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe97c
cmpb $0x0, (%rdi,%rbp)
je 0xe985
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe99d
cmpb $0x0, (%rdi,%rbp)
je 0xe9a6
addq %rbp, %rdi
movl $0x8, %r14d
jmp 0xe9be
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x124b8(%rip)     # 0x20d40
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x124ec(%rip)     # 0x20d98
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x124e8(%rip)     # 0x20db8
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x1240c(%rip)     # 0x20d00
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x124b8(%rip)     # 0x20dd0
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
leaq 0x123b8(%rip), %rsi     # 0x20cf4
movq %r15, %rdx
leaq 0xf4be(%rip), %rcx      # 0x1de04
leaq 0xf4bb(%rip), %r8       # 0x1de08
callq 0x6a60
movl %eax, 0x123a4(%rip)     # 0x20cfc
movb $0x0, 0x12461(%rip)     # 0x20dc0
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x1241d(%rip)     # 0x20da0
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
movq %rdi, 0x12424(%rip)     # 0x20dc8
jmp 0xe9e8
cmpq $0x0, 0x8(%rsi)
je 0xeff8
decl %ebx
movq 0x10(%r12), %rdi
movl $0x10, %r14d
leaq 0x1232f(%rip), %rsi     # 0x20cf4
movq %r15, %rdx
leaq 0xf43d(%rip), %rcx      # 0x1de0c
leaq 0xf43a(%rip), %r8       # 0x1de10
callq 0x6a60
movl %eax, 0x1231b(%rip)     # 0x20cfc
movb $0x1, 0x123d8(%rip)     # 0x20dc0
xorl %eax, %eax
leaq (%r12,%r14), %rsi
cmpq $0x8, %r14
jne 0xea0a
testb %al, %al
je 0xea0a
movq (%r12,%r14), %rdi
movb (%rdi,%rbp), %cl
incq %rbp
testb %cl, %cl
jne 0xe714
leal -0x1(%rbx), %eax
movq 0x8(%rsi), %rdi
testq %rdi, %rdi
jne 0xe6e0
jmp 0xea30
xorl %eax, %eax
testl %ebx, %ebx
setg %al
leaq (%rsi,%rax,8), %rsi
subl %eax, %ebx
movl %ebx, %eax
jmp 0xea34
movq %r12, %rsi
addq $0x8, %rsi
testl %eax, %eax
jle 0xea3f
movq %rsi, 0x12399(%rip)     # 0x20dd8
movq 0x1238a(%rip), %rax     # 0x20dd0
orq 0x122f3(%rip), %rax     # 0x20d40
jne 0xea6e
movq 0x12382(%rip), %rax     # 0x20dd8
testq %rax, %rax
je 0xea60
movq (%rax), %rax
jmp 0xea67
leaq 0x84f7(%rip), %rax      # 0x16f5e
movq %rax, 0x122d2(%rip)     # 0x20d40
leaq 0x8e09(%rip), %rbx      # 0x1787e
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6930
movq %rbx, %rdi
callq 0x6860
xorl %edi, %edi
callq 0x6310
movq %rax, 0x12133(%rip)     # 0x20bc8
testq %rax, %rax
jne 0xeaa8
leaq 0x8557(%rip), %rdi      # 0x16ff8
xorl %eax, %eax
callq 0x714f
callq 0xde57
cmpb $0x0, 0x1230c(%rip)     # 0x20dc0
je 0xeaf3
movl 0xf350(%rip), %edi      # 0x1de0c
movl 0xf34e(%rip), %esi      # 0x1de10
callq 0xf01a
movl 0x1224b(%rip), %eax     # 0x20d18
movl 0x1230d(%rip), %ecx     # 0x20de0
addl %ecx, %ecx
subl %ecx, %eax
cltd
idivl 0x1224e(%rip)           # 0x20d2c
movl %eax, %edi
movl 0x12236(%rip), %eax     # 0x20d1c
subl %ecx, %eax
cltd
idivl 0x12239(%rip)           # 0x20d28
movl %eax, %esi
jmp 0xeb10
movl 0xf30b(%rip), %edi      # 0x1de04
movl 0xf309(%rip), %esi      # 0x1de08
callq 0xf01a
movl 0xf2fa(%rip), %edi      # 0x1de04
movl 0xf2f8(%rip), %esi      # 0x1de08
cmpl $0x1, %edi
adcl $0x0, %edi
movl %edi, 0xf2e8(%rip)      # 0x1de04
cmpl $0x1, %esi
adcl $0x0, %esi
movl %esi, 0xf2e0(%rip)      # 0x1de08
callq 0x8658
leaq -0x9f1(%rip), %rsi      # 0xe143
movl $0xa, %edi
callq 0x6070
movq 0x12093(%rip), %rcx     # 0x20bd8
leaq 0x8778(%rip), %rdx      # 0x172c4
leaq 0xf0(%rsp), %rbx
movl $0x41, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x60d0
leaq 0x8927(%rip), %rdi      # 0x17491
movq %rbx, %rsi
movl $0x1, %edx
callq 0x65d0
callq 0x72b8
movl 0x12195(%rip), %r15d    # 0x20d18
movl 0x12193(%rip), %ebp     # 0x20d1c
movq 0x12038(%rip), %rdi     # 0x20bc8
callq 0x62c0
movl %eax, %r13d
movq 0x12029(%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 0xebd0
movl 0x12c(%rsp), %ebp
movl 0x128(%rsp), %r15d
cmpl $0x13, %ecx
jne 0xeb98
movq 0x121f4(%rip), %rdi     # 0x20dd0
movq 0xe985(%rip), %rsi      # 0x1d568
movq 0x121de(%rip), %rdx     # 0x20dc8
movq 0x121e7(%rip), %rcx     # 0x20dd8
callq 0x7a50
movl %eax, %r12d
movl %r15d, %edi
movl %ebp, %esi
callq 0xe535
leal 0x3f(%r12), %eax
testl %r12d, %r12d
cmovnsl %r12d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r12d, %ecx
subl %edx, %ecx
movl $0x1, %r15d
shlq %cl, %r15
movl $0x1, %ebp
sarl $0x6, %eax
movslq %eax, %r14
leal 0x3f(%r13), %eax
testl %r13d, %r13d
cmovnsl %r13d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r13d, %ecx
subl %edx, %ecx
shlq %cl, %rbp
sarl $0x6, %eax
cmpl %r12d, %r13d
cmovgl %r13d, %r12d
movslq %eax, %rbx
incl %r12d
movsd 0x801b(%rip), %xmm0     # 0x16c78
leaq 0xf0(%rsp), %r13
movq $0x0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq %r12, 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 %r15, 0x70(%rsp,%r14,8)
orq %rbp, 0x70(%rsp,%rbx,8)
movq 0x11edf(%rip), %rdi     # 0x20bc8
callq 0x6a30
testl %eax, %eax
jne 0xed03
xorl %eax, %eax
callq 0x7f2b
movapd 0x10(%rsp), %xmm1
testl %eax, %eax
je 0xed07
xorpd %xmm1, %xmm1
movapd %xmm1, %xmm0
divsd 0x7f7d(%rip), %xmm0     # 0x16c90
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %rax, 0x60(%rsp)
mulsd 0x7f6b(%rip), %xmm0     # 0x16c98
addsd %xmm1, %xmm0
mulsd 0x32cf(%rip), %xmm0     # 0x12008
cvttsd2si %xmm0, %rax
movapd %xmm1, 0x10(%rsp)
ucomisd 0x7f3c(%rip), %xmm1     # 0x16c88
movq %rax, 0x68(%rsp)
movl $0x0, %r8d
leaq 0x60(%rsp), %rax
cmovaeq %rax, %r8
movl %r12d, %edi
leaq 0x70(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x6340
testl %eax, %eax
jns 0xed9e
callq 0x6620
movl (%rax), %edi
cmpl $0x4, %edi
je 0xec8f
callq 0x64b0
leaq 0x3aa4(%rip), %rdi      # 0x12838
movq %rax, %rsi
xorl %eax, %eax
callq 0x714f
movl $0x1, %edi
leaq 0x20(%rsp), %rsi
callq 0x6150
testq %r15, 0x70(%rsp,%r14,8)
jne 0xedc2
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x7f2b
testl %eax, %eax
je 0xedca
callq 0x7f33
movb $0x1, %r12b
movq 0x11df7(%rip), %rdi     # 0x20bc8
callq 0x6a30
movl %eax, %ebp
jmp 0xee28
movq 0x11de7(%rip), %rdi     # 0x20bc8
movq %r13, %rsi
callq 0x6460
movq %r13, %rdi
xorl %esi, %esi
callq 0x6370
testl %eax, %eax
jne 0xee1c
movslq 0xf0(%rsp), %rax
movabsq $0xd2fbb698b, %rcx      # imm = 0xD2FBB698B
btq %rax, %rcx
jb 0xee1c
movq %r13, %rdi
leaq 0xc437(%rip), %rcx      # 0x1b250
callq *(%rcx,%rax,8)
movq 0x11da5(%rip), %rdi     # 0x20bc8
callq 0x6a30
testl %eax, %eax
jne 0xedda
testl %ebp, %ebp
sete %al
notb %r12b
testb %al, %r12b
jne 0xeecf
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 0xef93(%rip), %xmm2     # 0x1de20
divsd 0x3173(%rip), %xmm1     # 0x12008
addsd %xmm0, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
divsd %xmm2, %xmm0
mulsd 0xef6b(%rip), %xmm0     # 0x1de18
movl $0x1, 0xc(%rsp)
ucomisd 0x7dcb(%rip), %xmm0     # 0x16c88
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %rbp
ja 0xec89
jmp 0xeed9
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %rbp
movl 0xef55(%rip), %edi      # 0x1de34
callq 0x70ac
testl %eax, %eax
je 0xeef5
movsd 0xef28(%rip), %xmm0     # 0x1de18
jmp 0xec89
cmpl $0x0, 0xef2c(%rip)      # 0x1de28
je 0xef6b
movl $0x10, %edi
callq 0x858d
testl %eax, %eax
je 0xef6b
movl 0xef16(%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 0x30bb(%rip), %xmm2     # 0x12008
addsd %xmm1, %xmm2
movapd %xmm0, %xmm3
subsd %xmm2, %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm3, %xmm1
jae 0xef75
movapd %xmm3, 0x10(%rsp)
jmp 0xefcd
movsd 0x7d05(%rip), %xmm0     # 0x16c78
jmp 0xefc7
xorpd 0x7d53(%rip), %xmm3     # 0x16cd0
movl 0x11db1(%rip), %eax     # 0x20d34
movl %eax, %ecx
movl $0x800, %edx            # imm = 0x800
orl %edx, %ecx
ucomisd %xmm0, %xmm3
cmovbel %eax, %ecx
xorl %edx, %ecx
movl %ecx, 0x11d99(%rip)     # 0x20d34
movl $0x10, %edi
callq 0x85e2
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0xee69(%rip), %eax      # 0x1de28
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movapd %xmm0, 0x10(%rsp)
callq 0x95b3
movq 0x11bef(%rip), %rdi     # 0x20bc8
callq 0x6630
movapd 0x10(%rsp), %xmm0
jmp 0xec81
addq $0x10, %r12
addl $-0x2, %ebx
movq %r12, %rsi
jmp 0xea29
callq 0xf002
callq 0x6130