Created
August 7, 2019 14:50
-
-
Save SunXiaoShan/fe4b16838adc73a11659723d87297f5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.section __TEXT,__text,regular,pure_instructions | |
.build_version macos, 10, 14 sdk_version 10, 14 | |
.globl _func ## -- Begin function func | |
.p2align 4, 0x90 | |
_func: ## @func | |
.cfi_startproc | |
## %bb.0: | |
pushq %rbp | |
.cfi_def_cfa_offset 16 | |
.cfi_offset %rbp, -16 | |
movq %rsp, %rbp | |
.cfi_def_cfa_register %rbp | |
movl %edi, -4(%rbp) | |
movl %esi, -8(%rbp) | |
movl -4(%rbp), %esi | |
movl %esi, _gx(%rip) | |
movl -8(%rbp), %esi | |
movl %esi, _gy(%rip) | |
movl $9, -12(%rbp) | |
movl $3, -16(%rbp) | |
movl _gx(%rip), %esi | |
addl _gy(%rip), %esi | |
addl -12(%rbp), %esi | |
addl -16(%rbp), %esi | |
movl %esi, %eax | |
popq %rbp | |
retq | |
.cfi_endproc | |
## -- End function | |
.globl _main ## -- Begin function main | |
.p2align 4, 0x90 | |
_main: ## @main | |
.cfi_startproc | |
## %bb.0: | |
pushq %rbp | |
.cfi_def_cfa_offset 16 | |
.cfi_offset %rbp, -16 | |
movq %rsp, %rbp | |
.cfi_def_cfa_register %rbp | |
subq $32, %rsp | |
movl $0, -4(%rbp) | |
movl %edi, -8(%rbp) | |
movq %rsi, -16(%rbp) | |
movl $999, -20(%rbp) ## imm = 0x3E7 | |
movl $2, %edi | |
movl $9, %esi | |
callq _func | |
xorl %esi, %esi | |
movl %eax, -20(%rbp) | |
movl %esi, %eax | |
addq $32, %rsp | |
popq %rbp | |
retq | |
.cfi_endproc | |
## -- End function | |
.section __DATA,__data | |
.globl _gx ## @gx | |
.p2align 2 | |
_gx: | |
.long 1 ## 0x1 | |
.globl _gy ## @gy | |
.p2align 2 | |
_gy: | |
.long 2 ## 0x2 | |
.subsections_via_symbols |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment