#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int check_panel_dfs_list(int pnum, char *msg, int jcol, int nseg, int *segrep) {
  register int k;
  printf("(%d) pdgstrf_panel_bmod(%s) jcol %d, nseg %d in top. order ->\n",
         pnum, msg, jcol, nseg);
  for (k = nseg - 1; k >= 0; --k)
    printf("(%d) segrep-%d ", pnum, segrep[k]);
  printf("\n");
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<check_panel_dfs_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1192 <check_panel_dfs_list+0x72>
mov    -0x4(%rbp),%esi
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    115e <check_panel_dfs_list+0x3e>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_panel_dfs_list>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r15
mov    %ecx,%r14d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%ebp
lea    0xeb5(%rip),%rdi
mov    %ebp,%esi
mov    %r14d,%r8d
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jle    118d <check_panel_dfs_list+0x5d>
mov    %r14d,%ebx
add    $0x1,%rbx
lea    0xed5(%rip),%r14
nopw   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
mov    (%r15,%rax,4),%edx
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1170 <check_panel_dfs_list+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"(%d) pdgstrf_panel_bmod(%s) jcol %d, nseg %d in top. order ->\0A\00"
@.str.1 = [16 x i8] c"(%d) segrep-%d \00"
@.str.2 = [2 x i8] c"\0A\00"
@stdout = global i32 0
define i32 @check_panel_dfs_list(i32 %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%12 = load i32, i32* %6
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %13, i32 %14, i32 %15)
%17 = load i32, i32* %9
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %11
br label %19
19: ; preds = %30, %5
%20 = load i32, i32* %11
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %33
22: ; preds = %19
%23 = load i32, i32* %6
%24 = load i32*, i32** %10
%25 = load i32, i32* %11
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = load i32, i32* %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %23, i32 %28)
br label %30
30: ; preds = %22
%31 = load i32, i32* %11
%32 = add nsw i32 %31, -1
store i32 %32, i32* %11
br label %19
33: ; preds = %19
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = call i32 @fflush(i32 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [63 x i8] c"(%d) pdgstrf_panel_bmod(%s) jcol %d, nseg %d in top. order ->\0A\00"
@.str.1 = [16 x i8] c"(%d) segrep-%d \00"
@stdout = global i32 0
define i32 @check_panel_dfs_list(i32 %0, i8* %1, i32 %2, i32 %3, i32* nocapture %4) {
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1, i32 %2, i32 %3)
%7 = icmp sgt i32 %3, 0
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = zext i32 %3 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ %9, %8 ], [ %12, %10 ]
%12 = add nsw i64 %11, -1
%13 = and i64 %12, 4294967295
%14 = getelementptr inbounds i32, i32* %4, i64 %13
%15 = load i32, i32* %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %15)
%17 = icmp ugt i64 %11, 1
br i1 %17, label %10, label %18
18: ; preds = %10, %5
%19 = tail call i32 @putchar(i32 10)
%20 = load i32, i32* @stdout
%21 = tail call i32 @fflush(i32 %20)
ret i32 0
}