node/lib/metasm/metasm/cpu/x86_64/compile_c.rb
def c_epilog
		return if @state.func.attributes.to_a.include? 'naked'
		@state.dirty.reverse_each { |reg|
			instr 'pop', Reg.new(reg, @cpusz)
		}
		if ebp = @state.saved_rbp
			instr 'mov', Reg.new(4, ebp.sz), ebp
			instr 'pop', ebp
		elsif @state.args_space > 0 and @state.dirty.length & 1 == 0
			instr 'add', Reg.new(4, @cpusz), Expression[8]
		end
		instr 'ret'
	end
# holds compiler state information for a function
# registers are saved as register number (see Reg)
holds compiler state information for a function
registers are saved as register number
holds compiler state information for a function registers are saved as register number
def c_epilog
		return if @state.func.attributes.to_a.include? 'naked'
		@state.dirty.reverse_each { |reg|
			instr 'pop', Reg.new(reg, @cpusz)
		}
		if ebp = @state.saved_rbp
			instr 'mov', Reg.new(4, ebp.sz), ebp
			instr 'pop', ebp
		elsif @state.args_space > 0 and @state.dirty.length & 1 == 0
			instr 'add', Reg.new(4, @cpusz), Expression[8]
		end
		instr 'ret'
	end
def c_epilog return if @state . func . attributes . to_a . include? 'naked' @state . dirty . reverse_each { | reg | instr 'pop' , Reg . new ( reg , @cpusz ) } if ebp = @state . saved_rbp instr 'mov' , Reg . new ( 4 , ebp . sz ) , ebp instr 'pop' , ebp elsif @state . args_space > 0 and @state . dirty . length & 1 == 0 instr 'add' , Reg . new ( 4 , @cpusz ) , Expression [ 8 ] end instr 'ret' end
holds compiler state information for a function
registers are saved as register number (see Reg)
holds compiler state information for a function registers are saved as register number ( see Reg )