#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ verifica_target(char **, int *);
void calcula_target(char maze[23][30], int red[3], int pacman[3],
                    int target[2]) {
  target[0] = (pacman[0] - red[0]) + pacman[0];
  target[1] = (pacman[1] - red[1]) + pacman[1];
  verifica_target(maze, target);
}


x86 assembly (clang, -O0):
<calcula_target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x18(%rbp),%rax
add    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x10(%rbp),%rax
sub    0x4(%rax),%ecx
mov    -0x18(%rbp),%rax
add    0x4(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <verifica_target@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcula_target>:
mov    (%rdx),%eax
add    %eax,%eax
sub    (%rsi),%eax
mov    %eax,(%rcx)
mov    0x4(%rdx),%eax
add    %eax,%eax
sub    0x4(%rsi),%eax
mov    %eax,0x4(%rcx)
mov    %rcx,%rsi
jmp    1030 <verifica_target@plt>

LLVM IR (-O0):
define void @calcula_target([30 x i8]* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca [30 x i8]*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store [30 x i8]* %0, [30 x i8]** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %7
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = load i32*, i32** %6
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = sub nsw i32 %11, %14
%16 = load i32*, i32** %7
%17 = getelementptr inbounds i32, i32* %16, i64 0
%18 = load i32, i32* %17
%19 = add nsw i32 %15, %18
%20 = load i32*, i32** %8
%21 = getelementptr inbounds i32, i32* %20, i64 0
store i32 %19, i32* %21
%22 = load i32*, i32** %7
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = load i32*, i32** %6
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = sub nsw i32 %24, %27
%29 = load i32*, i32** %7
%30 = getelementptr inbounds i32, i32* %29, i64 1
%31 = load i32, i32* %30
%32 = add nsw i32 %28, %31
%33 = load i32*, i32** %8
%34 = getelementptr inbounds i32, i32* %33, i64 1
store i32 %32, i32* %34
%35 = load [30 x i8]*, [30 x i8]** %5
%36 = bitcast [30 x i8]* %35 to i8**
%37 = load i32*, i32** %8
%38 = call i32 @verifica_target(i8** %36, i32* %37)
ret void
}

LLVM IR (-O2):
define void @calcula_target([30 x i8]* %0, i32* nocapture %1, i32* nocapture %2, i32* %3) {
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = shl i32 %5, 1
%8 = sub i32 %7, %6
store i32 %8, i32* %3
%9 = getelementptr inbounds i32, i32* %2, i64 1
%10 = load i32, i32* %9
%11 = getelementptr inbounds i32, i32* %1, i64 1
%12 = load i32, i32* %11
%13 = shl i32 %10, 1
%14 = sub i32 %13, %12
%15 = getelementptr inbounds i32, i32* %3, i64 1
store i32 %14, i32* %15
%16 = bitcast [30 x i8]* %0 to i8**
%17 = tail call i32 @verifica_target(i8** %16, i32* %3)
ret void
}