#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*/ format_initial_capital(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *,
                           int /*<<< orphan*/, char *);
void element_anchor_output(FILE *output_file, char *prompt, char *href) {
  char output_string[1024];
  static int offset = 1;
  format_initial_capital(output_string, prompt);
  fprintf(output_file, "<td><a href=\"%s\" target=anchor_%d>%s</a></td>\n",
          href, offset++, output_string);
}


x86 assembly (clang, -O0):
<element_anchor_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <format_initial_capital@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    0x2edb(%rip),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x2ed0(%rip)
lea    -0x420(%rbp),%r8
lea    0xe92(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_anchor_output>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
call   1030 <format_initial_capital@plt>
mov    0x2eed(%rip),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x2ee4(%rip)
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
mov    %r15,%r8
call   1040 <fprintf@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@element_anchor_output.offset = internal global i32 1
@.str = [47 x i8] c"<td><a href=\22%s\22 target=anchor_%d>%s</a></td>\0A\00"
define void @element_anchor_output(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @format_initial_capital(i8* %8, i8* %9)
%11 = load i32*, i32** %4
%12 = load i8*, i8** %6
%13 = load i32, i32* @element_anchor_output.offset
%14 = add nsw i32 %13, 1
store i32 %14, i32* @element_anchor_output.offset
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13, i8* %15)
ret void
}

LLVM IR (-O2):
@element_anchor_output.offset = internal unnamed_addr global i32 1
@.str = [47 x i8] c"<td><a href=\22%s\22 target=anchor_%d>%s</a></td>\0A\00"
define void @element_anchor_output(i32* nocapture %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @format_initial_capital(i8* %5, i8* %1)
%7 = load i32, i32* @element_anchor_output.offset
%8 = add nsw i32 %7, 1
store i32 %8, i32* @element_anchor_output.offset
%9 = call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %7, i8* %5)
ret void
}