xunge/DecIR huggingface dataset:
void strsplit_free(char **tokens) {
  free(*tokens);
  free(tokens);
}


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

x86 assembly (clang, -O2):
<strsplit_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @strsplit_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
tail call void @free(i8* %2)
%3 = bitcast i8** %0 to i8*
tail call void @free(i8* %3)
ret void
}
/* Variables and functions */
int Pop();
int /*<<< orphan*/ Push(int);
void DoDiv() {
  int a = Pop();
  int b = Pop();
  Push(b / a);
}


x86 assembly (clang, -O0):
<DoDiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%edi
call   1040 <Push@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDiv>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
cltd
idiv   %ebx
mov    %eax,%edi
pop    %rbx
jmp    1040 <Push@plt>

LLVM IR (-O0):
define void @DoDiv() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @Pop()
store i32 %3, i32* %1
%4 = call i32 (...) @Pop()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = sdiv i32 %5, %6
%8 = call i32 @Push(i32 %7)
ret void
}

LLVM IR (-O2):
define void @DoDiv() {
%1 = tail call i32 (...) @Pop()
%2 = tail call i32 (...) @Pop()
%3 = sdiv i32 %2, %1
%4 = tail call i32 @Push(i32 %3)
ret void
}
void SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond(
    void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond = [65 x i8] c"SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond\00"
define void @SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @__func__.SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond = [65 x i8] c"SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond\00"
define void @SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @__func__.SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int umin32(uint32_t a, uint32_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<umin32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <umin32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <umin32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umin32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @umin32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @umin32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *zalloc(size_t size) {
  void *p = malloc(size);
  memset(p, 0, size);
  return p;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @zalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
void i2d_OCSP_CERTID(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_OCSP_CERTID() {
ret void
}
int mod(int n, int m) {
  int r = n % m;
  return r < 0 ? r + m : r;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112c <mod+0x2c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <mod+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mod(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %11
%18 = phi i32 [ %14, %11 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
void do_overflow_string() {
  char buf[0x10];
  scanf("%s", buf);
}


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

x86 assembly (clang, -O2):
<do_overflow_string>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
mov    %rsp,%rsi
call   1030 <scanf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @do_overflow_string() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @do_overflow_string() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void close_connection(int file, char *fichero) {
  if (close(file) < 0) {
    printf("Unable to close slave\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<close_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0x0,%rax
jge    1167 <close_connection+0x37>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_connection>:
push   %rax
call   1040 <close@plt>
test   %rax,%rax
js     113d <close_connection+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@str = [22 x i8] c"Unable to close slave\00"
define void @close_connection(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i64 @close(i32 %0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
void pid_eeprom_write(void) {}


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

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

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

LLVM IR (-O2):
define void @pid_eeprom_write() {
ret void
}
void test_invalid_clause() {
  int i;
#pragma omp parallel
#pragma omp taskloop simd foo bar
  for (i = 0; i < 16; ++i)
    ;
#pragma omp taskloop simd nogroup nogroup
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_invalid_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_invalid_clause+0x28>
jmp    111a <test_invalid_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_invalid_clause+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_invalid_clause+0x4c>
jmp    113e <test_invalid_clause+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_invalid_clause+0x2f>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_invalid_clause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadQueryReaction(int);
int indigoReadFile(char const *);
__attribute__((visibility("default"))) int
indigoLoadQueryReactionFromFile(const char *filename) {
  int source = indigoReadFile(filename);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadQueryReaction(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadQueryReactionFromFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <indigoReadFile@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadQueryReactionFromFile+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadQueryReactionFromFile+0x47>
mov    -0x14(%rbp),%edi
call   1040 <indigoLoadQueryReaction@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadQueryReactionFromFile>:
push   %rbp
push   %rbx
push   %rax
call   1030 <indigoReadFile@plt>
test   %eax,%eax
jle    1152 <indigoLoadQueryReactionFromFile+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadQueryReaction@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadQueryReactionFromFile+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadQueryReactionFromFile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @indigoReadFile(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @indigoLoadQueryReaction(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @indigoLoadQueryReactionFromFile(i8* %0) {
%2 = tail call i32 @indigoReadFile(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadQueryReaction(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int depth;
};
typedef TYPE_1__ ScreenFormat;

/* Variables and functions */
void set_ScreenFormat_depth(void *_p, int _v) {
  ((ScreenFormat *)_p)->depth = (int)_v;
}


x86 assembly (clang, -O0):
<set_ScreenFormat_depth>:
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_ScreenFormat_depth>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_ScreenFormat_depth(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_ScreenFormat_depth(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int test_imm_70int16_reg(short val) {
  return ((val) & (0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x70,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_70int16_reg>:
test   $0x70,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_70int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 112
%6 = icmp ne i32 %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_70int16_reg(i16 signext %0) {
%2 = and i16 %0, 112
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int bit_scan_reverse(unsigned long long mask) {
  return 63 - __builtin_clzll(mask);
}


x86 assembly (clang, -O0):
<bit_scan_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,%ecx
mov    $0x3f,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_scan_reverse>:
bsr    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @bit_scan_reverse(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctlz.i64(i64 %3, i1 true)
%5 = trunc i64 %4 to i32
%6 = sub nsw i32 63, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @bit_scan_reverse(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 true)
%3 = trunc i64 %2 to i32
%4 = xor i32 %3, 63
ret i32 %4
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 8 * 100 + 2); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10802
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10802
}
int main(void) {
  volatile char a[1] = {0};
  volatile int idx = 1;
  return a[idx];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
lea    -0x5(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltq
mov    -0x5(%rbp,%rax,1),%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movb   $0x0,-0x5(%rsp)
movl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
movsbl -0x5(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [1 x i8]* %2 to i8*
store volatile i32 1, i32* %3
%5 = load volatile i32, i32* %3
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 %6
%8 = load volatile i8, i8* %7
%9 = sext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
store volatile i8 0, i8* %1
%3 = bitcast i32* %2 to i8*
store volatile i32 1, i32* %2
%4 = load volatile i32, i32* %2
%5 = load volatile i8, i8* %1
%6 = sext i8 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ draw_ball();
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  draw_ball();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1050 <draw_ball@plt>
mov    $0x0,%al
call   1040 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1050 <draw_ball@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = call i32 (...) @draw_ball()
%4 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = tail call i32 (...) @draw_ball()
%4 = tail call i32 (...) @glFlush()
ret void
}
/* Variables and functions */
int _BinarySearch(int *, int /*<<< orphan*/, int, int);
int BinarySearch(int *arr, int len, int tgt) {
  return _BinarySearch(arr, 0, len - 1, tgt);
}


x86 assembly (clang, -O0):
<BinarySearch>:
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),%edx
sub    $0x1,%edx
mov    -0x10(%rbp),%ecx
xor    %esi,%esi
call   1030 <_BinarySearch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BinarySearch>:
mov    %edx,%ecx
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <_BinarySearch@plt>

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

LLVM IR (-O2):
define i32 @BinarySearch(i32* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, -1
%5 = tail call i32 @_BinarySearch(i32* %0, i32 0, i32 %4, i32 %2)
ret i32 %5
}
float add_float(register float u, register float v) { return u + v; }


x86 assembly (clang, -O0):
<add_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_float>:
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @add_float(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fadd float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @add_float(float %0, float %1) {
%3 = fadd float %0, %1
ret float %3
}
char f_char() {
  char c, *cc;
  c = 256;
  cc = &c;
  return *cc;
}


x86 assembly (clang, -O0):
<f_char>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
lea    -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @f_char() {
ret i8 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double orbit;
  float miles = 378921.46 * 0.621371192;
  orbit = miles * 2 * 3.14159265358979;
  printf("The moon travels %f miles  in one orbit\n", orbit);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee5(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xed4(%rip),%xmm0
mulss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"The moon travels %f miles in one orbit\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca float
store i32 0, i32* %1
store float 0x410CBDD700000000, float* %3
%4 = load float, float* %3
%5 = fmul float %4, 2.000000e+00
%6 = fpext float %5 to double
%7 = fmul double %6, 0x400921FB54442D11
store double %7, double* %2
%8 = load double, double* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"The moon travels %f miles in one orbit\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), double 0x413692D57A75F843)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint16_t sancus_u16zu(size_t v) {
  assert(v <= 0xffff);
  return (uint16_t)v;
}


x86 assembly (clang, -O0):
<sancus_u16zu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xffff,-0x8(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_u16zu>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x10000,%rbx
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sancus_u16zu(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ule i64 %3, 65535
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i64, i64* %2
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @sancus_u16zu(i64 %0) {
%2 = icmp ult i64 %0, 65536
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = trunc i64 %0 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int mkdir(char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "Usage:mkdir name ...");
    _exit(0);
  }
  return mkdir(argv[1], 0777);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116c <main+0x3c>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x1ff,%esi
call   1040 <mkdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1145 <main+0x15>
mov    0x8(%rsi),%rdi
mov    $0x1ff,%esi
pop    %rax
jmp    1040 <mkdir@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Usage:mkdir name ...\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @_exit(i32 0)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @mkdir(i8* %15, i32 511)
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Usage:mkdir name ...\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @_exit(i32 0)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @mkdir(i8* %10, i32 511)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void htmlHeader(char *title) {
  printf("Content-type: text/html\n\n<HTML><HEAD><TITLE>%s</TITLE></HEAD>",
         title);
}


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

x86 assembly (clang, -O2):
<htmlHeader>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"Content-type: text/html\0A\0A<HTML><HEAD><TITLE>%s</TITLE></HEAD>\00"
define void @htmlHeader(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"Content-type: text/html\0A\0A<HTML><HEAD><TITLE>%s</TITLE></HEAD>\00"
define void @htmlHeader(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int munmap(void *, size_t);
int mmap_free(void *ptr, size_t size) {
  if (ptr == NULL) {
    errno = EINVAL;
    return -1;
  }
  if (munmap(ptr, size) == -1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<mmap_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <mmap_free+0x39>
mov    0x2ea6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea5(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <mmap_free+0x62>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <munmap@plt>
cmp    $0xffffffff,%eax
jne    116b <mmap_free+0x5b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <mmap_free+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmap_free>:
push   %rax
test   %rdi,%rdi
je     1129 <mmap_free+0x19>
call   1030 <munmap@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
neg    %eax
pop    %rcx
ret
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    0x2ea7(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @mmap_free(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* @EINVAL
store i32 %9, i32* @errno
store i32 -1, i32* %3
br label %17
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = call i32 @munmap(i8* %11, i64 %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 -1, i32* %3
br label %17
16: ; preds = %10
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @mmap_free(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
br label %10
6: ; preds = %2
%7 = tail call i32 @munmap(i8* %0, i64 %1)
%8 = icmp eq i32 %7, -1
%9 = sext i1 %8 to i32
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ -1, %4 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ path_alloc();
int main(int argc, char *argv[]) {
  free(path_alloc());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <path_alloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @path_alloc()
%7 = call i32 @free(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @path_alloc()
%4 = tail call i32 @free(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_JMP();
void do0xCB() { _I8080_JMP(); }


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

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

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

LLVM IR (-O2):
define void @do0xCB() {
%1 = tail call i32 (...) @_I8080_JMP()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
void _mm_store_si128(__m128i *p, __m128i b) { *p = b; }


x86 assembly (clang, -O0):
<_mm_store_si128>:
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):
<_mm_store_si128>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @_mm_store_si128(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
int RTP_get_marker(unsigned char *p) { return ((unsigned int)p[1]) >> 7; }


x86 assembly (clang, -O0):
<RTP_get_marker>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shr    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_get_marker>:
movzbl 0x1(%rdi),%eax
shr    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @RTP_get_marker(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = lshr i32 %6, 7
ret i32 %7
}

LLVM IR (-O2):
define i32 @RTP_get_marker(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = lshr i8 %3, 7
%5 = zext i8 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int __kill(int /*<<< orphan*/, int, int /*<<< orphan*/);
int kill(pid_t pid, int sig) { return (__kill(pid, sig, 0)); }


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <__kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill>:
xor    %edx,%edx
jmp    1030 <__kill@plt>

LLVM IR (-O0):
define i32 @kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__kill(i32 %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
%3 = tail call i32 @__kill(i32 %0, i32 %1, i32 0)
ret i32 %3
}
/* Type definitions */
struct i2c_client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_value(int, struct i2c_client *);
int gslX680_shutdown_high(struct i2c_client *cliente) {
  send_value(1, cliente);
  return 0;
}


x86 assembly (clang, -O0):
<gslX680_shutdown_high>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <send_value@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gslX680_shutdown_high>:
push   %rax
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <send_value@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.i2c_client = type { i32 }
define i32 @gslX680_shutdown_high(%struct.i2c_client* %0) {
%2 = alloca %struct.i2c_client*
store %struct.i2c_client* %0, %struct.i2c_client** %2
%3 = load %struct.i2c_client*, %struct.i2c_client** %2
%4 = call i32 @send_value(i32 1, %struct.i2c_client* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.i2c_client = type { i32 }
define i32 @gslX680_shutdown_high(%struct.i2c_client* %0) {
%2 = tail call i32 @send_value(i32 1, %struct.i2c_client* %0)
ret i32 0
}
int test_imm_8Aint64_midword_reg(long long val) {
  return ((val >> 16) & (0x8A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Aint64_midword_reg>:
test   $0x8a0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Aint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 138
%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_8Aint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9043968
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void X509_NAME_add_entry_by_txt(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_add_entry_by_txt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ array_heap_save(void *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_array_heap(void *s, int nproc) { array_heap_save(s, nproc, stdout); }


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

x86 assembly (clang, -O2):
<print_array_heap>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <array_heap_save@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_array_heap(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 i32, i32* @stdout
%8 = call i32 @array_heap_save(i8* %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_array_heap(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @array_heap_save(i8* %0, i32 %1, i32 %3)
ret void
}
void gtk_file_filter_add_pattern() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_filter_add_pattern() {
ret void
}
void __parse_string_count(void *user, char c) {
  (void)c;
  (*(int *)user)++;
}


x86 assembly (clang, -O0):
<__parse_string_count>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__parse_string_count>:
addl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @__parse_string_count(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @__parse_string_count(i8* nocapture %0, i8 signext %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CC2420CsmaP__CC2420Power__startVRegDone();
void CC2420ControlP__CC2420Power__startVRegDone(void) {
  CC2420CsmaP__CC2420Power__startVRegDone();
}


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__CC2420Power__startVRegDone() {
%1 = tail call i32 (...) @CC2420CsmaP__CC2420Power__startVRegDone()
ret void
}
void key_1_handler(void) {
  if ((*(volatile unsigned int *)(0x7F008824)) & 1) {
    (*(volatile unsigned int *)(0x7F008824)) &= ~1;
  } else {
    (*(volatile unsigned int *)(0x7F008824)) |= 1;
  }
  return;
}


x86 assembly (clang, -O0):
<key_1_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008824,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112d <key_1_handler+0x2d>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
jmp    113e <key_1_handler+0x3e>
mov    $0x7f008824,%eax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    $0x7f008824,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_1_handler>:
mov    0x7f008824,%eax
and    $0x1,%eax
mov    0x7f008824,%ecx
and    $0xfffffffe,%ecx
or     %eax,%ecx
xor    $0x1,%ecx
mov    %ecx,0x7f008824
ret

LLVM IR (-O0):
define void @key_1_handler() {
%1 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%6 = and i32 %5, -2
store volatile i32 %6, i32* inttoptr (i64 2130741284 to i32*)
br label %10
7: ; preds = %0
%8 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%9 = or i32 %8, 1
store volatile i32 %9, i32* inttoptr (i64 2130741284 to i32*)
br label %10
10: ; preds = %7, %4
ret void
}

LLVM IR (-O2):
define void @key_1_handler() {
%1 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%2 = and i32 %1, 1
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = and i32 %3, -2
%5 = or i32 %2, %4
%6 = xor i32 %5, 1
store volatile i32 %6, i32* inttoptr (i64 2130741284 to i32*)
ret void
}
extern double n1n2n3d1(int n1, int n2, int n3, double d1) {
  return n1 + n2 + n3 + d1;
}


x86 assembly (clang, -O0):
<n1n2n3d1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<n1n2n3d1>:
add    %esi,%edi
add    %edx,%edi
cvtsi2sd %edi,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @n1n2n3d1(i32 %0, i32 %1, i32 %2, double %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to double
%15 = load double, double* %8
%16 = fadd double %14, %15
ret double %16
}

LLVM IR (-O2):
define double @n1n2n3d1(i32 %0, i32 %1, i32 %2, double %3) {
%5 = add nsw i32 %1, %0
%6 = add nsw i32 %5, %2
%7 = sitofp i32 %6 to double
%8 = fadd double %7, %3
ret double %8
}
/* Variables and functions */
scalar_t__ hits(char *, char *, int);
scalar_t__ pseudo(char *, char *, int);
int test_no_hits_no_pseudo() {
  char actual[] = {'R', 'R', 'R', 'R'};
  char guess[] = {'G', 'G', 'G', 'G'};
  return 0 == hits(actual, guess, 4) && 0 == pseudo(actual, guess, 4);
}


x86 assembly (clang, -O0):
<test_no_hits_no_pseudo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xecd(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <hits@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0x9(%rbp)
jne    117f <test_no_hits_no_pseudo+0x5f>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <pseudo@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_no_hits_no_pseudo>:
push   %rax
movl   $0x52525252,0x4(%rsp)
52
movl   $0x47474747,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1040 <hits@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     114e <test_no_hits_no_pseudo+0x2e>
pop    %rcx
ret
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <pseudo@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@__const.test_no_hits_no_pseudo.actual = [4 x i8] c"RRRR"
@__const.test_no_hits_no_pseudo.guess = [4 x i8] c"GGGG"
define i32 @test_no_hits_no_pseudo() {
%1 = alloca [4 x i8]
%2 = alloca [4 x i8]
%3 = bitcast [4 x i8]* %1 to i8*
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%7 = call i64 @hits(i8* %5, i8* %6, i32 4)
%8 = icmp eq i64 0, %7
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%12 = call i64 @pseudo(i8* %10, i8* %11, i32 4)
%13 = icmp eq i64 0, %12
br label %14
14: ; preds = %9, %0
%15 = phi i1 [ false, %0 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_no_hits_no_pseudo() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1381126738, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1195853639, i32* %2
%5 = call i64 @hits(i8* %3, i8* %4, i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call i64 @pseudo(i8* %3, i8* %4, i32 4)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %0
%12 = phi i32 [ 0, %0 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ right_motor_speed_received(unsigned char);
void notify_right_motor_speed_received(unsigned char speed) {
  right_motor_speed_received(speed);
}


x86 assembly (clang, -O0):
<notify_right_motor_speed_received>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <right_motor_speed_received@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notify_right_motor_speed_received>:
jmp    1030 <right_motor_speed_received@plt>

LLVM IR (-O0):
define void @notify_right_motor_speed_received(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @right_motor_speed_received(i8 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @notify_right_motor_speed_received(i8 zeroext %0) {
%2 = tail call i32 @right_motor_speed_received(i8 zeroext %0)
ret void
}
/* Variables and functions */
float __ocml_atanh_f32(float);
float atanhf(float x) { return __ocml_atanh_f32(x); }


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

x86 assembly (clang, -O2):
<atanhf>:
jmp    1030 <__ocml_atanh_f32@plt>

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

LLVM IR (-O2):
define float @atanhf(float %0) {
%2 = tail call float @__ocml_atanh_f32(float %0)
ret float %2
}
void list_rmdup2(struct linked_list *list) {}


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

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

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

LLVM IR (-O2):
%struct.linked_list = type opaque
define void @list_rmdup2(%struct.linked_list* nocapture %0) {
ret void
}