LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/init.c
// Function: interface_listen_sockets
void interface_listen_sockets(void)
{
	struct list_head *list_pos;
	struct batman_if *batman_if;

	FD_ZERO(&receive_wait_set);
	receive_max_sock = 0;

	list_for_each(list_pos, &if_list) {
		batman_if = list_entry(list_pos, struct batman_if, list);

		if (batman_if->if_active) {
			if (batman_if->udp_recv_sock > receive_max_sock)
				receive_max_sock = batman_if->udp_recv_sock;

			FD_SET(batman_if->udp_recv_sock, &receive_wait_set);
		}
	}
}

// Assembly:
xorps %xmm0, %xmm0
leaq 0xc611(%rip), %rax      # 0x17388
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0xc54b(%rip), %rdx      # 0x172e8
movl $0x0, (%rdx)
leaq 0xc566(%rip), %rsi      # 0x17310
movq (%rsi), %rdi
cmpq %rsi, %rdi
je 0xadf8
xorl %r8d, %r8d
cmpb $0x0, 0x1d(%rdi)
je 0xadf0
movl 0x14(%rdi), %ecx
cmpl %r8d, %ecx
jle 0xadc8
movl %ecx, (%rdx)
movl %ecx, %r8d
leal 0x3f(%rcx), %r9d
testl %ecx, %ecx
cmovnsl %ecx, %r9d
movl %r9d, %r10d
andl $-0x40, %r10d
subl %r10d, %ecx
movl $0x1, %r10d
shlq %cl, %r10
sarl $0x6, %r9d
movslq %r9d, %rcx
orq %r10, (%rax,%rcx,8)
movq (%rdi), %rdi
cmpq %rsi, %rdi
jne 0xadb5
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/init.c
// Function: deactivate_interface
void deactivate_interface(struct batman_if *batman_if)
{
	if (batman_if->udp_recv_sock != 0)
		close(batman_if->udp_recv_sock);

	if (batman_if->udp_send_sock != 0)
		close(batman_if->udp_send_sock);

	batman_if->udp_recv_sock = 0;
	batman_if->udp_send_sock = 0;

	if ((batman_if->netaddr > 0) && (batman_if->netmask > 0)) {

		add_del_rule(batman_if->netaddr, batman_if->netmask, BATMAN_RT_TABLE_HOSTS, BATMAN_RT_PRIO_DEFAULT + batman_if->if_num, 0, RULE_TYPE_DST, RULE_DEL);
		add_del_rule(batman_if->netaddr, batman_if->netmask, BATMAN_RT_TABLE_UNREACH, BATMAN_RT_PRIO_UNREACH + batman_if->if_num, 0, RULE_TYPE_DST, RULE_DEL);

	}

	batman_if->if_active = 0;
	active_ifs--;

	if (batman_if->if_rp_filter_old > -1)
		set_rp_filter(batman_if->if_rp_filter_old, batman_if->dev);

	if (batman_if->if_send_redirects_old > -1)
		set_send_redirects(batman_if->if_send_redirects_old, batman_if->dev);

	batman_if->if_rp_filter_old = -1;
	batman_if->if_send_redirects_old = -1;

	interface_listen_sockets();
	debug_output(3, "Interface deactivated: %s\n", batman_if->dev);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x14(%rdi), %edi
testl %edi, %edi
je 0xae0b
callq 0x21f0
movl 0x10(%rbx), %edi
testl %edi, %edi
je 0xae17
callq 0x21f0
movq $0x0, 0x10(%rbx)
movl 0x50(%rbx), %edi
testl %edi, %edi
je 0xae7c
movb 0x54(%rbx), %al
testb %al, %al
je 0xae7c
movzbl 0x1c(%rbx), %ecx
addl $0x19c8, %ecx           # imm = 0x19C8
movl $0x1, %ebp
movl %ebp, (%rsp)
movzbl %al, %esi
movl $0x42, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x82f9
movl 0x50(%rbx), %edi
movzbl 0x54(%rbx), %esi
movzbl 0x1c(%rbx), %ecx
addl $0x1a2c, %ecx           # imm = 0x1A2C
movl %ebp, (%rsp)
movl $0x43, %edx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x82f9
movb $0x0, 0x1d(%rbx)
leaq 0xc45e(%rip), %rax      # 0x172e5
decb (%rax)
movsbl 0x24(%rbx), %edi
testl %edi, %edi
js 0xae9a
movq 0x8(%rbx), %rsi
callq 0x9604
movsbl 0x25(%rbx), %edi
testl %edi, %edi
js 0xaeab
movq 0x8(%rbx), %rsi
callq 0x9776
movw $0xffff, 0x24(%rbx)     # imm = 0xFFFF
callq 0xad6d
movq 0x8(%rbx), %rdx
leaq 0x7130(%rip), %rsi      # 0x11ff1
movl $0x3, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xd88c
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/init.c
// Function: is_interface_up
static int is_interface_up(char *dev)
{
	struct ifreq int_req;
	int sock;

	if ((sock = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
		return 0;

	memset(&int_req, 0, sizeof (struct ifreq));
	strncpy(int_req.ifr_name, dev, IFNAMSIZ - 1);

	if (ioctl(sock, SIOCGIFFLAGS, &int_req) < 0)
		goto failure;

	if (!(int_req.ifr_flags & IFF_UP))
		goto failure;

	if (ioctl(sock, SIOCGIFADDR, &int_req) < 0)
		goto failure;

	close(sock);
	return 1;

failure:
	close(sock);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
xorl %ebp, %ebp
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x24e0
testl %eax, %eax
js 0xaf58
movl %eax, %ebx
xorps %xmm0, %xmm0
movq %rsp, %r15
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movl $0xf, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2090
movl $0x8913, %esi           # imm = 0x8913
movl %ebx, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x21d0
testl %eax, %eax
js 0xaf4f
testb $0x1, 0x10(%rsp)
je 0xaf4f
movq %rsp, %rdx
movl $0x8915, %esi           # imm = 0x8915
movl %ebx, %edi
xorl %eax, %eax
callq 0x21d0
movl $0x1, %ebp
testl %eax, %eax
jns 0xaf51
xorl %ebp, %ebp
movl %ebx, %edi
callq 0x21f0
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/init.c
// Function: check_inactive_interfaces
void check_inactive_interfaces(void)
{
	struct list_head *list_pos;
	struct batman_if *batman_if;

	/* all available interfaces are active */
	if (found_ifs == active_ifs)
		return;

	list_for_each(list_pos, &if_list) {
		batman_if = list_entry(list_pos, struct batman_if, list);

		if ((!batman_if->if_active) && (is_interface_up(batman_if->dev)))
			activate_interface(batman_if);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xbf94(%rip), %rax      # 0x172e4
movb (%rax), %al
leaq 0xbf8c(%rip), %rcx      # 0x172e5
cmpb (%rcx), %al
sete %al
leaq 0xbfab(%rip), %r14      # 0x17310
movq (%r14), %rbx
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0xb395
cmpb $0x0, 0x1d(%rbx)
jne 0xb38d
movq 0x8(%rbx), %rdi
callq 0xaed3
testl %eax, %eax
je 0xb38d
movq %rbx, %rdi
callq 0xaf65
movq (%rbx), %rbx
cmpq %r14, %rbx
jne 0xb372
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/init.c
// Function: check_active_interfaces
void check_active_interfaces(void)
{
	struct list_head *list_pos;
	struct batman_if *batman_if;

	/* all available interfaces are deactive */
	if (active_ifs == 0)
		return;

	list_for_each(list_pos, &if_list) {
		batman_if = list_entry(list_pos, struct batman_if, list);

		if ((batman_if->if_active) && (!is_interface_up(batman_if->dev)))
			deactivate_interface(batman_if);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xbf3d(%rip), %rax      # 0x172e5
cmpb $0x0, (%rax)
sete %al
leaq 0xbf5b(%rip), %r14      # 0x17310
movq (%r14), %rbx
cmpq %r14, %rbx
sete %cl
orb %al, %cl
jne 0xb3e5
cmpb $0x0, 0x1d(%rbx)
je 0xb3dd
movq 0x8(%rbx), %rdi
callq 0xaed3
testl %eax, %eax
jne 0xb3dd
movq %rbx, %rdi
callq 0xadf9
movq (%rbx), %rbx
cmpq %r14, %rbx
jne 0xb3c2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: get_time_msec
uint32_t get_time_msec(void)
{
	uint32_t time;

	pthread_mutex_lock(&batman_clock_mutex);
	update_internal_clock();
	time = (uint32_t)(((float)(batman_clock_ticks) * 1000) / system_tick);
	pthread_mutex_unlock(&batman_clock_mutex);

	return time;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc295(%rip), %rbx      # 0x17690
movq %rbx, %rdi
callq 0x24c0
callq 0xc30e
movq %rax, %rcx
subq 0xc2ae(%rip), %rcx      # 0x176c0
leaq 0xbee7(%rip), %rdx      # 0x17300
addq (%rdx), %rcx
movq %rcx, (%rdx)
movq %rax, 0xc29a(%rip)      # 0x176c0
js 0xb42f
cvtsi2ss %rcx, %xmm0
jmp 0xb444
movq %rcx, %rax
shrq %rax
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss 0x6f5c(%rip), %xmm0     # 0x123a8
divss 0xc264(%rip), %xmm0     # 0x176b8
cvttss2si %xmm0, %r14
movq %rbx, %rdi
callq 0x22d0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: get_time_msec64
uint64_t get_time_msec64(void)
{
	uint64_t time;

	pthread_mutex_lock(&batman_clock_mutex);
	update_internal_clock();
	time = (uint64_t)(((float)(batman_clock_ticks) * 1000) / system_tick);
	pthread_mutex_unlock(&batman_clock_mutex);

	return time;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc219(%rip), %rbx      # 0x17690
movq %rbx, %rdi
callq 0x24c0
callq 0xc30e
movq %rax, %rcx
subq 0xc232(%rip), %rcx      # 0x176c0
leaq 0xbe6b(%rip), %rdx      # 0x17300
addq (%rdx), %rcx
movq %rcx, (%rdx)
movq %rax, 0xc21e(%rip)      # 0x176c0
js 0xb4ab
cvtsi2ss %rcx, %xmm0
jmp 0xb4c0
movq %rcx, %rax
shrq %rax
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
mulss 0x6ee0(%rip), %xmm0     # 0x123a8
divss 0xc1e8(%rip), %xmm0     # 0x176b8
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss 0x6ec8(%rip), %xmm0     # 0x123ac
cvttss2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
movq %rbx, %rdi
callq 0x22d0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: sym_print
static void sym_print( char x, char y, const char *z ) {

	char i = 0, Z;

	do{

		BAT_LOGO_PRINT( 25 + (int)x + (int)i, (int)y, z[(int)i] );

		switch ( z[(int)i] ) {

			case 92:
				Z = 47;   /* "\" --> "/" */
				break;

			case 47:
				Z = 92;   /* "/" --> "\" */
				break;

			case 41:
				Z = 40;   /* ")" --> "(" */
				break;

			default:
				Z = z[(int)i];
				break;

		}

		BAT_LOGO_PRINT( 24 - (int)x - (int)i, (int)y, Z );
		i++;

	} while( z[(int)i - 1] );

	return;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
incl %ebp
xorl %r12d, %r12d
leaq 0x6ab1(%rip), %r15      # 0x125dd
movsbl %r12b, %r12d
leal (%r12,%r14), %edx
addl $0x19, %edx
movsbq %r12b, %r13
movsbl (%rbx,%r13), %ecx
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2190
movzbl (%rbx,%r13), %eax
cmpl $0x29, %eax
je 0xbb6e
cmpl $0x5c, %eax
je 0xbb67
cmpl $0x2f, %eax
jne 0xbb75
movl $0x5c, %ecx
jmp 0xbb78
movl $0x2f, %ecx
jmp 0xbb78
movl $0x28, %ecx
jmp 0xbb78
movsbl %al, %ecx
movl $0x18, %edx
subl %r12d, %edx
subl %r14d, %edx
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2190
incb %r12b
movsbq %r12b, %rax
cmpb $0x0, -0x1(%rbx,%rax)
jne 0xbb2c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: add_default_route
void add_default_route(void)
{
	struct curr_gw_data *curr_gw_data;

	if (tunnel_running) {
		debug_output(3, "Error - couldn't create tunnel: old tunnel is still active\n");
		return;
	}

	curr_gw_data = debugMalloc( sizeof(struct curr_gw_data), 207 );
	curr_gw_data->orig = curr_gateway->orig_node->orig;
	curr_gw_data->gw_node = curr_gateway;
	curr_gw_data->batman_if = curr_gateway->orig_node->batman_if;

	tunnel_running = 1;

	if (pthread_create(&curr_gateway_thread_id, NULL, &client_to_gw_tun, curr_gw_data) != 0) {

		debug_output(0, "Error - couldn't spawn thread: %s\n", strerror(errno));
		debugFree(curr_gw_data, 1213);
		curr_gateway = NULL;
		tunnel_running = 0;

	} else {

		pthread_detach(curr_gateway_thread_id);

	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x0, 0xba79(%rip)      # 0x17688
je 0xbc29
leaq 0x6840(%rip), %rsi      # 0x12458
movl $0x3, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xd88c
movl $0x18, %edi
movl $0xcf, %esi
callq 0x5d52
movq %rax, %rbx
leaq 0xb67e(%rip), %r15      # 0x172c0
movq (%r15), %rax
movq 0x8(%rax), %rcx
movl (%rcx), %edx
movl %edx, (%rbx)
movq %rax, 0x8(%rbx)
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rbx)
movb $0x1, 0xba28(%rip)      # 0x17688
leaq 0xb661(%rip), %r14      # 0x172c8
leaq 0x6eb(%rip), %rdx       # 0xc359
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2380
testl %eax, %eax
je 0xbcbf
callq 0x2070
movl (%rax), %edi
callq 0x2480
leaq 0x6802(%rip), %rsi      # 0x12494
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd88c
movq %rbx, %rdi
movl $0x4bd, %esi            # imm = 0x4BD
callq 0x628b
movq $0x0, (%r15)
movb $0x0, 0xb9cf(%rip)      # 0x17688
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2300
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: send_udp_packet
int8_t send_udp_packet(unsigned char *packet_buff, int32_t packet_buff_len, struct sockaddr_in *broad, int32_t send_sock, struct batman_if *batman_if)
{
	if ((batman_if != NULL) && (!batman_if->if_active))
		return 0;

	if ( sendto( send_sock, packet_buff, packet_buff_len, 0, (struct sockaddr *)broad, sizeof(struct sockaddr_in) ) < 0 ) {

		if ( errno == 1 ) {

			debug_output(0, "Error - can't send udp packet: %s.\nDoes your firewall allow outgoing packets on port %i ?\n", strerror(errno), ntohs(broad->sin_port));

		} else {

			debug_output(0, "Error - can't send udp packet: %s\n", strerror(errno));

		}

		return -1;

	}

	return 0;

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %rax
testq %r8, %r8
je 0xbe69
cmpb $0x0, 0x1d(%r8)
je 0xbebe
movslq %esi, %rdx
xorl %ebp, %ebp
movl %ecx, %edi
movq %rax, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
movl $0x10, %r9d
callq 0x21e0
testq %rax, %rax
jns 0xbedd
callq 0x2070
movl (%rax), %edi
cmpl $0x1, %edi
jne 0xbec2
movl $0x1, %edi
callq 0x2480
movzwl 0x2(%rbx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
leaq 0x6654(%rip), %rsi      # 0x12504
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd88c
jmp 0xbeda
xorl %ebp, %ebp
jmp 0xbedd
callq 0x2480
leaq 0x6691(%rip), %rsi      # 0x1255f
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd88c
movb $-0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: del_gw_interface
void del_gw_interface(void)
{
	struct batman_if *batman_if = (struct batman_if *)if_list.next;

	if (batman_if->udp_tunnel_sock > 0) {

		if (batman_if->listen_thread_id != 0) {
			pthread_join(batman_if->listen_thread_id, NULL);
		}

		close(batman_if->udp_tunnel_sock);

		batman_if->listen_thread_id = 0;
		batman_if->udp_tunnel_sock = 0;

	}
}

// Assembly:
pushq %rbx
leaq 0xb422(%rip), %rax      # 0x17310
movq (%rax), %rbx
movl 0x18(%rbx), %edi
testl %edi, %edi
jle 0xbf22
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0xbf0e
movq %rax, %rdi
xorl %esi, %esi
callq 0x2470
movl 0x18(%rbx), %edi
callq 0x21f0
movq $0x0, 0x28(%rbx)
movl $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: restore_defaults
void restore_defaults(void) {

	struct list_head *if_pos, *if_pos_tmp;
	struct batman_if *batman_if;

	stop = 1;

	if ( routing_class > 0 )
		add_del_interface_rules(RULE_DEL);

	del_gw_interface();

	list_for_each_safe( if_pos, if_pos_tmp, &if_list ) {

		batman_if = list_entry( if_pos, struct batman_if, list );

		deactivate_interface(batman_if);

		list_del( (struct list_head *)&if_list, if_pos, &if_list );
		debugFree( if_pos, 1214 );

	}

	/* delete rule for hna networks */
	add_del_rule(0, 0, BATMAN_RT_TABLE_NETWORKS, BATMAN_RT_PRIO_UNREACH - 1, 0, RULE_TYPE_DST, RULE_DEL);

	/* delete unreachable routing table entry */
	add_del_route(0, 0, 0, 0, 0, "unknown", BATMAN_RT_TABLE_UNREACH, ROUTE_TYPE_UNREACHABLE, ROUTE_DEL);

	if ( ( routing_class != 0 ) && ( curr_gateway != NULL ) )
		del_default_route();

	if ( vis_if.sock )
		close( vis_if.sock );

	if ( unix_if.unix_sock )
		close( unix_if.unix_sock );

	if ( unix_if.listen_thread_id != 0 ) {
		pthread_join( unix_if.listen_thread_id, NULL );
		unix_if.listen_thread_id = 0;
	}

	if ( debug_level == 0 )
		closelog();

	if (policy_routing_script != NULL) {
		close(policy_routing_pipe);
		waitpid(policy_routing_script_pid, NULL, 0);
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb74d(%rip), %rax      # 0x17680
movb $0x1, (%rax)
leaq 0xb37d(%rip), %r15      # 0x172ba
cmpb $0x0, (%r15)
je 0xbf4d
movl $0x1, %edi
callq 0x86b2
callq 0xbee6
leaq 0xb3b7(%rip), %rbx      # 0x17310
movq (%rbx), %r14
cmpq %rbx, %r14
je 0xbf8f
movq (%r14), %r12
movq %r14, %rdi
callq 0xadf9
movq %rbx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5be3
movq %r14, %rdi
movl $0x4be, %esi            # imm = 0x4BE
callq 0x628b
movq %r12, %r14
cmpq %rbx, %r12
jne 0xbf61
subq $0x8, %rsp
movl $0x1, %ebx
xorl %edi, %edi
xorl %esi, %esi
movl $0x41, %edx
movl $0x1a2b, %ecx           # imm = 0x1A2B
xorl %r8d, %r8d
movl $0x1, %r9d
pushq %rbx
callq 0x82f9
addq $0x8, %rsp
leaq 0x4da2(%rip), %r9       # 0x10d62
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x2
pushq $0x43
callq 0x7cd4
addq $0x20, %rsp
cmpb $0x0, (%r15)
je 0xbff3
leaq 0xb2da(%rip), %rax      # 0x172c0
cmpq $0x0, (%rax)
je 0xbff3
movq $0x0, (%rax)
leaq 0xb366(%rip), %rax      # 0x17360
movl (%rax), %edi
testl %edi, %edi
je 0xc005
callq 0x21f0
leaq 0xb3fc(%rip), %rbx      # 0x17408
movl (%rbx), %edi
testl %edi, %edi
je 0xc017
callq 0x21f0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xc02f
xorl %esi, %esi
callq 0x2470
movq $0x0, 0x8(%rbx)
leaq 0xb282(%rip), %rax      # 0x172b8
cmpb $0x0, (%rax)
jne 0xc040
callq 0x2060
leaq 0xb291(%rip), %rax      # 0x172d8
cmpq $0x0, (%rax)
je 0xc078
leaq 0xb28c(%rip), %rax      # 0x172e0
movl (%rax), %edi
callq 0x21f0
leaq 0xb31e(%rip), %rax      # 0x17380
movl (%rax), %edi
xorl %esi, %esi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2390
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: restore_and_exit
void restore_and_exit( uint8_t is_sigsegv ) {

	struct orig_node *orig_node;
	struct hash_it_t *hashit = NULL;

	if ( !unix_client ) {

		/* remove tun interface first */
		stop = 1;

		del_gw_interface();

		if ( ( routing_class != 0 ) && ( curr_gateway != NULL ) )
			del_default_route();

		/* all rules and routes were purged in segmentation_fault() */
		if ( !is_sigsegv ) {

			while ( NULL != ( hashit = hash_iterate( orig_hash, hashit ) ) ) {

				orig_node = hashit->bucket->data;

				update_routes( orig_node, NULL, NULL, 0 );

			}

		}

		restore_defaults();

	}

	if (is_sigsegv)
		raise(SIGSEGV);

	/* call exit always even if it will not be reached to make the compiler happy */
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0xb25a(%rip), %rax      # 0x172ec
cmpb $0x0, (%rax)
jne 0xc10d
leaq 0xb5e2(%rip), %rax      # 0x17680
movb $0x1, (%rax)
callq 0xbee6
leaq 0xb20d(%rip), %rax      # 0x172ba
cmpb $0x0, (%rax)
je 0xc0c6
leaq 0xb207(%rip), %rax      # 0x172c0
cmpq $0x0, (%rax)
je 0xc0c6
movq $0x0, (%rax)
testb %bl, %bl
jne 0xc108
leaq 0xb25f(%rip), %r15      # 0x17330
movq (%r15), %rdi
xorl %esi, %esi
callq 0x6741
testq %rax, %rax
je 0xc108
movq %rax, %r14
movq 0x8(%r14), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3034
movq (%r15), %rdi
movq %r14, %rsi
callq 0x6741
movq %rax, %r14
testq %rax, %rax
jne 0xc0e3
callq 0xbf24
testb %bl, %bl
je 0xc11b
movl $0xb, %edi
callq 0x2040
movl $0x1, %edi
callq 0x2440
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: segmentation_fault
void segmentation_fault(int32_t BATMANUNUSED(sig)) {

	signal(SIGSEGV, SIG_DFL);

	debug_output( 0, "Error - SIGSEGV received, trying to clean up ... \n" );

	flush_routes_rules(0);
	flush_routes_rules(1);

	restore_and_exit(1);
}

// Assembly:
pushq %rax
movl $0xb, %edi
xorl %esi, %esi
callq 0x2260
leaq 0x6449(%rip), %rsi      # 0x12582
xorl %edi, %edi
xorl %eax, %eax
callq 0xd88c
xorl %edi, %edi
callq 0x8a3d
movl $0x1, %edi
callq 0x8a3d
movl $0x1, %edi
callq 0xc084
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: cleanup
void cleanup(void) {

	int8_t i;
	struct list_head *debug_pos, *debug_pos_tmp;


	for ( i = 0; i < debug_level_max; i++ ) {

		if ( debug_clients.clients_num[i] > 0 ) {

			list_for_each_safe( debug_pos, debug_pos_tmp, (struct list_head *)debug_clients.fd_list[i] ) {

				list_del( (struct list_head *)debug_clients.fd_list[i], debug_pos, (struct list_head_first *)debug_clients.fd_list[i] );
				debugFree( debug_pos, 1218 );

			}

		}

		debugFree( debug_clients.fd_list[i], 1219 );
		debugFree( debug_clients.mutex[i], 1220 );

	}

	debugFree( debug_clients.fd_list, 1221 );
	debugFree( debug_clients.mutex, 1222 );
	debugFree( debug_clients.clients_num, 1223 );

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xb11b(%rip), %r14      # 0x17288
cmpb $0x0, (%r14)
je 0xc1f9
xorl %r15d, %r15d
leaq 0xb1c7(%rip), %r12      # 0x17348
movq (%r12), %rax
movq 0x8(%r12), %rcx
movsbq %r15b, %r15
cmpw $0x0, (%rcx,%r15,2)
movq (%rax,%r15,8), %rdi
jle 0xc1cd
movq (%rdi), %rbx
cmpq %rdi, %rbx
je 0xc1cd
movq (%rbx), %r13
movq %rbx, %rsi
movq %rdi, %rdx
callq 0x5be3
movq %rbx, %rdi
movl $0x4c2, %esi            # imm = 0x4C2
callq 0x628b
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
movq %r13, %rbx
cmpq %rdi, %r13
jne 0xc1a2
movl $0x4c3, %esi            # imm = 0x4C3
callq 0x628b
movq 0x10(%r12), %rax
movq (%rax,%r15,8), %rdi
movl $0x4c4, %esi            # imm = 0x4C4
callq 0x628b
incb %r15b
movsbl %r15b, %eax
movzbl (%r14), %ecx
cmpl %ecx, %eax
jl 0xc181
leaq 0xb148(%rip), %rbx      # 0x17348
movq (%rbx), %rdi
movl $0x4c5, %esi            # imm = 0x4C5
callq 0x628b
movq 0x10(%rbx), %rdi
movl $0x4c6, %esi            # imm = 0x4C6
callq 0x628b
movq 0x8(%rbx), %rdi
movl $0x4c7, %esi            # imm = 0x4C7
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x628b
// File: /workspace/github_c_makefile_star2_O3/open-mesh-mirror[P]batmand/posix/posix.c
// Function: main
int main(int argc, char *argv[])
{
	int8_t res;

	/* check if user is root */
	if ((getuid()) || (getgid())) {
		fprintf(stderr, "Error - you must be root to run '%s' !\n", argv[0]);
		exit(EXIT_FAILURE);
	}


	INIT_LIST_HEAD_FIRST(forw_list);
	INIT_LIST_HEAD_FIRST(gw_list);
	INIT_LIST_HEAD_FIRST(if_list);

	hna_init();

	/* save start value */
	system_tick = (float)sysconf(_SC_CLK_TCK);
	last_clock_tick = times_wrapper();
	update_internal_clock();

	apply_init_args(argc, argv);

	init_bh_ports();

	srand(getpid());

	res = batman();

	/* cleaning up */
	hna_free();

	restore_defaults();
	cleanup();
	checkLeak();
	return res;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
callq 0x2140
testl %eax, %eax
jne 0xc306
callq 0x22b0
testl %eax, %eax
jne 0xc306
leaq 0xb0dd(%rip), %rax      # 0x17338
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0xb0b7(%rip), %rax      # 0x17320
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0xb099(%rip), %rax      # 0x17310
movq %rax, (%rax)
movq %rax, 0x8(%rax)
callq 0x6d08
movl $0x2, %edi
callq 0x23f0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0xb41e(%rip)     # 0x176b8
callq 0xc30e
movq %rax, 0xb41a(%rip)      # 0x176c0
callq 0xc30e
movq %rax, %rcx
subq 0xb40b(%rip), %rcx      # 0x176c0
leaq 0xb044(%rip), %rdx      # 0x17300
addq %rcx, (%rdx)
movq %rax, 0xb3fa(%rip)      # 0x176c0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x9910
callq 0xc340
callq 0x2100
movl %eax, %edi
callq 0x2240
callq 0x34d2
movl %eax, %ebx
callq 0x7bf5
callq 0xbf24
callq 0xc15d
callq 0x5d04
movsbl %bl, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x2be1
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/example.c
// Function: main
int main(int argc, char **argv)
{
   if (argc != 2) {
      fprintf(stderr, "Usage: %s <sentence>\n", *argv);
      return EXIT_FAILURE;
   }

   /* Prepare ourselves for processing. */
   struct mascara *mr;
   int ret = mr_alloc(&mr, "en fsm", MR_SENTENCE);
   if (ret) {
      fprintf(stderr, "cannot create tokenizer: %s\n", mr_strerror(ret));
      return EXIT_FAILURE;
   }
   struct gourgandine *gn = gn_alloc();

   /* Tokenize the string at argv[1]. */
   struct mr_token *sent;
   size_t sent_len;
   mr_set_text(mr, argv[1], strlen(argv[1]));
   while ((sent_len = mr_next(mr, &sent))) {
      /* Iterate over all acronym definitions in this sentence. */
      struct gn_acronym acr = {0};
      while (gn_search(gn, sent, sent_len, &acr))
         printf("%s\t%s\n", acr.acronym, acr.expansion);
   }

   mr_dealloc(mr);
   gn_dealloc(gn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
cmpl $0x2, %edi
jne 0x243e
leaq 0x6cbe(%rip), %rsi      # 0x901a
movq %rsp, %rdi
movl $0x1, %ebx
movl $0x1, %edx
callq 0x3439
testl %eax, %eax
jne 0x244d
callq 0x2bd1
movq %rax, %rbx
movq (%rsp), %r15
movq 0x8(%r14), %r14
movq %r14, %rdi
callq 0x20a0
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3b66
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3b96
testq %rax, %rax
je 0x241b
movq %rax, %r15
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r12
leaq 0x6c7b(%rip), %r13      # 0x903e
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2458
testl %eax, %eax
je 0x2407
movq 0x10(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0x20c0
jmp 0x23da
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x3b96
movq %rax, %r15
testq %rax, %rax
jne 0x23c3
movq (%rsp), %rdi
callq 0x3b9f
movq %rbx, %rdi
callq 0x2c42
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x2200
movl $0x1, %ebx
jmp 0x242e
movl %eax, %edi
callq 0x221e
jmp 0x242e
nop
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/src/lib/utf8proc.c
// Function: utf8proc_encode_char
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_encode_char(utf8proc_int32_t uc, utf8proc_uint8_t *dst) {
  if (uc < 0x00) {
    return 0;
  } else if (uc < 0x80) {
    dst[0] = uc;
    return 1;
  } else if (uc < 0x800) {
    dst[0] = 0xC0 + (uc >> 6);
    dst[1] = 0x80 + (uc & 0x3F);
    return 2;
  // Note: we allow encoding 0xd800-0xdfff here, so as not to change
  // the API, however, these are actually invalid in UTF-8
  } else if (uc < 0x10000) {
    dst[0] = 0xE0 + (uc >> 12);
    dst[1] = 0x80 + ((uc >> 6) & 0x3F);
    dst[2] = 0x80 + (uc & 0x3F);
    return 3;
  } else if (uc < 0x110000) {
    dst[0] = 0xF0 + (uc >> 18);
    dst[1] = 0x80 + ((uc >> 12) & 0x3F);
    dst[2] = 0x80 + ((uc >> 6) & 0x3F);
    dst[3] = 0x80 + (uc & 0x3F);
    return 4;
  } else return 0;
}

// Assembly:
testl %edi, %edi
js 0x7e08
cmpl $0x7f, %edi
ja 0x7d7b
movb %dil, (%rsi)
movl $0x1, %eax
retq
cmpl $0x7ff, %edi            # imm = 0x7FF
ja 0x7d9e
movl %edi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x1(%rsi)
movl $0x2, %eax
retq
cmpl $0xffff, %edi           # imm = 0xFFFF
ja 0x7dcd
movl %edi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rsi)
movl %edi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x2(%rsi)
movl $0x3, %eax
retq
cmpl $0x10ffff, %edi         # imm = 0x10FFFF
ja 0x7e08
movl %edi, %eax
shrl $0x12, %eax
orb $-0x10, %al
movb %al, (%rsi)
movl %edi, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rsi)
movl %edi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x3(%rsi)
movl $0x4, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/src/lib/utf8proc.c
// Function: grapheme_break
static utf8proc_bool grapheme_break(int lbc, int tbc) {
  return
    (lbc == UTF8PROC_BOUNDCLASS_START) ? true :
    (lbc == UTF8PROC_BOUNDCLASS_CR &&
     tbc == UTF8PROC_BOUNDCLASS_LF) ? false :
    (lbc >= UTF8PROC_BOUNDCLASS_CR && lbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true :
    (tbc >= UTF8PROC_BOUNDCLASS_CR && tbc <= UTF8PROC_BOUNDCLASS_CONTROL) ? true :
    (tbc == UTF8PROC_BOUNDCLASS_EXTEND) ? false :
    (lbc == UTF8PROC_BOUNDCLASS_L &&
     (tbc == UTF8PROC_BOUNDCLASS_L ||
      tbc == UTF8PROC_BOUNDCLASS_V ||
      tbc == UTF8PROC_BOUNDCLASS_LV ||
      tbc == UTF8PROC_BOUNDCLASS_LVT)) ? false :
    ((lbc == UTF8PROC_BOUNDCLASS_LV ||
      lbc == UTF8PROC_BOUNDCLASS_V) &&
     (tbc == UTF8PROC_BOUNDCLASS_V ||
      tbc == UTF8PROC_BOUNDCLASS_T)) ? false :
    ((lbc == UTF8PROC_BOUNDCLASS_LVT ||
      lbc == UTF8PROC_BOUNDCLASS_T) &&
     tbc == UTF8PROC_BOUNDCLASS_T) ? false :
    (lbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR &&
     tbc == UTF8PROC_BOUNDCLASS_REGIONAL_INDICATOR) ? false :
    (tbc != UTF8PROC_BOUNDCLASS_SPACINGMARK);
}

// Assembly:
movb $0x1, %al
testl %edi, %edi
je 0x7ef1
movl %edi, %ecx
xorl $0x2, %ecx
movl %esi, %edx
xorl $0x3, %edx
orl %ecx, %edx
jne 0x7ef2
xorl %eax, %eax
retq
leal -0x2(%rdi), %ecx
cmpl $0x3, %ecx
setb %cl
leal -0x2(%rsi), %edx
cmpl $0x3, %edx
setb %dl
orb %cl, %dl
jne 0x7ef1
cmpl $0x5, %esi
je 0x7eef
cmpl $0x9, %edi
je 0x7f30
cmpl $0x7, %edi
je 0x7f30
cmpl $0x6, %edi
jne 0x7f38
leal -0x6(%rsi), %eax
cmpl $0x5, %eax
jae 0x7f49
movl $0x1b, %ecx
btl %eax, %ecx
jb 0x7eef
jmp 0x7f49
leal -0x7(%rsi), %eax
cmpl $0x2, %eax
jb 0x7eef
movl %edi, %eax
andl $-0x3, %eax
xorl $0x8, %eax
movl %esi, %ecx
xorl $0x8, %ecx
orl %eax, %ecx
je 0x7eef
xorl $0xb, %edi
movl %esi, %eax
xorl $0xb, %eax
orl %edi, %eax
setne %cl
cmpl $0xc, %esi
setne %al
andb %cl, %al
retq
// File: /workspace/github_c_makefile_star2_O3/michaelnmmeyer[P]gourgandine/src/lib/utf8proc.c
// Function: utf8proc_map
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_map(
  const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_uint8_t **dstptr, utf8proc_option_t options
) {
  utf8proc_int32_t *buffer;
  utf8proc_ssize_t result;
  *dstptr = NULL;
  result = utf8proc_decompose(str, strlen, NULL, 0, options);
  if (result < 0) return result;
  buffer = (utf8proc_int32_t *) malloc(result * sizeof(utf8proc_int32_t) + 1);
  if (!buffer) return UTF8PROC_ERROR_NOMEM;
  result = utf8proc_decompose(str, strlen, buffer, result, options);
  if (result < 0) {
    free(buffer);
    return result;
  }
  result = utf8proc_reencode(buffer, result, options);
  if (result < 0) {
    free(buffer);
    return result;
  }
  {
    utf8proc_int32_t *newptr;
    newptr = (utf8proc_int32_t *) realloc(buffer, (size_t)result+1);
    if (newptr) buffer = newptr;
  }
  *dstptr = (utf8proc_uint8_t *)buffer;
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq $0x0, (%rdx)
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
callq 0x8647
movq %rax, %rbx
testq %rax, %rax
js 0x8d08
leaq 0x1(,%rbx,4), %rdi
callq 0x2180
testq %rax, %rax
je 0x8d01
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x8647
movq %rax, %rbx
testq %rax, %rax
js 0x8cf7
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x8837
movq %rax, %rbx
testq %rax, %rax
js 0x8cf7
movq %rbx, %rsi
incq %rsi
movq %r15, %rdi
callq 0x21b0
testq %rax, %rax
cmovneq %rax, %r15
movq %r15, (%r14)
jmp 0x8d08
movq %r15, %rdi
callq 0x2030
jmp 0x8d08
movq $-0x1, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pyk[P]simple-nn/deps/pcg/src/../include/pcg_variants.h
// Function: pcg32_boundedrand
inline uint32_t
pcg_setseq_64_xsh_rr_32_boundedrand_r(struct pcg_state_setseq_64* rng,
                                      uint32_t bound)
{
    uint32_t threshold = -bound % bound;
    for (;;) {
        uint32_t r = pcg_setseq_64_xsh_rr_32_random_r(rng);
        if (r >= threshold)
            return r % bound;
    }
}

// Assembly:
movl %edi, %eax
negl %eax
xorl %edx, %edx
divl %edi
movq 0x2a1b(%rip), %r8       # 0x4070
movq 0x2a0c(%rip), %rsi      # 0x4068
movabsq $0x5851f42d4c957f2d, %r9 # imm = 0x5851F42D4C957F2D
movq %rsi, %rcx
imulq %r9, %rsi
addq %r8, %rsi
movq %rcx, %rax
shrq $0x2d, %rax
movq %rcx, %r10
shrq $0x1b, %r10
xorl %r10d, %eax
shrq $0x3b, %rcx
rorl %cl, %eax
cmpl %edx, %eax
jb 0x1666
movq %rsi, 0x29d6(%rip)      # 0x4068
xorl %edx, %edx
divl %edi
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/cwm.c
// Function: usage
__dead void
usage(void)
{
	extern char	*__progname;

	(void)fprintf(stderr, "usage: %s [-c file] [-d display]\n",
	    __progname);
	exit(1);
}

// Assembly:
pushq %rax
movq 0xe0b1(%rip), %rax      # 0x13fe8
movq (%rax), %rdi
movq 0xe09f(%rip), %rax      # 0x13fe0
movq (%rax), %rdx
leaq 0x80d7(%rip), %rsi      # 0xe022
xorl %eax, %eax
callq 0x5820
movl $0x1, %edi
callq 0x5180
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/cwm.c
// Function: sigchld_cb
static void
sigchld_cb(int which)
{
	pid_t	 pid;
	int	 save_errno = errno;
	int	 status;

	/* Collect dead children. */
	while ((pid = waitpid(-1, &status, WNOHANG)) > 0 ||
	    (pid < 0 && errno == EINTR))
		;

	errno = save_errno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x5580
movq %rax, %rbx
movl (%rax), %ebp
leaq 0xc(%rsp), %r14
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
movl $0x1, %edx
callq 0x5530
testl %eax, %eax
jg 0x5f73
jns 0x5f90
cmpl $0x4, (%rbx)
je 0x5f73
movl %ebp, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/screen.c
// Function: screen_updatestackingorder
void
screen_updatestackingorder(struct screen_ctx *sc)
{
	Window			*wins, w0, w1;
	struct client_ctx	*cc;
	u_int			 nwins, i, s;

	if (!XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins))
		return;

	for (s = 0, i = 0; i < nwins; i++) {
		/* Skip hidden windows */
		if ((cc = client_find(wins[i])) == NULL ||
		    cc->flags & CLIENT_HIDDEN)
			continue;

		cc->stackingorder = s++;
	}

	XFree(wins);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0x10866(%rip), %rax     # 0x16848
movq (%rax), %rax
movq 0x18(%rdi), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
movq %rax, %rdi
callq 0x5850
testl %eax, %eax
je 0x604e
cmpl $0x0, 0xc(%rsp)
je 0x6044
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x61e0
testq %rax, %rax
je 0x6038
testb $0x1, 0xa8(%rax)
jne 0x6038
movl %ebp, 0xb4(%rax)
incl %ebp
incq %rbx
movl 0xc(%rsp), %eax
cmpq %rax, %rbx
jb 0x6014
movq 0x10(%rsp), %rdi
callq 0x5060
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/screen.c
// Function: screen_find_xinerama
XineramaScreenInfo *
screen_find_xinerama(struct screen_ctx *sc, int x, int y)
{
	XineramaScreenInfo	*info;
	int			 i;

	if (sc->xinerama == NULL)
		return (NULL);

	for (i = 0; i < sc->xinerama_no; i++) {
		info = &sc->xinerama[i];
		if (x >= info->x_org && x < info->x_org + info->width &&
		    y >= info->y_org && y < info->y_org + info->height)
			return (info);
	}
	return (NULL);
}

// Assembly:
movq 0x110(%rdi), %rax
testq %rax, %rax
je 0x60a0
movslq 0x108(%rdi), %rcx
testq %rcx, %rcx
jle 0x60a0
movswl 0x4(%rax), %edi
cmpl %esi, %edi
jg 0x6097
movswl 0x8(%rax), %r8d
addl %edi, %r8d
cmpl %esi, %r8d
jle 0x6097
movswl 0x6(%rax), %edi
cmpl %edx, %edi
jg 0x6097
movswl 0xa(%rax), %r8d
addl %edi, %r8d
cmpl %edx, %r8d
jg 0x60a2
addq $0xc, %rax
decq %rcx
jne 0x606d
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/screen.c
// Function: screen_update_geometry
void
screen_update_geometry(struct screen_ctx *sc)
{
	sc->view.x = 0;
	sc->view.y = 0;
	sc->view.w = DisplayWidth(X_Dpy, sc->which);
	sc->view.h = DisplayHeight(X_Dpy, sc->which);

	sc->work.x = sc->view.x + sc->gap.left;
	sc->work.y = sc->view.y + sc->gap.top;
	sc->work.w = sc->view.w - (sc->gap.left + sc->gap.right);
	sc->work.h = sc->view.h - (sc->gap.top + sc->gap.bottom);

	screen_init_xinerama(sc);

	xu_ewmh_net_desktop_geometry(sc);
	xu_ewmh_net_workarea(sc);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0xa4(%rdi)
leaq 0x1078c(%rip), %r14     # 0x16848
movq (%r14), %rdi
movq 0xe8(%rdi), %rax
movl 0x10(%rbx), %ecx
movl 0xc4(%rbx), %edx
shlq $0x7, %rcx
movl 0x18(%rax,%rcx), %esi
movl %esi, 0xac(%rbx)
movl 0x1c(%rax,%rcx), %eax
movl %eax, 0xb0(%rbx)
movl 0xcc(%rbx), %ecx
movl %ecx, 0xb4(%rbx)
movl %edx, 0xb8(%rbx)
addl 0xd0(%rbx), %ecx
subl %ecx, %esi
movl %esi, 0xbc(%rbx)
addl 0xc8(%rbx), %edx
subl %edx, %eax
movl %eax, 0xc0(%rbx)
movl $0x0, 0x4(%rsp)
callq 0x5650
testl %eax, %eax
je 0x6138
movq (%r14), %rdi
leaq 0x4(%rsp), %rsi
callq 0x5040
movq %rax, %r14
jmp 0x613b
xorl %r14d, %r14d
movq 0x110(%rbx), %rdi
testq %rdi, %rdi
je 0x614c
callq 0x5060
movq %r14, 0x110(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x108(%rbx)
movq %rbx, %rdi
callq 0x8e5a
movq %rbx, %rdi
callq 0x8eaa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_getsizehints
void
client_getsizehints(struct client_ctx *cc)
{
	long		 tmp;

	if (!XGetWMNormalHints(X_Dpy, cc->win, cc->size, &tmp))
		cc->size->flags = PSize;

	if (cc->size->flags & PBaseSize) {
		cc->hint.basew = cc->size->base_width;
		cc->hint.baseh = cc->size->base_height;
	} else if (cc->size->flags & PMinSize) {
		cc->hint.basew = cc->size->min_width;
		cc->hint.baseh = cc->size->min_height;
	}
	if (cc->size->flags & PMinSize) {
		cc->hint.minw = cc->size->min_width;
		cc->hint.minh = cc->size->min_height;
	} else if (cc->size->flags & PBaseSize) {
		cc->hint.minw = cc->size->base_width;
		cc->hint.minh = cc->size->base_height;
	}
	if (cc->size->flags & PMaxSize) {
		cc->hint.maxw = cc->size->max_width;
		cc->hint.maxh = cc->size->max_height;
	}
	if (cc->size->flags & PResizeInc) {
		cc->hint.incw = cc->size->width_inc;
		cc->hint.inch = cc->size->height_inc;
	}
	cc->hint.incw = MAX(1, cc->hint.incw);
	cc->hint.inch = MAX(1, cc->hint.inch);

	if (cc->size->flags & PAspect) {
		if (cc->size->min_aspect.x > 0)
			cc->hint.mina = (float)cc->size->min_aspect.y /
			    cc->size->min_aspect.x;
		if (cc->size->max_aspect.y > 0)
			cc->hint.maxa = (float)cc->size->max_aspect.x /
			    cc->size->max_aspect.y;
	}
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x101a9(%rip), %rax     # 0x16848
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
leaq 0x8(%rsp), %rcx
callq 0x5130
movq 0x40(%rbx), %rcx
testl %eax, %eax
je 0x66d3
movq (%rcx), %rax
btl $0x8, %eax
jb 0x66e1
testb $0x10, %al
je 0x6705
movq 0x18(%rcx), %rdx
movq %rdx, 0x74(%rbx)
jmp 0x66f6
movq $0x8, (%rcx)
movl $0x8, %eax
jmp 0x6718
movl 0x40(%rcx), %esi
movl %esi, 0x74(%rbx)
movl 0x44(%rcx), %edx
movl %edx, 0x78(%rbx)
testb $0x10, %al
jne 0x66f6
movl %esi, 0x7c(%rbx)
jmp 0x66ff
movl 0x18(%rcx), %edx
movl %edx, 0x7c(%rbx)
movl 0x1c(%rcx), %edx
movl %edx, 0x80(%rbx)
testb $0x20, %al
je 0x6714
movq 0x20(%rcx), %rdx
movq %rdx, 0x84(%rbx)
testb $0x40, %al
jne 0x6728
leaq 0x8c(%rbx), %rdx
leaq 0x90(%rbx), %rsi
jmp 0x6730
leaq 0x28(%rcx), %rdx
leaq 0x2c(%rcx), %rsi
movl (%rdx), %edx
movl (%rsi), %esi
cmpl $0x2, %edx
movl $0x1, %edi
cmovll %edi, %edx
movl %edx, 0x8c(%rbx)
cmpl $0x2, %esi
cmovgel %esi, %edi
movl %edi, 0x90(%rbx)
testb %al, %al
jns 0x6793
movl 0x30(%rcx), %eax
testl %eax, %eax
jle 0x6771
cvtsi2ssl 0x34(%rcx), %xmm0
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x94(%rbx)
movl 0x3c(%rcx), %eax
testl %eax, %eax
jle 0x6793
xorps %xmm0, %xmm0
cvtsi2ssl 0x38(%rcx), %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x98(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_setname
void
client_setname(struct client_ctx *cc)
{
	struct winname	*wn;
	char		*newname;

	if (!xu_getstrprop(cc->win, ewmh[_NET_WM_NAME].atom, &newname))
		if (!xu_getstrprop(cc->win, XA_WM_NAME, &newname))
			newname = emptystring;

	TAILQ_FOREACH(wn, &cc->nameq, entry)
		if (strcmp(wn->name, newname) == 0) {
			/* Move to the last since we got a hit. */
			TAILQ_REMOVE(&cc->nameq, wn, entry);
			TAILQ_INSERT_TAIL(&cc->nameq, wn, entry);
			goto match;
		}

	wn = xmalloc(sizeof(*wn));
	wn->name = newname;
	TAILQ_INSERT_TAIL(&cc->nameq, wn, entry);
	cc->nameqlen++;

match:
	cc->name = wn->name;

	/* Now, do some garbage collection. */
	if (cc->nameqlen > CLIENT_MAXNAMEQLEN) {
		wn = TAILQ_FIRST(&cc->nameq);
		assert(wn != NULL);
		TAILQ_REMOVE(&cc->nameq, wn, entry);
		if (wn->name != emptystring)
			xfree(wn->name);
		xfree(wn);
		cc->nameqlen--;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
leaq 0xdd41(%rip), %rax      # 0x144f0
movq 0xc8(%rax), %rsi
movq %rsp, %rdx
callq 0x8b40
testl %eax, %eax
jne 0x67e2
movq 0x38(%rbx), %rdi
movq %rsp, %rdx
movl $0x27, %esi
callq 0x8b40
testl %eax, %eax
jne 0x67e2
leaq 0x100aa(%rip), %rax     # 0x16888
movq %rax, (%rsp)
leaq 0xc0(%rbx), %r12
movq (%rsp), %r15
movq %r12, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x684b
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x5610
testl %eax, %eax
jne 0x67f0
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq 0xc8(%rbx), %rdx
leaq 0x8(%rax), %rsi
testq %rax, %rax
cmoveq %rdx, %rsi
movq %rcx, (%rsi)
movq %rax, (%rcx)
movq $0x0, (%r14)
movq 0xc8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0xc8(%rbx)
movl 0xd0(%rbx), %eax
jmp 0x688a
movl $0x18, %edi
callq 0x6178
movq %rax, %r14
movq (%rsp), %rax
movq %rax, 0x10(%r14)
movq $0x0, (%r14)
movq 0xc8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0xc8(%rbx)
movl 0xd0(%rbx), %eax
incl %eax
movl %eax, 0xd0(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0xd8(%rbx)
cmpl $0x6, %eax
jl 0x68e5
movq (%r12), %r14
testq %r14, %r14
je 0x68f1
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq 0xc8(%rbx), %rdx
leaq 0x8(%rax), %rsi
testq %rax, %rax
cmoveq %rdx, %rsi
movq %rcx, (%rsi)
movq %rax, (%rcx)
movq 0x10(%r14), %rdi
leaq 0xffbb(%rip), %rax      # 0x16888
cmpq %rax, %rdi
je 0x68d7
callq 0x61b8
movq %r14, %rdi
callq 0x61b8
decl 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x77b6(%rip), %rdi      # 0xe0ae
leaq 0x77ba(%rip), %rsi      # 0xe0b9
leaq 0x77bc(%rip), %rcx      # 0xe0c2
movl $0x245, %edx            # imm = 0x245
callq 0x5190
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_draw_border
void
client_draw_border(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	unsigned long		 pixel;

	if (cc->active)
		switch (cc->highlight) {
		case CLIENT_HIGHLIGHT_GROUP:
			pixel = sc->color[CWM_COLOR_BORDER_GROUP].pixel;
			break;
		case CLIENT_HIGHLIGHT_UNGROUP:
			pixel = sc->color[CWM_COLOR_BORDER_UNGROUP].pixel;
			break;
		default:
			pixel = sc->color[CWM_COLOR_BORDER_ACTIVE].pixel;
			break;
		}
	else
		pixel = sc->color[CWM_COLOR_BORDER_INACTIVE].pixel;

	XSetWindowBorderWidth(X_Dpy, cc->win, cc->bwidth);
	XSetWindowBorder(X_Dpy, cc->win, pixel);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rax
cmpl $0x0, 0xb0(%rdi)
je 0x6970
movl 0xb8(%rbx), %ecx
cmpl $0x2, %ecx
movl $0x60, %edx
movl $0x30, %esi
cmoveq %rdx, %rsi
cmpl $0x1, %ecx
movl $0x50, %ecx
cmovneq %rsi, %rcx
jmp 0x6975
movl $0x40, %ecx
movq (%rax,%rcx), %r14
leaq 0xfec8(%rip), %r15      # 0x16848
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
movl 0x50(%rbx), %edx
callq 0x5660
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x5330
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_transient
void
client_transient(struct client_ctx *cc)
{
	struct client_ctx	*tc;
	Window			 trans;

	if (XGetTransientForHint(X_Dpy, cc->win, &trans)) {
		if ((tc = client_find(trans)) && tc->group) {
			group_movetogroup(cc, tc->group->shortcut - 1);
			if (tc->flags & CLIENT_IGNORE)
				cc->flags |= CLIENT_IGNORE;
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xfe97(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
movq %rsp, %rdx
callq 0x57b0
testl %eax, %eax
je 0x6a07
leaq 0xdab5(%rip), %r14      # 0x14480
movq (%rsp), %rax
movq (%r14), %r14
testq %r14, %r14
je 0x6a07
cmpq %rax, 0x38(%r14)
jne 0x69cf
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x6a07
movl 0x20(%rax), %esi
decl %esi
movq %rbx, %rdi
callq 0xa4f4
testb $0x2, 0xa8(%r14)
je 0x6a07
orb $0x2, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_hide
void
client_hide(struct client_ctx *cc)
{
	/* XXX - add wm_state stuff */
	XUnmapWindow(X_Dpy, cc->win);

	cc->active = 0;
	cc->flags |= CLIENT_HIDDEN;
	xu_setstate(cc, IconicState);

	if (cc == _curcc)
		client_none(cc->sc);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xfe2e(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
callq 0x53c0
movl $0x0, 0xb0(%rbx)
orb $0x1, 0xa8(%rbx)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8c69
cmpq %rbx, 0xfe35(%rip)      # 0x16880
jne 0x6a63
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x8fc9
movq $0x0, 0xfe1d(%rip) # 0x16880
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_unhide
void
client_unhide(struct client_ctx *cc)
{
	XMapRaised(X_Dpy, cc->win);

	cc->highlight = 0;
	cc->flags &= ~CLIENT_HIDDEN;
	xu_setstate(cc, NormalState);
	client_draw_border(cc);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xfdd8(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
callq 0x5800
movl $0x0, 0xb8(%rbx)
andb $-0x2, 0xa8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8c69
movq %rbx, %rdi
popq %rbx
jmp 0x6936
// File: /workspace/github_c_makefile_star2_O3/zenlinux[P]cwm/client.c
// Function: client_delete
void
client_delete(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	struct winname		*wn;

	group_client_delete(cc);

	XGrabServer(X_Dpy);
	xu_setstate(cc, WithdrawnState);
	XRemoveFromSaveSet(X_Dpy, cc->win);

	XSync(X_Dpy, False);
	XUngrabServer(X_Dpy);

	TAILQ_REMOVE(&sc->mruq, cc, mru_entry);
	TAILQ_REMOVE(&Clientq, cc, entry);

	xu_ewmh_net_client_list(sc);

	if (_curcc == cc)
		client_none(sc);

	XFree(cc->size);

	while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) {
		TAILQ_REMOVE(&cc->nameq, wn, entry);
		if (wn->name != emptystring)
			xfree(wn->name);
		xfree(wn);
	}

	client_freehints(cc);
	xfree(cc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %r14
callq 0xaa0d
leaq 0xfd8a(%rip), %r15      # 0x16848
movq (%r15), %rdi
callq 0x5120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8c69
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
callq 0x5280
movq (%r15), %rdi
xorl %esi, %esi
callq 0x55b0
movq (%r15), %rdi
callq 0x5420
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
leaq 0xe0(%r14), %rdx
leaq 0x28(%rax), %rsi
testq %rax, %rax
cmoveq %rdx, %rsi
movq %rcx, (%rsi)
movq %rax, (%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, %rdx
testq %rax, %rax
jne 0x6b24
leaq 0xd95c(%rip), %rdx      # 0x14480
movq %rcx, 0x8(%rdx)
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x8f29
cmpq %rbx, 0xfd46(%rip)      # 0x16880
jne 0x6b51
movq %r14, %rdi
xorl %esi, %esi
callq 0x8fc9
movq $0x0, 0xfd2f(%rip) # 0x16880
movq 0x40(%rbx), %rdi
callq 0x5060
movq 0xc0(%rbx), %r14
testq %r14, %r14
je 0x6bae
leaq 0xc8(%rbx), %r15
leaq 0xfd14(%rip), %r12      # 0x16888
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r15, %rdx
movq %rcx, (%rdx)
movq %rax, (%rcx)
movq 0x10(%r14), %rdi
cmpq %r12, %rdi
je 0x6b9a
callq 0x61b8
movq %r14, %rdi
callq 0x61b8
movq 0xc0(%rbx), %r14
testq %r14, %r14
jne 0x6b74
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
je 0x6bbf
callq 0x5060
movq 0xf8(%rbx), %rdi
testq %rdi, %rdi
je 0x6bd0
callq 0x5060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x61b8