xunge/DecIR huggingface dataset:
int test_imm_76int8_mem(signed char *val) {
  return ((*val) & (0x76 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_76int8_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, 118
%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_76int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 118
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct FitIndex {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct FitIndex *FitIndexLoad(int /*<<< orphan*/);
int /*<<< orphan*/ fileno(int /*<<< orphan*/ *);
struct FitIndex *FitIndexFload(FILE *fp) {
  return FitIndexLoad(fileno(fp));
}


x86 assembly (clang, -O0):
<FitIndexFload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fileno@plt>
mov    %eax,%edi
call   1040 <FitIndexLoad@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FitIndexFload>:
push   %rax
call   1030 <fileno@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <FitIndexLoad@plt>

LLVM IR (-O0):
%struct.FitIndex = type { i32 }
define %struct.FitIndex* @FitIndexFload(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fileno(i32* %3)
%5 = call %struct.FitIndex* @FitIndexLoad(i32 %4)
ret %struct.FitIndex* %5
}

LLVM IR (-O2):
%struct.FitIndex = type { i32 }
define %struct.FitIndex* @FitIndexFload(i32* nocapture %0) {
%2 = tail call i32 @fileno(i32* %0)
%3 = tail call %struct.FitIndex* @FitIndexLoad(i32 %2)
ret %struct.FitIndex* %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x58() {
  Assert_real((isupper(88)),
              "/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_isupper.c",
              445, ("isupper should be 1 for X"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x58>:
push   %rax
mov    $0x58,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1bd,%edx
pop    %rax
jmp    1040 <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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for X\00"
define void @t_isupper_0x58() {
%1 = call i32 @isupper(i32 88)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for X\00"
define void @t_isupper_0x58() {
%1 = tail call i32 @isupper(i32 88)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Copy();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf(" %d\n", sizeof(short));
  printf("Hello World!\n");
  Copy();
  while (1) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <Copy@plt>
jmp    1157 <main+0x37>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <Copy@plt>
nopw   0x0(%rax,%rax,1)
jmp    1160 <main+0x30>

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

LLVM IR (-O2):
@.str = [5 x i8] c" %d\0A\00"
@str = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 2)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @Copy()
br label %4
4: ; preds = %0, %4
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, d = 0;
  scanf("%d", &n);
  do {
    n /= 10;
    d++;
  } while (n > 0);
  printf("%d\n", d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1146 <main+0x26>
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
xor    %esi,%esi
mov    0x4(%rsp),%eax
nopl   0x0(%rax,%rax,1)
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
add    $0x1,%esi
cmp    $0x9,%ecx
jg     1140 <main+0x20>
mov    %eax,0x4(%rsp)
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
br label %5
5: ; preds = %5, %0
%6 = phi i32 [ %8, %5 ], [ %4, %0 ]
%7 = phi i32 [ %9, %5 ], [ 0, %0 ]
%8 = sdiv i32 %6, 10
%9 = add nuw nsw i32 %7, 1
%10 = icmp sgt i32 %6, 9
br i1 %10, label %5, label %11
11: ; preds = %5
store i32 %8, i32* %1
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void g_object_get_qdata() {}


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

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

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

LLVM IR (-O2):
define void @g_object_get_qdata() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run(char *);
int /*<<< orphan*/ write(int, char *, int);
int main(int ac, char **av) {
  if (ac == 2)
    run(av[1]);
  else
    write(1, "Usage: ./a.out code\n", 21);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1152 <main+0x32>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <run@plt>
jmp    1168 <main+0x48>
mov    $0x1,%edi
lea    0xea2(%rip),%rsi
mov    $0x15,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1131 <main+0x11>
mov    0x8(%rsi),%rdi
call   1040 <run@plt>
jmp    1147 <main+0x27>
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
mov    $0x15,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"Usage: ./a.out code\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @run(i8* %6)
br label %10
8: ; preds = %2
%9 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 21)
br label %10
10: ; preds = %8, %4
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *generateLogTime(char *timeStr) {
  time_t timep;
  struct tm *tm;
  time(&timep);
  tm = localtime(&timep);
  strftime(timeStr, 100 - 1, "%a %b %d %T %Y", tm);
  return timeStr;
}


x86 assembly (clang, -O0):
<generateLogTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x63,%esi
lea    0xe9a(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateLogTime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x63,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %b %d %T %Y\00"
define i8* @generateLogTime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 99, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [15 x i8] c"%a %b %d %T %Y\00"
define i8* @generateLogTime(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 99, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ sem_unlink(char *);
int /*<<< orphan*/ stdout;
int highlander_clean(void) {
  fprintf(stdout, "Removing named semaphore /power_wrapperK\n");
  sem_unlink("/power_wrapperK");
  fprintf(stdout, "Removing named semaphore /power_wrapperL\n");
  sem_unlink("/power_wrapperL");
  return 1;
}


x86 assembly (clang, -O0):
<highlander_clean>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xeea(%rip),%rdi
call   1040 <sem_unlink@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xee5(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xf03(%rip),%rdi
call   1040 <sem_unlink@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<highlander_clean>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xeed(%rip),%rdi
call   1040 <sem_unlink@plt>
mov    (%rbx),%edi
lea    0xeef(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xf0d(%rip),%rdi
call   1040 <sem_unlink@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [42 x i8] c"Removing named semaphore /power_wrapperK\0A\00"
@.str.1 = [16 x i8] c"/power_wrapperK\00"
@.str.2 = [42 x i8] c"Removing named semaphore /power_wrapperL\0A\00"
@.str.3 = [16 x i8] c"/power_wrapperL\00"
define i32 @highlander_clean() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sem_unlink(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @sem_unlink(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [42 x i8] c"Removing named semaphore /power_wrapperK\0A\00"
@.str.1 = [16 x i8] c"/power_wrapperK\00"
@.str.2 = [42 x i8] c"Removing named semaphore /power_wrapperL\0A\00"
@.str.3 = [16 x i8] c"/power_wrapperL\00"
define i32 @highlander_clean() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sem_unlink(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @sem_unlink(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}
void yy_1_LinkOptionStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_LinkOptionStar(i8* nocapture %0, i32 %1) {
ret void
}
int compara(const void *p1, const void *p2) {
  int *i = (int *)p1, *j = (int *)p2;
  if (*i < *j)
    return -1;
  else if (*i == *j)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<compara>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    113a <compara+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <compara+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jne    1158 <compara+0x58>
movl   $0x0,-0x4(%rbp)
jmp    115f <compara+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compara>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compara(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = icmp ne i32 %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void Interrupt_Enable(void) {}


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

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

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

LLVM IR (-O2):
define void @Interrupt_Enable() {
ret void
}
/* Variables and functions */
int f1();
int f2();
int f3();
int main() { return f1() == f2() + f2() == f3() + f1() == f3(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <f1@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <f2@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <f2@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    -0x14(%rbp),%eax
add    %edx,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <f3@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <f1@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
add    %edx,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <f3@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <f1@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <f2@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <f2@plt>
add    %ebp,%eax
xor    %ebp,%ebp
cmp    %eax,%ebx
sete   %bpl
xor    %eax,%eax
call   1040 <f3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <f1@plt>
add    %ebx,%eax
xor    %ebx,%ebx
cmp    %ebp,%eax
sete   %bl
xor    %eax,%eax
call   1040 <f3@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f1()
%3 = call i32 (...) @f2()
%4 = call i32 (...) @f2()
%5 = add nsw i32 %3, %4
%6 = icmp eq i32 %2, %5
%7 = zext i1 %6 to i32
%8 = call i32 (...) @f3()
%9 = call i32 (...) @f1()
%10 = add nsw i32 %8, %9
%11 = icmp eq i32 %7, %10
%12 = zext i1 %11 to i32
%13 = call i32 (...) @f3()
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 (...) @f2()
%3 = tail call i32 (...) @f2()
%4 = add nsw i32 %3, %2
%5 = icmp eq i32 %1, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 (...) @f3()
%8 = tail call i32 (...) @f1()
%9 = add nsw i32 %8, %7
%10 = icmp eq i32 %9, %6
%11 = zext i1 %10 to i32
%12 = tail call i32 (...) @f3()
%13 = icmp eq i32 %12, %11
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSendEvent() {
  printf("XSendEvent called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"XSendEvent called\0A\00"
define i32 @XSendEvent() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [18 x i8] c"XSendEvent called\00"
define i32 @XSendEvent() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret i32 0
}
main(argc, argv) int argc;
char *argv[];
{
  init(argc, argv);
  commnds();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <init@plt>
xor    %eax,%eax
call   1040 <commnds@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @init to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%4 = tail call i32 (...) @commnds()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void wn_scale_vect(double *vect, double scalar, int len) { assert(0); }


x86 assembly (clang, -O0):
<wn_scale_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wn_scale_vect(double* %0, double %1, i32 %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
store double* %0, double** %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @wn_scale_vect(double* nocapture readnone %0, double %1, i32 %2) {
%4 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void __VERIFIER_error() { abort(); }


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

x86 assembly (clang, -O2):
<__VERIFIER_error>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @__VERIFIER_error() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @__VERIFIER_error() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hang();
int /*<<< orphan*/ uart_strln(char *);
void c_fiq() {
  uart_strln("Exception: FIQ");
  hang();
}


x86 assembly (clang, -O0):
<c_fiq>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <uart_strln@plt>
mov    $0x0,%al
call   1040 <hang@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_fiq>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <uart_strln@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <hang@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Exception: FIQ\00"
define void @c_fiq() {
%1 = call i32 @uart_strln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @hang()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Exception: FIQ\00"
define void @c_fiq() {
%1 = tail call i32 @uart_strln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @hang()
ret void
}
int test_imm_B5uint16_mem(unsigned short *val) {
  return ((*val) & (0xB5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B5uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 181
%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_B5uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 181
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_dec_h(void) { op_write1(0x25); }


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

x86 assembly (clang, -O2):
<op_enc_dec_h>:
mov    $0x25,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_dec_h() {
%1 = call i32 @op_write1(i32 37)
ret void
}

LLVM IR (-O2):
define void @op_enc_dec_h() {
%1 = tail call i32 @op_write1(i32 37)
ret void
}
signed int fc8180_tuner_deinit(void *handle) { return 0; }


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

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

LLVM IR (-O0):
define i32 @fc8180_tuner_deinit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8180_tuner_deinit(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int32_t cmp(void *a, void *b) {
  char *x = (char *)a;
  char *y = (char *)b;
  return strcmp(x, y);
}


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

x86 assembly (clang, -O2):
<cmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
void mutexee_cdelay(const int cycles) {
  int cy = cycles;
  while (cy--) {
    asm volatile("");
  }
}


x86 assembly (clang, -O0):
<mutexee_cdelay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1126 <mutexee_cdelay+0x26>
jmp    110d <mutexee_cdelay+0xd>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutexee_cdelay>:
test   %edi,%edi
je     1115 <mutexee_cdelay+0x15>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xffffffff,%edi
jne    1110 <mutexee_cdelay+0x10>
ret

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

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

/* Variables and functions */
void *memcpy(int /*<<< orphan*/, void const *, int /*<<< orphan*/);
int /*<<< orphan*/ xmalloc(int /*<<< orphan*/);
void *xmemdup(const void *src, ssize_t size) {
  return memcpy(xmalloc(size), src, size);
}


x86 assembly (clang, -O0):
<xmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemdup>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <xmalloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @xmemdup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @xmalloc(i32 %5)
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i8* @memcpy(i32 %6, i8* %7, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @xmemdup(i8* %0, i32 %1) {
%3 = tail call i32 @xmalloc(i32 %1)
%4 = tail call i8* @memcpy(i32 %3, i8* %0, i32 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: time [-al] [-h | -p] [-o file] utility [argument ...]\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 = [62 x i8] c"usage: time [-al] [-h | -p] [-o file] utility [argument ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"usage: time [-al] [-h | -p] [-o file] utility [argument ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) { fprintf(stderr, "ERROR: %s\n", msg); }


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *gitstrchrnul(const char *s, int c) {
  while (*s && *s != c)
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<gitstrchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <gitstrchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <gitstrchrnul+0x40>
jmp    1151 <gitstrchrnul+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <gitstrchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gitstrchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <gitstrchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <gitstrchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @gitstrchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
int main() {
  int x, y;
  __asm__ __volatile__("mov $0x1a2b3c4d, %%eax\n\t"
                       "clc\n\t"
                       "mov $0xdeadbeef, %%edx\n\t"
                       "setc %%al\n\t"
                       "mov %%eax, %0\n\t"
                       "mov $0x1a2b3c4d, %%eax\n\t"
                       "stc\n\t"
                       "mov $0xdeadbeef, %%edx\n\t"
                       "setc %%al\n\t"
                       "mov %%eax, %1\n\t"
                       : "=m"(x), "=m"(y)
                       :
                       : "eax", "edx");
  do {
    if (!(x == 0x1a2b3c00))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  do {
    if (!(y == 0x1a2b3c01))
      asm volatile(".byte 0xd6" : : "a"(1));
  } while (0);
  asm volatile(".byte 0xd6" : : "a"(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x1a2b3c4d,%eax
clc
mov    $0xdeadbeef,%edx
setb   %al
mov    %eax,-0x8(%rbp)
mov    $0x1a2b3c4d,%eax
stc
mov    $0xdeadbeef,%edx
setb   %al
mov    %eax,-0xc(%rbp)
cmpl   $0x1a2b3c00,-0x8(%rbp)
je     1140 <main+0x40>
mov    $0x1,%eax
(bad)
jmp    1145 <main+0x45>
jmp    114a <main+0x4a>
cmpl   $0x1a2b3c01,-0xc(%rbp)
je     115d <main+0x5d>
mov    $0x1,%eax
(bad)
jmp    1162 <main+0x62>
xor    %eax,%eax
(bad)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1a2b3c4d,%eax
clc
mov    $0xdeadbeef,%edx
setb   %al
mov    %eax,-0x4(%rsp)
mov    $0x1a2b3c4d,%eax
stc
mov    $0xdeadbeef,%edx
setb   %al
mov    %eax,-0x8(%rsp)
cmpl   $0x1a2b3c00,-0x4(%rsp)
1a
je     1134 <main+0x34>
mov    $0x1,%eax
(bad)
cmpl   $0x1a2b3c01,-0x8(%rsp)
1a
je     1144 <main+0x44>
mov    $0x1,%eax
(bad)
xor    %eax,%eax
(bad)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %0
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 439041024
br i1 %6, label %8, label %7
7: ; preds = %4
br label %8
8: ; preds = %7, %4
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 439041025
br i1 %12, label %14, label %13
13: ; preds = %10
br label %14
14: ; preds = %13, %10
br label %15
15: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 439041024
br i1 %6, label %8, label %7
7: ; preds = %0
br label %8
8: ; preds = %0, %7
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 439041025
br i1 %10, label %12, label %11
11: ; preds = %8
br label %12
12: ; preds = %11, %8
ret i32 0
}
unsigned long ReadLong(const unsigned char *bytes) {
  return (unsigned long)(((unsigned long)(bytes[0] & 0xFF) << 24) |
                         ((unsigned long)(bytes[1] & 0xFF) << 16) |
                         ((unsigned long)(bytes[2] & 0xFF) << 8) |
                         ((unsigned long)(bytes[3] & 0xFF)));
}


x86 assembly (clang, -O0):
<ReadLong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xff,%eax
cltq
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadLong>:
mov    (%rdi),%eax
shl    $0x20,%rax
bswap  %rax
ret

LLVM IR (-O0):
define i64 @ReadLong(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = sext i32 %7 to i64
%9 = shl i64 %8, 24
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 255
%15 = sext i32 %14 to i64
%16 = shl i64 %15, 16
%17 = or i64 %9, %16
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = and i32 %21, 255
%23 = sext i32 %22 to i64
%24 = shl i64 %23, 8
%25 = or i64 %17, %24
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i64 3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = and i32 %29, 255
%31 = sext i32 %30 to i64
%32 = or i64 %25, %31
ret i64 %32
}

LLVM IR (-O2):
define i64 @ReadLong(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = shl nuw nsw i64 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %7, 16
%9 = or i64 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = shl nuw nsw i64 %12, 8
%14 = or i64 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
ret i64 %18
}
int fun1160() { return 1160; }


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

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

LLVM IR (-O0):
define i32 @fun1160() {
ret i32 1160
}

LLVM IR (-O2):
define i32 @fun1160() {
ret i32 1160
}
/* Variables and functions */
float copysignf(float, float);
int main() {
  float neg = -1.0;
  float pos = 1.0;
  float res = copysignf(pos, neg);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movss  0xf11(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xf00(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movaps 0xeca(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xecf(%rip),%xmm2
pand   %xmm2,%xmm0
por    %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float -1.000000e+00, float* %2
store float 1.000000e+00, float* %3
%5 = load float, float* %3
%6 = load float, float* %2
%7 = call float @llvm.copysign.f32(float %5, float %6)
store float %7, float* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
long long gccbugs_llmul(long long a, long long b) { return a * b; }


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

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

LLVM IR (-O0):
define i64 @gccbugs_llmul(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @gccbugs_llmul(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
char *langRomTypeMicrosolFdc() { return "Microsol Disk Controller"; }


x86 assembly (clang, -O0):
<langRomTypeMicrosolFdc>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeMicrosolFdc>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Microsol Disk Controller\00"
define i8* @langRomTypeMicrosolFdc() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [25 x i8] c"Microsol Disk Controller\00"
define i8* @langRomTypeMicrosolFdc() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;
typedef int int16_t;

/* Variables and functions */
scalar_t__ clamp_s12(int const);
void RescaleYSubBlock(int16_t *dst, const int16_t *src) {
  unsigned int i;
  for (i = 0; i < 64; ++i)
    dst[i] = (((uint32_t)(clamp_s12(src[i]) + 0x800) * 0xdb0) >> 16) + 0x10;
}


x86 assembly (clang, -O0):
<RescaleYSubBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jae    116a <RescaleYSubBlock+0x5a>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
call   1030 <clamp_s12@plt>
add    $0x800,%rax
imul   $0xdb0,%eax,%edx
sar    $0x10,%edx
add    $0x10,%edx
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <RescaleYSubBlock+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RescaleYSubBlock>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r14,%rbx,4),%edi
call   1030 <clamp_s12@plt>
imul   $0xdb0,%eax,%eax
add    $0x6d8000,%eax
sar    $0x10,%eax
add    $0x10,%eax
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    $0x40,%rbx
jne    1120 <RescaleYSubBlock+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @RescaleYSubBlock(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 = %25, %2
%7 = load i32, i32* %5
%8 = icmp ult i32 %7, 64
br i1 %8, label %9, label %28
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = call i64 @clamp_s12(i32 %14)
%16 = add nsw i64 %15, 2048
%17 = trunc i64 %16 to i32
%18 = mul nsw i32 %17, 3504
%19 = ashr i32 %18, 16
%20 = add nsw i32 %19, 16
%21 = load i32*, i32** %3
%22 = load i32, i32* %5
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
store i32 %20, i32* %24
br label %25
25: ; preds = %9
%26 = load i32, i32* %5
%27 = add i32 %26, 1
store i32 %27, i32* %5
br label %6
28: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @RescaleYSubBlock(i32* nocapture writeonly %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %14, %3 ]
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = tail call i64 @clamp_s12(i32 %6)
%8 = trunc i64 %7 to i32
%9 = mul i32 %8, 3504
%10 = add i32 %9, 7176192
%11 = ashr i32 %10, 16
%12 = add nsw i32 %11, 16
%13 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %12, i32* %13
%14 = add nuw nsw i64 %4, 1
%15 = icmp eq i64 %14, 64
br i1 %15, label %16, label %3
16: ; preds = %3
ret void
}
int giveNum(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @giveNum() {
ret i32 1
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __wait4(int /*<<< orphan*/, int *, int, struct rusage *);
pid_t wait3(int *status, int options, struct rusage *rusage) {
  return __wait4((pid_t)-1, status, options, rusage);
}


x86 assembly (clang, -O0):
<wait3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0xffffffff,%edi
call   1030 <__wait4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait3>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1030 <__wait4@plt>

LLVM IR (-O0):
%struct.rusage = type { i32 }
define i32 @wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca %struct.rusage*
store i32* %0, i32** %4
store i32 %1, i32* %5
store %struct.rusage* %2, %struct.rusage** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load %struct.rusage*, %struct.rusage** %6
%10 = call i32 @__wait4(i32 -1, i32* %7, i32 %8, %struct.rusage* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
define i32 @wait3(i32* %0, i32 %1, %struct.rusage* %2) {
%4 = tail call i32 @__wait4(i32 -1, i32* %0, i32 %1, %struct.rusage* %2)
ret i32 %4
}