#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 binary_exponential_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_filepath_macro(struct binary_exponential_buffer *,
                                      unsigned char *);
int /*<<< orphan*/
add_string_to_binary_exponential_buffer(void *,
                                        struct binary_exponential_buffer *);
void add_define_include_guard(struct binary_exponential_buffer *output,
                              unsigned char *filename) {
  add_string_to_binary_exponential_buffer((void *)"#define ", output);
  add_filepath_macro(output, filename);
  add_string_to_binary_exponential_buffer((void *)"\n", output);
}


x86 assembly (clang, -O0):
<add_define_include_guard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <add_string_to_binary_exponential_buffer@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <add_filepath_macro@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1040 <add_string_to_binary_exponential_buffer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_define_include_guard>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <add_string_to_binary_exponential_buffer@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <add_filepath_macro@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <add_string_to_binary_exponential_buffer@plt>

LLVM IR (-O0):
%struct.binary_exponential_buffer = type { i32 }
@.str = [9 x i8] c"#define \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @add_define_include_guard(%struct.binary_exponential_buffer* %0, i8* %1) {
%3 = alloca %struct.binary_exponential_buffer*
%4 = alloca i8*
store %struct.binary_exponential_buffer* %0, %struct.binary_exponential_buffer** %3
store i8* %1, i8** %4
%5 = load %struct.binary_exponential_buffer*, %struct.binary_exponential_buffer** %3
%6 = call i32 @add_string_to_binary_exponential_buffer(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.binary_exponential_buffer* %5)
%7 = load %struct.binary_exponential_buffer*, %struct.binary_exponential_buffer** %3
%8 = load i8*, i8** %4
%9 = call i32 @add_filepath_macro(%struct.binary_exponential_buffer* %7, i8* %8)
%10 = load %struct.binary_exponential_buffer*, %struct.binary_exponential_buffer** %3
%11 = call i32 @add_string_to_binary_exponential_buffer(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %struct.binary_exponential_buffer* %10)
ret void
}

LLVM IR (-O2):
%struct.binary_exponential_buffer = type { i32 }
@.str = [9 x i8] c"#define \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @add_define_include_guard(%struct.binary_exponential_buffer* %0, i8* %1) {
%3 = tail call i32 @add_string_to_binary_exponential_buffer(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.binary_exponential_buffer* %0)
%4 = tail call i32 @add_filepath_macro(%struct.binary_exponential_buffer* %0, i8* %1)
%5 = tail call i32 @add_string_to_binary_exponential_buffer(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %struct.binary_exponential_buffer* %0)
ret void
}