user: Demonstrate the C code that generates the assembly output below:

```asm
<invert_matrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x54(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x28(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L60:
  cmp    %rdx,%rsp
  je     L43
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L60
L43:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L31
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L31:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x54(%rbp),%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <get_identity_matrix@plt>
  movl   $0x0,-0x38(%rbp)
  jmp    L59
L32:
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x38(%rbp),%eax
  imul   -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x34(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  mov    -0x54(%rbp),%edx
  mov    -0x30(%rbp),%ecx
  mov    -0x20(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <get_pivot_index@plt>
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  je     L37
  mov    -0x54(%rbp),%edi
  mov    -0x2c(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <switch_columns@plt>
L37:
  mov    -0x54(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <normalize_pivot_row@plt>
  mov    -0x54(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x50(%rbp),%rsi
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <eliminate_by_row@plt>
  addl   $0x1,-0x38(%rbp)
L59:
  mov    -0x38(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L32
  mov    %rbx,%rsp
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L9
  call   <__stack_chk_fail@plt>
L9:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void invert_matrix(uint8_t *matrix, uint8_t *result, int size) {
  int row;
  int pivotIndex;
  uint8_t currentRow[size];
  int currentRowSize = size * sizeof(uint8_t);
  get_identity_matrix(result, size);
  for (row = 0; row < size; row++) {
    int index = row;
    memcpy(&currentRow, matrix + row * size, currentRowSize);
    pivotIndex = get_pivot_index(currentRow, index, size);
    if (pivotIndex != row) {
      switch_columns(matrix, result, index, pivotIndex, size);
    }
    normalize_pivot_row(matrix, result, index, size);
    eliminate_by_row(matrix, result, row, size);
  }
}
```