#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*/ free(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
void imprimirELibertarCaminho(int *caminho, int n) {
  for (int i = 0; i < n; ++i) {
    if (i) {
      printf(" -> ");
    }
    printf("%d", caminho[i]);
  }
  puts("");
  free(caminho);
}


x86 assembly (clang, -O0):
<imprimirELibertarCaminho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1191 <imprimirELibertarCaminho+0x61>
cmpl   $0x0,-0x10(%rbp)
je     116a <imprimirELibertarCaminho+0x3a>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <imprimirELibertarCaminho+0x16>
lea    0xe6c(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimirELibertarCaminho>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%r12
test   %esi,%esi
jle    1191 <imprimirELibertarCaminho+0x61>
mov    %esi,%ebp
mov    (%r12),%esi
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%ebp
je     1191 <imprimirELibertarCaminho+0x61>
mov    %ebp,%ebp
mov    $0x1,%ebx
lea    0xe9a(%rip),%r14
lea    0xe98(%rip),%r15
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1170 <imprimirELibertarCaminho+0x40>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r12,%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" -> \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [1 x i8] zeroinitializer
define void @imprimirELibertarCaminho(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %22, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %25
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %10
%16 = load i32*, i32** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %15
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %6
25: ; preds = %6
%26 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%27 = load i32*, i32** %3
%28 = call i32 @free(i32* %27)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" -> \00"
@.str.1 = [3 x i8] c"%d\00"
define void @imprimirELibertarCaminho(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = load i32, i32* %0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = icmp eq i32 %1, 1
br i1 %8, label %9, label %12
9: ; preds = %12, %4, %2
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @free(i32* %0)
ret void
12: ; preds = %4, %12
%13 = phi i64 [ %18, %12 ], [ 1, %4 ]
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds i32, i32* %0, i64 %13
%16 = load i32, i32* %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = add nuw nsw i64 %13, 1
%19 = icmp eq i64 %18, %5
br i1 %19, label %9, label %12
}