xunge/DecIR huggingface dataset:
/* Variables and functions */
int ENOSYS;
int hwconfig_arg_cmp_f(const char *opt, const char *arg, char *buf) {
  return -ENOSYS;
}


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

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

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @hwconfig_arg_cmp_f(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage:\n"
          "    frotate [ --prefix <p> --size 
 -n <n> ]\n"
          "\n"
          "    Read line from stdin and write to <p>, <p>.1, <p>.2, etc.\n"
          "    The output files are at most 
 bytes.\n"
          "    The number of output files is at most <n>.\n"
          "\n"
          "Default values: frotate --prefix frotate.log --size 524288 -n 3\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [274 x i8] c"Usage:\0A frotate [ --prefix <p> --size 
 -n <n> ]\0A\0A Read line from stdin and write to <p>, <p>.1, <p>.2, etc.\0A The output files are at most 
 bytes.\0A The number of output files is at most <n>.\0A\0ADefault values: frotate --prefix frotate.log --size 524288 -n 3\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([274 x i8], [274 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [274 x i8] c"Usage:\0A frotate [ --prefix <p> --size 
 -n <n> ]\0A\0A Read line from stdin and write to <p>, <p>.1, <p>.2, etc.\0A The output files are at most 
 bytes.\0A The number of output files is at most <n>.\0A\0ADefault values: frotate --prefix frotate.log --size 524288 -n 3\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([274 x i8], [274 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void RTVfsLockRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsLockRelease() {
ret void
}
int test_imm_3Cint8_mem(signed char *val) {
  return ((*val) & (-0x3C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Cint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffc4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Cint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -60
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int memcmp(s1, s2, n)
register char *s1, *s2;
{
  while (n-- > 0) {
    if (*s1 != *s2) {
      return (*s1 - *s2);
    }
    s1++;
    s2++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<memcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
jle    116e <memcmp+0x6e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <memcmp+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <memcmp+0x75>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110f <memcmp+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp>:
test   %edx,%edx
jle    112a <memcmp+0x2a>
add    $0x1,%edx
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%r8d
cmp    %r8b,%al
jne    112d <memcmp+0x2d>
add    $0xffffffff,%edx
add    $0x1,%rcx
cmp    $0x1,%edx
jg     1110 <memcmp+0x10>
xor    %eax,%eax
ret
sub    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @memcmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %21
5: ; preds = %3, %16
%6 = phi i32 [ %17, %16 ], [ %2, %3 ]
%7 = phi i8* [ %19, %16 ], [ %1, %3 ]
%8 = phi i8* [ %18, %16 ], [ %0, %3 ]
%9 = load i8, i8* %8
%10 = load i8, i8* %7
%11 = icmp eq i8 %9, %10
br i1 %11, label %16, label %12
12: ; preds = %5
%13 = sext i8 %10 to i32
%14 = sext i8 %9 to i32
%15 = sub nsw i32 %14, %13
br label %21
16: ; preds = %5
%17 = add nsw i32 %6, -1
%18 = getelementptr inbounds i8, i8* %8, i64 1
%19 = getelementptr inbounds i8, i8* %7, i64 1
%20 = icmp sgt i32 %6, 1
br i1 %20, label %5, label %21
21: ; preds = %16, %3, %12
%22 = phi i32 [ %15, %12 ], [ 0, %3 ], [ 0, %16 ]
ret i32 %22
}
/* Variables and functions */
int dag_start_stream(int, int /*<<< orphan*/);
int dag_start(int dagfd) { return dag_start_stream(dagfd, 0); }


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

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

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

LLVM IR (-O2):
define i32 @dag_start(i32 %0) {
%2 = tail call i32 @dag_start_stream(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printArray(int const **, int, int);
int /*<<< orphan*/ printf(char *);
void menuPrint(const int grades[][4], int pupils, int tests) {
  printf("The array is:\n");
  printArray(grades, 3, 4);
}


x86 assembly (clang, -O0):
<menuPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1040 <printArray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuPrint>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1040 <printArray@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"The array is:\0A\00"
define void @menuPrint([4 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [4 x i32]*
%5 = alloca i32
%6 = alloca i32
store [4 x i32]* %0, [4 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = load [4 x i32]*, [4 x i32]** %4
%9 = bitcast [4 x i32]* %8 to i32**
%10 = call i32 @printArray(i32** %9, i32 3, i32 4)
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"The array is:\00"
define void @menuPrint([4 x i32]* %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = bitcast [4 x i32]* %0 to i32**
%6 = tail call i32 @printArray(i32** %5, i32 3, i32 4)
ret void
}
void null_pruning1_Bad(int *p) {
  if (p == 0) {
    if (p == 0) {
      int a[5];
      a[10] = 1;
    }
  }
}


x86 assembly (clang, -O0):
<null_pruning1_Bad>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112a <null_pruning1_Bad+0x2a>
cmpq   $0x0,-0x8(%rbp)
jne    1125 <null_pruning1_Bad+0x25>
movl   $0x1,0x8(%rbp)
jmp    112a <null_pruning1_Bad+0x2a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @null_pruning1_Bad(i32* %0) {
%2 = alloca i32*
%3 = alloca [5 x i32]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32*, i32** %2
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 10
store i32 1, i32* %10
br label %11
11: ; preds = %9, %6
br label %12
12: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
define void @null_pruning1_Bad(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  scalar_t__ tm_year;
};

/* Variables and functions */
int getFirstWeekDayOfYear(struct tm const *);
time_t getWeekBasedYear(const struct tm *tm) {
  int firstWeekDay = getFirstWeekDayOfYear(tm);
  time_t year = (time_t)tm->tm_year + 1900;
  if (firstWeekDay == 0 || firstWeekDay >= 5) {
    year--;
  }
  return year;
}


x86 assembly (clang, -O0):
<getWeekBasedYear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getFirstWeekDayOfYear@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x76c,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114d <getWeekBasedYear+0x3d>
cmpl   $0x5,-0xc(%rbp)
jl     1159 <getWeekBasedYear+0x49>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWeekBasedYear>:
push   %rbx
mov    %rdi,%rbx
call   1030 <getFirstWeekDayOfYear@plt>
mov    (%rbx),%rcx
test   %eax,%eax
sete   %dl
cmp    $0x5,%eax
setge  %al
or     %dl,%al
movzbl %al,%eax
sub    %rax,%rcx
add    $0x76c,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i64 }
define i64 @getWeekBasedYear(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
%4 = alloca i64
store %struct.tm* %0, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @getFirstWeekDayOfYear(%struct.tm* %5)
store i32 %6, i32* %3
%7 = load %struct.tm*, %struct.tm** %2
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %9, 1900
store i64 %10, i64* %4
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %1
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 5
br i1 %15, label %16, label %19
16: ; preds = %13, %1
%17 = load i64, i64* %4
%18 = add nsw i64 %17, -1
store i64 %18, i64* %4
br label %19
19: ; preds = %16, %13
%20 = load i64, i64* %4
ret i64 %20
}

LLVM IR (-O2):
%struct.tm = type { i64 }
define i64 @getWeekBasedYear(%struct.tm* %0) {
%2 = tail call i32 @getFirstWeekDayOfYear(%struct.tm* %0)
%3 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = icmp eq i32 %2, 0
%6 = icmp sgt i32 %2, 4
%7 = or i1 %5, %6
%8 = select i1 %7, i64 1899, i64 1900
%9 = add nsw i64 %8, %4
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x14() {
  Assert_real((isascii(20)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              105, ("isascii should be 1 for 0x14"));
}


x86 assembly (clang, -O0):
<t_isascii_0x14>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x69,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x14>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x69,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x14\00"
define void @t_isascii_0x14() {
%1 = call i32 @isascii(i32 20)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x14\00"
define void @t_isascii_0x14() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main(int argc, char **argv) { return 21 << 1; }


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

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

LLVM IR (-O0):
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
ret i32 42
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ Label_Printf(char *, ...);
void Label(char *label) {
  Label_Printf("");
  Label_Printf("%s:", label);
}


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

x86 assembly (clang, -O2):
<Label>:
push   %rbx
mov    %rdi,%rbx
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <Label_Printf@plt>
lea    0xed7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <Label_Printf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%s:\00"
define void @Label(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @Label_Printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @Label_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i8] c"%s:\00"
define void @Label(i8* %0) {
%2 = tail call i32 (i8*, ...) @Label_Printf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @Label_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int execute_inotify_init1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_inotify_init1() {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool rtp_6184_fu_check_end(uint8_t header) { return header & 0x40; }


x86 assembly (clang, -O0):
<rtp_6184_fu_check_end>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x40,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp_6184_fu_check_end>:
mov    %edi,%eax
and    $0x40,%eax
ret

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

LLVM IR (-O2):
define i32 @rtp_6184_fu_check_end(i32 %0) {
%2 = and i32 %0, 64
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world \n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello world \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int HelpItem13(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem13() {
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ symlink(char *, char *);
int main(void) {
  if (0 > symlink("arnold.layne", "jugband.blues"))
    return EXIT_FAILURE;
  else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <symlink@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1151 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <main+0x4d>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <symlink@plt>
test   %rax,%rax
jns    1132 <main+0x22>
mov    0x2eb0(%rip),%rax
jmp    1139 <main+0x29>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [14 x i8] c"jugband.blues\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @symlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp sgt i64 0, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_SUCCESS
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [14 x i8] c"jugband.blues\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @symlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
%3 = load i32, i32* @EXIT_FAILURE
%4 = load i32, i32* @EXIT_SUCCESS
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
void ff_hevc_put_hevc_uni_w_pel_pixels32_12_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  FILE *p = NULL;
  p = fopen("b", "r");
  if (NULL == p) {
    puts("打开文件失败");
  }
  fclose(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
lea    0xead(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1176 <main+0x46>
lea    0xe93(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1158 <main+0x28>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"b\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [19 x i8] c"\E6\89\93\E5\BC\80\E6\96\87\E4\BB\B6\E5\A4\B1\E8\B4\A5\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %2
%3 = call i32* @fopen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = icmp eq i32* null, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32*, i32** %2
%10 = call i32 @fclose(i32* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"b\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [19 x i8] c"\E6\89\93\E5\BC\80\E6\96\87\E4\BB\B6\E5\A4\B1\E8\B4\A5\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @fclose(i32* %1)
ret i32 0
}
float fahr_to_celsius(float fahr) {
  float celsius = (5.0 / 9.0) * (fahr - 32.0);
  return celsius;
}


x86 assembly (clang, -O0):
<fahr_to_celsius>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr_to_celsius>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @fahr_to_celsius(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @fahr_to_celsius(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}
void threshold(unsigned char *original1, unsigned char *result,
               unsigned int dimh, unsigned int h, unsigned int v, int thresh) {
  int a = 0;
  if (original1[v * dimh + h] < thresh) {
    result[v * dimh + h] = 0;
  } else {
    result[v * dimh + h] = 255;
  }
}


x86 assembly (clang, -O0):
<threshold>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
cmp    -0x20(%rbp),%eax
jge    1157 <threshold+0x57>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
mov    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
jmp    116b <threshold+0x6b>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
mov    %ecx,%ecx
movb   $0xff,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<threshold>:
imul   %r8d,%edx
add    %ecx,%edx
movzbl (%rdi,%rdx,1),%eax
cmp    %r9d,%eax
setge  %al
neg    %al
mov    %al,(%rsi,%rdx,1)
ret

LLVM IR (-O0):
define void @threshold(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 0, i32* %13
%14 = load i8*, i8** %7
%15 = load i32, i32* %11
%16 = load i32, i32* %9
%17 = mul i32 %15, %16
%18 = load i32, i32* %10
%19 = add i32 %17, %18
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %14, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i32, i32* %12
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %35
26: ; preds = %6
%27 = load i8*, i8** %8
%28 = load i32, i32* %11
%29 = load i32, i32* %9
%30 = mul i32 %28, %29
%31 = load i32, i32* %10
%32 = add i32 %30, %31
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %27, i64 %33
store i8 0, i8* %34
br label %44
35: ; preds = %6
%36 = load i8*, i8** %8
%37 = load i32, i32* %11
%38 = load i32, i32* %9
%39 = mul i32 %37, %38
%40 = load i32, i32* %10
%41 = add i32 %39, %40
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %36, i64 %42
store i8 -1, i8* %43
br label %44
44: ; preds = %35, %26
ret void
}

LLVM IR (-O2):
define void @threshold(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = mul i32 %4, %2
%8 = add i32 %7, %3
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp sge i32 %12, %5
%14 = sext i1 %13 to i8
%15 = getelementptr inbounds i8, i8* %1, i64 %9
store i8 %14, i8* %15
ret void
}
__attribute__((always_)) void XRaySaveReport(const char *filename,
                                             float cutoff) {
  ;
}


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

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

LLVM IR (-O0):
define void @XRaySaveReport(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
ret void
}

LLVM IR (-O2):
define void @XRaySaveReport(i8* nocapture %0, float %1) {
ret void
}
void Vector_Add(float vectorOut[3], float vectorIn1[3], float vectorIn2[3]) {
  int c;
  for (c = 0; c < 3; c++) {
    vectorOut[c] = vectorIn1[c] + vectorIn2[c];
  }
}


x86 assembly (clang, -O0):
<Vector_Add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1156 <Vector_Add+0x56>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <Vector_Add+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector_Add>:
movss  (%rsi),%xmm0
addss  (%rdx),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
addss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x8(%rsi),%xmm0
addss  0x8(%rdx),%xmm0
movss  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @Vector_Add(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fadd float %4, %5
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fadd float %8, %10
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = fadd float %14, %16
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
bool QEIErrorGet(uint32_t ui32Base) {
  ASSERT((ui32Base == 0x4002C000) || (ui32Base == 0x4002D000));
  return (((*((volatile uint32_t *)(ui32Base + 0x00000004))) & 0x00000001)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<QEIErrorGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x4002c000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113a <QEIErrorGet+0x2a>
cmpl   $0x4002d000,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x4,%eax
cltq
mov    (%rax),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIErrorGet>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x4002c000,%eax
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
mov    0x4(%rax),%eax
and    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @QEIErrorGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1073922048
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1073926144
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 4
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = and i32 %16, 1
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 1, i32 0
ret i32 %20
}

LLVM IR (-O2):
define i32 @QEIErrorGet(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073922048
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = add nsw i32 %0, 4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int f52(int *);
int f53(int *p) { return f52(p); }


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

x86 assembly (clang, -O2):
<f53>:
jmp    1030 <f52@plt>

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

LLVM IR (-O2):
define i32 @f53(i32* %0) {
%2 = tail call i32 @f52(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DelElmLL(void *);
void *PrevElmLL(void *);
void *DelElmPrLL(void *el) {
  void *prev = PrevElmLL(el);
  DelElmLL(el);
  return (prev);
}


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

x86 assembly (clang, -O2):
<DelElmPrLL>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <PrevElmLL@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <DelElmLL@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @DelElmPrLL(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @PrevElmLL(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @DelElmLL(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @DelElmPrLL(i8* %0) {
%2 = tail call i8* @PrevElmLL(i8* %0)
%3 = tail call i32 @DelElmLL(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exportGPIOFile(char *, int);
int main() {
  exportGPIOFile("/sys/class/gpio/export", 30);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @exportGPIOFile(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 30)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
define i32 @main() {
%1 = tail call i32 @exportGPIOFile(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 30)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
int ZERO_EXTEND_W_B(int reg) {
  addbyte(0x0f);
  addbyte(0xb6);
  addbyte(0xc0 | reg | (reg << 3));
  return reg;
}


x86 assembly (clang, -O0):
<ZERO_EXTEND_W_B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb6,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZERO_EXTEND_W_B>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xb6,%edi
call   1030 <addbyte@plt>
lea    0x0(,%rbx,8),%edi
or     %ebx,%edi
or     $0xc0,%edi
call   1030 <addbyte@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ZERO_EXTEND_W_B(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @addbyte(i32 15)
%4 = call i32 @addbyte(i32 182)
%5 = load i32, i32* %2
%6 = or i32 192, %5
%7 = load i32, i32* %2
%8 = shl i32 %7, 3
%9 = or i32 %6, %8
%10 = call i32 @addbyte(i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @ZERO_EXTEND_W_B(i32 returned %0) {
%2 = tail call i32 @addbyte(i32 15)
%3 = tail call i32 @addbyte(i32 182)
%4 = shl i32 %0, 3
%5 = or i32 %4, %0
%6 = or i32 %5, 192
%7 = tail call i32 @addbyte(i32 %6)
ret i32 %0
}
void gdk_font_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_font_type_get_type() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
void *yy_flex_alloc(unsigned int size) { return (void *)malloc(size); }


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

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

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

LLVM IR (-O2):
define i8* @yy_flex_alloc(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t uDMAIntStatus(void) {
  return ((*((volatile uint32_t *)(0x400FF504))));
}


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

x86 assembly (clang, -O2):
<uDMAIntStatus>:
mov    0x400ff504,%eax
ret

LLVM IR (-O0):
define i32 @uDMAIntStatus() {
%1 = load volatile i32, i32* inttoptr (i64 1074787588 to i32*)
ret i32 %1
}

LLVM IR (-O2):
define i32 @uDMAIntStatus() {
%1 = load volatile i32, i32* inttoptr (i64 1074787588 to i32*)
ret i32 %1
}
/* Variables and functions */
unsigned char USBNRead(int);
int /*<<< orphan*/ _USBNTransmitFIFO0();
void _USBNTransmitEvent(void) {
  unsigned char event;
  event = USBNRead(0x0A);
  if (event & 0x01)
    _USBNTransmitFIFO0();
  else {
    USBNRead(0x2A);
    USBNRead(0x32);
    USBNRead(0x3A);
  }
}


x86 assembly (clang, -O0):
<_USBNTransmitEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1030 <USBNRead@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1151 <_USBNTransmitEvent+0x31>
mov    $0x0,%al
call   1040 <_USBNTransmitFIFO0@plt>
jmp    116f <_USBNTransmitEvent+0x4f>
mov    $0x2a,%edi
call   1030 <USBNRead@plt>
mov    $0x32,%edi
call   1030 <USBNRead@plt>
mov    $0x3a,%edi
call   1030 <USBNRead@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_USBNTransmitEvent>:
push   %rax
mov    $0xa,%edi
call   1030 <USBNRead@plt>
test   $0x1,%al
jne    114e <_USBNTransmitEvent+0x2e>
mov    $0x2a,%edi
call   1030 <USBNRead@plt>
mov    $0x32,%edi
call   1030 <USBNRead@plt>
mov    $0x3a,%edi
pop    %rax
jmp    1030 <USBNRead@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <_USBNTransmitFIFO0@plt>

LLVM IR (-O0):
define void @_USBNTransmitEvent() {
%1 = alloca i8
%2 = call zeroext i8 @USBNRead(i32 10)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @_USBNTransmitFIFO0()
br label %13
9: ; preds = %0
%10 = call zeroext i8 @USBNRead(i32 42)
%11 = call zeroext i8 @USBNRead(i32 50)
%12 = call zeroext i8 @USBNRead(i32 58)
br label %13
13: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
define void @_USBNTransmitEvent() {
%1 = tail call zeroext i8 @USBNRead(i32 10)
%2 = and i8 %1, 1
%3 = icmp eq i8 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @_USBNTransmitFIFO0()
br label %10
6: ; preds = %0
%7 = tail call zeroext i8 @USBNRead(i32 42)
%8 = tail call zeroext i8 @USBNRead(i32 50)
%9 = tail call zeroext i8 @USBNRead(i32 58)
br label %10
10: ; preds = %6, %4
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ test_equal();
int /*<<< orphan*/ test_transpose();
int main(int argc, char **argv) {
  test_equal();
  test_transpose();
  return EXIT_SUCCESS;
}


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    $0x0,%al
call   1030 <test_equal@plt>
mov    $0x0,%al
call   1040 <test_transpose@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_equal@plt>
xor    %eax,%eax
call   1040 <test_transpose@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_equal()
%7 = call i32 (...) @test_transpose()
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_equal()
%4 = tail call i32 (...) @test_transpose()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
scalar_t__ EINTR;
int dup2(int, int);
scalar_t__ errno;
int sane_dup2(int fd1, int fd2) {
  int ret;
  do
    ret = dup2(fd1, fd2);
  while (ret < 0 && errno == EINTR);
  return ret;
}


x86 assembly (clang, -O0):
<sane_dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jge    1155 <sane_dup2+0x45>
mov    0x2e9e(%rip),%rax
mov    (%rax),%rax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    111e <sane_dup2+0xe>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sane_dup2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ebe(%rip),%r14
mov    0x2eaf(%rip),%r15
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <dup2@plt>
test   %eax,%eax
jns    1145 <sane_dup2+0x35>
mov    (%r15),%rcx
cmp    %rcx,(%r14)
je     1130 <sane_dup2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i64 0
@EINTR = global i64 0
define i32 @sane_dup2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @dup2(i32 %7, i32 %8)
store i32 %9, i32* %5
br label %10
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i64, i64* @errno
%15 = load i64, i64* @EINTR
%16 = icmp eq i64 %14, %15
br label %17
17: ; preds = %13, %10
%18 = phi i1 [ false, %10 ], [ %16, %13 ]
br i1 %18, label %6, label %19
19: ; preds = %17
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @sane_dup2(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @dup2(i32 %0, i32 %1)
%5 = icmp slt i32 %4, 0
%6 = load i64, i64* @errno
%7 = load i64, i64* @EINTR
%8 = icmp eq i64 %6, %7
%9 = select i1 %5, i1 %8, i1 false
br i1 %9, label %3, label %10
10: ; preds = %3
ret i32 %4
}
int UartRxWait(unsigned int tmo) {
  while (((*((volatile unsigned int *)((0xFFFD0000 + 0x14)))) & 0x00000001) ==
         0) {
    if (tmo-- == 0) {
      return -1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<UartRxWait>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0xfffd0014,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    113f <UartRxWait+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jne    113a <UartRxWait+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <UartRxWait+0x46>
jmp    1107 <UartRxWait+0x7>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UartRxWait>:
add    $0x1,%edi
mov    $0xfffd0014,%eax
nopl   0x0(%rax,%rax,1)
mov    (%rax),%ecx
test   $0x1,%cl
jne    1122 <UartRxWait+0x22>
add    $0xffffffff,%edi
jne    1110 <UartRxWait+0x10>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @UartRxWait(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load volatile i32, i32* inttoptr (i64 4294770708 to i32*)
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add i32 %9, -1
store i32 %10, i32* %3
%11 = icmp eq i32 %9, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 -1, i32* %2
br label %15
13: ; preds = %8
br label %4
14: ; preds = %4
store i32 0, i32* %2
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @UartRxWait(i32 %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ %0, %1 ], [ %8, %7 ]
%4 = load volatile i32, i32* inttoptr (i64 4294770708 to i32*)
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = add i32 %3, -1
%9 = icmp eq i32 %3, 0
br i1 %9, label %10, label %2
10: ; preds = %2, %7
%11 = phi i32 [ -1, %7 ], [ 0, %2 ]
ret i32 %11
}
int main() {
  float f = -0.f;
  unsigned char *ptr = (unsigned char *)&f;
  int is_big = (ptr[3] == 0x80u);
  if (!is_big)
    return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xeed(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1149 <main+0x49>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store float -0.000000e+00, float* %2
%5 = bitcast float* %2 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 128
%11 = zext i1 %10 to i32
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %0
store i32 -1, i32* %1
br label %15
15: ; preds = %14, %0
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}