#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 */
struct token_list {
  int dummy;
};

/* Variables and functions */
struct token_list *emit(char *, struct token_list *);
struct token_list *uniqueID(char *s, struct token_list *l, char *num) {
  l = emit(s, l);
  l = emit("_", l);
  l = emit(num, l);
  l = emit("\n", l);
  return l;
}


x86 assembly (clang, -O0):
<uniqueID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <emit@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1030 <emit@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <emit@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1030 <emit@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniqueID>:
push   %rbx
mov    %rdx,%rbx
call   1030 <emit@plt>
lea    0xee0(%rip),%rdi
mov    %rax,%rsi
call   1030 <emit@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <emit@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <emit@plt>

LLVM IR (-O0):
%struct.token_list = type { i32 }
@.str = [2 x i8] c"_\00"
@.str.1 = [2 x i8] c"\0A\00"
define %struct.token_list* @uniqueID(i8* %0, %struct.token_list* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.token_list*
%6 = alloca i8*
store i8* %0, i8** %4
store %struct.token_list* %1, %struct.token_list** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load %struct.token_list*, %struct.token_list** %5
%9 = call %struct.token_list* @emit(i8* %7, %struct.token_list* %8)
store %struct.token_list* %9, %struct.token_list** %5
%10 = load %struct.token_list*, %struct.token_list** %5
%11 = call %struct.token_list* @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.token_list* %10)
store %struct.token_list* %11, %struct.token_list** %5
%12 = load i8*, i8** %6
%13 = load %struct.token_list*, %struct.token_list** %5
%14 = call %struct.token_list* @emit(i8* %12, %struct.token_list* %13)
store %struct.token_list* %14, %struct.token_list** %5
%15 = load %struct.token_list*, %struct.token_list** %5
%16 = call %struct.token_list* @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %struct.token_list* %15)
store %struct.token_list* %16, %struct.token_list** %5
%17 = load %struct.token_list*, %struct.token_list** %5
ret %struct.token_list* %17
}

LLVM IR (-O2):
%struct.token_list = type { i32 }
@.str = [2 x i8] c"_\00"
@.str.1 = [2 x i8] c"\0A\00"
define %struct.token_list* @uniqueID(i8* %0, %struct.token_list* %1, i8* %2) {
%4 = tail call %struct.token_list* @emit(i8* %0, %struct.token_list* %1)
%5 = tail call %struct.token_list* @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %struct.token_list* %4)
%6 = tail call %struct.token_list* @emit(i8* %2, %struct.token_list* %5)
%7 = tail call %struct.token_list* @emit(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %struct.token_list* %6)
ret %struct.token_list* %7
}