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

```asm
<izracun>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,%eax
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x28(%rbp)
  mov    %ecx,-0x34(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9d,-0x38(%rbp)
  mov    %al,-0x24(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpb   $0x56,-0x24(%rbp)
  jne    L160
  movl   $0x0,-0x18(%rbp)
  jmp    L77
L65:
  movl   $0x0,-0x14(%rbp)
  jmp    L137
L191:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x4d,%al
  jne    L104
  addl   $0x1,-0x10(%rbp)
L104:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x50,%al
  jne    L206
  addl   $0x1,-0xc(%rbp)
L206:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x47,%al
  jne    L59
  addl   $0x1,-0x8(%rbp)
L59:
  addl   $0x1,-0x14(%rbp)
L137:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L191
  addl   $0x1,-0x4(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x10(%rbp)
  jne    L184
  mov    0x10(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xc(%rbp)
  jne    L184
  mov    0x18(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x8(%rbp)
  jne    L184
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  mov    %eax,%esi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L184:
  addl   $0x1,-0x18(%rbp)
L77:
  mov    -0x18(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L65
  jmp    L138
L160:
  cmpb   $0x4f,-0x24(%rbp)
  jne    L138
  movl   $0x0,-0x18(%rbp)
  jmp    L166
L83:
  movl   $0x0,-0x14(%rbp)
  jmp    L118
L40:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x4d,%al
  jne    L132
  addl   $0x1,-0x10(%rbp)
L132:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x50,%al
  jne    L82
  addl   $0x1,-0xc(%rbp)
L82:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  add    %rdx,%rax
  shl    $0x2,%rax
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  cmp    $0x47,%al
  jne    L22
  addl   $0x1,-0x8(%rbp)
L22:
  addl   $0x1,-0x14(%rbp)
L118:
  mov    -0x14(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L40
  addl   $0x1,-0x4(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x10(%rbp)
  jne    L5
  mov    0x10(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0xc(%rbp)
  jne    L5
  mov    0x18(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x8(%rbp)
  jne    L5
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x40(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x4(%rbp),%edx
  mov    %eax,%esi
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L5:
  addl   $0x1,-0x18(%rbp)
L166:
  mov    -0x18(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L83
L138:
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D10
type_guessed: string
name: read_data
arguments: data_label: D19
type_guessed: string

tool: D10: %d. Vodoravno, izmedju retka br. %d i br. %d


tool: D19: %d. Okomito, izmedju stupca br. %d i br. %d


assistant: ```c
void izracun(char orijentacija, char imanje[][100], int visina, int sirina, int *br_podjela, int M, int P, int G) {
  int i, j, tmpM = 0, tmpP = 0, tmpG = 0, granica = 0;
  if (orijentacija == 'V') {
    for (i = 0; i < visina; i++) {
      for (j = 0; j < sirina; j++) {
        if (imanje[i][j] == 'M')
          tmpM++;
        if (imanje[i][j] == 'P')
          tmpP++;
        if (imanje[i][j] == 'G')
          tmpG++;
      }
      granica++;
      if (tmpM == M / 2 && tmpP == P / 2 && tmpG == G / 2) {
        (*br_podjela)++;
        printf("%d. Vodoravno, izmedju retka br. %d i br. %d\n", *br_podjela, granica, granica + 1);
      }
    }
  } else if (orijentacija == 'O') {
    for (i = 0; i < sirina; i++) {
      for (j = 0; j < visina; j++) {
        if (imanje[j][i] == 'M')
          tmpM++;
        if (imanje[j][i] == 'P')
          tmpP++;
        if (imanje[j][i] == 'G')
          tmpG++;
      }
      granica++;
      if (tmpM == M / 2 && tmpP == P / 2 && tmpG == G / 2) {
        (*br_podjela)++;
        printf("%d. Okomito, izmedju stupca br. %d i br. %d\n", *br_podjela, granica, granica + 1);
      }
    }
  }
}
```