#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 */

/* Variables and functions */
int /*<<< orphan*/ chaz_ConfWriter_add_def(char *, char *);
int /*<<< orphan*/ chaz_ConfWriter_end_module();
int /*<<< orphan*/ chaz_ConfWriter_start_module(char *);
void chaz_UnusedVars_run(void) {
  chaz_ConfWriter_start_module("UnusedVars");
  chaz_ConfWriter_add_def("UNUSED_VAR(x)", "((void)x)");
  chaz_ConfWriter_add_def("UNREACHABLE_RETURN(type)", "return (type)0");
  chaz_ConfWriter_end_module();
}


x86 assembly (clang, -O0):
<chaz_UnusedVars_run>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xec4(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xec9(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
mov    $0x0,%al
call   1050 <chaz_ConfWriter_end_module@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chaz_UnusedVars_run>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <chaz_ConfWriter_start_module@plt>
lea    0xec7(%rip),%rdi
lea    0xece(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
lea    0xecc(%rip),%rdi
lea    0xede(%rip),%rsi
call   1040 <chaz_ConfWriter_add_def@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <chaz_ConfWriter_end_module@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"UnusedVars\00"
@.str.1 = [14 x i8] c"UNUSED_VAR(x)\00"
@.str.2 = [10 x i8] c"((void)x)\00"
@.str.3 = [25 x i8] c"UNREACHABLE_RETURN(type)\00"
@.str.4 = [15 x i8] c"return (type)0\00"
define void @chaz_UnusedVars_run() {
%1 = call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 (...) @chaz_ConfWriter_end_module()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"UnusedVars\00"
@.str.1 = [14 x i8] c"UNUSED_VAR(x)\00"
@.str.2 = [10 x i8] c"((void)x)\00"
@.str.3 = [25 x i8] c"UNREACHABLE_RETURN(type)\00"
@.str.4 = [15 x i8] c"return (type)0\00"
define void @chaz_UnusedVars_run() {
%1 = tail call i32 @chaz_ConfWriter_start_module(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @chaz_ConfWriter_add_def(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 (...) @chaz_ConfWriter_end_module()
ret void
}