#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 print_scc(int **scc_s) {
  for (int i = 1; i <= scc_s[0][0]; i++) {
    for (int j = 1; j <= scc_s[i][0]; j++) {
      printf("[%d] ", scc_s[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_scc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
cmp    (%rcx),%eax
jg     119e <print_scc+0x8e>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
cmp    (%rcx),%eax
jg     1182 <print_scc+0x72>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113c <print_scc+0x2c>
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_scc+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_scc>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    (%rdi),%rax
cmpl   $0x0,(%rax)
jle    11a0 <print_scc+0x80>
mov    %rdi,%r15
mov    $0x1,%r12d
lea    0xec0(%rip),%r14
jmp    116d <print_scc+0x4d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r12),%rax
mov    (%r15),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%r12
mov    %rax,%r12
jge    11a0 <print_scc+0x80>
mov    (%r15,%r12,8),%rax
cmpl   $0x0,(%rax)
jle    1150 <print_scc+0x30>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x4(%rax,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15,%r12,8),%rax
movslq (%rax),%rcx
add    $0x1,%rbx
cmp    %rcx,%rbx
jl     1180 <print_scc+0x60>
jmp    1150 <print_scc+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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