.file   "var2.cpp"
       .text
globl main
       .type   main, @function
main:
LFB0:
       .cfi_startproc
       pushq   %rbp
       .cfi_def_cfa_offset 16
       movq    %rsp, %rbp
       .cfi_offset 6, -16
       .cfi_def_cfa_register 6

       ;; x=5
       movl    $5, -4(%rbp)

       ;; loads the address of y
       leaq    -20(%rbp), %rax
       movq    %rax, -16(%rbp)

       ;; loads x into the cpu
       movl    -4(%rbp), %eax

       ;; adds 5 to x
       leal    5(%rax), %edx

       ;; loads the address in ptr
       movq    -16(%rbp), %rax

       ;; stores the result in y
       movl    %edx, (%rax)

       ;; return 0
       movl    $0, %eax
       popq    %rbp
       .cfi_def_cfa 7, 8
       ret
       .cfi_endproc
LFE0:
       .size   main, .-main
       .ident  "GCC: (NetBSD nb2 20110806) 4.5.3"