xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_stop_after_delay(void *);
void test_stop(void) { test_stop_after_delay((void *)(intptr_t)0); }


x86 assembly (clang, -O0):
<test_stop>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <test_stop_after_delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stop>:
xor    %edi,%edi
jmp    1030 <test_stop_after_delay@plt>

LLVM IR (-O0):
define void @test_stop() {
%1 = call i32 @test_stop_after_delay(i8* null)
ret void
}

LLVM IR (-O2):
define void @test_stop() {
%1 = tail call i32 @test_stop_after_delay(i8* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help(void) {
  fprintf(stderr, "LGPL command line XML parser\n<blunderer@blunderer.org>\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"LGPL command line XML parser\0A<blunderer@blunderer.org>\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"LGPL command line XML parser\0A<blunderer@blunderer.org>\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long double tgamma(long double);
long double imprecise_tgammal(long double v) { return tgamma(v); }


x86 assembly (clang, -O0):
<imprecise_tgammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <tgamma@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprecise_tgammal>:
jmp    1030 <tgamma@plt>

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

LLVM IR (-O2):
define x86_fp80 @imprecise_tgammal(x86_fp80 %0) {
%2 = tail call x86_fp80 @tgamma(x86_fp80 %0)
ret x86_fp80 %2
}
int OCDBCheckType(int dbtype) {
  int retval = -1;
  if (1) {
    retval = 0;
  }
  return retval;
}


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

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

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

LLVM IR (-O2):
define i32 @OCDBCheckType(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  do {
    printf("hello fs_set\n");
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello fs_set\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"hello fs_set\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("wassup\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"wassup\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"wassup\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int __setxid(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setresuid(uid_t ruid, uid_t euid, uid_t suid) {
  return __setxid(164, ruid, euid, suid);
}


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

x86 assembly (clang, -O2):
<setresuid>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xa4,%edi
jmp    1030 <__setxid@plt>

LLVM IR (-O0):
define i32 @setresuid(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 = load i32, i32* %6
%10 = call i32 @__setxid(i32 164, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @setresuid(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @__setxid(i32 164, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
__attribute__((no, noclone)) int k1(int A, int B) {
  volatile int C = A & B;
  volatile int D = A ^ B;
  return C | ~D;
}


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

x86 assembly (clang, -O2):
<k1>:
mov    %esi,%eax
and    %edi,%eax
mov    %eax,-0x4(%rsp)
xor    %edi,%esi
mov    %esi,-0x8(%rsp)
mov    -0x4(%rsp),%ecx
mov    -0x8(%rsp),%eax
not    %eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @k1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = and i32 %1, %0
store volatile i32 %6, i32* %3
%7 = bitcast i32* %4 to i8*
%8 = xor i32 %1, %0
store volatile i32 %8, i32* %4
%9 = load volatile i32, i32* %3
%10 = load volatile i32, i32* %4
%11 = xor i32 %10, -1
%12 = or i32 %9, %11
ret i32 %12
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
bool unicode_is_low_surrogate_utf16(uint16_t value) {
  return (value & 0xFC00) == 0xDC00;
}


x86 assembly (clang, -O0):
<unicode_is_low_surrogate_utf16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfc00,%eax
cmp    $0xdc00,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_is_low_surrogate_utf16>:
and    $0xfc00,%edi
xor    %eax,%eax
cmp    $0xdc00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @unicode_is_low_surrogate_utf16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 64512
%5 = icmp eq i32 %4, 56320
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @unicode_is_low_surrogate_utf16(i32 %0) {
%2 = and i32 %0, 64512
%3 = icmp eq i32 %2, 56320
%4 = zext i1 %3 to i32
ret i32 %4
}
unsigned int delete_byte_from_word(unsigned int input_word,
                                   unsigned int left_border) {
  return input_word & (0xFFFFFF >> (32 - left_border));
}


x86 assembly (clang, -O0):
<delete_byte_from_word>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
mov    $0xffffff,%edx
sar    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_byte_from_word>:
mov    %esi,%ecx
neg    %cl
mov    $0xffffff,%eax
shr    %cl,%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @delete_byte_from_word(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 = sub i32 32, %6
%8 = ashr i32 16777215, %7
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @delete_byte_from_word(i32 %0, i32 %1) {
%3 = sub i32 32, %1
%4 = lshr i32 16777215, %3
%5 = and i32 %4, %0
ret i32 %5
}
const struct list *list_end(const struct list *head) { return head; }


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

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

LLVM IR (-O0):
%struct.list = type opaque
define %struct.list* @list_end(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
ret %struct.list* %3
}

LLVM IR (-O2):
%struct.list = type opaque
define %struct.list* @list_end(%struct.list* readnone returned %0) {
ret %struct.list* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t extract_byte(uint32_t x, unsigned int n) {
  return (uint8_t)(x >> (8 * n));
}


x86 assembly (clang, -O0):
<extract_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_byte>:
mov    %edi,%eax
lea    0x0(,%rsi,8),%ecx
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @extract_byte(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 = mul i32 8, %6
%8 = ashr i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @extract_byte(i32 %0, i32 %1) {
%3 = shl i32 %1, 3
%4 = ashr i32 %0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gen_op_store_40x_pit();
void spr_write_40x_pit(void *opaque, int sprn) { gen_op_store_40x_pit(); }


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

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

LLVM IR (-O0):
define void @spr_write_40x_pit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @gen_op_store_40x_pit()
ret void
}

LLVM IR (-O2):
define void @spr_write_40x_pit(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @gen_op_store_40x_pit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mhandle_out_of_memory(char *);
void *strdup(char const *);
void *__xstrdup(const char *s, char *at) {
  void *ptr;
  ptr = strdup(s);
  if (!ptr)
    mhandle_out_of_memory(at);
  return ptr;
}


x86 assembly (clang, -O0):
<__xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <__xstrdup+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <mhandle_out_of_memory@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <__xstrdup+0x1c>
mov    %r14,%rdi
call   1030 <mhandle_out_of_memory@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @__xstrdup(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i8* @strdup(i8* %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = call i32 @mhandle_out_of_memory(i8* %11)
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @__xstrdup(i8* nocapture %0, i8* %1) {
%3 = tail call i8* @strdup(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @mhandle_out_of_memory(i8* %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int strlen(char const *);
char *strstr(char const *, char const *);
int index_of(const char *src, const char *sub) {
  char *result = strstr(src, sub);
  return result ? strlen(src) - strlen(result) : -1;
}


x86 assembly (clang, -O0):
<index_of>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1170 <index_of+0x50>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
jmp    117d <index_of+0x5d>
mov    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    117d <index_of+0x5d>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_of>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strstr@plt>
test   %rax,%rax
je     114a <index_of+0x2a>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebx
jmp    114f <index_of+0x2f>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @index_of(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @strstr(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @strlen(i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @strlen(i8* %14)
%16 = sub nsw i32 %13, %15
br label %18
17: ; preds = %2
br label %18
18: ; preds = %17, %11
%19 = phi i32 [ %16, %11 ], [ -1, %17 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @index_of(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = tail call i32 @strlen(i8* %3)
%8 = sub nsw i32 %6, %7
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ %8, %5 ], [ -1, %2 ]
ret i32 %10
}
void rop3_182_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = *D & T;
  stk3 = S | stk4;
  stk2 = T ^ stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


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

x86 assembly (clang, -O2):
<rop3_182_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
and    %dl,%cl
or     %sil,%cl
xor    %al,%dl
xor    %cl,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_182_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = and i32 %13, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %10
%18 = load i8, i8* %5
%19 = zext i8 %18 to i32
%20 = load i8, i8* %10
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %6
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = load i8, i8* %8
%34 = zext i8 %33 to i32
%35 = xor i32 %32, %34
%36 = trunc i32 %35 to i8
store i8 %36, i8* %7
%37 = load i8, i8* %7
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_182_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %4, %2
%8 = xor i8 %7, %6
%9 = xor i8 %1, -1
%10 = and i8 %8, %9
%11 = and i8 %4, %1
%12 = or i8 %10, %11
store i8 %12, i8* %0
ret void
}
void shift_right(p) register char *p;
{
  register char *q;
  q = p + strlen(p);
  while (q >= p) {
    *(q + 1) = *q;
    q--;
  }
}


x86 assembly (clang, -O0):
<shift_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jb     1167 <shift_right+0x57>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113b <shift_right+0x2b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_right>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
js     113f <shift_right+0x2f>
add    %rbx,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
mov    %cl,0x1(%rax)
add    $0xffffffffffffffff,%rax
cmp    %rbx,%rax
jae    1130 <shift_right+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @shift_right(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 %2
br label %6
6: ; preds = %4, %6
%7 = phi i8* [ %10, %6 ], [ %5, %4 ]
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %8, i8* %9
%10 = getelementptr inbounds i8, i8* %7, i64 -1
%11 = icmp ult i8* %10, %0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
void *malloc(int);
void *ADL_Main_Memory_Alloc(int iSize) { return malloc(iSize); }


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

x86 assembly (clang, -O2):
<ADL_Main_Memory_Alloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @ADL_Main_Memory_Alloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(long, int /*<<< orphan*/ *);
long fputlong(long n, FILE *file) {
  fputc(n & 0xff, file);
  fputc((n >> 8) & 0xff, file);
  fputc((n >> 16) & 0xff, file);
  fputc((n >> 24) & 0xff, file);
  return n;
}


x86 assembly (clang, -O0):
<fputlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
and    $0xff,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rdi
sar    $0x8,%rdi
and    $0xff,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rdi
sar    $0x10,%rdi
and    $0xff,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rdi
sar    $0x18,%rdi
and    $0xff,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputlong>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movzbl %bl,%edi
call   1030 <fputc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %ebx,%edi
shr    $0x18,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @fputlong(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = and i64 %5, 255
%7 = load i32*, i32** %4
%8 = call i32 @fputc(i64 %6, i32* %7)
%9 = load i64, i64* %3
%10 = ashr i64 %9, 8
%11 = and i64 %10, 255
%12 = load i32*, i32** %4
%13 = call i32 @fputc(i64 %11, i32* %12)
%14 = load i64, i64* %3
%15 = ashr i64 %14, 16
%16 = and i64 %15, 255
%17 = load i32*, i32** %4
%18 = call i32 @fputc(i64 %16, i32* %17)
%19 = load i64, i64* %3
%20 = ashr i64 %19, 24
%21 = and i64 %20, 255
%22 = load i32*, i32** %4
%23 = call i32 @fputc(i64 %21, i32* %22)
%24 = load i64, i64* %3
ret i64 %24
}

LLVM IR (-O2):
define i64 @fputlong(i64 returned %0, i32* nocapture %1) {
%3 = and i64 %0, 255
%4 = tail call i32 @fputc(i64 %3, i32* %1)
%5 = lshr i64 %0, 8
%6 = and i64 %5, 255
%7 = tail call i32 @fputc(i64 %6, i32* %1)
%8 = lshr i64 %0, 16
%9 = and i64 %8, 255
%10 = tail call i32 @fputc(i64 %9, i32* %1)
%11 = lshr i64 %0, 24
%12 = and i64 %11, 255
%13 = tail call i32 @fputc(i64 %12, i32* %1)
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ usleep(int);
void pwmOff() {
  system("echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable");
  system("echo 0 > /sys/class/pwm/pwmchip0/pwm1/enable");
  usleep(10000);
}


x86 assembly (clang, -O0):
<pwmOff>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <system@plt>
lea    0xef6(%rip),%rdi
call   1030 <system@plt>
mov    $0x2710,%edi
call   1040 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwmOff>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
lea    0xef9(%rip),%rdi
call   1030 <system@plt>
mov    $0x2710,%edi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.1 = [45 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @pwmOff() {
%1 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @usleep(i32 10000)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.1 = [45 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
define void @pwmOff() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @usleep(i32 10000)
ret void
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int printargs(struct tcb *);
int sys_socketcall(struct tcb *tcp) { return printargs(tcp); }


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

x86 assembly (clang, -O2):
<sys_socketcall>:
jmp    1030 <printargs@plt>

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

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_socketcall(%struct.tcb* %0) {
%2 = tail call i32 @printargs(%struct.tcb* %0)
ret i32 %2
}
void XGetPixel() {}


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

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

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

LLVM IR (-O2):
define void @XGetPixel() {
ret void
}
int hputdec(hstring, keyword, dec)
char *hstring;
const char *keyword;
const double dec;
{
  char value[30];
  dec2str(value, 30, dec, 2);
  fixnegzero(value);
  return (hputs(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
mov    $0x1e,%esi
mov    $0x2,%edx
mov    $0x1,%al
call   1050 <dec2str@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1030 <fixnegzero@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1040 <hputs@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputdec>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x1e,%esi
mov    $0x2,%edx
mov    $0x1,%al
call   1050 <dec2str@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <fixnegzero@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <hputs@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @hputdec(i8* %0, i8* %1, double %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = load double, double* %6
%10 = call i32 (i8*, i32, double, i32, ...) bitcast (i32 (...)* @dec2str to i32 (i8*, i32, double, i32, ...)*)(i8* %8, i32 30, double %9, i32 2)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @fixnegzero to i32 (i8*, ...)*)(i8* %11)
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%16 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputs to i32 (i8*, i8*, i8*, ...)*)(i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @hputdec(i8* %0, i8* %1, double %2) {
%4 = alloca [30 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i32, double, i32, ...) bitcast (i32 (...)* @dec2str to i32 (i8*, i32, double, i32, ...)*)(i8* %5, i32 30, double %2, i32 2)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @fixnegzero to i32 (i8*, ...)*)(i8* %5)
%8 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputs to i32 (i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* %5)
ret i32 %8
}
/* Variables and functions */
int EOF;
int read(int /*<<< orphan*/, char *, int);
int getchar(void) {
  char c;
  return (read(0, &c, 1) == 1) ? (unsigned char)c : EOF;
}


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    113d <getchar+0x2d>
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <getchar+0x39>
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
push   %rax
lea    0x7(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     1132 <getchar+0x22>
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
movzbl 0x7(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @getchar() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
br label %9
7: ; preds = %0
%8 = load i32, i32* @EOF
br label %9
9: ; preds = %7, %4
%10 = phi i32 [ %6, %4 ], [ %8, %7 ]
ret i32 %10
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @getchar() {
%1 = alloca i8
%2 = call i32 @read(i32 0, i8* %1, i32 1)
%3 = icmp eq i32 %2, 1
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = load i32, i32* @EOF
%7 = select i1 %3, i32 %5, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ next();
scalar_t__ see(char *);
bool try_match(char *look) {
  if (see(look)) {
    next();
    return true;
  } else
    return false;
}


x86 assembly (clang, -O0):
<try_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <see@plt>
cmp    $0x0,%rax
je     1152 <try_match+0x32>
mov    $0x0,%al
call   1030 <next@plt>
movl   $0x1,-0x4(%rbp)
jmp    1159 <try_match+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<try_match>:
push   %rax
call   1040 <see@plt>
test   %rax,%rax
je     1139 <try_match+0x19>
xor    %eax,%eax
call   1030 <next@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @try_match(i8* %0) {
%2 = tail call i64 @see(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @next()
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
void mr97311_setAutobright(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @mr97311_setAutobright(%struct.usb_spca50x* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glConvolutionParameterfv_size(int /*<<< orphan*/);
GLint __glConvolutionParameteriv_size(GLenum pname) {
  return __glConvolutionParameterfv_size(pname);
}


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

x86 assembly (clang, -O2):
<__glConvolutionParameteriv_size>:
jmp    1030 <__glConvolutionParameterfv_size@plt>

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

LLVM IR (-O2):
define i32 @__glConvolutionParameteriv_size(i32 %0) {
%2 = tail call i32 @__glConvolutionParameterfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fail_test(int);
void *freopen(char const *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
extern void change_stderr(const char *path) {
  if (freopen(path, "wb", stderr) == ((void *)0))
    fail_test(87);
  ;
}


x86 assembly (clang, -O0):
<change_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
lea    0xec0(%rip),%rsi
call   1040 <freopen@plt>
cmp    $0x0,%rax
jne    1159 <change_stderr+0x39>
mov    $0x57,%edi
call   1030 <fail_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_stderr>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rsi
call   1040 <freopen@plt>
test   %rax,%rax
je     113d <change_stderr+0x1d>
pop    %rax
ret
mov    $0x57,%edi
pop    %rax
jmp    1030 <fail_test@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
@stderr = global i32 0
define void @change_stderr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i8* @freopen(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @fail_test(i32 87)
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
@stderr = global i32 0
define void @change_stderr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @freopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @fail_test(i32 87)
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int const);
char *ui2str(const unsigned int i) {
  static char result[11];
  memset(result, '\0', 11);
  sprintf(result, "%u", i);
  return result;
}


x86 assembly (clang, -O0):
<ui2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0x2eff(%rip),%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edx
lea    0x2ee9(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ed6(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ui2str>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x2f04(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0xb,%edx
call   1030 <memset@plt>
lea    0xebd(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@ui2str.result = internal global [11 x i8] zeroinitializer
@.str = [3 x i8] c"%u\00"
define i8* @ui2str(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @memset(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0), i8 signext 0, i32 11)
%4 = load i32, i32* %2
%5 = call i32 @sprintf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0)
}

LLVM IR (-O2):
@ui2str.result = internal global [11 x i8] zeroinitializer
@.str = [3 x i8] c"%u\00"
define i8* @ui2str(i32 %0) {
%2 = tail call i32 @memset(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0), i8 signext 0, i32 11)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([11 x i8], [11 x i8]* @ui2str.result, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcmp(char *, char *);
void strcmp_diff_length_1() {
  char *x = "123";
  char *y = "23456";
  clang_analyzer_eval(strcmp(x, y) == -1);
}


x86 assembly (clang, -O0):
<strcmp_diff_length_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_diff_length_1>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"23456\00"
define void @strcmp_diff_length_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
define void @strcmp_diff_length_1() {
%1 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
/* Variables and functions */
unsigned int zipmapRawKeyLength(unsigned char *);
unsigned int zipmapRawValueLength(unsigned char *);
unsigned int zipmapXRawEntryLength(unsigned char *p) {
  unsigned int l = zipmapRawKeyLength(p);
  return l + sizeof(unsigned int) +
         zipmapRawValueLength(p + l + sizeof(unsigned int));
}


x86 assembly (clang, -O0):
<zipmapXRawEntryLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <zipmapRawKeyLength@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
add    %rax,%rdi
add    $0x4,%rdi
call   1030 <zipmapRawValueLength@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipmapXRawEntryLength>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <zipmapRawKeyLength@plt>
mov    %eax,%r14d
mov    %eax,%eax
lea    (%rbx,%rax,1),%rdi
add    $0x4,%rdi
call   1030 <zipmapRawValueLength@plt>
add    %r14d,%eax
add    $0x4,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @zipmapXRawEntryLength(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @zipmapRawKeyLength(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = add i64 %7, 4
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 4
%14 = call i32 @zipmapRawValueLength(i8* %13)
%15 = zext i32 %14 to i64
%16 = add i64 %8, %15
%17 = trunc i64 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @zipmapXRawEntryLength(i8* %0) {
%2 = tail call i32 @zipmapRawKeyLength(i8* %0)
%3 = zext i32 %2 to i64
%4 = add i32 %2, 4
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = getelementptr inbounds i8, i8* %5, i64 4
%7 = tail call i32 @zipmapRawValueLength(i8* %6)
%8 = add i32 %4, %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int can_hw_transmit(int /*<<< orphan*/, int /*<<< orphan*/ const *,
                    int /*<<< orphan*/);
int can_transmit(uint32_t id, const uint8_t *buf, uint8_t len) {
  return can_hw_transmit(id, buf, len);
}


x86 assembly (clang, -O0):
<can_transmit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <can_hw_transmit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_transmit>:
jmp    1030 <can_hw_transmit@plt>

LLVM IR (-O0):
define i32 @can_transmit(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 = load i32, i32* %6
%10 = call i32 @can_hw_transmit(i32 %7, i32* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @can_transmit(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 @can_hw_transmit(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_string_half(char *);
int main(void) {
  char *str;
  str = "0123456789\n";
  print_string_half(str);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_string_half@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"0123456789\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_string_half(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"0123456789\0A\00"
define i32 @main() {
%1 = tail call i32 @print_string_half(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
char *fo_scheduler_next() { return (0); }


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

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

LLVM IR (-O0):
define i8* @fo_scheduler_next() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fo_scheduler_next() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, ...);
int main(void) {
  printf("%6d,%4d\n", 86, 1040);
  printf("%12.5e\n", 30.253);
  printf("%.4f\n", 83.162);
  printf("%06.2g\n", .0000009979);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xefa(%rip),%rdi
movsd  0xeea(%rip),%xmm0
mov    $0x410,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xec7(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
movsd  0xea9(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
movsd  0xe8b(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf08(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x410,%esi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xecd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xebf(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
movsd  0xeb1(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%6d,%4d\0A\00"
@.str.1 = [8 x i8] c"%12.5e\0A\00"
@.str.2 = [6 x i8] c"%.4f\0A\00"
@.str.3 = [8 x i8] c"%06.2g\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 8.600000e+01, i32 1040)
%3 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double 3.025300e+01)
%4 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double 8.316200e+01)
%5 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 9.979000e-07)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%6d,%4d\0A\00"
@.str.1 = [8 x i8] c"%12.5e\0A\00"
@.str.2 = [6 x i8] c"%.4f\0A\00"
@.str.3 = [8 x i8] c"%06.2g\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 8.600000e+01, i32 1040)
%2 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double 3.025300e+01)
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double 8.316200e+01)
%4 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), double 9.979000e-07)
ret i32 0
}