Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
; Listing generated by Microsoft (R) Optimizing Compiler Version 16.00.30319.01 TITLE F:\WKSPS\C\d.c .686P .XMM include listing.inc .model flat INCLUDELIB LIBCMT INCLUDELIB OLDNAMES _DATA SEGMENT $SG81286 DB '%u', 00H ORG $+1 $SG81293 DB 'i=%u', 09H, 'sum(i)=%e', 09H, 'time consuming=%ldns', 0aH DB 00H _DATA ENDS PUBLIC _get_cpu_time EXTRN __imp__QueryPerformanceCounter@4:PROC EXTRN __imp__QueryPerformanceFrequency@4:PROC EXTRN __alldiv:PROC EXTRN __allmul:PROC _BSS SEGMENT ?li@?1??get_cpu_time@@9@9 DQ 01H DUP (?) ; `get_cpu_time'::`2'::li ; Function compile flags: /Ogtpy _BSS ENDS _TEXT SEGMENT _linow$ = -8 ; size = 8 _get_cpu_time PROC ; File f:\wksps\c\d.c ; Line 5 sub esp, 8 push esi ; Line 8 xor esi, esi ; Line 10 push OFFSET ?li@?1??get_cpu_time@@9@9 mov DWORD PTR _linow$[esp+16], esi mov DWORD PTR _linow$[esp+20], esi mov DWORD PTR ?li@?1??get_cpu_time@@9@9, esi mov DWORD PTR ?li@?1??get_cpu_time@@9@9+4, esi call DWORD PTR __imp__QueryPerformanceFrequency@4 ; Line 11 lea eax, DWORD PTR _linow$[esp+12] push eax call DWORD PTR __imp__QueryPerformanceCounter@4 ; Line 12 mov ecx, DWORD PTR _linow$[esp+16] mov edx, DWORD PTR _linow$[esp+12] push esi push 1000000000 ; 3b9aca00H push ecx push edx call __allmul mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9+4 push ecx mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9 push ecx push edx push eax call __alldiv pop esi ; Line 13 add esp, 8 ret 0 _get_cpu_time ENDP _TEXT ENDS PUBLIC __real@3ff0000000000000 PUBLIC __real@41f0000000000000 PUBLIC _recursion_factorial EXTRN __fltused:DWORD ; COMDAT __real@3ff0000000000000 CONST SEGMENT __real@3ff0000000000000 DQ 03ff0000000000000r ; 1 CONST ENDS ; COMDAT __real@41f0000000000000 CONST SEGMENT __real@41f0000000000000 DQ 041f0000000000000r ; 4.29497e+009 ; Function compile flags: /Ogtpy CONST ENDS _TEXT SEGMENT tv129 = 8 ; size = 4 _n$ = 8 ; size = 4 _recursion_factorial PROC ; Line 16 push esi ; Line 17 mov esi, DWORD PTR _n$[esp] cmp esi, 1 je SHORT $LN2@recursion_ test esi, esi je SHORT $LN2@recursion_ ;; term condi end ; Line 20 lea eax, DWORD PTR [esi-1] push eax call _recursion_factorial ;; sub recur end add esp, 4 mov DWORD PTR tv129[esp], esi fild DWORD PTR tv129[esp] ;; type coercion test esi, esi jns SHORT $LN6@recursion_ fadd QWORD PTR __real@41f0000000000000 $LN6@recursion_: fmulp ST(1), ST(0) pop esi ; Line 21 ret 0 $LN2@recursion_: ; Line 18 fld1 pop esi ; Line 21 ret 0 _recursion_factorial ENDP _TEXT ENDS PUBLIC _sum ; Function compile flags: /Ogtpy _TEXT SEGMENT $T81329 = -8 ; size = 8 tv133 = 8 ; size = 4 _n$ = 8 ; size = 4 _sum PROC ; Line 25 mov edx, DWORD PTR _n$[esp-4] sub esp, 8 cmp edx, 1 je SHORT $LN1@sum test edx, edx je SHORT $LN1@sum ;; term cond ; Line 27 lea ecx, DWORD PTR [edx-1] push ecx call _recursion_factorial mov DWORD PTR tv133[esp+8], edx fild DWORD PTR tv133[esp+8] test edx, edx jns SHORT $LN10@sum fadd QWORD PTR __real@41f0000000000000 $LN10@sum: fmulp ST(1), ST(0) push ecx fstp QWORD PTR $T81329[esp+16] call _sum fadd QWORD PTR $T81329[esp+16] add esp, 8 ; Line 28 add esp, 8 ret 0 $LN1@sum: ; Line 26 fld1 ; Line 28 add esp, 8 ret 0 _sum ENDP _TEXT ENDS PUBLIC _main EXTRN _printf:PROC EXTRN _scanf:PROC ; Function compile flags: /Ogtpy _TEXT SEGMENT _n$ = -28 ; size = 4 tv164 = -24 ; size = 4 $T81351 = -24 ; size = 8 _linow$81335 = -16 ; size = 8 _linow$81341 = -8 ; size = 8 _main PROC ; Line 31 push ebp mov ebp, esp and esp, -64 ; ffffffc0H sub esp, 48 ; 00000030H push ebx push ebp push esi push edi ; Line 35 lea eax, DWORD PTR _n$[esp+64] push eax push OFFSET $SG81286 call _scanf add esp, 8 cmp eax, -1 je $LN32@main xor ebx, ebx npad 6 $LL8@main: cmp DWORD PTR _n$[esp+64], ebx jbe $LN32@main ;; scanf end ; Line 37 xor esi, esi npad 4 $LL6@main: ; Line 39 mov edi, DWORD PTR __imp__QueryPerformanceFrequency@4 push OFFSET ?li@?1??get_cpu_time@@9@9 mov DWORD PTR _linow$81335[esp+68], ebx ;; 68 for push ^ mov DWORD PTR _linow$81335[esp+72], ebx mov DWORD PTR ?li@?1??get_cpu_time@@9@9, ebx mov DWORD PTR ?li@?1??get_cpu_time@@9@9+4, ebx call edi ;; init li lea ecx, DWORD PTR _linow$81335[esp+64] push ecx call DWORD PTR __imp__QueryPerformanceCounter@4 ;; w linow mov edx, DWORD PTR _linow$81335[esp+68] mov eax, DWORD PTR _linow$81335[esp+64] push ebx push 1000000000 ; 3b9aca00H push edx push eax call __allmul ;; 64bit mul mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9+4 push ecx mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9 push ecx push edx push eax call __alldiv ;; resu in edx:eax ; Line 42 push OFFSET ?li@?1??get_cpu_time@@9@9 mov ebp, eax ;; start time, cropped mov DWORD PTR _linow$81341[esp+68], ebx mov DWORD PTR _linow$81341[esp+72], ebx mov DWORD PTR ?li@?1??get_cpu_time@@9@9, ebx mov DWORD PTR ?li@?1??get_cpu_time@@9@9+4, ebx call edi ;; init li again lea edx, DWORD PTR _linow$81341[esp+64] push edx call DWORD PTR __imp__QueryPerformanceCounter@4 ;; w linow mov eax, DWORD PTR _linow$81341[esp+68] mov ecx, DWORD PTR _linow$81341[esp+64] push ebx push 1000000000 ; 3b9aca00H push eax push ecx call __allmul mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9+4 push ecx mov ecx, DWORD PTR ?li@?1??get_cpu_time@@9@9 push ecx push edx push eax call __alldiv ;; now computed mov edi, eax ;; cropped resu to edi ; Line 44 cmp esi, 1 je SHORT $LN17@main cmp esi, ebx je SHORT $LN17@main ;; factorial term cond check lea ecx, DWORD PTR [esi-1] push ecx call _recursion_factorial ;; sub factorial call mov edx, esi mov DWORD PTR tv164[esp+68], edx fild DWORD PTR tv164[esp+68] ;; type coercion on i? test edx, edx jns SHORT $LN34@main fadd QWORD PTR __real@41f0000000000000 $LN34@main: fmulp ST(1), ST(0) ;; fact(i) in top push ecx fstp QWORD PTR $T81351[esp+72] ;; old son call _sum fadd QWORD PTR $T81351[esp+72] ;; son(i) in top add esp, 8 jmp SHORT $LN19@main $LN17@main: fld1 $LN19@main: sub edi, ebp ;; elapsed mov eax, 274877907 ; 10624dd3H imul edi sar edx, 6 mov eax, edx shr eax, 31 ; 0000001fH add eax, edx push eax ;; elapsed sub esp, 8 fstp QWORD PTR [esp] ;; sum(i) push esi ;; i push OFFSET $SG81293 ;; printf fmt string call _printf add esi, 10 ; 0000000aH add esp, 20 ; 00000014H cmp esi, DWORD PTR _n$[esp+64] ;; cmp i with n jbe $LL6@main ;; again ; Line 35 lea ecx, DWORD PTR _n$[esp+64] push ecx push OFFSET $SG81286 call _scanf ;; change n add esp, 8 cmp eax, -1 jne $LL8@main ;; n changed, back again $LN32@main: ; Line 48 pop edi xor eax, eax pop esi pop ebp pop ebx mov esp, ebp pop ebp ret 0 _main ENDP _TEXT ENDS END
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
Google Docs - Exploit
11 min ago | 0.32 KB
Earn money on Changelly
CSS | 25 min ago | 0.32 KB
SwapEngine Bug [build 1.3]
39 min ago | 0.32 KB
December smells like money
CSS | 53 min ago | 0.32 KB
SelectionEdit.pas
Delphi | 8 hours ago | 27.66 KB
SelectionEdit.h
C++ | 8 hours ago | 1.42 KB
SelectionEdit.cpp
C++ | 8 hours ago | 17.22 KB
PackageRelease.ps1
PowerShell | 8 hours ago | 24.87 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!