xunge/DecIR huggingface dataset:
/* Variables and functions */
int write(int, unsigned char *, int);
int smf_track_end(int fd) {
  unsigned char data[4];
  data[0] = 0x00;
  data[1] = 0xff;
  data[2] = 0x2f;
  data[3] = 0x00;
  return write(fd, data, 4);
}


x86 assembly (clang, -O0):
<smf_track_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x8(%rbp)
movb   $0xff,-0x7(%rbp)
movb   $0x2f,-0x6(%rbp)
movb   $0x0,-0x5(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smf_track_end>:
push   %rax
movl   $0x2fff00,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @smf_track_end(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 -1, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 47, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 0, i8* %7
%8 = load i32, i32* %2
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%10 = call i32 @write(i32 %8, i8* %9, i32 4)
ret i32 %10
}

LLVM IR (-O2):
define i32 @smf_track_end(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
store i8 -1, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
store i8 47, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
store i8 0, i8* %6
%7 = call i32 @write(i32 %0, i8* %3, i32 4)
ret i32 %7
}
/* Variables and functions */
int xSetIndicator(unsigned int, int /*<<< orphan*/);
int xIndicatorOff(unsigned atom) { return xSetIndicator(atom, 0); }


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

x86 assembly (clang, -O2):
<xIndicatorOff>:
xor    %esi,%esi
jmp    1030 <xSetIndicator@plt>

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

LLVM IR (-O2):
define i32 @xIndicatorOff(i32 %0) {
%2 = tail call i32 @xSetIndicator(i32 %0, i32 0)
ret i32 %2
}
int bad6(int x) { return __builtin_constant_p(x + 1); }


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

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

LLVM IR (-O0):
define i32 @bad6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i1 @llvm.is.constant.i32(i32 %4)
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @bad6(i32 %0) {
ret i32 0
}
/* Variables and functions */
void *memscan(void *addr, int c, size_t size) {
  unsigned char *p = addr;
  while (size) {
    if (*p == c)
      return (void *)p;
    p++;
    size--;
  }
  return (void *)p;
}


x86 assembly (clang, -O0):
<memscan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115c <memscan+0x5c>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    113f <memscan+0x3f>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1164 <memscan+0x64>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    1117 <memscan+0x17>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memscan>:
mov    %rdi,%rax
test   %rdx,%rdx
je     1124 <memscan+0x24>
lea    (%rax,%rdx,1),%rcx
nopl   0x0(%rax)
movzbl (%rax),%edi
cmp    %esi,%edi
je     1124 <memscan+0x24>
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1110 <memscan+0x10>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @memscan(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %17, label %5
5: ; preds = %3
%6 = getelementptr i8, i8* %0, i64 %2
br label %7
7: ; preds = %5, %13
%8 = phi i8* [ %14, %13 ], [ %0, %5 ]
%9 = phi i64 [ %15, %13 ], [ %2, %5 ]
%10 = load i8, i8* %8
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, %1
br i1 %12, label %17, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %8, i64 1
%15 = add i64 %9, -1
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %7
17: ; preds = %7, %13, %3
%18 = phi i8* [ %0, %3 ], [ %6, %13 ], [ %8, %7 ]
ret i8* %18
}
int test_imm_9Cuint16_reg(unsigned short val) {
  return ((val) & (-0x9C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Cuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -156
%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_9Cuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -156
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int pgm_read_byte(char const *);
int /*<<< orphan*/ writeCharToSerial(char);
void writePgmStringToSerial(const char *pgmString) {
  while (pgm_read_byte(pgmString) != 0x00)
    writeCharToSerial((char)pgm_read_byte(pgmString++));
}


x86 assembly (clang, -O0):
<writePgmStringToSerial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pgm_read_byte@plt>
cmp    $0x0,%eax
je     115f <writePgmStringToSerial+0x3f>
mov    -0x8(%rbp),%rdi
mov    %rdi,%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
call   1030 <pgm_read_byte@plt>
movsbl %al,%edi
call   1040 <writeCharToSerial@plt>
jmp    112c <writePgmStringToSerial+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writePgmStringToSerial>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <pgm_read_byte@plt>
test   %eax,%eax
je     1153 <writePgmStringToSerial+0x33>
lea    0x1(%rbx),%r14
mov    %rbx,%rdi
call   1030 <pgm_read_byte@plt>
movsbl %al,%edi
call   1040 <writeCharToSerial@plt>
mov    %r14,%rdi
call   1030 <pgm_read_byte@plt>
mov    %r14,%rbx
test   %eax,%eax
jne    1130 <writePgmStringToSerial+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @writePgmStringToSerial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = call i32 @pgm_read_byte(i8* %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = call i32 @pgm_read_byte(i8* %8)
%11 = trunc i32 %10 to i8
%12 = call i32 @writeCharToSerial(i8 signext %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @writePgmStringToSerial(i8* %0) {
%2 = tail call i32 @pgm_read_byte(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = tail call i32 @pgm_read_byte(i8* %5)
%8 = trunc i32 %7 to i8
%9 = tail call i32 @writeCharToSerial(i8 signext %8)
%10 = tail call i32 @pgm_read_byte(i8* %6)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
scalar_t__ alloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *q_(const char *orig) {
  char *ret = (char *)alloc(strlen(orig) + 1);
  strcpy(ret, orig);
  return ret;
}


x86 assembly (clang, -O0):
<q_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @q_(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @alloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @q_(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @alloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ temp;

/* Variables and functions */
int /*<<< orphan*/ ftoascii(char *, int, float);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char temp[25] = {'\0'};
  float value = -22.2;
  ftoascii(temp, sizeof(temp), value);
  printf("temp = %s\n", temp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1040 <memset@plt>
movss  0xea9(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
movss  -0x24(%rbp),%xmm0
mov    $0x19,%esi
call   1050 <ftoascii@plt>
lea    -0x20(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x9(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
movss  0xec4(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x19,%esi
call   1040 <ftoascii@plt>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"temp = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = alloca float
store i32 0, i32* %1
%4 = bitcast [25 x i8]* %2 to i8*
store float 0xC036333340000000, float* %3
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%6 = load float, float* %3
%7 = call i32 @ftoascii(i8* %5, i32 25, float %6)
%8 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"temp = %s\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%3 = call i32 @ftoascii(i8* %2, i32 25, float 0xC036333340000000)
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
long pow(long a, long b) {
  if (b == 0)
    return 1;
  if (b == 1)
    return a;
  return a * pow(a, b - 1);
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1138 <pow+0x28>
movq   $0x1,-0x8(%rbp)
jmp    1178 <pow+0x68>
cmpq   $0x1,-0x18(%rbp)
jne    1150 <pow+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <pow+0x68>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
sub    $0x1,%rsi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
imul   %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
mov    %rdi,%rax
mov    $0x1,%ecx
test   %rsi,%rsi
je     1123 <pow+0x23>
nopl   (%rax)
cmp    $0x1,%rsi
je     1128 <pow+0x28>
add    $0xffffffffffffffff,%rsi
imul   %rax,%rcx
test   %rsi,%rsi
jne    1110 <pow+0x10>
mov    $0x1,%eax
imul   %rcx,%rax
ret

LLVM IR (-O0):
define i64 @pow(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 1, i64* %3
br label %21
9: ; preds = %2
%10 = load i64, i64* %5
%11 = icmp eq i64 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i64, i64* %4
store i64 %13, i64* %3
br label %21
14: ; preds = %9
%15 = load i64, i64* %4
%16 = load i64, i64* %4
%17 = load i64, i64* %5
%18 = sub nsw i64 %17, 1
%19 = call i64 @pow(i64 %16, i64 %18)
%20 = mul nsw i64 %15, %19
store i64 %20, i64* %3
br label %21
21: ; preds = %14, %12, %8
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
define i64 @pow(i64 %0, i64 %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i64 [ 1, %2 ], [ %8, %6 ]
%5 = phi i64 [ %1, %2 ], [ %7, %6 ]
switch i64 %5, label %6 [
i64 0, label %9
i64 1, label %10
]
6: ; preds = %3
%7 = add nsw i64 %5, -1
%8 = mul nsw i64 %4, %0
br label %3
9: ; preds = %3
br label %10
10: ; preds = %3, %9
%11 = phi i64 [ 1, %9 ], [ %0, %3 ]
%12 = mul nsw i64 %11, %4
ret i64 %12
}
int __ashlhi3(int a, int b) { return a << b; }


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

x86 assembly (clang, -O2):
<__ashlhi3>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @__ashlhi3(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
int x_draw_line(c)
int c;
{
  x_redraw(-1);
  return 0;
}


x86 assembly (clang, -O0):
<x_draw_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
mov    $0x0,%al
call   1030 <x_redraw@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_draw_line>:
push   %rax
mov    $0xffffffff,%edi
xor    %eax,%eax
call   1030 <x_redraw@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @x_draw_line(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @x_redraw to i32 (i32, ...)*)(i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @x_draw_line(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @x_redraw to i32 (i32, ...)*)(i32 -1)
ret i32 0
}
/* Variables and functions */
int tirar(int);
int d6() { return tirar(6); }


x86 assembly (clang, -O0):
<d6>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <tirar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<d6>:
mov    $0x6,%edi
jmp    1030 <tirar@plt>

LLVM IR (-O0):
define i32 @d6() {
%1 = call i32 @tirar(i32 6)
ret i32 %1
}

LLVM IR (-O2):
define i32 @d6() {
%1 = tail call i32 @tirar(i32 6)
ret i32 %1
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void TRNGIntEnable(uint32_t ui32IntFlags) {

  ;
  (*((volatile unsigned long *)(0x40028000 + 0x0000000C))) |= ui32IntFlags;
}


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

x86 assembly (clang, -O2):
<TRNGIntEnable>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
or     %rax,0x4002800c
40
ret

LLVM IR (-O0):
define void @TRNGIntEnable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1073905676 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1073905676 to i64*)
ret void
}

LLVM IR (-O2):
define void @TRNGIntEnable(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1073905676 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1073905676 to i64*)
ret void
}
int execute_gettimeofday() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_gettimeofday() {
ret i32 0
}
int hist_long_clear_buffer(string)
char string[];
{
  int i;
  for (i = 0; i < 300; i++)
    string[i] = ' ';
  return (1);
}


x86 assembly (clang, -O0):
<hist_long_clear_buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x12c,-0xc(%rbp)
jge    1136 <hist_long_clear_buffer+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hist_long_clear_buffer+0xf>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hist_long_clear_buffer>:
push   %rax
mov    $0x12c,%edx
mov    $0x20,%esi
call   1030 <memset@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hist_long_clear_buffer(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 300
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 32, i8* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret i32 1
}

LLVM IR (-O2):
define i32 @hist_long_clear_buffer(i8* nocapture writeonly %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
int zssl_INIT(int unused_flags) {
  SSL_library_init();
  OpenSSL_add_all_algorithms();
  SSL_load_error_strings();
  return 0;
}


x86 assembly (clang, -O0):
<zssl_INIT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <SSL_library_init@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1050 <SSL_load_error_strings@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zssl_INIT>:
push   %rax
xor    %eax,%eax
call   1030 <SSL_library_init@plt>
xor    %eax,%eax
call   1040 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
call   1050 <SSL_load_error_strings@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @zssl_INIT(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @SSL_library_init()
%4 = call i32 (...) @OpenSSL_add_all_algorithms()
%5 = call i32 (...) @SSL_load_error_strings()
ret i32 0
}

LLVM IR (-O2):
define i32 @zssl_INIT(i32 %0) {
%2 = tail call i32 (...) @SSL_library_init()
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%4 = tail call i32 (...) @SSL_load_error_strings()
ret i32 0
}
int test_imm_5Buint16_reg(unsigned short val) {
  return ((val) & (-0x5B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_5Buint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -91
%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_5Buint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -91
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void pcp_def_net_ip6_metrics(void) {}


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

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

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

LLVM IR (-O2):
define void @pcp_def_net_ip6_metrics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mvaddch(unsigned int, unsigned int, char);
void clear_statusbar(unsigned int y, unsigned int x) {
  unsigned int i;
  for (i = 0; i <= x; i++) {
    mvaddch(y, i, ' ');
  }
}


x86 assembly (clang, -O0):
<clear_statusbar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     114f <clear_statusbar+0x3f>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x20,%edx
call   1030 <mvaddch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <clear_statusbar+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_statusbar>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x20,%edx
call   1030 <mvaddch@plt>
add    $0x1,%ebx
cmp    %r14d,%ebx
jbe    1120 <clear_statusbar+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @clear_statusbar(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 = %14, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp ule i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = call i32 @mvaddch(i32 %11, i32 %12, i8 signext 32)
br label %14
14: ; preds = %10
%15 = load i32, i32* %5
%16 = add i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @clear_statusbar(i32 %0, i32 %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %6, %3 ]
%5 = tail call i32 @mvaddch(i32 %0, i32 %4, i8 signext 32)
%6 = add i32 %4, 1
%7 = icmp ugt i32 %6, %1
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ high(int);
int /*<<< orphan*/ lda(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ low(int);
int /*<<< orphan*/ sta(int, int);
void jsr_reset_output() {
  lda(0, low(0x4000));
  sta(1, 0xfc);
  lda(0, high(0x4000));
  sta(1, 0xfd);
}


x86 assembly (clang, -O0):
<jsr_reset_output>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4000,%edi
call   1050 <low@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1060 <lda@plt>
mov    $0x1,%edi
mov    $0xfc,%esi
call   1040 <sta@plt>
mov    $0x4000,%edi
call   1030 <high@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1060 <lda@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
call   1040 <sta@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsr_reset_output>:
push   %rax
mov    $0x4000,%edi
call   1050 <low@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1060 <lda@plt>
mov    $0x1,%edi
mov    $0xfc,%esi
call   1040 <sta@plt>
mov    $0x4000,%edi
call   1030 <high@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1060 <lda@plt>
mov    $0x1,%edi
mov    $0xfd,%esi
pop    %rax
jmp    1040 <sta@plt>

LLVM IR (-O0):
define void @jsr_reset_output() {
%1 = call i32 @low(i32 16384)
%2 = call i32 @lda(i32 0, i32 %1)
%3 = call i32 @sta(i32 1, i32 252)
%4 = call i32 @high(i32 16384)
%5 = call i32 @lda(i32 0, i32 %4)
%6 = call i32 @sta(i32 1, i32 253)
ret void
}

LLVM IR (-O2):
define void @jsr_reset_output() {
%1 = tail call i32 @low(i32 16384)
%2 = tail call i32 @lda(i32 0, i32 %1)
%3 = tail call i32 @sta(i32 1, i32 252)
%4 = tail call i32 @high(i32 16384)
%5 = tail call i32 @lda(i32 0, i32 %4)
%6 = tail call i32 @sta(i32 1, i32 253)
ret void
}
/* Variables and functions */
int send_core(int, char *, char *, int /*<<< orphan*/);
int send_start(int fd, char *message, char *arguments) {
  return (send_core(fd, message, arguments, 0));
}


x86 assembly (clang, -O0):
<send_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <send_core@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_start>:
xor    %ecx,%ecx
jmp    1030 <send_core@plt>

LLVM IR (-O0):
define i32 @send_start(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @send_core(i32 %7, i8* %8, i8* %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @send_start(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @send_core(i32 %0, i8* %1, i8* %2, i32 0)
ret i32 %4
}
int Operand_uimm12x8_decode(unsigned int *valp) {
  unsigned uimm12x8_0, imm12_0;
  imm12_0 = *valp & 0xfff;
  uimm12x8_0 = imm12_0 << 3;
  *valp = uimm12x8_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm12x8_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xfff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm12x8_decode>:
mov    (%rdi),%eax
shl    $0x3,%eax
and    $0x7ff8,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm12x8_decode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = and i32 %6, 4095
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32*, i32** %2
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm12x8_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 3
%4 = and i32 %3, 32760
store i32 %4, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
P(int i, int j) { printf("swap(%d, %d);\n", i - 1, j - 1); }


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
lea    -0x1(%rdi),%eax
lea    -0x1(%rsi),%edx
lea    0xee3(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"swap(%d, %d);\0A\00"
define i32 @P(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = load i32, i32* %5
%9 = sub nsw i32 %8, 1
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [15 x i8] c"swap(%d, %d);\0A\00"
define i32 @P(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = add nsw i32 %1, -1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 undef
}
void fldcw_m16abs(unsigned short *m16) {
  if ((long)m16 & 0xFFFFFFFF80000000LL) {
    printf("Error: destination %lx not in lower 2GB for fldcw_m16abs()\n",
           (long)m16);
    asm(" int $3; ");
  }
  put8(0xD9);
  put8(0x2C);
  put8(0x25);
  put32((int)(unsigned long)m16);
}


x86 assembly (clang, -O0):
<fldcw_m16abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffffff80000000,%rax
cmp    $0x0,%rax
je     1163 <fldcw_m16abs+0x33>
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
int3
mov    $0xd9,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x2c,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    $0x25,%edi
mov    $0x0,%al
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    $0x0,%al
call   1050 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fldcw_m16abs>:
push   %rbx
mov    %rdi,%rbx
test   $0xffffffff80000000,%rdi
je     114f <fldcw_m16abs+0x1f>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
int3
mov    $0xd9,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x2c,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    $0x25,%edi
xor    %eax,%eax
call   1030 <put8@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1050 <put32@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Error: destination %lx not in lower 2GB for fldcw_m16abs()\0A\00"
define void @fldcw_m16abs(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = ptrtoint i16* %3 to i64
%5 = and i64 %4, -2147483648
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i16*, i16** %2
%9 = ptrtoint i16* %8 to i64
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i64 %9)
br label %11
11: ; preds = %7, %1
%12 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 217)
%13 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 44)
%14 = call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%15 = load i16*, i16** %2
%16 = ptrtoint i16* %15 to i64
%17 = trunc i64 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %17)
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"Error: destination %lx not in lower 2GB for fldcw_m16abs()\0A\00"
define void @fldcw_m16abs(i16* %0) {
%2 = ptrtoint i16* %0 to i64
%3 = icmp ult i16* %0, inttoptr (i64 2147483648 to i16*)
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i64 %2)
tail call void asm sideeffect " int $$3; ", "~{dirflag},~{fpsr},~{flags}"()
br label %6
6: ; preds = %4, %1
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 217)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 44)
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @put8 to i32 (i32, ...)*)(i32 37)
%10 = trunc i64 %2 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @put32 to i32 (i32, ...)*)(i32 %10)
ret void
}
/* Variables and functions */
scalar_t__ test_sat_parser_should_fail(char *);
int test21(void) {
  return test_sat_parser_should_fail("(a or b) and") ||
         test_sat_parser_should_fail("(-a  or b) and   ");
}


x86 assembly (clang, -O0):
<test21>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    114c <test21+0x3c>
lea    0xed0(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test21>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112c <test21+0x1c>
pop    %rcx
ret
lea    0xeda(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"(a or b) and\00"
@.str.1 = [18 x i8] c"(-a or b) and \00"
define i32 @test21() {
%1 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"(a or b) and\00"
@.str.1 = [18 x i8] c"(-a or b) and \00"
define i32 @test21() {
%1 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int ENOSYS;
int proc_get_hardware_limits(unsigned int cpu, unsigned long *min,
                             unsigned long *max) {
  return -ENOSYS;
}


x86 assembly (clang, -O0):
<proc_get_hardware_limits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_get_hardware_limits>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @proc_get_hardware_limits(i32 %0, i64* %1, i64* %2) {
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i64*
store i32 %0, i32* %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i32, i32* @ENOSYS
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @proc_get_hardware_limits(i32 %0, i64* nocapture readnone %1, i64* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
void SekInitS68k(void) {}


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

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

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

LLVM IR (-O2):
define void @SekInitS68k() {
ret void
}
/* Variables and functions */
int spawn(int, char **);
int main(int argc, char *argv[]) {
  argv[0] = "/usr/bin/man";
  return (spawn(argc, argv));
}


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    -0x10(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <spawn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rax
mov    %rax,(%rsi)
jmp    1030 <spawn@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/usr/bin/man\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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @spawn(i32 %8, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [13 x i8] c"/usr/bin/man\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @spawn(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void tosMemory_pokeString(int base, int offs, char *value) {
  strcpy((char *)(base + offs), value);
}


x86 assembly (clang, -O0):
<tosMemory_pokeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
movslq %eax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tosMemory_pokeString>:
add    %esi,%edi
movslq %edi,%rdi
mov    %rdx,%rsi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @tosMemory_pokeString(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = load i8*, i8** %6
%13 = call i32 @strcpy(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @tosMemory_pokeString(i32 %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, %0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @strcpy(i8* %6, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SystemAlarmsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void SystemAlarmsUpdated() { UAVObjUpdated(SystemAlarmsHandle()); }


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

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

LLVM IR (-O0):
define void @SystemAlarmsUpdated() {
%1 = call i32 (...) @SystemAlarmsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @SystemAlarmsUpdated() {
%1 = tail call i32 (...) @SystemAlarmsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
long foo(long, int);
int main(void) {
  if (foo(0L, 0x0ffffff0) != 0L)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
mov    $0xffffff0,%esi
call   1040 <foo@plt>
cmp    $0x0,%rax
je     115e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0xffffff0,%esi
call   1040 <foo@plt>
test   %rax,%rax
jne    1149 <main+0x19>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @foo(i64 0, i32 268435440)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i64 0, i32 268435440)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
int ra_conf_hoplimit(int newvalue) {
  static int value = 0;
  if (newvalue > 0)
    value = newvalue;
  return value;
}


x86 assembly (clang, -O0):
<ra_conf_hoplimit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111a <ra_conf_hoplimit+0x1a>
mov    -0x4(%rbp),%eax
mov    %eax,0x2f0a(%rip)
mov    0x2f04(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ra_conf_hoplimit>:
test   %edi,%edi
jle    110d <ra_conf_hoplimit+0xd>
mov    %edi,%eax
mov    %edi,0x2f18(%rip)
ret
mov    0x2f11(%rip),%eax
ret

LLVM IR (-O0):
@ra_conf_hoplimit.value = internal global i32 0
define i32 @ra_conf_hoplimit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
store i32 %6, i32* @ra_conf_hoplimit.value
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* @ra_conf_hoplimit.value
ret i32 %8
}

LLVM IR (-O2):
@ra_conf_hoplimit.value = internal unnamed_addr global i32 0
define i32 @ra_conf_hoplimit(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @ra_conf_hoplimit.value
br label %6
5: ; preds = %1
store i32 %0, i32* @ra_conf_hoplimit.value
br label %6
6: ; preds = %3, %5
%7 = phi i32 [ %4, %3 ], [ %0, %5 ]
ret i32 %7
}
int example_dll_2_function(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @example_dll_2_function() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ packer_uint16_hton(int /*<<< orphan*/);
uint16_t packer_uint16_ntoh(uint16_t value) {
  return packer_uint16_hton(value);
}


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

x86 assembly (clang, -O2):
<packer_uint16_ntoh>:
jmp    1030 <packer_uint16_hton@plt>

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

LLVM IR (-O2):
define i32 @packer_uint16_ntoh(i32 %0) {
%2 = tail call i32 @packer_uint16_hton(i32 %0)
ret i32 %2
}
int main(void) {
  int a = 2;
  return --a + 2;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ DATA_segment();
int /*<<< orphan*/ LibraryHeader(char *, char *);
int /*<<< orphan*/ STARTUP_segment();
LIBRARY_segment() {
  LibraryHeader("segment", "Sat Feb  1 10:41:21 2014 ");
  DATA_segment();
  STARTUP_segment();
}


x86 assembly (clang, -O0):
<LIBRARY_segment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <LibraryHeader@plt>
mov    $0x0,%al
call   1050 <DATA_segment@plt>
mov    $0x0,%al
call   1030 <STARTUP_segment@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LIBRARY_segment>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1040 <LibraryHeader@plt>
xor    %eax,%eax
call   1050 <DATA_segment@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <STARTUP_segment@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"segment\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:21 2014 \00"
define i32 @LIBRARY_segment() {
%1 = alloca i32
%2 = call i32 @LibraryHeader(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @DATA_segment()
%4 = call i32 (...) @STARTUP_segment()
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"segment\00"
@.str.1 = [26 x i8] c"Sat Feb 1 10:41:21 2014 \00"
define i32 @LIBRARY_segment() {
%1 = tail call i32 @LibraryHeader(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (...) @DATA_segment()
%3 = tail call i32 (...) @STARTUP_segment()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ release_pin(int);
int /*<<< orphan*/ update_pwm();
void release_pwm(int pin) {
  release_pin(pin);
  update_pwm();
}


x86 assembly (clang, -O0):
<release_pwm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <release_pin@plt>
mov    $0x0,%al
call   1030 <update_pwm@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @release_pwm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @release_pin(i32 %3)
%5 = call i32 (...) @update_pwm()
ret void
}

LLVM IR (-O2):
define void @release_pwm(i32 %0) {
%2 = tail call i32 @release_pin(i32 %0)
%3 = tail call i32 (...) @update_pwm()
ret void
}
void diffLineNumberTooLarge(buf) char const *buf;
{ rcsfaterror("diff line number too large: %s", buf); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"diff line number too large: %s\00"
define void @diffLineNumberTooLarge(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rcsfaterror to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"diff line number too large: %s\00"
define void @diffLineNumberTooLarge(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @rcsfaterror to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}