xunge/DecIR huggingface dataset:
void AddressBook_init_optional_attributes(struct AddressBook *_AddressBook) {}


x86 assembly (clang, -O0):
<AddressBook_init_optional_attributes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddressBook_init_optional_attributes>:
ret

LLVM IR (-O0):
%struct.AddressBook = type opaque
define void @AddressBook_init_optional_attributes(%struct.AddressBook* %0) {
%2 = alloca %struct.AddressBook*
store %struct.AddressBook* %0, %struct.AddressBook** %2
ret void
}

LLVM IR (-O2):
%struct.AddressBook = type opaque
define void @AddressBook_init_optional_attributes(%struct.AddressBook* nocapture %0) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_sort_embed_symbols(int *nzz) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(292, nzz, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_sort_embed_symbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x124,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_sort_embed_symbols>:
mov    %rdi,%rsi
mov    $0x124,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @syscon_sort_embed_symbols(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 292, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_sort_embed_symbols(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 292, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ cnfImpn(char *const, int, int, char *);
int /*<<< orphan*/ emsSetl(char *, int);
void ems_setl_(char *const token, int *const lvalue, int token_length) {
  char ctok[15 + 1];

  cnfImpn(token, token_length, 15, ctok);
  emsSetl(ctok, (*lvalue));
  return;
}


x86 assembly (clang, -O0):
<ems_setl_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x30(%rbp),%rcx
mov    $0xf,%edx
call   1030 <cnfImpn@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1040 <emsSetl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ems_setl_>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %edx,%esi
mov    $0xf,%edx
mov    %r14,%rcx
call   1030 <cnfImpn@plt>
mov    (%rbx),%esi
mov    %r14,%rdi
call   1040 <emsSetl@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ems_setl_(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca [16 x i8]
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%11 = call i32 @cnfImpn(i8* %8, i32 %9, i32 15, i8* %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = call i32 @emsSetl(i8* %12, i32 %14)
ret void
}

LLVM IR (-O2):
define void @ems_setl_(i8* %0, i32* nocapture %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = call i32 @cnfImpn(i8* %0, i32 %2, i32 15, i8* %5)
%7 = load i32, i32* %1
%8 = call i32 @emsSetl(i8* %5, i32 %7)
ret void
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_5e(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x13, 0x08, 0x15, 0x01, 0x17, 0x10, 0x0F, 0x1F, 0x1D, 0x0D, 0x12,
      0x03, 0x06, 0x0A, 0x1C, 0x19, 0x1A, 0x04, 0x1B, 0x02, 0x16, 0x1E,
      0x11, 0x00, 0x14, 0x09, 0x0C, 0x18, 0x05, 0x07, 0x0E, 0x0B,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_5e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_5e>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_5e.LUT = internal global [32 x i8] c"\13\08\15\01\17\10\0F\1F\1D\0D\12\03\06\0A\1C\19\1A\04\1B\02\16\1E\11\00\14\09\0C\18\05\07\0E\0B"
define i32 @yahoo_f01_5e(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_5e.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_5e.LUT = internal global [32 x i8] c"\13\08\15\01\17\10\0F\1F\1D\0D\12\03\06\0A\1C\19\1A\04\1B\02\16\1E\11\00\14\09\0C\18\05\07\0E\0B"
define i32 @yahoo_f01_5e(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_5e.LUT, i64 0, i64 0))
ret i32 %3
}
putd(an) {
  register int a, n;
  n = an;
  if (a = n / 10)
    putd(a);
  put(n % 10 + '0');
}


x86 assembly (clang, -O0):
<putd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1150 <putd+0x30>
mov    -0xc(%rbp),%edi
call   1030 <putd@plt>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
mov    $0x0,%al
call   1040 <put@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putd>:
push   %rbx
lea    0x9(%rdi),%eax
movslq %edi,%rbx
cmp    $0x13,%eax
jb     1145 <putd+0x25>
imul   $0x66666667,%rbx,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
call   1030 <putd@plt>
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
lea    (%rbx,%rax,1),%edi
add    $0x30,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <put@plt>

LLVM IR (-O0):
define i32 @putd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = sdiv i32 %7, 10
store i32 %8, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %4
%12 = call i32 @putd(i32 %11)
br label %13
13: ; preds = %10, %1
%14 = load i32, i32* %5
%15 = srem i32 %14, 10
%16 = add nsw i32 %15, 48
%17 = call i32 (i32, ...) bitcast (i32 (...)* @put to i32 (i32, ...)*)(i32 %16)
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @putd(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 10
%6 = tail call i32 @putd(i32 %5)
br label %7
7: ; preds = %4, %1
%8 = srem i32 %0, 10
%9 = add nsw i32 %8, 48
%10 = tail call i32 (i32, ...) bitcast (i32 (...)* @put to i32 (i32, ...)*)(i32 %9)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ errno;
int _open(const char *filename, int oflag, int pmode) {
  (void)filename;
  (void)oflag;
  (void)pmode;
  errno = ENOENT;
  return -1;
}


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_open>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @_open(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @ENOENT
store i32 %10, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOENT = global i32 0
@errno = global i32 0
define i32 @_open(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOENT
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "usage: finddupl [-v]\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"usage: finddupl [-v]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"usage: finddupl [-v]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stress_check_range(char const *, int, int const, int const);
int stress_get_uint64(char const *);
void stress_set_net_port(const char *optname, const char *opt,
                         const int min_port, const int max_port, int *port) {
  *port = stress_get_uint64(opt);
  stress_check_range(optname, *port, min_port, max_port - (8192));
}


x86 assembly (clang, -O0):
<stress_set_net_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <stress_get_uint64@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
sub    $0x2000,%ecx
call   1030 <stress_check_range@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_set_net_port>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r15
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <stress_get_uint64@plt>
mov    %eax,(%r15)
add    $0xffffe000,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <stress_check_range@plt>

LLVM IR (-O0):
define void @stress_set_net_port(i8* %0, i8* %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i8*, i8** %7
%12 = call i32 @stress_get_uint64(i8* %11)
%13 = load i32*, i32** %10
store i32 %12, i32* %13
%14 = load i8*, i8** %6
%15 = load i32*, i32** %10
%16 = load i32, i32* %15
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = sub nsw i32 %18, 8192
%20 = call i32 @stress_check_range(i8* %14, i32 %16, i32 %17, i32 %19)
ret void
}

LLVM IR (-O2):
define void @stress_set_net_port(i8* %0, i8* %1, i32 %2, i32 %3, i32* nocapture writeonly %4) {
%6 = tail call i32 @stress_get_uint64(i8* %1)
store i32 %6, i32* %4
%7 = add nsw i32 %3, -8192
%8 = tail call i32 @stress_check_range(i8* %0, i32 %6, i32 %2, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/,
                           char const *, unsigned int, char const *);
int /*<<< orphan*/ stderr;
void __debug_9802738545513323(const char *file_name, unsigned int line_number,
                              const char *function_name) {
  static size_t counter = 0;
  fprintf(stderr, "%03zu\tFile: '%s', line: %d, function: '%s'\n", counter++,
          file_name, line_number, function_name);
}


x86 assembly (clang, -O0):
<__debug_9802738545513323>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    0x2efd(%rip),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x2eef(%rip)
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xeaa(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__debug_9802738545513323>:
mov    %rdx,%r9
mov    %esi,%r8d
mov    %rdi,%rcx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2f07(%rip),%rdx
lea    0x1(%rdx),%rax
mov    %rax,0x2efc(%rip)
lea    0xec5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@__debug_9802738545513323.counter = internal global i64 0
@stderr = global i32 0
@.str = [44 x i8] c"%03zu\09File: '%s', line: %d, function: '%s'\0A\00"
define void @__debug_9802738545513323(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i64, i64* @__debug_9802738545513323.counter
%9 = add i64 %8, 1
store i64 %9, i64* @__debug_9802738545513323.counter
%10 = trunc i64 %8 to i32
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11, i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
@__debug_9802738545513323.counter = internal unnamed_addr global i64 0
@stderr = global i32 0
@.str = [44 x i8] c"%03zu\09File: '%s', line: %d, function: '%s'\0A\00"
define void @__debug_9802738545513323(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = load i64, i64* @__debug_9802738545513323.counter
%6 = add i64 %5, 1
store i64 %6, i64* @__debug_9802738545513323.counter
%7 = trunc i64 %5 to i32
%8 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %0, i32 %1, i8* %2)
ret void
}
int foo(int a, int b, int c) { return ((a & ~b & c) | (~a & b & c)); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
and    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
xor    %esi,%eax
and    %edx,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = xor i32 %8, -1
%10 = and i32 %7, %9
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = load i32, i32* %4
%14 = xor i32 %13, -1
%15 = load i32, i32* %5
%16 = and i32 %14, %15
%17 = load i32, i32* %6
%18 = and i32 %16, %17
%19 = or i32 %12, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = and i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print_max(int, int);
int main() {
  print_max(12, 13);
  print_max(13, 12);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0xd,%esi
call   1030 <print_max@plt>
mov    $0xd,%edi
mov    $0xc,%esi
call   1030 <print_max@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc,%edi
mov    $0xd,%esi
call   1030 <print_max@plt>
mov    $0xd,%edi
mov    $0xc,%esi
call   1030 <print_max@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @print_max(i32 12, i32 13)
%2 = call i32 @print_max(i32 13, i32 12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_max(i32 12, i32 13)
%2 = tail call i32 @print_max(i32 13, i32 12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Menus_CloseByName(char *);
void CG_HideTeamMenu() {
  Menus_CloseByName("teamMenu");
  Menus_CloseByName("getMenu");
}


x86 assembly (clang, -O0):
<CG_HideTeamMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <Menus_CloseByName@plt>
lea    0xee2(%rip),%rdi
call   1030 <Menus_CloseByName@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_HideTeamMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Menus_CloseByName@plt>
lea    0xee5(%rip),%rdi
pop    %rax
jmp    1030 <Menus_CloseByName@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"teamMenu\00"
@.str.1 = [8 x i8] c"getMenu\00"
define void @CG_HideTeamMenu() {
%1 = call i32 @Menus_CloseByName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Menus_CloseByName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"teamMenu\00"
@.str.1 = [8 x i8] c"getMenu\00"
define void @CG_HideTeamMenu() {
%1 = tail call i32 @Menus_CloseByName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Menus_CloseByName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_sec;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int32_t time_s(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec;
}


x86 assembly (clang, -O0):
<time_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_s>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @time_s() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @time_s() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
char *get_accidental(place, accidental)
char *place;
char *accidental;
{
  char *p;
  p = place;
  *accidental = '=';
  if (*p == '#') {
    *accidental = '^';
    p = p + 1;
  };
  if (*p == 'b') {
    *accidental = '_';
    p = p + 1;
  };
  return (p);
}


x86 assembly (clang, -O0):
<get_accidental>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x3d,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    113e <get_accidental+0x3e>
mov    -0x10(%rbp),%rax
movb   $0x5e,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x62,%eax
jne    1161 <get_accidental+0x61>
mov    -0x10(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_accidental>:
mov    %rdi,%rax
movb   $0x3d,(%rsi)
mov    (%rdi),%cl
cmp    $0x23,%cl
je     1113 <get_accidental+0x13>
cmp    $0x62,%cl
je     1122 <get_accidental+0x22>
ret
movb   $0x5e,(%rsi)
mov    0x1(%rax),%cl
add    $0x1,%rax
cmp    $0x62,%cl
jne    1112 <get_accidental+0x12>
movb   $0x5f,(%rsi)
add    $0x1,%rax
ret

LLVM IR (-O0):
define i8* @get_accidental(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %4
store i8 61, i8* %7
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 35
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i8*, i8** %4
store i8 94, i8* %13
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %5
br label %16
16: ; preds = %12, %2
%17 = load i8*, i8** %5
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 98
br i1 %20, label %21, label %25
21: ; preds = %16
%22 = load i8*, i8** %4
store i8 95, i8* %22
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 1
store i8* %24, i8** %5
br label %25
25: ; preds = %21, %16
%26 = load i8*, i8** %5
ret i8* %26
}

LLVM IR (-O2):
define i8* @get_accidental(i8* %0, i8* nocapture writeonly %1) {
store i8 61, i8* %1
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 35
br i1 %4, label %5, label %8
5: ; preds = %2
store i8 94, i8* %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
br label %8
8: ; preds = %5, %2
%9 = phi i8 [ %7, %5 ], [ %3, %2 ]
%10 = phi i8* [ %6, %5 ], [ %0, %2 ]
%11 = icmp eq i8 %9, 98
br i1 %11, label %12, label %14
12: ; preds = %8
store i8 95, i8* %1
%13 = getelementptr inbounds i8, i8* %10, i64 1
br label %14
14: ; preds = %12, %8
%15 = phi i8* [ %13, %12 ], [ %10, %8 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerP__0__Timer__disableEvents();
void Msp430Adc12ImplP__TimerA__disableEvents(void) {
  Msp430TimerP__0__Timer__disableEvents();
}


x86 assembly (clang, -O0):
<Msp430Adc12ImplP__TimerA__disableEvents>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Msp430TimerP__0__Timer__disableEvents@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430Adc12ImplP__TimerA__disableEvents>:
xor    %eax,%eax
jmp    1030 <Msp430TimerP__0__Timer__disableEvents@plt>

LLVM IR (-O0):
define void @Msp430Adc12ImplP__TimerA__disableEvents() {
%1 = call i32 (...) @Msp430TimerP__0__Timer__disableEvents()
ret void
}

LLVM IR (-O2):
define void @Msp430Adc12ImplP__TimerA__disableEvents() {
%1 = tail call i32 (...) @Msp430TimerP__0__Timer__disableEvents()
ret void
}
/* Type definitions */
typedef unsigned int uint16_t;

/* Variables and functions */
uint16_t devnum(char type, unsigned major, unsigned minor) {
  return (((major & 0xf) << 8) | ((minor & 0xf) << 4) | (type == 'c' ? 0 : 1));
}


x86 assembly (clang, -O0):
<devnum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
shl    $0x8,%eax
mov    -0xc(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
movsbl -0x1(%rbp),%esi
mov    $0x1,%ecx
xor    %edx,%edx
cmp    $0x63,%esi
cmove  %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<devnum>:
and    $0xf,%esi
shl    $0x8,%esi
shl    $0x4,%edx
movzbl %dl,%ecx
xor    %eax,%eax
cmp    $0x63,%dil
setne  %al
or     %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @devnum(i8 signext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = and i32 %7, 15
%9 = shl i32 %8, 8
%10 = load i32, i32* %6
%11 = and i32 %10, 15
%12 = shl i32 %11, 4
%13 = or i32 %9, %12
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 99
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 0, i32 1
%19 = or i32 %13, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @devnum(i8 signext %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 8
%5 = and i32 %4, 3840
%6 = shl i32 %2, 4
%7 = and i32 %6, 240
%8 = icmp ne i8 %0, 99
%9 = zext i1 %8 to i32
%10 = or i32 %5, %9
%11 = or i32 %10, %7
ret i32 %11
}
const char *vde_chain_nm3_name_out(int i) {
  switch (i) {
  case 0:
    return "o0";
  case 1:
    return "o1";
  case 2:
    return "o2";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm3_name_out>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <vde_chain_nm3_name_out+0x3c>
jmp    111a <vde_chain_nm3_name_out+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <vde_chain_nm3_name_out+0x4c>
jmp    112b <vde_chain_nm3_name_out+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <vde_chain_nm3_name_out+0x5c>
jmp    116c <vde_chain_nm3_name_out+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm3_name_out+0x74>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm3_name_out+0x74>
lea    0xea3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm3_name_out+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm3_name_out>:
cmp    $0x2,%edi
ja     1117 <vde_chain_nm3_name_out+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
define i8* @vde_chain_nm3_name_out(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* null, i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"o0\00"
@.str.1 = [3 x i8] c"o1\00"
@.str.2 = [3 x i8] c"o2\00"
@reltable.vde_chain_nm3_name_out = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm3_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm3_name_out to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.vde_chain_nm3_name_out to i64)) to i32)]
define i8* @vde_chain_nm3_name_out(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.vde_chain_nm3_name_out to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int bar(int /*<<< orphan*/);
int /*<<< orphan*/ foo();
int main(void) {
  int a;
  a = bar(foo());
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
mov    %eax,%edi
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @foo()
%4 = call i32 @bar(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 @bar(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int sscanlook(int action, void *dat) {
  const char **strp = dat;
  if (action & 2) {
    assert(**strp != 0);
    (*strp)++;
  }
  return **strp;
}


x86 assembly (clang, -O0):
<sscanlook>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     115e <sscanlook+0x4e>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sscanlook>:
push   %rbx
mov    (%rsi),%rax
test   $0x2,%dil
je     1135 <sscanlook+0x25>
mov    %rsi,%rbx
xor    %edi,%edi
cmpb   $0x0,(%rax)
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%rax
add    $0x1,%rax
mov    %rax,(%rbx)
movsbl (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sscanlook(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %5
%8 = load i32, i32* %3
%9 = and i32 %8, 2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8**, i8*** %5
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %19
br label %22
22: ; preds = %11, %2
%23 = load i8**, i8*** %5
%24 = load i8*, i8** %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @sscanlook(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = and i32 %0, 2
%5 = icmp eq i32 %4, 0
%6 = load i8*, i8** %3
br i1 %5, label %14, label %7
7: ; preds = %2
%8 = load i8, i8* %6
%9 = icmp ne i8 %8, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %3
br label %14
14: ; preds = %2, %7
%15 = phi i8* [ %13, %7 ], [ %6, %2 ]
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_error(char *, unsigned int);
void *realloc(void *, unsigned int);
void *chk_realloc(void *ptr, unsigned n, unsigned size) {
  void *p;
  p = realloc(ptr, n * size);
  if (p == 0) {
    print_error("chk_realloc: Ran out of memory (while trying to "
                "(re)allocating %d bytes)\n",
                n * size);
    exit(EXIT_FAILURE);
  }
  return p;
}


x86 assembly (clang, -O0):
<chk_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
imul   -0x10(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1182 <chk_realloc+0x52>
mov    -0xc(%rbp),%esi
imul   -0x10(%rbp),%esi
lea    0xe91(%rip),%rdi
call   1030 <print_error@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_realloc>:
push   %rbx
mov    %esi,%ebx
imul   %edx,%ebx
mov    %ebx,%esi
call   1040 <realloc@plt>
test   %rax,%rax
je     1144 <chk_realloc+0x14>
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
mov    %ebx,%esi
call   1030 <print_error@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"chk_realloc: Ran out of memory (while trying to (re)allocating %d bytes)\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @chk_realloc(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = mul i32 %9, %10
%12 = call i8* @realloc(i8* %8, i32 %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %22
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = mul i32 %16, %17
%19 = call i32 @print_error(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* @EXIT_FAILURE
%21 = call i32 @exit(i32 %20)
unreachable
22: ; preds = %3
%23 = load i8*, i8** %7
ret i8* %23
}

LLVM IR (-O2):
@.str = [74 x i8] c"chk_realloc: Ran out of memory (while trying to (re)allocating %d bytes)\0A\00"
@EXIT_FAILURE = global i32 0
define i8* @chk_realloc(i8* %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = tail call i8* @realloc(i8* %0, i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i32 @print_error(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %4)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %3
ret i8* %5
}
void rgbGenBufferOut(struct LSD_SceneNodeOutput const *output) {}


x86 assembly (clang, -O0):
<rgbGenBufferOut>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgbGenBufferOut>:
ret

LLVM IR (-O0):
%struct.LSD_SceneNodeOutput = type opaque
define void @rgbGenBufferOut(%struct.LSD_SceneNodeOutput* %0) {
%2 = alloca %struct.LSD_SceneNodeOutput*
store %struct.LSD_SceneNodeOutput* %0, %struct.LSD_SceneNodeOutput** %2
ret void
}

LLVM IR (-O2):
%struct.LSD_SceneNodeOutput = type opaque
define void @rgbGenBufferOut(%struct.LSD_SceneNodeOutput* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printLinestart(void) { printf("ArquiOS>"); }


x86 assembly (clang, -O0):
<printLinestart>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLinestart>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"ArquiOS>\00"
define void @printLinestart() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"ArquiOS>\00"
define void @printLinestart() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef union sdr_type sdr_type;
typedef scalar_t__ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ free(union sdr_type *);
union sdr_type *get_sdr(scalar_t__, scalar_t__ *);
void ipmi_init(void (*fn)(union sdr_type *)) {
  uint16_t rec;
  union sdr_type *psdr;
  rec = 0;
  while ((psdr = get_sdr(rec, &rec)) != NULL) {
    fn(psdr);
    free(psdr);
  }
}


x86 assembly (clang, -O0):
<ipmi_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <get_sdr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1167 <ipmi_init+0x47>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rdi
call   *%rax
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    1134 <ipmi_init+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipmi_init>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r15
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
xor    %edi,%edi
call   1040 <get_sdr@plt>
test   %rax,%rax
je     1173 <ipmi_init+0x53>
mov    %rax,%rbx
lea    0x8(%rsp),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   *%r15
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1040 <get_sdr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1150 <ipmi_init+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%union.sdr_type = type opaque
define void @ipmi_init(void (%union.sdr_type*)* %0) {
%2 = alloca void (%union.sdr_type*)*
%3 = alloca i64
%4 = alloca %union.sdr_type*
store void (%union.sdr_type*)* %0, void (%union.sdr_type*)** %2
store i64 0, i64* %3
br label %5
5: ; preds = %9, %1
%6 = load i64, i64* %3
%7 = call %union.sdr_type* @get_sdr(i64 %6, i64* %3)
store %union.sdr_type* %7, %union.sdr_type** %4
%8 = icmp ne %union.sdr_type* %7, null
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load void (%union.sdr_type*)*, void (%union.sdr_type*)** %2
%11 = load %union.sdr_type*, %union.sdr_type** %4
%12 = load %union.sdr_type*, %union.sdr_type** %4
%13 = call i32 @free(%union.sdr_type* %12)
br label %5
14: ; preds = %5
ret void
}

LLVM IR (-O2):
%union.sdr_type = type opaque
define void @ipmi_init(void (%union.sdr_type*)* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = call %union.sdr_type* @get_sdr(i64 0, i64* %2)
%5 = icmp eq %union.sdr_type* %4, null
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = phi %union.sdr_type* [ %10, %6 ], [ %4, %1 ]
%8 = call i32 @free(%union.sdr_type* %7)
%9 = load i64, i64* %2
%10 = call %union.sdr_type* @get_sdr(i64 %9, i64* %2)
%11 = icmp eq %union.sdr_type* %10, null
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Type definitions */
struct hdr_histogram {
  int dummy;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ next_non_equivalent_value(struct hdr_histogram *, scalar_t__);
int64_t highest_equivalent_value(struct hdr_histogram *h, int64_t value) {
  return next_non_equivalent_value(h, value) - 1;
}


x86 assembly (clang, -O0):
<highest_equivalent_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <next_non_equivalent_value@plt>
sub    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<highest_equivalent_value>:
push   %rax
call   1030 <next_non_equivalent_value@plt>
add    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.hdr_histogram = type { i32 }
define i64 @highest_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = alloca %struct.hdr_histogram*
%4 = alloca i64
store %struct.hdr_histogram* %0, %struct.hdr_histogram** %3
store i64 %1, i64* %4
%5 = load %struct.hdr_histogram*, %struct.hdr_histogram** %3
%6 = load i64, i64* %4
%7 = call i64 @next_non_equivalent_value(%struct.hdr_histogram* %5, i64 %6)
%8 = sub nsw i64 %7, 1
ret i64 %8
}

LLVM IR (-O2):
%struct.hdr_histogram = type { i32 }
define i64 @highest_equivalent_value(%struct.hdr_histogram* %0, i64 %1) {
%3 = tail call i64 @next_non_equivalent_value(%struct.hdr_histogram* %0, i64 %1)
%4 = add nsw i64 %3, -1
ret i64 %4
}
int esm_pt_is_reserved(int pti) { return ((pti != (0)) && (pti > (254))); }


x86 assembly (clang, -O0):
<esm_pt_is_reserved>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1123 <esm_pt_is_reserved+0x23>
cmpl   $0xfe,-0x4(%rbp)
setg   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<esm_pt_is_reserved>:
xor    %eax,%eax
cmp    $0xff,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @esm_pt_is_reserved(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 254
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @esm_pt_is_reserved(i32 %0) {
%2 = icmp sgt i32 %0, 254
%3 = zext i1 %2 to i32
ret i32 %3
}
void setLBD(int *c, int lbd) { c[-3] = lbd; }


x86 assembly (clang, -O0):
<setLBD>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,-0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLBD>:
mov    %esi,-0xc(%rdi)
ret

LLVM IR (-O0):
define void @setLBD(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 -3
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @setLBD(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 -3
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execute_connect();
int execute_listen() {
  execute_connect();
  return 0;
}


x86 assembly (clang, -O0):
<execute_listen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <execute_connect@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_listen>:
push   %rax
xor    %eax,%eax
call   1030 <execute_connect@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @execute_listen() {
%1 = call i32 (...) @execute_connect()
ret i32 0
}

LLVM IR (-O2):
define i32 @execute_listen() {
%1 = tail call i32 (...) @execute_connect()
ret i32 0
}
/* Variables and functions */
int star_p();
int g() { return star_p(); }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <star_p@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
xor    %eax,%eax
jmp    1030 <star_p@plt>

LLVM IR (-O0):
define i32 @g() {
%1 = call i32 (...) @star_p()
ret i32 %1
}

LLVM IR (-O2):
define i32 @g() {
%1 = tail call i32 (...) @star_p()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ST7735_FillRect(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void LCD_FillRectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
                       uint32_t color) {
  ST7735_FillRect(x, y, width, height, color);
}


x86 assembly (clang, -O0):
<LCD_FillRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <ST7735_FillRect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_FillRectangle>:
jmp    1030 <ST7735_FillRect@plt>

LLVM IR (-O0):
define void @LCD_FillRectangle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @ST7735_FillRect(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @LCD_FillRectangle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @ST7735_FillRect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t boot_nv_security_counter_init(void) { return 0; }


x86 assembly (clang, -O0):
<boot_nv_security_counter_init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<boot_nv_security_counter_init>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @boot_nv_security_counter_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @boot_nv_security_counter_init() {
ret i32 0
}
/* Variables and functions */
int INT_MIN;
int int_size_is_32(void) {
  int t = 0x80000000;
  return t == INT_MIN;
}


x86 assembly (clang, -O0):
<int_size_is_32>:
push   %rbp
mov    %rsp,%rbp
movl   $0x80000000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed3(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_size_is_32>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
cmpl   $0x80000000,(%rcx)
sete   %al
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
define i32 @int_size_is_32() {
%1 = alloca i32
store i32 -2147483648, i32* %1
%2 = load i32, i32* %1
%3 = load i32, i32* @INT_MIN
%4 = icmp eq i32 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @int_size_is_32() {
%1 = load i32, i32* @INT_MIN
%2 = icmp eq i32 %1, -2147483648
%3 = zext i1 %2 to i32
ret i32 %3
}
int foo(int i) { return i - -1; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, -1
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int calc_mapn(int dwsz, int mapsz) {
  int r;
  mapsz = mapsz - 3;
  r = dwsz / mapsz;
  return (r);
}


x86 assembly (clang, -O0):
<calc_mapn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_mapn>:
mov    %edi,%eax
add    $0xfffffffd,%esi
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @calc_mapn(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 3
store i32 %7, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @calc_mapn(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -3
%4 = sdiv i32 %0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void om_html_print_credits(FILE *fp) {
  fprintf(fp,
          "<tr><td colspan=\"3\" align=\"center\" class=\"credits\">Statistics "
          "generated with <a href=\"http://www.hping.org/visitors\">VISITORS "
          "Web Log Analyzer</a> version %s\n</td></tr>",
          "0.7");
}


x86 assembly (clang, -O0):
<om_html_print_credits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xf7b(%rip),%rdx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_html_print_credits>:
lea    0xee9(%rip),%rsi
lea    0xf8b(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"<tr><td colspan=\223\22 align=\22center\22 class=\22credits\22>Statistics generated with <a href=\22http://www.hping.org/visitors\22>VISITORS Web Log Analyzer</a> version %s\0A</td></tr>\00"
@.str.1 = [4 x i8] c"0.7\00"
define void @om_html_print_credits(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"<tr><td colspan=\223\22 align=\22center\22 class=\22credits\22>Statistics generated with <a href=\22http://www.hping.org/visitors\22>VISITORS Web Log Analyzer</a> version %s\0A</td></tr>\00"
@.str.1 = [4 x i8] c"0.7\00"
define void @om_html_print_credits(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned short bitreverse4(unsigned short i) {
  return ((i & 0x0F0F) << 4) | ((i & 0xF0F0) >> 4);
}


x86 assembly (clang, -O0):
<bitreverse4>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xf0f,%eax
shl    $0x4,%eax
movzwl -0x2(%rbp),%ecx
and    $0xf0f0,%ecx
sar    $0x4,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitreverse4>:
mov    %edi,%eax
shl    $0x4,%eax
and    $0xff0f0,%eax
shr    $0x4,%edi
and    $0xf0f,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @bitreverse4(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 3855
%6 = shl i32 %5, 4
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = and i32 %8, 61680
%10 = ashr i32 %9, 4
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @bitreverse4(i16 zeroext %0) {
%2 = shl i16 %0, 4
%3 = and i16 %2, -3856
%4 = lshr i16 %0, 4
%5 = and i16 %4, 3855
%6 = or i16 %3, %5
ret i16 %6
}