LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: sig_dump_state
void sig_dump_state(int sig) {
    struct proxy *p = proxy;

    Warning("SIGHUP received, dumping servers states.\n");
    while (p) {
	struct server *s = p->srv;

	while (s) {
	    snprintf(trash, sizeof(trash),
		     "SIGHUP: Server %s/%s : Conn: %d act, %d pend, %d tot.",
		     p->id, s->id,
		     s->cur_sess, 0, s->cum_sess);
	    Warning("%s\n", trash);
	    s = s->next;
	}

	snprintf(trash, sizeof(trash),
		 "SIGHUP: Proxy %s has %d active servers available."
		 " Conn: %d act, %d pend (%d unass), %d tot.",
		 p->id, p->srv_act, 
		 p->nbconn, 0, 0, p->cum_conn);
	Warning("%s\n", trash);
	p = p->next;
    }
    signal(sig, sig_dump_state);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, 0x4(%rsp)
movq 0x7008(%rip), %rbp      # 0xd378
leaq 0x3fb9(%rip), %rdi      # 0xa330
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2b35
testq %rbp, %rbp
je 0x642f
leaq 0x270a0(%rip), %r14     # 0x2d430
leaq 0x48d1(%rip), %r12      # 0xac68
leaq 0x3fbc(%rip), %r13      # 0xa35a
movq 0x10(%rbp), %r15
testq %r15, %r15
je 0x63e3
movq 0x38(%rbp), %rcx
movq 0x8(%r15), %r8
movl 0x18(%r15), %r9d
movl 0x1c(%r15), %r10d
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
pushq %r10
pushq $0x0
callq 0x2170
addq $0x10, %rsp
movq %r12, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2b35
movq (%r15), %r15
jmp 0x63a2
movq 0x38(%rbp), %rcx
movl 0x18(%rbp), %r8d
movl 0x40(%rbp), %r9d
movl 0x44(%rbp), %r10d
subq $0x8, %rsp
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
leaq 0x3f8a(%rip), %rdx      # 0xa390
xorl %eax, %eax
pushq %r10
pushq %rbx
pushq %rbx
callq 0x2170
addq $0x20, %rsp
movq %r12, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2b35
movq 0x50(%rbp), %rbp
testq %rbp, %rbp
jne 0x639e
leaq -0xdc(%rip), %rsi       # 0x635a
movl 0x4(%rsp), %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2210
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: init_default_instance
void init_default_instance() {
    memset(&defproxy, 0, sizeof(defproxy));
    defproxy.state = PR_STNEW;
    defproxy.maxconn = cfg_maxconn ? cfg_maxconn : global.maxconn;
    if (!defproxy.maxconn)
	defproxy.maxconn = DEFAULT_MAXPCONN;
}

// Assembly:
pushq %rax
leaq 0x27c70(%rip), %rdi     # 0x2e450
movl $0xe0, %edx
xorl %esi, %esi
callq 0x21a0
movl 0x6b3e(%rip), %eax      # 0xd330
testl %eax, %eax
jne 0x67fc
movl 0x6bac(%rip), %eax      # 0xd3a8
testl %eax, %eax
movl $0x40000000, %ecx       # imm = 0x40000000
cmovnel %eax, %ecx
movl %ecx, 0x27c8c(%rip)     # 0x2e498
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: pool_destroy
void pool_destroy(void **pool)
{
    void *temp, *next;
    next = pool;
    while (next) {
	temp = next;
	next = *(void **)temp;
	free(temp);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x82b9
pushq %rbx
movq (%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x82a8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wtarreau[P]httpterm/httpterm.c
// Function: deinit
void deinit(void) {
    struct proxy *p = proxy;
    struct server *s,*s_next;
    struct listener *l,*l_next;
  
    while (p) {
	if (p->id)
	    free(p->id);

	/* only strup if the user have set in config.
	   When should we free it?!
	   if (p->errmsg.msg400) free(p->errmsg.msg400);
	   if (p->errmsg.msg403) free(p->errmsg.msg403);
	   if (p->errmsg.msg408) free(p->errmsg.msg408);
	   if (p->errmsg.msg500) free(p->errmsg.msg500);
	   if (p->errmsg.msg502) free(p->errmsg.msg502);
	   if (p->errmsg.msg503) free(p->errmsg.msg503);
	   if (p->errmsg.msg504) free(p->errmsg.msg504);
	*/

	s = p->srv;
	while (s) {
	    s_next = s->next;
	    if (s->id)
		free(s->id);
	    
	    free(s);
	    s = s_next;
	}/* end while(s) */
	
	l = p->listen;
	while (l) {
	    l_next = l->next;
	    free(l);
	    l = l_next;
	}/* end while(l) */
	
	p = p->next;
    }/* end while(p) */
    
    if (global.chroot)    free(global.chroot);
    if (global.pidfile)   free(global.pidfile);
    
    if (StaticReadEvent)  free(StaticReadEvent);
    if (StaticWriteEvent) free(StaticWriteEvent);
    if (fdtab)            free(fdtab);
    
    pool_destroy(pool_session);
    pool_destroy(pool_buffer);
    pool_destroy(pool_fdtab);
    pool_destroy(pool_task);
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x50b2(%rip), %r14      # 0xd378
testq %r14, %r14
je 0x8325
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x82d9
callq 0x2050
movq 0x10(%r14), %rbx
testq %rbx, %rbx
je 0x8303
movq (%rbx), %r15
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x82f3
callq 0x2050
movq %rbx, %rdi
callq 0x2050
movq %r15, %rbx
testq %r15, %r15
jne 0x82e2
movq (%r14), %rdi
testq %rdi, %rdi
je 0x831f
movq 0x88(%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x830b
movq 0x50(%r14), %r14
jmp 0x82c6
movq 0x50a4(%rip), %rdi      # 0xd3d0
testq %rdi, %rdi
je 0x8336
callq 0x2050
movq 0x509b(%rip), %rdi      # 0xd3d8
testq %rdi, %rdi
je 0x8347
callq 0x2050
movq 0x50aa(%rip), %rdi      # 0xd3f8
testq %rdi, %rdi
je 0x8358
callq 0x2050
movq 0x250c1(%rip), %rdi     # 0x2d420
testq %rdi, %rdi
je 0x8369
callq 0x2050
movq 0x5010(%rip), %rdi      # 0xd380
testq %rdi, %rdi
je 0x837a
callq 0x2050
movq 0x4fd7(%rip), %rdi      # 0xd358
testq %rdi, %rdi
je 0x8396
movq (%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x8386
movq 0x4fc3(%rip), %rdi      # 0xd360
testq %rdi, %rdi
je 0x83b2
movq (%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x83a2
movq 0x4faf(%rip), %rdi      # 0xd368
testq %rdi, %rdi
je 0x83ce
movq (%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x83be
movq 0x4f9b(%rip), %rdi      # 0xd370
testq %rdi, %rdi
je 0x83ea
movq (%rdi), %rbx
callq 0x2050
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x83da
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test8.c
// Function: main
void main()
{
    void* p = malloc(2);
    free(p);
    printf("p has been freed\n");
    free(p + 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xeaa(%rip), %rbx       # 0x2004
movl $0x2, %edi
movq %rbx, %rsi
movl $0x6, %edx
callq 0x11a4
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movl $0x7, %edx
callq 0x1304
leaq 0xe86(%rip), %rdi       # 0x200c
callq 0x1030
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1304
nop
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.12/socket-inet.c
// Function: get_home_page
void get_home_page (int socket_fd)
{
  char buffer[10000];
  ssize_t number_characters_read;
  /* Send the HTTP GET command for the home page. */
  sprintf (buffer, "GET /\n");
  write (socket_fd, buffer, strlen (buffer));
  /* Read from the socket. The call to read may not return all the data at one time, so keep
  trying until we run out. */
  while (1) {
    number_characters_read = read (socket_fd, buffer, 10000);
    if (number_characters_read == 0)
      return;
    /* Write the data to standard output. */
    fwrite (buffer, sizeof (char), number_characters_read, stdout);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2718, %rsp           # imm = 0x2718
movl %edi, %ebx
leaq -0x2730(%rbp), %r14
movl $0xa2f20, 0x3(%r14)     # imm = 0xA2F20
movl $0x20544547, (%r14)     # imm = 0x20544547
movq %r14, %rdi
callq 0x1040
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1030
movl $0x2710, %edx           # imm = 0x2710
movl %ebx, %edi
movq %r14, %rsi
callq 0x1050
testq %rax, %rax
je 0x122b
movq 0x2ddc(%rip), %r15      # 0x3fe0
movq (%r15), %rcx
movl $0x1, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0x1090
movl $0x2710, %edx           # imm = 0x2710
movl %ebx, %edi
movq %r14, %rsi
callq 0x1050
testq %rax, %rax
jne 0x1204
addq $0x2718, %rsp           # imm = 0x2718
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.12/socket-inet.c
// Function: main
int main (int argc, char* const argv[])
{
  int socket_fd;
  struct sockaddr_in name;
  struct hostent* hostinfo;
  /* Create the socket. */
  socket_fd = socket (PF_INET, SOCK_STREAM, 0);
  /* Store the server’s name in the socket address. */
  name.sin_family = AF_INET;
  /* Convert from strings to numbers. */
  hostinfo = gethostbyname (argv[1]);
  if (hostinfo == NULL)
    return 1;
  else
    name.sin_addr = *((struct in_addr *) hostinfo->h_addr);
  /* Web servers use port 80. */
  name.sin_port = htons (80);
  /*Connect to the Web server*/

  if (connect (socket_fd, (const struct sockaddr *)&name, sizeof (struct sockaddr_in)) == -1) {
    perror ("connect");
    return 1;
  }
  /* Retrieve the server’s home page. */
  get_home_page (socket_fd);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movl $0x1, %ebx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x10a0
movl %eax, %r14d
movw $0x2, -0x28(%rbp)
movq 0x8(%r15), %rdi
callq 0x1060
testq %rax, %rax
je 0x12a8
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
leaq -0x28(%rbp), %rsi
movl %eax, 0x4(%rsi)
movw $0x5000, 0x2(%rsi)      # imm = 0x5000
movl %r14d, %edi
movl $0x10, %edx
callq 0x1080
cmpl $-0x1, %eax
je 0x12b5
movl %r14d, %edi
callq 0x11ac
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd4f(%rip), %rdi       # 0x200b
callq 0x1070
jmp 0x12a8
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: Setup
int Setup(const uint8 *skey)
{
	uint8 cst[16] = {0};

	KeySchedule(KeyLen, ENC, skey);
	Encryption(KeyLen, cst, gamma);
	mul2(gamma, gamma2); 
	mul2(gamma2, Q); /* Q = 4gamma */
	return SUCCESS;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rdx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %rbx
vmovaps %xmm0, (%rbx)
movl $0x100, %edi            # imm = 0x100
xorl %esi, %esi
callq 0x1090
movq 0x3d64(%rip), %r14      # 0x4f88
movl $0x100, %edi            # imm = 0x100
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1100
vmovdqa (%r14), %xmm0
movzbl (%r14), %eax
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%r14), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpbroadcastd 0x1d9f(%rip), %xmm2 # 0x3000
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3d81(%rip), %rcx      # 0x4ff0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
movb 0xf(%r14), %dl
addb %dl, %dl
leaq 0x1d7f(%rip), %rsi      # 0x3004
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
movzbl (%rcx), %eax
vmovdqa (%rcx), %xmm0
vmovdqu8 0x1(%rcx), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movq 0x3d05(%rip), %rcx      # 0x4fb8
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
addb %dl, %dl
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: nEnc
int nEnc(const uint8 *nonce, uint32 nonce_len, uint32 t_len){
	uint8 tmp[BLOCK]={0};

	memcpy(&tmp[BLOCK-nonce_len],nonce,nonce_len);
	tmp[0]=(uint8)((t_len*8)%(BLOCK*8)<<1);
	tmp[BLOCK-nonce_len-1] |= 0x01;
#ifdef INTERMEDIATE
	printf("(Format(tau,N)||0*||1||N) :\n"); printbseq(tmp,BLOCK);
#endif
	Encryption(KeyLen, tmp, delta);	// delta = E(Format(tau,N))
	if(ADP==Seri){
		xor(delta, TA, delta); // delta ^= TA
	}
	mul2(delta, L);
	mul2(L, L); //L = 4delta
	return SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %rsi
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %r14
vmovaps %xmm0, (%r14)
movl $0x10, %eax
subl %ebp, %eax
leaq (%rsp,%rax), %rdi
movl %ebp, %edx
callq 0x1110
shlb $0x4, %bl
movb %bl, (%r14)
movl $0xf, %eax
subl %ebp, %eax
orb $0x1, (%rsp,%rax)
movq 0x3cb5(%rip), %rbx      # 0x4fc8
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1100
movq 0x3cbe(%rip), %rax      # 0x4fe8
vmovdqa (%rax), %xmm0
vpxor (%rbx), %xmm0, %xmm0
vmovdqa %xmm0, (%rbx)
movzbl (%rbx), %eax
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%rbx), %xmm1 {%k1} {z}
vpaddw %xmm0, %xmm0, %xmm0
vpsrlw $0x7, %xmm1, %xmm1
vpbroadcastd 0x1ca3(%rip), %xmm2 # 0x3000
vpternlogd $0xb8, %xmm0, %xmm2, %xmm1
movq 0x3c2d(%rip), %rcx      # 0x4f98
vmovdqu8 %xmm1, (%rcx) {%k1}
shrl $0x7, %eax
movb 0xf(%rbx), %dl
addb %dl, %dl
leaq 0x1c84(%rip), %rsi      # 0x3004
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
movzbl (%rcx), %eax
vmovdqa (%rcx), %xmm0
vmovdqu8 0x1(%rcx), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
vmovdqu8 %xmm0, (%rcx) {%k1}
shrl $0x7, %eax
movb 0xf(%rcx), %dl
addb %dl, %dl
xorb (%rax,%rsi), %dl
movb %dl, 0xf(%rcx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: AFunc
int AFunc(
		  const uint8 *header,
		  uint32 h_len)
{
	uint32 i,j = 0;
	uint32 m, last;
	uint8 ASum[BLOCK]={0}, tmp[BLOCK], mask[BLOCK];

	last = h_len % BLOCK;
	if(last == 0) last = BLOCK;
	m = (h_len-last) / BLOCK; //header = m blocks + last bytes

	memcpy(mask,Q,BLOCK);
	/* XE */
	for(i = 0; i < m; i++, j=j+BLOCK){
		xor(mask,header+j,tmp);
		Encryption(KeyLen,tmp,tmp);
		xor(ASum,tmp,ASum);
		mul2(mask,mask);
	}
	/* last block */
	ozp(last,header+j,tmp);
	xor(ASum,tmp,ASum);

	if(last != BLOCK ){
		xor(mask, gamma, mask);
	}
	else{
		xor(mask,gamma2,mask);
	}
	xor(ASum,mask,ASum);
	Encryption(KeyLen,ASum,TA);
    return SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebp
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, 0x40(%rsp)
movl %esi, %eax
andl $0xf, %eax
movl $0x10, %ecx
movl %eax, 0x2c(%rsp)
cmovnel %eax, %ecx
movl %ecx, 0x28(%rsp)
subl %ecx, %ebp
movq 0x33f2(%rip), %rax      # 0x4fb8
vmovdqa (%rax), %xmm0
vmovdqa %xmm0, 0x10(%rsp)
cmpl $0x10, %ebp
jae 0x1bdd
xorl %r13d, %r13d
jmp 0x1c8d
shrl $0x4, %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
leaq 0x11(%rsp), %r12
xorl %r13d, %r13d
leaq 0x30(%rsp), %r14
movw $0x7fff, %ax            # imm = 0x7FFF
kmovd %eax, %k1
kmovw %k1, 0xe(%rsp)
leaq 0x13fc(%rip), %r15      # 0x3004
vmovups (%rbx,%r13), %xmm0
vxorps 0x10(%rsp), %xmm0, %xmm0
vmovaps %xmm0, 0x30(%rsp)
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
movq %r14, %rdx
callq 0x1100
vmovaps 0x30(%rsp), %xmm0
vxorps 0x40(%rsp), %xmm0, %xmm0
vmovaps %xmm0, 0x40(%rsp)
movzbl 0x10(%rsp), %eax
vmovdqa 0x10(%rsp), %xmm0
kmovw 0xe(%rsp), %k1
vmovdqu8 (%r12), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe4, 0x1398(%rip){1to4}, %xmm1, %xmm0 # 0x3000
vmovdqu8 %xmm0, 0x10(%rsp) {%k1}
shrl $0x7, %eax
movb 0x1f(%rsp), %cl
addb %cl, %cl
xorb (%rax,%r15), %cl
movb %cl, 0x1f(%rsp)
addq $0x10, %r13
decl %ebp
jne 0x1c08
addq %r13, %rbx
movl 0x28(%rsp), %r14d
movl $0x10, %eax
subq %r14, %rax
xorl %edx, %edx
movl 0x2c(%rsp), %ebp
testl %ebp, %ebp
cmovneq %rax, %rdx
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
xorl %esi, %esi
callq 0x1030
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1110
testl %ebp, %ebp
je 0x1cd2
movb $-0x80, 0x30(%rsp,%r14)
vmovaps 0x30(%rsp), %xmm0
vxorps 0x40(%rsp), %xmm0, %xmm0
vmovaps %xmm0, 0x40(%rsp)
testl %ebp, %ebp
jne 0x1cf1
movq 0x3301(%rip), %rax      # 0x4ff0
jmp 0x1cf8
movq 0x3290(%rip), %rax      # 0x4f88
vmovaps (%rax), %xmm1
vxorps 0x10(%rsp), %xmm1, %xmm1
vmovaps %xmm1, 0x10(%rsp)
vxorps %xmm0, %xmm1, %xmm0
leaq 0x40(%rsp), %rsi
vmovaps %xmm0, (%rsi)
movq 0x32cc(%rip), %rdx      # 0x4fe8
movl $0x100, %edi            # imm = 0x100
callq 0x1100
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aes256otrsv2/ref/OTR.c
// Function: AFuncS
int AFuncS(
		  const uint8 *header,
		  uint32 h_len)
{
	uint32 i,j = 0;
	uint32 m, last;
	uint8 tmp[BLOCK], chain[BLOCK]={0};

	last = h_len % BLOCK;
	if(last == 0) last = BLOCK;
	m = (h_len-last) / BLOCK; //header = m blocks + last bytes

	/* CBC */
	for(i = 0; i < m; i++, j=j+BLOCK){
		xor(chain,header+j,chain);
		Encryption(KeyLen,chain,chain);
	}
	/* last block */
	ozp(last,header+j,tmp);
	xor(tmp,chain,chain);
	if(last != BLOCK ){
		xor(chain,gamma2,chain);
	}
	else{
		xor(chain,Q,chain);
	}
	Encryption(KeyLen,chain,TA);
    return SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %r15d
andl $0xf, %r15d
movl $0x10, %r12d
cmovnel %r15d, %r12d
subl %r12d, %ebp
cmpl $0x10, %ebp
jae 0x1d71
xorl %r13d, %r13d
jmp 0x1da8
shrl $0x4, %ebp
cmpl $0x1, %ebp
adcl $0x0, %ebp
xorl %r13d, %r13d
movq %rsp, %r14
vmovups (%rbx,%r13), %xmm0
vxorps (%rsp), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
movq %r14, %rdx
callq 0x1100
addq $0x10, %r13
decl %ebp
jne 0x1d80
addq %r13, %rbx
movl %r12d, %r14d
movl $0x10, %eax
subq %r14, %rax
xorl %edx, %edx
testl %r15d, %r15d
cmovneq %rax, %rdx
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x1030
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1110
testl %r15d, %r15d
je 0x1de9
movb $-0x80, 0x10(%rsp,%r14)
vmovaps (%rsp), %xmm0
vxorps 0x10(%rsp), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
testl %r15d, %r15d
jne 0x1e07
movq 0x31b3(%rip), %rax      # 0x4fb8
jmp 0x1e0e
movq 0x31e2(%rip), %rax      # 0x4ff0
vxorps (%rax), %xmm0, %xmm0
movq %rsp, %rsi
vmovaps %xmm0, (%rsi)
movq 0x31c8(%rip), %rdx      # 0x4fe8
movl $0x100, %edi            # imm = 0x100
callq 0x1100
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/soso7885[P]OPCUA_example/demo_src/server_firstSteps.c
// Function: main
int main(void) {
    signal(SIGINT,  stopHandler);
    signal(SIGTERM, stopHandler);

    UA_ServerConfig config = UA_ServerConfig_standard;
    UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
    config.networkLayers = &nl;
    config.networkLayersSize = 1;
    UA_Server *server = UA_Server_new(config);

    UA_StatusCode retval = UA_Server_run(server, &running);
    UA_Server_delete(server);
    nl.deleteMembers(&nl);
    return (int)retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
leaq 0xc3(%rip), %rbx        # 0x1266
movl $0x2, %edi
movq %rbx, %rsi
callq 0x1060
movl $0xf, %edi
movq %rbx, %rsi
callq 0x1060
movq 0x2e1c(%rip), %rsi      # 0x3fe0
leaq -0x1c8(%rbp), %rbx
movl $0x160, %edx            # imm = 0x160
movq %rbx, %rdi
callq 0x1050
movq 0x2e11(%rip), %rax      # 0x3ff0
movl 0x10(%rax), %ecx
movl %ecx, -0x20(%rbp)
movups (%rax), %xmm0
movaps %xmm0, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl %eax, 0x10(%rsp)
movaps -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movl $0x4118, %esi           # imm = 0x4118
callq 0x1040
movq %r14, 0xf8(%rbx)
movq $0x1, 0xf0(%rbx)
movl $0x2c, %ecx
movq %rsp, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x1030
movq %rax, %rbx
leaq 0x2e1d(%rip), %rsi      # 0x4058
movq %rax, %rdi
callq 0x1070
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1080
movq %r14, %rdi
callq *0x30(%r14)
movl %r15d, %eax
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/tests/closed_exit_pipe.c
// Function: main
int main() {
  libforks_ServerConn conn;

  check(libforks_start(&conn) == libforks_OK);

  int exit_fd;
  pid_t child_pid;
  int socket_fd;

  libforks_Result r = libforks_fork(
    conn,
    &child_pid, // pid_ptr
    &socket_fd, // socket_fd_ptr
    &exit_fd, // exit_fd_ptr
    child_main
  );
  check(r == libforks_OK);

  close(exit_fd);
  write(socket_fd, "o", 1);
  check(write(socket_fd, "o", 1) == 1);

  // child exits now, but since exit_fd is closed we have to do this
  // dirty hack
  check(libforks_eval(conn, serv_wait) == libforks_OK);

  check(libforks_stop(conn) == libforks_OK);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0x10(%rsp), %rdi
callq 0x17fb
testl %eax, %eax
jne 0x13ba
movq 0x10(%rsp), %rdi
leaq 0xfb(%rip), %r8         # 0x143a
leaq 0x1c(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x224f
testl %eax, %eax
jne 0x13cb
movl 0x18(%rsp), %edi
callq 0x10c0
movl 0xc(%rsp), %edi
leaq 0x1ce8(%rip), %rbx      # 0x3053
movl $0x1, %edx
movq %rbx, %rsi
callq 0x1080
movl 0xc(%rsp), %edi
movl $0x1, %edx
movq %rbx, %rsi
callq 0x1080
cmpq $0x1, %rax
jne 0x13dc
movq 0x10(%rsp), %rdi
leaq 0xe2(%rip), %rsi        # 0x147d
callq 0x24cb
testl %eax, %eax
jne 0x13ed
movq 0x10(%rsp), %rdi
callq 0x240a
testl %eax, %eax
jne 0x13fe
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
leaq 0x1c43(%rip), %rdi      # 0x3004
movl $0x12, %esi
callq 0x140f
leaq 0x1c70(%rip), %rdi      # 0x3042
movl $0x1f, %esi
callq 0x140f
leaq 0x1c72(%rip), %rdi      # 0x3055
movl $0x23, %esi
callq 0x140f
leaq 0x1c7f(%rip), %rdi      # 0x3073
movl $0x27, %esi
callq 0x140f
leaq 0x1c9c(%rip), %rdi      # 0x30a1
movl $0x29, %esi
callq 0x140f
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/tests/closed_exit_pipe.c
// Function: child_main
static void child_main(libforks_ServerConn conn, int socket_fd) {
  (void)conn;
  char c;
  check(read(socket_fd, &c, 1) == 1);
  check(c == 'o');
}

// Assembly:
pushq %rax
movl %esi, %edi
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq 0x10f0
cmpq $0x1, %rax
jne 0x145b
cmpb $0x6f, 0x7(%rsp)
jne 0x146c
popq %rax
retq
leaq 0x1c7e(%rip), %rdi      # 0x30e0
movl $0x6, %esi
callq 0x140f
leaq 0x1c89(%rip), %rdi      # 0x30fc
movl $0x7, %esi
callq 0x140f
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: read_exact
__attribute__((warn_unused_result))
static int read_exact(int fd, void *data, size_t length) {
  ssize_t res = read(fd, data, length);
  if (res == -1) {
    return -1;
  }
  if (res != (ssize_t)length) {
    errno = EMSGSIZE;
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x10f0
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
je 0x166d
xorl %eax, %eax
cmpq %rbx, %rcx
je 0x166d
callq 0x1050
movl $0x5a, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_write_socket_fds
int libforks_write_socket_fds(
    int socket_fd,
    void *data, size_t length,
    const int *fds, size_t fd_count) {
  // See https://man.openbsd.org/CMSG_DATA and https://man.openbsd.org/recv

  if (fd_count == 0) {
    // Same macOS issue, same workaround:
    return write_exact(socket_fd, data, length);
  }

  struct iovec iovec = {
    .iov_base = data,
    .iov_len = length,
  };

  char cmsg_buffer[CMSG_BUFFER_SIZE] = {0};
  size_t cmsg_buffer_space = CMSG_SPACE(sizeof(int) * fd_count);

  if (cmsg_buffer_space > sizeof cmsg_buffer) {
    errno = ENOMEM;
    return -1;
  }

  struct msghdr msg = {0};
  msg.msg_iov = &iovec;
  msg.msg_iovlen = 1;
  msg.msg_control = cmsg_buffer;
  msg.msg_controllen = cmsg_buffer_space;

  struct cmsghdr *cmsg = CMSG_FIRSTHDR(&msg);
  assert(cmsg);
  cmsg->cmsg_len = CMSG_LEN(sizeof(int) * fd_count);
  cmsg->cmsg_level = SOL_SOCKET;
  cmsg->cmsg_type = SCM_RIGHTS;
  memcpy(CMSG_DATA(cmsg), fds, sizeof(int) * fd_count);

  ssize_t send_res = sendmsg(socket_fd, &msg, 0);
  if (send_res == -1) {
    return -1;
  }
  if (send_res != (ssize_t)length) {
    errno = EMSGSIZE;
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
movl %edi, %ebp
testq %r8, %r8
je 0x16f3
movq %rsi, (%rsp)
movq %rbx, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
leaq 0x7(,%r8,4), %rax
movq %rax, %rdx
andq $-0x8, %rdx
addq $0x10, %rdx
cmpq $0x81, %rdx
jb 0x1708
callq 0x1050
movl $0xc, (%rax)
jmp 0x1797
movl %ebp, %edi
movq %rbx, %rdx
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x17cb
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x40(%rsp)
movq %rsp, %rsi
movq %rsi, 0x20(%rsp)
movq $0x1, 0x28(%rsp)
leaq 0x50(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpq $-0x10, %rax
jae 0x17ac
shlq $0x2, %r8
leaq 0x10(%r8), %rax
leaq 0x60(%rsp), %rdi
movq %rax, -0x10(%rdi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0x8(%rdi)
movq %rcx, %rsi
movq %r8, %rdx
callq 0x1130
leaq 0x10(%rsp), %rsi
xorl %r14d, %r14d
movl %ebp, %edi
xorl %edx, %edx
callq 0x1060
cmpq $-0x1, %rax
je 0x1797
cmpq %rbx, %rax
je 0x179d
callq 0x1050
movl $0x5a, (%rax)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1a28(%rip), %rdi      # 0x31db
leaq 0x19d5(%rip), %rsi      # 0x318f
leaq 0x1a1f(%rip), %rcx      # 0x31e0
movl $0x12c, %edx            # imm = 0x12C
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: write_exact
__attribute__((warn_unused_result))
static int write_exact(int fd, const void *data, size_t length) {
  ssize_t res = write(fd, data, length);
  if (res == -1) {
    return -1;
  }
  if (res != (ssize_t)length) {
    errno = EMSGSIZE;
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x1080
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $-0x1, %rcx
je 0x17f9
xorl %eax, %eax
cmpq %rbx, %rcx
je 0x17f9
callq 0x1050
movl $0x5a, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_start
libforks_Result libforks_start(libforks_ServerConn *conn_ptr) {
  libforks_Result res;
  pid_t main_proc_pid = getpid();

  int sockets[2];
  if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockets) == -1) {
    res = libforks_SOCKET_CREATION_ERROR;
    goto exit;
  }

  int server_pid = fork();
  if (server_pid == -1) {
    res = libforks_FORK_ERROR;
    goto del_sockets;
  }

  if (server_pid == 0) {
    // this is the server process
    close(sockets[1]);

    serv_Client *client = malloc(sizeof(serv_Client));
    if (!client) {
      serv_print_errno("malloc");
      serv_panic();
    }
    client->pid = main_proc_pid;
    client->main = true;
    client->socket = sockets[0];
    client->exit_fd = -1;
    client->next = NULL;

    serv_main(client);
    abort(); // not reached
  }

  ServerConn *conn = malloc(sizeof(ServerConn));
  if (!conn) {
    res = libforks_MALLOC_ERROR;
    goto kill_server;
  }

  close(sockets[0]);
  conn->server_pid = server_pid;
  conn->socket = sockets[1];

  conn_ptr->private = conn;
  res = libforks_OK;
  goto exit;

kill_server:
  kill(server_pid, SIGKILL);

del_sockets:
  close(sockets[0]);
  close(sockets[1]);

exit:
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1090
movl %eax, %ebp
movq %rsp, %rcx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x1140
cmpl $-0x1, %eax
je 0x1869
movl $0xfffffffb, %r14d      # imm = 0xFFFFFFFB
callq 0x11f0
cmpl $-0x1, %eax
je 0x1884
movl %eax, %r15d
testl %eax, %eax
je 0x18a3
movl $0x8, %edi
callq 0x1160
testq %rax, %rax
je 0x1871
movq %rax, %r14
movl (%rsp), %edi
callq 0x18ef
movl %r15d, (%r14)
movl 0x4(%rsp), %eax
movl %eax, 0x4(%r14)
movq %r14, (%rbx)
xorl %r14d, %r14d
jmp 0x1895
movl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jmp 0x1895
movl %r15d, %edi
movl $0x9, %esi
callq 0x1150
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
movl (%rsp), %edi
callq 0x18ef
movl 0x4(%rsp), %edi
callq 0x18ef
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rsp), %edi
callq 0x18ef
movl $0x18, %edi
callq 0x1160
testq %rax, %rax
jne 0x18cc
leaq 0x1966(%rip), %rdi      # 0x3228
callq 0x1900
callq 0x2567
movl %ebp, (%rax)
movb $0x1, 0x4(%rax)
movl (%rsp), %ecx
movl %ecx, 0x8(%rax)
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq $0x0, 0x10(%rax)
movq %rax, %rdi
callq 0x1973
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: checked_close
static int checked_close(int fd) {
  if (close(fd) != 0) {
    perror("libforks: close");
    abort();
  }
  return 0;
}

// Assembly:
pushq %rax
callq 0x10c0
testl %eax, %eax
jne 0x18fb
popq %rax
retq
callq 0x1210
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: serv_print_errno
static void serv_print_errno(const char *msg) {
  int e = errno;
  char buffer[256];
  assert(msg);
  snprintf(buffer, sizeof buffer, "libforks server: %s", msg);
  errno = e;
  perror(buffer);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
callq 0x1050
testq %rbx, %rbx
je 0x1954
movq %rax, %r14
movl (%rax), %ebp
leaq 0x1b3f(%rip), %rdx      # 0x3465
movq %rsp, %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x10a0
movl %ebp, (%r14)
movq %r15, %rdi
callq 0x11b0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1881(%rip), %rdi      # 0x31dc
leaq 0x182d(%rip), %rsi      # 0x318f
leaq 0x1ad8(%rip), %rcx      # 0x3441
movl $0x14e, %edx            # imm = 0x14E
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_fork
libforks_Result libforks_fork(
    libforks_ServerConn conn_p,
    pid_t *pid_ptr, // out
    int *socket_fd_ptr, // out
    int *exit_fd_ptr, // out
    void (*entrypoint)(libforks_ServerConn conn, int socket_fd)
  ) {

  ServerConn *conn = conn_p.private;

  ClientMessage req = {
    .type = ClientMessageType_FORK_REQUEST,
    .u = {
      .fork_request = {
        .create_user_socket = socket_fd_ptr != NULL,
        .create_exit_pipe = exit_fd_ptr != NULL,
        .entrypoint = entrypoint,
      },
    },
  };

  if (write_exact(conn->socket, &req, sizeof req) == -1) {
    return libforks_WRITE_ERROR;
  }

  ServerMessage res;
  int received_fds[2] = {-1, -1};
  int read_res = libforks_read_socket_fds(
    conn->socket,
    &res, sizeof res,
    received_fds, 2
  );
  if (read_res == -1) {
    return libforks_READ_ERROR;
  }

  if (res.type == ServerMessageType_FORK_FAILURE) {
    assert(res.u.fork_failure.error_code != libforks_OK);
    errno = res.u.fork_failure.saved_errno;
    return res.u.fork_failure.error_code;
  }

  assert(res.type == ServerMessageType_FORK_SUCCESS);

  if (pid_ptr) {
    *pid_ptr = res.u.fork_success.pid;
  }

  unsigned i = 0;
  if (socket_fd_ptr) {
    *socket_fd_ptr = received_fds[i++];
  }
  if (exit_fd_ptr) {
    *exit_fd_ptr = received_fds[i++];
  }

  return libforks_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
testq %rdx, %rdx
leaq 0x18(%rsp), %rsi
setne (%rsi)
testq %rcx, %rcx
setne 0x1(%rsi)
movq %rdi, %r13
movq %r8, 0x8(%rsi)
movl $0x0, 0x10(%rsi)
movl 0x4(%rdi), %edi
movl $0x18, %edx
callq 0x17cb
cmpl $-0x1, %eax
je 0x22ea
leaq 0x10(%rsp), %r12
movq $-0x1, (%r12)
movl 0x4(%r13), %edi
leaq 0x4(%rsp), %rsi
movl $0xc, %edx
movl $0x2, %r8d
movq %r12, %rcx
callq 0x148c
cmpl $-0x1, %eax
je 0x22f1
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x22f8
cmpl $0x1, %eax
jne 0x2331
cmpl $0x0, 0x4(%rsp)
je 0x2350
movl 0x8(%rsp), %ebx
callq 0x1050
movl %ebx, (%rax)
movl 0x4(%rsp), %eax
jmp 0x2323
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x2323
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2323
testq %r15, %r15
je 0x2304
movl 0x4(%rsp), %eax
movl %eax, (%r15)
testq %r14, %r14
je 0x2316
leaq 0x14(%rsp), %r12
movl -0x4(%r12), %eax
movl %eax, (%r14)
xorl %eax, %eax
testq %rbx, %rbx
je 0x2323
movl (%r12), %ecx
movl %ecx, (%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xf92(%rip), %rdi       # 0x32ca
leaq 0xe50(%rip), %rsi       # 0x318f
leaq 0xf16(%rip), %rcx       # 0x325c
movl $0x43f, %edx            # imm = 0x43F
callq 0x10b0
leaq 0xed8(%rip), %rdi       # 0x322f
leaq 0xe31(%rip), %rsi       # 0x318f
leaq 0xef7(%rip), %rcx       # 0x325c
movl $0x43a, %edx            # imm = 0x43A
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: finalize_stop
static libforks_Result finalize_stop(ServerConn *conn) {
  int status;
  if (waitpid(conn->server_pid, &status, 0) == -1) {
    return libforks_WAIT_ERROR;
  }

  assert(WIFEXITED(status) || WIFSIGNALED(status));

  close(conn->socket); // ignore error
  free(conn);
  return libforks_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %edi
leaq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x1190
cmpl $-0x1, %eax
je 0x23e0
movl 0xc(%rsp), %eax
andl $0x7f, %eax
je 0x23cc
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x1ffffff, %eax        # imm = 0x1FFFFFF
jle 0x23eb
movl 0x4(%rbx), %edi
callq 0x18ef
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x23e5
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1257(%rip), %rdi      # 0x3649
leaq 0xd96(%rip), %rsi       # 0x318f
leaq 0x13a1(%rip), %rcx      # 0x37a1
movl $0x457, %edx            # imm = 0x457
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_free_conn
libforks_Result libforks_free_conn(libforks_ServerConn conn_p) {
  ServerConn *conn = conn_p.private;
  close(conn->socket); // ignore error
  free(conn);
  return libforks_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
callq 0x18ef
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_kill_all
libforks_Result libforks_kill_all(libforks_ServerConn conn_p, int signal) {
  ServerConn *conn = conn_p.private;

  ClientMessage req = {
    .type = ClientMessageType_KILL_ALL_REQUEST,
    .u = {
      .kill_all_request = {
        .signal = signal
      },
    },
  };
  if (write_exact(conn->socket, &req, sizeof req) == -1) {
    return libforks_WRITE_ERROR;
  }

  ServerMessage res;
  if (read_exact(conn->socket, &res, sizeof res) == -1) {
    return libforks_READ_ERROR;
  }

  assert(res.type == ServerMessageType_KILL_SUCCESS);
  return libforks_OK;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movl %esi, (%rax)
movl $0x3, 0x10(%rax)
movl 0x4(%rdi), %edi
movl $0x18, %edx
movq %rax, %rsi
callq 0x17cb
cmpl $-0x1, %eax
je 0x24b9
movl 0x4(%rbx), %edi
leaq 0xc(%rsp), %rsi
movl $0xc, %edx
callq 0x163f
cmpl $-0x1, %eax
je 0x24c0
xorl %eax, %eax
cmpl $0x2, 0x14(%rsp)
je 0x24c5
leaq 0xe54(%rip), %rdi       # 0x32f5
leaq 0xce7(%rip), %rsi       # 0x318f
leaq 0xe71(%rip), %rcx       # 0x3320
movl $0x494, %edx            # imm = 0x494
callq 0x10b0
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x24c5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: libforks_eval
libforks_Result libforks_eval(libforks_ServerConn conn_p, void (*function)(void)) {
  ServerConn *conn = conn_p.private;

  ClientMessage req = {
    .type = ClientMessageType_EVAL_REQUEST,
    .u = {
      .eval_request = {
        .function = function
      },
    },
  };
  if (write_exact(conn->socket, &req, sizeof req) == -1) {
    return libforks_WRITE_ERROR;
  }

  ServerMessage res;
  if (read_exact(conn->socket, &res, sizeof res) == -1) {
    return libforks_READ_ERROR;
  }

  assert(res.type == ServerMessageType_EVAL_SUCCESS);
  return libforks_OK;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
movl $0x4, 0x10(%rax)
movl 0x4(%rdi), %edi
movl $0x18, %edx
movq %rax, %rsi
callq 0x17cb
cmpl $-0x1, %eax
je 0x2536
movl 0x4(%rbx), %edi
leaq 0xc(%rsp), %rsi
movl $0xc, %edx
callq 0x163f
cmpl $-0x1, %eax
je 0x253d
xorl %eax, %eax
cmpl $0x3, 0x14(%rsp)
je 0x2542
leaq 0xe3e(%rip), %rdi       # 0x335c
leaq 0xc6a(%rip), %rsi       # 0x318f
leaq 0xe5b(%rip), %rcx       # 0x3387
movl $0x4ac, %edx            # imm = 0x4AC
callq 0x10b0
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x2542
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: serv_print_error
__attribute__((format(printf, 1, 2)))
static void serv_print_error(const char *format, ...) {
  va_list ap;
  va_start(ap, format);
  // XXX `dprintf` is guaranteed to be async-signal-safe on OpenBSD
  // but not on other systems.
  dprintf(STDERR_FILENO, "libforks server: ");
  vdprintf(STDERR_FILENO, format, ap);
  dprintf(STDERR_FILENO, "\n");
  va_end(ap);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x25dc
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
leaq 0xeae(%rip), %rsi       # 0x34b1
movl $0x2, %edi
xorl %eax, %eax
callq 0x10d0
movl $0x2, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11a0
leaq 0xab8(%rip), %rsi       # 0x30de
movl $0x2, %edi
xorl %eax, %eax
callq 0x10d0
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: serv_sigchld_handler
static void serv_sigchld_handler(int sig_) {
  (void)sig_;

  // This function uses `serv_DEBUG` and `serv_print_errno` which
  // could theoretically be async-signal-unsafe. But that’s only
  // when debugging is enabled or if a fatal error occurs.

  int prev_errno = errno;

  // We know that some children have exited but we don’t know which ones.
  // We can list them by calling `waitpid(-1, …, …)` repeatedly.

  serv_DEBUG("received SIGCHLD\n");

  while (true) {
    int status;
    pid_t child_pid = waitpid(-1, &status, WNOHANG);
    if (child_pid == 0 || (child_pid == -1 && errno == ECHILD)) {
      // no more stopped children
      break;
    }

    if (child_pid == -1) {
      serv_print_errno("waitpid(2) system call in SIGCHLD handler");
      serv_panic();
    }

    assert(WIFEXITED(status) || WIFSIGNALED(status));

    serv_DEBUG("child %d exited, informing main loop\n", (int)child_pid);

    libforks_ExitEvent event = {
      .pid = child_pid,
      .wait_status = status,
    };
    if (write_exact(serv_exit_pipe[WRITE_END], &event, sizeof event) == -1) {
      serv_print_errno("write(2) system call in SIGCHLD handler");
      serv_panic();
    }
  }

  serv_DEBUG("SIGCHLD handling done\n");

  errno = prev_errno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x1050
movq %rax, %rbx
movl (%rax), %ebp
leaq 0xc(%rsp), %r14
leaq 0x10(%rsp), %r15
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
movl $0x1, %edx
callq 0x1190
testl %eax, %eax
je 0x26c8
cmpl $-0x1, %eax
je 0x26c3
movl 0xc(%rsp), %ecx
movl %ecx, %edx
andl $0x7f, %edx
je 0x2692
shll $0x18, %edx
addl $0x1000000, %edx        # imm = 0x1000000
cmpl $0x1ffffff, %edx        # imm = 0x1FFFFFF
jle 0x26d5
movl %eax, 0x10(%rsp)
movl %ecx, 0x14(%rsp)
movl 0x2a78(%rip), %edi      # 0x5118
movl $0x8, %edx
movq %r15, %rsi
callq 0x17cb
cmpl $-0x1, %eax
jne 0x265b
leaq 0xfd8(%rip), %rdi       # 0x3691
callq 0x1900
callq 0x2567
cmpl $0xa, (%rbx)
jne 0x26f4
movl %ebp, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf6d(%rip), %rdi       # 0x3649
leaq 0xaac(%rip), %rsi       # 0x318f
leaq 0xf88(%rip), %rcx       # 0x3672
movl $0x1b4, %edx            # imm = 0x1B4
callq 0x10b0
leaq 0xf24(%rip), %rdi       # 0x361f
jmp 0x26b9
// File: /workspace/github_c_makefile_star2_O1/motet-a[P]libforks/libforks.c
// Function: serv_uninstall_signal_handler
static void serv_uninstall_signal_handler(int signal) {
  struct sigaction sa;
  sa.sa_handler = SIG_DFL;
  sa.sa_flags = 0;
  sigemptyset(&sa.sa_mask);
  if (sigaction(signal, &sa, NULL) == -1) {
    serv_print_errno(NULL);
    serv_panic();
  }
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movl %edi, %ebx
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movl $0x0, 0x80(%rdi)
callq 0x1120
leaq 0x8(%rsp), %rsi
movl %ebx, %edi
xorl %edx, %edx
callq 0x1070
cmpl $-0x1, %eax
je 0x27e1
addq $0xa0, %rsp
popq %rbx
retq
xorl %edi, %edi
callq 0x1900
callq 0x2567
// File: /workspace/github_c_makefile_star2_O1/imaya[P]zopfli-for-emscripten/blocksplitter.c
// Function: ZopfliBlockSplitSimple
void ZopfliBlockSplitSimple(const unsigned char* in,
                            size_t instart, size_t inend,
                            size_t blocksize,
                            size_t** splitpoints, size_t* npoints) {
  size_t i = instart;
  while (i < inend) {
    ZOPFLI_APPEND_DATA(i, splitpoints, npoints);
    i += blocksize;
  }
  (void)in;
}

// Assembly:
cmpq %rdx, %rsi
jae 0x1c9b
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq (%rbx), %rsi
leaq -0x1(%rsi), %rax
testq %rax, %rsi
jne 0x1c7d
testq %rsi, %rsi
je 0x1c70
movq (%r14), %rdi
shlq $0x4, %rsi
callq 0x1140
jmp 0x1c7a
movl $0x8, %edi
callq 0x1120
movq %rax, (%r14)
movq (%r14), %rax
movq (%rbx), %rcx
movq %r13, (%rax,%rcx,8)
incq (%rbx)
addq %r15, %r13
cmpq %r12, %r13
jb 0x1c51
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/imaya[P]zopfli-for-emscripten/cache.c
// Function: ZopfliSublenToCache
void ZopfliSublenToCache(const unsigned short* sublen,
                         size_t pos, size_t length,
                         ZopfliLongestMatchCache* lmc) {
  size_t i;
  size_t j = 0;
  unsigned bestlength = 0;
  unsigned char* cache;

#if ZOPFLI_CACHE_LENGTH == 0
  return;
#endif

  cache = &lmc->sublen[ZOPFLI_CACHE_LENGTH * pos * 3];
  if (length < 3) return;
  for (i = 3; i <= length; i++) {
    if (i == length || sublen[i] != sublen[i + 1]) {
      cache[j * 3] = i - 3;
      cache[j * 3 + 1] = sublen[i] % 256;
      cache[j * 3 + 2] = (sublen[i] >> 8) % 256;
      bestlength = i;
      j++;
      if (j >= ZOPFLI_CACHE_LENGTH) break;
    }
  }
  if (j < ZOPFLI_CACHE_LENGTH) {
    assert(bestlength == length);
    cache[(ZOPFLI_CACHE_LENGTH - 1) * 3] = bestlength - 3;
  } else {
    assert(bestlength <= length);
  }
  assert(bestlength == ZopfliMaxCachedSublen(lmc, pos, length));
}

// Assembly:
pushq %rax
cmpq $0x3, %rdx
jb 0x20a0
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rax
movq 0x10(%rcx), %rsi
addq %rax, %rsi
xorl %r10d, %r10d
movl $0x3, %r9d
xorl %r8d, %r8d
cmpq %r9, %rdx
je 0x202f
movzwl (%rdi,%r9,2), %r11d
cmpw 0x2(%rdi,%r9,2), %r11w
je 0x205a
leaq (%r8,%r8,2), %r10
leal -0x3(%r9), %r11d
movb %r11b, (%rsi,%r10)
movb (%rdi,%r9,2), %r11b
movb %r11b, 0x1(%rsi,%r10)
movb 0x1(%rdi,%r9,2), %r11b
movb %r11b, 0x2(%rsi,%r10)
incq %r8
cmpq $0x7, %r8
ja 0x2064
movl %r9d, %r10d
incq %r9
cmpq %rdx, %r9
jbe 0x201d
jmp 0x2067
movl %r9d, %r10d
movl %r10d, %edi
cmpq $0x7, %r8
ja 0x207d
cmpq %rdx, %rdi
jne 0x20c5
leal -0x3(%rdi), %edx
movb %dl, 0x15(%rsi)
jmp 0x2082
cmpq %rdx, %rdi
ja 0x20e4
movq 0x10(%rcx), %rcx
cmpb $0x0, 0x1(%rcx,%rax)
jne 0x2094
cmpb $0x0, 0x2(%rcx,%rax)
je 0x20a2
movzbl 0x15(%rcx,%rax), %eax
addl $0x3, %eax
cmpl %eax, %edi
jne 0x20a6
popq %rax
retq
xorl %eax, %eax
jmp 0x209c
leaq 0x8231(%rip), %rdi      # 0xa2de
leaq 0x81b1(%rip), %rsi      # 0xa265
leaq 0x81b2(%rip), %rcx      # 0xa26d
movl $0x4e, %edx
callq 0x10b0
leaq 0x8184(%rip), %rdi      # 0xa250
leaq 0x8192(%rip), %rsi      # 0xa265
leaq 0x8193(%rip), %rcx      # 0xa26d
movl $0x49, %edx
callq 0x10b0
leaq 0x81de(%rip), %rdi      # 0xa2c9
leaq 0x8173(%rip), %rsi      # 0xa265
leaq 0x8174(%rip), %rcx      # 0xa26d
movl $0x4c, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O1/imaya[P]zopfli-for-emscripten/deflate.c
// Function: GetFixedTree
static void GetFixedTree(unsigned* ll_lengths, unsigned* d_lengths) {
  size_t i;
  for (i = 0; i < 144; i++) ll_lengths[i] = 8;
  for (i = 144; i < 256; i++) ll_lengths[i] = 9;
  for (i = 256; i < 280; i++) ll_lengths[i] = 7;
  for (i = 280; i < 288; i++) ll_lengths[i] = 8;
  for (i = 0; i < 32; i++) d_lengths[i] = 5;
}

// Assembly:
xorl %eax, %eax
movaps 0x7cba(%rip), %xmm0     # 0xa340
movups %xmm0, (%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x90, %rax
jne 0x2686
xorl %eax, %eax
movaps 0x7cb1(%rip), %xmm1     # 0xa350
movups %xmm1, 0x240(%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x70, %rax
jne 0x269f
xorl %eax, %eax
movaps 0x7ca6(%rip), %xmm1     # 0xa360
movups %xmm1, 0x400(%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x18, %rax
jne 0x26ba
xorl %eax, %eax
movups %xmm0, 0x460(%rdi,%rax,4)
addq $0x4, %rax
cmpq $0x8, %rax
jne 0x26ce
xorl %eax, %eax
movaps 0x7c87(%rip), %xmm0     # 0xa370
movups %xmm0, (%rsi,%rax,4)
addq $0x4, %rax
cmpq $0x20, %rax
jne 0x26e9
retq
// File: /workspace/github_c_makefile_star2_O1/imaya[P]zopfli-for-emscripten/deflate.c
// Function: PatchDistanceCodesForBuggyDecoders
static void PatchDistanceCodesForBuggyDecoders(unsigned* d_lengths) {
  int num_dist_codes = 0; /* Amount of non-zero distance codes */
  int i;
  for (i = 0; i < 30 /* Ignore the two unused codes from the spec */; i++) {
    if (d_lengths[i]) num_dist_codes++;
    if (num_dist_codes >= 2) return; /* Two or more codes is fine. */
  }

  if (num_dist_codes == 0) {
    d_lengths[0] = d_lengths[1] = 1;
  } else if (num_dist_codes == 1) {
    d_lengths[d_lengths[0] ? 1 : 0] = 1;
  }
}

// Assembly:
xorl %eax, %eax
xorl %ecx, %ecx
cmpl $0x1, (%rdi,%rax,4)
sbbl $-0x1, %ecx
cmpl $0x1, %ecx
ja 0x2730
incq %rax
cmpq $0x1e, %rax
jne 0x26fc
testl %ecx, %ecx
je 0x2723
xorl %eax, %eax
cmpl $0x0, (%rdi)
setne %al
leaq (%rdi,%rax,4), %rdi
jmp 0x272a
movl $0x1, 0x4(%rdi)
movl $0x1, (%rdi)
retq