LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SR1_SX::Execute()
void SR1_SX::Execute()
{
	m_cpu->flags.carry = m_cpu->s[ sX ] & 0x01 ;
	m_cpu->s[ sX ] >>= 1 ;
	m_cpu->s[ sX ] |= 0x80 ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x11(%rcx)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
sarl %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
orl $0x80, %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x0, %ecx
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SRA_SX::Execute()
void SRA_SX::Execute()
{
	bool c = m_cpu->flags.carry ;
	m_cpu->flags.carry = m_cpu->s[ sX ] & 0x01 ;
	m_cpu->s[ sX ] >>= 1 ;
	if ( c )
		m_cpu->s[ sX ] |= 0x80 ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rcx), %rax
movb 0x11(%rax), %al
andb $0x1, %al
movb %al, -0x9(%rbp)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %edx
movzbl (%rax,%rdx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x11(%rax)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %edx
sarl %edx
movb %dl, (%rax,%rcx)
testb $0x1, -0x9(%rbp)
je 0x40fc1f
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %edx
orl $0x80, %edx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x0, %ecx
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SRX_SX::Execute()
void SRX_SX::Execute()
{
	m_cpu->flags.carry = m_cpu->s[ sX ] & 0x01 ;
	m_cpu->s[ sX ] >>= 1 ;
	if ( m_cpu->s[ sX ] & 0x40  )
		m_cpu->s[ sX ] |= 0x80 ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %edx
movzbl (%rax,%rdx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x11(%rax)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %edx
movzbl (%rax,%rdx), %esi
sarl %esi
movb %sil, (%rax,%rdx)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x40fd12
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %edx
orl $0x80, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x0, %ecx
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SUB_SX_KK::Execute()
void SUB_SX_KK::Execute()
{
	int val ;
	
	val = m_cpu->s[ sX ] ;
	val -= kk ;

	m_cpu->flags.carry = val < 0 ;
	m_cpu->flags.zero = val == 0 ;
	
	m_cpu->s[ sX ] -= kk ;

	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
movl %ecx, -0xc(%rbp)
movzwl 0x18(%rax), %edx
movl -0xc(%rbp), %ecx
subl %edx, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
setl %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x11(%rcx)
cmpl $0x0, -0xc(%rbp)
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movzwl 0x18(%rax), %edi
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
subl %edi, %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SUB_SX_SY::Execute()
void SUB_SX_SY::Execute()
{
	int val ;
	
	val = m_cpu->s[ sX ] ;
	val -= m_cpu->s[ sY ] ;

	m_cpu->flags.carry = val < 0 ;
	m_cpu->flags.zero = val == 0 ;
	
	m_cpu->s[ sX ] -= m_cpu->s[ sY ] ;

	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
movl %ecx, -0xc(%rbp)
movq 0x8(%rax), %rcx
movzwl 0x12(%rax), %edx
movzbl (%rcx,%rdx), %edx
movl -0xc(%rbp), %ecx
subl %edx, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
setl %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x11(%rcx)
cmpl $0x0, -0xc(%rbp)
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rcx
movzwl 0x12(%rax), %edx
movzbl (%rcx,%rdx), %edi
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
subl %edi, %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SUBCY_SX_KK::Execute()
void SUBCY_SX_KK::Execute()
{
	int val ;
	bool c = m_cpu->flags.carry ;	
	val = m_cpu->s[ sX ] ;
	val -= kk ;
	if ( c )
		val -= 1 ;

	m_cpu->flags.carry = val < 0 ;
	m_cpu->flags.zero = val == 0 ;
	m_cpu->s[ sX ] -= kk ;
	if ( c )
		c -= 1 ;

	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x8(%rax), %rcx
movb 0x11(%rcx), %cl
andb $0x1, %cl
movb %cl, -0xd(%rbp)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
movl %ecx, -0xc(%rbp)
movzwl 0x18(%rax), %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
testb $0x1, -0xd(%rbp)
je 0x41011b
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rcx
cmpl $0x0, -0xc(%rbp)
setl %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x11(%rax)
cmpl $0x0, -0xc(%rbp)
sete %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x10(%rax)
movzwl 0x18(%rcx), %esi
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %edx
subl %esi, %edx
movb %dl, (%rax,%rcx)
testb $0x1, -0xd(%rbp)
je 0x410172
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
subl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: SUBCY_SX_SY::Execute()
void SUBCY_SX_SY::Execute()
{
	int val ;
	bool c = m_cpu->flags.carry ;	
	val = m_cpu->s[ sX ] ;
	val -= m_cpu->s[ sY ] ;
	if ( c )
		val -= 1 ;

	m_cpu->flags.carry = val < 0 ;
	m_cpu->flags.zero = val == 0 ;
	m_cpu->s[ sX ] -= kk ;
	if ( c )
		c -= 1 ;

	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rcx), %rax
movb 0x11(%rax), %al
andb $0x1, %al
movb %al, -0xd(%rbp)
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %edx
movzbl (%rax,%rdx), %eax
movl %eax, -0xc(%rbp)
movq 0x8(%rcx), %rax
movzwl 0x12(%rcx), %ecx
movzbl (%rax,%rcx), %ecx
movl -0xc(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xc(%rbp)
testb $0x1, -0xd(%rbp)
je 0x410242
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rcx
cmpl $0x0, -0xc(%rbp)
setl %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x11(%rax)
cmpl $0x0, -0xc(%rbp)
sete %dl
movq 0x8(%rcx), %rax
andb $0x1, %dl
movb %dl, 0x10(%rax)
movzwl 0x18(%rcx), %esi
movq 0x8(%rcx), %rax
movzwl 0x10(%rcx), %ecx
movzbl (%rax,%rcx), %edx
subl %esi, %edx
movb %dl, (%rax,%rcx)
testb $0x1, -0xd(%rbp)
je 0x410299
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
subl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x20, %rsp
popq %rbp
retq
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: TEST_SX_KK::Execute()
void TEST_SX_KK::Execute()
{
	uint8_t and_test = ( m_cpu->s[ sX ] & kk ) ;
	m_cpu->flags.zero = and_test == 0 ;

	int i ;

	uint8_t xor_test = 0, b ;

	for ( i = 0 ; i < 8 ; i++ ) {
		b = ( and_test & ( 1 << i ) ) != 0 ; 
		xor_test = b ^ xor_test ;	
	}

	m_cpu->flags.carry = xor_test != 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
movzwl 0x18(%rax), %edx
andl %edx, %ecx
movb %cl, -0x9(%rbp)
movzbl -0x9(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
movq 0x8(%rax), %rax
andb $0x1, %cl
movb %cl, 0x10(%rax)
movb $0x0, -0x11(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x8, -0x10(%rbp)
jge 0x410393
movzbl -0x9(%rbp), %eax
movl -0x10(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0x11(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x410358
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
cmpl $0x0, %ecx
setne %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x11(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: TEST_SX_SY::Execute()
void TEST_SX_SY::Execute()
{
	uint8_t and_test = ( m_cpu->s[ sX ] & m_cpu->s[ sY ] ) ;
	m_cpu->flags.zero = and_test == 0 ;

	int i ;

	uint8_t xor_test = 0, b ;

	for ( i = 0 ; i < 8 ; i++ ) {
		b = ( and_test & ( 1 << i ) ) != 0 ; 
		xor_test = b ^ xor_test ;	
	}

	m_cpu->flags.carry = xor_test != 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
movq 0x8(%rax), %rdx
movzwl 0x12(%rax), %esi
movzbl (%rdx,%rsi), %edx
andl %edx, %ecx
movb %cl, -0x9(%rbp)
movzbl -0x9(%rbp), %ecx
cmpl $0x0, %ecx
sete %cl
movq 0x8(%rax), %rax
andb $0x1, %cl
movb %cl, 0x10(%rax)
movb $0x0, -0x11(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x8, -0x10(%rbp)
jge 0x4104ab
movzbl -0x9(%rbp), %eax
movl -0x10(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
xorl %ecx, %eax
movb %al, -0x11(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x410470
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
cmpl $0x0, %ecx
setne %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x11(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: XOR_SX_KK::Execute()
void XOR_SX_KK::Execute()
{
	m_cpu->s[ sX ] ^= kk ;
	
	m_cpu->flags.carry = false ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x18(%rax), %edi
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
xorl %edi, %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rcx
movb $0x0, 0x11(%rcx)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x0, %ecx
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: XOR_SX_SY::Execute()
void XOR_SX_SY::Execute()
{
	m_cpu->s[ sX ] ^= m_cpu->s[ sY ] ;
	
	m_cpu->flags.carry = false ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movzwl 0x12(%rax), %edx
movzbl (%rcx,%rdx), %edi
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %esi
xorl %edi, %esi
movb %sil, (%rcx,%rdx)
movq 0x8(%rax), %rcx
movb $0x0, 0x11(%rcx)
movq 0x8(%rax), %rcx
movzwl 0x10(%rax), %edx
movzbl (%rcx,%rdx), %ecx
cmpl $0x0, %ecx
sete %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x10(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411ae0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: RESET_EVENT::Execute()
void RESET_EVENT::Execute() 
{
	m_cpu->pc->Set( 0 ) ;
	m_cpu->flags.interrupt_enable = false ;
	m_cpu->flags.zero = false ;
	m_cpu->flags.carry = false ;
	m_cpu->stack->Reset() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0x411b10
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movb $0x0, 0x12(%rcx)
movq 0x8(%rax), %rcx
movb $0x0, 0x10(%rcx)
movq 0x8(%rax), %rcx
movb $0x0, 0x11(%rcx)
movq 0x8(%rax), %rax
movq 0x28(%rax), %rdi
callq 0x411d00
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cinstruction.cpp
// Function: INTERRUPT_EVENT::Execute()
void INTERRUPT_EVENT::Execute()
{
	if ( m_cpu->flags.interrupt_enable ) {
		m_cpu->flags.interrupt_enable = false ;
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->flags.preserved_carry = m_cpu->flags.carry ;
		m_cpu->flags.preserved_zero = m_cpu->flags.zero ;
		m_cpu->pc->Set( 0x3FF ) ;	
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x8(%rax), %rax
testb $0x1, 0x12(%rax)
je 0x4107e7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movb $0x0, 0x12(%rcx)
movq 0x8(%rax), %rcx
movq 0x28(%rcx), %rcx
movq %rcx, -0x18(%rbp)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x411b40
movq -0x18(%rbp), %rdi
movzwl %ax, %esi
callq 0x411c00
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movb 0x11(%rcx), %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x14(%rcx)
movq 0x8(%rax), %rcx
movb 0x10(%rcx), %dl
movq 0x8(%rax), %rcx
andb $0x1, %dl
movb %dl, 0x13(%rcx)
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
movl $0x3ff, %esi            # imm = 0x3FF
callq 0x411b10
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::CStack()
CStack::CStack()
{
	int i ;
	for ( i = 0 ; i < STACK_DEPTH ; i++ )
		stack[ i ] = 0 ;
	ptr = 0 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x1f, -0xc(%rbp)
jge 0x411be6
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x411bc7
movq -0x18(%rbp), %rax
movb $0x0, 0x3e(%rax)
popq %rbp
retq
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::Push(unsigned short)
void CStack::Push( uint16_t data )
{	
	data &= 0x3FF ;
	if ( ptr == STACK_DEPTH - 1 )
	  cout << ">>>>Stack overflow!<<<<" << endl ;
		
	stack[ ptr ] = data ;
	ptr = ( ptr + 1 ) % STACK_DEPTH ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movw %cx, -0xa(%rbp)
movzbl 0x3e(%rax), %eax
cmpl $0x1e, %eax
jne 0x411c54
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x17a1b4(%rip), %rsi    # 0x58bdf4
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq -0x18(%rbp), %rax
movw -0xa(%rbp), %dx
movzbl 0x3e(%rax), %ecx
movw %dx, (%rax,%rcx,2)
movzbl 0x3e(%rax), %eax
addl $0x1, %eax
movl $0x1f, %ecx
cltd
idivl %ecx
movq -0x18(%rbp), %rax
movb %dl, %cl
movb %cl, 0x3e(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::Pop()
uint16_t CStack::Pop()
{
	if ( ptr == 0 )
	  cout << ">>>>Stack underflow!<<<<" << endl ;
		
	ptr = ( ptr - 1 ) % STACK_DEPTH ;
	return stack[ ptr ] ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movzbl 0x3e(%rax), %eax
cmpl $0x0, %eax
jne 0x411ccf
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x17a151(%rip), %rsi    # 0x58be0c
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq -0x10(%rbp), %rax
movzbl 0x3e(%rax), %eax
subl $0x1, %eax
movl $0x1f, %ecx
cltd
idivl %ecx
movq -0x10(%rbp), %rax
movb %dl, %cl
movb %cl, 0x3e(%rax)
movzbl 0x3e(%rax), %ecx
movw (%rax,%rcx,2), %ax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPort::PortIn()
uint8_t CPort::PortIn()
{
	// find appropiate port 
	list<CIOPort*>::iterator i ;
	
	for ( i = portList.begin() ; i != portList.end() ; i++ ) 
		if ( (*i)->getID() == portid && (*i)->isReadable() )
			return (*i)->In() ;
	
	
	// Nothing found return zero
	return 0 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x414380
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x4143a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x414400
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4143d0
testb $0x1, %al
jne 0x411e6a
jmp 0x411ecd
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
callq 0x414450
movq -0x38(%rbp), %rcx
movzbl %al, %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x411eb7
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
callq 0x414470
testb $0x1, %al
jne 0x411ea0
jmp 0x411eb7
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movb %al, -0x1(%rbp)
jmp 0x411ed1
jmp 0x411eb9
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x414490
movq %rax, -0x30(%rbp)
jmp 0x411e46
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPort::PortOut(unsigned char)
void CPort::PortOut( uint8_t data )
{
	// find appropiate port 
	list<CIOPort*>::iterator i ;
	
	for ( i = portList.begin() ; i != portList.end() ; i++ ) 
		if ( (*i)->getID() == portid && (*i)->isWriteable() )
			(*i)->Out( data ) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x414380
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x4143a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x414400
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4143d0
testb $0x1, %al
jne 0x411f40
jmp 0x411fa3
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
callq 0x414450
movq -0x38(%rbp), %rcx
movzbl %al, %eax
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x411f8d
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
callq 0x4144c0
testb $0x1, %al
jne 0x411f76
jmp 0x411f8d
leaq -0x18(%rbp), %rdi
callq 0x414430
movq (%rax), %rdi
movb -0x9(%rbp), %cl
movq (%rdi), %rax
movzbl %cl, %esi
callq *(%rax)
jmp 0x411f8f
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x414490
movq %rax, -0x30(%rbp)
jmp 0x411f1c
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CCode::CCode(CPicoBlaze*)
CCode::CCode( CPicoBlaze *cpu ) 
{
	m_cpu = cpu ;
	
	int i ;
	for ( i = 0 ; i < MAX_ADDRESS ; i++ )
		CodeMap[ i ] = NULL ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x400, -0x14(%rbp)     # imm = 0x400
jge 0x411ff7
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, 0x8(%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x411fd2
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CCode::ClearCode()
void CCode::ClearCode() {	
	int i ;
	for ( i = 0 ; i < MAX_ADDRESS ; i++ )
		if ( CodeMap[ i ] != NULL ) {
			delete CodeMap[ i ] ;
			CodeMap[ i ] = NULL ;
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x400, -0xc(%rbp)      # imm = 0x400
jge 0x4120a3
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x412096
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x412085
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, 0x8(%rax,%rcx,8)
jmp 0x412098
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x41204b
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CCode::setInstruction(unsigned short, unsigned int, unsigned int)
bool CCode::setInstruction( uint16_t address, uint32_t code, unsigned int sourceLine )
{
	CInstruction *instr = Disassemble( code ) ;
	if ( instr == NULL ) {
	  cout << ">>>>Unknown code at address " << address << "<<<<" << endl ;
		return FALSE ;
	}
	
	if ( address >= MAX_ADDRESS ) {
	  cout << ">>>>Invalid address" << address << "<<<<" << endl ;
		delete instr ;
		return FALSE ;
	}
	
	
	if ( CodeMap[ address ] != NULL ) {
	  cout << ">>>>Code is placed at same address (" << address << ")<<<<" << endl ;
		delete instr ;
		return FALSE ;
	}
	
	instr->setSourceLine( sourceLine ) ;
	CodeMap[ address ] = instr ;
	
	return TRUE ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0x18(%rbp), %esi
callq 0x4120b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x41392a
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x178542(%rip), %rsi    # 0x58be34
callq 0x47f700
movq %rax, %rdi
movzwl -0x12(%rbp), %esi
callq 0x47fd20
movq %rax, %rdi
leaq 0x178513(%rip), %rsi    # 0x58be20
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movb $0x0, -0x1(%rbp)
jmp 0x413a1f
movzwl -0x12(%rbp), %eax
cmpl $0x400, %eax            # imm = 0x400
jl 0x413993
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x17850e(%rip), %rsi    # 0x58be51
callq 0x47f700
movq %rax, %rdi
movzwl -0x12(%rbp), %esi
callq 0x47fd20
movq %rax, %rdi
leaq 0x1784c2(%rip), %rsi    # 0x58be20
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x41398a
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x413a1f
movq -0x30(%rbp), %rax
movzwl -0x12(%rbp), %ecx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x4139fe
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x1784b4(%rip), %rsi    # 0x58be65
callq 0x47f700
movq %rax, %rdi
movzwl -0x12(%rbp), %esi
callq 0x47fd20
movq %rax, %rdi
leaq 0x1784be(%rip), %rsi    # 0x58be8a
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x4139f8
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x413a1f
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x415320
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rdx
movzwl -0x12(%rbp), %ecx
movq %rdx, 0x8(%rax,%rcx,8)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CCode::Print()
void CCode::Print()
{
	int i ;
	
	cout << "----listing----" << endl ;
	for ( i = 0 ; i < MAX_ADDRESS ;  i++ ) {
		if ( CodeMap[ i ] != NULL ) {
			cout << i << "  : " ;
			CodeMap[ i ]->Print() ;
			cout << endl ;
		}
	}
	cout << "----end listing----" << endl ;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x1783ee(%rip), %rsi    # 0x58be90
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movl $0x0, -0xc(%rbp)
cmpl $0x400, -0xc(%rbp)      # imm = 0x400
jge 0x413b27
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x8(%rax,%rcx,8)
je 0x413b1a
movl -0xc(%rbp), %esi
movq $0x602580, %rdi         # imm = 0x602580
callq 0x47faa0
movq %rax, %rdi
leaq 0x1783b1(%rip), %rsi    # 0x58bea0
callq 0x47f700
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x602580, %rdi         # imm = 0x602580
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
jmp 0x413b1c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x413abd
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x178370(%rip), %rsi    # 0x58bea5
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPicoBlaze::CPicoBlaze()
CPicoBlaze::CPicoBlaze()
{
	flags.zero = false ;
	flags.carry = false ;
	flags.interrupt_enable = false ;

	scratch = new CScratchPad ;
	pc = new CProgramCounter ;
	stack = new CStack ;
	port = new CPort ;
	code = new CCode( this ) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movb $0x0, 0x10(%rax)
movb $0x0, 0x11(%rax)
movb $0x0, 0x12(%rax)
movl $0x40, %edi
callq 0x416f20
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
callq 0x411b60
jmp 0x413b8b
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x2, %edi
callq 0x416f20
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
callq 0x411ab0
jmp 0x413bb2
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0x40, %edi
callq 0x416f20
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x411bb0
jmp 0x413bd9
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x20, %edi
callq 0x416f20
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x40(%rbp)
callq 0x411d70
jmp 0x413c00
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x30(%rax)
movl $0x2008, %edi           # imm = 0x2008
callq 0x416f20
movq -0x28(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
callq 0x411fb0
jmp 0x413c2b
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x38(%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x40, %esi
callq 0x416080
jmp 0x413cc7
movq -0x30(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x2, %esi
callq 0x416080
jmp 0x413cc7
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x40, %esi
callq 0x416080
jmp 0x413cc7
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x20, %esi
callq 0x416080
jmp 0x413cc7
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x2008, %esi           # imm = 0x2008
callq 0x416080
movq -0x10(%rbp), %rdi
callq 0x4b74e0
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPicoBlaze::~CPicoBlaze()
CPicoBlaze::~CPicoBlaze()
{
	delete scratch ;
	delete pc ;
	delete stack ;
	delete port ;
	delete code ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x413d09
movq -0x10(%rbp), %rdi
callq 0x411ba0
movq -0x10(%rbp), %rdi
movl $0x40, %esi
callq 0x416080
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x413d32
movq -0x20(%rbp), %rdi
callq 0x411ad0
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x416080
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x413d5b
movq -0x28(%rbp), %rdi
callq 0x411bf0
movq -0x28(%rbp), %rdi
movl $0x40, %esi
callq 0x416080
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x413d84
movq -0x30(%rbp), %rdi
callq 0x411d90
movq -0x30(%rbp), %rdi
movl $0x20, %esi
callq 0x416080
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x413dad
movq -0x38(%rbp), %rdi
callq 0x412000
movq -0x38(%rbp), %rdi
movl $0x2008, %esi           # imm = 0x2008
callq 0x416080
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPicoBlaze::Print()
void CPicoBlaze::Print()
{
	int i ;
	
	cout << "----CPU----" << endl ;
	cout << "regs|" ;
	for ( i = 0 ; i < 15 ; i++ ) 
		cout << "s" << i << "=" << (int) s[ i ]  << "|" ;
	cout << endl ;
	
	cout << "flags|";
	cout << "c=" << flags.carry ;
	cout << "|z=" << flags.zero ;
	cout << "|ie=" << flags.interrupt_enable << "|" << endl ;
	cout << "----end CPU----" << endl ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177fd7(%rip), %rsi    # 0x58beb9
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177fc1(%rip), %rsi    # 0x58bec5
callq 0x47f700
movl $0x0, -0xc(%rbp)
cmpl $0xf, -0xc(%rbp)
jge 0x413f71
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177ab7(%rip), %rsi    # 0x58b9db
callq 0x47f700
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x47faa0
movq %rax, %rdi
leaq 0x17bcd5(%rip), %rsi    # 0x58fc13
callq 0x47f700
movq %rax, %rdi
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movzbl (%rax,%rcx), %esi
callq 0x47faa0
movq %rax, %rdi
leaq 0x177f6f(%rip), %rsi    # 0x58bed0
callq 0x47f700
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x413f10
movq $0x602580, %rdi         # imm = 0x602580
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177f39(%rip), %rsi    # 0x58becb
callq 0x47f700
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177f2d(%rip), %rsi    # 0x58bed2
callq 0x47f700
movq %rax, %rdi
movq -0x18(%rbp), %rax
movb 0x11(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x47ff80
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177f09(%rip), %rsi    # 0x58bed5
callq 0x47f700
movq %rax, %rdi
movq -0x18(%rbp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x47ff80
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177ee6(%rip), %rsi    # 0x58bed9
callq 0x47f700
movq %rax, %rdi
movq -0x18(%rbp), %rax
movb 0x12(%rax), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x47ff80
movq %rax, %rdi
leaq 0x177eba(%rip), %rsi    # 0x58bed0
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177ea6(%rip), %rsi    # 0x58bede
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPicoBlaze::GetNextSourceLine()
unsigned int CPicoBlaze::GetNextSourceLine()
{
	CInstruction *instr = code->getInstruction( pc->Get() ) ;
	if ( instr == NULL ) {
	  cout << ">>>>Error in simulation (No code found at " << pc->Get() << ")<<<<" << endl ;
		return FALSE ;
	}

	return instr->getSourceLine() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x38(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rdi
callq 0x411b40
movq -0x20(%rbp), %rdi
movzwl %ax, %esi
callq 0x413a30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4140f6
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177e44(%rip), %rsi    # 0x58beee
callq 0x47f700
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x18(%rax), %rdi
callq 0x411b40
movq -0x30(%rbp), %rdi
movzwl %ax, %esi
callq 0x47fd20
movq %rax, %rdi
leaq 0x177db1(%rip), %rsi    # 0x58be8a
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movl $0x0, -0x4(%rbp)
jmp 0x414102
movq -0x18(%rbp), %rdi
callq 0x405940
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPicoBlaze::Next()
bool CPicoBlaze::Next()
{
	CInstruction *instr = code->getInstruction( pc->Get() ) ;
	if ( instr == NULL ) {
	  cout << ">>>>Error in simulation (No code found at " << pc->Get() << ")<<<<" << endl ;
		return FALSE ;
	}

	instr->Execute() ;
		
	return TRUE ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x38(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x18(%rax), %rdi
callq 0x411b40
movq -0x20(%rbp), %rdi
movzwl %ax, %esi
callq 0x413a30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4141a3
movq $0x602580, %rdi         # imm = 0x602580
leaq 0x177d94(%rip), %rsi    # 0x58beee
callq 0x47f700
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x18(%rax), %rdi
callq 0x411b40
movq -0x30(%rbp), %rdi
movzwl %ax, %esi
callq 0x47fd20
movq %rax, %rdi
leaq 0x177d01(%rip), %rsi    # 0x58be8a
callq 0x47f700
movq %rax, %rdi
movq $0x47efe0, %rsi         # imm = 0x47EFE0
callq 0x47e1f0
movb $0x0, -0x1(%rbp)
jmp 0x4141b1
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: wangyufei95[P]watchdog_linux/./cpuuse.h
// Function: cal_cpuoccupy(CPU_OCCUPY*, CPU_OCCUPY*)
double cal_cpuoccupy(CPU_OCCUPY *o, CPU_OCCUPY *n)
{
	unsigned int od, nd;
	unsigned int id, sd;
	double cpu_use = 0;
	double st,tol;

	od = (unsigned int)(o->user + o->nice + o->system + o->idle);//��һ��(�û�+���ȼ�+ϵͳ+����)��ʱ���ٸ���od
	nd = (unsigned int)(n->user + n->nice + n->system + n->idle);//�ڶ���(�û�+���ȼ�+ϵͳ+����)��ʱ���ٸ���od

	id = (unsigned int)(n->user - o->user);    //�û���һ�κ͵ڶ��ε�ʱ��֮���ٸ���id
	sd = (unsigned int)(n->system - o->system);//ϵͳ��һ�κ͵ڶ��ε�ʱ��֮���ٸ���sd
	st=sd+id;
	tol=nd-od;
    printf("%.2f,%.2f\n",st,tol);
	if (tol != 0)
		cpu_use = (st * 100) / tol; //((�û�+ϵͳ)��100)��(��һ�κ͵ڶ��ε�ʱ����)�ٸ���g_cpu_used
	else 
		cpu_use = 0;
	//printf("cpu: %.2f\%\n", cpu_use);
	return cpu_use;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %eax
movl 0x18(%rcx), %edx
addl %edx, %eax
movl 0x1c(%rcx), %edx
addl %edx, %eax
movl 0x20(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movl 0x14(%rcx), %eax
movl 0x18(%rcx), %edx
addl %edx, %eax
movl 0x1c(%rcx), %edx
addl %edx, %eax
movl 0x20(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
addl %ecx, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl %ecx, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
leaq 0x869b(%rip), %rdi      # 0xc020
movb $0x2, %al
callq 0x3050
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x399e
jp 0x399e
jmp 0x39b7
movsd 0x8662(%rip), %xmm0     # 0xc008
mulsd -0x30(%rbp), %xmm0
divsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x39bf
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./cpuuse.h
// Function: get_cpuoccupy(CPU_OCCUPY*)
void get_cpuoccupy(CPU_OCCUPY *cpust) //��������get��������һ���βνṹ����Ū��ָ��O
{
	FILE *fd;
	int n;
	char buff[256];
	CPU_OCCUPY *cpu_occupy;
	cpu_occupy = cpust;

	fd = fopen("/proc/stat", "r");
	fgets(buff, sizeof(buff), fd);

	sscanf(buff, "%s %u %u %u %u", cpu_occupy->name, &cpu_occupy->user, &cpu_occupy->nice, &cpu_occupy->system, &cpu_occupy->idle);
	//printf("name = %s, user = %u, nice = %u, system = %u , idle = %u \n", cpu_occupy->name, cpu_occupy->user, cpu_occupy->nice, cpu_occupy->system, cpu_occupy->idle);

	fclose(fd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq 0x863a(%rip), %rdi      # 0xc02b
leaq 0x8798(%rip), %rsi      # 0xc190
callq 0x3490
movq %rax, -0x10(%rbp)
leaq -0x120(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x3630
leaq -0x120(%rbp), %rdi
movq -0x128(%rbp), %rdx
movq -0x128(%rbp), %rcx
addq $0x14, %rcx
movq -0x128(%rbp), %r8
addq $0x18, %r8
movq -0x128(%rbp), %r9
addq $0x1c, %r9
movq -0x128(%rbp), %rax
addq $0x20, %rax
leaq 0x85df(%rip), %rsi      # 0xc036
movq %rax, (%rsp)
movb $0x0, %al
callq 0x33d0
movq -0x10(%rbp), %rdi
callq 0x33f0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./cpuuse.h
// Function: cpuuse()
int cpuuse()
{
	CPU_OCCUPY cpu_stat1;
	CPU_OCCUPY cpu_stat2;
	double cpu;
	//��һ�λ�ȡcpuʹ������
	//printf("===============================cpu use================================\n");
	get_cpuoccupy((CPU_OCCUPY *)&cpu_stat1);
	sleep(5);

	//�ڶ��λ�ȡcpuʹ������
	get_cpuoccupy((CPU_OCCUPY *)&cpu_stat2);

	//����cpuʹ����
	cpu = cal_cpuoccupy((CPU_OCCUPY *)&cpu_stat1, (CPU_OCCUPY *)&cpu_stat2);
	printf("cpu use = %.2f\%\n", cpu);
	//printf("======================================================================\n");

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq -0x24(%rbp), %rdi
callq 0x39d0
movl $0x5, %edi
callq 0x32b0
leaq -0x48(%rbp), %rdi
callq 0x39d0
leaq -0x24(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x38e0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
leaq 0x8583(%rip), %rdi      # 0xc045
movb $0x1, %al
callq 0x3050
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::init()
bool CAutoMail::init()
{
		
	init_mail_info();

	if (!init_socket())
		return false;

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0x3d80
movq -0x18(%rbp), %rdi
callq 0x4450
testb $0x1, %al
jne 0x443c
movb $0x0, -0x1(%rbp)
jmp 0x4440
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::init_socket()
bool CAutoMail::init_socket()
{
	char _buf_svr[BUF_LEN] = {0};
	wcstombs(_buf_svr, m_str_email_server.data(), m_str_email_server.length()+1);
	hostent *host_server = gethostbyname(_buf_svr);

	if (host_server == NULL)
	{
		ERROR_NUMBER = CHANGE_URL_TO_IP_FAILED;
		return false;
	}

	m_socket_server = socket(AF_INET,SOCK_STREAM,0);
	if (m_socket_server < 0)
	{
		ERROR_NUMBER = CREATE_SOCKET_FAILED;
		return false;
	}

	m_sockaddr_server.sin_family = AF_INET;
 	m_sockaddr_server.sin_port = htons(m_ns_server_port);
	m_sockaddr_server.sin_addr = *((struct in_addr *)host_server->h_addr);
	memset(&(m_sockaddr_server.sin_zero), 0, 8) ;

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3220
movq -0x130(%rbp), %rdi
leaq -0x110(%rbp), %rax
movq %rax, -0x128(%rbp)
addq $0x308, %rdi            # imm = 0x308
callq 0x3530
movq -0x130(%rbp), %rdi
movq %rax, -0x120(%rbp)
addq $0x308, %rdi            # imm = 0x308
callq 0x3690
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x3360
leaq -0x110(%rbp), %rdi
callq 0x3460
movq %rax, -0x118(%rbp)
cmpq $0x0, -0x118(%rbp)
jne 0x4502
movl $0x14, 0xcf07(%rip)     # 0x11400
movb $0x0, -0x1(%rbp)
jmp 0x4596
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x30a0
movl %eax, %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x32c(%rax)
cmpl $0x0, 0x32c(%rax)
jge 0x453b
movl $0x12, 0xcecb(%rip)     # 0x11400
movb $0x0, -0x1(%rbp)
jmp 0x4596
movq -0x130(%rbp), %rax
movw $0x2, 0x330(%rax)
movzwl 0x328(%rax), %edi
callq 0x3060
movq -0x130(%rbp), %rdi
movw %ax, 0x332(%rdi)
movq -0x118(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, 0x334(%rdi)
addq $0x330, %rdi            # imm = 0x330
addq $0x8, %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x3220
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::uninit()
void CAutoMail::uninit()
{
	shutdown(m_socket_server, SHUT_RDWR);
	close(m_socket_server);
	char _buf[BUF_LEN] = {0};
	
	memset(_buf, 0, sizeof(_buf));
	sprintf(_buf, "rm -f %s", STR_BASE_FILE);
	system(_buf);
	
	memset(_buf, 0, sizeof(_buf));
	sprintf(_buf, "rm -f %s", STR_TMP_FILE);
	system(_buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
movl 0x32c(%rax), %edi
movl $0x2, %esi
callq 0x3550
movq -0x118(%rbp), %rax
movl 0x32c(%rax), %edi
callq 0x3780
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3220
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3220
leaq -0x110(%rbp), %rdi
movq 0xcdc8(%rip), %rdx      # 0x113e8
leaq 0x7a62(%rip), %rsi      # 0xc089
movb $0x0, %al
callq 0x3080
leaq -0x110(%rbp), %rdi
callq 0x3350
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3220
leaq -0x110(%rbp), %rdi
movq 0xcd85(%rip), %rdx      # 0x113e0
leaq 0x7a27(%rip), %rsi      # 0xc089
movb $0x0, %al
callq 0x3080
leaq -0x110(%rbp), %rdi
callq 0x3350
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::base64(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>, char const*)
bool CAutoMail::base64(wstring data, const char *dst_file)
{
	if (dst_file == NULL)
	{
		ERROR_NUMBER = PARAM_INCORRECT;
		return false;
	}

	wofstream _ofs(STR_TMP_FILE); // create temp file to store data
	_ofs << data.data();
	_ofs.close();
	
	char buf[BUF_LEN] = {0}; // to encode data with base64 by shell
	sprintf(buf,"base64 %s >> %s", STR_TMP_FILE, dst_file);
	system(buf);

	memset(buf, 0, sizeof(buf));
	sprintf(buf, "rm -f %s", STR_TMP_FILE);
	system(buf);

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rsi, -0x338(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x46b8
movl $0x10, 0xcd51(%rip)     # 0x11400
movb $0x0, -0x1(%rbp)
jmp 0x488e
movq 0xcd21(%rip), %rsi      # 0x113e0
leaq -0x220(%rbp), %rdi
movq %rdi, -0x340(%rbp)
movl $0x10, %edx
callq 0x3520
movq -0x338(%rbp), %rdi
callq 0x3530
movq -0x340(%rbp), %rdi
movq %rax, %rsi
callq 0x3750
jmp 0x46f4
leaq -0x220(%rbp), %rdi
callq 0x3500
jmp 0x4702
xorps %xmm0, %xmm0
movaps %xmm0, -0x360(%rbp)
movaps %xmm0, -0x240(%rbp)
movaps %xmm0, -0x250(%rbp)
movaps %xmm0, -0x260(%rbp)
movaps %xmm0, -0x270(%rbp)
movaps %xmm0, -0x280(%rbp)
movaps %xmm0, -0x290(%rbp)
movaps %xmm0, -0x2a0(%rbp)
movaps %xmm0, -0x2b0(%rbp)
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm0, -0x2d0(%rbp)
movaps %xmm0, -0x2e0(%rbp)
movaps %xmm0, -0x2f0(%rbp)
movaps %xmm0, -0x300(%rbp)
movaps %xmm0, -0x310(%rbp)
movaps %xmm0, -0x320(%rbp)
movaps %xmm0, -0x330(%rbp)
movq 0xcc5d(%rip), %rdx      # 0x113e0
movq -0x20(%rbp), %rcx
leaq 0x7904(%rip), %rsi      # 0xc092
xorl %eax, %eax
leaq -0x330(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x3080
movq -0x348(%rbp), %rdi
callq 0x3350
jmp 0x47b1
xorps %xmm0, %xmm0
movaps %xmm0, -0x380(%rbp)
movaps %xmm0, -0x240(%rbp)
movaps %xmm0, -0x250(%rbp)
movaps %xmm0, -0x260(%rbp)
movaps %xmm0, -0x270(%rbp)
movaps %xmm0, -0x280(%rbp)
movaps %xmm0, -0x290(%rbp)
movaps %xmm0, -0x2a0(%rbp)
movaps %xmm0, -0x2b0(%rbp)
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm0, -0x2d0(%rbp)
movaps %xmm0, -0x2e0(%rbp)
movaps %xmm0, -0x2f0(%rbp)
movaps %xmm0, -0x300(%rbp)
movaps %xmm0, -0x310(%rbp)
movaps %xmm0, -0x320(%rbp)
movaps %xmm0, -0x330(%rbp)
movq 0xcbae(%rip), %rdx      # 0x113e0
leaq 0x7850(%rip), %rsi      # 0xc089
xorl %eax, %eax
leaq -0x330(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x3080
movq -0x368(%rbp), %rdi
callq 0x3350
jmp 0x485c
movb $0x1, -0x1(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3610
jmp 0x488e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x228(%rbp)
movl %eax, -0x22c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x3610
jmp 0x489c
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
movq -0x228(%rbp), %rdi
callq 0x36e0
nopl (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: CAutoMail::get_time(char*)
void CAutoMail::get_time(char *time_buf)
{
	if (time_buf == NULL)
		return;
	time_t tt = time(NULL);
	struct tm *time_now = localtime(&tt);
	sprintf(time_buf, "%d-%d-%d-%d:%d:%d", time_now->tm_year+1900, time_now->tm_mon+1, time_now->tm_mday, time_now->tm_hour, 
	        time_now->tm_min, time_now->tm_sec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x48c9
jmp 0x4932
xorl %eax, %eax
movl %eax, %edi
callq 0x3390
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x32a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl 0x14(%rax), %edx
addl $0x76c, %edx            # imm = 0x76C
movq -0x20(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x20(%rbp), %rax
movl 0x8(%rax), %r9d
movq -0x20(%rbp), %rax
movl 0x4(%rax), %r10d
movq -0x20(%rbp), %rax
movl (%rax), %eax
leaq 0x777f(%rip), %rsi      # 0xc0a2
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x3080
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: wangyufei95[P]watchdog_linux/./maile.h
// Function: run_mail()
int run_mail()
{
	CAutoMail automail;
	automail.init();
	if(!automail.send_mail())
		cout<<automail.get_error_no()<<endl;
	automail.uninit();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
leaq -0x340(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x3ae0
movq -0x358(%rbp), %rdi
callq 0x4410
jmp 0x5b6c
leaq -0x340(%rbp), %rdi
callq 0x54c0
movb %al, -0x359(%rbp)
jmp 0x5b80
movb -0x359(%rbp), %al
testb $0x1, %al
jne 0x5be6
jmp 0x5b8c
leaq -0x340(%rbp), %rdi
callq 0x4400
movl %eax, %esi
movq 0xb417(%rip), %rdi      # 0x10fb8
callq 0x3510
movq %rax, -0x368(%rbp)
jmp 0x5baf
movq -0x368(%rbp), %rdi
movq 0xb3e3(%rip), %rsi      # 0x10fa0
callq 0x3410
jmp 0x5bc4
jmp 0x5be6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x348(%rbp)
movl %eax, -0x34c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x3c90
jmp 0x5c0b
leaq -0x340(%rbp), %rdi
callq 0x45b0
jmp 0x5bf4
leaq -0x340(%rbp), %rdi
callq 0x3c90
xorl %eax, %eax
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq -0x348(%rbp), %rdi
callq 0x36e0
nopw (%rax,%rax)