#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 *, char *, char *, char *);
void show_binarylc_header(int hdr_size, char ***lc_header) {
  int line;
  for (line = 0; line < hdr_size; line++) {
    printf("%s %s # %s\n", lc_header[line][0], lc_header[line][1],
           lc_header[line][2]);
  }
}


x86 assembly (clang, -O0):
<show_binarylc_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117b <show_binarylc_header+0x6b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x8(%rax),%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    0x10(%rax),%rcx
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <show_binarylc_header+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_binarylc_header>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1150 <show_binarylc_header+0x40>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rax
mov    (%rax),%rsi
mov    0x8(%rax),%rdx
mov    0x10(%rax),%rcx
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <show_binarylc_header+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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