LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/logger.cpp
// Function: get_target[abi:cxx11](ash::Severity)
string get_target(const Severity level) {
  Config & config = Config::instance();

  // Default to /dev/null if the visibility is too low for this Logger.
  const Severity visible = parse(config.get_string("LOG_LEVEL", "DEBUG"));
  if (level < visible) return "/dev/null";
  // Use the configured target file.
  return config.get_string("LOG_FILE", "/dev/null");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x5d6d2
movq %rax, %r14
leaq 0xda19(%rip), %rsi      # 0x70252
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x8150
leaq 0xd9dc(%rip), %rsi      # 0x7022b
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x8150
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %r14, %rsi
callq 0x5d692
leaq 0x8(%rsp), %rdi
callq 0x62788
movl %eax, %r15d
leaq 0x8(%rsp), %rdi
callq 0x84b0
leaq 0x48(%rsp), %rdi
callq 0x84b0
leaq 0x28(%rsp), %rdi
callq 0x84b0
cmpl %ebp, %r15d
jle 0x628bb
leaq 0xd9b0(%rip), %rsi      # 0x7025c
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x8150
jmp 0x62910
leaq 0xd9a4(%rip), %rsi      # 0x70266
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x8150
leaq 0xd984(%rip), %rsi      # 0x7025c
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x8150
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5d692
leaq 0x28(%rsp), %rdi
callq 0x84b0
leaq 0x8(%rsp), %rdi
callq 0x84b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x84b0
jmp 0x62932
jmp 0x6294d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
jmp 0x6296e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
jmp 0x6295a
movq %rax, %rbx
jmp 0x6296e
movq %rax, %rbx
jmp 0x62964
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x84b0
leaq 0x28(%rsp), %rdi
callq 0x84b0
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/session.cpp
// Function: ash::Session::get_close_session_sql[abi:cxx11]() const
const string Session::get_close_session_sql() const {
  stringstream ss;
  ss << "UPDATE sessions \n"
     << "SET \n"
     << "  end_time = " << unix::time() << ", \n"
     << "  duration = " << unix::time() << " - start_time \n"
     << "WHERE id == " << unix::env("ASH_SESSION_ID") << "; ";
  return ss.str();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8260
leaq 0x70(%rsp), %rdi
leaq 0xcb7d(%rip), %rsi      # 0x705b6
callq 0x83a0
leaq 0xcb83(%rip), %rsi      # 0x705c8
movq %rax, %rdi
callq 0x83a0
leaq 0xcb7a(%rip), %rsi      # 0x705ce
movq %rax, %rdi
callq 0x83a0
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x65fbb
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x8320
leaq 0xc923(%rip), %rsi      # 0x703a0
movq %rax, %rdi
callq 0x83a0
leaq 0xcb50(%rip), %rsi      # 0x705dc
movq %rax, %rdi
callq 0x83a0
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x65fbb
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x8320
leaq 0xcb35(%rip), %rsi      # 0x705ea
movq %rax, %rdi
callq 0x83a0
leaq 0xcb36(%rip), %rsi      # 0x705fa
movq %rax, %rdi
callq 0x83a0
movq %rax, %r14
leaq 0xbe53(%rip), %rsi      # 0x6f929
movq %rsp, %rdi
callq 0x665af
movq %rsp, %rsi
movq %r14, %rdi
callq 0x8320
leaq 0xc3db(%rip), %rsi      # 0x6fecb
movq %rax, %rdi
callq 0x83a0
movq %rsp, %rdi
callq 0x84b0
leaq 0x20(%rsp), %rdi
callq 0x84b0
leaq 0x40(%rsp), %rdi
callq 0x84b0
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x8610
leaq 0x60(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
retq
jmp 0x63b4c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x84b0
jmp 0x63b4f
jmp 0x63b5b
jmp 0x63b6a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x84b0
jmp 0x63b5e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x84b0
jmp 0x63b6d
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x87e8
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
nop
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yyensure_buffer_stack()
static void yyensure_buffer_stack (void)
{
	int num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		int grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2485b(%rip), %rdi     # 0x897a0
testq %rdi, %rdi
je 0x64fad
movq 0x2487f(%rip), %rbx     # 0x897d0
leaq -0x1(%rbx), %rax
cmpq %rax, 0x2484c(%rip)     # 0x897a8
jb 0x64fd8
movq %rbx, %rax
shlq $0x20, %rax
movabsq $0x800000000, %r14      # imm = 0x800000000
addq %rax, %r14
movq %r14, %rsi
sarq $0x1d, %rsi
callq 0x8660
movq %rax, 0x2481b(%rip)     # 0x897a0
testq %rax, %rax
je 0x64fe0
sarq $0x20, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax,%rbx,8)
movups %xmm0, 0x20(%rax,%rbx,8)
movups %xmm0, 0x10(%rax,%rbx,8)
movups %xmm0, (%rax,%rbx,8)
movq %r14, 0x24825(%rip)     # 0x897d0
jmp 0x64fd8
pushq $0x8
popq %rdi
callq 0x84f0
movq %rax, 0x247e4(%rip)     # 0x897a0
testq %rax, %rax
je 0x64fe0
andq $0x0, (%rax)
movq $0x1, 0x24800(%rip) # 0x897d0
andq $0x0, 0x247d0(%rip)     # 0x897a8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xc743(%rip), %rdi      # 0x7172a
callq 0x6519a
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_create_buffer(_IO_FILE*, int)
YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer(b,file );

	return b;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x40
popq %rdi
callq 0x84f0
testq %rax, %rax
je 0x65039
movq %rax, %r14
movslq %ebp, %rdi
movq %rdi, 0x18(%rax)
addq $0x2, %rdi
callq 0x84f0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x65039
movl $0x1, 0x24(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x651be
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xc568(%rip), %rdi      # 0x715a8
callq 0x6519a
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_load_buffer_state()
static void yy_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

// Assembly:
movq 0x24754(%rip), %rax     # 0x897a0
movq 0x24755(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rdx
movl 0x20(%rdx), %esi
movl %esi, 0x24768(%rip)     # 0x897c8
movq 0x10(%rdx), %rdx
movq %rdx, 0x24745(%rip)     # 0x897b0
movq %rdx, 0x2464e(%rip)     # 0x896c0
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x24628(%rip)     # 0x896a8
movb (%rdx), %al
movb %al, 0x24730(%rip)      # 0x897b8
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_get_previous_state()
static yy_state_type yy_get_previous_state (void)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
	yy_current_state = (yy_start);

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 101 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		}

	return yy_current_state;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x24703(%rip), %eax     # 0x89798
movq 0x24624(%rip), %rcx     # 0x896c0
movq 0x2470d(%rip), %rdx     # 0x897b0
leaq 0xba46(%rip), %rsi      # 0x70af0
leaq 0xbdaf(%rip), %rdi      # 0x70e60
leaq 0xbb08(%rip), %r8       # 0x70bc0
leaq 0xc001(%rip), %r9       # 0x710c0
leaq 0xbe9a(%rip), %r10      # 0x70f60
leaq 0xbf93(%rip), %r11      # 0x71060
leaq 0xb61c(%rip), %rbx      # 0x706f0
cmpq %rdx, %rcx
jae 0x6513a
movzbl (%rcx), %r14d
testq %r14, %r14
je 0x650e8
movb (%rbx,%r14,4), %bpl
jmp 0x650eb
movb $0x1, %bpl
movslq %eax, %r14
cmpw $0x0, (%rsi,%r14,2)
je 0x65103
movl %eax, 0x246c0(%rip)     # 0x897bc
movq %rcx, 0x246bd(%rip)     # 0x897c0
movzbl %bpl, %ebp
movl %ebp, %r14d
cltq
movswq (%rdi,%rax,2), %r15
addq %r14, %r15
movswl (%r8,%r15,2), %ebp
cmpl %ebp, %eax
je 0x6512d
movswl (%r10,%rax,2), %eax
cmpl $0x65, %eax
jl 0x6510a
movb (%r11,%r14,4), %bpl
jmp 0x65103
movl %r15d, %eax
movswl (%r9,%rax,2), %eax
incq %rcx
jmp 0x650d4
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yyrestart(_IO_FILE*)
void yyrestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer(yyin,YY_BUF_SIZE );
	}

	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
	yy_load_buffer_state( );
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x24654(%rip), %rax     # 0x897a0
testq %rax, %rax
je 0x65161
movq 0x24650(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
jne 0x6518c
callq 0x64f3a
movq 0x2453b(%rip), %rdi     # 0x896a8
movl $0x4000, %esi           # imm = 0x4000
callq 0x64fec
movq %rax, %rdi
movq 0x2461f(%rip), %rax     # 0x897a0
movq 0x24620(%rip), %rcx     # 0x897a8
movq %rdi, (%rax,%rcx,8)
movq %rbx, %rsi
callq 0x651be
popq %rbx
jmp 0x65045
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_init_buffer(yy_buffer_state*, _IO_FILE*)
static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	yy_flush_buffer(b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then yy_init_buffer was _probably_
     * called from yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x8050
movq %rax, %r14
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x65305
movq %r15, (%rbx)
movl $0x1, 0x38(%rbx)
movq 0x245b2(%rip), %rax     # 0x897a0
testq %rax, %rax
je 0x65200
movq 0x245ae(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rax
jmp 0x65202
xorl %eax, %eax
cmpq %rbx, %rax
je 0x6520f
movq $0x1, 0x30(%rbx)
testq %r15, %r15
je 0x6522c
movq %r15, %rdi
callq 0x8420
movl %eax, %edi
callq 0x86d0
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
jmp 0x6522e
xorl %ecx, %ecx
movl %ecx, 0x28(%rbx)
movl %ebp, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_switch_to_buffer(yy_buffer_state*)
void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		yypop_buffer_state();
	 *		yypush_buffer_state(new_buffer);
     */
	yyensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	yy_load_buffer_state( );

	/* We don't actually know whether we did this switch during
	 * EOF (yywrap()) processing, but the only time this flag
	 * is looked at is after yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	(yy_did_buffer_switch_on_eof) = 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x64f3a
movq 0x24551(%rip), %rax     # 0x897a0
testq %rax, %rax
je 0x6528f
movq 0x2454d(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rdx
cmpq %rbx, %rdx
je 0x652ab
testq %rdx, %rdx
je 0x6529b
movb 0x24549(%rip), %dl      # 0x897b8
movq 0x2453a(%rip), %rsi     # 0x897b0
movb %dl, (%rsi)
movq (%rax,%rcx,8), %rdx
movq %rsi, 0x10(%rdx)
movl 0x24542(%rip), %edx     # 0x897c8
movq (%rax,%rcx,8), %rsi
movl %edx, 0x20(%rsi)
jmp 0x6529b
testq %rbx, %rbx
je 0x652ab
movq 0x2450d(%rip), %rcx     # 0x897a8
movq %rbx, (%rax,%rcx,8)
callq 0x65045
movb $0x1, 0x24521(%rip)     # 0x897cc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_delete_buffer(yy_buffer_state*)
void yy_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yyfree((void *) b->yy_ch_buf  );

	yyfree((void *) b  );
}

// Assembly:
testq %rdi, %rdi
je 0x652d4
pushq %rbx
movq %rdi, %rbx
movq 0x244de(%rip), %rax     # 0x897a0
testq %rax, %rax
je 0x652d5
movq 0x244da(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rcx
jmp 0x652d7
retq
xorl %ecx, %ecx
cmpq %rbx, %rcx
jne 0x652e8
movq 0x244c5(%rip), %rcx     # 0x897a8
andq $0x0, (%rax,%rcx,8)
cmpl $0x0, 0x24(%rbx)
je 0x652f7
movq 0x8(%rbx), %rdi
callq 0x8480
movq %rbx, %rdi
popq %rbx
jmp 0x8480
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yypush_buffer_state(yy_buffer_state*)
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == NULL)
		return;

	yyensure_buffer_stack();

	/* This block is copied from yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

// Assembly:
testq %rdi, %rdi
je 0x653b8
pushq %rbx
movq %rdi, %rbx
callq 0x64f3a
movq 0x2443a(%rip), %rax     # 0x897a0
movq 0x2443b(%rip), %rcx     # 0x897a8
testq %rax, %rax
je 0x653a7
cmpq $0x0, (%rax,%rcx,8)
je 0x653a7
movb 0x24439(%rip), %dl      # 0x897b8
movq 0x2442a(%rip), %rsi     # 0x897b0
movb %dl, (%rsi)
movq (%rax,%rcx,8), %rdx
movq %rsi, 0x10(%rdx)
movl 0x24432(%rip), %edx     # 0x897c8
movq (%rax,%rcx,8), %rsi
movl %edx, 0x20(%rsi)
incq %rcx
movq %rcx, 0x24401(%rip)     # 0x897a8
movq %rbx, (%rax,%rcx,8)
callq 0x65045
movb $0x1, 0x24415(%rip)     # 0x897cc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yypop_buffer_state()
void yypop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	yy_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		yy_load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

// Assembly:
movq 0x243e0(%rip), %rax     # 0x897a0
testq %rax, %rax
je 0x65416
pushq %rax
movq 0x243db(%rip), %rcx     # 0x897a8
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x65412
callq 0x652b2
movq 0x243be(%rip), %rax     # 0x897a0
movq 0x243bf(%rip), %rcx     # 0x897a8
andq $0x0, (%rax,%rcx,8)
testq %rcx, %rcx
je 0x65412
leaq -0x1(%rcx), %rdx
movq %rdx, 0x243aa(%rip)     # 0x897a8
cmpq $0x0, -0x8(%rax,%rcx,8)
je 0x65412
callq 0x65045
movb $0x1, 0x243ba(%rip)     # 0x897cc
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_scan_buffer(char*, unsigned long)
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = 0;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer(b  );

	return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x2, %rsi
jb 0x65437
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x0, -0x2(%rdi,%rsi)
jne 0x65437
cmpb $0x0, -0x1(%r15,%r14)
je 0x65442
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x40
popq %rdi
callq 0x84f0
testq %rax, %rax
je 0x6548b
movq %rax, %rbx
addq $-0x2, %r14
movq %r14, 0x18(%rax)
movq %r15, 0x8(%rax)
movq %r15, 0x10(%rax)
andl $0x0, 0x24(%rax)
andq $0x0, (%rax)
movl %r14d, 0x20(%rax)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x28(%rbx)
andq $0x0, 0x38(%rbx)
movq %rbx, %rdi
callq 0x6523f
jmp 0x65439
leaq 0xc142(%rip), %rdi      # 0x715d4
callq 0x6519a
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_scan_bytes(char const*, int)
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) yyalloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = yy_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %r15
leal 0x2(%r14), %eax
movslq %eax, %rbx
movq %rbx, %rdi
callq 0x84f0
testq %rax, %rax
je 0x6550f
xorl %ecx, %ecx
testl %r14d, %r14d
movl $0x0, %edx
cmovgl %r14d, %edx
cmpq %rcx, %rdx
je 0x654ea
movb (%r15,%rcx), %sil
movb %sil, (%rax,%rcx)
incq %rcx
jmp 0x654d8
movslq %r14d, %rcx
andw $0x0, (%rax,%rcx)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x65417
testq %rax, %rax
je 0x6551b
movl $0x1, 0x24(%rax)
popq %rbx
popq %r14
popq %r15
retq
leaq 0xc0e8(%rip), %rdi      # 0x715fe
callq 0x6519a
leaq 0xc105(%rip), %rdi      # 0x71627
callq 0x6519a
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: proc_stat[abi:cxx11](int, int)
const string proc_stat(const int target, const pid_t pid) {
  stringstream ss;
  ss << "/proc/" << pid << "/stat";
  ifstream fin(ss.str().c_str());
  string token;
  for (int i = 0; fin.good(); ++i) {
    fin >> token;
    if (i == target) break;
  }
  fin.close();
  return token;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x228(%rsp), %rdi
callq 0x8260
leaq 0x238(%rsp), %rdi
leaq 0xbeec(%rip), %rsi      # 0x717ff
callq 0x83a0
movq %rax, %rdi
movl %r14d, %esi
callq 0x86a0
leaq 0xbe5f(%rip), %rsi      # 0x71789
movq %rax, %rdi
callq 0x83a0
leaq 0x240(%rsp), %rsi
movq %rsp, %rdi
callq 0x8610
movq (%rsp), %rsi
leaq 0x20(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x8740
movq %rsp, %rdi
callq 0x84b0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
incl %ebp
leaq 0x20(%rsp), %r14
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x40(%rsp,%rax)
jne 0x65991
movq %r14, %rdi
movq %rbx, %rsi
callq 0x84c0
decl %ebp
jne 0x65972
leaq 0x20(%rsp), %rdi
callq 0x80a0
leaq 0x20(%rsp), %rdi
callq 0x80b0
leaq 0x228(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x659d4
jmp 0x659d9
movq %rax, %r14
movq %rsp, %rdi
callq 0x84b0
jmp 0x659ee
jmp 0x659d4
movq %rax, %r14
jmp 0x659ee
movq %rax, %r14
movq %rbx, %rdi
callq 0x84b0
leaq 0x20(%rsp), %rdi
callq 0x80b0
leaq 0x228(%rsp), %rdi
callq 0x87e8
movq %r14, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::cwd[abi:cxx11]()
const string unix::cwd() {
  char * c = get_current_dir_name();
  if (!c) return DBObject::quote(0);
  string cwd(c);
  free(c);
  return DBObject::quote(cwd);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x8750
testq %rax, %rax
je 0x65a58
movq %rax, %r14
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x8150
movq %r14, %rdi
callq 0x8480
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5dd76
leaq 0x10(%rsp), %rdi
callq 0x84b0
jmp 0x65a62
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5ef40
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x84b0
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: exists(char const*)
bool exists(const char * dir) {
  struct stat st;
  if (stat(dir, &st) != 0) {
    LOG(DEBUG) << "tested file does not exist: '" << dir << "': "
               << strerror(errno);
    return false;
  }
  return true;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rdi, %r14
movq %rsp, %rsi
callq 0x8330
movl %eax, %ebx
testl %eax, %eax
je 0x65b0b
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0x62c92
leaq 0x98(%rsp), %rdi
leaq 0xbcca(%rip), %rsi      # 0x7178f
callq 0x83a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x83a0
leaq 0xbcd1(%rip), %rsi      # 0x717ad
movq %rax, %rdi
callq 0x83a0
movq %rax, %r14
callq 0x8050
movl (%rax), %edi
callq 0x8120
movq %r14, %rdi
movq %rax, %rsi
callq 0x83a0
leaq 0x90(%rsp), %rdi
callq 0x62fc8
testl %ebx, %ebx
sete %al
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x62fc8
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ps(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
const char * ps(const string & args, pid_t pid) {
  LOG(DEBUG) << "looking at ps output for ps " << args << " " << pid;
  stringstream ss;
  ss << "/bin/ps " << args << " " << pid;
  FILE * p = popen(ss.str().c_str(), "r");
  if (p) {
    char buffer[256];
    char * rval = fgets(buffer, 256, p);
    pclose(p);
    if (!rval) return "null";
    for (size_t i = strlen(rval) - 1; i > 0; --i)
      if (rval[i] == '\n') {
        rval[i] = '\0';
        break;
      }
    return rval;
  }
  return "null";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movl %esi, %ebx
movq %rdi, %r14
leaq 0x100(%rsp), %rdi
xorl %esi, %esi
callq 0x62c92
leaq 0x108(%rsp), %rdi
leaq 0xbc49(%rip), %rsi      # 0x717b1
callq 0x83a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x8320
leaq 0x77f3(%rip), %rsi      # 0x6d372
movq %rax, %rdi
callq 0x83a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x86a0
leaq 0x100(%rsp), %rdi
callq 0x62fc8
leaq 0x100(%rsp), %rdi
callq 0x8260
leaq 0x110(%rsp), %rdi
leaq 0xbc14(%rip), %rsi      # 0x717ce
callq 0x83a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x8320
leaq 0x77a1(%rip), %rsi      # 0x6d372
movq %rax, %rdi
callq 0x83a0
movq %rax, %rdi
movl %ebx, %esi
callq 0x86a0
leaq 0x118(%rsp), %rsi
movq %rsp, %rdi
callq 0x8610
movq %rsp, %rbx
movq (%rbx), %rdi
leaq 0x5f56(%rip), %rsi      # 0x6bb56
callq 0x8100
movq %rax, %r14
movq %rbx, %rdi
callq 0x84b0
testq %r14, %r14
je 0x65c57
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x8600
movq %rax, %rbx
movq %r14, %rdi
callq 0x8530
testq %rbx, %rbx
je 0x65c57
movq %rbx, %rdi
callq 0x8170
cmpq $0x1, %rax
je 0x65c5e
leaq -0x1(%rax), %rcx
cmpb $0xa, -0x1(%rbx,%rax)
movq %rcx, %rax
jne 0x65c3d
movb $0x0, (%rbx,%rcx)
jmp 0x65c5e
leaq 0xa603(%rip), %rbx      # 0x70261
leaq 0x100(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r14
retq
jmp 0x65c7b
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x87e8
jmp 0x65c9d
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x62fc8
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::shell[abi:cxx11]()
const string unix::shell() {
  if (exists("/proc")) {
    LOG(DEBUG) << "looking for shell name in /proc/" << shell_pid() << "/stat.";
    string sh = proc_stat(1, shell_pid());
    // If the shell name is wrapped in parentheses, strip them.
    if (!sh.empty() && sh[0] == '(' && sh[sh.length() - 1] == ')') {
      sh = sh.substr(1, sh.length() - 2);
    }
    return DBObject::quote(sh);
  } else {
    // This is expected on OSX - no procfs so no /proc directory.
    string sh = ps("ho command", shell_pid());
    return sh == "null" ? sh : DBObject::quote(sh);
  }
  return "null";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rdi, %rbx
leaq 0xb9fe(%rip), %rdi      # 0x717d7
callq 0x65a8c
testb %al, %al
je 0x65e9d
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x62c92
leaq 0x38(%rsp), %rdi
leaq 0xb9e7(%rip), %rsi      # 0x717e5
callq 0x83a0
movq %rax, %r14
callq 0x65d4a
movq %r14, %rdi
movl %eax, %esi
callq 0x86a0
leaq 0xb9ea(%rip), %rsi      # 0x71806
movq %rax, %rdi
callq 0x83a0
leaq 0x30(%rsp), %rdi
callq 0x62fc8
callq 0x65d4a
leaq 0x30(%rsp), %r14
pushq $0x1
popq %rsi
movq %r14, %rdi
movl %eax, %edx
callq 0x658e4
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x65e8e
movq 0x30(%rsp), %rax
cmpb $0x28, (%rax)
jne 0x65e8e
cmpb $0x29, -0x1(%rax,%rcx)
jne 0x65e8e
addq $-0x2, %rcx
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x83f0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x81d0
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x5dd76
jmp 0x65f11
leaq 0xb969(%rip), %rsi      # 0x7180d
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8150
callq 0x65d4a
leaq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x65b3b
leaq 0x30(%rsp), %rdi
leaq 0xe(%rsp), %rdx
movq %rax, %rsi
callq 0x8150
leaq 0x10(%rsp), %rdi
callq 0x84b0
leaq 0xa37a(%rip), %rsi      # 0x70261
leaq 0x30(%rsp), %rdi
callq 0x5c510
testb %al, %al
je 0x65f04
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x8500
jmp 0x65f11
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x5dd76
leaq 0x30(%rsp), %rdi
callq 0x84b0
movq %rbx, %rax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x84b0
jmp 0x65f3d
jmp 0x65f3a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x65f7b
jmp 0x65f5f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x84b0
jmp 0x65f7b
movq %rax, %rbx
jmp 0x65f7b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x84b0
jmp 0x65f7b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x62fc8
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::time_zone[abi:cxx11]()
const string unix::time_zone() {
  stringstream ss;
  char zone_buffer[5];
  time_t now = ::time(0);
  strftime(zone_buffer, 5, "%Z", localtime(&now));
  ss << zone_buffer;
  return DBObject::quote(ss.str());
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8260
xorl %edi, %edi
callq 0x8350
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
callq 0x8280
leaq 0xb811(%rip), %rdx      # 0x71818
leaq 0x3(%rsp), %r14
pushq $0x5
popq %rsi
movq %r14, %rdi
movq %rax, %rcx
callq 0x82b0
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x83a0
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x8610
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5dd76
leaq 0x8(%rsp), %rdi
callq 0x84b0
leaq 0x30(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
jmp 0x66079
jmp 0x66076
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x87e8
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::host_name[abi:cxx11]()
const string unix::host_name() {
  char buffer[1024];
  if (gethostname(buffer, sizeof(buffer))) {
    perror("advanced shell history: Unix: gethostname");
  }
  return DBObject::quote(buffer);
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x85c0
testl %eax, %eax
jne 0x664cb
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x5ef40
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
leaq 0xb412(%rip), %rdi      # 0x718e4
callq 0x82d0
jmp 0x664b4
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/unix.cpp
// Function: ash::unix::tty[abi:cxx11]()
const string unix::tty() {
  string tty = DBObject::quote(ttyname(0));
  if (tty.find("/dev/") == 1) {
    return "'" + tty.substr(6);
  }
  return tty;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x8230
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x5ef40
leaq 0xb3f4(%rip), %rsi      # 0x7190e
movq %r14, %rdi
xorl %edx, %edx
callq 0x87d0
cmpq $0x1, %rax
jne 0x6655f
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x6
popq %rdx
pushq $-0x1
popq %rcx
callq 0x83f0
leaq 0x9dc9(%rip), %rsi      # 0x7030f
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x665ee
leaq 0x28(%rsp), %rdi
callq 0x84b0
jmp 0x6656c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8500
leaq 0x8(%rsp), %rdi
callq 0x84b0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x84b0
jmp 0x66595
jmp 0x66592
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
movq %rbx, %rdi
callq 0x86f0
movq %rax, %rdi
callq 0x5c505
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/util.cpp
// Function: ash::Util::to_string[abi:cxx11](int)
string Util::to_string(int value) {
  static stringstream ss;
  ss.str("");
  ss << value;
  return ss.str();
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movb 0x232e3(%rip), %al      # 0x89960
testb %al, %al
je 0x666d9
leaq 0x9cbd(%rip), %rsi      # 0x70345
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x8150
leaq 0x23152(%rip), %rdi     # 0x897f0
leaq 0x8(%rsp), %rsi
callq 0x85b0
leaq 0x8(%rsp), %rdi
callq 0x84b0
leaq 0x2312f(%rip), %rdi     # 0x897e8
movl %ebp, %esi
callq 0x86a0
leaq 0x23129(%rip), %rsi     # 0x897f0
movq %rbx, %rdi
callq 0x8610
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x23280(%rip), %rdi     # 0x89960
callq 0x8720
testl %eax, %eax
je 0x66681
leaq 0x230e8(%rip), %rdi     # 0x897d8
callq 0x8260
movq 0x208ac(%rip), %rdi     # 0x86fa8
leaq 0x230d5(%rip), %rsi     # 0x897d8
leaq 0x20cee(%rip), %rdx     # 0x873f8
callq 0x8310
leaq 0x2324a(%rip), %rdi     # 0x89960
callq 0x8210
jmp 0x66681
movq %rax, %rbx
leaq 0x23236(%rip), %rdi     # 0x89960
callq 0x8200
jmp 0x6674b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x84b0
jmp 0x6674b
movq %rax, %rdi
callq 0x5c505
movq %rax, %rbx
movq %rbx, %rdi
callq 0x86f0
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/server_udp.c
// Function: main
int main(int argc, char *argv[]) {
   char buf[BUFSIZE];
   ssize_t bytesread;
   char hostinfo[BUFSIZE];
   u_port_t port;
   int requestfd;
   u_buf_t senderinfo;

   if (argc != 2) {
      fprintf(stderr, "Usage: %s port\n", argv[0]);
      return 1;
   }
   port = (u_port_t) atoi(argv[1]);        /* create communication endpoint */
   if ((requestfd = u_openudp(port)) == -1) {
      perror("Failed to create UDP endpoint");
      return 1;
   }
   for ( ; ; ) {                                 /* process client requests */
      bytesread = u_recvfrom(requestfd, buf, BUFSIZE, &senderinfo);
      if (bytesread < 0) {
         perror("Failed to receive request");
         continue;
      }
      u_gethostinfo(&senderinfo, hostinfo, BUFSIZE);
      if ((r_write(STDOUT_FILENO, hostinfo, strlen(hostinfo)) == -1) ||
          (r_write(STDOUT_FILENO, buf, bytesread) == -1)) {
         perror("Failed to echo reply to standard output");
      }
   }     
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
cmpl $0x2, %edi
jne 0x139d
movq 0x8(%rsi), %rdi
callq 0x1190
movzwl %ax, %edi
callq 0x1ac4
cmpl $-0x1, %eax
je 0x13ba
movl %eax, %ebx
leaq -0x840(%rbp), %r14
leaq -0x38(%rbp), %r15
leaq -0x440(%rbp), %r12
movl $0x400, %edx            # imm = 0x400
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rcx
callq 0x1b65
leaq 0xcf2(%rip), %rdi       # 0x2032
testq %rax, %rax
js 0x1396
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x1c4c
movq %r12, %rdi
callq 0x1080
pushq $0x1
popq %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1565
leaq 0xcd7(%rip), %rdi       # 0x204c
cmpq $-0x1, %rax
je 0x1396
pushq $0x1
popq %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1565
leaq 0xcbc(%rip), %rdi       # 0x204c
cmpq $-0x1, %rax
jne 0x1327
callq 0x1180
jmp 0x1327
movq 0x2c54(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0xc53(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1110
jmp 0x13c6
leaq 0xc53(%rip), %rdi       # 0x2014
callq 0x1180
pushq $0x1
popq %rax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciname.c
// Function: addr2name
void addr2name(struct in_addr addr, char *name, int namelen) {
   struct hostent *hostptr;
   hostptr = gethostbyaddr((char *)&addr, 4, AF_INET);
   if (hostptr == NULL)
      strncpy(name, inet_ntoa(addr), namelen-1);
   else
      strncpy(name, hostptr->h_name, namelen-1);
   name[namelen-1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %r14d
movq %rsi, %rbx
leaq -0x14(%rbp), %rax
movl %edi, (%rax)
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rax, %rdi
callq 0x11a0
testq %rax, %rax
je 0x1a3f
movq (%rax), %rsi
jmp 0x1a4a
movl -0x14(%rbp), %edi
callq 0x1070
movq %rax, %rsi
leal -0x1(%r14), %eax
movslq %eax, %rdx
movq %rbx, %rdi
callq 0x1040
movslq %r14d, %rax
movb $0x0, -0x1(%rbx,%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciname.c
// Function: name2addr
int name2addr(char *name, in_addr_t *addrp) {
   struct hostent *hp;

   if (isdigit((int)(*name)))
      *addrp = inet_addr(name);
   else {
      hp = gethostbyname(name);
      if (hp == NULL)
         return -1;
      memcpy((char *)addrp, hp->h_addr_list[0], hp->h_length);
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x11c0
movq (%rax), %rax
movsbq (%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x1aac
movq %r14, %rdi
callq 0x1100
testq %rax, %rax
je 0x1abd
movq 0x18(%rax), %rcx
movq (%rcx), %rsi
movslq 0x14(%rax), %rdx
movq %rbx, %rdi
callq 0x1120
jmp 0x1ab6
movq %r14, %rdi
callq 0x10f0
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x1ab8
nop
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_openudp
int u_openudp(u_port_t port) {
   int error;
   int one = 1;
   struct sockaddr_in server;
   int sock;

   if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1)
      return -1;

   if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) == -1) {
      error = errno;
      r_close(sock);
      errno = error;
      return -1;
   }
       
   if (port > 0) {
      server.sin_family = AF_INET;
      server.sin_addr.s_addr = htonl(INADDR_ANY);
      server.sin_port = htons((short)port);
 
      if (bind(sock, (struct sockaddr *)&server, sizeof(server)) == -1) {
         error = errno;
         r_close(sock);
         errno = error;
         return -1;
      }
   }
   return sock;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edi, %r15d
movl $0x1, -0x24(%rbp)
pushq $0x2
popq %rdi
movl %edi, %esi
xorl %edx, %edx
callq 0x11d0
pushq $-0x1
popq %rbx
cmpl $-0x1, %eax
je 0x1b56
movl %eax, %r14d
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
leaq -0x24(%rbp), %rcx
pushq $0x4
popq %r8
movl %eax, %edi
callq 0x1050
cmpl $-0x1, %eax
je 0x1b40
testw %r15w, %r15w
je 0x1b3b
leaq -0x34(%rbp), %rsi
movw $0x2, (%rsi)
andl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
pushq $0x10
popq %rdx
movl %r14d, %edi
callq 0x1150
cmpl $-0x1, %eax
je 0x1b40
movl %r14d, %ebx
jmp 0x1b56
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x13dc
movl %r12d, (%r15)
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_recvfrom
ssize_t u_recvfrom(int fd, void *buf, size_t nbytes, u_buf_t *ubufp) {
   int len;
   struct sockaddr *remote;
   int retval;

   len = sizeof (struct sockaddr_in);
   remote = (struct sockaddr *)ubufp;
   while (((retval = recvfrom(fd, buf, nbytes, 0, remote, &len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
leaq -0x2c(%rbp), %rax
movl $0x10, (%rax)
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
leaq -0x2c(%rbp), %r9
callq 0x1140
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x1bb3
callq 0x1030
cmpl $0x4, (%rax)
je 0x1b89
movslq %r13d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_recvfromtimed
ssize_t u_recvfromtimed(int fd, void *buf, size_t nbytes, u_buf_t *ubufp,
                         double seconds) {
   int len;
   struct sockaddr *remote;
   int retval;
   struct timeval timedone;

   timedone = add2currenttime(seconds);
   if (waitfdtimed(fd, timedone) == -1)
      return (ssize_t)(-1);
   len = sizeof (struct sockaddr_in);
   remote = (struct sockaddr *)ubufp;
   while (((retval = recvfrom(fd, buf, nbytes, 0, remote, &len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
callq 0x15c7
movl %r12d, %edi
movq %rax, %rsi
callq 0x1836
cmpl $-0x1, %eax
je 0x1c2d
leaq -0x2c(%rbp), %rax
movl $0x10, (%rax)
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
leaq -0x2c(%rbp), %r9
callq 0x1140
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x1c28
callq 0x1030
cmpl $0x4, (%rax)
je 0x1bfe
movslq %r13d, %rax
jmp 0x1c30
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_gethostinfo
void u_gethostinfo(u_buf_t *ubufp, char *info, int infosize) {
   int len;
   int portnumber;

   portnumber = ntohs(ubufp->sin_port);
   len = snprintf(info, infosize, "port number is %d on host ", portnumber);
   info[infosize-1] = 0;                              /* in case name not fit */
   if (len >= infosize) return;
   u_gethostname(ubufp, info+len, infosize-len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
movslq %edx, %r15
leaq 0x417(%rip), %rdx       # 0x2088
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10a0
movb $0x0, -0x1(%rbx,%r15)
subl %eax, %r15d
jle 0x1ca6
cltq
addq %rax, %rbx
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1c3f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_comparehost
int u_comparehost(u_buf_t *ubufp, char *hostn, u_port_t port) {
   in_addr_t addr;
   struct sockaddr_in *remotep;

   remotep = (struct sockaddr_in *)ubufp;
   if ((port != ntohs(remotep->sin_port)) ||
       (name2addr(hostn, &addr) == -1) ||
       (memcmp(&(remotep->sin_addr.s_addr), &addr, sizeof(in_addr_t)) != 0))
      return 0;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
xorl %ebx, %ebx
cmpw %dx, %ax
jne 0x1cee
movq %rdi, %r14
leaq -0x14(%rbp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1a6a
cmpl $-0x1, %eax
je 0x1cee
movl 0x4(%r14), %eax
xorl %ebx, %ebx
cmpl -0x14(%rbp), %eax
sete %bl
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_sendto
ssize_t u_sendto(int fd, void *buf, size_t nbytes, u_buf_t *ubufp) {
   int len;
   struct sockaddr *remotep;
   int retval;

   len = sizeof(struct sockaddr_in);
   remotep = (struct sockaddr *)ubufp;
   while (((retval = sendto(fd, buf, nbytes, 0, remotep, len)) == -1) &&
           (errno == EINTR)) ;  
   return retval;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
movl %r12d, %edi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %rbx, %r8
pushq $0x10
popq %r9
callq 0x10c0
movq %rax, %r13
cmpl $-0x1, %r13d
jne 0x1d3d
callq 0x1030
cmpl $0x4, (%rax)
je 0x1d13
movslq %r13d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_sendtohost
ssize_t u_sendtohost(int fd, void *buf, size_t nbytes, char *hostn,
                     u_port_t port) {
   struct sockaddr_in remote;

   if (name2addr(hostn, &(remote.sin_addr.s_addr)) == -1) {
      errno = EINVAL;
      return -1;
   }
   remote.sin_port = htons((short)port);
   remote.sin_family = AF_INET;
   return u_sendto(fd, buf, nbytes, &remote);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r12d
leaq -0x2c(%rbp), %rsi
movq %rcx, %rdi
callq 0x1a6a
cmpl $-0x1, %eax
je 0x1d9e
rolw $0x8, %r15w
leaq -0x30(%rbp), %rcx
movw %r15w, 0x2(%rcx)
movw $0x2, (%rcx)
movl %r12d, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1cf9
jmp 0x1dac
callq 0x1030
movl $0x16, (%rax)
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_join
int u_join(char *IP_address, u_port_t port, u_buf_t *ubufp) {
   int mcastfd;
   struct ip_mreq tempaddress;

   if ((mcastfd = u_openudp(port)) == -1)
      return mcastfd;
   
   tempaddress.imr_multiaddr.s_addr = inet_addr(IP_address);
   tempaddress.imr_interface.s_addr = htonl(INADDR_ANY);

        /* Join the multicast group. Let kernel choose the interface */
   if (setsockopt(mcastfd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
                   &tempaddress, sizeof(tempaddress)) == -1)
      return -1;
   ubufp->sin_family = AF_INET;
   ubufp->sin_addr.s_addr = inet_addr(IP_address);
   ubufp->sin_port = htons((short)port);
   return mcastfd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r12
movl %esi, %edi
callq 0x1ac4
pushq $-0x1
popq %r13
cmpl $-0x1, %eax
je 0x1e28
movl %eax, %r15d
movq %r12, %rdi
callq 0x10f0
leaq -0x30(%rbp), %rcx
movl %eax, (%rcx)
andl $0x0, 0x4(%rcx)
pushq $0x23
popq %rdx
pushq $0x8
popq %r8
movl %r15d, %edi
xorl %esi, %esi
callq 0x1050
cmpl $-0x1, %eax
je 0x1e28
movw $0x2, (%rbx)
movq %r12, %rdi
callq 0x10f0
movl %eax, 0x4(%rbx)
rolw $0x8, %r14w
movw %r14w, 0x2(%rbx)
movl %r15d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/amanelis[P]uici/uiciudp.c
// Function: u_leave
int u_leave(int mcastfd, u_buf_t *ubufp) {  
   struct ip_mreq tempaddress;
 
   memcpy(&(tempaddress.imr_multiaddr),
         &(ubufp->sin_addr), sizeof(struct in_addr));   
   tempaddress.imr_interface.s_addr = htonl(INADDR_ANY);
   return setsockopt(mcastfd, IPPROTO_IP, IP_DROP_MEMBERSHIP,
                   &tempaddress, sizeof(tempaddress));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x4(%rsi), %eax
leaq -0x8(%rbp), %rcx
movl %eax, (%rcx)
andl $0x0, 0x4(%rcx)
pushq $0x24
popq %rdx
pushq $0x8
popq %r8
xorl %esi, %esi
callq 0x1050
addq $0x10, %rsp
popq %rbp
retq