LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_create_texture
GLuint app_create_texture(app_t *self, GLuint index, const char *name) {
	GLuint texture;
	glCreateTextures(GL_TEXTURE_2D, 1, &texture);
	
	glBindTexture(GL_TEXTURE_2D, texture);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	
	glUniform1i(glGetUniformLocation(self->shader_program, name), index);
	return texture;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r12
movq 0x6122(%rip), %rax      # 0xef80
leaq 0xc(%rsp), %r14
movl $0xde1, %edi            # imm = 0xDE1
movl $0x1, %esi
movq %r14, %rdx
callq *(%rax)
movl (%r14), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x21d0
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0x2210
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2601, %edx           # imm = 0x2601
callq 0x2210
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2802, %esi           # imm = 0x2802
movl $0x812f, %edx           # imm = 0x812F
callq 0x2210
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2803, %esi           # imm = 0x2803
movl $0x812f, %edx           # imm = 0x812F
callq 0x2210
movq 0x60ea(%rip), %rax      # 0xefc0
movq (%rax), %r13
movq 0x6080(%rip), %rax      # 0xef60
movl 0x30(%r12), %edi
movq %r15, %rsi
callq *(%rax)
movl %eax, %edi
movl %ebx, %esi
callq *%r13
movl (%r14), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_destroy
void app_destroy(app_t *self) {
	plm_destroy(self->plm);
	
	if (self->texture_mode == APP_TEXTURE_MODE_RGB) {
		free(self->rgb_data);
	}

	if (self->audio_device) {
		SDL_CloseAudioDevice(self->audio_device);
	}
	
	SDL_GL_DeleteContext(self->gl);
	SDL_Quit();
	
	free(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2bbe
cmpl $0x2, 0x3c(%rbx)
jne 0x8f1d
movq 0x58(%rbx), %rdi
callq 0x21a0
movl 0x20(%rbx), %edi
testl %edi, %edi
je 0x8f29
callq 0x20d0
movq 0x28(%rbx), %rdi
callq 0x2060
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x21a0
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: app_update_texture
void app_update_texture(app_t *self, GLuint unit, GLuint texture, plm_plane_t *plane) {
	glActiveTexture(unit);
	glBindTexture(GL_TEXTURE_2D, texture);
	glTexImage2D(
		GL_TEXTURE_2D, 0, GL_LUMINANCE, plane->width, plane->height, 0,
		GL_LUMINANCE, GL_UNSIGNED_BYTE, plane->data
	);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %edi
movq 0x5ea3(%rip), %rax      # 0xefc8
callq *(%rax)
movl $0xde1, %edi            # imm = 0xDE1
movl %ebp, %esi
callq 0x21d0
movl (%rbx), %ecx
movl 0x4(%rbx), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1909, %edx           # imm = 0x1909
xorl %r9d, %r9d
pushq 0x8(%rbx)
pushq $0x1401                 # imm = 0x1401
pushq $0x1909                 # imm = 0x1909
callq 0x20b0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/phoboslab[P]pl_mpeg/pl_mpeg_player_gl.c
// Function: main
int main(int argc, char *argv[]) {
	if (argc < 2) {
		SDL_Log("Usage: pl_mpeg_player_gl <file.mpg>");
		exit(1);
	}
	
	app_t *app = app_create(argv[1], APP_TEXTURE_MODE_YCRCB);
	while (!app->wants_to_quit) {
		app_update(app);
	}
	app_destroy(app);
	
	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
cmpl $0x1, %edi
jle 0x919c
movq 0x8(%rsi), %rdi
movl $0x1, %esi
callq 0x8949
movq %rax, %rbx
cmpl $0x0, 0x10(%rax)
jne 0x9190
movq %rbx, %rdi
callq 0x8f40
cmpl $0x0, 0x10(%rbx)
je 0x9182
movq %rbx, %rdi
callq 0x8f02
xorl %eax, %eax
popq %rbx
retq
leaq 0x2798(%rip), %rdi      # 0xb93b
xorl %eax, %eax
callq 0x21f0
movl $0x1, %edi
callq 0x21b0
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: SC_Update64
void SC_Update64(u64 *S, u64 *Z)
{
u64 t1 = (S[0] << (66 - 64) | S[1] >> (128 - 66)) ^ (S[1] << (132 - 128) | S[2] >> (192 - 132));
u64 t2 = (S[3] << (69 - 64) | S[4] >> (128 - 69)) ^ (S[3] << (105 - 64) | S[4] >> (128 - 105));
u64 t3 = (S[5] << (66 - 64) | S[6] >> (128 - 66)) ^ (S[6] << (147 - 128) | S[7] >> (192 - 147));
Z[0] = t1 ^ t2 ^ t3 ^ ((S[0] << 38 | S[1] >> 26) & (S[3] << 2 | S[4] >> 62)); // Key Block generated

//Computing Updated Blocks
t1 ^= ((S[1] << (130 - 128) | S[2] >> (192 - 130)) & (S[1] << (131 - 128) | S[2] >> (192 - 131))) ^ (S[3] << (96 - 64) | S[4] >> (128 - 96));
t2 ^= ((S[3] << (103 - 64) | S[4] >> (128 - 103)) & (S[3] << (104 - 64) | S[4] >> (128 - 104))) ^ (S[5] << (120 - 64) | S[6] >> (128 - 120));
t3 ^= ((S[6] << (145 - 128) | S[7] >> (192 - 145)) & (S[6] << (146 - 128) | S[7] >> (192 - 146))) ^ (S[0] << (75 - 64) | S[1] >> (128 - 75));

//Shifting and Inserting Updated Blocks
S[2] = S[1]; S[1] = S[0]; S[0] = t3;   S[4] = S[3]; S[3] = t1;   S[7] = S[6]; S[6] = S[5]; S[5] = t2;
}

// Assembly:
pushq %r14
pushq %rbx
movq (%rdi), %r8
movq 0x8(%rdi), %r9
movq %r8, %rax
shldq $0x2, %r9, %rax
movq 0x10(%rdi), %rdx
shrdq $0x3c, %r9, %rdx
xorq %rax, %rdx
movq 0x18(%rdi), %r10
movq 0x20(%rdi), %r11
movq %r10, %rcx
shldq $0x5, %r11, %rcx
movq %r10, %rax
shldq $0x29, %r11, %rax
xorq %rcx, %rax
movq 0x28(%rdi), %rbx
movq 0x30(%rdi), %r14
shldq $0x2, %r14, %rbx
movq 0x38(%rdi), %rcx
shrdq $0x2d, %r14, %rcx
xorq %rbx, %rcx
shldq $0x26, %r9, %r8
shldq $0x2, %r11, %r10
andq %r8, %r10
xorq %rdx, %r10
movq %rax, %r8
xorq %rcx, %r8
xorq %r10, %r8
movq %r8, (%rsi)
movq (%rdi), %r8
movq 0x8(%rdi), %r9
movq 0x10(%rdi), %rbx
movq %r9, %rsi
shldq $0x2, %rbx, %rsi
shrdq $0x3d, %r9, %rbx
andq %rsi, %rbx
movq 0x18(%rdi), %r10
movq 0x20(%rdi), %rsi
movq %r10, %r11
shldq $0x20, %rsi, %r11
xorq %rbx, %r11
xorq %rdx, %r11
movq %r10, %rdx
shldq $0x27, %rsi, %rdx
shrdq $0x18, %r10, %rsi
andq %rdx, %rsi
movq 0x30(%rdi), %rdx
movq 0x38(%rdi), %rbx
movq %rdx, %r14
shldq $0x11, %rbx, %r14
shrdq $0x2e, %rdx, %rbx
andq %r14, %rbx
movq 0x28(%rdi), %r14
movq %r9, 0x10(%rdi)
movq %r8, 0x8(%rdi)
shldq $0xb, %r9, %r8
xorq %rbx, %r8
xorq %rcx, %r8
movq %r8, (%rdi)
movq %r10, 0x20(%rdi)
movq %r11, 0x18(%rdi)
movq %rdx, 0x38(%rdi)
movq %r14, 0x30(%rdi)
shldq $0x38, %rdx, %r14
xorq %rsi, %r14
xorq %rax, %r14
movq %r14, 0x28(%rdi)
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Key_Ext64
u64 Key_Ext64(u64 *S)
{
u64 Z;
u64 t1 = (S[0] << (66 - 64) | S[1] >> (128 - 66)) ^ (S[1] << (132 - 128) | S[2] >> (192 - 132));
u64 t2 = (S[3] << (69 - 64) | S[4] >> (128 - 69)) ^ (S[3] << (105 - 64) | S[4] >> (128 - 105));
u64 t3 = (S[5] << (66 - 64) | S[6] >> (128 - 66)) ^ (S[6] << (147 - 128) | S[7] >> (192 - 147));
Z = t1 ^ t2 ^ t3 ^ ((S[0] << 38 | S[1] >> 26) & (S[3] << 2 | S[4] >> 62)); // Key Block generated

return Z;
}

// Assembly:
movq (%rdi), %rsi
movq 0x8(%rdi), %r8
movq %rsi, %rax
shldq $0x2, %r8, %rax
movq 0x10(%rdi), %rdx
shrdq $0x3c, %r8, %rdx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r9
vmovdqu 0x30(%rdi), %xmm0
vmovq 0x28(%rdi), %xmm1
vmovq %rcx, %xmm2
vinserti128 $0x1, %xmm1, %ymm2, %ymm1
vpmovsxbq 0x1ca5(%rip), %ymm2 # 0x3060
vpermi2q %ymm0, %ymm1, %ymm2
vinserti128 $0x1, %xmm0, %ymm0, %ymm0
vpbroadcastq %r9, %xmm1
vpblendd $0xf0, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
vpsrlvq 0x1c44(%rip), %ymm0, %ymm0 # 0x3020
vpsllvq 0x1c5b(%rip), %ymm2, %ymm1 # 0x3040
vpor %ymm0, %ymm1, %ymm0
shldq $0x26, %r8, %rsi
shldq $0x2, %r9, %rcx
andq %rsi, %rcx
xorq %rax, %rcx
xorq %rdx, %rcx
vextracti128 $0x1, %ymm0, %xmm1
vpxor %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpxor %xmm1, %xmm0, %xmm0
vmovq %xmm0, %rax
xorq %rcx, %rax
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Mult_by_alpha_power
u32 Mult_by_alpha_power(u32 a, int m)
{
   int i; u32 result;
   for(i=0; i<m; i++)
   {
	result = a<<1; 
	if(((a>>31)&1)==1) result = result^(CONST_alpha_32);
	a = result;
   }
   return result;
}

// Assembly:
testl %esi, %esi
jle 0x1456
leal (%rdi,%rdi), %ecx
movl %ecx, %eax
xorl $0x400007, %eax         # imm = 0x400007
testl %edi, %edi
cmovnsl %ecx, %eax
movl %eax, %edi
decl %esi
jne 0x1440
retq
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: V_Horner_32
void V_Horner_32(u32 Input, u32* Tag)//, u8 FULL)
{
	Tag[0] = Tag[0]^Input;
      	Tag[1] = Mult_by_alpha_power(Tag[1],1)^Input;
      	Tag[2] = Mult_by_alpha_power(Tag[2],2)^Input;
      	Tag[3] = Mult_by_alpha_power(Tag[3],3)^Input;
	//if(FULL==1) Tag[4]=Mult_by_alpha_power(Tag[4],4)^Input;
}

// Assembly:
xorl %edi, (%rsi)
movl 0x4(%rsi), %ecx
movl 0x8(%rsi), %eax
leal (%rcx,%rcx), %edx
movl %edx, %r8d
xorl $0x400007, %r8d         # imm = 0x400007
testl %ecx, %ecx
cmovnsl %edx, %r8d
xorl %edi, %r8d
movl %r8d, 0x4(%rsi)
movl $0x2, %ecx
leal (%rax,%rax), %edx
movl %edx, %r8d
xorl $0x400007, %r8d         # imm = 0x400007
testl %eax, %eax
movl %r8d, %eax
cmovnsl %edx, %eax
decl %ecx
jne 0x147e
xorl %edi, %eax
movl %eax, 0x8(%rsi)
movl 0xc(%rsi), %eax
movl $0x3, %ecx
leal (%rax,%rax), %edx
movl %edx, %r8d
xorl $0x400007, %r8d         # imm = 0x400007
testl %eax, %eax
movl %r8d, %eax
cmovnsl %edx, %eax
decl %ecx
jne 0x14a4
xorl %edi, %eax
movl %eax, 0xc(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Mult_by_beta_power
u64 Mult_by_beta_power(u64 b, int m)
{
   int i; u64 result;
   for(i=0; i<m; i++)
   {
	result = b<<1; 
	if(((b>>63)&1)==1) result = result^(CONST_beta_64);
	b = result;
   }
   return result;
}

// Assembly:
testl %esi, %esi
jle 0x14e1
leaq (%rdi,%rdi), %rcx
movq %rcx, %rax
xorq $0x1b, %rax
testq %rdi, %rdi
cmovnsq %rcx, %rax
movq %rax, %rdi
decl %esi
jne 0x14c7
retq
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: V_Horner_64
void V_Horner_64(u64 Input, u64* Checksum)//, u8 FULL)
{
	Checksum[0] = Checksum[0]^Input;
      	Checksum[1] = Mult_by_beta_power(Checksum[1],1)^Input;
      	Checksum[2] = Mult_by_beta_power(Checksum[2],2)^Input;
	//if(FULL==1) Checksum[3] = Mult_by_beta_power(Checksum[3],3)^Input;
}

// Assembly:
xorq %rdi, (%rsi)
movq 0x8(%rsi), %rcx
movq 0x10(%rsi), %rax
leaq (%rcx,%rcx), %rdx
movq %rdx, %r8
xorq $0x1b, %r8
testq %rcx, %rcx
cmovnsq %rdx, %r8
xorq %rdi, %r8
movq %r8, 0x8(%rsi)
movl $0x2, %ecx
leaq (%rax,%rax), %rdx
movq %rdx, %r8
xorq $0x1b, %r8
testq %rax, %rax
movq %r8, %rax
cmovnsq %rdx, %rax
decl %ecx
jne 0x150b
xorq %rdi, %rax
movq %rax, 0x10(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Reverse_32
u32 Reverse_32(u32 a)
{
  u32 i, b=0;

  for(i=0;i<31;i++){
  	b^=(a&1); a=a>>1; b=b<<1;}
  b^=(a&1);
  return b;
}

// Assembly:
xorl %eax, %eax
movl $0x1f, %ecx
movl %edi, %edx
andl $0x1, %edx
orl %edx, %eax
shrl %edi
addl %eax, %eax
decl %ecx
jne 0x1533
andl $0x1, %edi
orl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: Field_Mult_32
u32 Field_Mult_32(u32 a, u32 b)
{
   u32 result=0, i;  

   b=Reverse_32(b); 

   if((b&1)==1) result=a;

   for(i=1;i<32;i++)
   {   
	b=b>>1;
	result=Mult_by_alpha_power(result,1); 
	if((b&1)==1) result=result^a;
   }
   return result;
}

// Assembly:
movl %esi, %eax
xorl %ecx, %ecx
movl $0x1f, %edx
movl %eax, %esi
andl $0x1, %esi
orl %esi, %ecx
shrl %eax
addl %ecx, %ecx
decl %edx
jne 0x1551
andl $0x1, %eax
orl %eax, %ecx
negl %eax
andl %edi, %eax
movl $0x1f, %edx
movl %ecx, %esi
leal (%rax,%rax), %r8d
movl %r8d, %r9d
xorl $0x400007, %r9d         # imm = 0x400007
testl %eax, %eax
cmovnsl %r8d, %r9d
shrl %esi
shll $0x1e, %ecx
sarl $0x1f, %ecx
andl %edi, %ecx
movl %ecx, %eax
xorl %r9d, %eax
movl %esi, %ecx
decl %edx
jne 0x1570
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/trivia128v2/ref/encrypt.c
// Function: process_block
void process_block(u64 Block, u32 *Tag, u64 *Checksum, u64 *SC_State, u64 *Z, u8 IsChecksum)//, u8 IsAD)
{
   u32 State_Key[2], word[2], PDP;
 
   word[0]= (u32)(((Block>>32) & (0x00000000FFFF0000)) ^ ((Block>>16)&(0x000000000000FFFF))); 
   word[1]= (u32)(((Block>>16)&(0x00000000FFFF0000))^ (Block &(0x000000000000FFFF))); // Parse Blocks into words


   State_Key[0]= (u32)(((SC_State[0]>>32) & (0x00000000FFFF0000)) ^ ((SC_State[0]>>16)&(0x000000000000FFFF))); 
   State_Key[1]= (u32)(((SC_State[0]>>16)&(0x00000000FFFF0000))^ (SC_State[0] &(0x000000000000FFFF)));
   //State_Key[0]= (u32)((SC_State[0]>>32)&(0xFFFFFFFF)); 
   //State_Key[1]= (u32)(SC_State[0]&(0xFFFFFFFF));                    // Obtain State-key Words
   
   SC_Update64(SC_State, Z);                                               // State Bits Updated
   
   PDP = Field_Mult_32(word[0]^State_Key[0], word[1]^State_Key[1]); // Pseudo-dot-Product
   
   V_Horner_32(PDP, Tag);                                      // Update Tag always.

   if(!IsChecksum) {V_Horner_64(Block, Checksum);}       // update checksum if not checksum block.
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdi, %rsi
shrq $0x20, %rsi
movl $0xffff0000, %eax       # imm = 0xFFFF0000
andl %eax, %esi
shrq $0x10, %rdi
movl $0xffff, %edx           # imm = 0xFFFF
movl %edi, %r9d
andl %edx, %r9d
orl %esi, %r9d
andl %eax, %edi
movl %r14d, %esi
andl %edx, %esi
orl %edi, %esi
movq (%rcx), %r12
movq %r12, %rdi
shrq $0x20, %rdi
andl %eax, %edi
movq %r12, %r10
shrq $0x10, %r10
movl %r10d, %r13d
andl %edx, %r13d
orl %edi, %r13d
xorl %r9d, %r13d
andl %eax, %r10d
andl %edx, %r12d
orl %r10d, %r12d
xorl %esi, %r12d
movq %rcx, %rdi
movq %r8, %rsi
callq 0x1050
movl %r13d, %edi
movl %r12d, %esi
callq 0x10b0
movl %eax, %edi
movq %r15, %rsi
callq 0x10c0
testl %ebp, %ebp
je 0x1671
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1080
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: lookup_pid
struct proc_table_entry *lookup_pid(unsigned int pid,int insert){
  int bucket = pid % NUM_PROC_TABLE_BUCKETS;
  struct proc_table_entry *pentry;

  for (pentry=proc_table[bucket];pentry;pentry=pentry->next){
    if (pentry->pid == pid) return pentry;
  }
  // not found
  if (!insert) return NULL;

  pentry = calloc(1,sizeof(struct proc_table_entry));
  pentry->pid = pid;
  pentry->pinfo = calloc(1,sizeof(struct process_info));
  pentry->pinfo->pid = pid;
  if (proc_table[bucket]){
    pentry->next = proc_table[bucket];
    pentry->next->prev = pentry;
  }
  proc_table[bucket] = pentry;
  num_processes++;
  total_processes++;
  if (num_processes > max_num_processes)
    max_num_processes = num_processes;
  return pentry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl %edi, %eax
imulq $0x446f8657, %rax, %rax # imm = 0x446F8657
shrq $0x20, %rax
movl %edi, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x6, %ecx
imull $0x65, %ecx, %eax
movl %edi, %r14d
subl %eax, %r14d
leaq 0x3e63(%rip), %r15      # 0x5140
movq (%r15,%r14,8), %rbx
testq %rbx, %rbx
je 0x12f0
cmpl %ebp, (%rbx)
je 0x1359
movq 0x18(%rbx), %rbx
jmp 0x12e1
testl %esi, %esi
je 0x1357
movl $0x1, %edi
movl $0x20, %esi
callq 0x10c0
movq %rax, %rbx
movl %ebp, (%rax)
movl $0x1, %edi
movl $0x68, %esi
callq 0x10c0
movq %rax, 0x8(%rbx)
movl %ebp, (%rax)
movq (%r15,%r14,8), %rax
testq %rax, %rax
je 0x132e
movq %rax, 0x18(%rbx)
movq %rbx, 0x10(%rax)
movq %rbx, (%r15,%r14,8)
movl 0x3df8(%rip), %ecx      # 0x5130
incl 0x3df6(%rip)            # 0x5134
leal 0x1(%rcx), %eax
movl %eax, 0x3de9(%rip)      # 0x5130
cmpl 0x3deb(%rip), %ecx      # 0x5138
jl 0x1359
movl %eax, 0x3de3(%rip)      # 0x5138
jmp 0x1359
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: remove_pid
int remove_pid(unsigned int pid){
  int bucket = pid % NUM_PROC_TABLE_BUCKETS;
  int found = 0;
  
  struct proc_table_entry *pentry;
  for (pentry=proc_table[bucket];pentry;pentry=pentry->next){
    if (pentry->pid == pid){
      found = 1;
      break;
    }
  }
  if (!found) return 1;

  if (pentry->next){
    pentry->next->prev = pentry->prev;
  }
  if (pentry->prev){
    pentry->prev->next = pentry->next;
  } else {
    proc_table[bucket] = pentry->next;
  }
  num_processes--;
  free(pentry);
  return 0;
}

// Assembly:
movl %edi, %eax
imulq $0x446f8657, %rax, %rax # imm = 0x446F8657
shrq $0x20, %rax
movl %edi, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x6, %ecx
imull $0x65, %ecx, %eax
movl %edi, %edx
subl %eax, %edx
leaq 0x3db3(%rip), %rsi      # 0x5140
movq (%rsi,%rdx,8), %rcx
movl $0x1, %eax
testq %rcx, %rcx
je 0x13e5
pushq %rax
leaq (%rsi,%rdx,8), %rdx
movq 0x18(%rcx), %rsi
cmpl %edi, (%rcx)
je 0x13b2
movq %rsi, %rcx
testq %rsi, %rsi
jne 0x13a0
jmp 0x13e1
testq %rsi, %rsi
je 0x13bf
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rsi)
movq 0x10(%rcx), %rax
leaq 0x18(%rax), %rdi
testq %rax, %rax
cmoveq %rdx, %rdi
movq %rsi, (%rdi)
decl 0x3d59(%rip)            # 0x5130
movq %rcx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: handle_fork
void handle_fork(double elapsed,unsigned int pid,char *child){
  debug("handle_fork(%d,%s)\n",elapsed,pid,child);  
  unsigned int child_pid = atoi(child);
  struct process_info *pinfo,*parent_pinfo;
  struct proc_table_entry *pentry = lookup_pid(child_pid,1);
  struct proc_table_entry *parent_pentry = lookup_pid(pid,0);
  if (pentry) pentry->pinfo->start = elapsed;
  if (pentry && parent_pentry){
    pinfo = pentry->pinfo;
    parent_pinfo = parent_pentry->pinfo;
    
    pinfo->parent = parent_pinfo;
    
    if (parent_pinfo->children){
      pinfo->older_sibling = parent_pinfo->children;
      pinfo->older_sibling->younger_sibling = pinfo;
    }
    parent_pinfo->children = pinfo;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1c43(%rip), %rdi      # 0x3065
movsd %xmm0, (%rsp)
movl %ebx, %esi
movq %r14, %rdx
movb $0x1, %al
callq 0x24d0
movq %r14, %rdi
callq 0x1170
movl %eax, %edi
movl $0x1, %esi
callq 0x12ac
movl %ebx, %ecx
imulq $0x446f8657, %rcx, %rcx # imm = 0x446F8657
shrq $0x20, %rcx
movl %ebx, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x6, %edx
imull $0x65, %edx, %ecx
movl %ebx, %edx
subl %ecx, %edx
leaq 0x3cd3(%rip), %rcx      # 0x5140
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x1480
cmpl %ebx, (%rcx)
je 0x1482
movq 0x18(%rcx), %rcx
jmp 0x1471
xorl %ecx, %ecx
testq %rax, %rax
je 0x1495
movq 0x8(%rax), %rdx
movsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rdx)
testq %rax, %rax
je 0x14c0
testq %rcx, %rcx
je 0x14c0
movq 0x8(%rax), %rax
movq 0x8(%rcx), %rcx
movq %rcx, 0x48(%rax)
movq 0x50(%rcx), %rdx
testq %rdx, %rdx
je 0x14bc
movq %rdx, 0x58(%rax)
movq %rax, 0x60(%rdx)
movq %rax, 0x50(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: parse_stat
void parse_stat(char *stat,struct process_info *pinfo){
  debug2("parse_stat: %s\n",stat);
  char *p;
  int i;
  int index = 0;
  char *stat_fields[NUM_STAT_FIELDS] = { 0 };
  char *stat_line = strdup(stat);
  p = strtok(stat_line," \n");
  while (p && index < NUM_STAT_FIELDS){
    stat_fields[index] = p;
    p = strtok(NULL," \n");
    index++;
  }
  for (i=0;i<index;i++){
    debug2("\t%d: %s\n",i,stat_fields[i]);
  }
  if (stat_fields[13]) pinfo->utime = atoi(stat_fields[13]); // utime user time in clock ticks
  if (stat_fields[14]) pinfo->stime = atoi(stat_fields[14]); // stime system time in clock ticks
  if (stat_fields[21]) pinfo->starttime = atoll(stat_fields[21]); // starttime since boot in clock ticks
  if (stat_fields[22]) pinfo->vsize = atoi(stat_fields[22]); // vsize - virtual memory in bytes
  if (stat_fields[38]) pinfo->processor = atoi(stat_fields[38]); // last processor
  if (stat_fields[51]) pinfo->exit_code = atoi(stat_fields[51]); // exit code
  free(stat_line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1b94(%rip), %rdi      # 0x3079
xorl %r12d, %r12d
movq %r14, %rsi
xorl %eax, %eax
callq 0x25d1
movq %rsp, %rdi
movl $0x1a0, %edx            # imm = 0x1A0
xorl %esi, %esi
callq 0x10a0
movq %r14, %rdi
callq 0x11a0
movq %rax, %r14
leaq 0x1b76(%rip), %rsi      # 0x3089
movq %rax, %rdi
callq 0x1130
testq %rax, %rax
je 0x154a
xorl %r13d, %r13d
leaq 0x1b5f(%rip), %r15      # 0x3089
movq %rax, (%rsp,%r13,8)
xorl %edi, %edi
movq %r15, %rsi
callq 0x1130
leaq 0x1(%r13), %r12
testq %rax, %rax
je 0x154a
cmpq $0x33, %r13
movq %r12, %r13
jb 0x152a
testl %r12d, %r12d
je 0x1575
movl %r12d, %r13d
leaq 0x1b33(%rip), %r15      # 0x308c
xorl %r12d, %r12d
movq (%rsp,%r12,8), %rdx
movq %r15, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x25d1
incq %r12
cmpq %r12, %r13
jne 0x155c
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x1587
callq 0x1170
movl %eax, 0x28(%rbx)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1599
callq 0x1170
movl %eax, 0x2c(%rbx)
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x15af
callq 0x10d0
movq %rax, 0x30(%rbx)
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x15c4
callq 0x1170
movl %eax, 0x38(%rbx)
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x15d9
callq 0x1170
movl %eax, 0x3c(%rbx)
movq 0x198(%rsp), %rdi
testq %rdi, %rdi
je 0x15ee
callq 0x1170
movl %eax, 0x40(%rbx)
movq %r14, %rdi
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: handle_exit
void handle_exit(double elapsed,unsigned int pid,char *stat){
  debug("handle_exit(%d,%s)\n",elapsed,pid,stat);

  int status;
  struct proc_table_entry *pentry = lookup_pid(pid,0);
  if (pentry){
    pentry->pinfo->finish = elapsed;
    parse_stat(stat,pentry->pinfo);
    status = remove_pid(pid);
    if (status) warning("unable to remove process %d?\n",pid);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
leaq 0x1a7f(%rip), %rdi      # 0x3095
movsd %xmm0, (%rsp)
movl %ebx, %esi
movq %r14, %rdx
movb $0x1, %al
callq 0x24d0
movl %ebx, %eax
imulq $0x446f8657, %rax, %rax # imm = 0x446F8657
shrq $0x20, %rax
movl %ebx, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x6, %ecx
imull $0x65, %ecx, %eax
movl %ebx, %ecx
subl %eax, %ecx
leaq 0x3af3(%rip), %rax      # 0x5140
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x1660
cmpl %ebx, (%rax)
je 0x1662
movq 0x18(%rax), %rax
jmp 0x1651
xorl %eax, %eax
testq %rax, %rax
je 0x169f
movq 0x8(%rax), %rsi
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%rsi)
movq %r14, %rdi
callq 0x14c8
movl %ebx, %edi
callq 0x1367
testl %eax, %eax
je 0x169f
leaq 0x1a1a(%rip), %rdi      # 0x30a9
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x222d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: handle_comm
void handle_comm(double elapsed,unsigned int pid,char *comm){
  debug("handle_comm(%d,%s)\n",elapsed,pid,comm);

  struct proc_table_entry *pentry = lookup_pid(pid,0);
  if (pentry){
    pentry->pinfo->comm = strdup(comm);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1a10(%rip), %rdi      # 0x30c7
movl %ebp, %esi
movq %rbx, %rdx
movb $0x1, %al
callq 0x24d0
movl %ebp, %eax
imulq $0x446f8657, %rax, %rax # imm = 0x446F8657
shrq $0x20, %rax
movl %ebp, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x6, %ecx
imull $0x65, %ecx, %eax
movl %ebp, %ecx
subl %eax, %ecx
leaq 0x3a57(%rip), %rax      # 0x5140
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x16fd
cmpl %ebp, (%r14)
je 0x1700
movq 0x18(%r14), %r14
jmp 0x16ed
xorl %r14d, %r14d
testq %r14, %r14
je 0x1715
movq %rbx, %rdi
callq 0x11a0
movq 0x8(%r14), %rcx
movq %rax, 0x8(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: handle_cmdline
void handle_cmdline(double elapsed,unsigned int pid,char *cmdline){
  debug("handle_cmdline(%d,%s)\n",elapsed,pid,cmdline);

  struct proc_table_entry *pentry = lookup_pid(pid,0);
  if (pentry){
    pentry->pinfo->cmdline = strdup(cmdline);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x19b1(%rip), %rdi      # 0x30db
movl %ebp, %esi
movq %rbx, %rdx
movb $0x1, %al
callq 0x24d0
movl %ebp, %eax
imulq $0x446f8657, %rax, %rax # imm = 0x446F8657
shrq $0x20, %rax
movl %ebp, %ecx
subl %eax, %ecx
shrl %ecx
addl %eax, %ecx
shrl $0x6, %ecx
imull $0x65, %ecx, %eax
movl %ebp, %ecx
subl %eax, %ecx
leaq 0x39e4(%rip), %rax      # 0x5140
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x1770
cmpl %ebp, (%r14)
je 0x1773
movq 0x18(%r14), %r14
jmp 0x1760
xorl %r14d, %r14d
testq %r14, %r14
je 0x1788
movq %rbx, %rdi
callq 0x11a0
movq 0x8(%r14), %rcx
movq %rax, 0x10(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: comm_compare
int comm_compare(const void *c1,const void *c2){
  const struct comm_info *comm1 = c1;
  const struct comm_info *comm2 = c2;
  if (comm1->total_utime > comm2->total_utime) return -1;
  else if (comm1->total_utime < comm2->total_utime) return 1;
  else if (comm1->total_stime > comm2->total_stime) return -1;
  else if (comm1->total_stime < comm2->total_stime) return 1;
  else if (comm1->count > comm2->count) return -1;
  else if (comm1->count < comm2->count) return 1;
  else return strcmp(comm1->comm,comm2->comm);
}

// Assembly:
movl 0xc(%rsi), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, 0xc(%rdi)
jbe 0x179b
retq
jae 0x17a3
movl $0x1, %eax
retq
movl 0x10(%rsi), %ecx
cmpl %ecx, 0x10(%rdi)
ja 0x179a
jb 0x179d
movl 0x8(%rsi), %ecx
cmpl %ecx, 0x8(%rdi)
ja 0x179a
movl $0x1, %eax
jb 0x179a
movq (%rdi), %rdi
movq (%rsi), %rsi
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: print_tree
static void print_tree(struct process_info *pinfo,int level){
  int i;
  int comm_width;
  int print_width;
  struct process_info *eldest;
  // print the node
  for (i=0;i<level;i++) printf("  ");
  printf("%d)",pinfo->pid);

  if (print_cmdline && pinfo->cmdline){
    print_width = output_width - 8 - 2*level;
    printf(" %.*s",print_width,pinfo->cmdline);
  } else if (pinfo->comm){
    printf(" %-16s",pinfo->comm);
  } else {
    printf(" ??");
  }
  printf(" cpu=%d",pinfo->processor);
  if (fflag){
    printf(" start=%-5.2f finish=%-5.2f",pinfo->start,pinfo->finish);
  }
  if (mflag){
    printf(" vmsize=%uk",(pinfo->vsize+512)/1024);
  }
  if (uflag){
    printf(" utime=%-4.2f stime=%-4.2f",
	   ((double) pinfo->utime/clocks_per_second),
	   ((double) pinfo->stime/clocks_per_second));
  }

  printf("\n");

  if (!pinfo->children) return;
  
  // find the eldest child and print the children
  for (eldest=pinfo->children;eldest->older_sibling != NULL;eldest=eldest->older_sibling);

  while (eldest){
    print_tree(eldest,level+1);
    eldest = eldest->younger_sibling;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
jle 0x1dd6
leaq 0x1627(%rip), %r15      # 0x33ed
movl %ebx, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0x1090
decl %ebp
jne 0x1dc8
movl (%r14), %esi
leaq 0x1610(%rip), %rdi      # 0x33f0
xorl %eax, %eax
callq 0x1090
cmpl $0x0, 0x3336(%rip)      # 0x5124
je 0x1e1a
movq 0x10(%r14), %rdx
testq %rdx, %rdx
je 0x1e1a
movl 0x32f5(%rip), %eax      # 0x50f4
leal (%rbx,%rbx), %ecx
negl %ecx
leal (%rax,%rcx), %esi
addl $-0x8, %esi
leaq 0x15e3(%rip), %rdi      # 0x33f4
xorl %eax, %eax
callq 0x1090
jmp 0x1e41
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x1e33
leaq 0x15d0(%rip), %rdi      # 0x33fa
xorl %eax, %eax
callq 0x1090
jmp 0x1e41
leaq 0x15c7(%rip), %rdi      # 0x3401
xorl %eax, %eax
callq 0x1090
movl 0x3c(%r14), %esi
leaq 0x15b9(%rip), %rdi      # 0x3405
xorl %eax, %eax
callq 0x1090
cmpl $0x0, 0x3296(%rip)      # 0x50f0
je 0x1e76
movsd 0x18(%r14), %xmm0
movsd 0x20(%r14), %xmm1
leaq 0x159e(%rip), %rdi      # 0x340d
movb $0x2, %al
callq 0x1090
cmpl $0x0, 0x329b(%rip)      # 0x5118
je 0x1e99
movl $0x200, %esi            # imm = 0x200
addl 0x38(%r14), %esi
shrl $0xa, %esi
leaq 0x1597(%rip), %rdi      # 0x3429
xorl %eax, %eax
callq 0x1090
cmpl $0x0, 0x327c(%rip)      # 0x511c
je 0x1ed8
movl 0x28(%r14), %eax
movl 0x2c(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
cvtsi2sdl 0x35b6(%rip), %xmm2 # 0x5470
divsd %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
divsd %xmm2, %xmm1
leaq 0x1564(%rip), %rdi      # 0x3435
movb $0x2, %al
callq 0x1090
movl $0xa, %edi
callq 0x1040
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1f0c
movq %rax, %r14
movq 0x58(%rax), %rax
testq %rax, %rax
jne 0x1eeb
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1daf
movq 0x60(%r14), %r14
testq %r14, %r14
jne 0x1ef9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/proctree.c
// Function: collect_process_totals
static void collect_process_totals(struct process_info *pinfo){
  struct comm_info *ci;
  struct process_info *child;

  // look for this process
  int found = 0;
  for (ci = comm_totals;ci;ci=ci->next){
    if (pinfo->comm && !strcmp(pinfo->comm,ci->comm)){
      ci->total_utime += pinfo->utime;
      ci->total_stime += pinfo->stime;
      ci->count++;
      found = 1;
      break;
    }
  }
  // not found, so add an entry
  if (!found && pinfo->comm){
    ci = calloc(1,sizeof(struct comm_info));
    ci->comm = strdup(pinfo->comm);
    ci->next = comm_totals;
    ci->total_utime = pinfo->utime;
    ci->total_stime = pinfo->stime;
    ci->count = 1;
    comm_totals = ci;
    num_comm_info++;
  }
  
  // walk the tree of children (the particular order doesn't matter so go from youngest to oldest
  for (child=pinfo->children;child;child=child->older_sibling)
    collect_process_totals(child);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3542(%rip), %r15      # 0x5468
testq %r15, %r15
je 0x1f4c
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1f43
movq (%r15), %rsi
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
je 0x1fa2
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x1f2f
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1fb4
movl $0x1, %edi
movl $0x20, %esi
callq 0x10c0
movq %rax, %r15
movq %r14, %rdi
callq 0x11a0
movq %rax, (%r15)
movq 0x34ef(%rip), %rax      # 0x5468
movq %rax, 0x18(%r15)
movl 0x28(%rbx), %eax
movl %eax, 0xc(%r15)
movl 0x2c(%rbx), %eax
movl %eax, 0x10(%r15)
movl $0x1, 0x8(%r15)
movq %r15, 0x34ce(%rip)      # 0x5468
incl 0x34d4(%rip)            # 0x5474
jmp 0x1fb4
movl 0x28(%rbx), %eax
addl %eax, 0xc(%r15)
movl 0x2c(%rbx), %eax
addl %eax, 0x10(%r15)
incl 0x8(%r15)
movq 0x50(%rbx), %rbx
testq %rbx, %rbx
je 0x1fcb
movq %rbx, %rdi
callq 0x1f17
movq 0x58(%rbx), %rbx
jmp 0x1fb8
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: initialize_error_subsystem
void initialize_error_subsystem(char *prog,char *filename){
  FILE *new_stream;
  program = prog;
  initialized = 1;
  if (!strcmp(filename,"-")){
    error_stream = stderr;
  } else {
    if (new_stream = fopen(filename,"a+")){
      error_stream = new_stream;
    } else {
      /* avoid looping in call to fatal */
      fatal("can not open error file: %s\n",filename);
    }
  }
  return;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rdi, 0x34a1(%rip)      # 0x5480
movb $0x1, 0x34a2(%rip)      # 0x5488
leaq 0x1105(%rip), %rsi      # 0x30f2
movq %rbx, %rdi
callq 0x10e0
testl %eax, %eax
je 0x201e
leaq 0x1450(%rip), %rsi      # 0x3450
movq %rbx, %rdi
callq 0x1120
testq %rax, %rax
jne 0x2028
leaq 0x143f(%rip), %rdi      # 0x3453
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2031
movq 0x2fd3(%rip), %rax      # 0x4ff8
movq (%rax), %rax
movq %rax, 0x3461(%rip)      # 0x5490
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: fatal
void fatal(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_FATAL){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    fprintf(error_stream,"fatal error: ");
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
  exit(1);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2090
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)
cmpb $0x0, 0x33f1(%rip)      # 0x5488
jne 0x20a7
leaq 0x1052(%rip), %rsi      # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x33ad(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x20ed
movq 0x33b1(%rip), %rdi      # 0x5490
leaq 0x138a(%rip), %rsi      # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x339c(%rip), %rcx      # 0x5490
leaq 0x137a(%rip), %rdi      # 0x3475
movl $0xd, %esi
movl $0x1, %edx
callq 0x1190
movq 0x337f(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
movl $0x1, %edi
callq 0x1180
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: error
void error(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_ERROR){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    fprintf(error_stream,"error: ");
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
  n_error++;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2182
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)
cmpl $0x0, 0x2f6f(%rip)      # 0x50f8
je 0x221e
movq %rdi, %rbx
cmpb $0x0, 0x32ef(%rip)      # 0x5488
jne 0x21a9
leaq 0xf50(%rip), %rsi       # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x32ab(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x21ef
movq 0x32af(%rip), %rdi      # 0x5490
leaq 0x1288(%rip), %rsi      # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x329a(%rip), %rcx      # 0x5490
leaq 0x127e(%rip), %rdi      # 0x347b
movl $0x7, %esi
movl $0x1, %edx
callq 0x1190
movq 0x327d(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
incl 0x3254(%rip)            # 0x5478
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: warning
void warning(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_WARNING){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    fprintf(error_stream,"warning: ");
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
  n_warning++;
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2289
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)
cmpl $0x2, 0x2e68(%rip)      # 0x50f8
jb 0x2325
movq %rdi, %rbx
cmpb $0x0, 0x31e8(%rip)      # 0x5488
jne 0x22b0
leaq 0xe49(%rip), %rsi       # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x31a4(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x22f6
movq 0x31a8(%rip), %rdi      # 0x5490
leaq 0x1181(%rip), %rsi      # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x3193(%rip), %rcx      # 0x5490
leaq 0x117f(%rip), %rdi      # 0x3483
movl $0x9, %esi
movl $0x1, %edx
callq 0x1190
movq 0x3176(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
incl 0x3151(%rip)            # 0x547c
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: notice
void notice(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_NOTICE){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2390
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)
cmpl $0x3, 0x2d61(%rip)      # 0x50f8
jb 0x240b
movq %rdi, %rbx
cmpb $0x0, 0x30e5(%rip)      # 0x5488
jne 0x23b3
leaq 0xd46(%rip), %rsi       # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x30a1(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x23f9
movq 0x30a5(%rip), %rdi      # 0x5490
leaq 0x107e(%rip), %rsi      # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x3090(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: debug
void debug(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_DEBUG){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    fprintf(error_stream,"debug: ");
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x252c
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)
cmpl $0x4, 0x2bc5(%rip)      # 0x50f8
jb 0x25c8
movq %rdi, %rbx
cmpb $0x0, 0x2f45(%rip)      # 0x5488
jne 0x2553
leaq 0xba6(%rip), %rsi       # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x2f01(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x2599
movq 0x2f05(%rip), %rdi      # 0x5490
leaq 0xede(%rip), %rsi       # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x2ef0(%rip), %rcx      # 0x5490
leaq 0xee6(%rip), %rdi       # 0x348d
movl $0x7, %esi
movl $0x1, %edx
callq 0x1190
movq 0x2ed3(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mvermeulen[P]wspy/error.c
// Function: debug2
void debug2(char *message,...){
  va_list ap;
  if (elevel >= ERROR_LEVEL_DEBUG2){
    if (!initialized) initialize_error_subsystem(NULL,"-");
    va_start(ap,message);
    if (program != NULL) fprintf(error_stream,"%s: ",program);
    fprintf(error_stream,"debug: ");
    vfprintf(error_stream,message,ap);
    va_end(ap);
  }
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x262d
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)
cmpl $0x5, 0x2ac4(%rip)      # 0x50f8
jb 0x26c9
movq %rdi, %rbx
cmpb $0x0, 0x2e44(%rip)      # 0x5488
jne 0x2654
leaq 0xaa5(%rip), %rsi       # 0x30f2
xorl %edi, %edi
callq 0x1fd4
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movq 0x2e00(%rip), %rdx      # 0x5480
testq %rdx, %rdx
je 0x269a
movq 0x2e04(%rip), %rdi      # 0x5490
leaq 0xddd(%rip), %rsi       # 0x3470
xorl %eax, %eax
callq 0x10f0
movq 0x2def(%rip), %rcx      # 0x5490
leaq 0xde5(%rip), %rdi       # 0x348d
movl $0x7, %esi
movl $0x1, %edx
callq 0x1190
movq 0x2dd2(%rip), %rdi      # 0x5490
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1160
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/spinner.c
// Function: init_spinner
int init_spinner(SPINNER** spinner)
{
    SPINNER*    sp  = NULL;

    if ((sp = (SPINNER*)
                malloc(sizeof(SPINNER))) == NULL)
        return -1;
    {
        sp->pid             = 0;
        sp->delay           = DEFAULT_DELAY_TIME;
        sp->symbl           = NULL;
        sp->msg             = NULL;
        sp->config          = config_spinner;
        sp->until           = until_spinner;
        sp->done            = done_spinner;
        sp->chg_delay_time  = change_delay_time;
        sp->release         = release_spinner;
    }
    *spinner = sp;

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x40, %edi
callq 0x10b0
testq %rax, %rax
je 0x1251
movabsq $0x186a000000000, %rcx  # imm = 0x186A000000000
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
leaq 0x3e(%rip), %rcx        # 0x1258
movq %rcx, 0x18(%rax)
leaq 0x14c(%rip), %rcx       # 0x1371
movq %rcx, 0x20(%rax)
leaq 0x1a9(%rip), %rcx       # 0x13d9
movq %rcx, 0x28(%rax)
leaq 0x1ea(%rip), %rcx       # 0x1425
movq %rcx, 0x30(%rax)
leaq 0x1e6(%rip), %rcx       # 0x142c
movq %rcx, 0x38(%rax)
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x1256
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/spinner.c
// Function: config_spinner
static
int config_spinner(SPINNER** spinner, const char* msg, const char* symbl)
{
    int     status  = 0;

    if (msg != NULL) {
        if ((*spinner)->msg != NULL) {
            release_msg(*spinner);
            (*spinner)->msg = NULL;
        }
        if (copy_message(spinner, msg) < 0) {
            status = -1; goto ERR;
        }
    }
    if (symbl != NULL) {
        if ((*spinner)->symbl != NULL) {
            release_symbl(*spinner);
            (*spinner)->symbl = NULL;
        }
        if (copy_symbol(spinner, symbl) < 0) {
            status = -2; goto ERR;
        }
    }

    return 0;

ERR:
    switch (status) {
        case    -1:
            break;
        case    -2:
            release_msg(*spinner);
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x12d0
movq %rsi, %r15
movq (%rbx), %r12
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x128e
callq 0x1030
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq (%rbx), %rcx
movq %rax, 0x8(%rcx)
movq %r15, %rdi
callq 0x1060
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x10b0
movq (%rbx), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x1339
movq (%rbx), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1090
movq (%rbx), %rax
movq 0x8(%rax), %rax
movb $0x0, (%rax,%r12)
xorl %ebp, %ebp
testq %r14, %r14
je 0x1366
movq (%rbx), %r15
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x12f9
callq 0x1030
xorl %eax, %eax
movq %rax, 0x10(%r15)
movq (%rbx), %rcx
movq %rax, 0x10(%rcx)
movq %r14, %rdi
callq 0x1060
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x10b0
movq (%rbx), %rcx
movq %rax, 0x10(%rcx)
testq %rax, %rax
je 0x1342
movq (%rbx), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1090
movq (%rbx), %rax
movq 0x10(%rax), %rax
movb $0x0, (%rax,%r15)
jmp 0x1366
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x1349
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movb $0x1, %al
testb %al, %al
je 0x1366
movq (%rbx), %rbx
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1366
callq 0x1030
movq $0x0, 0x8(%rbx)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/spinner.c
// Function: until_spinner
static
int until_spinner(SPINNER** spinner, const char* msg, const char* symbl)
{
    if ((msg == NULL && (*spinner)->msg == NULL) ||
            (symbl == NULL && (*spinner)->symbl == NULL))
        return -1;

    if (msg != NULL || symbl != NULL)
        if ((*spinner)->config(spinner, msg, symbl) < 0)
            return -2;

    switch ((*spinner)->pid = fork()) {
        case    -1:
            return -3;
        case    0:
            do_animation(*spinner);
            exit(0);
        default:
            break;
    }

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x1384
movq (%rbx), %rax
cmpq $0x0, 0x8(%rax)
je 0x13c6
testq %rdx, %rdx
jne 0x1393
movq (%rbx), %rax
cmpq $0x0, 0x10(%rax)
je 0x13c6
movq %rsi, %rax
orq %rdx, %rax
je 0x13a8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
testl %eax, %eax
js 0x13cd
callq 0x1100
movl %eax, %ecx
movq (%rbx), %rdi
movl %eax, (%rdi)
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
cmpl $-0x1, %ecx
je 0x13d2
testl %ecx, %ecx
je 0x13d4
xorl %eax, %eax
jmp 0x13d2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x13d2
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
popq %rbx
retq
callq 0x146b
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/spinner.c
// Function: done_spinner
static
int done_spinner(SPINNER* spinner)
{
    if (spinner->pid < 0)
        return -1;

    kill(spinner->pid, SIGKILL);
    waitpid(spinner->pid, NULL, 0);
    fprintf(stdout, "\x1b[2K\r");

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0x141c
movl $0x9, %esi
callq 0x10a0
movl (%rbx), %edi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0x10e0
movq 0x2bdf(%rip), %rax      # 0x3fe0
movq (%rax), %rcx
leaq 0xbfd(%rip), %rdi       # 0x2008
movl $0x5, %esi
movl $0x1, %edx
callq 0x10f0
jmp 0x1421
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/sasairc[P]yasuna/src/libbenly/src/spinner.c
// Function: release_spinner
static
void release_spinner(SPINNER* spinner)
{
    if (spinner != NULL) {
        release_msg(spinner);
        release_symbl(spinner);
        free(spinner);
        spinner = NULL;
    }

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x146a
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x144b
callq 0x1030
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1461
callq 0x1030
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x1030
retq