#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ folderview_print_structure(int /*<<< orphan*/ *,
                                              char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, ...);
int /*<<< orphan*/ icon_print(int /*<<< orphan*/ *, char *, char *, char *);
void folderview_print_item(FILE *out, const char *prev, const char *url,
                           const char *label) {
  folderview_print_structure(out, prev);
  fprintf(out, "<a href=\"%s\">", url);
  icon_print(out, "", "folder", "Goto Folder");
  fprintf(out, "</a>%s<a href=\"%s\">%s</a><br>\n", *prev ? "&nbsp;" : "", url,
          label);
}


x86 assembly (clang, -O0):
<folderview_print_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <folderview_print_structure@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    0xe91(%rip),%rdx
lea    0xe91(%rip),%rcx
call   1030 <icon_print@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
lea    0xea4(%rip),%rdx
lea    0xe9e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe69(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<folderview_print_item>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1040 <folderview_print_structure@plt>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xeda(%rip),%r13
lea    0xea2(%rip),%rdx
lea    0xea2(%rip),%rcx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <icon_print@plt>
cmpb   $0x0,(%r12)
lea    0xeb6(%rip),%rdx
cmove  %r13,%rdx
lea    0xe8c(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rcx
mov    %r14,%r8
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"<a href=\22%s\22>\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [7 x i8] c"folder\00"
@.str.3 = [12 x i8] c"Goto Folder\00"
@.str.4 = [31 x i8] c"</a>%s<a href=\22%s\22>%s</a><br>\0A\00"
@.str.5 = [7 x i8] c"&nbsp;\00"
define void @folderview_print_item(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = call i32 @folderview_print_structure(i32* %9, i8* %10)
%12 = load i32*, i32** %5
%13 = load i8*, i8** %7
%14 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i32*, i32** %5
%16 = call i32 @icon_print(i32* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32*, i32** %5
%18 = load i8*, i8** %6
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 0
%22 = zext i1 %21 to i64
%23 = select i1 %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
%24 = load i8*, i8** %7
%25 = load i8*, i8** %8
%26 = call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %23, i8* %24, i8* %25)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"<a href=\22%s\22>\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [7 x i8] c"folder\00"
@.str.3 = [12 x i8] c"Goto Folder\00"
@.str.4 = [31 x i8] c"</a>%s<a href=\22%s\22>%s</a><br>\0A\00"
@.str.5 = [7 x i8] c"&nbsp;\00"
define void @folderview_print_item(i32* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @folderview_print_structure(i32* %0, i8* %1)
%6 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = tail call i32 @icon_print(i32* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%8 = load i8, i8* %1
%9 = icmp eq i8 %8, 0
%10 = select i1 %9, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%11 = tail call i32 (i32*, i8*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %10, i8* %2, i8* %3)
ret void
}