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

```asm
<find_ranlib>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x10000(%rsp),%r11
L6:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L6
  sub    $0x98,%rsp
  mov    %rdi,%rbp
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x10088(%rsp)
  xor    %eax,%eax
  mov    %esi,%edx
  mov    %rdi,%rsi
  lea    D9(%rip),%rdi
  call   <which@plt>
  mov    $0x1,%ebx
  test   %rax,%rax
  je     L16
L56:
  mov    0x10088(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L42
  mov    %ebx,%eax
  add    $0x10098,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  lea    D4(%rip),%r13
  mov    %r13,%rdi
  call   <unlink@plt>
  lea    D23(%rip),%rdx
  lea    D46(%rip),%rbx
  mov    %rbx,%rsi
  lea    D53(%rip),%r15
  mov    %r15,%rdi
  call   <putfile@plt>
  lea    D35(%rip),%rdx
  mov    %rbx,%rsi
  lea    D26(%rip),%r14
  mov    %r14,%rdi
  call   <putfile@plt>
  mov    %rsp,%rbx
  mov    %r12,%rdx
  lea    D24(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  lea    0x80(%rsp),%rsi
  mov    %rbx,%rcx
  mov    $0x10000,%edx
  mov    $0x1,%edi
  call   <msystem@plt>
  mov    %eax,%ebx
  mov    %r15,%rdi
  call   <unlink@plt>
  mov    %r14,%rdi
  call   <unlink@plt>
  mov    %r13,%rdi
  call   <unlink@plt>
  lea    D51(%rip),%rdi
  call   <unlink@plt>
  test   %ebx,%ebx
  je     L29
  mov    $0x0,%ebx
  jmp    L56
L29:
  lea    0x80(%rsp),%rdi
  lea    D48(%rip),%rsi
  call   <STRSTR@plt>
  test   %rax,%rax
  je     L56
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x1,%ebx
  jmp    L56
L42:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D9
datatype: string
name: unpack_data
arguments: tag: D4
datatype: string
name: unpack_data
arguments: tag: D23
datatype: string
name: unpack_data
arguments: tag: D46
datatype: string
name: unpack_data
arguments: tag: D53
datatype: string
name: unpack_data
arguments: tag: D35
datatype: string
name: unpack_data
arguments: tag: D26
datatype: string
name: unpack_data
arguments: tag: D24
datatype: string
name: unpack_data
arguments: tag: D51
datatype: string
name: unpack_data
arguments: tag: D48
datatype: string
name: unpack_data
arguments: tag: D104
datatype: string

tool: D9: ranlib

tool: D4: _.a

tool: D23: sub(){}


tool: D46: w

tool: D53: _.c

tool: D35: _.a:; $(CC) -c _.c
	$(AR) cr _.a _.o
	$(AR) st _.a
	echo SUCCESS


tool: D26: _make

tool: D24: %s -f _make

tool: D51: _.o

tool: D48: SUCCESS

tool: D104: $(AR) st

assistant: ```c
int find_ranlib(char *ranlib, int size, const char *make) {
  char command[128];
  char res[0x10000];
  int rcode;
  if (which("ranlib", ranlib, size))
    return 1;
  unlink("_.a");
  putfile("_.c", "w", "sub(){}\n");
  putfile("_make", "w", "_.a:; $(CC) -c _.c\n\t$(AR) cr _.a _.o\n\t$(AR) st _.a\n\techo SUCCESS\n");
  sprintf(command, "%s -f _make", make);
  rcode = msystem(1, res, sizeof(res), command);
  unlink("_.c");
  unlink("_make");
  unlink("_.a");
  unlink("_.o");
  if (rcode == 0 && STRSTR(res, "SUCCESS")) {
    strcpy(ranlib, "$(AR) st");
    return 1;
  }
  return 0;
}
```