#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*/ printf(char *, ...);
void dump_to_silent_trans_array(int nr_v, int **array) {
  int i;
  int pos;
  printf("To_silent_trans_array_dump:\n");
  for (i = 0; i < nr_v; i++) {
    printf("Transitions from vertex %d: ", i);
    pos = 0;
    while (*(*(array + i) + pos) != -999) {
      printf("%d ", *(*(array + i) + pos));
      pos++;
    }
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_to_silent_trans_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11c0 <dump_to_silent_trans_array+0xb0>
mov    -0x14(%rbp),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0xfffffc19,(%rax,%rcx,4)
je     11a4 <dump_to_silent_trans_array+0x94>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <dump_to_silent_trans_array+0x48>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <dump_to_silent_trans_array+0x24>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_to_silent_trans_array>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%ebx
lea    0xeda(%rip),%rdi
call   1040 <puts@plt>
test   %ebx,%ebx
jle    11cf <dump_to_silent_trans_array+0x9f>
mov    %ebx,%r13d
lea    0xea6(%rip),%r14
lea    0xebc(%rip),%r15
xor    %ebx,%ebx
jmp    1183 <dump_to_silent_trans_array+0x53>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r13,%rbx
je     11cf <dump_to_silent_trans_array+0x9f>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12,%rbx,8),%rax
mov    (%rax),%esi
cmp    $0xfffffc19,%esi
je     1170 <dump_to_silent_trans_array+0x40>
mov    $0x4,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r12,%rbx,8),%rax
mov    (%rax,%rbp,1),%esi
add    $0x4,%rbp
cmp    $0xfffffc19,%esi
jne    11b0 <dump_to_silent_trans_array+0x80>
jmp    1170 <dump_to_silent_trans_array+0x40>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"To_silent_trans_array_dump:\0A\00"
@.str.1 = [29 x i8] c"Transitions from vertex %d: \00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @dump_to_silent_trans_array(i32 %0, i32** %1) {
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32** %1, i32*** %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %8
8: ; preds = %41, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %44
12: ; preds = %8
%13 = load i32, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %13)
store i32 0, i32* %6
br label %15
15: ; preds = %26, %12
%16 = load i32**, i32*** %4
%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 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = icmp ne i32 %24, -999
br i1 %25, label %26, label %39
26: ; preds = %15
%27 = load i32**, i32*** %4
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i32*, i32** %27, i64 %29
%31 = load i32*, i32** %30
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i32, i32* %31, i64 %33
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %15
39: ; preds = %15
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %5
%43 = add nsw i32 %42, 1
store i32 %43, i32* %5
br label %8
44: ; preds = %8
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"Transitions from vertex %d: \00"
@.str.2 = [4 x i8] c"%d \00"
@str = [28 x i8] c"To_silent_trans_array_dump:\00"
define void @dump_to_silent_trans_array(i32 %0, i32** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %28
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %24
%8 = phi i64 [ 0, %5 ], [ %26, %24 ]
%9 = trunc i64 %8 to i32
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds i32*, i32** %1, i64 %8
%12 = load i32*, i32** %11
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, -999
br i1 %14, label %24, label %15
15: ; preds = %7, %15
%16 = phi i64 [ %19, %15 ], [ 0, %7 ]
%17 = phi i32 [ %22, %15 ], [ %13, %7 ]
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = add nuw i64 %16, 1
%20 = load i32*, i32** %11
%21 = getelementptr inbounds i32, i32* %20, i64 %19
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, -999
br i1 %23, label %24, label %15
24: ; preds = %15, %7
%25 = tail call i32 @putchar(i32 10)
%26 = add nuw nsw i64 %8, 1
%27 = icmp eq i64 %26, %6
br i1 %27, label %28, label %7
28: ; preds = %24, %2
%29 = tail call i32 @putchar(i32 10)
ret void
}