Skip to content

Instantly share code, notes, and snippets.

@shqking
Created May 25, 2021 05:31
Show Gist options
  • Save shqking/329d7712c26bad49786ab0a544a4af43 to your computer and use it in GitHub Desktop.
Save shqking/329d7712c26bad49786ab0a544a4af43 to your computer and use it in GitHub Desktop.
tlv_get_addr disassembly code
libdyld.dylib`tlv_get_addr:
-> 0x19eb86940 <+0>: ldr x16, [x0, #0x8]
0x19eb86944 <+4>: mrs x17, TPIDRRO_EL0
0x19eb86948 <+8>: and x17, x17, #0xfffffffffffffff8
0x19eb8694c <+12>: ldr x17, [x17, x16, lsl #3]
0x19eb86950 <+16>: cbz x17, 0x19eb86960 ; <+32>
0x19eb86954 <+20>: ldr x16, [x0, #0x10]
0x19eb86958 <+24>: add x0, x17, x16
0x19eb8695c <+28>: ret
0x19eb86960 <+32>: stp x29, x30, [sp, #-0x10]!
0x19eb86964 <+36>: mov x29, sp
0x19eb86968 <+40>: sub sp, sp, #0x120 ; =0x120
0x19eb8696c <+44>: stp x1, x2, [sp, #-0x10]!
0x19eb86970 <+48>: stp x3, x4, [sp, #-0x10]!
0x19eb86974 <+52>: stp x5, x6, [sp, #-0x10]!
0x19eb86978 <+56>: stp x7, x8, [sp, #-0x10]!
0x19eb8697c <+60>: stp x9, x10, [sp, #-0x10]!
0x19eb86980 <+64>: stp x11, x12, [sp, #-0x10]!
0x19eb86984 <+68>: stp x13, x14, [sp, #-0x10]!
0x19eb86988 <+72>: stp x15, x16, [sp, #-0x10]!
0x19eb8698c <+76>: stp q0, q1, [sp, #-0x20]!
0x19eb86990 <+80>: stp q2, q3, [sp, #-0x20]!
0x19eb86994 <+84>: stp q4, q5, [sp, #-0x20]!
0x19eb86998 <+88>: stp q6, q7, [sp, #-0x20]!
0x19eb8699c <+92>: stp x0, x17, [sp, #-0x10]!
0x19eb869a0 <+96>: mov x0, x16
0x19eb869a4 <+100>: bl 0x19eb869f0 ; tlv_allocate_and_initialize_for_key
0x19eb869a8 <+104>: ldp x16, x17, [sp], #0x10
0x19eb869ac <+108>: ldr x16, [x16, #0x10]
0x19eb869b0 <+112>: add x0, x0, x16
0x19eb869b4 <+116>: ldp q6, q7, [sp], #0x20
0x19eb869b8 <+120>: ldp q4, q5, [sp], #0x20
0x19eb869bc <+124>: ldp q2, q3, [sp], #0x20
0x19eb869c0 <+128>: ldp q0, q1, [sp], #0x20
0x19eb869c4 <+132>: ldp x15, x16, [sp], #0x10
0x19eb869c8 <+136>: ldp x13, x14, [sp], #0x10
0x19eb869cc <+140>: ldp x11, x12, [sp], #0x10
0x19eb869d0 <+144>: ldp x9, x10, [sp], #0x10
0x19eb869d4 <+148>: ldp x7, x8, [sp], #0x10
0x19eb869d8 <+152>: ldp x5, x6, [sp], #0x10
0x19eb869dc <+156>: ldp x3, x4, [sp], #0x10
0x19eb869e0 <+160>: ldp x1, x2, [sp], #0x10
0x19eb869e4 <+164>: mov sp, x29
0x19eb869e8 <+168>: ldp x29, x30, [sp], #0x10
0x19eb869ec <+172>: ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment