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

/* Variables and functions */
int extract_unknown(struct pt_packet *, struct pt_decoder const *);
int packet_unknown(struct pt_packet *packet, const struct pt_decoder *decoder) {
  int size;
  size = extract_unknown(packet, decoder);
  if (size < 0)
    return size;
  return size;
}


x86 assembly (clang, -O0):
<packet_unknown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <extract_unknown@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1145 <packet_unknown+0x35>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <packet_unknown+0x3b>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_unknown>:
jmp    1030 <extract_unknown@plt>

LLVM IR (-O0):
%struct.pt_packet = type { i32 }
%struct.pt_decoder = type { i32 }
define i32 @packet_unknown(%struct.pt_packet* %0, %struct.pt_decoder* %1) {
%3 = alloca i32
%4 = alloca %struct.pt_packet*
%5 = alloca %struct.pt_decoder*
%6 = alloca i32
store %struct.pt_packet* %0, %struct.pt_packet** %4
store %struct.pt_decoder* %1, %struct.pt_decoder** %5
%7 = load %struct.pt_packet*, %struct.pt_packet** %4
%8 = load %struct.pt_decoder*, %struct.pt_decoder** %5
%9 = call i32 @extract_unknown(%struct.pt_packet* %7, %struct.pt_decoder* %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %6
store i32 %13, i32* %3
br label %16
14: ; preds = %2
%15 = load i32, i32* %6
store i32 %15, i32* %3
br label %16
16: ; preds = %14, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.pt_packet = type { i32 }
%struct.pt_decoder = type { i32 }
define i32 @packet_unknown(%struct.pt_packet* %0, %struct.pt_decoder* %1) {
%3 = tail call i32 @extract_unknown(%struct.pt_packet* %0, %struct.pt_decoder* %1)
ret i32 %3
}
/* Variables and functions */
int nb_elems(void **array) {
  void **end = array;
  while (*end != NULL) {
    end++;
  }
  return end - array;
}


x86 assembly (clang, -O0):
<nb_elems>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     112f <nb_elems+0x2f>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <nb_elems+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nb_elems>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <nb_elems+0x10>
ret

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

LLVM IR (-O2):
define i32 @nb_elems(i8** %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8** [ %0, %1 ], [ %6, %2 ]
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8*, i8** %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8** %3 to i64
%9 = ptrtoint i8** %0 to i64
%10 = sub i64 %8, %9
%11 = lshr exact i64 %10, 3
%12 = trunc i64 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Pelif();
int /*<<< orphan*/ nest();
void Fpass(void) {
  nest();
  Pelif();
}


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

x86 assembly (clang, -O2):
<Fpass>:
push   %rax
xor    %eax,%eax
call   1040 <nest@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Pelif@plt>

LLVM IR (-O0):
define void @Fpass() {
%1 = call i32 (...) @nest()
%2 = call i32 (...) @Pelif()
ret void
}

LLVM IR (-O2):
define void @Fpass() {
%1 = tail call i32 (...) @nest()
%2 = tail call i32 (...) @Pelif()
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c))
    c = c + 0x20;
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     1136 <tolower+0x26>
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 32
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
unsigned int get_unum();
int /*<<< orphan*/ printf(char *, ...);
int read_number(unsigned int *data) {
  unsigned int index = 0;
  printf(" Index: ");
  index = get_unum();
  printf(" Number at data[%u] is %u\n", index, data[index]);
  return 0;
}


x86 assembly (clang, -O0):
<read_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <get_unum@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%edx
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_number>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <get_unum@plt>
mov    %eax,%ecx
mov    (%rbx,%rcx,4),%edx
lea    0xec4(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c" Index: \00"
@.str.1 = [27 x i8] c" Number at data[%u] is %u\0A\00"
define i32 @read_number(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @get_unum()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* %3
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c" Index: \00"
@.str.1 = [27 x i8] c" Number at data[%u] is %u\0A\00"
define i32 @read_number(i32* nocapture %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @get_unum()
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %6)
ret i32 0
}
/* Variables and functions */
int sprintf(char *, char *, void *);
int defaultBufferString(void *payload, char *buffer) {
  int i = 0;
  i = sprintf(buffer, "%p", payload);
  return i;
}


x86 assembly (clang, -O0):
<defaultBufferString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeca(%rip),%rsi
call   1030 <sprintf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultBufferString>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define i32 @defaultBufferString(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
int foo(int a, unsigned int b) { return (a | 1) & (b | 1); }


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

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
and    %esi,%eax
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @foo(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 = or i32 %5, 1
%7 = load i32, i32* %4
%8 = or i32 %7, 1
%9 = and i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = or i32 %3, 1
ret i32 %4
}
/* Variables and functions */
scalar_t__ COND_GT();
int /*<<< orphan*/ EA_AY_AI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_sgt_8_ai(void) {
  m68ki_write_8(EA_AY_AI_8(), COND_GT() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_sgt_8_ai>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_AI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_GT@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_sgt_8_ai>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_AI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_GT@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_sgt_8_ai() {
%1 = call i32 (...) @EA_AY_AI_8()
%2 = call i64 (...) @COND_GT()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_sgt_8_ai() {
%1 = tail call i32 (...) @EA_AY_AI_8()
%2 = tail call i64 (...) @COND_GT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t _getpid(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @_getpid() {
ret i32 1
}
void cpu_instr_callback(int pc) { (void)pc; }


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

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

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

LLVM IR (-O2):
define void @cpu_instr_callback(i32 %0) {
ret void
}
main() {
  signed char c = -1;
  signed long i = -1;
  (void)c;
  (void)i;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("fini 0\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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"fini 0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = 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"fini 0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char to_print(unsigned char ch) {
  return (ch >= 0x20 && ch <= 0x7e) ? (char)ch : '.';
}


x86 assembly (clang, -O0):
<to_print>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jl     1130 <to_print+0x30>
movzbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
jg     1130 <to_print+0x30>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113d <to_print+0x3d>
mov    $0x2e,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <to_print+0x3d>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_print>:
lea    -0x20(%rdi),%eax
cmp    $0x5f,%al
mov    $0x2e,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @to_print(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 32
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
br label %14
13: ; preds = %6, %1
br label %14
14: ; preds = %13, %10
%15 = phi i32 [ %12, %10 ], [ 46, %13 ]
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @to_print(i8 zeroext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = select i1 %3, i8 %0, i8 46
ret i8 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t sys_get_le16(const uint8_t src[2]) {
  return ((uint16_t)src[1] << 8) | src[0];
}


x86 assembly (clang, -O0):
<sys_get_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_get_le16>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @sys_get_le16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @sys_get_le16(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %0
%6 = or i32 %4, %5
ret i32 %6
}
int test_009(int a, int c, int b, int d) { return a + b + (b & 1); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    (%rdi,%rdx,1),%eax
and    $0x1,%edx
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_009(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, %0
%6 = and i32 %2, 1
%7 = add nsw i32 %5, %6
ret i32 %7
}
void gtk_entry_set_max_length() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_set_max_length() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const);
void print_array(const char a[], int size) {
  int i;
  for (i = 0; i < size; i++) {
    printf("%c", a[i]);
  }
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <print_array+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <print_array+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @print_array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @print_array(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void foo(int a, int b) {
  if (a == b) {
    a++;
  } else {
    b++;
  }
  if (a == b)
    a++;
  else
    b++;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1124 <foo+0x24>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <foo+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1147 <foo+0x47>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <foo+0x50>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo(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 = icmp eq i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %24
21: ; preds = %14
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
char I2C_RecieveLastByte();
int /*<<< orphan*/ I2C_SendByte(int);
int /*<<< orphan*/ I2C_StartCondition();
int /*<<< orphan*/ I2C_StopCondition();
char ds1307_ReadReg(char n) {
  char bb;
  I2C_StartCondition();
  I2C_SendByte((0b01101000 << 1) | 1);
  bb = I2C_RecieveLastByte();
  I2C_StopCondition();
  return bb;
}


x86 assembly (clang, -O0):
<ds1307_ReadReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1060 <I2C_StartCondition@plt>
mov    $0xd1,%edi
call   1030 <I2C_SendByte@plt>
mov    $0x0,%al
call   1040 <I2C_RecieveLastByte@plt>
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1050 <I2C_StopCondition@plt>
movsbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds1307_ReadReg>:
push   %rbx
xor    %eax,%eax
call   1060 <I2C_StartCondition@plt>
mov    $0xd1,%edi
call   1030 <I2C_SendByte@plt>
xor    %eax,%eax
call   1040 <I2C_RecieveLastByte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <I2C_StopCondition@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @ds1307_ReadReg(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = call i32 (...) @I2C_StartCondition()
%5 = call i32 @I2C_SendByte(i32 209)
%6 = call signext i8 (...) @I2C_RecieveLastByte()
store i8 %6, i8* %3
%7 = call i32 (...) @I2C_StopCondition()
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @ds1307_ReadReg(i8 signext %0) {
%2 = tail call i32 (...) @I2C_StartCondition()
%3 = tail call i32 @I2C_SendByte(i32 209)
%4 = tail call signext i8 (...) @I2C_RecieveLastByte()
%5 = tail call i32 (...) @I2C_StopCondition()
ret i8 %4
}
int comparator(const void *l, const void *r) {
  int f = *(const int *)l;
  int s = *(const int *)r;
  return f - s;
}


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

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

LLVM IR (-O0):
define i32 @comparator(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ check_expected(char const *);
scalar_t__ mock();
char *normalize_key_name(const char *key) {
  check_expected(key);
  return (char *)mock();
}


x86 assembly (clang, -O0):
<normalize_key_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <check_expected@plt>
mov    $0x0,%al
call   1030 <mock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalize_key_name>:
push   %rax
call   1040 <check_expected@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @normalize_key_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @check_expected(i8* %3)
%5 = call i64 (...) @mock()
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @normalize_key_name(i8* %0) {
%2 = tail call i32 @check_expected(i8* %0)
%3 = tail call i64 (...) @mock()
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t crc_init(void) { return 0xffffffff; }


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

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

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

LLVM IR (-O2):
define i32 @crc_init() {
ret i32 -1
}
float min(float n1, float n2) {
  if (n1 <= n2)
    return n1;
  return n2;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1130 <min+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <min+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
movaps %xmm0,%xmm2
cmpless %xmm1,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp ole float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @min(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
int test_imm_37int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x37 << 0)) ? -20 : -40;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @deinitGPUCounters() {
ret void
}
int ld_le_rr2(long double a1, long double a2) { return !(((a1) <= (a2))); }


x86 assembly (clang, -O0):
<ld_le_rr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_le_rr2>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setb   %al
ret

LLVM IR (-O0):
define i32 @ld_le_rr2(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp ole x86_fp80 %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_le_rr2(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ugt x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int byt_ulpmc_reset_charger(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @byt_ulpmc_reset_charger() {
ret i32 0
}

LLVM IR (-O2):
define i32 @byt_ulpmc_reset_charger() {
ret i32 0
}
int it6151_init(struct drm_device *dev, struct drm_encoder *encoder,
                struct i2c_client *client, struct device_node *node) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.drm_device = type opaque
%struct.drm_encoder = type opaque
%struct.i2c_client = type opaque
%struct.device_node = type opaque
define i32 @it6151_init(%struct.drm_device* %0, %struct.drm_encoder* %1, %struct.i2c_client* %2, %struct.device_node* %3) {
%5 = alloca %struct.drm_device*
%6 = alloca %struct.drm_encoder*
%7 = alloca %struct.i2c_client*
%8 = alloca %struct.device_node*
store %struct.drm_device* %0, %struct.drm_device** %5
store %struct.drm_encoder* %1, %struct.drm_encoder** %6
store %struct.i2c_client* %2, %struct.i2c_client** %7
store %struct.device_node* %3, %struct.device_node** %8
ret i32 0
}

LLVM IR (-O2):
%struct.drm_device = type opaque
%struct.drm_encoder = type opaque
%struct.i2c_client = type opaque
%struct.device_node = type opaque
define i32 @it6151_init(%struct.drm_device* nocapture readnone %0, %struct.drm_encoder* nocapture readnone %1, %struct.i2c_client* nocapture readnone %2, %struct.device_node* nocapture readnone %3) {
ret i32 0
}
void spi0_init(void) {
  (*(volatile unsigned long *)((0xE002C000))) =
      ((~0x0000FF00) & (*(volatile unsigned long *)((0xE002C000)))) |
      0x00005500;
  (*(volatile unsigned long *)((0xE002000C))) = 8;
  (*(volatile unsigned long *)((0xE0020000))) = 0x20;
}


x86 assembly (clang, -O0):
<spi0_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe002c000,%eax
mov    (%rax),%rcx
and    $0xffffffffffff00ff,%rcx
or     $0x5500,%rcx
mov    $0xe002c000,%eax
mov    %rcx,(%rax)
mov    $0xe002000c,%eax
movq   $0x8,(%rax)
mov    $0xe0020000,%eax
movq   $0x20,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi0_init>:
mov    $0xe002c000,%eax
mov    $0xffffffffffff00ff,%rcx
and    (%rax),%rcx
or     $0x5500,%rcx
mov    %rcx,(%rax)
movq   $0x8,-0xbff4(%rax)
movq   $0x20,-0xc000(%rax)
ret

LLVM IR (-O0):
define void @spi0_init() {
%1 = load volatile i64, i64* inttoptr (i64 3758276608 to i64*)
%2 = and i64 -65281, %1
%3 = or i64 %2, 21760
store volatile i64 %3, i64* inttoptr (i64 3758276608 to i64*)
store volatile i64 8, i64* inttoptr (i64 3758227468 to i64*)
store volatile i64 32, i64* inttoptr (i64 3758227456 to i64*)
ret void
}

LLVM IR (-O2):
define void @spi0_init() {
%1 = load volatile i64, i64* inttoptr (i64 3758276608 to i64*)
%2 = and i64 %1, -65281
%3 = or i64 %2, 21760
store volatile i64 %3, i64* inttoptr (i64 3758276608 to i64*)
store volatile i64 8, i64* inttoptr (i64 3758227468 to i64*)
store volatile i64 32, i64* inttoptr (i64 3758227456 to i64*)
ret void
}
int isBrailleCharacter(unsigned char character) {
  return (character & ~(((1 << 8) - 1) << 0)) == 0X2800;
}


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

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

LLVM IR (-O0):
define i32 @isBrailleCharacter(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -256
%6 = icmp eq i32 %5, 10240
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isBrailleCharacter(i8 zeroext %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ setscl(int);
int /*<<< orphan*/ setsda(int /*<<< orphan*/);
void i2c_sendbit(uint8_t x) {
  setscl(0);
  setsda(x);
  setscl(1);
}


x86 assembly (clang, -O0):
<i2c_sendbit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <setscl@plt>
mov    -0x4(%rbp),%edi
call   1040 <setsda@plt>
mov    $0x1,%edi
call   1030 <setscl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_sendbit>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <setscl@plt>
mov    %ebx,%edi
call   1040 <setsda@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1030 <setscl@plt>

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

LLVM IR (-O2):
define void @i2c_sendbit(i32 %0) {
%2 = tail call i32 @setscl(i32 0)
%3 = tail call i32 @setsda(i32 %0)
%4 = tail call i32 @setscl(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void clean_up(int sig) {
  unlink("dummy0");
  unlink("dummy1");
}


x86 assembly (clang, -O0):
<clean_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <unlink@plt>
lea    0xed9(%rip),%rdi
call   1030 <unlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_up>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <unlink@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"dummy0\00"
@.str.1 = [7 x i8] c"dummy1\00"
define void @clean_up(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"dummy0\00"
@.str.1 = [7 x i8] c"dummy1\00"
define void @clean_up(i32 %0) {
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @unlink(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ Char_2d_array(int, int);
float **Float_2d_array(int i_size, int j_size) {
  return ((float **)Char_2d_array(i_size, j_size * sizeof(float)));
}


x86 assembly (clang, -O0):
<Float_2d_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%esi
call   1030 <Char_2d_array@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Float_2d_array>:
shl    $0x2,%esi
jmp    1030 <Char_2d_array@plt>

LLVM IR (-O0):
define float** @Float_2d_array(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 = sext i32 %6 to i64
%8 = mul i64 %7, 4
%9 = trunc i64 %8 to i32
%10 = call i64 @Char_2d_array(i32 %5, i32 %9)
%11 = inttoptr i64 %10 to float**
ret float** %11
}

LLVM IR (-O2):
define float** @Float_2d_array(i32 %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i64 @Char_2d_array(i32 %0, i32 %3)
%5 = inttoptr i64 %4 to float**
ret float** %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void debugstuff(void) { printf("hello, is anybody outthere?\n"); }


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

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

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

LLVM IR (-O2):
@str = [28 x i8] c"hello, is anybody outthere?\00"
define void @debugstuff() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *tokenParser(char *, char *, int /*<<< orphan*/, char *);
char *tremblParser(char *header) {
  return tokenParser(header, " \t", 0, "tremblParser");
}


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

x86 assembly (clang, -O2):
<tremblParser>:
lea    0xee9(%rip),%rsi
lea    0xee5(%rip),%rcx
xor    %edx,%edx
jmp    1030 <tokenParser@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
@.str.1 = [13 x i8] c"tremblParser\00"
define i8* @tremblParser(i8* %0) {
%2 = tail call i8* @tokenParser(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int inteiro = 0;
  scanf("%d", &inteiro);
  printf("inteiro: %d\n", inteiro);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [13 x i8] c"inteiro: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
struct utsname {
  char const *nodename;
};
typedef int /*<<< orphan*/ my_uname;

/* Variables and functions */
int /*<<< orphan*/ memset(struct utsname *, int, int);
scalar_t__ uname(struct utsname *);
const char *asyslogd_sys_name(void) {
  static struct utsname my_uname;
  memset(&my_uname, 0x00, sizeof(my_uname));
  if (uname(&my_uname) < 0)
    return NULL;
  return my_uname.nodename;
}


x86 assembly (clang, -O0):
<asyslogd_sys_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f09(%rip),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
lea    0x2ef6(%rip),%rdi
call   1030 <uname@plt>
cmp    $0x0,%rax
jge    115e <asyslogd_sys_name+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1169 <asyslogd_sys_name+0x49>
mov    0x2ed3(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asyslogd_sys_name>:
push   %r14
push   %rbx
push   %rax
lea    0x2f0d(%rip),%r14
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
call   1030 <uname@plt>
test   %rax,%rax
js     1150 <asyslogd_sys_name+0x30>
mov    0x2ee8(%rip),%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
@asyslogd_sys_name.my_uname = internal global %struct.utsname zeroinitializer
define i8* @asyslogd_sys_name() {
%1 = alloca i8*
%2 = call i32 @memset(%struct.utsname* @asyslogd_sys_name.my_uname, i32 0, i32 8)
%3 = call i64 @uname(%struct.utsname* @asyslogd_sys_name.my_uname)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i8* null, i8** %1
br label %8
6: ; preds = %0
%7 = load i8*, i8** getelementptr inbounds (%struct.utsname, %struct.utsname* @asyslogd_sys_name.my_uname, i32 0, i32 0)
store i8* %7, i8** %1
br label %8
8: ; preds = %6, %5
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
@asyslogd_sys_name.my_uname = internal global %struct.utsname zeroinitializer
define i8* @asyslogd_sys_name() {
%1 = tail call i32 @memset(%struct.utsname* @asyslogd_sys_name.my_uname, i32 0, i32 8)
%2 = tail call i64 @uname(%struct.utsname* @asyslogd_sys_name.my_uname)
%3 = icmp slt i64 %2, 0
%4 = load i8*, i8** getelementptr inbounds (%struct.utsname, %struct.utsname* @asyslogd_sys_name.my_uname, i64 0, i32 0)
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
void RTSymlinkReadA(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSymlinkReadA() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put_xy_mmx(int, int, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ const *, int);
void MC_put_xy_16_mmx(uint8_t *dest, const uint8_t *ref, int stride,
                      int height) {
  MC_put_xy_mmx(16, height, dest, ref, stride);
}


x86 assembly (clang, -O0):
<MC_put_xy_16_mmx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x10,%edi
call   1030 <MC_put_xy_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_xy_16_mmx>:
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%rdx
mov    $0x10,%edi
mov    %ecx,%esi
mov    %rax,%rcx
jmp    1030 <MC_put_xy_mmx@plt>

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

LLVM IR (-O2):
define void @MC_put_xy_16_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put_xy_mmx(i32 16, i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
/* Variables and functions */
int wordncmp(char *, char *);
int sortcmp(const void *p, const void *q) {
  char **p1 = (char **)p;
  char **q1 = (char **)q;
  return wordncmp(*p1, *q1);
}


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

x86 assembly (clang, -O2):
<sortcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <wordncmp@plt>

LLVM IR (-O0):
define i32 @sortcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @wordncmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @sortcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @wordncmp(i8* %5, i8* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ls(char *);
int main(int argc, char *argv[]) {
  char *base;
  if (argc == 1) {
    base = "./";
  } else if (argc == 2) {
    base = argv[1];
  } else {
    return 0;
  }
  ls(base);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1140 <main+0x30>
lea    0xec9(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    116c <main+0x5c>
cmpl   $0x2,-0x8(%rbp)
jne    115b <main+0x4b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1167 <main+0x57>
movl   $0x0,-0x4(%rbp)
jmp    1175 <main+0x65>
jmp    116c <main+0x5c>
mov    -0x18(%rbp),%rdi
call   1030 <ls@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
je     1121 <main+0x11>
cmp    $0x2,%edi
jne    112d <main+0x1d>
mov    0x8(%rsi),%rdi
jmp    1128 <main+0x18>
lea    0xed8(%rip),%rdi
call   1030 <ls@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"./\00"
define i32 @main(i32 %0, i8** nocapture %1) {
switch i32 %0, label %9 [
i32 1, label %6
i32 2, label %3
]
3: ; preds = %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
br label %6
6: ; preds = %2, %3
%7 = phi i8* [ %5, %3 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), %2 ]
%8 = tail call i32 @ls(i8* %7)
br label %9
9: ; preds = %2, %6
ret i32 0
}