Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
00000000000a37e0 <main.main>:
a37e0: f9400b81 ldr x1, [x28, #16]
a37e4: 910003e2 mov x2, sp
a37e8: eb01005f cmp x2, x1
a37ec: 54000649 a38b4 <main.main+0xd4> // b.plast
a37f0: f81c0ffe str x30, [sp, #-64]!
a37f4: f81f83fd stur x29, [sp, #-8]
a37f8: d10023fd sub x29, sp, #0x8
a37fc: f000027b adrp x27, f2000 <runtime.gcbits.*+0xef8>
a3800: 9132237b add x27, x27, #0xc88
a3804: fd400360 ldr d0, [x27]
a3808: fd0007e0 str d0, [sp, #8]
a380c: 97ff4195 bl 73e60 <math.Tanh>
a3810: fd400be0 ldr d0, [sp, #16]
a3814: a902ffff stp xzr, xzr, [sp, #40]
a3818: 1e6e1001 fmov d1, #1.000000000000000000e+00
a381c: 1f408400 fmsub d0, d0, d0, d1
a3820: fd0013e0 str d0, [sp, #32]
a3824: 1e612802 fadd d2, d0, d1
a3828: 1e613842 fsub d2, d2, d1
a382c: fd0007e2 str d2, [sp, #8]
a3830: 97fdd620 bl 190b0 <runtime.convT64>
a3834: f9400be0 ldr x0, [sp, #16]
a3838: f00000a1 adrp x1, ba000 <type.*+0xa000>
a383c: 913f0021 add x1, x1, #0xfc0
a3840: f90017e1 str x1, [sp, #40]
a3844: f9001be0 str x0, [sp, #48]
a3848: 9100a3e0 add x0, sp, #0x28
a384c: f90007e0 str x0, [sp, #8]
a3850: b24003e2 orr x2, xzr, #0x1
a3854: f9000be2 str x2, [sp, #16]
a3858: f9000fe2 str x2, [sp, #24]
a385c: 97ffff8d bl a3690 <log.Println>
a3860: a902ffff stp xzr, xzr, [sp, #40]
a3864: fd4013e0 ldr d0, [sp, #32]
a3868: 1e6e1001 fmov d1, #1.000000000000000000e+00
a386c: 1e613800 fsub d0, d0, d1
a3870: 1e602820 fadd d0, d1, d0
a3874: fd0007e0 str d0, [sp, #8]
a3878: 97fdd60e bl 190b0 <runtime.convT64>
a387c: f9400be0 ldr x0, [sp, #16]
a3880: f00000a1 adrp x1, ba000 <type.*+0xa000>
a3884: 913f0021 add x1, x1, #0xfc0
a3888: f90017e1 str x1, [sp, #40]
a388c: f9001be0 str x0, [sp, #48]
a3890: 9100a3e0 add x0, sp, #0x28
a3894: f90007e0 str x0, [sp, #8]
a3898: b24003e0 orr x0, xzr, #0x1
a389c: f9000be0 str x0, [sp, #16]
a38a0: f9000fe0 str x0, [sp, #24]
a38a4: 97ffff7b bl a3690 <log.Println>
a38a8: f85f83fd ldur x29, [sp, #-8]
a38ac: f84407fe ldr x30, [sp], #64
a38b0: d65f03c0 ret
a38b4: aa1e03e3 mov x3, x30
a38b8: 97ff2422 bl 6c940 <runtime.morestack_noctxt>
a38bc: 17ffffc9 b a37e0 <main.main>
TEXT main.main(SB) /home/ubuntu/go/src/scratchpad/testtanh/main.go
main.go:8 0xa37e0 f9400b81 MOVD 16(R28), R1
main.go:8 0xa37e4 910003e2 MOVD RSP, R2
main.go:8 0xa37e8 eb01005f CMP R1, R2
main.go:8 0xa37ec 54000649 BLS 50(PC)
main.go:8 0xa37f0 f81c0ffe MOVD.W R30, -64(RSP)
main.go:8 0xa37f4 f81f83fd MOVD R29, -8(RSP)
main.go:8 0xa37f8 d10023fd SUB $8, RSP, R29
main.go:10 0xa37fc f000027b ADRP 323584(PC), R27
main.go:10 0xa3800 9132237b ADD $3208, R27, R27
main.go:10 0xa3804 fd400360 FMOVD (R27), F0
main.go:10 0xa3808 fd0007e0 FMOVD F0, 8(RSP)
main.go:10 0xa380c 97ff4195 CALL math.Tanh(SB)
main.go:10 0xa3810 fd400be0 FMOVD 16(RSP), F0
main.go:13 0xa3814 a902ffff STP (ZR, ZR), 40(RSP)
main.go:11 0xa3818 1e6e1001 FMOVD $1., F1
main.go:11 0xa381c 1f408400 FMSUBD F0, F1, F0, F0
main.go:11 0xa3820 fd0013e0 FMOVD F0, 32(RSP)
main.go:11 0xa3824 1e612802 FADDD F1, F0, F2
main.go:11 0xa3828 1e613842 FSUBD F1, F2, F2
main.go:13 0xa382c fd0007e2 FMOVD F2, 8(RSP)
main.go:13 0xa3830 97fdd620 CALL runtime.convT64(SB)
main.go:13 0xa3834 f9400be0 MOVD 16(RSP), R0
main.go:13 0xa3838 f00000a1 ADRP 94208(PC), R1
main.go:13 0xa383c 913f0021 ADD $4032, R1, R1
main.go:13 0xa3840 f90017e1 MOVD R1, 40(RSP)
main.go:13 0xa3844 f9001be0 MOVD R0, 48(RSP)
main.go:13 0xa3848 9100a3e0 ADD $40, RSP, R0
main.go:13 0xa384c f90007e0 MOVD R0, 8(RSP)
main.go:13 0xa3850 b24003e2 ORR $1, ZR, R2
main.go:13 0xa3854 f9000be2 MOVD R2, 16(RSP)
main.go:13 0xa3858 f9000fe2 MOVD R2, 24(RSP)
main.go:13 0xa385c 97ffff8d CALL log.Println(SB)
main.go:14 0xa3860 a902ffff STP (ZR, ZR), 40(RSP)
main.go:12 0xa3864 fd4013e0 FMOVD 32(RSP), F0
main.go:12 0xa3868 1e6e1001 FMOVD $1., F1
main.go:12 0xa386c 1e613800 FSUBD F1, F0, F0
main.go:12 0xa3870 1e602820 FADDD F0, F1, F0
main.go:14 0xa3874 fd0007e0 FMOVD F0, 8(RSP)
main.go:14 0xa3878 97fdd60e CALL runtime.convT64(SB)
main.go:14 0xa387c f9400be0 MOVD 16(RSP), R0
main.go:14 0xa3880 f00000a1 ADRP 94208(PC), R1
main.go:14 0xa3884 913f0021 ADD $4032, R1, R1
main.go:14 0xa3888 f90017e1 MOVD R1, 40(RSP)
main.go:14 0xa388c f9001be0 MOVD R0, 48(RSP)
main.go:14 0xa3890 9100a3e0 ADD $40, RSP, R0
main.go:14 0xa3894 f90007e0 MOVD R0, 8(RSP)
main.go:14 0xa3898 b24003e0 ORR $1, ZR, R0
main.go:14 0xa389c f9000be0 MOVD R0, 16(RSP)
main.go:14 0xa38a0 f9000fe0 MOVD R0, 24(RSP)
main.go:14 0xa38a4 97ffff7b CALL log.Println(SB)
main.go:15 0xa38a8 f85f83fd LDUR -8(RSP), R29
main.go:15 0xa38ac f84407fe MOVD.P 64(RSP), R30
main.go:15 0xa38b0 d65f03c0 RET
main.go:8 0xa38b4 aa1e03e3 MOVD R30, R3
main.go:8 0xa38b8 97ff2422 CALL runtime.morestack_noctxt(SB)
main.go:8 0xa38bc 17ffffc9 JMP main.main(SB)
package main
import (
func main() {
v := 0.2228940815087735
tanh := math.Tanh(v)
_ = 1 - tanh*tanh + 1 - 1
_ = 1 - tanh*tanh - 1 + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment