user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    D67(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D10(%rip),%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rbp
L158:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  sub    $0x2,%eax
  cmp    $0x61,%eax
  ja     L7
L137:
  lea    0x1c(%rsp),%rbp
  lea    D67(%rip),%r12
  xchg   %ax,%ax
L48:
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  sub    $0x5,%eax
  cmp    $0x2d,%eax
  ja     L39
L59:
  mov    0x18(%rsp),%eax
  xor    %r15d,%r15d
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x8(%rsp)
  test   %eax,%eax
  movl   $0x0,0x4(%rsp)
  jle    L85
  xor    %ebx,%ebx
  lea    0x24(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    0x17(%rsp),%r12
  lea    D8(%rip),%rbp
  jmp    L202
  xchg   %ax,%ax
L146:
  cmp    $0x48,%al
  je     L29
L123:
  add    $0x1,%ebx
  cmp    %ebx,0x18(%rsp)
  jle    L85
L202:
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movzbl 0x17(%rsp),%eax
  cmp    $0x53,%al
  je     L209
  cmp    $0x54,%al
  jne    L146
  mov    0x1c(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <jeTrokut@plt>
  cmp    $0x1,%eax
  je     L26
L61:
  test   %eax,%eax
  jne    L123
  add    0x24(%rsp),%r15d
  add    $0x1,%ebx
  cmp    %ebx,0x18(%rsp)
  jg     L202
  nopl   (%rax)
L85:
  lea    D27(%rip),%rdi
  pxor   %xmm0,%xmm0
  mov    $0x1,%eax
  cvtsi2sd %r15d,%xmm0
  divsd  D24(%rip),%xmm0
  call   <printf@plt>
  mov    0x8(%rsp),%ecx
  mov    0xc(%rsp),%edx
  xor    %eax,%eax
  mov    0x4(%rsp),%esi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L135
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L39:
  mov    %r12,%rdi
  call   <puts@plt>
  mov    0x1c(%rsp),%eax
  sub    $0x5,%eax
  cmp    $0x2d,%eax
  ja     L48
  jmp    L59
  nopl   (%rax)
L7:
  mov    %r12,%rdi
  call   <puts@plt>
  mov    0x18(%rsp),%eax
  sub    $0x2,%eax
  cmp    $0x61,%eax
  ja     L158
  jmp    L137
  nopl   (%rax)
L209:
  mov    0x1c(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <jeSlapica@plt>
  cmp    $0x1,%eax
  jne    L61
  addl   $0x1,0xc(%rsp)
  jmp    L123
  nopl   0x0(%rax,%rax,1)
L29:
  mov    0x1c(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <jeHambi@plt>
  cmp    $0x1,%eax
  jne    L61
  addl   $0x1,0x4(%rsp)
  jmp    L123
L26:
  addl   $0x1,0x8(%rsp)
  jmp    L123
L135:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D67
type: string
name: disassemble_data
arguments: tag: D10
type: string
name: disassemble_data
arguments: tag: D8
type: string
name: disassemble_data
arguments: tag: D27
type: string
name: disassemble_data
arguments: tag: D24
type: f64
name: disassemble_data
arguments: tag: D4
type: string

tool: D67: Nepravilan unos!

tool: D10: %d

tool: D8:  %c %d%d

tool: D27: Poklonit ce %.2f kg peciva.


tool: D24: 1000

tool: D4: U automatu ce biti %d hambi peciva, %d slapica i %d sir-trokuta.

assistant: ```c
int main() {
  int i, brPeciva, promjerRupe, opseg, tezina, prolazi, H_br = 0, T_br = 0, S_br = 0, poklon = 0;
  char vrstaPeciva;
  do {
    scanf("%d", &brPeciva);
    if (brPeciva <= 1 || brPeciva >= 100)
      printf("Nepravilan unos!\n");
  } while (brPeciva <= 1 || brPeciva >= 100);
  do {
    scanf("%d", &promjerRupe);
    if (promjerRupe < 5 || promjerRupe > 50)
      printf("Nepravilan unos!\n");
  } while (promjerRupe < 5 || promjerRupe > 50);
  for (i = 0; i < brPeciva; i++) {
    scanf(" %c %d%d", &vrstaPeciva, &opseg, &tezina);
    switch (vrstaPeciva) {
    case 'H':
      prolazi = jeHambi(opseg, promjerRupe);
      if (prolazi == 1)
        H_br++;
      else if (prolazi == 0)
        poklon += tezina;
      break;
    case 'T':
      prolazi = jeTrokut(opseg, promjerRupe);
      if (prolazi == 1)
        T_br++;
      else if (prolazi == 0)
        poklon += tezina;
      break;
    case 'S':
      prolazi = jeSlapica(opseg, promjerRupe);
      if (prolazi == 1)
        S_br++;
      else if (prolazi == 0)
        poklon += tezina;
      break;
    default:
      break;
    }
  }
  printf("Poklonit ce %.2f kg peciva.\n", poklon / 1000.00);
  printf("U automatu ce biti %d hambi peciva, %d slapica i %d sir-trokuta.", H_br, S_br, T_br);
  return 0;
}
```