Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .section    __TEXT,__text,regular,pure_instructions
  2.     .macosx_version_min 10, 13
  3.     .intel_syntax noprefix
  4.     .globl  _fib                    ## -- Begin function fib
  5.     .p2align    4, 0x90
  6. _fib:                                   ## @fib
  7. ## %bb.0:                               ## %entry_1
  8.     push    r14
  9.     push    rbx
  10.     push    rax
  11.     mov rbx, rdi
  12.     cmp rbx, 1
  13.     jg  LBB0_3
  14. ## %bb.1:                               ## %then_2
  15.     mov rax, rbx
  16.     add rsp, 8
  17.     pop rbx
  18.     pop r14
  19.     ret
  20. LBB0_3:                                 ## %merge_4
  21.     lea rdi, [rbx - 1]
  22.     call    _fib
  23.     mov r14, rax
  24.     add rbx, -2
  25.     mov rdi, rbx
  26.     call    _fib
  27.     add rax, r14
  28.     add rsp, 8
  29.     pop rbx
  30.     pop r14
  31.     ret
  32.                                         ## -- End function
  33.     .globl  _main                   ## -- Begin function main
  34.     .p2align    4, 0x90
  35. _main:                                  ## @main
  36. ## %bb.0:                               ## %entry_5
  37.     push    rax
  38.     mov edi, 30
  39.     call    _fib
  40.     mov rcx, rax
  41.     lea rdi, [rip + _.str_6]
  42.     xor eax, eax
  43.     mov rsi, rcx
  44.     call    _printf
  45.     xor eax, eax
  46.     pop rcx
  47.     ret
  48.                                         ## -- End function
  49.     .section    __TEXT,__const
  50.     .globl  _.str_6                 ## @.str_6
  51. _.str_6:
  52.     .asciz  "%d\n"
  53.  
  54.  
  55. .subsections_via_symbols
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement