#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*/ dictionary_trim_double_bracked_string(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void element_hidden_output(FILE *output_file, char *name, char *data, int row) {
  if (!data)
    data = "";
  if (row == -1) {
    fprintf(output_file, "%s", name);
  } else {
    fprintf(output_file, "%s_%d", name, row);
  }
  fprintf(output_file, "%c%s\n", '~',
          dictionary_trim_double_bracked_string(data));
}


x86 assembly (clang, -O0):
<element_hidden_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114d <element_hidden_output+0x2d>
lea    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    1172 <element_hidden_output+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    118b <element_hidden_output+0x6b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <dictionary_trim_double_bracked_string@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%ecx
lea    0xe60(%rip),%rsi
mov    $0x7e,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<element_hidden_output>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%r14
cmp    $0xffffffff,%ecx
je     1155 <element_hidden_output+0x25>
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1160 <element_hidden_output+0x30>
mov    %rdx,%rdi
mov    %r14,%rsi
call   1030 <fputs@plt>
test   %rbx,%rbx
lea    0xea1(%rip),%rdi
cmovne %rbx,%rdi
call   1050 <dictionary_trim_double_bracked_string@plt>
lea    0xe8c(%rip),%rsi
mov    %r14,%rdi
mov    $0x7e,%edx
mov    %eax,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [6 x i8] c"%s_%d\00"
@.str.3 = [6 x i8] c"%c%s\0A\00"
define void @element_hidden_output(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %7
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %7
br label %12
12: ; preds = %11, %4
%13 = load i32, i32* %8
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32*, i32** %5
%17 = load i8*, i8** %6
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
br label %24
19: ; preds = %12
%20 = load i32*, i32** %5
%21 = load i8*, i8** %6
%22 = load i32, i32* %8
%23 = call i32 (i32*, i8*, ...) @fprintf(i32* %20, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %21, i32 %22)
br label %24
24: ; preds = %19, %15
%25 = load i32*, i32** %5
%26 = load i8*, i8** %7
%27 = call i32 @dictionary_trim_double_bracked_string(i8* %26)
%28 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 126, i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.2 = [6 x i8] c"%s_%d\00"
@.str.3 = [6 x i8] c"%c%s\0A\00"
define void @element_hidden_output(i32* nocapture %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %3, -1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @fputs(i8* %1, i32* %0)
br label %10
8: ; preds = %4
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %1, i32 %3)
br label %10
10: ; preds = %8, %6
%11 = icmp eq i8* %2, null
%12 = select i1 %11, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %2
%13 = tail call i32 @dictionary_trim_double_bracked_string(i8* %12)
%14 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 126, i32 %13)
ret void
}