xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ int_hash(uintptr_t);
uint32_t ptr_hash(const void *ptr) {
  uintptr_t i = (uintptr_t)ptr;
  if (sizeof(i) == sizeof(uint32_t))
    return int_hash(i);
  else {
    return int_hash(i >> 5);
  }
}


x86 assembly (clang, -O0):
<ptr_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shr    $0x5,%rdi
call   1030 <int_hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_hash>:
shr    $0x5,%rdi
jmp    1030 <int_hash@plt>

LLVM IR (-O0):
define i32 @ptr_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = lshr i64 %6, 5
%8 = call i32 @int_hash(i64 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @ptr_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 5
%4 = tail call i32 @int_hash(i64 %3)
ret i32 %4
}
void REMR3NotifyQueuePending(void) {}


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

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

LLVM IR (-O0):
define void @REMR3NotifyQueuePending() {
ret void
}

LLVM IR (-O2):
define void @REMR3NotifyQueuePending() {
ret void
}
__attribute__((no)) unsigned long andc_vp(unsigned long a, unsigned long *b) {
  return ~*b & a;
}


x86 assembly (clang, -O0):
<andc_vp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
xor    $0xffffffffffffffff,%rax
and    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<andc_vp>:
mov    (%rsi),%rax
not    %rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @andc_vp(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %5
%7 = xor i64 %6, -1
%8 = load i64, i64* %3
%9 = and i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @andc_vp(i64 %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = xor i64 %3, -1
%5 = and i64 %4, %0
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void abort_wrapper() { abort(); }


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

x86 assembly (clang, -O2):
<abort_wrapper>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @abort_wrapper() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @abort_wrapper() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ access(int *, int);
void call_access() {
  int buf[100];
  access(buf, 100);
}


x86 assembly (clang, -O0):
<call_access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0x190(%rbp),%rdi
mov    $0x64,%esi
call   1030 <access@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_access>:
sub    $0x198,%rsp
mov    %rsp,%rdi
mov    $0x64,%esi
call   1030 <access@plt>
add    $0x198,%rsp
ret

LLVM IR (-O0):
define void @call_access() {
%1 = alloca [100 x i32]
%2 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%3 = call i32 @access(i32* %2, i32 100)
ret void
}

LLVM IR (-O2):
define void @call_access() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = call i32 @access(i32* %3, i32 100)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ ERR_print_errors_fp(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void mssl_print_err(SSL *ssl) { ERR_print_errors_fp(stderr); }


x86 assembly (clang, -O0):
<mssl_print_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <ERR_print_errors_fp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mssl_print_err>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <ERR_print_errors_fp@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @mssl_print_err(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @stderr
%4 = call i32 @ERR_print_errors_fp(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @mssl_print_err(i32* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @ERR_print_errors_fp(i32 %2)
ret void
}
unsigned long long
calc_ciphertext_len_regular_version(unsigned long long mlen) {
  int tmp;
  unsigned long long ret = 16 + mlen;
  tmp = mlen % 16;
  if (tmp != 0) {
    ret = ret + 16 - tmp;
  }
  return ret;
}


x86 assembly (clang, -O0):
<calc_ciphertext_len_regular_version>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf,%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113c <calc_ciphertext_len_regular_version+0x3c>
mov    -0x18(%rbp),%rax
add    $0x10,%rax
movslq -0xc(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_ciphertext_len_regular_version>:
lea    0x10(%rdi),%rcx
mov    %edi,%edx
and    $0xf,%edx
sub    %rdx,%rdi
lea    0x20(%rdi),%rax
test   %edx,%edx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @calc_ciphertext_len_regular_version(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = add i64 16, %5
store i64 %6, i64* %4
%7 = load i64, i64* %2
%8 = urem i64 %7, 16
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %1
%13 = load i64, i64* %4
%14 = add i64 %13, 16
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = sub i64 %14, %16
store i64 %17, i64* %4
br label %18
18: ; preds = %12, %1
%19 = load i64, i64* %4
ret i64 %19
}

LLVM IR (-O2):
define i64 @calc_ciphertext_len_regular_version(i64 %0) {
%2 = add i64 %0, 16
%3 = trunc i64 %0 to i32
%4 = and i32 %3, 15
%5 = icmp eq i32 %4, 0
%6 = add i64 %0, 32
%7 = zext i32 %4 to i64
%8 = sub i64 %6, %7
%9 = select i1 %5, i64 %2, i64 %8
ret i64 %9
}
void INT_Excep_PERIA_INTA238(void) {}


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

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

LLVM IR (-O0):
define void @INT_Excep_PERIA_INTA238() {
ret void
}

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA238() {
ret void
}
unsigned int isonum_733(unsigned char *addr) { return *(unsigned int *)addr; }


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

x86 assembly (clang, -O2):
<isonum_733>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @isonum_733(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @isonum_733(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void INI_Bool_TYPE_Ops() { ; }


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

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

LLVM IR (-O0):
define void @INI_Bool_TYPE_Ops() {
ret void
}

LLVM IR (-O2):
define void @INI_Bool_TYPE_Ops() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y;
};
typedef TYPE_1__ XExposeEvent;

/* Variables and functions */
void set_XExposeEvent_y(void *_p, int _v) { ((XExposeEvent *)_p)->y = (int)_v; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XExposeEvent_y(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XExposeEvent_y(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int kcm_is_path_separator(char ch) { return '/' == ch; }


x86 assembly (clang, -O0):
<kcm_is_path_separator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kcm_is_path_separator>:
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @kcm_is_path_separator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 47, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @kcm_is_path_separator(i8 signext %0) {
%2 = icmp eq i8 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void f0(int a) {
  int opcao = 0;
  if (a == opcao) {
    printf("oi\n");
  } else {
    printf("tchau\n");
  }
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    113f <f0+0x2f>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
jmp    114b <f0+0x3b>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
test   %edi,%edi
lea    0xeed(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"oi\0A\00"
@.str.1 = [7 x i8] c"tchau\0A\00"
define void @f0(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"tchau\00"
@str.2 = [3 x i8] c"oi\00"
define void @f0(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int unlinkat(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int main(void) { return unlinkat(AT_FDCWD, "test", 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
xor    %edx,%edx
call   1030 <unlinkat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
xor    %edx,%edx
jmp    1030 <unlinkat@plt>

LLVM IR (-O0):
@AT_FDCWD = global i32 0
@.str = [5 x i8] c"test\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @AT_FDCWD
%3 = call i32 @unlinkat(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AT_FDCWD = global i32 0
@.str = [5 x i8] c"test\00"
define i32 @main() {
%1 = load i32, i32* @AT_FDCWD
%2 = tail call i32 @unlinkat(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 %2
}
void zomb_exit(void *arg) {}


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

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

LLVM IR (-O0):
define void @zomb_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @zomb_exit(i8* nocapture %0) {
ret void
}
int fun_3(int a, int b) {
  int c = a * a;
  int d = 2 * a * b;
  int e = b * b;
  int sum = c + d + e;
  return sum;
}


x86 assembly (clang, -O0):
<fun_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_3>:
lea    (%rsi,%rdi,2),%eax
mov    %edi,%ecx
imul   %edi,%ecx
imul   %esi,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fun_3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = mul nsw i32 2, %12
%14 = load i32, i32* %4
%15 = mul nsw i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %4
%17 = load i32, i32* %4
%18 = mul nsw i32 %16, %17
store i32 %18, i32* %7
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %7
%23 = add nsw i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
ret i32 %24
}

LLVM IR (-O2):
define i32 @fun_3(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
%4 = shl i32 %0, 1
%5 = add i32 %4, %1
%6 = mul i32 %5, %1
%7 = add i32 %6, %3
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, int /*<<< orphan*/ *, int);
float fromRep32(uint32_t x) {
  float ret;
  memcpy(&ret, &x, 4);
  return ret;
}


x86 assembly (clang, -O0):
<fromRep32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fromRep32>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
movss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fromRep32(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
%4 = call i32 @memcpy(float* %3, i32* %2, i32 4)
%5 = load float, float* %3
ret float %5
}

LLVM IR (-O2):
define float @fromRep32(i32 %0) {
%2 = alloca i32
%3 = alloca float
store i32 %0, i32* %2
%4 = bitcast float* %3 to i8*
%5 = call i32 @memcpy(float* %3, i32* %2, i32 4)
%6 = load float, float* %3
ret float %6
}
/* Variables and functions */
float log2f(float);
float futrts_log2_32(float x) { return log2f(x); }


x86 assembly (clang, -O0):
<futrts_log2_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<futrts_log2_32>:
jmp    1030 <log2f@plt>

LLVM IR (-O0):
define float @futrts_log2_32(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @log2f(float %3)
ret float %4
}

LLVM IR (-O2):
define float @futrts_log2_32(float %0) {
%2 = tail call float @log2f(float %0)
ret float %2
}
void rop3_205_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D | T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_205_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_205_0_0>:
or     (%rdi),%dl
not    %dl
or     %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_205_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = or i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = load i8*, i8** %4
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @rop3_205_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = xor i8 %5, -1
%7 = or i8 %6, %1
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA(int, int);
void GyOutSignal(void) {
  RegWriteA(0x0283, 0x43);
  RegWriteA(0x0284, 0x45);
  RegWriteA(0x0280, 0x02);
}


x86 assembly (clang, -O0):
<GyOutSignal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x283,%edi
mov    $0x43,%esi
call   1030 <RegWriteA@plt>
mov    $0x284,%edi
mov    $0x45,%esi
call   1030 <RegWriteA@plt>
mov    $0x280,%edi
mov    $0x2,%esi
call   1030 <RegWriteA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyOutSignal>:
push   %rax
mov    $0x283,%edi
mov    $0x43,%esi
call   1030 <RegWriteA@plt>
mov    $0x284,%edi
mov    $0x45,%esi
call   1030 <RegWriteA@plt>
mov    $0x280,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <RegWriteA@plt>

LLVM IR (-O0):
define void @GyOutSignal() {
%1 = call i32 @RegWriteA(i32 643, i32 67)
%2 = call i32 @RegWriteA(i32 644, i32 69)
%3 = call i32 @RegWriteA(i32 640, i32 2)
ret void
}

LLVM IR (-O2):
define void @GyOutSignal() {
%1 = tail call i32 @RegWriteA(i32 643, i32 67)
%2 = tail call i32 @RegWriteA(i32 644, i32 69)
%3 = tail call i32 @RegWriteA(i32 640, i32 2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x_root;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_x_root(void *_p) {
  return (int)((XCrossingEvent *)_p)->x_root;
}


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

x86 assembly (clang, -O2):
<get_XCrossingEvent_x_root>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XCrossingEvent_x_root(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XCrossingEvent_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int gca_cmp2_int16(const void *aa, const void *bb, void *p) {
  (void)p;
  const int16_t a = *(const int16_t *)aa;
  const int16_t b = *(const int16_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_cmp2_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x28(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_cmp2_int16>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_cmp2_int16(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %7
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
store i64 %15, i64* %8
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = icmp sgt i64 %16, %17
%19 = zext i1 %18 to i32
%20 = load i64, i64* %8
%21 = load i64, i64* %7
%22 = icmp sgt i64 %20, %21
%23 = zext i1 %22 to i32
%24 = sub nsw i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @gca_cmp2_int16(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = bitcast i8* %1 to i64*
%7 = load i64, i64* %6
%8 = icmp sgt i64 %5, %7
%9 = zext i1 %8 to i32
%10 = icmp sgt i64 %7, %5
%11 = sext i1 %10 to i32
%12 = add nsw i32 %11, %9
ret i32 %12
}
int compare_float_asc(void const *a, void const *b) {
  return (*(float const *)a) > (*(float const *)b)   ? 1
         : (*(float const *)a) < (*(float const *)b) ? -1
                                                     : 0;
}


x86 assembly (clang, -O0):
<compare_float_asc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    112e <compare_float_asc+0x2e>
mov    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114e <compare_float_asc+0x4e>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_float_asc>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomiss %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_float_asc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fcmp ogt float %7, %10
br i1 %11, label %12, label %13
12: ; preds = %2
br label %23
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to float*
%16 = load float, float* %15
%17 = load i8*, i8** %4
%18 = bitcast i8* %17 to float*
%19 = load float, float* %18
%20 = fcmp olt float %16, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 -1, i32 0
br label %23
23: ; preds = %13, %12
%24 = phi i32 [ 1, %12 ], [ %22, %13 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @compare_float_asc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp ogt float %4, %6
%8 = fcmp olt float %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
unsigned long SIO1readStat32(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @SIO1readStat32() {
ret i64 0
}

LLVM IR (-O2):
define i64 @SIO1readStat32() {
ret i64 0
}
void mutate_double(double *x) { *x *= 2; }


x86 assembly (clang, -O0):
<mutate_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutate_double>:
movsd  (%rdi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @mutate_double(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = fmul double %4, 2.000000e+00
store double %5, double* %3
ret void
}

LLVM IR (-O2):
define void @mutate_double(double* nocapture %0) {
%2 = load double, double* %0
%3 = fmul double %2, 2.000000e+00
store double %3, double* %0
ret void
}
int picolcd_init_cir(struct picolcd_data *data, struct hid_report *report) {
  return 0;
}


x86 assembly (clang, -O0):
<picolcd_init_cir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define i32 @picolcd_init_cir(%struct.picolcd_data* %0, %struct.hid_report* %1) {
%3 = alloca %struct.picolcd_data*
%4 = alloca %struct.hid_report*
store %struct.picolcd_data* %0, %struct.picolcd_data** %3
store %struct.hid_report* %1, %struct.hid_report** %4
ret i32 0
}

LLVM IR (-O2):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define i32 @picolcd_init_cir(%struct.picolcd_data* nocapture readnone %0, %struct.hid_report* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct aeEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void finalCallback(struct aeEventLoop *l, void *data) {
  puts("call the unknow final function \n");
}


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

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

LLVM IR (-O0):
%struct.aeEventLoop = type { i32 }
@.str = [33 x i8] c"call the unknow final function \0A\00"
define void @finalCallback(%struct.aeEventLoop* %0, i8* %1) {
%3 = alloca %struct.aeEventLoop*
%4 = alloca i8*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %3
store i8* %1, i8** %4
%5 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.aeEventLoop = type { i32 }
@.str = [33 x i8] c"call the unknow final function \0A\00"
define void @finalCallback(%struct.aeEventLoop* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct sembuf {
  int member_0;
  int member_1;
  int /*<<< orphan*/ member_2;
};

/* Variables and functions */
int /*<<< orphan*/ exception(char *);
int semop(int, struct sembuf *, int);
void P(int semid, int semchoice) {
  struct sembuf op = {semchoice, -1, 0};
  if (semop(semid, &op, 1) == -1)
    exception("ERROR while waiting on semaphore!");
}


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
jne    1168 <P+0x48>
lea    0xe9d(%rip),%rdi
call   1030 <exception@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
mov    $0xffffffff,%eax
mov    %rax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1040 <semop@plt>
cmp    $0xffffffff,%eax
je     114b <P+0x2b>
add    $0x18,%rsp
ret
lea    0xeae(%rip),%rdi
call   1030 <exception@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@.str = [34 x i8] c"ERROR while waiting on semaphore!\00"
define void @P(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i32 -1, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i32 0, i32* %9
%10 = load i32, i32* %3
%11 = call i32 @semop(i32 %10, %struct.sembuf* %5, i32 1)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @exception(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@.str = [34 x i8] c"ERROR while waiting on semaphore!\00"
define void @P(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 -1, i32* %6
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i32 0, i32* %7
%8 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @exception(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_line(char *);
int /*<<< orphan*/ output_with_tab(char *);
int /*<<< orphan*/ print_label(int);
void gen_test_jump(int label, int ft) {
  output_line("tstd");
  if (ft)
    output_with_tab("bne ");
  else
    output_with_tab("beq ");
  print_label(label);
  newline();
}


x86 assembly (clang, -O0):
<gen_test_jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xeab(%rip),%rdi
call   1060 <output_line@plt>
cmpl   $0x0,-0x8(%rbp)
je     1175 <gen_test_jump+0x35>
lea    0xe9a(%rip),%rdi
call   1050 <output_with_tab@plt>
jmp    1181 <gen_test_jump+0x41>
lea    0xe8e(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_label@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_test_jump>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xeb2(%rip),%rdi
call   1060 <output_line@plt>
test   %ebx,%ebx
lea    0xeae(%rip),%rax
lea    0xea2(%rip),%rdi
cmove  %rax,%rdi
call   1050 <output_with_tab@plt>
mov    %ebp,%edi
call   1040 <print_label@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"tstd\00"
@.str.1 = [5 x i8] c"bne \00"
@.str.2 = [5 x i8] c"beq \00"
define void @gen_test_jump(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @output_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %2
%11 = call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %3
%14 = call i32 @print_label(i32 %13)
%15 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"tstd\00"
@.str.1 = [5 x i8] c"bne \00"
@.str.2 = [5 x i8] c"beq \00"
define void @gen_test_jump(i32 %0, i32 %1) {
%3 = tail call i32 @output_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @output_with_tab(i8* %5)
%7 = tail call i32 @print_label(i32 %0)
%8 = tail call i32 (...) @newline()
ret void
}
int foo29() { return 29; }


x86 assembly (clang, -O0):
<foo29>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo29>:
mov    $0x1d,%eax
ret

LLVM IR (-O0):
define i32 @foo29() {
ret i32 29
}

LLVM IR (-O2):
define i32 @foo29() {
ret i32 29
}
void test_one_space_char(void) {
  char buf[] = "aab ";
  trim_right(buf);
  do {
    seatest_assert_string_equal("aab", buf, __FUNCTION__, 26);
  } while (0);
}


x86 assembly (clang, -O0):
<test_one_space_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x5(%rbp),%rdi
mov    $0x0,%al
call   1030 <trim_right@plt>
lea    -0x5(%rbp),%rsi
lea    0xeb5(%rip),%rdi
lea    0xeb2(%rip),%rdx
mov    $0x1a,%ecx
mov    $0x0,%al
call   1040 <seatest_assert_string_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_one_space_char>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x20626161,0x8(%rsp)
20
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <trim_right@plt>
lea    0xebd(%rip),%rdi
lea    0xeba(%rip),%rdx
mov    %rbx,%rsi
mov    $0x1a,%ecx
xor    %eax,%eax
call   1040 <seatest_assert_string_equal@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_one_space_char.buf = [5 x i8] c"aab \00"
@.str = [4 x i8] c"aab\00"
@__FUNCTION__.test_one_space_char = [20 x i8] c"test_one_space_char\00"
define void @test_one_space_char() {
%1 = alloca [5 x i8]
%2 = bitcast [5 x i8]* %1 to i8*
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @trim_right to i32 (i8*, ...)*)(i8* %3)
br label %5
5: ; preds = %0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.test_one_space_char, i64 0, i64 0), i32 26)
br label %8
8: ; preds = %5
ret void
}

LLVM IR (-O2):
@__const.test_one_space_char.buf = [5 x i8] c"aab \00"
@.str = [4 x i8] c"aab\00"
@__FUNCTION__.test_one_space_char = [20 x i8] c"test_one_space_char\00"
define void @test_one_space_char() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @trim_right to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, i8*, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_string_equal to i32 (i8*, i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__FUNCTION__.test_one_space_char, i64 0, i64 0), i32 26)
ret void
}
void gtk_accel_map_change_entry() {}


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

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

LLVM IR (-O0):
define void @gtk_accel_map_change_entry() {
ret void
}

LLVM IR (-O2):
define void @gtk_accel_map_change_entry() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void vDummyIsr(void) {
  for (;;) {
    fputs("STUCK IN UNASSIGNED ISR\n\r>", stdout);
  }
}


x86 assembly (clang, -O0):
<vDummyIsr>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <vDummyIsr+0x9>
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <fputs@plt>
jmp    1119 <vDummyIsr+0x9>

x86 assembly (clang, -O2):
<vDummyIsr>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
lea    0xede(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14),%esi
mov    %rbx,%rdi
call   1030 <fputs@plt>
jmp    1130 <vDummyIsr+0x20>

LLVM IR (-O0):
@.str = [27 x i8] c"STUCK IN UNASSIGNED ISR\0A\0D>\00"
@stdout = global i32 0
define void @vDummyIsr() {
br label %1
1: ; preds = %1, %0
%2 = load i32, i32* @stdout
%3 = call i32 @fputs(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %1
}

LLVM IR (-O2):
@.str = [27 x i8] c"STUCK IN UNASSIGNED ISR\0A\0D>\00"
@stdout = global i32 0
define void @vDummyIsr() {
br label %1
1: ; preds = %1, %0
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %1
}
int __rpc_get_default_domain(domain)
char **domain;
{
  if ((*domain = get_default_domain()) != 0)
    return (0);
  return (-1);
}


x86 assembly (clang, -O0):
<__rpc_get_default_domain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_default_domain@plt>
cltq
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     1142 <__rpc_get_default_domain+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1149 <__rpc_get_default_domain+0x39>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rpc_get_default_domain>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_default_domain@plt>
cltq
mov    %rax,(%rbx)
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__rpc_get_default_domain(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = call i32 (...) @get_default_domain()
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = load i8**, i8*** %3
store i8* %6, i8** %7
%8 = icmp ne i8* %6, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @__rpc_get_default_domain(i8** nocapture writeonly %0) {
%2 = tail call i32 (...) @get_default_domain()
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %0
%5 = icmp eq i32 %2, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int /*<<< orphan*/ test2(int *, int);
int main(void) {
  int arr[] = {2, 3, 43, 1, 15, 45, 6, 53, 45, 67, 83, 36, 56, 34};
  test2(arr, sizeof(arr) / sizeof(int));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x38,%edx
call   1030 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xe,%esi
call   1040 <test2@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf15(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xe,%esi
call   1030 <test2@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [14 x i32] [i32 2, i32 3, i32 43, i32 1, i32 15, i32 45, i32 6, i32 53, i32 45, i32 67, i32 83, i32 36, i32 56, i32 34]
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i32]
store i32 0, i32* %1
%3 = bitcast [14 x i32]* %2 to i8*
%4 = getelementptr inbounds [14 x i32], [14 x i32]* %2, i64 0, i64 0
%5 = call i32 @test2(i32* %4, i32 14)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [14 x i32] [i32 2, i32 3, i32 43, i32 1, i32 15, i32 45, i32 6, i32 53, i32 45, i32 67, i32 83, i32 36, i32 56, i32 34]
define i32 @main() {
%1 = alloca [14 x i32]
%2 = bitcast [14 x i32]* %1 to i8*
%3 = getelementptr inbounds [14 x i32], [14 x i32]* %1, i64 0, i64 0
%4 = call i32 @test2(i32* %3, i32 14)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itoa(int value) {
  char *s;
  s = (char *)malloc(sizeof(char) * 256);
  sprintf(s, "%d", value);
  return s;
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x100,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i64 @malloc(i32 256)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0) {
%2 = tail call i64 @malloc(i32 256)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ javascript;

/* Variables and functions */
int /*<<< orphan*/ cgiMakeOnClickButton(char *, char *);
int /*<<< orphan*/ safef(char *, int, char *, char *, char *, char *);
void cgiMakeClearButton(char *form, char *field) {
  char javascript[1024];
  safef(javascript, sizeof(javascript),
        "document.%s.%s.value = ''; document.%s.submit();", form, field, form);
  cgiMakeOnClickButton(javascript, " Clear  ");
}


x86 assembly (clang, -O0):
<cgiMakeClearButton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    $0x400,%esi
lea    0xeae(%rip),%rdx
call   1040 <safef@plt>
lea    -0x410(%rbp),%rdi
lea    0xecc(%rip),%rsi
call   1030 <cgiMakeOnClickButton@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgiMakeClearButton>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xecb(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
mov    %rcx,%r9
call   1040 <safef@plt>
lea    0xee2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <cgiMakeOnClickButton@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"document.%s.%s.value = ''; document.%s.submit();\00"
@.str.1 = [9 x i8] c" Clear \00"
define void @cgiMakeClearButton(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = call i32 @safef(i8* %6, i32 1024, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @cgiMakeOnClickButton(i8* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"document.%s.%s.value = ''; document.%s.submit();\00"
@.str.1 = [9 x i8] c" Clear \00"
define void @cgiMakeClearButton(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @safef(i8* %4, i32 1024, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %0)
%6 = call i32 @cgiMakeOnClickButton(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isodigit(int c) { return '0' <= c && c < '8'; }


x86 assembly (clang, -O0):
<isodigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <isodigit+0x24>
cmpl   $0x38,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isodigit>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isodigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 56
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 @isodigit(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
isOn(unsigned long long M, int i, int j) {
  if (i < 0 || j < 0 || i > 7 || j > 7)
    return 0;
  return ((M >> (i << 3)) >> j) & 1;
}


x86 assembly (clang, -O0):
<isOn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1136 <isOn+0x36>
cmpl   $0x0,-0x18(%rbp)
jl     1136 <isOn+0x36>
cmpl   $0x7,-0x14(%rbp)
jg     1136 <isOn+0x36>
cmpl   $0x7,-0x18(%rbp)
jle    1142 <isOn+0x42>
movl   $0x0,-0x4(%rbp)
jmp    115e <isOn+0x5e>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
shl    $0x3,%ecx
mov    %ecx,%ecx
shr    %cl,%rax
mov    -0x18(%rbp),%ecx
shr    %cl,%rax
and    $0x1,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOn>:
lea    0x0(,%rsi,8),%ecx
shr    %cl,%rdi
mov    %edx,%ecx
shr    %cl,%rdi
and    $0x1,%edi
xor    %eax,%eax
mov    %edx,%ecx
or     %esi,%ecx
cmovs  %eax,%edi
cmp    $0x8,%esi
cmovge %eax,%edi
cmp    $0x8,%edx
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @isOn(i64 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 0
br i1 %9, label %19, label %10
10: ; preds = %3
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %10
%14 = load i32, i32* %6
%15 = icmp sgt i32 %14, 7
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %7
%18 = icmp sgt i32 %17, 7
br i1 %18, label %19, label %20
19: ; preds = %16, %13, %10, %3
store i32 0, i32* %4
br label %31
20: ; preds = %16
%21 = load i64, i64* %5
%22 = load i32, i32* %6
%23 = shl i32 %22, 3
%24 = zext i32 %23 to i64
%25 = lshr i64 %21, %24
%26 = load i32, i32* %7
%27 = zext i32 %26 to i64
%28 = lshr i64 %25, %27
%29 = and i64 %28, 1
%30 = trunc i64 %29 to i32
store i32 %30, i32* %4
br label %31
31: ; preds = %20, %19
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
define i32 @isOn(i64 %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = icmp slt i32 %4, 0
%6 = icmp sgt i32 %1, 7
%7 = or i1 %6, %5
%8 = icmp sgt i32 %2, 7
%9 = or i1 %8, %7
%10 = shl i32 %1, 3
%11 = zext i32 %10 to i64
%12 = lshr i64 %0, %11
%13 = zext i32 %2 to i64
%14 = lshr i64 %12, %13
%15 = trunc i64 %14 to i32
%16 = and i32 %15, 1
%17 = select i1 %9, i32 0, i32 %16
ret i32 %17
}
void __attribute__((weak)) dma2_stream4_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<dma2_stream4_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dma2_stream4_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.dma2_stream4_isr = [17 x i8] c"dma2_stream4_isr\00"
define weak void @dma2_stream4_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream4_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.dma2_stream4_isr = [17 x i8] c"dma2_stream4_isr\00"
define weak void @dma2_stream4_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.dma2_stream4_isr, i64 0, i64 0))
ret void
}