// File: /workspace/github_c_makefile_star2_O0/kek[P]evilwm/main.c
// Function: main
int main(int argc, char *argv[]) {
	struct sigaction act;
	int argn = 1, ret;

	{
		const char *home = getenv("HOME");
		if (home) {
			char *conffile = xmalloc(strlen(home) + sizeof(CONFIG_FILE) + 2);
			strcpy(conffile, home);
			strcat(conffile, "/" CONFIG_FILE);
			xconfig_parse_file(evilwm_options, conffile);
			free(conffile);
		}
	}
	ret = xconfig_parse_cli(evilwm_options, argc, argv, &argn);
	if (ret == XCONFIG_MISSING_ARG) {
		fprintf(stderr, "%s: missing argument to `%s'\n", argv[0], argv[argn]);
		exit(1);
	} else if (ret == XCONFIG_BAD_OPTION) {
		if (0 == strcmp(argv[argn], "-h")
				|| 0 == strcmp(argv[argn], "--help")) {
			helptext();
			exit(0);
#ifdef STDIO
		} else if (0 == strcmp(argv[argn], "-V")
				|| 0 == strcmp(argv[argn], "--version")) {
			LOG_INFO("evilwm version " VERSION "\n");
			exit(0);
#endif
		} else {
			helptext();
			exit(1);
		}
	}

	if (opt_grabmask1) grabmask1 = parse_modifiers(opt_grabmask1);
	if (opt_grabmask2) grabmask2 = parse_modifiers(opt_grabmask2);
	if (opt_altmask) altmask = parse_modifiers(opt_altmask);

	wm_exit = 0;
	act.sa_handler = handle_signal;
	sigemptyset(&act.sa_mask);
	act.sa_flags = 0;
	sigaction(SIGTERM, &act, NULL);
	sigaction(SIGINT, &act, NULL);
	sigaction(SIGHUP, &act, NULL);

	setup_display();

	event_main_loop();

	/* Quit Nicely */
	while (clients_stacking_order)
		remove_client(clients_stacking_order->data);
	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
	if (font) XFreeFont(dpy, font);
	{
		int i;
		for (i = 0; i < num_screens; i++) {
			ewmh_deinit_screen(&screens[i]);
			XFreeGC(dpy, screens[i].invert_gc);
			XInstallColormap(dpy, DefaultColormap(dpy, i));
		}
	}
	free(screens);
	XCloseDisplay(dpy);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0xac(%rbp)
leaq 0x550f(%rip), %rdi      # 0xc459
callq 0x3070
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0x6fc8
movq -0xb8(%rbp), %rdi
callq 0x31e0
movq %rax, %rdi
addq $0xa, %rdi
addq $0x2, %rdi
callq 0x72d0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x3100
movq -0xc0(%rbp), %rdi
leaq 0x54ba(%rip), %rsi      # 0xc45e
callq 0x3660
movq -0xc0(%rbp), %rsi
leaq 0x8439(%rip), %rdi      # 0xf3f0
callq 0xacc0
movq -0xc0(%rbp), %rdi
callq 0x3090
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x841a(%rip), %rdi      # 0xf3f0
leaq -0xac(%rbp), %rcx
callq 0xb010
movl %eax, -0xb0(%rbp)
cmpl $0x2, -0xb0(%rbp)
jne 0x7029
movq 0x8000(%rip), %rax      # 0xeff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x5451(%rip), %rsi      # 0xc469
movb $0x0, %al
callq 0x3350
movl $0x1, %edi
callq 0x3680
cmpl $0x1, -0xb0(%rbp)
jne 0x70f2
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x543b(%rip), %rsi      # 0xc487
callq 0x3330
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x707c
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x541b(%rip), %rsi      # 0xc48a
callq 0x3330
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x7088
callq 0x7320
xorl %edi, %edi
callq 0x3680
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x53f3(%rip), %rsi      # 0xc491
callq 0x3330
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x70ce
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x53d3(%rip), %rsi      # 0xc494
callq 0x3330
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x70e3
leaq 0x53c9(%rip), %rdi      # 0xc49e
movb $0x0, %al
callq 0x3210
xorl %edi, %edi
callq 0x3680
callq 0x7320
movl $0x1, %edi
callq 0x3680
jmp 0x70f4
cmpq $0x0, 0x8864(%rip)      # 0xf960
je 0x7110
movq 0x885b(%rip), %rdi      # 0xf960
callq 0x7340
movl %eax, 0x82c0(%rip)      # 0xf3d0
cmpq $0x0, 0x8850(%rip)      # 0xf968
je 0x712c
movq 0x8847(%rip), %rdi      # 0xf968
callq 0x7340
movl %eax, 0x82a8(%rip)      # 0xf3d4
cmpq $0x0, 0x883c(%rip)      # 0xf970
je 0x7148
movq 0x8833(%rip), %rdi      # 0xf970
callq 0x7340
movl %eax, 0x8290(%rip)      # 0xf3d8
movl $0x0, 0x8826(%rip)      # 0xf978
leaq 0xcd7(%rip), %rax       # 0x7e30
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %rdi
addq $0x8, %rdi
callq 0x3360
movl $0x0, -0x20(%rbp)
movl $0xf, %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3150
movl $0x2, %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3150
movl $0x1, %edi
leaq -0xa8(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3150
callq 0x7400
callq 0x4350
cmpq $0x0, 0x8780(%rip)      # 0xf948
je 0x71dc
movq 0x8777(%rip), %rax      # 0xf948
movq 0x8(%rax), %rdi
callq 0x3ea0
jmp 0x71c0
movq 0x879d(%rip), %rdi      # 0xf980
movl $0x1, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x3720
cmpq $0x0, 0x878a(%rip)      # 0xf988
je 0x7213
movq 0x8779(%rip), %rdi      # 0xf980
movq 0x877a(%rip), %rsi      # 0xf988
callq 0x30f0
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl 0x8767(%rip), %eax      # 0xf990
jge 0x72aa
movq 0x8766(%rip), %rdi      # 0xf998
movslq -0xc4(%rbp), %rax
imulq $0x70, %rax, %rax
addq %rax, %rdi
callq 0x63a0
movq 0x8734(%rip), %rdi      # 0xf980
movq 0x8745(%rip), %rax      # 0xf998
movslq -0xc4(%rbp), %rcx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rsi
callq 0x3670
movq 0x870f(%rip), %rdi      # 0xf980
movq 0x8708(%rip), %rax      # 0xf980
movq 0xe8(%rax), %rax
movslq -0xc4(%rbp), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movq 0x50(%rax), %rsi
callq 0x36e0
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x721d
movq 0x86e7(%rip), %rdi      # 0xf998
callq 0x3090
movq 0x86c3(%rip), %rdi      # 0xf980
callq 0x3700
xorl %eax, %eax
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)