Guest User

Untitled

a guest
Aug 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int f() {
  2.         int i = 5;
  3.         return (i*i--) - (--i*i*i++) + (++i);
  4. }
  5.  
  6. 080483e4 <f>:
  7.  80483e4:       55                      push   %ebp
  8.  80483e5:       89 e5                   mov    %esp,%ebp
  9.  80483e7:       83 ec 10                sub    $0x10,%esp
  10.  80483ea:       c7 45 fc 05 00 00 00    movl   $0x5,-0x4(%ebp)
  11.  80483f1:       8b 45 fc                mov    -0x4(%ebp),%eax
  12.  80483f4:       89 c2                   mov    %eax,%edx
  13.  80483f6:       0f af 55 fc             imul   -0x4(%ebp),%edx      ; edx = 5*5 = 25
  14.  80483fa:       83 6d fc 01             subl   $0x1,-0x4(%ebp)      ; i = 4
  15.  80483fe:       8b 45 fc                mov    -0x4(%ebp),%eax
  16.  8048401:       0f af 45 fc             imul   -0x4(%ebp),%eax
  17.  8048405:       0f af 45 fc             imul   -0x4(%ebp),%eax      ; eax = 4*4*4 = 64
  18.  8048409:       89 d1                   mov    %edx,%ecx       
  19.  804840b:       29 c1                   sub    %eax,%ecx        ; ecx = 25 - 64 = -39
  20.  804840d:       89 c8                   mov    %ecx,%eax
  21.  804840f:       83 45 fc 01             addl   $0x1,-0x4(%ebp)      ; i = 5
  22.  8048413:       03 45 fc                add    -0x4(%ebp),%eax      ; eax = -39 + 5 = -34
  23.  8048416:       83 6d fc 01             subl   $0x1,-0x4(%ebp)
  24.  804841a:       83 45 fc 01             addl   $0x1,-0x4(%ebp)
  25.  804841e:       c9                      leave  
  26.  804841f:       c3                      ret             ; return -34
Add Comment
Please, Sign In to add comment