xunge/DecIR huggingface dataset:
const char *consume_num(const char *fmt) {
  for (; *fmt >= '0' && *fmt <= '9'; fmt++)
    ;
  return fmt;
}


x86 assembly (clang, -O0):
<consume_num>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x9(%rbp)
jl     112d <consume_num+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <consume_num+0x3d>
jmp    1153 <consume_num+0x53>
jmp    1142 <consume_num+0x42>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <consume_num+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<consume_num>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
add    $0xd0,%cl
cmp    $0xa,%cl
jb     1110 <consume_num+0x10>
ret

LLVM IR (-O0):
define i8* @consume_num(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %19
15: ; preds = %13
br label %16
16: ; preds = %15
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %13
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @consume_num(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = add i8 %4, -48
%6 = icmp ult i8 %5, 10
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %2, label %8
8: ; preds = %2
ret i8* %3
}
int test_imm_19int8_reg(signed char val) {
  return ((val) & (-0x19 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_19int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffe7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_19int8_reg(i8 signext %0) {
%2 = and i8 %0, -25
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ reti();
void opcode_d9() { reti(); }


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

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

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

LLVM IR (-O2):
define void @opcode_d9() {
%1 = tail call i32 (...) @reti()
ret void
}
void ata_acpi_unbind(struct ata_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.ata_device = type opaque
define void @ata_acpi_unbind(%struct.ata_device* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int *initialize_vectors(int integers_amount) {
  int *vector = (int *)malloc(integers_amount * sizeof(int));
  return vector;
}


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

x86 assembly (clang, -O2):
<initialize_vectors>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @initialize_vectors(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @initialize_vectors(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
void append_addr(char *data, int addr) {
  data[1] = (addr >> 16) & 0xFF;
  data[2] = (addr >> 8) & 0xFF;
  data[3] = addr & 0xFF;
}


x86 assembly (clang, -O0):
<append_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<append_addr>:
mov    %esi,%eax
mov    %esi,%ecx
shr    $0x10,%ecx
mov    %cl,0x1(%rdi)
mov    %ah,0x2(%rdi)
mov    %al,0x3(%rdi)
ret

LLVM IR (-O0):
define void @append_addr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 16
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %8, i8* %10
%11 = load i32, i32* %4
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 2
store i8 %14, i8* %16
%17 = load i32, i32* %4
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 3
store i8 %19, i8* %21
ret void
}

LLVM IR (-O2):
define void @append_addr(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 16
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %5
%6 = lshr i32 %1, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %8
%9 = trunc i32 %1 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %10
ret void
}
unsigned int rev_s_pair(unsigned int r0) {
  unsigned int mask;
  unsigned int r1;
  mask = 0xff00ffffU;
  r1 = mask & (r0 << 8);
  r0 &= ~(mask >> 8);
  r0 = r1 | (r0 >> 8);
  return r0;
}


x86 assembly (clang, -O0):
<rev_s_pair>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xff00ffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_s_pair>:
mov    %edi,%eax
bswap  %eax
ror    $0x10,%eax
ret

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

LLVM IR (-O2):
define i32 @rev_s_pair(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, -16711936
%4 = lshr i32 %0, 8
%5 = and i32 %4, 16711935
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int seteuid(int /*<<< orphan*/);
void regainrootprivs(void) {
  int liResult;
  liResult = seteuid(0);
  if (liResult != 0) {
  }
}


x86 assembly (clang, -O0):
<regainrootprivs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <seteuid@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1131 <regainrootprivs+0x21>
jmp    1131 <regainrootprivs+0x21>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @regainrootprivs() {
%1 = tail call i32 @seteuid(i32 0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
unsigned int be24get(void *p, uint32_t *v) {
  uint8_t *a;
  a = p;
  *v = a[0] << 16;
  *v |= a[1] << 8;
  *v |= a[2];
  return 3;
}


x86 assembly (clang, -O0):
<be24get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
shl    $0x10,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ecx
shl    $0x8,%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<be24get>:
mov    (%rdi),%eax
shl    $0x10,%eax
mov    %eax,(%rsi)
mov    0x4(%rdi),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
mov    %ecx,(%rsi)
or     0x8(%rdi),%ecx
mov    %ecx,(%rsi)
mov    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @be24get(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = shl i32 %4, 16
store i32 %5, i32* %1
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %9, %5
store i32 %10, i32* %1
%11 = getelementptr inbounds i8, i8* %0, i64 8
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
%14 = or i32 %10, %13
store i32 %14, i32* %1
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ bar(char *);
void foo(void) { bar(""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @foo() {
%1 = call i32 @bar(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @foo() {
%1 = tail call i32 @bar(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ w5100_write_byte(int, unsigned int);
void w5100_writeTMSR(unsigned data) { w5100_write_byte(0x001B, data); }


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

x86 assembly (clang, -O2):
mov    %edi,%esi
mov    $0x1b,%edi
jmp    1030 <w5100_write_byte@plt>

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

LLVM IR (-O2):
define void @w5100_writeTMSR(i32 %0) {
%2 = tail call i32 @w5100_write_byte(i32 27, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct dirCache_t {
  int dummy;
};

/* Variables and functions */
int _addHash(struct dirCache_t *, int /*<<< orphan*/, int);
int /*<<< orphan*/ calcHash(int /*<<< orphan*/ *);
int isHashed(struct dirCache_t *cache, wchar_t *name) {
  return _addHash(cache, calcHash(name), 1);
}


x86 assembly (clang, -O0):
<isHashed>:
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),%rdi
call   1040 <calcHash@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <_addHash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isHashed>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <calcHash@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x1,%edx
pop    %rbx
jmp    1030 <_addHash@plt>

LLVM IR (-O0):
%struct.dirCache_t = type { i32 }
define i32 @isHashed(%struct.dirCache_t* %0, i32* %1) {
%3 = alloca %struct.dirCache_t*
%4 = alloca i32*
store %struct.dirCache_t* %0, %struct.dirCache_t** %3
store i32* %1, i32** %4
%5 = load %struct.dirCache_t*, %struct.dirCache_t** %3
%6 = load i32*, i32** %4
%7 = call i32 @calcHash(i32* %6)
%8 = call i32 @_addHash(%struct.dirCache_t* %5, i32 %7, i32 1)
ret i32 %8
}

LLVM IR (-O2):
%struct.dirCache_t = type { i32 }
define i32 @isHashed(%struct.dirCache_t* %0, i32* %1) {
%3 = tail call i32 @calcHash(i32* %1)
%4 = tail call i32 @_addHash(%struct.dirCache_t* %0, i32 %3, i32 1)
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  char *name = "COMP1511";
  char name_copy[15];
  strcpy(name_copy, name);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x27(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rsi
lea    0x9(%rsp),%rdi
call   1030 <strcpy@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"COMP1511\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [15 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %6
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %6
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"COMP1511\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [15 x i8]
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
void idate0(int x[3]) { x[0] = x[1] = x[2] = -1; }


x86 assembly (clang, -O0):
<idate0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<idate0>:
movl   $0xffffffff,0x8(%rdi)
movq   $0xffffffffffffffff,(%rdi)
ret

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

LLVM IR (-O2):
define void @idate0(i32* nocapture writeonly %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
store i32 -1, i32* %2
%3 = getelementptr inbounds i32, i32* %0, i64 1
store i32 -1, i32* %3
store i32 -1, i32* %0
ret void
}
/* Type definitions */
struct pty {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ process_output(struct pty *);
int pty_thread(void *p) {
  struct pty *pty = p;
  while (1) {
    process_output(pty);
  }
  return 0;
}


x86 assembly (clang, -O0):
<pty_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <process_output@plt>
jmp    1124 <pty_thread+0x14>

x86 assembly (clang, -O2):
<pty_thread>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <process_output@plt>
jmp    1120 <pty_thread+0x10>

LLVM IR (-O0):
%struct.pty = type { i32 }
define i32 @pty_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.pty*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.pty*
store %struct.pty* %5, %struct.pty** %3
br label %6
6: ; preds = %1, %6
%7 = load %struct.pty*, %struct.pty** %3
%8 = call i32 @process_output(%struct.pty* %7)
br label %6
}

LLVM IR (-O2):
%struct.pty = type { i32 }
define i32 @pty_thread(i8* %0) {
%2 = bitcast i8* %0 to %struct.pty*
br label %3
3: ; preds = %3, %1
%4 = tail call i32 @process_output(%struct.pty* %2)
br label %3
}
/* Type definitions */
struct aa_tree_iterator {
  int dummy;
};
struct aa_tree {
  int dummy;
};

/* Variables and functions */
struct aa_tree_iterator *aa_tree_iterator_new_both(struct aa_tree const *, int);
struct aa_tree_iterator *aa_tree_iterator_new(const struct aa_tree *aat) {
  return aa_tree_iterator_new_both(aat, 1);
}


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

x86 assembly (clang, -O2):
<aa_tree_iterator_new>:
mov    $0x1,%esi
jmp    1030 <aa_tree_iterator_new_both@plt>

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

LLVM IR (-O2):
%struct.aa_tree_iterator = type { i32 }
%struct.aa_tree = type { i32 }
define %struct.aa_tree_iterator* @aa_tree_iterator_new(%struct.aa_tree* %0) {
%2 = tail call %struct.aa_tree_iterator* @aa_tree_iterator_new_both(%struct.aa_tree* %0, i32 1)
ret %struct.aa_tree_iterator* %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void sg_put_unaligned_be24(uint32_t val, void *p) {
  ((uint8_t *)p)[0] = (val >> 16) & 0xff;
  ((uint8_t *)p)[1] = (val >> 8) & 0xff;
  ((uint8_t *)p)[2] = val & 0xff;
}


x86 assembly (clang, -O0):
<sg_put_unaligned_be24>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sg_put_unaligned_be24>:
mov    %edi,%eax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,(%rsi)
mov    %ecx,0x4(%rsi)
mov    %edx,0x8(%rsi)
ret

LLVM IR (-O0):
define void @sg_put_unaligned_be24(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 16
%7 = and i32 %6, 255
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %7, i32* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = load i8*, i8** %4
%15 = bitcast i8* %14 to i32*
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %13, i32* %16
%17 = load i32, i32* %3
%18 = and i32 %17, 255
%19 = load i8*, i8** %4
%20 = bitcast i8* %19 to i32*
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %18, i32* %21
ret void
}

LLVM IR (-O2):
define void @sg_put_unaligned_be24(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = bitcast i8* %1 to i32*
store i32 %4, i32* %5
%6 = lshr i32 %0, 8
%7 = and i32 %6, 255
%8 = getelementptr inbounds i8, i8* %1, i64 4
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
%10 = and i32 %0, 255
%11 = getelementptr inbounds i8, i8* %1, i64 8
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
ret void
}
/* Type definitions */
struct hlist_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_HLIST_NODE(struct hlist_node *);
int /*<<< orphan*/ __hlist_del(struct hlist_node *);
int /*<<< orphan*/ hlist_unhashed(struct hlist_node *);
void hlist_del_init(struct hlist_node *n) {
  if (!hlist_unhashed(n)) {
    __hlist_del(n);
    INIT_HLIST_NODE(n);
  }
}


x86 assembly (clang, -O0):
<hlist_del_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hlist_unhashed@plt>
cmp    $0x0,%eax
jne    1160 <hlist_del_init+0x30>
mov    -0x8(%rbp),%rdi
call   1050 <__hlist_del@plt>
mov    -0x8(%rbp),%rdi
call   1040 <INIT_HLIST_NODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hlist_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <hlist_unhashed@plt>
test   %eax,%eax
je     113f <hlist_del_init+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
call   1050 <__hlist_del@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <INIT_HLIST_NODE@plt>

LLVM IR (-O0):
%struct.hlist_node = type { i32 }
define void @hlist_del_init(%struct.hlist_node* %0) {
%2 = alloca %struct.hlist_node*
store %struct.hlist_node* %0, %struct.hlist_node** %2
%3 = load %struct.hlist_node*, %struct.hlist_node** %2
%4 = call i32 @hlist_unhashed(%struct.hlist_node* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load %struct.hlist_node*, %struct.hlist_node** %2
%8 = call i32 @__hlist_del(%struct.hlist_node* %7)
%9 = load %struct.hlist_node*, %struct.hlist_node** %2
%10 = call i32 @INIT_HLIST_NODE(%struct.hlist_node* %9)
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
%struct.hlist_node = type { i32 }
define void @hlist_del_init(%struct.hlist_node* %0) {
%2 = tail call i32 @hlist_unhashed(%struct.hlist_node* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @__hlist_del(%struct.hlist_node* %0)
%6 = tail call i32 @INIT_HLIST_NODE(%struct.hlist_node* %0)
br label %7
7: ; preds = %4, %1
ret void
}
int to_code1_gps(unsigned char code) {
  switch (code) {
  case 1:
    return 0;
  case 2:
  case 3:
  case 4:
  case 6:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<to_code1_gps>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1144 <to_code1_gps+0x44>
jmp    111f <to_code1_gps+0x1f>
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x3,%eax
jb     1150 <to_code1_gps+0x50>
jmp    1133 <to_code1_gps+0x33>
mov    -0xc(%rbp),%eax
sub    $0x6,%eax
je     1150 <to_code1_gps+0x50>
jmp    115c <to_code1_gps+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1163 <to_code1_gps+0x63>
movl   $0x1,-0x4(%rbp)
jmp    1163 <to_code1_gps+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_code1_gps>:
add    $0xfe,%dil
xor    %eax,%eax
cmp    $0x4,%dil
ja     111a <to_code1_gps+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @to_code1_gps(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %8 [
i32 1, label %6
i32 2, label %7
i32 3, label %7
i32 4, label %7
i32 6, label %7
]
6: ; preds = %1
store i32 0, i32* %2
br label %9
7: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@switch.table.to_code1_gps = [5 x i32] [i32 1, i32 1, i32 1, i32 0, i32 1]
define i32 @to_code1_gps(i8 zeroext %0) {
%2 = add i8 %0, -2
%3 = icmp ult i8 %2, 5
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [5 x i32], [5 x i32]* @switch.table.to_code1_gps, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void pthread_getspecific() {}


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

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

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

LLVM IR (-O2):
define void @pthread_getspecific() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  fprintf(stdout, "I am the child_sig_while_execv_simple_app \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)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [44 x i8] c"I am the child_sig_while_execv_simple_app \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 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [44 x i8] c"I am the child_sig_while_execv_simple_app \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_done(int);
int /*<<< orphan*/ rand();
int /*<<< orphan*/ randf();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ test_signed_i2f_32(int /*<<< orphan*/);
int /*<<< orphan*/ test_unsigned_i2f_32(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  for (int i = 0; i < 5000; i++) {
    test_signed_i2f_32(randf());
    test_unsigned_i2f_32(rand());
  }
  print_done(33);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1388,-0x8(%rbp)
jge    11cd <main+0x5d>
mov    $0x0,%al
call   1080 <randf@plt>
mov    %eax,%edi
call   1040 <test_signed_i2f_32@plt>
mov    $0x0,%al
call   1090 <rand@plt>
mov    %eax,%edi
call   1070 <test_unsigned_i2f_32@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1196 <main+0x26>
mov    $0x21,%edi
call   1060 <print_done@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x1388,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1080 <randf@plt>
mov    %eax,%edi
call   1040 <test_signed_i2f_32@plt>
xor    %eax,%eax
call   1090 <rand@plt>
mov    %eax,%edi
call   1070 <test_unsigned_i2f_32@plt>
add    $0xffffffff,%ebx
jne    1190 <main+0x20>
mov    $0x21,%edi
call   1060 <print_done@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
store i32 0, i32* %2
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 5000
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = call i32 (...) @randf()
%10 = call i32 @test_signed_i2f_32(i32 %9)
%11 = call i32 (...) @rand()
%12 = call i32 @test_unsigned_i2f_32(i32 %11)
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %5
16: ; preds = %5
%17 = call i32 @print_done(i32 33)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %5
3: ; preds = %5
%4 = tail call i32 @print_done(i32 33)
ret i32 0
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %11, %5 ]
%7 = tail call i32 (...) @randf()
%8 = tail call i32 @test_signed_i2f_32(i32 %7)
%9 = tail call i32 (...) @rand()
%10 = tail call i32 @test_unsigned_i2f_32(i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, 5000
br i1 %12, label %3, label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimir(int *v, int tamanho) {
  int i;
  for (i = 0; i < tamanho; i++) {
    printf("%d\n", v[i]);
  }
}


x86 assembly (clang, -O0):
<imprimir>:
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    1157 <imprimir+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <imprimir+0x16>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @imprimir(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %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 i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %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 = [4 x i8] c"%d\0A\00"
define void @imprimir(i32* 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 i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %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
}
int board_is_c_sample(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @board_is_c_sample() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ display;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void *get_XEvent_xclient_display(void *_p) {
  return (void *)((XEvent *)_p)->xclient.display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i8* @get_XEvent_xclient_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_XEvent_xclient_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void hello(void) { puts("Hello, world!"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
define void @hello() {
%1 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_words_aux(int *, int /*<<< orphan*/, char *,
                                   int /*<<< orphan*/);
void print_words(int telephone[]) {
  char buff[7 + 1];
  print_words_aux(telephone, 0, buff, 0);
}


x86 assembly (clang, -O0):
<print_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rdx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <print_words_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_words>:
push   %rax
mov    %rsp,%rdx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <print_words_aux@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @print_words(i32* %0) {
%2 = alloca i32*
%3 = alloca [8 x i8]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 0
%6 = call i32 @print_words_aux(i32* %4, i32 0, i8* %5, i32 0)
ret void
}

LLVM IR (-O2):
define void @print_words(i32* %0) {
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%4 = call i32 @print_words_aux(i32* %0, i32 0, i8* %3, i32 0)
ret void
}
void delay() {
  int i;
  for (i = 0; i < 0x100000; i++)
    asm("nop");
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x100000,-0x4(%rbp)
jge    1127 <delay+0x27>
nop
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
mov    $0x100000,%eax
cs nopw 0x0(%rax,%rax,1)
nop
nop
add    $0xffffffff,%eax
jne    1110 <delay+0x10>
ret

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

LLVM IR (-O2):
define void @delay() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %3, 1048576
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Type definitions */
typedef int base;

/* Variables and functions */
int id2val(int);
int f1_val(int base, int i) {
  int id = (base) + (i);
  return id2val(id);
}


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

x86 assembly (clang, -O2):
<f1_val>:
add    %esi,%edi
jmp    1030 <id2val@plt>

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

LLVM IR (-O2):
define i32 @f1_val(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @id2val(i32 %3)
ret i32 %4
}
void tddfunc6(void) {
  float floatbitaccess;
  int *pointertofloat;
  int apartoffloat;
  pointertofloat = &floatbitaccess;
  union aunion {
    float member1;
    union member2 {
      unsigned char member3;
      unsigned char member4;
      unsigned char member5;
      unsigned char member6;
    } member22;
  } aunionproto;
  aunionproto.member1 = floatbitaccess;
  apartoffloat = aunionproto.member22.member5 & 0x000000FF;
}


x86 assembly (clang, -O0):
<tddfunc6>:
push   %rbp
mov    %rsp,%rbp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movzbl -0x18(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%union.aunion = type { float }
%union.member2 = type { i8 }
define void @tddfunc6() {
%1 = alloca float
%2 = alloca i32*
%3 = alloca i32
%4 = alloca %union.aunion
%5 = bitcast float* %1 to i32*
store i32* %5, i32** %2
%6 = load float, float* %1
%7 = bitcast %union.aunion* %4 to float*
store float %6, float* %7
%8 = bitcast %union.aunion* %4 to %union.member2*
%9 = bitcast %union.member2* %8 to i8*
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
store i32 %12, i32* %3
ret void
}

LLVM IR (-O2):
define void @tddfunc6() {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float);
scalar_t__ time(int /*<<< orphan*/ *);
char *GetSdpId(char *buffer) {
  time_t t;
  buffer[0] = '\0';
  t = time(NULL);
  sprintf(buffer, "%.0f", (float)t + 2208988800U);
  return buffer;
}


x86 assembly (clang, -O0):
<GetSdpId>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
cvtsi2ssq -0x10(%rbp),%xmm0
movss  0xeae(%rip),%xmm1
addss  %xmm1,%xmm0
lea    0xea7(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSdpId>:
push   %rbx
mov    %rdi,%rbx
movb   $0x0,(%rdi)
xor    %edi,%edi
call   1030 <time@plt>
cvtsi2ss %rax,%xmm0
addss  0xec5(%rip),%xmm0
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.0f\00"
define i8* @GetSdpId(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %5
%6 = call i64 @time(i32* null)
store i64 %6, i64* %3
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = sitofp i64 %8 to float
%10 = fadd float %9, 0x41E0754FC0000000
%11 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %10)
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.0f\00"
define i8* @GetSdpId(i8* returned writeonly %0) {
store i8 0, i8* %0
%2 = tail call i64 @time(i32* null)
%3 = sitofp i64 %2 to float
%4 = fadd float %3, 0x41E0754FC0000000
%5 = tail call i32 @sprintf(i8* %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %4)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ GyroSensorHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void GyroSensorLogging() { UAVObjLogging(GyroSensorHandle()); }


x86 assembly (clang, -O0):
<GyroSensorLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <GyroSensorHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyroSensorLogging>:
push   %rax
xor    %eax,%eax
call   1040 <GyroSensorHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @GyroSensorLogging() {
%1 = call i32 (...) @GyroSensorHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @GyroSensorLogging() {
%1 = tail call i32 (...) @GyroSensorHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_wtree_compare();
int /*<<< orphan*/ test_wtree_construct();
int /*<<< orphan*/ test_wtree_get_intervals();
int /*<<< orphan*/ test_wtree_push();
int /*<<< orphan*/ test_wtree_tostring();
int main(void) {
  printf("Wtree module running tests\n");
  test_wtree_compare();
  test_wtree_construct();
  test_wtree_tostring();
  test_wtree_push();
  test_wtree_get_intervals();
  printf("Wtree module all tests passed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_wtree_compare@plt>
mov    $0x0,%al
call   1030 <test_wtree_construct@plt>
mov    $0x0,%al
call   1070 <test_wtree_tostring@plt>
mov    $0x0,%al
call   1060 <test_wtree_push@plt>
mov    $0x0,%al
call   1080 <test_wtree_get_intervals@plt>
lea    0xe77(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe98(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <test_wtree_compare@plt>
xor    %eax,%eax
call   1030 <test_wtree_construct@plt>
xor    %eax,%eax
call   1070 <test_wtree_tostring@plt>
xor    %eax,%eax
call   1060 <test_wtree_push@plt>
xor    %eax,%eax
call   1080 <test_wtree_get_intervals@plt>
lea    0xe84(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Wtree module running tests\0A\00"
@.str.1 = [31 x i8] c"Wtree module all tests passed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_wtree_compare()
%4 = call i32 (...) @test_wtree_construct()
%5 = call i32 (...) @test_wtree_tostring()
%6 = call i32 (...) @test_wtree_push()
%7 = call i32 (...) @test_wtree_get_intervals()
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Wtree module running tests\00"
@str.2 = [30 x i8] c"Wtree module all tests passed\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_wtree_compare()
%3 = tail call i32 (...) @test_wtree_construct()
%4 = tail call i32 (...) @test_wtree_tostring()
%5 = tail call i32 (...) @test_wtree_push()
%6 = tail call i32 (...) @test_wtree_get_intervals()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
char tolower(char);
void dj_string_toLowerCase(char *src) {
  while (*src) {
    printf("%c\n", *src);
    *src = tolower(*src);
    src++;
  }
}


x86 assembly (clang, -O0):
<dj_string_toLowerCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1171 <dj_string_toLowerCase+0x51>
mov    -0x8(%rbp),%rax
lea    0xebc(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <dj_string_toLowerCase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dj_string_toLowerCase>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1161 <dj_string_toLowerCase+0x41>
mov    %rdi,%rbx
lea    0xecc(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movsbl (%rbx),%edi
call   1040 <tolower@plt>
mov    %al,(%rbx)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <dj_string_toLowerCase+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define void @dj_string_toLowerCase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%8 = load i8, i8* %6
%9 = tail call signext i8 @tolower(i8 signext %8)
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}