xunge/DecIR huggingface dataset:
/* Variables and functions */
char *memrchr(char const *, int, scalar_t__);
scalar_t__ strlen(char const *);
char *strrchr(const char *str, int character) {
  return memrchr(str, character, strlen(str) + 1);
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <memrchr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <memrchr@plt>

LLVM IR (-O0):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @memrchr(i8* %5, i32 %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @memrchr(i8* %0, i32 %1, i64 %4)
ret i8* %5
}
int cfs_memory_pressure_get_and_set(void) {
  int old = (0);
  if (!old)
    do {
    } while (0);
  return old;
}


x86 assembly (clang, -O0):
<cfs_memory_pressure_get_and_set>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1124 <cfs_memory_pressure_get_and_set+0x24>
jmp    111a <cfs_memory_pressure_get_and_set+0x1a>
jmp    111f <cfs_memory_pressure_get_and_set+0x1f>
jmp    1124 <cfs_memory_pressure_get_and_set+0x24>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cfs_memory_pressure_get_and_set() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = icmp ne i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @cfs_memory_pressure_get_and_set() {
ret i32 0
}
int main() {
  char a = 'E';
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x45,-0x5(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 69, i8* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
__attribute__((no, noclone)) unsigned __int128 t147_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(
          (signed __int128)((
              (signed __int128)(((unsigned __int128)1 << (16 * 8 - 1)) - 1))),
          y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t147_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
xor    %edx,%edx
mov    %edx,%r9d
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    %rax,%rdx
mov    %r9,%r8
sbb    %r8,%r8
sbb    %r9,%r9
mov    %r8d,%eax
and    $0x1,%eax
mov    %eax,%esi
mov    %rsi,%rax
neg    %rax
mov    %rax,%rdi
xor    %r9,%rdi
xor    %r8,%rax
or     %rdi,%rax
not    %rcx
or     %rsi,%rax
setne  %al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    118b <t147_3sub+0x7b>
jmp    1192 <t147_3sub+0x82>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t147_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x7fffffffffffffff,%r14
ff ff 7f
sub    %rsi,%r14
not    %rbx
test   %rsi,%rsi
jns    1133 <t147_3sub+0x23>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t147_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = zext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 170141183460469231731687303715884105727, i129 %12)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t147_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = zext i128 %6 to i129
%8 = sub nsw i129 170141183460469231731687303715884105727, %7
%9 = icmp slt i128 %6, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i129 %8 to i64
%14 = lshr i129 %8, 64
%15 = trunc i129 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
/* Variables and functions */
int bbm_word_write(void *, unsigned short, unsigned short);
signed int bbm_com_word_write(void *handle, unsigned short addr,
                              unsigned short data) {
  signed int res;
  res = bbm_word_write(handle, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_word_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
movzwl %ax,%esi
movzwl -0xc(%rbp),%edx
call   1030 <bbm_word_write@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_word_write>:
jmp    1030 <bbm_word_write@plt>

LLVM IR (-O0):
define i32 @bbm_com_word_write(i8* %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i16
%7 = alloca i32
store i8* %0, i8** %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%8 = load i8*, i8** %4
%9 = load i16, i16* %5
%10 = load i16, i16* %6
%11 = call i32 @bbm_word_write(i8* %8, i16 zeroext %9, i16 zeroext %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @bbm_com_word_write(i8* %0, i16 zeroext %1, i16 zeroext %2) {
%4 = tail call i32 @bbm_word_write(i8* %0, i16 zeroext %1, i16 zeroext %2)
ret i32 %4
}
void set_rounding_mode(unsigned mode) {
  register unsigned r asm("1") = mode;
  __asm__ volatile(".long 0x"
                   "b384"
                   "00"
                   "1"
                   "0"
                   "\n\t"
                   :
                   : "d"(r));
}


x86 assembly (clang, -O0):
<set_rounding_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edx
adc    %al,(%rax)
.byte 0x84
mov    $0x5d,%bl
ret

x86 assembly (clang, -O2):
<set_rounding_mode>:
mov    %edi,%edx
adc    %al,(%rax)
.byte 0x84
mov    $0xc3,%bl

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

LLVM IR (-O2):
define void @set_rounding_mode(i32 %0) {
tail call void asm sideeffect ".long 0xb3840010\0A\09", "{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret void
}
int f(x) {
  y(x);
  x += 1;
  y(x);
}


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

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <y@plt>
add    $0x1,%ebx
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <y@plt>

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @y to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i32, ...) bitcast (i32 (...)* @y to i32 (i32, ...)*)(i32 %8)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @y to i32 (i32, ...)*)(i32 %0)
%3 = add nsw i32 %0, 1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @y to i32 (i32, ...)*)(i32 %3)
ret i32 undef
}
/* Variables and functions */
int __mib_flash_read(char *, int, int);
int flash_read(char *buf, int offset, int len) {
  return __mib_flash_read(buf, offset, len);
}


x86 assembly (clang, -O0):
<flash_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <__mib_flash_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_read>:
jmp    1030 <__mib_flash_read@plt>

LLVM IR (-O0):
define i32 @flash_read(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 = call i32 @__mib_flash_read(i8* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @flash_read(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @__mib_flash_read(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ USBSTK5515_I2C_close();
int /*<<< orphan*/ USBSTK5515_I2C_init();
short USBSTK5515_I2C_reset() {
  USBSTK5515_I2C_close();
  USBSTK5515_I2C_init();
  return 0;
}


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

x86 assembly (clang, -O2):
<USBSTK5515_I2C_reset>:
push   %rax
xor    %eax,%eax
call   1040 <USBSTK5515_I2C_close@plt>
xor    %eax,%eax
call   1030 <USBSTK5515_I2C_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @USBSTK5515_I2C_reset() {
%1 = call i32 (...) @USBSTK5515_I2C_close()
%2 = call i32 (...) @USBSTK5515_I2C_init()
ret i16 0
}

LLVM IR (-O2):
define signext i16 @USBSTK5515_I2C_reset() {
%1 = tail call i32 (...) @USBSTK5515_I2C_close()
%2 = tail call i32 (...) @USBSTK5515_I2C_init()
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ matNf_setColumn(float *, float const *, int const, int);
void mat3f_setColumn(float matrix[9], const float v[3], const int col) {
  matNf_setColumn(matrix, v, col, 3);
}


x86 assembly (clang, -O0):
<mat3f_setColumn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x3,%ecx
call   1030 <matNf_setColumn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3f_setColumn>:
mov    $0x3,%ecx
jmp    1030 <matNf_setColumn@plt>

LLVM IR (-O0):
define void @mat3f_setColumn(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = load i32, i32* %6
%10 = call i32 @matNf_setColumn(float* %7, float* %8, i32 %9, i32 3)
ret void
}

LLVM IR (-O2):
define void @mat3f_setColumn(float* %0, float* %1, i32 %2) {
%4 = tail call i32 @matNf_setColumn(float* %0, float* %1, i32 %2, i32 3)
ret void
}
int compare(const void *a, const void *b) {
  return ((int *)a)[0] - ((int *)b)[0];
}


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

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

LLVM IR (-O0):
define i32 @compare(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 i32*
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = sub nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ OSI_SetColor(int, int /*<<< orphan*/);
void OSI_RefreshPalette(void) { OSI_SetColor(-1, 0); }


x86 assembly (clang, -O0):
<OSI_RefreshPalette>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <OSI_SetColor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSI_RefreshPalette>:
mov    $0xffffffff,%edi
xor    %esi,%esi
jmp    1030 <OSI_SetColor@plt>

LLVM IR (-O0):
define void @OSI_RefreshPalette() {
%1 = call i32 @OSI_SetColor(i32 -1, i32 0)
ret void
}

LLVM IR (-O2):
define void @OSI_RefreshPalette() {
%1 = tail call i32 @OSI_SetColor(i32 -1, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t test_rpc_handler2(uint8_t *buffer, unsigned int length,
                          uint8_t *out_buffer, unsigned int *out_length) {
  (void)buffer;
  (void)length;
  (void)out_buffer;
  (void)out_length;
  return 0;
}


x86 assembly (clang, -O0):
<test_rpc_handler2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_rpc_handler2(i32* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @test_rpc_handler2(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, char *, char *);
void AVRCP_ResponseSink_AVTransport_GetDeviceCapabilities(
    struct UPnPService *Service, int ErrorCode, void *User, char *PlayMedia,
    char *RecMedia, char *RecQualityModes) {
  printf("AVRCP_ Invoke Response: "
         "AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\r\n",
         ErrorCode, PlayMedia, RecMedia, RecQualityModes);
}


x86 assembly (clang, -O0):
<AVRCP_ResponseSink_AVTransport_GetDeviceCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AVRCP_ResponseSink_AVTransport_GetDeviceCapabilities>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r9,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [84 x i8] c"AVRCP_ Invoke Response: AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_GetDeviceCapabilities(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca %struct.UPnPService*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i32, i32* %8
%14 = load i8*, i8** %10
%15 = load i8*, i8** %11
%16 = load i8*, i8** %12
%17 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [84 x i8] c"AVRCP_ Invoke Response: AVTransport/GetDeviceCapabilities[ErrorCode:%d](%s,%s,%s)\0D\0A\00"
define void @AVRCP_ResponseSink_AVTransport_GetDeviceCapabilities(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3, i8* %4, i8* %5)
ret void
}
/* Variables and functions */
double getUnixTime();
double get_time() {
  static double start_time;
  static int start_flag = 0;
  if (!start_flag) {
    start_time = getUnixTime();
    start_flag = 1;
  }
  return getUnixTime() - start_time;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f1d(%rip)
jne    113a <get_time+0x2a>
mov    $0x0,%al
call   1030 <getUnixTime@plt>
movsd  %xmm0,0x2f00(%rip)
movl   $0x1,0x2efe(%rip)
mov    $0x0,%al
call   1030 <getUnixTime@plt>
subsd  0x2ee7(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
push   %rax
cmpb   $0x0,0x2f20(%rip)
jne    1130 <get_time+0x20>
xor    %eax,%eax
call   1030 <getUnixTime@plt>
movsd  %xmm0,0x2f07(%rip)
movb   $0x1,0x2f08(%rip)
xor    %eax,%eax
call   1030 <getUnixTime@plt>
subsd  0x2ef1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@get_time.start_time = internal global double 0.000000e+00
@get_time.start_flag = internal global i32 0
define double @get_time() {
%1 = load i32, i32* @get_time.start_flag
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call double (...) @getUnixTime()
store double %4, double* @get_time.start_time
store i32 1, i32* @get_time.start_flag
br label %5
5: ; preds = %3, %0
%6 = call double (...) @getUnixTime()
%7 = load double, double* @get_time.start_time
%8 = fsub double %6, %7
ret double %8
}

LLVM IR (-O2):
@get_time.start_time = internal unnamed_addr global double 0.000000e+00
@get_time.start_flag = internal unnamed_addr global i1 false
define double @get_time() {
%1 = load i1, i1* @get_time.start_flag
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call double (...) @getUnixTime()
store double %3, double* @get_time.start_time
store i1 true, i1* @get_time.start_flag
br label %4
4: ; preds = %2, %0
%5 = tail call double (...) @getUnixTime()
%6 = load double, double* @get_time.start_time
%7 = fsub double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ __fpurge(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int scanf(char *, float *);
int /*<<< orphan*/ stdin;
void readFloat2(float *variableAddress, char headerMessage[]) {
  bool ret;
  do {
    printf("%s", headerMessage);
    ret = scanf("%f", variableAddress);
    __fpurge(stdin);
  } while (ret != true);
}


x86 assembly (clang, -O0):
<readFloat2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1050 <scanf@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1030 <__fpurge@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1140 <readFloat2+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFloat2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeb8(%rip),%r15
lea    0xeb4(%rip),%r12
mov    0x2e92(%rip),%r13
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %eax,%ebp
mov    0x0(%r13),%edi
call   1030 <__fpurge@plt>
cmp    $0x1,%ebp
jne    1160 <readFloat2+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%f\00"
@stdin = global i32 0
define void @readFloat2(float* %0, i8* %1) {
%3 = alloca float*
%4 = alloca i8*
%5 = alloca i32
store float* %0, float** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %13, %2
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load float*, float** %3
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %9)
store i32 %10, i32* %5
%11 = load i32, i32* @stdin
%12 = call i32 @__fpurge(i32 %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %5
%15 = icmp ne i32 %14, 1
br i1 %15, label %6, label %16
16: ; preds = %13
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [3 x i8] c"%f\00"
@stdin = global i32 0
define void @readFloat2(float* %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %0)
%6 = load i32, i32* @stdin
%7 = tail call i32 @__fpurge(i32 %6)
%8 = icmp eq i32 %5, 1
br i1 %8, label %9, label %3
9: ; preds = %3
ret void
}
int test_imm_81uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x81 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_81uint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x81,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_81uint64_lowword_mem>:
testb  $0x81,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_81uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 129
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_81uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 129
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void INT_Excep_CMTU0_CMT0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CMTU0_CMT0() {
ret void
}
int makeUnsignedFrom(int someIntegerValue) { return someIntegerValue; }


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

x86 assembly (clang, -O2):
<makeUnsignedFrom>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @makeUnsignedFrom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @makeUnsignedFrom(i32 returned %0) {
ret i32 %0
}
void RGMtmode(void) {}


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

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

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

LLVM IR (-O2):
define void @RGMtmode() {
ret void
}
void mydelay(int ONEMILLION) {
  int i, j;
  for (i = 0; i < ONEMILLION * 4; i++)
    for (j = 0; j < 1000; j++)
      ;
}


x86 assembly (clang, -O0):
<mydelay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
cmp    %ecx,%eax
jge    1159 <mydelay+0x59>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1146 <mydelay+0x46>
jmp    1138 <mydelay+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <mydelay+0x26>
jmp    114b <mydelay+0x4b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <mydelay+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mydelay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, 4
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %22
10: ; preds = %5
store i32 0, i32* %4
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 1000
br i1 %13, label %14, label %18
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %11
18: ; preds = %11
br label %19
19: ; preds = %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %5
22: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @mydelay(i32 %0) {
ret void
}
void ARGBMirrorRow_SSE2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBMirrorRow_SSE2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("Time: %g seconds\n", 183.7);
  printf("Memory: %d GB\n", 24);
  printf("Validation: SUCCESS\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xee2(%rip),%rdi
movsd  0xed2(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x18,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
movsd  0xed0(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Time: %g seconds\0A\00"
@.str.1 = [15 x i8] c"Memory: %d GB\0A\00"
@.str.2 = [21 x i8] c"Validation: SUCCESS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 1.837000e+02)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 24)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Time: %g seconds\0A\00"
@.str.1 = [15 x i8] c"Memory: %d GB\0A\00"
@str = [20 x i8] c"Validation: SUCCESS\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 1.837000e+02)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 24)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void *anemone_ffi_id(void *inp) { return inp; }


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

x86 assembly (clang, -O2):
<anemone_ffi_id>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @anemone_ffi_id(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ DbpStringEx(int, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void DbpString(const char *str) { DbpStringEx(0x01, str, strlen(str)); }


x86 assembly (clang, -O0):
<DbpString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <DbpStringEx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DbpString>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <DbpStringEx@plt>

LLVM IR (-O0):
define void @DbpString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @DbpStringEx(i32 1, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @DbpString(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @DbpStringEx(i32 1, i8* %0, i32 %2)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
void *error(void *arg, const char *path, const struct stat *st,
            void *continuation) {
  perror(path);
  return NULL;
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rsi,%rdi
call   1030 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i8* @error(i8* %0, i8* %1, %struct.stat* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.stat*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store %struct.stat* %2, %struct.stat** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = call i32 @perror(i8* %9)
ret i8* null
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define noalias i8* @error(i8* nocapture readnone %0, i8* nocapture %1, %struct.stat* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 @perror(i8* %1)
ret i8* null
}
void dummy_fillrectangle(long x1, long y1, long x2, long y2) {
  x1 = x1;
  y1 = y1;
  x2 = x2;
  y2 = y2;
}


x86 assembly (clang, -O0):
<dummy_fillrectangle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_fillrectangle(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
store i64 %9, i64* %5
%10 = load i64, i64* %6
store i64 %10, i64* %6
%11 = load i64, i64* %7
store i64 %11, i64* %7
%12 = load i64, i64* %8
store i64 %12, i64* %8
ret void
}

LLVM IR (-O2):
define void @dummy_fillrectangle(i64 %0, i64 %1, i64 %2, i64 %3) {
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t ALIGN(uint64_t v) { return (v + (512) - 1) & ~((512) - 1); }


x86 assembly (clang, -O0):
<ALIGN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%eax
sub    $0x1,%eax
and    $0xfffffe00,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ALIGN>:
lea    0x1ff(%rdi),%eax
and    $0xfffffe00,%eax
ret

LLVM IR (-O0):
define i32 @ALIGN(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 512
%5 = sub nsw i32 %4, 1
%6 = and i32 %5, -512
ret i32 %6
}

LLVM IR (-O2):
define i32 @ALIGN(i32 %0) {
%2 = add nsw i32 %0, 511
%3 = and i32 %2, -512
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ vec2f(float, float);
float vec2f_dot(int /*<<< orphan*/, int /*<<< orphan*/);
float call_dot2(float x1, float y1, float x2, float y2) {
  return vec2f_dot(vec2f(x1, y1), vec2f(x2, y2));
}


x86 assembly (clang, -O0):
<call_dot2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <vec2f@plt>
mov    %eax,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
call   1040 <vec2f@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1030 <vec2f_dot@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_dot2>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm3,0xc(%rsp)
movss  %xmm2,0x8(%rsp)
call   1040 <vec2f@plt>
mov    %eax,%ebx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <vec2f@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <vec2f_dot@plt>

LLVM IR (-O0):
define float @call_dot2(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call i32 @vec2f(float %9, float %10)
%12 = load float, float* %7
%13 = load float, float* %8
%14 = call i32 @vec2f(float %12, float %13)
%15 = call float @vec2f_dot(i32 %11, i32 %14)
ret float %15
}

LLVM IR (-O2):
define float @call_dot2(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @vec2f(float %0, float %1)
%6 = tail call i32 @vec2f(float %2, float %3)
%7 = tail call float @vec2f_dot(i32 %5, i32 %6)
ret float %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int unknown_uint();
void muliply_one_Good() {
  uint64_t x = unknown_uint();
  uint64_t y = x * 1;
}


x86 assembly (clang, -O0):
<muliply_one_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <unknown_uint@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @muliply_one_Good() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @unknown_uint()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, 1
store i32 %5, i32* %2
ret void
}

LLVM IR (-O2):
define void @muliply_one_Good() {
%1 = tail call i32 (...) @unknown_uint()
ret void
}
void strcpy_(char *dest, const char *src) {
  while (*src) {
    *dest++ = *src++;
  }
  *dest = '\0';
}


x86 assembly (clang, -O0):
<strcpy_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <strcpy_+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <strcpy_+0xc>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_>:
mov    (%rsi),%al
test   %al,%al
je     1121 <strcpy_+0x21>
add    $0x1,%rsi
nopw   0x0(%rax,%rax,1)
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1110 <strcpy_+0x10>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @strcpy_(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
%12 = load i8, i8* %10
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
store i8 %12, i8* %13
br label %5
15: ; preds = %5
%16 = load i8*, i8** %3
store i8 0, i8* %16
ret void
}

LLVM IR (-O2):
define void @strcpy_(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
store i8 0, i8* %14
ret void
}
__attribute__((always_)) int
unregister_module_notifier(struct notifier_block *nb) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.notifier_block = type opaque
define i32 @unregister_module_notifier(%struct.notifier_block* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int strncasecmp(char const *, char const *, int);
int Strnicmp(const char *a, const char *b, int len) {
  return strncasecmp(a, b, len);
}


x86 assembly (clang, -O0):
<Strnicmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strnicmp>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @Strnicmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int flt_cmp_rev(void *a, void *b) {
  if (*(int *)a == *(int *)b) {
    return 0;
  } else if (*(int *)a < *(int *)b) {
    return 1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<flt_cmp_rev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    112a <flt_cmp_rev+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    114f <flt_cmp_rev+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1148 <flt_cmp_rev+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <flt_cmp_rev+0x4f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_cmp_rev>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setl   %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @flt_cmp_rev(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
int test_imm_1Auint8_mem(unsigned char *val) {
  return ((*val) & (-0x1A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Auint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffe6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Auint8_mem>:
testb  $0xe6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Auint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -26
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_1Auint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -26
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void NEOMOTE_1_UART_MOTE_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @NEOMOTE_1_UART_MOTE_SaveConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assume(int /*<<< orphan*/);
int /*<<< orphan*/ __ESBMC_atomic_begin();
int /*<<< orphan*/ __ESBMC_atomic_end();
void wait_event(_Bool e) {
  __ESBMC_atomic_begin();
  if (!e)
    __ESBMC_assume(0);
  __ESBMC_atomic_end();
}


x86 assembly (clang, -O0):
<wait_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <__ESBMC_atomic_begin@plt>
testb  $0x1,-0x1(%rbp)
jne    1158 <wait_event+0x28>
xor    %edi,%edi
call   1040 <__ESBMC_assume@plt>
mov    $0x0,%al
call   1030 <__ESBMC_atomic_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_event>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1050 <__ESBMC_atomic_begin@plt>
test   %ebx,%ebx
jne    1145 <wait_event+0x15>
xor    %edi,%edi
call   1040 <__ESBMC_assume@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <__ESBMC_atomic_end@plt>

LLVM IR (-O0):
define void @wait_event(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = call i32 (...) @__ESBMC_atomic_begin()
%5 = load i8, i8* %2
%6 = trunc i8 %5 to i1
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @__ESBMC_assume(i32 0)
br label %9
9: ; preds = %7, %1
%10 = call i32 (...) @__ESBMC_atomic_end()
ret void
}

LLVM IR (-O2):
define void @wait_event(i1 zeroext %0) {
%2 = tail call i32 (...) @__ESBMC_atomic_begin()
br i1 %0, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @__ESBMC_assume(i32 0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @__ESBMC_atomic_end()
ret void
}
int is_spec(filename) const char *filename;
{
  if (strlen(filename) < 5)
    return 0;
  return strcmp(filename + strlen(filename) - 5, ".spec") == 0;
}


x86 assembly (clang, -O0):
<is_spec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x5,%rax
jae    114b <is_spec+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1181 <is_spec+0x61>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
add    $0xfffffffffffffffb,%rdi
lea    0xe92(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_spec>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x5,%rcx
jb     1151 <is_spec+0x31>
lea    (%rbx,%rcx,1),%rdi
add    $0xfffffffffffffffb,%rdi
lea    0xebd(%rip),%rsi
call   1040 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c".spec\00"
define i32 @is_spec(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strlen(i8* %4)
%6 = icmp ult i64 %5, 5
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %17
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = call i64 @strlen(i8* %10)
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 -5
%14 = call i32 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
store i32 %16, i32* %2
br label %17
17: ; preds = %8, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [6 x i8] c".spec\00"
define i32 @is_spec(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp ult i64 %2, 5
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 %2
%6 = getelementptr inbounds i8, i8* %5, i64 -5
%7 = tail call i32 @strcmp(i8* %6, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}
long __syscall4(long n, long a1, long a2, long a3, long a4) {
  unsigned long __ret;
  __asm__ __volatile__("call *%%gs:16"
                       : "=a"(__ret)
                       : "a"(n), "b"(a1), "c"(a2), "d"(a3), "S"(a4)
                       : "memory");
  return __ret;
}


x86 assembly (clang, -O0):
<__syscall4>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rbx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rsi
call   *%gs:0x10
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall4>:
push   %rbx
mov    %rcx,%r9
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    %rdi,%rax
mov    %r8,%rsi
mov    %r9,%rdx
call   *%gs:0x10
pop    %rbx
ret

LLVM IR (-O0):
define i64 @__syscall4(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = load i64, i64* %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = call i64 asm sideeffect "call *%gs:16", "={ax},{ax},{bx},{cx},{dx},{si},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %12, i64 %13, i64 %14, i64 %15, i64 %16)
store i64 %17, i64* %11
%18 = load i64, i64* %11
ret i64 %18
}

LLVM IR (-O2):
define i64 @__syscall4(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i64 asm sideeffect "call *%gs:16", "={ax},{ax},{bx},{cx},{dx},{si},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret i64 %6
}