user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %r15
  lea    D474(%rip),%rdi
  push   %r14
  push   %r13
  lea    D216(%rip),%r13
  push   %r12
  lea    D553(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x168,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x158(%rsp)
  xor    %eax,%eax
  movl   $0xffffffff,0x3c(%rsp)
  lea    0x3c(%rsp),%r15
  movl   $0xffffffff,0x40(%rsp)
  mov    %r15,%r14
  call   <puts@plt>
  lea    D512(%rip),%rdi
  call   <puts@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <sleep@plt>
  movb   $0x0,0x1f(%rsp)
  movb   $0x0,0x1e(%rsp)
  movb   $0x0,0x1d(%rsp)
  movl   $0x0,0x18(%rsp)
  movl   $0x0,0x20(%rsp)
  movl   $0x0,0x24(%rsp)
  nopl   (%rax)
L67:
  mov    $0x4,%edi
  xor    %eax,%eax
  call   <sleep@plt>
  xor    %eax,%eax
  call   <clrscr@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  movl   $0xffffffff,0x3c(%rsp)
  nop
L556:
  lea    D609(%rip),%rdi
  call   <puts@plt>
  lea    D411(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <puts@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x3c(%rsp),%ebx
  test   %ebx,%ebx
  jle    L556
  cmp    $0x1,%ebx
  je     L411
  cmp    $0x2,%ebx
  je     L986
  cmp    $0x3,%ebx
  jne    L67
  lea    D474(%rip),%rdi
  lea    D32(%rip),%rbp
  call   <puts@plt>
  lea    D608(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D168(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <printf@plt>
  cmpb   $0x1,0x1d(%rsp)
  je     L600
L837:
  cmpb   $0x1,0x1e(%rsp)
  je     L49
L476:
  cmpb   $0x1,0x1f(%rsp)
  je     L864
L68:
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <printf@plt>
  mov    0x158(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L398
  add    $0x168,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L411:
  lea    D474(%rip),%rdi
  xor    %r15d,%r15d
  call   <puts@plt>
  lea    D416(%rip),%rdi
  call   <puts@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  lea    D464(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  lea    0x120(%rsp),%rax
  mov    %ebx,0x8(%rsp)
  mov    %r15,%rbx
  mov    %rax,0x10(%rsp)
  mov    %rax,%r15
  jmp    L62
  xchg   %ax,%ax
L642:
  cmp    $0x14,%rbx
  je     L258
  mov    %al,(%r15,%rbx,1)
  add    $0x1,%rbx
L62:
  xor    %eax,%eax
  mov    %ebx,%ebp
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L642
  movslq %ebp,%rax
  mov    0x8(%rsp),%ebx
  movb   $0x0,0x120(%rsp,%rax,1)
  cmp    $0x14,%ebp
  je     L235
L803:
  lea    D124(%rip),%rdi
  xor    %eax,%eax
  xor    %r15d,%r15d
  call   <printf@plt>
  jmp    L967
  nopw   0x0(%rax,%rax,1)
L369:
  cmp    $0x14,%r15
  je     L178
  mov    %al,0x140(%rsp,%r15,1)
  add    $0x1,%r15
L967:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L369
  movslq %r15d,%rax
  movb   $0x0,0x140(%rsp,%rax,1)
  cmp    $0x14,%r15d
  je     L106
L312:
  lea    D161(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x5a(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    %rax,%rbp
  lea    0x60(%rsp),%rax
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L195:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%r15d
  cmp    $0xa,%al
  je     L195
  movsbl %al,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  je     L195
  mov    %r15b,0x0(%rbp)
  add    $0x1,%rbp
  cmp    0x8(%rsp),%rbp
  jne    L195
  movb   $0x0,0x146(%rsp)
  nopl   0x0(%rax)
L402:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L402
  mov    0x8(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L814
  lea    0x80(%rsp),%rsi
  lea    0x140(%rsp),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L814
  mov    0x28(%rsp),%rdi
  lea    0x48(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L814
L121:
  lea    D474(%rip),%rdi
  lea    D436(%rip),%rbp
  call   <puts@plt>
  lea    D144(%rip),%rdi
  lea    0x40(%rsp),%r15
  call   <puts@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    %ebx,0x10(%rsp)
  mov    %r14,0x28(%rsp)
  nopw   0x0(%rax,%rax,1)
L149:
  mov    $0x4,%edi
  xor    %eax,%eax
  call   <sleep@plt>
  xor    %eax,%eax
  call   <clrscr@plt>
  mov    0x10(%rsp),%eax
  cmp    $0x1,%eax
  je     L370
  cmp    $0x2,%eax
  je     L585
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%esi
  lea    D555(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x100(%rsp),%rdx
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  lea    0xe0(%rsp),%rsi
  call   <printf@plt>
  mov    0x18(%rsp),%r14d
L1066:
  mov    %r14d,%esi
  lea    D569(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  movl   $0xffffffff,0x40(%rsp)
L156:
  lea    D115(%rip),%rdi
  call   <puts@plt>
  lea    D13(%rip),%rdi
  call   <puts@plt>
  lea    D607(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <puts@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x40(%rsp),%eax
  test   %eax,%eax
  jle    L156
  cmp    $0x1,%eax
  je     L190
  cmp    $0x2,%eax
  je     L927
  cmp    $0x3,%eax
  je     L138
  cmp    $0x4,%eax
  jne    L149
  movl   $0xffffffff,0x38(%rsp)
  lea    0x38(%rsp),%rbx
  nopw   0x0(%rax,%rax,1)
L152:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  lea    D501(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  js     L152
  cmp    %eax,%r14d
  jl     L152
  movl   $0xffffffff,0x44(%rsp)
  lea    0x44(%rsp),%rbx
  nopl   0x0(%rax)
L357:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  lea    D577(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x44(%rsp),%eax
  cmp    $0x4,%eax
  ja     L357
  cmp    0x10(%rsp),%eax
  je     L357
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    0x44(%rsp),%eax
  cmp    $0x1,%eax
  je     L1104
  cmp    $0x2,%eax
  je     L833
  cmp    $0x3,%eax
  jne    L296
  cmpb   $0x1,0x1f(%rsp)
  jne    L296
L246:
  cmpl   $0x1,0x10(%rsp)
  mov    0x38(%rsp),%eax
  je     L453
  cmpl   $0x2,0x10(%rsp)
  je     L96
  sub    %eax,0x18(%rsp)
  mov    0x18(%rsp),%esi
  lea    D284(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L796:
  mov    0x44(%rsp),%eax
  cmp    $0x1,%eax
  je     L890
  cmp    $0x2,%eax
  je     L594
  cmp    $0x3,%eax
  jne    L149
  mov    0x38(%rsp),%ecx
  add    %ecx,0x18(%rsp)
  lea    D284(%rip),%rdi
  xor    %eax,%eax
  mov    0x18(%rsp),%esi
  call   <printf@plt>
  jmp    L149
L258:
  movb   $0x0,0x134(%rsp)
  mov    0x8(%rsp),%ebx
L235:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  je     L803
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L235
  jmp    L803
L178:
  movb   $0x0,0x154(%rsp)
L106:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  je     L312
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L106
  jmp    L312
L814:
  mov    0x10(%rsp),%rdi
  lea    0xa0(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L1102
  lea    0xc0(%rsp),%rsi
  lea    0x140(%rsp),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L1102
  mov    0x28(%rsp),%rdi
  lea    0x4e(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L1102
  mov    $0x2,%ebx
  jmp    L121
L1102:
  mov    0x10(%rsp),%rdi
  lea    0xe0(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L806
L639:
  lea    D305(%rip),%rdi
  call   <puts@plt>
L729:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  jmp    L67
L986:
  lea    D474(%rip),%rdi
  xor    %ebp,%ebp
  call   <puts@plt>
  lea    D0(%rip),%rdi
  call   <puts@plt>
  lea    D474(%rip),%rdi
  call   <puts@plt>
  lea    D464(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  jmp    L734
  nopl   0x0(%rax)
L228:
  cmp    $0x14,%rbp
  je     L59
  mov    %al,0x120(%rsp,%rbp,1)
  add    $0x1,%rbp
L734:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L228
  movslq %ebp,%rax
  movb   $0x0,0x120(%rsp,%rax,1)
  cmp    $0x14,%ebp
  je     L305
L963:
  lea    D124(%rip),%rdi
  xor    %eax,%eax
  xor    %ebp,%ebp
  call   <printf@plt>
  jmp    L1014
  cs nopw 0x0(%rax,%rax,1)
L287:
  cmp    $0x14,%rbp
  je     L477
  mov    %al,0x140(%rsp,%rbp,1)
  add    $0x1,%rbp
L1014:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L287
  movslq %ebp,%rax
  movb   $0x0,0x140(%rsp,%rax,1)
  cmp    $0x14,%ebp
  je     L397
L577:
  lea    D161(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0x5a(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    %rax,%rbx
  lea    0x60(%rsp),%rax
  mov    %rax,0x8(%rsp)
  nopl   0x0(%rax)
L942:
  xor    %eax,%eax
  call   <getchar@plt>
  mov    %eax,%ebp
  cmp    $0xa,%al
  je     L942
  movsbl %al,%edi
  call   <isalnum@plt>
  test   %eax,%eax
  je     L942
  mov    %bpl,(%rbx)
  add    $0x1,%rbx
  cmp    %rbx,0x8(%rsp)
  jne    L942
  movb   $0x0,0x146(%rsp)
  nop
L441:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L441
  cmpb   $0x0,0x1d(%rsp)
  je     L34
  cmpb   $0x0,0x1e(%rsp)
  je     L499
  cmpb   $0x0,0x1f(%rsp)
  jne    L29
  lea    0x120(%rsp),%rax
  lea    0xe0(%rsp),%rdi
  mov    %rax,%rsi
  call   <strcpy@plt>
  lea    0x140(%rsp),%rsi
  lea    0x100(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x28(%rsp),%rsi
  lea    0x54(%rsp),%rdi
  call   <strcpy@plt>
  movzbl 0x1e(%rsp),%eax
  mov    %al,0x1f(%rsp)
  jmp    L127
L59:
  movb   $0x0,0x134(%rsp)
L305:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  je     L963
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L305
  jmp    L963
L477:
  movb   $0x0,0x154(%rsp)
L397:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  je     L577
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L397
  jmp    L577
L806:
  lea    0x100(%rsp),%rsi
  lea    0x140(%rsp),%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L639
  mov    0x28(%rsp),%rdi
  lea    0x54(%rsp),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L639
  mov    $0x3,%ebx
  jmp    L121
L34:
  mov    0x8(%rsp),%rdi
  lea    0x120(%rsp),%rax
  mov    %rax,%rsi
  call   <strcpy@plt>
  lea    0x140(%rsp),%rsi
  lea    0x80(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x28(%rsp),%rsi
  lea    0x48(%rsp),%rdi
  call   <strcpy@plt>
L127:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  movb   $0x1,0x1d(%rsp)
  jmp    L67
L864:
  mov    0x18(%rsp),%ecx
  lea    D226(%rip),%rdi
  xor    %eax,%eax
  lea    0x100(%rsp),%rdx
  lea    0xe0(%rsp),%rsi
  call   <printf@plt>
  jmp    L68
L49:
  mov    0x20(%rsp),%ecx
  lea    D226(%rip),%rdi
  xor    %eax,%eax
  lea    0xc0(%rsp),%rdx
  lea    0xa0(%rsp),%rsi
  call   <printf@plt>
  jmp    L476
L600:
  mov    0x24(%rsp),%ecx
  lea    0x60(%rsp),%rsi
  lea    D226(%rip),%rdi
  xor    %eax,%eax
  lea    0x80(%rsp),%rdx
  call   <printf@plt>
  jmp    L837
L29:
  lea    D192(%rip),%rdi
  call   <puts@plt>
  movzbl 0x1f(%rsp),%eax
  mov    %al,0x1e(%rsp)
  jmp    L127
L190:
  mov    0x28(%rsp),%r14
  jmp    L729
L585:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    $0x2,%esi
  lea    D555(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    0xc0(%rsp),%rdx
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  lea    0xa0(%rsp),%rsi
  call   <printf@plt>
  mov    0x20(%rsp),%r14d
  jmp    L1066
L370:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%esi
  lea    D555(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x8(%rsp),%rsi
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  lea    0x80(%rsp),%rdx
  call   <printf@plt>
  mov    0x24(%rsp),%r14d
  jmp    L1066
L927:
  movl   $0xffffffff,0x38(%rsp)
  lea    D333(%rip),%r14
  lea    0x38(%rsp),%rbx
  cs nopw 0x0(%rax,%rax,1)
L282:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  js     L282
  cmpl   $0x1,0x10(%rsp)
  je     L1106
  cmpl   $0x2,0x10(%rsp)
  je     L728
  add    %eax,0x18(%rsp)
  jmp    L149
L499:
  lea    0x120(%rsp),%rax
  lea    0xa0(%rsp),%rdi
  mov    %rax,%rsi
  call   <strcpy@plt>
  lea    0x140(%rsp),%rsi
  lea    0xc0(%rsp),%rdi
  call   <strcpy@plt>
  mov    0x28(%rsp),%rsi
  lea    0x4e(%rsp),%rdi
  call   <strcpy@plt>
  movzbl 0x1d(%rsp),%eax
  mov    %al,0x1e(%rsp)
  jmp    L127
L138:
  movl   $0xffffffff,0x38(%rsp)
  lea    0x38(%rsp),%rbx
  nopl   0x0(%rax)
L428:
  lea    D474(%rip),%rdi
  call   <puts@plt>
  lea    D236(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x38(%rsp),%eax
  test   %eax,%eax
  js     L428
  cmp    %eax,%r14d
  jl     L428
  cmpl   $0x1,0x10(%rsp)
  je     L1101
  cmpl   $0x2,0x10(%rsp)
  je     L860
  sub    %eax,0x18(%rsp)
  jmp    L149
L1106:
  add    %eax,0x24(%rsp)
  jmp    L149
L833:
  cmpb   $0x1,0x1e(%rsp)
  je     L246
L296:
  lea    D100(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L149
L1101:
  sub    %eax,0x24(%rsp)
  jmp    L149
L728:
  add    %eax,0x20(%rsp)
  jmp    L149
L1104:
  cmpb   $0x1,0x1d(%rsp)
  jne    L296
  jmp    L246
L860:
  sub    %eax,0x20(%rsp)
  jmp    L149
L453:
  sub    %eax,0x24(%rsp)
  mov    0x24(%rsp),%esi
  lea    D412(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L796
L594:
  mov    0x38(%rsp),%ecx
  add    %ecx,0x20(%rsp)
  lea    D547(%rip),%rdi
  xor    %eax,%eax
  mov    0x20(%rsp),%esi
  call   <printf@plt>
  jmp    L149
L890:
  mov    0x38(%rsp),%ecx
  add    %ecx,0x24(%rsp)
  lea    D412(%rip),%rdi
  xor    %eax,%eax
  mov    0x24(%rsp),%esi
  call   <printf@plt>
  jmp    L149
L96:
  sub    %eax,0x20(%rsp)
  mov    0x20(%rsp),%esi
  lea    D547(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L796
L398:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D474
type_infered: string
name: retrieve_data
arguments: tag: D216
type_infered: string
name: retrieve_data
arguments: tag: D553
type_infered: string
name: retrieve_data
arguments: tag: D512
type_infered: string
name: retrieve_data
arguments: tag: D609
type_infered: string
name: retrieve_data
arguments: tag: D411
type_infered: string
name: retrieve_data
arguments: tag: D32
type_infered: string
name: retrieve_data
arguments: tag: D608
type_infered: string
name: retrieve_data
arguments: tag: D168
type_infered: string
name: retrieve_data
arguments: tag: D416
type_infered: string
name: retrieve_data
arguments: tag: D464
type_infered: string
name: retrieve_data
arguments: tag: D124
type_infered: string
name: retrieve_data
arguments: tag: D161
type_infered: string
name: retrieve_data
arguments: tag: D436
type_infered: string
name: retrieve_data
arguments: tag: D144
type_infered: string
name: retrieve_data
arguments: tag: D555
type_infered: string
name: retrieve_data
arguments: tag: D63
type_infered: string
name: retrieve_data
arguments: tag: D569
type_infered: string
name: retrieve_data
arguments: tag: D115
type_infered: string
name: retrieve_data
arguments: tag: D13
type_infered: string
name: retrieve_data
arguments: tag: D607
type_infered: string
name: retrieve_data
arguments: tag: D501
type_infered: string
name: retrieve_data
arguments: tag: D577
type_infered: string
name: retrieve_data
arguments: tag: D284
type_infered: string
name: retrieve_data
arguments: tag: D305
type_infered: string
name: retrieve_data
arguments: tag: D0
type_infered: string
name: retrieve_data
arguments: tag: D226
type_infered: string
name: retrieve_data
arguments: tag: D192
type_infered: string
name: retrieve_data
arguments: tag: D333
type_infered: string
name: retrieve_data
arguments: tag: D236
type_infered: string
name: retrieve_data
arguments: tag: D100
type_infered: string
name: retrieve_data
arguments: tag: D412
type_infered: string
name: retrieve_data
arguments: tag: D547
type_infered: string

tool: D474: ----------

tool: D216: Enter 3 to end the program.

tool: D553: %d

tool: D512: Welcome to bank.c!

tool: D609: Enter 1 to log in.

tool: D411: Enter 2 to create an account.

tool: D32: 
-------------------------

tool: D608: -------------------------

tool: D168: 
|First	|Last	|Value	|

tool: D416: ~Login~

tool: D464: First Name: 

tool: D124: Last Name: 

tool: D161: Password: 

tool: D436: Enter 4 to transfer money to another account.

tool: D144: Login sucessful!

tool: D555: Account #%d


tool: D63: %s %s

tool: D569: 
Ballance: $%d


tool: D115: Enter 1 to log out.

tool: D13: Enter 2 to deposit money to your account.

tool: D607: Enter 3 to retrieve money from your account.

tool: D501: Tranfer: 

tool: D577: To account: 

tool: D284: Acc #3: %d


tool: D305: An account with that first name, last name, and password does not exist.

tool: D0: ~New Account~

tool: D226: 
|%s	|%s	|%d	|

tool: D192: Sorry, there are no more accounts availible.

tool: D333: Deposit: 

tool: D236: Retrieve: 

tool: D100: The specified account does not exist.

tool: D412: Acc #1: %d


tool: D547: Acc #2: %d


assistant: ```c
void main() {
  char first1[20], last1[20], first2[20], last2[20], first3[20], last3[20];
  char pass1[6], pass2[6], pass3[6];
  char firstc[20], lastc[20], passc[6];
  int val1 = 0, val2 = 0, val3 = 0;
  int change;
  char acc1 = 0, acc2 = 0, acc3 = 0;
  int curacc, curval;
  int accountloop = 1;
  int accountcmd = -1;
  int actionloop;
  int actioncmd = -1;
  int request;
  int accr;
  char let;
  printf("----------\n");
  printf("Welcome to bank.c!\n");
  printf("----------\n");
  sleep((unsigned int)2);
  while (accountloop == 1) {
    sleep((unsigned int)4);
    clrscr();
    printf("----------\n");
    curacc = 0;
    for (accountcmd = -1; accountcmd <= 0;) {
      printf("Enter 1 to log in.\n");
      printf("Enter 2 to create an account.\n");
      printf("Enter 3 to end the program.\n");
      scanf("%d", &accountcmd);
    }
    if (accountcmd == 1) {
      printf("----------\n");
      printf("~Login~\n");
      printf("----------\n");
      printf("First Name: ");
      request = 0;
      getchar();
      while (((let = getchar()) != '\n') && (request < 20)) {
        firstc[request] = let;
        request += 1;
      }
      firstc[request] = '\0';
      if (request >= 20)
        while ((let = getchar()) != '\n') {
        }
      printf("Last Name: ");
      request = 0;
      while (((let = getchar()) != '\n') && (request < 20)) {
        lastc[request] = let;
        request += 1;
      }
      lastc[request] = '\0';
      if (request >= 20)
        while ((let = getchar()) != '\n') {
        }
      printf("Password: ");
      request = 0;
      while (request < 6) {
        while (((let = getchar()) == '\n') || (isalnum(let) == 0)) {
        }
        passc[request] = let;
        request += 1;
      }
      lastc[request] = '\0';
      if (request >= 6)
        while ((let = getchar()) != '\n') {
        }
      else
        let = getchar();
      if ((strcmp(firstc, first1) == 0) && (strcmp(lastc, last1) == 0) && (strcmp(passc, pass1) == 0)) {
        curacc = 1;
        curval = val1;
      } else if ((strcmp(firstc, first2) == 0) && (strcmp(lastc, last2) == 0) && (strcmp(passc, pass2) == 0)) {
        curacc = 2;
        curval = val2;
      } else if ((strcmp(firstc, first3) == 0) && (strcmp(lastc, last3) == 0) && (strcmp(passc, pass3) == 0)) {
        curacc = 3;
        curval = val3;
      }
      if ((curacc > 0) && (curacc < 4)) {
        printf("----------\n");
        printf("Login sucessful!\n");
        printf("----------\n");
        actionloop = 1;
        while (actionloop == 1) {
          sleep((unsigned int)4);
          clrscr();
          if (curacc == 1)
            curval = val1;
          else if (curacc == 2)
            curval = val2;
          else if (curacc == 3)
            curval = val3;
          printf("----------\n");
          printf("Account #%d\n", curacc);
          if (curacc == 1)
            printf("%s %s", first1, last1);
          else if (curacc == 2)
            printf("%s %s", first2, last2);
          else if (curacc == 3)
            printf("%s %s", first3, last3);
          printf("\nBallance: $%d\n", curval);
          printf("----------\n");
          for (actioncmd = -1; actioncmd <= 0;) {
            printf("Enter 1 to log out.\n");
            printf("Enter 2 to deposit money to your account.\n");
            printf("Enter 3 to retrieve money from your account.\n");
            printf("Enter 4 to transfer money to another account.\n");
            scanf("%d", &actioncmd);
          }
          if (actioncmd == 1) {
            actionloop = 0;
          } else if (actioncmd == 2) {
            for (change = -1; change < 0;) {
              printf("----------\n");
              printf("Deposit: ");
              scanf("%d", &change);
            }
            if (curacc == 1)
              val1 += change;
            else if (curacc == 2)
              val2 += change;
            else if (curacc == 3)
              val3 += change;
          } else if (actioncmd == 3) {
            for (change = -1; (change < 0) || ((curval - abs(change)) < 0);) {
              printf("----------\n");
              printf("Retrieve: ");
              scanf("%d", &change);
            }
            if (curacc == 1)
              val1 -= change;
            else if (curacc == 2)
              val2 -= change;
            else if (curacc == 3)
              val3 -= change;
          } else if (actioncmd == 4) {
            for (change = -1; (change < 0) || ((curval - abs(change)) < 0);) {
              printf("----------\n");
              printf("Tranfer: ");
              scanf("%d", &change);
            }
            for (accr = -1; (accr < 0) || (accr > 4) || (accr == curacc);) {
              printf("----------\n");
              printf("To account: ");
              scanf("%d", &accr);
            }
            printf("----------\n");
            if (((accr == 1) && (acc1 == 1)) || ((accr == 2) && (acc2 == 1)) || ((accr == 3) && (acc3 == 1))) {
              if (curacc == 1) {
                val1 -= change;
                printf("Acc #1: %d\n", val1);
              } else if (curacc == 2) {
                val2 -= change;
                printf("Acc #2: %d\n", val2);
              } else if (curacc == 3) {
                val3 -= change;
                printf("Acc #3: %d\n", val3);
              }
              if (accr == 1) {
                val1 += change;
                printf("Acc #1: %d\n", val1);
              } else if (accr == 2) {
                val2 += change;
                printf("Acc #2: %d\n", val2);
              } else if (accr == 3) {
                val3 += change;
                printf("Acc #3: %d\n", val3);
              }
            } else {
              printf("The specified account does not exist.");
            }
          }
        }
      } else {
        printf("An account with that first name, last name, and password does not exist.\n");
      }
      printf("----------\n");
    } else if (accountcmd == 2) {
      printf("----------\n");
      printf("~New Account~\n");
      printf("----------\n");
      printf("First Name: ");
      request = 0;
      getchar();
      while (((let = getchar()) != '\n') && (request < 20)) {
        firstc[request] = let;
        request += 1;
      }
      firstc[request] = '\0';
      if (request >= 20)
        while ((let = getchar()) != '\n') {
        }
      printf("Last Name: ");
      request = 0;
      while (((let = getchar()) != '\n') && (request < 20)) {
        lastc[request] = let;
        request += 1;
      }
      lastc[request] = '\0';
      if (request >= 20)
        while ((let = getchar()) != '\n') {
        }
      printf("Password: ");
      request = 0;
      while (request < 6) {
        while (((let = getchar()) == '\n') || (isalnum(let) == 0)) {
        }
        passc[request] = let;
        request += 1;
      }
      lastc[request] = '\0';
      if (request >= 6)
        while ((let = getchar()) != '\n') {
        }
      else
        let = getchar();
      if (acc1 == 0) {
        strcpy(first1, firstc);
        strcpy(last1, lastc);
        strcpy(pass1, passc);
        acc1 = 1;
      } else if (acc2 == 0) {
        strcpy(first2, firstc);
        strcpy(last2, lastc);
        strcpy(pass2, passc);
        acc2 = 1;
      } else if (acc3 == 0) {
        strcpy(first3, firstc);
        strcpy(last3, lastc);
        strcpy(pass3, passc);
        acc3 = 1;
      } else {
        printf("Sorry, there are no more accounts availible.\n");
      }
      printf("----------\n");
    } else if (accountcmd == 3) {
      printf("----------\n");
      accountloop = 0;
    }
  }
  printf("-------------------------");
  printf("\n|First\t|Last\t|Value\t|");
  printf("\n-------------------------");
  if (acc1 == 1) {
    printf("\n|%s\t|%s\t|%d\t|", first1, last1, val1);
  }
  if (acc2 == 1) {
    printf("\n|%s\t|%s\t|%d\t|", first2, last2, val2);
  }
  if (acc3 == 1) {
    printf("\n|%s\t|%s\t|%d\t|", first3, last3, val3);
  }
  printf("\n-------------------------");
}
```