LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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, 0xbd6d(%rip)      # 0x17688
je 0xb935
leaq 0x6a90(%rip), %rsi      # 0x123b4
movl $0x3, %edi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0xd5b0
movl $0x18, %edi
movl $0xcf, %esi
callq 0x5d3e
movq %rax, %rbx
leaq 0xb972(%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, 0xbd1c(%rip)      # 0x17688
leaq 0xb955(%rip), %r14      # 0x172c8
leaq 0x6ef(%rip), %rdx       # 0xc069
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2380
testl %eax, %eax
je 0xb9cb
callq 0x2070
movl (%rax), %edi
callq 0x2480
leaq 0x6a52(%rip), %rsi      # 0x123f0
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd5b0
movq %rbx, %rdi
movl $0x4bd, %esi            # imm = 0x4BD
callq 0x5f5b
movq $0x0, (%r15)
movb $0x0, 0xbcc3(%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_O1/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 0xbb75
cmpb $0x0, 0x1d(%r8)
je 0xbbca
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 0xbbe9
callq 0x2070
movl (%rax), %edi
cmpl $0x1, %edi
jne 0xbbce
movl $0x1, %edi
callq 0x2480
movzwl 0x2(%rbx), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
leaq 0x68a4(%rip), %rsi      # 0x12460
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd5b0
jmp 0xbbe6
xorl %ebp, %ebp
jmp 0xbbe9
callq 0x2480
leaq 0x68e1(%rip), %rsi      # 0x124bb
xorl %edi, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0xd5b0
movb $-0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb716(%rip), %rax      # 0x17310
movq (%rax), %rbx
cmpl $0x0, 0x18(%rbx)
jle 0xbc2a
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xbc13
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_O1/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 0xba45(%rip), %rax      # 0x17680
movb $0x1, (%rax)
leaq 0xb675(%rip), %r15      # 0x172ba
cmpb $0x0, (%r15)
je 0xbc55
movl $0x1, %edi
callq 0x8352
callq 0xbbf2
leaq 0xb6af(%rip), %rbx      # 0x17310
movq (%rbx), %r14
cmpq %rbx, %r14
je 0xbc97
movq (%r14), %r12
movq %r14, %rdi
callq 0xaafa
movq %rbx, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5bcf
movq %r14, %rdi
movl $0x4be, %esi            # imm = 0x4BE
callq 0x5f5b
movq %r12, %r14
cmpq %rbx, %r12
jne 0xbc69
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 0x7f9f
addq $0x8, %rsp
leaq 0x5015(%rip), %r9       # 0x10cdd
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %rbx
pushq $0x2
pushq $0x43
callq 0x79b0
addq $0x20, %rsp
cmpb $0x0, (%r15)
je 0xbcfb
leaq 0xb5d2(%rip), %rax      # 0x172c0
cmpq $0x0, (%rax)
je 0xbcfb
movq $0x0, (%rax)
leaq 0xb65e(%rip), %rax      # 0x17360
movl (%rax), %edi
testl %edi, %edi
je 0xbd0d
callq 0x21f0
leaq 0xb6f4(%rip), %rbx      # 0x17408
movl (%rbx), %edi
testl %edi, %edi
je 0xbd1f
callq 0x21f0
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbd37
xorl %esi, %esi
callq 0x2470
movq $0x0, 0x8(%rbx)
leaq 0xb57a(%rip), %rax      # 0x172b8
cmpb $0x0, (%rax)
jne 0xbd48
callq 0x2060
leaq 0xb589(%rip), %rax      # 0x172d8
cmpq $0x0, (%rax)
je 0xbd80
leaq 0xb584(%rip), %rax      # 0x172e0
movl (%rax), %edi
callq 0x21f0
leaq 0xb616(%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_O1/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 0xb552(%rip), %rax      # 0x172ec
cmpb $0x0, (%rax)
jne 0xbe15
leaq 0xb8da(%rip), %rax      # 0x17680
movb $0x1, (%rax)
callq 0xbbf2
leaq 0xb505(%rip), %rax      # 0x172ba
cmpb $0x0, (%rax)
je 0xbdce
leaq 0xb4ff(%rip), %rax      # 0x172c0
cmpq $0x0, (%rax)
je 0xbdce
movq $0x0, (%rax)
testb %bl, %bl
jne 0xbe10
leaq 0xb557(%rip), %r15      # 0x17330
movq (%r15), %rdi
xorl %esi, %esi
callq 0x6416
testq %rax, %rax
je 0xbe10
movq %rax, %r14
movq 0x8(%r14), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x302c
movq (%r15), %rdi
movq %r14, %rsi
callq 0x6416
movq %rax, %r14
testq %rax, %rax
jne 0xbdeb
callq 0xbc2c
testb %bl, %bl
je 0xbe23
movl $0xb, %edi
callq 0x2040
movl $0x1, %edi
callq 0x2440
// File: /workspace/github_c_makefile_star2_O1/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 0x669d(%rip), %rsi      # 0x124de
xorl %edi, %edi
xorl %eax, %eax
callq 0xd5b0
xorl %edi, %edi
callq 0x86e9
movl $0x1, %edi
callq 0x86e9
movl $0x1, %edi
callq 0xbd8c
// File: /workspace/github_c_makefile_star2_O1/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 0xb413(%rip), %r14      # 0x17288
cmpb $0x0, (%r14)
je 0xbf09
xorl %r15d, %r15d
leaq 0xb4bf(%rip), %r12      # 0x17348
movq 0x8(%r12), %rax
movsbq %r15b, %r15
cmpw $0x0, (%rax,%r15,2)
jle 0xbed5
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rbx
cmpq %rdi, %rbx
je 0xbed5
movq (%rbx), %r13
movq %rbx, %rsi
movq %rdi, %rdx
callq 0x5bcf
movq %rbx, %rdi
movl $0x4c2, %esi            # imm = 0x4C2
callq 0x5f5b
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
movq %r13, %rbx
cmpq %rdi, %r13
jne 0xbeaa
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
movl $0x4c3, %esi            # imm = 0x4C3
callq 0x5f5b
movq 0x10(%r12), %rax
movq (%rax,%r15,8), %rdi
movl $0x4c4, %esi            # imm = 0x4C4
callq 0x5f5b
incb %r15b
movsbl %r15b, %eax
movzbl (%r14), %ecx
cmpl %ecx, %eax
jl 0xbe89
leaq 0xb438(%rip), %rbx      # 0x17348
movq (%rbx), %rdi
movl $0x4c5, %esi            # imm = 0x4C5
callq 0x5f5b
movq 0x10(%rbx), %rdi
movl $0x4c6, %esi            # imm = 0x4C6
callq 0x5f5b
movq 0x8(%rbx), %rdi
movl $0x4c7, %esi            # imm = 0x4C7
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5f5b
// File: /workspace/github_c_makefile_star2_O1/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 0xc016
callq 0x22b0
testl %eax, %eax
jne 0xc016
leaq 0xb3cd(%rip), %rax      # 0x17338
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0xb3a7(%rip), %rax      # 0x17320
movq %rax, (%rax)
movq %rax, 0x8(%rax)
leaq 0xb389(%rip), %rax      # 0x17310
movq %rax, (%rax)
movq %rax, 0x8(%rax)
callq 0x69d0
movl $0x2, %edi
callq 0x23f0
cvtsi2ss %rax, %xmm0
movss %xmm0, 0xb70e(%rip)     # 0x176b8
callq 0xc01e
movq %rax, 0xb70a(%rip)      # 0x176c0
callq 0xc01e
movq %rax, %rcx
subq 0xb6fb(%rip), %rcx      # 0x176c0
leaq 0xb334(%rip), %rdx      # 0x17300
addq %rcx, (%rdx)
movq %rax, 0xb6ea(%rip)      # 0x176c0
movl %ebp, %edi
movq %rbx, %rsi
callq 0x95c0
callq 0xc050
callq 0x2100
movl %eax, %edi
callq 0x2240
callq 0x34d1
movl %eax, %ebx
callq 0x78d1
callq 0xbc2c
callq 0xbe65
callq 0x5cf0
movsbl %bl, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x2be1
// File: /workspace/github_c_makefile_star2_O1/open-mesh-mirror[P]batmand/posix/tunnel.c
// Function: choose_vip
static int choose_vip(void *data, int32_t size)
{
	unsigned char *key= data;
	uint32_t hash = 0;
	size_t i;

	for (i = 4; i < 8; i++) {
		hash += key[i];
		hash += (hash << 10);
		hash ^= (hash >> 6);
	}

	hash += (hash << 3);
	hash ^= (hash >> 11);
	hash += (hash << 15);

	return (hash%size);

}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
movzbl 0x4(%rdi,%rax), %edx
addl %ecx, %edx
movl %edx, %r8d
shll $0xa, %r8d
addl %edx, %r8d
movl %r8d, %ecx
shrl $0x6, %ecx
xorl %r8d, %ecx
incq %rax
cmpq $0x4, %rax
jne 0xd450
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0xb, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xf, %eax
addl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x7cbe(%rip), %rsi      # 0xa01a
movq %rsp, %rdi
movl $0x1, %ebx
movl $0x1, %edx
callq 0x3441
testl %eax, %eax
jne 0x244d
callq 0x2b88
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 0x3be5
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3c15
testq %rax, %rax
je 0x241b
movq %rax, %r15
leaq 0x10(%rsp), %r14
leaq 0x8(%rsp), %r12
leaq 0x7c7b(%rip), %r13      # 0xa03e
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 0x3c15
movq %rax, %r15
testq %rax, %rax
jne 0x23c3
movq (%rsp), %rdi
callq 0x3c1e
movq %rbx, %rdi
callq 0x2bf9
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_O1/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 0x8184
cmpl $0x7f, %edi
jg 0x80f7
movb %dil, (%rsi)
movl $0x1, %eax
retq
cmpl $0x7ff, %edi            # imm = 0x7FF
jg 0x811a
movl %edi, %eax
shrl $0x6, %eax
addb $-0x40, %al
movb %al, (%rsi)
andb $0x3f, %dil
orb $-0x80, %dil
movb %dil, 0x1(%rsi)
movl $0x2, %eax
retq
cmpl $0xffff, %edi           # imm = 0xFFFF
jg 0x8149
movl %edi, %eax
shrl $0xc, %eax
addb $-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
jg 0x8184
movl %edi, %eax
shrl $0x12, %eax
addb $-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_O1/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 0x826d
movl %edi, %ecx
xorl $0x2, %ecx
movl %esi, %edx
xorl $0x3, %edx
orl %ecx, %edx
jne 0x826e
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 0x826d
cmpl $0x5, %esi
je 0x826b
cmpl $0x9, %edi
je 0x82b4
cmpl $0x7, %edi
je 0x82b4
cmpl $0x6, %edi
jne 0x82bc
leal -0x6(%rsi), %eax
cmpl $0x5, %eax
jae 0x82aa
movl $0x1b, %ecx
btl %eax, %ecx
jb 0x826b
cmpl $0x9, %edi
je 0x82b4
cmpl $0x7, %edi
jne 0x82bc
leal -0x7(%rsi), %eax
cmpl $0x2, %eax
jb 0x826b
movl %edi, %eax
andl $-0x3, %eax
xorl $0x8, %eax
movl %esi, %ecx
xorl $0x8, %ecx
orl %eax, %ecx
je 0x826b
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_O1/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 0x890a
movq %rax, %rbx
testq %rax, %rax
js 0x8fe0
leaq 0x1(,%rbx,4), %rdi
callq 0x2180
testq %rax, %rax
je 0x8fd9
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x890a
movq %rax, %rbx
testq %rax, %rax
js 0x8fcf
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x8aea
movq %rax, %rbx
testq %rax, %rax
js 0x8fcf
movq %rbx, %rsi
incq %rsi
movq %r15, %rdi
callq 0x21b0
testq %rax, %rax
cmovneq %rax, %r15
movq %r15, (%r14)
jmp 0x8fe0
movq %r15, %rdi
callq 0x2030
jmp 0x8fe0
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_O1/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
movl %edx, %esi
movq 0x2a75(%rip), %r10      # 0x4078
movq 0x2a66(%rip), %r9       # 0x4070
movabsq $0x5851f42d4c957f2d, %r11 # imm = 0x5851F42D4C957F2D
movq %r9, %r8
shrq $0x2d, %r8
movq %r9, %rax
shrq $0x1b, %rax
xorl %eax, %r8d
movq %r9, %rcx
shrq $0x3b, %rcx
rorl %cl, %r8d
cmpl %esi, %r8d
jb 0x163b
movl %r8d, %eax
xorl %edx, %edx
divl %edi
imulq %r11, %r9
addq %r10, %r9
cmpl %esi, %r8d
jb 0x1614
movq %r9, 0x2a22(%rip)       # 0x4070
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xe0a1(%rip), %rax      # 0x13fe8
movq (%rax), %rdi
movq 0xe08f(%rip), %rax      # 0x13fe0
movq (%rax), %rdx
leaq 0x80c7(%rip), %rsi      # 0xe022
xorl %eax, %eax
callq 0x5830
movl $0x1, %edi
callq 0x5180
// File: /workspace/github_c_makefile_star2_O1/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 0x5590
movq %rax, %rbx
movl (%rax), %ebp
leaq 0xc(%rsp), %r14
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
movl $0x1, %edx
callq 0x5540
testl %eax, %eax
jg 0x5f83
jns 0x5fa0
cmpl $0x4, (%rbx)
je 0x5f83
movl %ebp, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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     # 0x16858
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 0x5860
testl %eax, %eax
je 0x605e
cmpl $0x0, 0xc(%rsp)
je 0x6054
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x61f0
testq %rax, %rax
je 0x6048
testb $0x1, 0xa8(%rax)
jne 0x6048
movl %ebp, 0xb4(%rax)
incl %ebp
incq %rbx
movl 0xc(%rsp), %eax
cmpq %rax, %rbx
jb 0x6024
movq 0x10(%rsp), %rdi
callq 0x5060
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x60b0
movslq 0x108(%rdi), %rcx
testq %rcx, %rcx
jle 0x60b0
movswl 0x4(%rax), %edi
cmpl %esi, %edi
jg 0x60a7
movswl 0x8(%rax), %r8d
addl %edi, %r8d
cmpl %esi, %r8d
jle 0x60a7
movswl 0x6(%rax), %edi
cmpl %edx, %edi
jg 0x60a7
movswl 0xa(%rax), %r8d
addl %edi, %r8d
cmpl %edx, %r8d
jg 0x60b2
addq $0xc, %rax
decq %rcx
jne 0x607d
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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     # 0x16858
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 0x5660
testl %eax, %eax
je 0x6148
movq (%r14), %rdi
leaq 0x4(%rsp), %rsi
callq 0x5040
movq %rax, %r14
jmp 0x614b
xorl %r14d, %r14d
movq 0x110(%rbx), %rdi
testq %rdi, %rdi
je 0x615c
callq 0x5060
movq %r14, 0x110(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x108(%rbx)
movq %rbx, %rdi
callq 0x9001
movq %rbx, %rdi
callq 0x9051
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x10198(%rip), %rax     # 0x16858
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
leaq 0x8(%rsp), %rcx
callq 0x5130
testl %eax, %eax
jne 0x66e4
movq 0x40(%rbx), %rax
movq $0x8, (%rax)
movq 0x40(%rbx), %rax
movq (%rax), %rcx
btl $0x8, %ecx
jb 0x6702
testb $0x10, %cl
je 0x6718
movl $0x1c, %edx
movl $0x18, %esi
jmp 0x670c
movl $0x44, %edx
movl $0x40, %esi
movl (%rax,%rsi), %esi
movl %esi, 0x74(%rbx)
movl (%rax,%rdx), %edx
movl %edx, 0x78(%rbx)
testl $0x110, %ecx            # imm = 0x110
je 0x6749
leaq 0x18(%rax), %rdx
leaq 0x40(%rax), %rsi
leaq 0x1c(%rax), %rdi
leaq 0x44(%rax), %r8
testb $0x10, %cl
cmoveq %rsi, %rdx
movl (%rdx), %edx
movl %edx, 0x7c(%rbx)
cmovneq %rdi, %r8
movl (%r8), %edx
movl %edx, 0x80(%rbx)
testb $0x20, %cl
je 0x6760
movl 0x20(%rax), %edx
movl %edx, 0x84(%rbx)
movl 0x24(%rax), %edx
movl %edx, 0x88(%rbx)
testb $0x40, %cl
je 0x6777
movl 0x28(%rax), %edx
movl %edx, 0x8c(%rbx)
movl 0x2c(%rax), %edx
movl %edx, 0x90(%rbx)
movl 0x8c(%rbx), %edx
movl 0x90(%rbx), %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 %cl, %cl
jns 0x67e2
movl 0x30(%rax), %ecx
testl %ecx, %ecx
jle 0x67c0
cvtsi2ssl 0x34(%rax), %xmm0
cvtsi2ss %ecx, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x94(%rbx)
movl 0x3c(%rax), %ecx
testl %ecx, %ecx
jle 0x67e2
xorps %xmm0, %xmm0
cvtsi2ssl 0x38(%rax), %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x98(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xdd02(%rip), %rax      # 0x14500
movq 0xc8(%rax), %rsi
movq %rsp, %rdx
callq 0x8ce7
testl %eax, %eax
jne 0x6831
movq 0x38(%rbx), %rdi
movq %rsp, %rdx
movl $0x27, %esi
callq 0x8ce7
testl %eax, %eax
jne 0x6831
leaq 0x1006b(%rip), %rax     # 0x16898
movq %rax, (%rsp)
leaq 0xc0(%rbx), %r12
movq (%rsp), %r15
movq %r12, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x6898
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x5620
testl %eax, %eax
jne 0x683f
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 0x8(%r14), %rcx
movq %rax, (%rcx)
movq $0x0, (%r14)
movq 0xc8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0xc8(%rbx)
jmp 0x68cf
movl $0x18, %edi
callq 0x6188
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)
incl 0xd0(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0xd8(%rbx)
cmpl $0x6, 0xd0(%rbx)
jl 0x6932
movq (%r12), %r14
testq %r14, %r14
je 0x693e
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 0x8(%r14), %rcx
movq %rax, (%rcx)
movq 0x10(%r14), %rdi
leaq 0xff7e(%rip), %rax      # 0x16898
cmpq %rax, %rdi
je 0x6924
callq 0x61c8
movq %r14, %rdi
callq 0x61c8
decl 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x7769(%rip), %rdi      # 0xe0ae
leaq 0x776d(%rip), %rsi      # 0xe0b9
leaq 0x776f(%rip), %rcx      # 0xe0c2
movl $0x245, %edx            # imm = 0x245
callq 0x5190
// File: /workspace/github_c_makefile_star2_O1/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 0x69bd
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 0x69c2
movl $0x40, %ecx
movq (%rax,%rcx), %r14
leaq 0xfe8b(%rip), %r15      # 0x16858
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
movl 0x50(%rbx), %edx
callq 0x5670
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x5340
// File: /workspace/github_c_makefile_star2_O1/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 0xfe5a(%rip), %rax      # 0x16858
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
movq %rsp, %rdx
callq 0x57c0
testl %eax, %eax
je 0x6a5e
leaq 0xda78(%rip), %r14      # 0x14490
movq (%rsp), %rax
movq (%r14), %r14
testq %r14, %r14
je 0x6a2c
cmpq %rax, 0x38(%r14)
jne 0x6a1c
jmp 0x6a2f
xorl %r14d, %r14d
testq %r14, %r14
je 0x6a5e
movq 0xf0(%r14), %rax
testq %rax, %rax
je 0x6a5e
movl 0x20(%rax), %esi
decl %esi
movq %rbx, %rdi
callq 0xa6b1
testb $0x2, 0xa8(%r14)
je 0x6a5e
orb $0x2, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xfde7(%rip), %rax      # 0x16858
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
callq 0x53d0
movl $0x0, 0xb0(%rbx)
orb $0x1, 0xa8(%rbx)
movq %rbx, %rdi
movl $0x3, %esi
callq 0x8e10
cmpq %rbx, 0xfdee(%rip)      # 0x16890
jne 0x6aba
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0x9174
movq $0x0, 0xfdd6(%rip) # 0x16890
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xfd91(%rip), %rax      # 0x16858
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
callq 0x5810
movl $0x0, 0xb8(%rbx)
andb $-0x2, 0xa8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x8e10
movq %rbx, %rdi
popq %rbx
jmp 0x6983
// File: /workspace/github_c_makefile_star2_O1/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 0xabbf
leaq 0xfd43(%rip), %r15      # 0x16858
movq (%r15), %rdi
callq 0x5120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8e10
movq (%r15), %rdi
movq 0x38(%rbx), %rsi
callq 0x5290
movq (%r15), %rdi
xorl %esi, %esi
callq 0x55c0
movq (%r15), %rdi
callq 0x5430
movq 0x20(%rbx), %rax
leaq 0xe0(%r14), %rcx
leaq 0x28(%rax), %rdx
testq %rax, %rax
cmoveq %rcx, %rdx
movq 0x28(%rbx), %rcx
movq %rcx, (%rdx)
movq 0x28(%rbx), %rcx
movq %rax, (%rcx)
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %rax, %rdx
testq %rax, %rax
jne 0x6b7f
leaq 0xd911(%rip), %rdx      # 0x14490
movq %rcx, 0x8(%rdx)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x90d4
cmpq %rbx, 0xfcf7(%rip)      # 0x16890
jne 0x6bb0
movq %r14, %rdi
xorl %esi, %esi
callq 0x9174
movq $0x0, 0xfce0(%rip) # 0x16890
movq 0x40(%rbx), %rdi
callq 0x5060
movq 0xc0(%rbx), %r14
testq %r14, %r14
je 0x6c11
leaq 0xc8(%rbx), %r15
leaq 0xfcc5(%rip), %r12      # 0x16898
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r15, %rdx
movq %rcx, (%rdx)
movq 0x8(%r14), %rcx
movq %rax, (%rcx)
movq 0x10(%r14), %rdi
cmpq %r12, %rdi
je 0x6bfd
callq 0x61c8
movq %r14, %rdi
callq 0x61c8
movq 0xc0(%rbx), %r14
testq %r14, %r14
jne 0x6bd3
movq 0x100(%rbx), %rdi
testq %rdi, %rdi
je 0x6c22
callq 0x5060
movq 0xf8(%rbx), %rdi
testq %rdi, %rdi
je 0x6c33
callq 0x5060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x61c8
// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/client.c
// Function: client_setactive
void
client_setactive(struct client_ctx *cc, int fg)
{
	struct screen_ctx	*sc;

	if (cc == NULL)
		cc = _curcc;
	if (cc == NULL)
		return;

	sc = cc->sc;

	if (fg) {
		XInstallColormap(X_Dpy, cc->cmap);
		XSetInputFocus(X_Dpy, cc->win,
		    RevertToPointerRoot, CurrentTime);
		conf_grab_mouse(cc);
		/*
		 * If we're in the middle of alt-tabbing, don't change
		 * the order please.
		 */
		if (!sc->cycling)
			client_mtf(cc);
	} else
		client_leave(cc);

	if (fg && _curcc != cc) {
		client_setactive(NULL, 0);
		_curcc = cc;
		xu_ewmh_net_active_window(sc, cc->win);
	}

	cc->active = fg;
	client_draw_border(cc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testq %rdi, %rdi
jne 0x6c88
movq 0xfc08(%rip), %r14      # 0x16890
testq %r14, %r14
je 0x6cd9
movq 0x30(%r14), %r15
testl %ebx, %ebx
je 0x6ce5
leaq 0xfbbc(%rip), %r12      # 0x16858
movq (%r12), %rdi
movq 0x48(%r14), %rsi
callq 0x5650
movq (%r12), %rdi
movq 0x38(%r14), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x5580
movq %r14, %rdi
callq 0x9caf
cmpl $0x0, 0xa0(%r15)
jne 0x6cf8
movq %r14, %rdi
callq 0x6d3b
jmp 0x6cf8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x18(%r15), %rdi
movl $0x8000, %esi           # imm = 0x8000
movl $0x1, %edx
callq 0x8994
testl %ebx, %ebx
je 0x6d21
cmpq %r14, 0xfb8d(%rip)      # 0x16890
je 0x6d21
xorl %edi, %edi
xorl %esi, %esi
callq 0x6c6f
movq %r14, 0xfb7b(%rip)      # 0x16890
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x9174
movl %ebx, 0xb0(%r14)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6983
// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/client.c
// Function: client_mtf
void
client_mtf(struct client_ctx *cc)
{
	struct screen_ctx	*sc;

	if (cc == NULL)
		cc = _curcc;
	if (cc == NULL)
		return;

	sc = cc->sc;

	/* Move to front. */
	TAILQ_REMOVE(&sc->mruq, cc, mru_entry);
	TAILQ_INSERT_HEAD(&sc->mruq, cc, mru_entry);
}

// Assembly:
testq %rdi, %rdi
jne 0x6d47
movq 0xfb49(%rip), %rdi      # 0x16890
testq %rdi, %rdi
je 0x6da3
movq 0x30(%rdi), %rax
leaq 0x20(%rdi), %rcx
movq 0x20(%rdi), %rdx
movq 0x28(%rdi), %rsi
leaq 0xe0(%rax), %r8
leaq 0x28(%rdx), %r9
testq %rdx, %rdx
cmoveq %r8, %r9
movq %rsi, (%r9)
movq 0x28(%rdi), %rsi
movq %rdx, (%rsi)
leaq 0xd8(%rax), %rdx
movq 0xd8(%rax), %rsi
leaq 0x28(%rsi), %r9
testq %rsi, %rsi
cmoveq %r8, %r9
movq %rsi, 0x20(%rdi)
movq %rcx, (%r9)
movq %rdi, 0xd8(%rax)
movq %rdx, 0x28(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/client.c
// Function: client_maximize
void
client_maximize(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	int			 x_org, y_org, xmax, ymax;
	XineramaScreenInfo	*xine;

	if (cc->flags & CLIENT_FREEZE)
		return;

	if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_MAXIMIZED) {
		cc->flags &= ~CLIENT_MAXIMIZED;
		cc->geom = cc->savegeom;
		cc->bwidth = Conf.bwidth;
		goto resize;
	}

	if ((cc->flags & CLIENT_VMAXIMIZED) == 0) {
		cc->savegeom.h = cc->geom.h;
		cc->savegeom.y = cc->geom.y;
	}

	if ((cc->flags & CLIENT_HMAXIMIZED) == 0) {
		cc->savegeom.w = cc->geom.w;
		cc->savegeom.x = cc->geom.x;
	}

	/*
	 * pick screen that the middle of the window is on.
	 * that's probably more fair than if just the origin of
	 * a window is poking over a boundary
	 */
	xine = screen_find_xinerama(sc,
	    cc->geom.x + cc->geom.w / 2,
	    cc->geom.y + cc->geom.h / 2);
	if (xine) {
		x_org = xine->x_org;
		y_org = xine->y_org;
		xmax = xine->width;
		ymax = xine->height;
	} else {
		x_org = y_org = 0;
		xmax = sc->view.w;
		ymax = sc->view.h;
	}

	cc->geom.x = x_org + sc->gap.left;
	cc->geom.y = y_org + sc->gap.top;
	cc->geom.h = ymax - (sc->gap.top + sc->gap.bottom);
	cc->geom.w = xmax - (sc->gap.left + sc->gap.right);
	cc->bwidth = 0;
	cc->flags |= CLIENT_MAXIMIZED;

resize:
	client_resize(cc, 0);
}

// Assembly:
movl 0xa8(%rdi), %eax
testb $0x10, %al
jne 0x6df1
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %eax, %ecx
notl %ecx
testb $0xc, %cl
jne 0x6df2
andl $-0x1d, %eax
movl %eax, 0xa8(%rbx)
movups 0x64(%rbx), %xmm0
movups %xmm0, 0x54(%rbx)
leaq 0xd98a(%rip), %rax      # 0x14770
movl 0x54(%rax), %eax
movl %eax, 0x50(%rbx)
jmp 0x6ea3
retq
testb $0x4, %al
jne 0x6e02
movl 0x58(%rbx), %ecx
movl 0x60(%rbx), %edx
movl %edx, 0x70(%rbx)
movl %ecx, 0x68(%rbx)
movq 0x30(%rbx), %r14
testb $0x8, %al
jne 0x6e16
movl 0x54(%rbx), %eax
movl 0x5c(%rbx), %ecx
movl %ecx, 0x6c(%rbx)
movl %eax, 0x64(%rbx)
movl 0x5c(%rbx), %eax
movl 0x60(%rbx), %ecx
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
addl 0x54(%rbx), %esi
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
addl 0x58(%rbx), %edx
movq %r14, %rdi
callq 0x6065
testq %rax, %rax
je 0x6e53
movswl 0x4(%rax), %esi
movswl 0x6(%rax), %edx
movswl 0x8(%rax), %ecx
movswl 0xa(%rax), %eax
jmp 0x6e65
movl 0xac(%r14), %ecx
movl 0xb0(%r14), %eax
xorl %edx, %edx
xorl %esi, %esi
movl 0xcc(%r14), %edi
addl %edi, %esi
movl %esi, 0x54(%rbx)
movl 0xc4(%r14), %esi
addl %esi, %edx
movl %edx, 0x58(%rbx)
addl 0xc8(%r14), %esi
subl %esi, %eax
movl %eax, 0x60(%rbx)
addl 0xd0(%r14), %edi
subl %edi, %ecx
movl %ecx, 0x5c(%rbx)
movl $0x0, 0x50(%rbx)
orb $0xc, 0xa8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6eb4
// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/client.c
// Function: client_resize
void
client_resize(struct client_ctx *cc, int reset)
{
	if (reset) {
		cc->flags &= ~CLIENT_MAXIMIZED;
		cc->bwidth = Conf.bwidth;
	}

	client_draw_border(cc);

	XMoveResizeWindow(X_Dpy, cc->win, cc->geom.x,
	    cc->geom.y, cc->geom.w, cc->geom.h);
	xu_configure(cc);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x6ed0
andb $-0xd, 0xa8(%rbx)
leaq 0xd8a6(%rip), %rax      # 0x14770
movl 0x54(%rax), %eax
movl %eax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x6983
leaq 0xf979(%rip), %rax      # 0x16858
movq (%rax), %rdi
movq 0x38(%rbx), %rsi
movl 0x54(%rbx), %edx
movl 0x58(%rbx), %ecx
movl 0x5c(%rbx), %r8d
movl 0x60(%rbx), %r9d
callq 0x5450
movq %rbx, %rdi
popq %rbx
jmp 0x8b8b
// File: /workspace/github_c_makefile_star2_O1/zenlinux[P]cwm/client.c
// Function: client_vertmaximize
void
client_vertmaximize(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	int			 y_org, ymax;
	XineramaScreenInfo	*xine;

	if (cc->flags & CLIENT_FREEZE)
		return;

	if (cc->flags & CLIENT_VMAXIMIZED) {
		cc->geom.y = cc->savegeom.y;
		cc->geom.h = cc->savegeom.h;
		cc->bwidth = Conf.bwidth;
		if (cc->flags & CLIENT_HMAXIMIZED)
			cc->geom.w -= cc->bwidth * 2;
		cc->flags &= ~CLIENT_VMAXIMIZED;
		goto resize;
	}

	cc->savegeom.y = cc->geom.y;
	cc->savegeom.h = cc->geom.h;

	/* if this will make us fully maximized then remove boundary */
	if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_HMAXIMIZED) {
		cc->geom.w += Conf.bwidth * 2;
		cc->bwidth = 0;
	}

	xine = screen_find_xinerama(sc,
	    cc->geom.x + cc->geom.w / 2,
	    cc->geom.y + cc->geom.h / 2);
	if (xine) {
		y_org = xine->y_org;
		ymax = xine->height;
	} else {
		y_org = 0;
		ymax = sc->view.h;
	}

	cc->geom.y = y_org + sc->gap.top;
	cc->geom.h = ymax - (cc->bwidth * 2) - (sc->gap.top +
	    sc->gap.bottom);
	cc->flags |= CLIENT_VMAXIMIZED;

resize:
	client_resize(cc, 0);
}

// Assembly:
movl 0xa8(%rdi), %eax
testb $0x10, %al
jne 0x6f72
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x4, %al
jne 0x6f73
movq 0x30(%rbx), %r14
movl 0x58(%rbx), %ecx
movl 0x60(%rbx), %edi
movl %ecx, 0x68(%rbx)
movl %edi, 0x70(%rbx)
testb $0x8, %al
je 0x6f41
leaq 0xd83e(%rip), %rax      # 0x14770
movl 0x54(%rax), %eax
addl %eax, %eax
addl %eax, 0x5c(%rbx)
movl $0x0, 0x50(%rbx)
movl 0x5c(%rbx), %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
addl 0x54(%rbx), %esi
movl %edi, %edx
shrl $0x1f, %edx
addl %edi, %edx
sarl %edx
addl %ecx, %edx
movq %r14, %rdi
callq 0x6065
testq %rax, %rax
je 0x6f9a
movswl 0x6(%rax), %edx
movswl 0xa(%rax), %ecx
jmp 0x6fa3
retq
movl 0x68(%rbx), %ecx
movl 0x70(%rbx), %edx
movl %ecx, 0x58(%rbx)
movl %edx, 0x60(%rbx)
leaq 0xd7ea(%rip), %rcx      # 0x14770
movl 0x54(%rcx), %ecx
movl %ecx, 0x50(%rbx)
testb $0x8, %al
je 0x6f95
addl %ecx, %ecx
subl %ecx, 0x5c(%rbx)
andl $-0x15, %eax
jmp 0x6fca
movl 0xb0(%r14), %ecx
xorl %edx, %edx
movl 0xc4(%r14), %esi
addl %esi, %edx
movl %edx, 0x58(%rbx)
addl 0xc8(%r14), %esi
movl 0x50(%rbx), %edx
movl 0xa8(%rbx), %eax
leal (%rsi,%rdx,2), %edx
subl %edx, %ecx
movl %ecx, 0x60(%rbx)
orl $0x4, %eax
movl %eax, 0xa8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6eb4