xunge/DecIR huggingface dataset:
/* Type definitions */
struct growing_keyvals {
  int dummy;
};

/* Variables and functions */
int comments_add(struct growing_keyvals *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ xstrdup(char const *);
int comments_add_const(struct growing_keyvals *c, const char *key,
                       const char *val) {
  return comments_add(c, key, xstrdup(val));
}


x86 assembly (clang, -O0):
<comments_add_const>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <xstrdup@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <comments_add@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comments_add_const>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <xstrdup@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <comments_add@plt>

LLVM IR (-O0):
%struct.growing_keyvals = type { i32 }
define i32 @comments_add_const(%struct.growing_keyvals* %0, i8* %1, i8* %2) {
%4 = alloca %struct.growing_keyvals*
%5 = alloca i8*
%6 = alloca i8*
store %struct.growing_keyvals* %0, %struct.growing_keyvals** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.growing_keyvals*, %struct.growing_keyvals** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @xstrdup(i8* %9)
%11 = call i32 @comments_add(%struct.growing_keyvals* %7, i8* %8, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.growing_keyvals = type { i32 }
define i32 @comments_add_const(%struct.growing_keyvals* %0, i8* %1, i8* %2) {
%4 = tail call i32 @xstrdup(i8* %2)
%5 = tail call i32 @comments_add(%struct.growing_keyvals* %0, i8* %1, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void __VERIFIER_assert(int expression) {
  if (!expression) {
    fprintf(stderr, "__VERIFIER_assert(): Assertion failed\n");
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<__VERIFIER_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1151 <__VERIFIER_assert+0x31>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_assert>:
test   %edi,%edi
je     1125 <__VERIFIER_assert+0x5>
ret
push   %rax
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"__VERIFIER_assert(): Assertion failed\0A\00"
define void @__VERIFIER_assert(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @__VERIFIER_error()
br label %9
9: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"__VERIFIER_assert(): Assertion failed\0A\00"
define void @__VERIFIER_assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @__VERIFIER_error()
br label %7
7: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NW_ShellExc(char *);
void NW_InquireRoute(void) { NW_ShellExc("route"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"route\00"
define void @NW_InquireRoute() {
%1 = call i32 @NW_ShellExc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"route\00"
define void @NW_InquireRoute() {
%1 = tail call i32 @NW_ShellExc(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uartInit();
int /*<<< orphan*/ uartSendString(char *);
int /*<<< orphan*/ uartSetBaudRate(int);
int main(void) {
  uartInit();
  uartSetBaudRate(9600);
  uartSendString("Hello World!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <uartInit@plt>
mov    $0x2580,%edi
call   1030 <uartSetBaudRate@plt>
lea    0xea9(%rip),%rdi
call   1050 <uartSendString@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <uartInit@plt>
mov    $0x2580,%edi
call   1030 <uartSetBaudRate@plt>
lea    0xeb7(%rip),%rdi
call   1050 <uartSendString@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @uartInit()
%3 = call i32 @uartSetBaudRate(i32 9600)
%4 = call i32 @uartSendString(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 (...) @uartInit()
%2 = tail call i32 @uartSetBaudRate(i32 9600)
%3 = tail call i32 @uartSendString(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void fatal_error(const char *msg) {
  fprintf(stderr, "%s (errno: %s)\n", msg, strerror(errno));
  exit(1);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"%s (errno: %s)\0A\00"
@errno = global i32 0
define void @fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"%s (errno: %s)\0A\00"
@errno = global i32 0
define void @fatal_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
void PUT_UAA32LE(void *p, unsigned int v, unsigned int i) {
  unsigned char *_p = (unsigned char *)&((unsigned int *)p)[i];
  _p[0] = (unsigned char)(v);
  _p[1] = (unsigned char)(v >> 8);
  _p[2] = (unsigned char)(v >> 16);
  _p[3] = (unsigned char)(v >> 24);
}


x86 assembly (clang, -O0):
<PUT_UAA32LE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PUT_UAA32LE>:
mov    %edx,%eax
mov    %esi,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @PUT_UAA32LE(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %6
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = bitcast i32* %12 to i8*
store i8* %13, i8** %7
%14 = load i32, i32* %5
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %7
%17 = getelementptr inbounds i8, i8* %16, i64 0
store i8 %15, i8* %17
%18 = load i32, i32* %5
%19 = lshr i32 %18, 8
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %7
%22 = getelementptr inbounds i8, i8* %21, i64 1
store i8 %20, i8* %22
%23 = load i32, i32* %5
%24 = lshr i32 %23, 16
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %7
%27 = getelementptr inbounds i8, i8* %26, i64 2
store i8 %25, i8* %27
%28 = load i32, i32* %5
%29 = lshr i32 %28, 24
%30 = trunc i32 %29 to i8
%31 = load i8*, i8** %7
%32 = getelementptr inbounds i8, i8* %31, i64 3
store i8 %30, i8* %32
ret void
}

LLVM IR (-O2):
define void @PUT_UAA32LE(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
%7 = bitcast i32* %6 to i8*
%8 = trunc i32 %1 to i8
store i8 %8, i8* %7
%9 = lshr i32 %1, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %11
%12 = lshr i32 %1, 16
%13 = trunc i32 %12 to i8
%14 = getelementptr inbounds i8, i8* %7, i64 2
store i8 %13, i8* %14
%15 = lshr i32 %1, 24
%16 = trunc i32 %15 to i8
%17 = getelementptr inbounds i8, i8* %7, i64 3
store i8 %16, i8* %17
ret void
}
int system(const char *string) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @system(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ buf_escape(int /*<<< orphan*/);
int /*<<< orphan*/ term_move_cursor(int, int);
void buf_move_cursor(int x, int y) { buf_escape(term_move_cursor(x, y)); }


x86 assembly (clang, -O0):
<buf_move_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <term_move_cursor@plt>
mov    %eax,%edi
call   1040 <buf_escape@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_move_cursor>:
push   %rax
call   1030 <term_move_cursor@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <buf_escape@plt>

LLVM IR (-O0):
define void @buf_move_cursor(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 @term_move_cursor(i32 %5, i32 %6)
%8 = call i32 @buf_escape(i32 %7)
ret void
}

LLVM IR (-O2):
define void @buf_move_cursor(i32 %0, i32 %1) {
%3 = tail call i32 @term_move_cursor(i32 %0, i32 %1)
%4 = tail call i32 @buf_escape(i32 %3)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ add_sentence(int *, int /*<<< orphan*/ *, int *, int);
void gen_st_water_temp_27(uint8_t *b, uint32_t *buflen) {
  uint8_t sentence[] = {0x27, 0x01, 0x40, 0x01};
  add_sentence(b, buflen, sentence, 4);
}


x86 assembly (clang, -O0):
<gen_st_water_temp_27>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x4,%ecx
call   1030 <add_sentence@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_st_water_temp_27>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x4,%ecx
call   1030 <add_sentence@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.gen_st_water_temp_27.sentence = [4 x i32] [i32 39, i32 1, i32 64, i32 1]
define void @gen_st_water_temp_27(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [4 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = bitcast [4 x i32]* %5 to i8*
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%10 = call i32 @add_sentence(i32* %7, i32* %8, i32* %9, i32 4)
ret void
}

LLVM IR (-O2):
@__const.gen_st_water_temp_27.sentence = [4 x i32] [i32 39, i32 1, i32 64, i32 1]
define void @gen_st_water_temp_27(i32* %0, i32* %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @add_sentence(i32* %0, i32* %1, i32* %5, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void MyApiFun1() { printf("this is MyApiFun1()\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"this is MyApiFun1()\0A\00"
define void @MyApiFun1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"this is MyApiFun1()\00"
define void @MyApiFun1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float asinf(float);
float gb_arcsin(float a) { return asinf(a); }


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

x86 assembly (clang, -O2):
<gb_arcsin>:
jmp    1030 <asinf@plt>

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

LLVM IR (-O2):
define float @gb_arcsin(float %0) {
%2 = tail call float @asinf(float %0)
ret float %2
}
/* Type definitions */
struct fopen_info {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *tmpfile();
FILE *hosts_fopen(struct fopen_info *info, const char *path, const char *mode) {
  return tmpfile();
}


x86 assembly (clang, -O0):
<hosts_fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <tmpfile@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.fopen_info = type { i32 }
define i32* @hosts_fopen(%struct.fopen_info* %0, i8* %1, i8* %2) {
%4 = alloca %struct.fopen_info*
%5 = alloca i8*
%6 = alloca i8*
store %struct.fopen_info* %0, %struct.fopen_info** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call i32* (...) @tmpfile()
ret i32* %7
}

LLVM IR (-O2):
%struct.fopen_info = type { i32 }
define noalias i32* @hosts_fopen(%struct.fopen_info* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32* (...) @tmpfile()
ret i32* %4
}
int ops_pddlwrap() { return 1; }


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

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

LLVM IR (-O0):
define i32 @ops_pddlwrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ops_pddlwrap() {
ret i32 1
}
void foo223(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo223(i32 %0) {
ret void
}
void test_one(int x) {
#pragma omp target parallel for
  for (int i = 0; i < x; i++)
    ;
}


x86 assembly (clang, -O0):
<test_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <test_one+0x2d>
jmp    111f <test_one+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <test_one+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_one(i32 %0) {
ret void
}
int test_anyOddBit(int x) {
  int i;
  for (i = 1; i < 32; i += 2)
    if (x & (1 << i))
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test_anyOddBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1151 <test_anyOddBit+0x51>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     113e <test_anyOddBit+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1158 <test_anyOddBit+0x58>
jmp    1143 <test_anyOddBit+0x43>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <test_anyOddBit+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anyOddBit>:
xor    %eax,%eax
test   $0xaaaaaaaa,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @test_anyOddBit(i32 %0) {
%2 = and i32 %0, -1431655766
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int sock_dd_progress() { return 1; }


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

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

LLVM IR (-O0):
define i32 @sock_dd_progress() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sock_dd_progress() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\nUsage:\n\tudpgen <host> <port>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"\0AUsage:\0A\09udpgen <host> <port>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [30 x i8] c"\0AUsage:\0A\09udpgen <host> <port>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int f453(int *);
int f454(int *p) { return f453(p); }


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

x86 assembly (clang, -O2):
<f454>:
jmp    1030 <f453@plt>

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

LLVM IR (-O2):
define i32 @f454(i32* %0) {
%2 = tail call i32 @f453(i32* %0)
ret i32 %2
}
/* Variables and functions */
int rand();
int u_next(int n) { return rand() % n; }


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

x86 assembly (clang, -O2):
<u_next>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @u_next(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @u_next(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
void pps1() {}


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

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

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

LLVM IR (-O2):
define void @pps1() {
ret void
}
void worldspawn() {}


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

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

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

LLVM IR (-O2):
define void @worldspawn() {
ret void
}
void InsertDplRow(int i, int ifir, int *ifirst, int *ilink) {
  int temp;
  temp = ifirst[ifir];
  ifirst[ifir] = i;
  ilink[i] = temp;
}


x86 assembly (clang, -O0):
<InsertDplRow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InsertDplRow>:
movslq %esi,%rax
mov    (%rdx,%rax,4),%esi
mov    %edi,(%rdx,%rax,4)
movslq %edi,%rax
mov    %esi,(%rcx,%rax,4)
ret

LLVM IR (-O0):
define void @InsertDplRow(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load i32*, i32** %7
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
store i32 %14, i32* %9
%15 = load i32, i32* %5
%16 = load i32*, i32** %7
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
%20 = load i32, i32* %9
%21 = load i32*, i32** %8
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
store i32 %20, i32* %24
ret void
}

LLVM IR (-O2):
define void @InsertDplRow(i32 %0, i32 %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %2, i64 %5
%7 = load i32, i32* %6
store i32 %0, i32* %6
%8 = sext i32 %0 to i64
%9 = getelementptr inbounds i32, i32* %3, i64 %8
store i32 %7, i32* %9
ret void
}
/* Type definitions */
struct sip_msg {
  int dummy;
};

/* Variables and functions */
int sl_send_reply(struct sip_msg *, unsigned int, char *);
int w_sl_send_reply(struct sip_msg *msg, char *str, char *str2) {
  return sl_send_reply(msg, (unsigned int)(unsigned long)str, str2);
}


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

x86 assembly (clang, -O2):
<w_sl_send_reply>:
jmp    1030 <sl_send_reply@plt>

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
define i32 @w_sl_send_reply(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.sip_msg*, %struct.sip_msg** %4
%8 = load i8*, i8** %5
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
%11 = load i8*, i8** %6
%12 = call i32 @sl_send_reply(%struct.sip_msg* %7, i32 %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
define i32 @w_sl_send_reply(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @sl_send_reply(%struct.sip_msg* %0, i32 %5, i8* %2)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  long long quot;
  long long rem;
};
typedef TYPE_1__ lldiv_t;

/* Variables and functions */
lldiv_t lldiv(long long int numer, long long int denom) {
  lldiv_t result;
  result.quot = numer / denom;
  result.rem = numer % denom;
  return result;
}


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

x86 assembly (clang, -O2):
<lldiv>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <lldiv+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = sdiv i64 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = srem i64 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i64 %12, i64* %13
%14 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%15 = load { i64, i64 }, { i64, i64 }* %14
ret { i64, i64 } %15
}

LLVM IR (-O2):
define { i64, i64 } @lldiv(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = srem i64 %0, %1
%5 = insertvalue { i64, i64 } poison, i64 %3, 0
%6 = insertvalue { i64, i64 } %5, i64 %4, 1
ret { i64, i64 } %6
}
int PyMPELog_Start(void) {
  int ierr = 0;
  return ierr;
}


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

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

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

LLVM IR (-O2):
define i32 @PyMPELog_Start() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned char, int);
int /*<<< orphan*/ outl(int, int);
void pci_write_config8(unsigned addr, unsigned char value) {
  outl(0x80000000 | (addr & ~3), 0xCF8);
  outb(value, 0xCFC + (addr & 3));
}


x86 assembly (clang, -O0):
<pci_write_config8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
and    $0xfffffffc,%edi
or     $0x80000000,%edi
mov    $0xcf8,%esi
call   1040 <outl@plt>
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%esi
and    $0x3,%esi
add    $0xcfc,%esi
movzbl %al,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_write_config8>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
and    $0x7ffffffc,%edi
or     $0x80000000,%edi
mov    $0xcf8,%esi
call   1040 <outl@plt>
or     $0xcfc,%ebp
and    $0xcff,%ebp
mov    %ebx,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @pci_write_config8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = and i32 %5, -4
%7 = or i32 -2147483648, %6
%8 = call i32 @outl(i32 %7, i32 3320)
%9 = load i8, i8* %4
%10 = load i32, i32* %3
%11 = and i32 %10, 3
%12 = add i32 3324, %11
%13 = call i32 @outb(i8 zeroext %9, i32 %12)
ret void
}

LLVM IR (-O2):
define void @pci_write_config8(i32 %0, i8 zeroext %1) {
%3 = and i32 %0, 2147483644
%4 = or i32 %3, -2147483648
%5 = tail call i32 @outl(i32 %4, i32 3320)
%6 = and i32 %0, 3
%7 = or i32 %6, 3324
%8 = tail call i32 @outb(i8 zeroext %1, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alignbits();
int /*<<< orphan*/ putbits(int, int);
void putuserdata(char *userdata) {
  char *tmp;
  {
    alignbits();
    putbits(434, 32);
    while (*userdata) {
      tmp = userdata;
      userdata++;
      putbits((int)*tmp, 8);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<putuserdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <alignbits@plt>
mov    $0x1b2,%edi
mov    $0x20,%esi
call   1040 <putbits@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1179 <putuserdata+0x59>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
mov    $0x8,%esi
call   1040 <putbits@plt>
jmp    1142 <putuserdata+0x22>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putuserdata>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <alignbits@plt>
mov    $0x1b2,%edi
mov    $0x20,%esi
call   1040 <putbits@plt>
mov    (%rbx),%al
test   %al,%al
je     1168 <putuserdata+0x48>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
mov    $0x8,%esi
call   1040 <putbits@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1150 <putuserdata+0x30>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @putuserdata(i8* nocapture %0) {
%2 = tail call i32 (...) @alignbits()
%3 = tail call i32 @putbits(i32 434, i32 32)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1, %6
%7 = phi i8 [ %12, %6 ], [ %4, %1 ]
%8 = phi i8* [ %9, %6 ], [ %0, %1 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %7 to i32
%11 = tail call i32 @putbits(i32 %10, i32 8)
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %1
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_coding(__le16 fc) {
  return (fc & cpu_to_le16(0x000c)) == cpu_to_le16(0x000c);
}


x86 assembly (clang, -O0):
<ieee80211_is_coding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_coding>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xc,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_coding(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 12)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 12)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_coding(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 12)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 12)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_SINGLESTEP;
int /*<<< orphan*/ perror(char *);
scalar_t__ ptrace(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
                  int /*<<< orphan*/);
int /*<<< orphan*/ xibugger_wait(int /*<<< orphan*/);
void execute_singlestep(pid_t pid) {
  if (ptrace(PTRACE_SINGLESTEP, pid, 0, 0) < 0) {
    perror("error execute_singlestep:ptrace()\n");
    return;
  }
  xibugger_wait(pid);
}


x86 assembly (clang, -O0):
<execute_singlestep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1040 <ptrace@plt>
cmp    $0x0,%rax
jge    116b <execute_singlestep+0x3b>
lea    0xe9f(%rip),%rdi
call   1050 <perror@plt>
jmp    1173 <execute_singlestep+0x43>
mov    -0x4(%rbp),%edi
call   1030 <xibugger_wait@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execute_singlestep>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    %ebx,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <ptrace@plt>
test   %rax,%rax
js     1154 <execute_singlestep+0x24>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <xibugger_wait@plt>
lea    0xea5(%rip),%rdi
pop    %rbx
jmp    1050 <perror@plt>

LLVM IR (-O0):
@PTRACE_SINGLESTEP = global i32 0
@.str = [35 x i8] c"error execute_singlestep:ptrace()\0A\00"
define void @execute_singlestep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @PTRACE_SINGLESTEP
%4 = load i32, i32* %2
%5 = call i64 @ptrace(i32 %3, i32 %4, i32 0, i32 0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @xibugger_wait(i32 %10)
br label %12
12: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@PTRACE_SINGLESTEP = global i32 0
@.str = [35 x i8] c"error execute_singlestep:ptrace()\0A\00"
define void @execute_singlestep(i32 %0) {
%2 = load i32, i32* @PTRACE_SINGLESTEP
%3 = tail call i64 @ptrace(i32 %2, i32 %0, i32 0, i32 0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = tail call i32 @xibugger_wait(i32 %0)
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void ClearWidths(int w[], int nc) {
  assert(nc > 0);
  while (nc--)
    w[nc] = 0;
}


x86 assembly (clang, -O0):
<ClearWidths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1158 <ClearWidths+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    1130 <ClearWidths+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearWidths>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
test   %esi,%esi
setg   %dil
call   1040 <assert@plt>
test   %ebx,%ebx
je     1154 <ClearWidths+0x34>
lea    -0x1(%rbx),%eax
movslq %eax,%rcx
sub    %rax,%rcx
lea    (%r14,%rcx,4),%rdi
mov    %ebx,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ClearWidths(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 = icmp sgt i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
br label %9
9: ; preds = %13, %2
%10 = load i32, i32* %4
%11 = add nsw i32 %10, -1
store i32 %11, i32* %4
%12 = icmp ne i32 %10, 0
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i32*, i32** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 0, i32* %17
br label %9
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @ClearWidths(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp eq i32 %1, 0
br i1 %6, label %16, label %7
7: ; preds = %2
%8 = add i32 %1, -1
%9 = sext i32 %8 to i64
%10 = zext i32 %8 to i64
%11 = sub nsw i64 %9, %10
%12 = getelementptr i32, i32* %0, i64 %11
%13 = bitcast i32* %12 to i8*
%14 = zext i32 %1 to i64
%15 = shl nuw nsw i64 %14, 2
br label %16
16: ; preds = %7, %2
ret void
}
float GetPercentage(float startVal, float endVal, float middleVal) {
  return (middleVal - startVal) / (endVal - startVal);
}


x86 assembly (clang, -O0):
<GetPercentage>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPercentage>:
subss  %xmm0,%xmm2
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @GetPercentage(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = fsub float %7, %8
%10 = load float, float* %5
%11 = load float, float* %4
%12 = fsub float %10, %11
%13 = fdiv float %9, %12
ret float %13
}

LLVM IR (-O2):
define float @GetPercentage(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fsub float %1, %0
%6 = fdiv float %4, %5
ret float %6
}
int my_match(const void *k1, const void *k2) {
  return *(int *)k1 == *(int *)k2;
}


x86 assembly (clang, -O0):
<my_match>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_match>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @my_match(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 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_match(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 = zext i1 %7 to i32
ret i32 %8
}
long des0(const long *w, long len) {
  long acc = 0;
  for (; len > 1; len--, w++) {
    if (*w == *(w + 1) + 1)
      acc++;
  }
  return acc;
}


x86 assembly (clang, -O0):
<des0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x1,-0x10(%rbp)
jle    1169 <des0+0x69>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1147 <des0+0x47>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    114c <des0+0x4c>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <des0+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<des0>:
cmp    $0x2,%rsi
jl     1144 <des0+0x44>
mov    (%rdi),%rcx
add    $0x1,%rsi
add    $0x8,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rdi),%r8
lea    0x1(%r8),%r9
xor    %edx,%edx
cmp    %r9,%rcx
sete   %dl
add    %rdx,%rax
add    $0xffffffffffffffff,%rsi
add    $0x8,%rdi
mov    %r8,%rcx
cmp    $0x2,%rsi
ja     1120 <des0+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @des0(i64* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 1
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = load i64, i64* %0
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %12, %6 ], [ %5, %4 ]
%8 = phi i64 [ %16, %6 ], [ 0, %4 ]
%9 = phi i64 [ %17, %6 ], [ %1, %4 ]
%10 = phi i64* [ %11, %6 ], [ %0, %4 ]
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %11
%13 = add nsw i64 %12, 1
%14 = icmp eq i64 %7, %13
%15 = zext i1 %14 to i64
%16 = add nuw nsw i64 %8, %15
%17 = add nsw i64 %9, -1
%18 = icmp ugt i64 %9, 2
br i1 %18, label %6, label %19
19: ; preds = %6, %2
%20 = phi i64 [ 0, %2 ], [ %16, %6 ]
ret i64 %20
}
long long bit47() { return 0x0000800000000000LL; }


x86 assembly (clang, -O0):
<bit47>:
push   %rbp
mov    %rsp,%rbp
movabs $0x800000000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit47>:
movabs $0x800000000000,%rax
ret

LLVM IR (-O0):
define i64 @bit47() {
ret i64 140737488355328
}

LLVM IR (-O2):
define i64 @bit47() {
ret i64 140737488355328
}
void dec_zcache_pers_zbytes(unsigned zsize) {}


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

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

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

LLVM IR (-O2):
define void @dec_zcache_pers_zbytes(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ body;

/* Variables and functions */
int O_CREAT;
int O_WRONLY;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ close(int);
int open(char const *, int, int);
int /*<<< orphan*/ write(int, char const *, int);
int dbd_write_file(const char *path, const char *body) {
  int fd;
  fd = open(path, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
  write(fd, body, sizeof(body));
  close(fd);
  return 1;
}


x86 assembly (clang, -O0):
<dbd_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e75(%rip),%rax
mov    (%rax),%esi
mov    0x2ea4(%rip),%rax
or     (%rax),%esi
mov    0x2e73(%rip),%rax
mov    (%rax),%edx
mov    0x2e7a(%rip),%rax
or     (%rax),%edx
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbd_write_file>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x2e83(%rip),%rax
mov    0x2eb4(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e81(%rip),%rax
mov    0x2e8a(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
call   1050 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <write@plt>
mov    %ebp,%edi
call   1040 <close@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @dbd_write_file(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i32, i32* @O_WRONLY
%8 = load i32, i32* @O_CREAT
%9 = or i32 %7, %8
%10 = load i32, i32* @S_IRUSR
%11 = load i32, i32* @S_IWUSR
%12 = or i32 %10, %11
%13 = call i32 @open(i8* %6, i32 %9, i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = load i8*, i8** %4
%16 = call i32 @write(i32 %14, i8* %15, i32 8)
%17 = load i32, i32* %5
%18 = call i32 @close(i32 %17)
ret i32 1
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @dbd_write_file(i8* nocapture %0, i8* nocapture %1) {
%3 = load i32, i32* @O_WRONLY
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = load i32, i32* @S_IRUSR
%7 = load i32, i32* @S_IWUSR
%8 = or i32 %7, %6
%9 = tail call i32 @open(i8* %0, i32 %5, i32 %8)
%10 = tail call i32 @write(i32 %9, i8* %1, i32 8)
%11 = tail call i32 @close(i32 %9)
ret i32 1
}
_Bool ne_float_cc(float _Complex a, float _Complex b) { return a != b; }


x86 assembly (clang, -O0):
<ne_float_cc>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
movlpd %xmm1,-0x10(%rbp)
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm3
movss  -0xc(%rbp),%xmm1
ucomiss %xmm3,%xmm2
setne  %al
setp   %cl
or     %cl,%al
ucomiss %xmm1,%xmm0
setne  %cl
setp   %dl
or     %dl,%cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_float_cc>:
ucomiss %xmm1,%xmm0
setp   %al
setne  %cl
or     %al,%cl
cmpneqps %xmm1,%xmm0
pextrw $0x2,%xmm0,%eax
or     %cl,%al
and    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i1 @ne_float_cc(<2 x float> %0, <2 x float> %1) {
%3 = alloca { float, float }
%4 = alloca { float, float }
%5 = bitcast { float, float }* %3 to <2 x float>*
store <2 x float> %0, <2 x float>* %5
%6 = bitcast { float, float }* %4 to <2 x float>*
store <2 x float> %1, <2 x float>* %6
%7 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%8 = load float, float* %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
%10 = load float, float* %9
%11 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 0
%12 = load float, float* %11
%13 = getelementptr inbounds { float, float }, { float, float }* %4, i32 0, i32 1
%14 = load float, float* %13
%15 = fcmp une float %8, %12
%16 = fcmp une float %10, %14
%17 = or i1 %15, %16
ret i1 %17
}

LLVM IR (-O2):
define zeroext i1 @ne_float_cc(<2 x float> %0, <2 x float> %1) {
%3 = extractelement <2 x float> %0, i64 0
%4 = extractelement <2 x float> %1, i64 0
%5 = fcmp une float %3, %4
%6 = fcmp une <2 x float> %0, %1
%7 = extractelement <2 x i1> %6, i64 1
%8 = or i1 %5, %7
ret i1 %8
}