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

```asm
<define_mode>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %ecx,0x1c(%rsp)
  test   %rdx,%rdx
  je     L272
  mov    %rdi,%r13
  mov    %rdx,%r14
  mov    %rsi,%rbx
  mov    %rdi,%r12
  lea    (%rdx,%rdi,1),%r15
  mov    %rdi,%rbp
  jmp    L30
L72:
  mov    %rbp,0x10(%rsp)
  movb   $0x42,0x0(%rbp)
  mov    (%rbx),%edi
  call   <in_alpha@plt>
  test   %rax,%rax
  je     L192
  movb   $0x41,0x0(%rbp)
L192:
  cmpl   $0x0,0x1c(%rsp)
  je     L118
  mov    0x8(%rsp),%rax
  cmpl   $0x5b,(%rax)
  je     L88
L118:
  mov    0x8(%rsp),%rax
  mov    (%rax),%eax
  sub    $0x30,%eax
  cmp    $0x9,%eax
  ja     L243
  mov    0x10(%rsp),%rax
  movb   $0x4e,(%rax)
L243:
  add    $0x4,%rbx
  add    $0x1,%rbp
  cmp    %r15,%rbp
  je     L188
L30:
  mov    %rbx,0x8(%rsp)
  cmpl   $0xff,(%rbx)
  jle    L72
  movb   $0x4b,0x0(%rbp)
  jmp    L243
L88:
  mov    0x10(%rsp),%rax
  movb   $0x41,(%rax)
  jmp    L118
L188:
  mov    %r13,%rdx
  mov    $0x0,%esi
  jmp    L166
L68:
  mov    %rsi,%rax
  mov    $0x0,%ecx
L65:
  cmpb   $0x4e,0x0(%r13,%rax,1)
  jne    L28
  add    $0x1,%ecx
  add    $0x1,%rax
  cmp    %rax,%r14
  ja     L65
L28:
  sub    $0x1,%ecx
  cmp    $0x4,%ecx
  ja     L12
  mov    %ecx,%ecx
  lea    0x1(%rdx,%rcx,1),%rcx
  mov    %rdx,%rax
L17:
  movb   $0x41,(%rax)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L17
L12:
  lea    0x1(%rsi),%rcx
  add    $0x1,%rdx
  cmp    %rcx,%r14
  je     L205
  mov    %rcx,%rsi
L166:
  cmpb   $0x4e,(%rdx)
  jne    L12
  test   %rsi,%rsi
  je     L68
  cmpb   $0x4e,-0x1(%rdx)
  je     L12
  mov    %rsi,%rax
  mov    $0x0,%ecx
  cmp    %rsi,%r14
  ja     L65
  jmp    L12
L205:
  mov    $0x0,%edx
  jmp    L244
L87:
  mov    %rdx,%rax
  mov    $0x0,%edi
L269:
  cmpb   $0x41,0x0(%r13,%rax,1)
  jne    L200
  add    $0x1,%edi
  add    $0x1,%rax
  cmp    %rcx,%rax
  jb     L269
L200:
  sub    $0x1,%edi
  cmp    $0x4,%edi
  ja     L165
  mov    %edi,%edi
  lea    0x1(%r12,%rdi,1),%rdi
  mov    %r12,%rax
L292:
  movb   $0x42,(%rax)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L292
L165:
  lea    0x1(%rdx),%rax
  add    $0x1,%r12
  cmp    %rdx,%rsi
  je     L272
  mov    %rax,%rdx
L244:
  cmpb   $0x41,(%r12)
  jne    L165
  test   %rdx,%rdx
  je     L87
  cmpb   $0x41,-0x1(%r12)
  je     L165
  mov    %rdx,%rax
  mov    $0x0,%edi
  cmp    %rdx,%rcx
  ja     L269
  jmp    L165
L272:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void define_mode(char mode[], const int jisdata[], const size_t length, const int gs1) {
  size_t i;
  int mlen, j;
  for (i = 0; i < length; i++) {
    if (jisdata[i] > 0xff) {
      mode[i] = 'K';
    } else {
      mode[i] = 'B';
      if (in_alpha(jisdata[i])) {
        mode[i] = 'A';
      }
      if (gs1 && (jisdata[i] == '[')) {
        mode[i] = 'A';
      }
      if ((jisdata[i] >= '0') && (jisdata[i] <= '9')) {
        mode[i] = 'N';
      }
    }
  }
  for (i = 0; i < length; i++) {
    if (mode[i] == 'N') {
      if (((i != 0) && (mode[i - 1] != 'N')) || (i == 0)) {
        mlen = 0;
        while (((mlen + i) < length) && (mode[mlen + i] == 'N')) {
          mlen++;
        };
        if (mlen < 6) {
          for (j = 0; j < mlen; j++) {
            mode[i + j] = 'A';
          }
        }
      }
    }
  }
  for (i = 0; i < length; i++) {
    if (mode[i] == 'A') {
      if (((i != 0) && (mode[i - 1] != 'A')) || (i == 0)) {
        mlen = 0;
        while (((mlen + i) < length) && (mode[mlen + i] == 'A')) {
          mlen++;
        };
        if (mlen < 6) {
          for (j = 0; j < mlen; j++) {
            mode[i + j] = 'B';
          }
        }
      }
    }
  }
}
```