// File: buildsi[P]ldaudit-yaml/auditlib.cpp
// Function: la_activity
void la_activity (uintptr_t *cookie, unsigned int flag) {

  std::string flagName;
  std::string desc;
  switch(flag) {
    case LA_ACT_CONSISTENT:
      flagName = "LA_ACT_CONSISTENT";
      desc = "Link-map activity has been completed (map is consistent)";
      break;
    case LA_ACT_ADD:
      flagName = "LA_ACT_ADD";
      desc = "New objects are being added to the link map.";
      break;
    case LA_ACT_DELETE:
      flagName = "LA_ACT_DELETE";
      desc = "Objects are being removed from the link map.";
      break;
    default:
      flagName = "???";
    }

  std::stringstream ss;
  ss << cookie;
   
  std::string output = "  - event: activity_occurring\n    function: la_activity\n    initiated_by: " + ss.str() + "\n    flag: " + flagName + "\n    description: "+ desc +"\n";
  doPrint(output);
}

// Assembly:
subq $0x2f8, %rsp            # imm = 0x2F8
movq %rdi, 0x2f0(%rsp)
movl %esi, 0x2ec(%rsp)
leaq 0x2c8(%rsp), %rdi
callq 0x3310
leaq 0x2a8(%rsp), %rdi
callq 0x3310
movl 0x2ec(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x420a
jmp 0x41f1
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x4254
jmp 0x41fc
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x4282
jmp 0x42b0
leaq 0x30ed(%rip), %rsi      # 0x72fe
leaq 0x2c8(%rsp), %rdi
callq 0x3300
jmp 0x4220
leaq 0x30e9(%rip), %rsi      # 0x7310
leaq 0x2a8(%rsp), %rdi
callq 0x3300
jmp 0x4236
jmp 0x42c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x458a
leaq 0x30ee(%rip), %rsi      # 0x7349
leaq 0x2c8(%rsp), %rdi
callq 0x3300
jmp 0x426a
leaq 0x30e3(%rip), %rsi      # 0x7354
leaq 0x2a8(%rsp), %rdi
callq 0x3300
jmp 0x4280
jmp 0x42c8
leaq 0x30f8(%rip), %rsi      # 0x7381
leaq 0x2c8(%rsp), %rdi
callq 0x3300
jmp 0x4298
leaq 0x30f0(%rip), %rsi      # 0x738f
leaq 0x2a8(%rsp), %rdi
callq 0x3300
jmp 0x42ae
jmp 0x42c8
leaq 0x3105(%rip), %rsi      # 0x73bc
leaq 0x2c8(%rsp), %rdi
callq 0x3300
jmp 0x42c6
jmp 0x42c8
leaq 0x110(%rsp), %rdi
callq 0x3160
jmp 0x42d7
leaq 0x120(%rsp), %rdi
movq 0x2f0(%rsp), %rsi
callq 0x31b0
jmp 0x42ee
leaq 0x30(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x3220
jmp 0x4302
leaq 0x30b7(%rip), %rsi      # 0x73c0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x33e0
jmp 0x431a
leaq 0x30ea(%rip), %rdx      # 0x740b
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x3090
jmp 0x4332
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x2c8(%rsp), %rdx
callq 0x3380
jmp 0x434e
leaq 0x30c2(%rip), %rdx      # 0x7417
leaq 0xb0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x3090
jmp 0x436c
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x2a8(%rsp), %rdx
callq 0x3380
jmp 0x438b
leaq 0x2f48(%rip), %rdx      # 0x72da
leaq 0xf0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3090
jmp 0x43a9
leaq 0xd0(%rsp), %rdi
callq 0x3130
leaq 0xb0(%rsp), %rdi
callq 0x3130
leaq 0x90(%rsp), %rdi
callq 0x3130
leaq 0x70(%rsp), %rdi
callq 0x3130
leaq 0x50(%rsp), %rdi
callq 0x3130
leaq 0x30(%rsp), %rdi
callq 0x3130
leaq 0x10(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x30f0
jmp 0x4402
leaq 0x10(%rsp), %rdi
callq 0x38f0
jmp 0x440e
leaq 0x10(%rsp), %rdi
callq 0x3130
leaq 0xf0(%rsp), %rdi
callq 0x3130
leaq 0x110(%rsp), %rdi
callq 0x31a0
leaq 0x2a8(%rsp), %rdi
callq 0x3130
leaq 0x2c8(%rsp), %rdi
callq 0x3130
addq $0x2f8, %rsp            # imm = 0x2F8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x457d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x4530
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x4526
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x451c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x450f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x4502
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x3130
leaq 0xb0(%rsp), %rdi
callq 0x3130
leaq 0x90(%rsp), %rdi
callq 0x3130
leaq 0x70(%rsp), %rdi
callq 0x3130
leaq 0x50(%rsp), %rdi
callq 0x3130
leaq 0x30(%rsp), %rdi
callq 0x3130
jmp 0x457d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
jmp 0x4570
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2a0(%rsp)
movl %eax, 0x29c(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x3130
leaq 0xf0(%rsp), %rdi
callq 0x3130
leaq 0x110(%rsp), %rdi
callq 0x31a0
leaq 0x2a8(%rsp), %rdi
callq 0x3130
leaq 0x2c8(%rsp), %rdi
callq 0x3130
movq 0x2a0(%rsp), %rdi
callq 0x3410
nopw %cs:(%rax,%rax)