LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/logger.cpp
// Function: parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
const Severity parse(const string & input) {
  if (input == "DEBUG") return DEBUG;
  if (input == "INFO") return INFO;
  if (input == "WARNING") return WARNING;
  if (input == "ERROR") return ERROR;
  if (input == "FATAL") return FATAL;
  return UNKNOWN;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xea74(%rip), %rsi      # 0x7e2af
callq 0x80f0
testl %eax, %eax
je 0x6f899
leaq 0xea6a(%rip), %rsi      # 0x7e2b5
movq %rbx, %rdi
callq 0x80f0
testl %eax, %eax
je 0x6f89d
leaq 0xea5c(%rip), %rsi      # 0x7e2ba
movq %rbx, %rdi
callq 0x80f0
testl %eax, %eax
je 0x6f8a4
leaq 0xea51(%rip), %rsi      # 0x7e2c2
movq %rbx, %rdi
callq 0x80f0
testl %eax, %eax
je 0x6f8ab
leaq 0xea44(%rip), %rsi      # 0x7e2c8
movq %rbx, %rdi
callq 0x80f0
cmpl $0x1, %eax
movl $0x5, %eax
sbbl $0x0, %eax
jmp 0x6f8b0
xorl %eax, %eax
jmp 0x6f8b0
movl $0x1, %eax
jmp 0x6f8b0
movl $0x2, %eax
jmp 0x6f8b0
movl $0x3, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebp
movq %rdi, %rbx
callq 0x69cd0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe9de(%rip), %rsi      # 0x7e2d6
leaq 0xe9e0(%rip), %rdx      # 0x7e2df
leaq 0x8(%rsp), %rdi
callq 0x68bce
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xe995(%rip), %rsi      # 0x7e2af
leaq 0xe993(%rip), %rdx      # 0x7e2b4
leaq 0x48(%rsp), %rdi
callq 0x68bce
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
leaq 0x48(%rsp), %rcx
movq %r14, %rsi
callq 0x69c78
leaq 0x28(%rsp), %rdi
callq 0x6f830
movl %eax, %r15d
leaq 0x38(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x6f962
callq 0x8390
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f971
callq 0x8390
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %r12
cmpq %r12, %rdi
je 0x6f985
callq 0x8390
cmpl %ebp, %r15d
jle 0x6f9a9
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xe948(%rip), %rsi      # 0x7e2e0
leaq 0xe94a(%rip), %rdx      # 0x7e2e9
movq %rbx, %rdi
callq 0x68bce
jmp 0x6fa12
leaq 0x28(%rsp), %rdi
movq %r13, (%rdi)
leaq 0xe932(%rip), %rsi      # 0x7e2ea
leaq 0xe933(%rip), %rdx      # 0x7e2f2
callq 0x68bce
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xe90d(%rip), %rsi      # 0x7e2e0
leaq 0xe90f(%rip), %rdx      # 0x7e2e9
callq 0x68bce
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x69c78
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6fa03
callq 0x8390
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6fa12
callq 0x8390
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6fa3b
callq 0x8390
jmp 0x6fa3b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
jne 0x6fa87
jmp 0x6fa91
jmp 0x6fa8e
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6fa64
callq 0x8390
jmp 0x6fa64
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x6fa78
callq 0x8390
jmp 0x6fa78
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6fa91
callq 0x8390
jmp 0x6fa91
movq %rax, %rbx
movq %rbx, %rdi
callq 0x8720
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x8290
leaq 0x70(%rsp), %r14
leaq 0xd7e8(%rip), %rsi      # 0x7e621
movl $0x11, %edx
movq %r14, %rdi
callq 0x8470
leaq 0xd7e6(%rip), %rsi      # 0x7e633
movl $0x5, %edx
movq %r14, %rdi
callq 0x8470
leaq 0xd7d8(%rip), %rsi      # 0x7e639
movl $0xd, %edx
movq %r14, %rdi
callq 0x8470
leaq 0x40(%rsp), %rdi
callq 0x73862
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0x8470
movq %rax, %r14
leaq 0xd577(%rip), %rsi      # 0x7e40b
movl $0x3, %edx
movq %rax, %rdi
callq 0x8470
leaq 0xd79f(%rip), %rsi      # 0x7e647
movl $0xd, %edx
movq %r14, %rdi
callq 0x8470
leaq 0x20(%rsp), %rdi
callq 0x73862
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x8470
movq %rax, %r14
leaq 0xd77a(%rip), %rsi      # 0x7e655
movl $0xf, %edx
movq %rax, %rdi
callq 0x8470
leaq 0xd776(%rip), %rsi      # 0x7e665
movl $0xc, %edx
movq %r14, %rdi
callq 0x8470
leaq 0xca80(%rip), %rsi      # 0x7d983
movq %rsp, %rdi
callq 0x73fd7
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x8470
leaq 0xd002(%rip), %rsi      # 0x7df25
movl $0x2, %edx
movq %rax, %rdi
callq 0x8470
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70f43
callq 0x8390
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70f56
callq 0x8390
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70f69
callq 0x8390
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
callq 0x8630
leaq 0x60(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
retq
jmp 0x70fac
jmp 0x70fc4
jmp 0x70fdc
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70faf
callq 0x8390
jmp 0x70faf
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70fc7
callq 0x8390
jmp 0x70fc7
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x70fdf
callq 0x8390
jmp 0x70fdf
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x87e8
movq %rbx, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x2415d(%rip), %rdi     # 0x967a0
testq %rdi, %rdi
je 0x726ab
movq 0x24181(%rip), %rbx     # 0x967d0
leaq -0x1(%rbx), %rax
cmpq %rax, 0x2414e(%rip)     # 0x967a8
jb 0x726d8
movq %rbx, %rax
shlq $0x20, %rax
movabsq $0x800000000, %r14      # imm = 0x800000000
addq %rax, %r14
movq %r14, %rsi
sarq $0x1d, %rsi
callq 0x8680
movq %rax, 0x2411d(%rip)     # 0x967a0
testq %rax, %rax
je 0x726e5
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, 0x24127(%rip)     # 0x967d0
jmp 0x726d8
movl $0x8, %edi
callq 0x8510
movq %rax, 0x240e4(%rip)     # 0x967a0
testq %rax, %rax
je 0x726e0
xorl %ecx, %ecx
movq %rcx, (%rax)
movq $0x1, 0x240ff(%rip) # 0x967d0
movq %rcx, 0x240d0(%rip)     # 0x967a8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x8b85
callq 0x8b5d
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x40, %edi
callq 0x8510
testq %rax, %rax
je 0x72739
movq %rax, %r14
movslq %ebp, %rdi
movq %rdi, 0x18(%rax)
addq $0x2, %rdi
callq 0x8510
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x7273e
movl $0x1, 0x24(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x728b0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x8bd5
callq 0x8bad
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0x2404f(%rip), %eax     # 0x96798
movq 0x23f70(%rip), %rcx     # 0x966c0
movq 0x24059(%rip), %rdx     # 0x967b0
cmpq %rdx, %rcx
jae 0x72817
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xc3f1(%rip), %rsi      # 0x7eb60
leaq 0xc75a(%rip), %rdi      # 0x7eed0
leaq 0xc4b3(%rip), %r8       # 0x7ec30
leaq 0xc9ac(%rip), %r9       # 0x7f130
leaq 0xc845(%rip), %r10      # 0x7efd0
leaq 0xc93e(%rip), %r11      # 0x7f0d0
leaq 0xbfc7(%rip), %rbx      # 0x7e760
movzbl (%rcx), %r14d
testq %r14, %r14
je 0x727a8
movb (%rbx,%r14,4), %bpl
jmp 0x727ab
movb $0x1, %bpl
movslq %eax, %r14
cmpw $0x0, (%rsi,%r14,2)
je 0x727c3
movl %eax, 0x24000(%rip)     # 0x967bc
movq %rcx, 0x23ffd(%rip)     # 0x967c0
movswq (%rdi,%r14,2), %r12
movzbl %bpl, %r15d
addq %r12, %r15
movswl (%r8,%r15,2), %r12d
cmpl %r12d, %eax
je 0x727ff
movswq (%r10,%r14,2), %r14
cmpq $0x65, %r14
jl 0x727ec
movzbl %bpl, %eax
movb (%r11,%rax,4), %bpl
movswq (%rdi,%r14,2), %rax
movzbl %bpl, %r15d
addq %rax, %r15
cmpw (%r8,%r15,2), %r14w
jne 0x727d9
movl %r15d, %eax
movswl (%r9,%rax,2), %eax
incq %rcx
cmpq %rdx, %rcx
jne 0x72799
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x23f7d(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x72838
movq 0x23f79(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
jne 0x72863
callq 0x72638
movq 0x23e64(%rip), %rdi     # 0x966a8
movl $0x4000, %esi           # imm = 0x4000
callq 0x726ea
movq %rax, %rdi
movq 0x23f48(%rip), %rax     # 0x967a0
movq 0x23f49(%rip), %rcx     # 0x967a8
movq %rdi, (%rax,%rcx,8)
movq %rbx, %rsi
callq 0x728b0
movq 0x23f2e(%rip), %rax     # 0x967a0
movq 0x23f2f(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rdx
movl 0x20(%rdx), %esi
movl %esi, 0x23f42(%rip)     # 0x967c8
movq 0x10(%rdx), %rdx
movq %rdx, 0x23f1f(%rip)     # 0x967b0
movq %rdx, 0x23e28(%rip)     # 0x966c0
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x23e02(%rip)     # 0x966a8
movb (%rdx), %al
movb %al, 0x23f0a(%rip)      # 0x967b8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8060
movq %rax, %r14
movl (%rax), %ebp
movq %rbx, %rdi
callq 0x72a26
movq %r15, (%rbx)
movl $0x1, 0x38(%rbx)
movq 0x23ec0(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x728f2
movq 0x23ebc(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rax
jmp 0x728f4
xorl %eax, %eax
cmpq %rbx, %rax
je 0x72901
movq $0x1, 0x30(%rbx)
testq %r15, %r15
je 0x7291e
movq %r15, %rdi
callq 0x8450
movl %eax, %edi
callq 0x8700
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
jmp 0x72920
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_O3/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 0x72638
movq 0x23e5f(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x72981
movq 0x23e5b(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rdx
cmpq %rbx, %rdx
je 0x729c9
testq %rdx, %rdx
je 0x7298d
movb 0x23e57(%rip), %dl      # 0x967b8
movq 0x23e48(%rip), %rsi     # 0x967b0
movb %dl, (%rsi)
movq (%rax,%rcx,8), %rdx
movq %rsi, 0x10(%rdx)
movl 0x23e50(%rip), %edx     # 0x967c8
movq (%rax,%rcx,8), %rsi
movl %edx, 0x20(%rsi)
jmp 0x7298d
testq %rbx, %rbx
je 0x729c9
movq 0x23e1b(%rip), %rcx     # 0x967a8
movq %rbx, (%rax,%rcx,8)
movl 0x20(%rbx), %edx
movl %edx, 0x23e2e(%rip)     # 0x967c8
movq 0x10(%rbx), %rdx
movq %rdx, 0x23e0b(%rip)     # 0x967b0
movq %rdx, 0x23d14(%rip)     # 0x966c0
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x23cee(%rip)     # 0x966a8
movb (%rdx), %al
movb %al, 0x23df6(%rip)      # 0x967b8
movb $0x1, 0x23e03(%rip)     # 0x967cc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x729f2
pushq %rbx
movq %rdi, %rbx
movq 0x23dc0(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x729f3
movq 0x23dbc(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rcx
jmp 0x729f5
retq
xorl %ecx, %ecx
cmpq %rbx, %rcx
jne 0x72a09
movq 0x23da7(%rip), %rcx     # 0x967a8
movq $0x0, (%rax,%rcx,8)
cmpl $0x0, 0x24(%rbx)
je 0x72a18
movq 0x8(%rbx), %rdi
callq 0x84b0
movq %rbx, %rdi
popq %rbx
jmp 0x84b0
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/queries.cpp
// Function: yy_flush_buffer(yy_buffer_state*)
void yy_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		yy_load_buffer_state( );
}

// Assembly:
testq %rdi, %rdi
je 0x72a6b
xorl %ecx, %ecx
movl %ecx, 0x20(%rdi)
movq 0x8(%rdi), %rax
movb %cl, (%rax)
movq 0x8(%rdi), %rax
movb %cl, 0x1(%rax)
movq 0x8(%rdi), %rax
movq %rax, 0x10(%rdi)
movl $0x1, 0x2c(%rdi)
movl %ecx, 0x3c(%rdi)
movq 0x23d4a(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x72a66
movq 0x23d46(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rcx
cmpq %rdi, %rcx
je 0x72a6c
retq
movq 0x23d35(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rdx
movl 0x20(%rdx), %esi
movl %esi, 0x23d48(%rip)     # 0x967c8
movq 0x10(%rdx), %rdx
movq %rdx, 0x23d25(%rip)     # 0x967b0
movq %rdx, 0x23c2e(%rip)     # 0x966c0
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x23c08(%rip)     # 0x966a8
movb (%rdx), %al
movb %al, 0x23d10(%rip)      # 0x967b8
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x72b40
pushq %rbx
movq %rdi, %rbx
callq 0x72638
movq 0x23cde(%rip), %rax     # 0x967a0
movq 0x23cdf(%rip), %rcx     # 0x967a8
testq %rax, %rax
je 0x72b03
cmpq $0x0, (%rax,%rcx,8)
je 0x72b03
movb 0x23cdd(%rip), %dl      # 0x967b8
movq 0x23cce(%rip), %rsi     # 0x967b0
movb %dl, (%rsi)
movq (%rax,%rcx,8), %rdx
movq %rsi, 0x10(%rdx)
movl 0x23cd6(%rip), %edx     # 0x967c8
movq (%rax,%rcx,8), %rsi
movl %edx, 0x20(%rsi)
incq %rcx
movq %rcx, 0x23ca5(%rip)     # 0x967a8
movq %rbx, (%rax,%rcx,8)
movl 0x20(%rbx), %edx
movl %edx, 0x23cb8(%rip)     # 0x967c8
movq 0x10(%rbx), %rdx
movq %rdx, 0x23c95(%rip)     # 0x967b0
movq %rdx, 0x23b9e(%rip)     # 0x966c0
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x23b78(%rip)     # 0x966a8
movb (%rdx), %al
movb %al, 0x23c80(%rip)      # 0x967b8
movb $0x1, 0x23c8d(%rip)     # 0x967cc
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x23c58(%rip), %rax     # 0x967a0
testq %rax, %rax
je 0x72bd4
pushq %rax
movq 0x23c4f(%rip), %rcx     # 0x967a8
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x72bd0
callq 0x729d0
movq 0x23c32(%rip), %rax     # 0x967a0
movq 0x23c33(%rip), %rcx     # 0x967a8
movq $0x0, (%rax,%rcx,8)
testq %rcx, %rcx
je 0x72bd0
leaq -0x1(%rcx), %rdx
movq %rdx, 0x23c1b(%rip)     # 0x967a8
movq -0x8(%rax,%rcx,8), %rdx
testq %rdx, %rdx
je 0x72bd0
movl 0x20(%rdx), %esi
movl %esi, 0x23c28(%rip)     # 0x967c8
movq 0x10(%rdx), %rdx
movq %rdx, 0x23c05(%rip)     # 0x967b0
movq %rdx, 0x23b0e(%rip)     # 0x966c0
movq -0x8(%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, 0x23ae7(%rip)     # 0x966a8
movb (%rdx), %al
movb %al, 0x23bef(%rip)      # 0x967b8
movb $0x1, 0x23bfc(%rip)     # 0x967cc
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x72bf5
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x0, -0x2(%rdi,%rsi)
jne 0x72bf5
cmpb $0x0, -0x1(%r15,%r14)
je 0x72c00
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movl $0x40, %edi
callq 0x8510
testq %rax, %rax
je 0x72c4e
movq %rax, %rbx
addq $-0x2, %r14
movq %r14, 0x18(%rax)
movq %r15, 0x8(%rax)
movq %r15, 0x10(%rax)
movl $0x0, 0x24(%rax)
xorl %eax, %eax
movq %rax, (%rbx)
movl %r14d, 0x20(%rbx)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x28(%rbx)
movq %rax, 0x38(%rbx)
movq %rbx, %rdi
callq 0x72931
jmp 0x72bf7
callq 0x8bfd
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %r12
leal 0x2(%r14), %eax
movslq %eax, %rbx
movq %rbx, %rdi
callq 0x8510
testq %rax, %rax
je 0x72ccc
movq %rax, %r15
testl %r14d, %r14d
jle 0x72c9f
movl %r14d, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x82f0
movslq %r14d, %rax
movw $0x0, (%r15,%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x72bd5
testq %rax, %rax
je 0x72cd1
movl $0x1, 0x24(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x8c4d
callq 0x8c25
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x230(%rsp), %rdi
callq 0x8290
leaq 0x240(%rsp), %r15
leaq 0xc800(%rip), %rsi      # 0x7f845
movl $0x6, %edx
movq %r15, %rdi
callq 0x8470
movq %r15, %rdi
movl %r14d, %esi
callq 0x86d0
leaq 0xc76b(%rip), %rsi      # 0x7f7cf
movl $0x5, %edx
movq %rax, %rdi
callq 0x8470
leaq 0x248(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x8630
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movl $0x8, %edx
callq 0x8770
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x730aa
callq 0x8390
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x48(%rsp,%rax)
jne 0x730f3
incl %ebp
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x84e0
decl %ebp
je 0x730f3
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x48(%rsp,%rax)
je 0x730d4
leaq 0x28(%rsp), %rdi
callq 0x80b0
leaq 0x28(%rsp), %rdi
callq 0x80c0
leaq 0x230(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x73143
jmp 0x73148
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73162
callq 0x8390
jmp 0x73162
jmp 0x73143
movq %rax, %r14
jmp 0x73162
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x73158
callq 0x8390
leaq 0x28(%rsp), %rdi
callq 0x80c0
leaq 0x230(%rsp), %rdi
callq 0x87e8
movq %r14, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x8780
testq %rax, %rax
je 0x731e6
movq %rax, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, %rdi
callq 0x8190
movq %r14, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x68bce
movq %r14, %rdi
callq 0x84b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6a49a
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x731f0
callq 0x8390
jmp 0x731f0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6bb48
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x73211
callq 0x8390
movq %rbx, %rdi
callq 0x8720
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, %r15
leaq 0x320(%rsp), %rsi
callq 0x8350
movl %eax, %ebx
testl %eax, %eax
je 0x732ff
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x6fef2
leaq 0x10(%rsp), %r14
leaq 0xc57e(%rip), %rsi      # 0x7f7d5
movl $0x1d, %edx
movq %r14, %rdi
callq 0x8470
testq %r15, %r15
je 0x73281
movq %r15, %rdi
callq 0x8190
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x8470
jmp 0x7329a
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x30(%rsp,%rax), %esi
orl $0x1, %esi
callq 0x86b0
leaq 0xc552(%rip), %rsi      # 0x7f7f3
movl $0x3, %edx
movq %r14, %rdi
callq 0x8470
callq 0x8060
movl (%rax), %edi
callq 0x8150
testq %rax, %rax
je 0x732da
movq %rax, %r15
movq %rax, %rdi
callq 0x8190
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x8470
jmp 0x732f5
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
addq %rax, %r14
movl 0x30(%rsp,%rax), %esi
orl $0x1, %esi
movq %r14, %rdi
callq 0x86b0
leaq 0x8(%rsp), %rdi
callq 0x70392
testl %ebx, %ebx
sete %al
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70392
movq %rbx, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movl %esi, %ebx
movq %rdi, %r14
leaq 0x108(%rsp), %rdi
xorl %esi, %esi
callq 0x6fef2
leaq 0x110(%rsp), %r15
leaq 0xc49a(%rip), %rsi      # 0x7f7f7
movl $0x1c, %edx
movq %r15, %rdi
callq 0x8470
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x8470
movq %rax, %r15
leaq 0x7fcf(%rip), %rsi      # 0x7b352
movl $0x1, %edx
movq %rax, %rdi
callq 0x8470
movq %r15, %rdi
movl %ebx, %esi
callq 0x86d0
leaq 0x108(%rsp), %rdi
callq 0x70392
leaq 0x108(%rsp), %rdi
callq 0x8290
leaq 0x118(%rsp), %r15
leaq 0xc451(%rip), %rsi      # 0x7f814
movl $0x8, %edx
movq %r15, %rdi
callq 0x8470
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x8470
movq %rax, %r14
leaq 0x7f69(%rip), %rsi      # 0x7b352
movl $0x1, %edx
movq %rax, %rdi
callq 0x8470
movq %r14, %rdi
movl %ebx, %esi
callq 0x86d0
leaq 0x120(%rsp), %rsi
movq %rsp, %rdi
callq 0x8630
leaq 0x10(%rsp), %rbx
movq -0x10(%rbx), %rdi
leaq 0x6716(%rip), %rsi      # 0x79b36
callq 0x8120
movq %rax, %r14
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x73436
callq 0x8390
testq %r14, %r14
je 0x7347d
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x8620
movq %rax, %rbx
movq %r14, %rdi
callq 0x8550
testq %rbx, %rbx
je 0x7347d
movq %rbx, %rdi
callq 0x8190
cmpq $0x1, %rax
je 0x73484
leaq -0x1(%rax), %rcx
cmpb $0xa, -0x1(%rbx,%rax)
movq %rcx, %rax
jne 0x73463
movb $0x0, (%rbx,%rcx)
jmp 0x73484
leaq 0xae61(%rip), %rbx      # 0x7e2e5
leaq 0x108(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r14
popq %r15
retq
jmp 0x734a3
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x87e8
jmp 0x734c5
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x70392
movq %rbx, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
// File: /workspace/github_c_makefile_star2_O3/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 0xc200(%rip), %rdi      # 0x7f81d
callq 0x73219
testb %al, %al
je 0x73709
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x6fef2
leaq 0x38(%rsp), %r14
leaq 0xc1e9(%rip), %rsi      # 0x7f82b
movl $0x20, %edx
movq %r14, %rdi
callq 0x8470
callq 0x8540
movl %eax, %edi
callq 0x734d5
movq %r14, %rdi
movl %eax, %esi
callq 0x86d0
leaq 0xc1e0(%rip), %rsi      # 0x7f84c
movl $0x6, %edx
movq %rax, %rdi
callq 0x8470
leaq 0x30(%rsp), %rdi
callq 0x70392
callq 0x8540
movl %eax, %edi
callq 0x734d5
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x73014
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x736f7
movq 0x30(%rsp), %rax
cmpb $0x28, (%rax)
jne 0x736f7
cmpb $0x29, -0x1(%rax,%rcx)
jne 0x736f7
addq $-0x2, %rcx
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl $0x1, %edx
callq 0x8420
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x81f0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x736f7
callq 0x8390
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x6a49a
jmp 0x737a3
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xc13a(%rip), %rsi      # 0x7f853
leaq 0xc13d(%rip), %rdx      # 0x7f85d
leaq 0x10(%rsp), %rdi
callq 0x68bce
callq 0x8540
movl %eax, %edi
callq 0x734d5
leaq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x7332e
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x8170
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x73763
callq 0x8390
leaq 0xab7b(%rip), %rsi      # 0x7e2e5
leaq 0x30(%rsp), %rdi
callq 0x80f0
testl %eax, %eax
je 0x73787
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x6a49a
jmp 0x737a3
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x68c64
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x737b6
callq 0x8390
movq %rbx, %rax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x737ea
callq 0x8390
jmp 0x737ea
jmp 0x737e7
jmp 0x737e7
jmp 0x737fa
movq %rax, %rbx
jmp 0x7381b
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x73807
jmp 0x7381b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x7381b
callq 0x8390
jmp 0x7381b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x70392
movq %rbx, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
callq 0x8290
xorl %edi, %edi
callq 0x8370
leaq 0x30(%rsp), %rdi
movq %rax, (%rdi)
callq 0x82b0
leaq 0xbfae(%rip), %rdx      # 0x7f85e
leaq 0xb(%rsp), %r14
movl $0x5, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x82e0
leaq 0x48(%rsp), %r15
movq %r14, %rdi
callq 0x8190
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x8470
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x8630
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x6a49a
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7390f
callq 0x8390
leaq 0x38(%rsp), %rdi
callq 0x87e8
movq %rbx, %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73946
callq 0x8390
jmp 0x73946
jmp 0x73943
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x87e8
movq %rbx, %rdi
callq 0x8720
movq %rax, %rdi
callq 0x68a31
// File: /workspace/github_c_makefile_star2_O3/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 0x85d0
testl %eax, %eax
jne 0x73ebd
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6bb48
movq %rbx, %rax
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
leaq 0xba66(%rip), %rdi      # 0x7f92a
callq 0x8300
jmp 0x73ea6
// File: /workspace/github_c_makefile_star2_O3/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 0x8260
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x6bb48
leaq 0xba48(%rip), %rsi      # 0x7f954
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x86f0
cmpq $0x1, %rax
jne 0x73f65
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x6, %edx
movq $-0x1, %rcx
callq 0x8420
leaq 0xa450(%rip), %rsi      # 0x7e393
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x74016
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73f81
callq 0x8390
jmp 0x73f81
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x68c64
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73f94
callq 0x8390
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73fbc
callq 0x8390
jmp 0x73fbc
jmp 0x73fb9
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73fcf
callq 0x8390
movq %rbx, %rdi
callq 0x8720
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movb 0x228b5(%rip), %al      # 0x96960
testb %al, %al
je 0x74110
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa2f1(%rip), %rdx      # 0x7e3b0
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x68bce
leaq 0x2271f(%rip), %rdi     # 0x967f0
movq %rsp, %rsi
callq 0x85c0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x740e7
callq 0x8390
leaq 0x226fa(%rip), %rdi     # 0x967e8
movl %ebp, %esi
callq 0x86d0
leaq 0x226f4(%rip), %rsi     # 0x967f0
movq %rbx, %rdi
callq 0x8630
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x22849(%rip), %rdi     # 0x96960
callq 0x8750
testl %eax, %eax
je 0x740af
leaq 0x226b1(%rip), %rdi     # 0x967d8
callq 0x8290
movq 0x1fe6d(%rip), %rdi     # 0x93fa0
leaq 0x2269e(%rip), %rsi     # 0x967d8
leaq 0x202b7(%rip), %rdx     # 0x943f8
callq 0x8340
leaq 0x22813(%rip), %rdi     # 0x96960
callq 0x8230
jmp 0x740af
movq %rax, %rbx
leaq 0x227ff(%rip), %rdi     # 0x96960
callq 0x8220
jmp 0x7417e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x7417e
callq 0x8390
jmp 0x7417e
movq %rax, %rbx
movq %rbx, %rdi
callq 0x8720
// File: /workspace/github_c_makefile_star2_O3/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 0x13d1
movq 0x8(%rsi), %rdi
callq 0x1190
movzwl %ax, %edi
callq 0x1b58
cmpl $-0x1, %eax
je 0x13db
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 0x1c0b
leaq 0xcc2(%rip), %rdi       # 0x2032
testq %rax, %rax
js 0x13ca
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x1cf6
movq %r12, %rdi
callq 0x1080
movl $0x1, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1589
leaq 0xca5(%rip), %rdi       # 0x204c
cmpq $-0x1, %rax
je 0x13ca
movl $0x1, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1589
leaq 0xc88(%rip), %rdi       # 0x204c
cmpq $-0x1, %rax
jne 0x1357
callq 0x1180
jmp 0x1357
movq %rsi, %rdi
callq 0x11f0
jmp 0x13e7
leaq 0xc32(%rip), %rdi       # 0x2014
callq 0x1180
movl $0x1, %eax
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_O3/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)
movq %rax, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x11a0
testq %rax, %rax
je 0x1ad3
movq (%rax), %rsi
jmp 0x1ade
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_O3/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 0x1b40
movq %r14, %rdi
callq 0x1100
testq %rax, %rax
je 0x1b51
movq 0x18(%rax), %rcx
movq (%rcx), %rsi
movslq 0x14(%rax), %rdx
movq %rbx, %rdi
callq 0x1120
jmp 0x1b4a
movq %r14, %rdi
callq 0x10f0
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1b4c
// File: /workspace/github_c_makefile_star2_O3/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)
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x11d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1bfc
movl %eax, %r14d
leaq -0x24(%rbp), %rcx
movl %eax, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1050
cmpl $-0x1, %eax
je 0x1be6
testw %r15w, %r15w
je 0x1be1
leaq -0x34(%rbp), %rsi
movw $0x2, (%rsi)
movl $0x0, 0x4(%rsi)
rolw $0x8, %r15w
movw %r15w, 0x2(%rsi)
movl %r14d, %edi
movl $0x10, %edx
callq 0x1150
cmpl $-0x1, %eax
je 0x1be6
movl %r14d, %ebx
jmp 0x1bfc
callq 0x1030
movq %rax, %r15
movl (%rax), %r12d
movl %r14d, %edi
callq 0x1400
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_O3/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 0x15e8
movl %r12d, %edi
movq %rax, %rsi
callq 0x1853
cmpl $-0x1, %eax
je 0x1cd3
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 0x1cce
callq 0x1030
cmpl $0x4, (%rax)
je 0x1ca4
movslq %r13d, %rax
jmp 0x1cda
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x36d(%rip), %rdx       # 0x2088
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10a0
movb $0x0, -0x1(%rbx,%r15)
subl %eax, %r15d
jle 0x1d51
cltq
addq %rax, %rbx
movl 0x4(%r14), %edi
movq %rbx, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1aa0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1d99
movq %rdi, %r14
leaq -0x14(%rbp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1afe
cmpl $-0x1, %eax
je 0x1d99
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