xunge/DecIR huggingface dataset:
/* Variables and functions */
int log10(int);
char *malloc(int const);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itoa(int num) {
  const int size = log10(num) + 1;
  char *str = malloc(size);
  sprintf(str, "%d", num);
  return str;
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <log10@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xe9d(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <log10@plt>
lea    0x1(%rax),%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xeb4(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @log10(i32 %5)
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i32, i32* %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @itoa(i32 %0) {
%2 = tail call i32 @log10(i32 %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
void test_range_int_gt_lt(int i) {
  if (i > 3)
    if (i < 5)
      __analyzer_eval(i == 4);
}


x86 assembly (clang, -O0):
<test_range_int_gt_lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jle    1145 <test_range_int_gt_lt+0x35>
cmpl   $0x5,-0x4(%rbp)
jge    1140 <test_range_int_gt_lt+0x30>
cmpl   $0x4,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
jmp    1145 <test_range_int_gt_lt+0x35>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_range_int_gt_lt>:
cmp    $0x4,%edi
jne    111f <test_range_int_gt_lt+0xf>
mov    $0x1,%edi
jmp    1030 <__analyzer_eval@plt>
ret

LLVM IR (-O0):
define void @test_range_int_gt_lt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 3
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 4
%11 = zext i1 %10 to i32
%12 = call i32 @__analyzer_eval(i32 %11)
br label %13
13: ; preds = %8, %5
br label %14
14: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @test_range_int_gt_lt(i32 %0) {
%2 = icmp eq i32 %0, 4
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @__analyzer_eval(i32 1)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void computeHmac(char *hmac, const char *input, int length, const char *key,
                 int sizeKey) {
  strncpy(hmac, "hmac-not-implemented", 20);
}


x86 assembly (clang, -O0):
<computeHmac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeHmac>:
lea    0xee9(%rip),%rsi
mov    $0x14,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"hmac-not-implemented\00"
define void @computeHmac(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = call i32 @strncpy(i8* %11, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"hmac-not-implemented\00"
define void @computeHmac(i8* %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32 %4) {
%6 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 20)
ret void
}
/* Variables and functions */
scalar_t__ fork();
int getpgrp();
int getpid();
int /*<<< orphan*/ printf(char *, int, int);
void fork17() {
  if (fork() == 0) {
    printf("Child: pid=%d pgrp=%d\n", getpid(), getpgrp());
  } else {
    printf("Parent: pid=%d pgrp=%d\n", getpid(), getpgrp());
  }
  while (1)
    ;
}


x86 assembly (clang, -O0):
<fork17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <fork@plt>
cmp    $0x0,%rax
jne    1180 <fork17+0x40>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getpgrp@plt>
mov    -0x4(%rbp),%esi
mov    %eax,%edx
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
jmp    11a2 <fork17+0x62>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getpgrp@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe7a(%rip),%rdi
call   1040 <printf@plt>
jmp    11a7 <fork17+0x67>
jmp    11a7 <fork17+0x67>

x86 assembly (clang, -O2):
<fork17>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <fork@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <getpgrp@plt>
test   %rbx,%rbx
lea    0xe99(%rip),%rcx
lea    0xea9(%rip),%rdi
cmove  %rcx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
nopl   0x0(%rax,%rax,1)
jmp    1180 <fork17+0x40>

LLVM IR (-O0):
@.str = [23 x i8] c"Child: pid=%d pgrp=%d\0A\00"
@.str.1 = [24 x i8] c"Parent: pid=%d pgrp=%d\0A\00"
define void @fork17() {
%1 = call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @getpid()
%5 = call i32 (...) @getpgrp()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
br label %11
7: ; preds = %0
%8 = call i32 (...) @getpid()
%9 = call i32 (...) @getpgrp()
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7, %3
br label %12
12: ; preds = %11, %12
br label %12
}

LLVM IR (-O2):
@.str = [23 x i8] c"Child: pid=%d pgrp=%d\0A\00"
@.str.1 = [24 x i8] c"Parent: pid=%d pgrp=%d\0A\00"
define void @fork17() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 (...) @getpgrp()
%5 = select i1 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0)
%6 = tail call i32 @printf(i8* %5, i32 %3, i32 %4)
br label %7
7: ; preds = %0, %7
br label %7
}
/* Type definitions */
struct rlimit {
  void *rlim_max;
  void *rlim_cur;
};

/* Variables and functions */
void *RLIM_INFINITY;
int getrlimit(int resource, struct rlimit *rlim) {
  rlim->rlim_cur = RLIM_INFINITY;
  rlim->rlim_max = RLIM_INFINITY;
  return 0;
}


x86 assembly (clang, -O0):
<getrlimit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    0x2ebc(%rip),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getrlimit>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x8(%rsi)
mov    %rax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.rlimit = type { i8*, i8* }
@RLIM_INFINITY = global i8* null
define i32 @getrlimit(i32 %0, %struct.rlimit* %1) {
%3 = alloca i32
%4 = alloca %struct.rlimit*
store i32 %0, i32* %3
store %struct.rlimit* %1, %struct.rlimit** %4
%5 = load i8*, i8** @RLIM_INFINITY
%6 = load %struct.rlimit*, %struct.rlimit** %4
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %6, i32 0, i32 1
store i8* %5, i8** %7
%8 = load i8*, i8** @RLIM_INFINITY
%9 = load %struct.rlimit*, %struct.rlimit** %4
%10 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %9, i32 0, i32 0
store i8* %8, i8** %10
ret i32 0
}

LLVM IR (-O2):
%struct.rlimit = type { i8*, i8* }
@RLIM_INFINITY = global i8* null
define i32 @getrlimit(i32 %0, %struct.rlimit* nocapture writeonly %1) {
%3 = load i8*, i8** @RLIM_INFINITY
%4 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 1
store i8* %3, i8** %4
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
store i8* %3, i8** %5
ret i32 0
}
void foo() {
#pragma omp master
  { goto bad1; }
#pragma omp master
  {
  bad1:
    return;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <foo+0x9>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
br label %1
1: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
void Cyc_Core_print_region_pages(struct _XRegionHandle *r) {}


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

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

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

LLVM IR (-O2):
%struct._XRegionHandle = type opaque
define void @Cyc_Core_print_region_pages(%struct._XRegionHandle* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void socket_pair_close(int fds[(32768)][2], const int max, const int which) {
  int i;
  for (i = 0; i < max; i++)
    (void)close(fds[i][which]);
}


x86 assembly (clang, -O0):
<socket_pair_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115e <socket_pair_close+0x4e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <close@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <socket_pair_close+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_pair_close>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <socket_pair_close+0x32>
movslq %edx,%rax
mov    %esi,%r14d
lea    (%rdi,%rax,4),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbx,8),%edi
call   1030 <close@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <socket_pair_close+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @socket_pair_close([2 x i32]* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ 0, %5 ], [ %13, %8 ]
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %0, i64 %9, i64 %6
%11 = load i32, i32* %10
%12 = tail call i32 @close(i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  printf("%s\n", "Hello World!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [13 x i8] c"Hello World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void bailout(void) {
  fprintf(stderr, "tbl quits\n");
  exit(1);
}


x86 assembly (clang, -O0):
<bailout>:
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):
<bailout>:
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 = [11 x i8] c"tbl quits\0A\00"
define void @bailout() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"tbl quits\0A\00"
define void @bailout() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t u64_b0(uint64_t value) { return (uint8_t)(value & 0x00000000000000FF); }


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

x86 assembly (clang, -O2):
<u64_b0>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @u64_b0(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
unsigned long Log2(unsigned long);
unsigned long CeilLog2(unsigned long a) {
  unsigned long result;
  result = Log2(a);
  if ((1UL << result) < a)
    result++;
  return result;
}


x86 assembly (clang, -O0):
<CeilLog2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Log2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
cmp    -0x8(%rbp),%rax
jae    114b <CeilLog2+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CeilLog2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Log2@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%rdx
cmp    %rbx,%rdx
adc    $0x0,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @CeilLog2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @Log2(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = shl i64 1, %6
%8 = load i64, i64* %2
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @CeilLog2(i64 %0) {
%2 = tail call i64 @Log2(i64 %0)
%3 = shl nuw i64 1, %2
%4 = icmp ult i64 %3, %0
%5 = zext i1 %4 to i64
%6 = add i64 %2, %5
ret i64 %6
}
void yy_1_ptTpStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_ptTpStar(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_ptTpStar(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ w5100_writeSn_byte(unsigned int, int, unsigned int);
void w5100_writeSnTX_WR(unsigned sock, unsigned data) {
  w5100_writeSn_byte(sock, 0x0024, data >> 8);
  w5100_writeSn_byte(sock, 0x0024 + 1, data & 0xFF);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
shr    $0x8,%edx
mov    $0x24,%esi
call   1030 <w5100_writeSn_byte@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
and    $0xff,%edx
mov    $0x25,%esi
call   1030 <w5100_writeSn_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edx
shr    $0x8,%edx
mov    $0x24,%esi
call   1030 <w5100_writeSn_byte@plt>
movzbl %bl,%edx
mov    %ebp,%edi
mov    $0x25,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <w5100_writeSn_byte@plt>

LLVM IR (-O0):
define void @w5100_writeSnTX_WR(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = lshr i32 %6, 8
%8 = call i32 @w5100_writeSn_byte(i32 %5, i32 36, i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = call i32 @w5100_writeSn_byte(i32 %9, i32 37, i32 %11)
ret void
}

LLVM IR (-O2):
define void @w5100_writeSnTX_WR(i32 %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = tail call i32 @w5100_writeSn_byte(i32 %0, i32 36, i32 %3)
%5 = and i32 %1, 255
%6 = tail call i32 @w5100_writeSn_byte(i32 %0, i32 37, i32 %5)
ret void
}
unsigned long unsignedlong_ignoring_unsignedshort(unsigned long x,
                                                  unsigned short y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlong_ignoring_unsignedshort(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlong_ignoring_unsignedshort(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
float ff(float x) { return x * x; }


x86 assembly (clang, -O0):
<ff>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @ff(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
ret float %5
}

LLVM IR (-O2):
define float @ff(float %0) {
%2 = fmul float %0, %0
ret float %2
}
int test_imm_DDint64_lowword_reg(long long val) {
  return ((val) & (0xDD << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_DDint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 221
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int cmp2(const void *arg1, const void *arg2) {
  return (*(int *)arg1) - (*(int *)arg2);
}


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

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

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

LLVM IR (-O2):
define i32 @cmp2(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ __llvm_profile_set_filename(char const *);
int main(int argc, const char *argv[]) {
  if (argc < 2)
    return 1;
  __llvm_profile_set_filename(argv[1]);
  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)
jge    113c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1150 <main+0x40>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <__llvm_profile_set_filename@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jl     112a <main+0x1a>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <__llvm_profile_set_filename@plt>
xor    %eax,%eax
add    $0x8,%rsp
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
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @__llvm_profile_set_filename(i8* %12)
store i32 0, i32* %3
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @__llvm_profile_set_filename(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *EC_KEY_new_by_curve_name(int /*<<< orphan*/);
int /*<<< orphan*/ NID_secp256k1;
int /*<<< orphan*/ o2i_ECPublicKey(int /*<<< orphan*/ **,
                                   int /*<<< orphan*/ const **, size_t);
EC_KEY *bbp_ec_new_pubkey(const uint8_t *pub_bytes, size_t pub_len) {
  EC_KEY *key;
  const uint8_t *pub_bytes_copy;
  key = EC_KEY_new_by_curve_name(NID_secp256k1);
  pub_bytes_copy = pub_bytes;
  o2i_ECPublicKey(&key, &pub_bytes_copy, pub_len);
  return key;
}


x86 assembly (clang, -O0):
<bbp_ec_new_pubkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <EC_KEY_new_by_curve_name@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <o2i_ECPublicKey@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbp_ec_new_pubkey>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <EC_KEY_new_by_curve_name@plt>
mov    %rax,0x8(%rsp)
mov    %rbx,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
call   1030 <o2i_ECPublicKey@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@NID_secp256k1 = global i32 0
define i32* @bbp_ec_new_pubkey(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%7 = load i32, i32* @NID_secp256k1
%8 = call i32* @EC_KEY_new_by_curve_name(i32 %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %3
store i32* %9, i32** %6
%10 = load i64, i64* %4
%11 = call i32 @o2i_ECPublicKey(i32** %5, i32** %6, i64 %10)
%12 = load i32*, i32** %5
ret i32* %12
}

LLVM IR (-O2):
@NID_secp256k1 = global i32 0
define i32* @bbp_ec_new_pubkey(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = bitcast i32** %3 to i8*
%6 = bitcast i32** %4 to i8*
%7 = load i32, i32* @NID_secp256k1
%8 = tail call i32* @EC_KEY_new_by_curve_name(i32 %7)
store i32* %8, i32** %3
store i32* %0, i32** %4
%9 = call i32 @o2i_ECPublicKey(i32** %3, i32** %4, i64 %1)
%10 = load i32*, i32** %3
ret i32* %10
}
/* Type definitions */
typedef int uint8_t;
typedef unsigned int uint64_t;
typedef unsigned int uint32_t;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
uint64_t FNV_hash64(uint64_t key) {
  uint8_t i, *bytes = (uint8_t *)(&key);
  uint32_t hash = 2166136261U;
  for (i = 0; i < sizeof(key); i++) {
    hash = (16777619U * hash) ^ bytes[i];
  }
  return hash;
}


x86 assembly (clang, -O0):
<FNV_hash64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x811c9dc5,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x4,%rax
jae    114e <FNV_hash64+0x4e>
imul   $0x1000193,-0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x8(%rbp),%rdx
xor    (%rcx,%rdx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111d <FNV_hash64+0x1d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FNV_hash64>:
mov    %edi,%eax
xor    $0x50c5d1f,%eax
imul   $0x1000193,%eax,%eax
xor    %edi,%eax
imul   $0x1000193,%eax,%eax
xor    %edi,%eax
imul   $0x1000193,%eax,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @FNV_hash64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %2
store i32* %2, i32** %4
store i32 -2128831035, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %19, %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 4
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i32, i32* %5
%12 = mul i32 16777619, %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = xor i32 %12, %17
store i32 %18, i32* %5
br label %19
19: ; preds = %10
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %6
22: ; preds = %6
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @FNV_hash64(i32 %0) {
%2 = xor i32 %0, 84696351
%3 = mul i32 %2, 16777619
%4 = xor i32 %3, %0
%5 = mul i32 %4, 16777619
%6 = xor i32 %5, %0
%7 = mul i32 %6, 16777619
%8 = xor i32 %7, %0
ret i32 %8
}
int test_imm_06uint8_reg(unsigned char val) {
  return ((val) & (-0x06 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_06uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -6
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ bios_cfg_select(int /*<<< orphan*/);
int /*<<< orphan*/ insb(int, void *, int /*<<< orphan*/);
__attribute__((unused)) void bios_cfg_read_entry_io(void *buf, uint16_t entry,
                                                    uint32_t len) {
  bios_cfg_select(entry);
  insb(0x511, buf, len);
}


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

x86 assembly (clang, -O2):
<bios_cfg_read_entry_io>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <bios_cfg_select@plt>
mov    $0x511,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <insb@plt>

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

LLVM IR (-O2):
define void @bios_cfg_read_entry_io(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @bios_cfg_select(i32 %1)
%5 = tail call i32 @insb(i32 1297, i8* %0, i32 %2)
ret void
}
void rep_nop(void) { __asm __volatile("rep; nop" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @rep_nop() {
tail call void asm sideeffect "rep; nop", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwide(FILE *stream, int mode) {
  stream = stream;
  return (mode);
}


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

x86 assembly (clang, -O2):
<fwide>:
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @fwide(i32* nocapture readnone %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ st7796_draw_start(unsigned int, unsigned int, unsigned int,
                                     unsigned int);
void st7796_set_pos(unsigned int x0, unsigned int y0) {
  st7796_draw_start(x0, y0, x0, y0);
}


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

x86 assembly (clang, -O2):
<st7796_set_pos>:
mov    %edi,%edx
mov    %esi,%ecx
jmp    1030 <st7796_draw_start@plt>

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

LLVM IR (-O2):
define void @st7796_set_pos(i32 %0, i32 %1) {
%3 = tail call i32 @st7796_draw_start(i32 %0, i32 %1, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ condition_alphabetSmall(char);
int condition_alphabetSmallOrSpace(char c) {
  return c == ' ' || condition_alphabetSmall(c);
}


x86 assembly (clang, -O0):
<condition_alphabetSmallOrSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1143 <condition_alphabetSmallOrSpace+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <condition_alphabetSmall@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_alphabetSmallOrSpace>:
mov    $0x1,%eax
cmp    $0x20,%dil
je     1134 <condition_alphabetSmallOrSpace+0x24>
push   %rax
movsbl %dil,%edi
call   1030 <condition_alphabetSmall@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @condition_alphabetSmallOrSpace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @condition_alphabetSmall(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @condition_alphabetSmallOrSpace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @condition_alphabetSmall(i8 signext %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
double INHGtoMMHG(double INHG) {
  double MMHG = 25.4 * INHG;
  return MMHG;
}


x86 assembly (clang, -O0):
<INHGtoMMHG>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<INHGtoMMHG>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @INHGtoMMHG(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 2.540000e+01, %4
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @INHGtoMMHG(double %0) {
%2 = fmul double %0, 2.540000e+01
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ xxx();
int main() {
  xxx();
  foo();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <xxx@plt>
mov    $0x0,%al
call   1040 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @xxx()
%2 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @xxx()
%2 = tail call i32 (...) @foo()
ret i32 0
}
_Complex double test_csin(_Complex double x) { return __builtin_csin(x); }


x86 assembly (clang, -O0):
<test_csin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1030 <csin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_csin>:
jmp    1030 <csin@plt>

LLVM IR (-O0):
define { double, double } @test_csin(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca { double, double }
%5 = alloca { double, double }
%6 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
store double %1, double* %7
%8 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds { double, double }, { double, double }* %4, i32 0, i32 1
%11 = load double, double* %10
%12 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %9, double* %12
store double %11, double* %13
%14 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%17 = load double, double* %16
%18 = call { double, double } @csin(double %15, double %17)
%19 = extractvalue { double, double } %18, 0
%20 = extractvalue { double, double } %18, 1
%21 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%22 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %19, double* %21
store double %20, double* %22
%23 = load { double, double }, { double, double }* %3
ret { double, double } %23
}

LLVM IR (-O2):
define { double, double } @test_csin(double %0, double %1) {
%3 = tail call { double, double } @csin(double %0, double %1)
ret { double, double } %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int fn_a() {
  printf("fn_a() called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"fn_a() called\00"
define i32 @fn_a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned int bcm2835_version(void) { return 10042; }


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

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

LLVM IR (-O0):
define i32 @bcm2835_version() {
ret i32 10042
}

LLVM IR (-O2):
define i32 @bcm2835_version() {
ret i32 10042
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int eventfd(unsigned int initval __attribute__((unused)),
            int flags __attribute__((unused))) {
  printf("eventfd\n");
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<eventfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eventfd>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"eventfd\0A\00"
@EINVAL = global i32 0
@errno = global i32 0
define i32 @eventfd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EINVAL
store i32 %6, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@str = [8 x i8] c"eventfd\00"
define i32 @eventfd(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int str_cmp(char *, char *);
int tw1_compare_str(void *p1, void *p2) {
  return str_cmp((char *)p1, (char *)p2);
}


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

x86 assembly (clang, -O2):
<tw1_compare_str>:
jmp    1030 <str_cmp@plt>

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

LLVM IR (-O2):
define i32 @tw1_compare_str(i8* %0, i8* %1) {
%3 = tail call i32 @str_cmp(i8* %0, i8* %1)
ret i32 %3
}
void brcmf_of_probe(struct device *dev, struct brcmfmac_sdio_pd *sdio) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
%struct.brcmfmac_sdio_pd = type opaque
define void @brcmf_of_probe(%struct.device* %0, %struct.brcmfmac_sdio_pd* %1) {
%3 = alloca %struct.device*
%4 = alloca %struct.brcmfmac_sdio_pd*
store %struct.device* %0, %struct.device** %3
store %struct.brcmfmac_sdio_pd* %1, %struct.brcmfmac_sdio_pd** %4
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
%struct.brcmfmac_sdio_pd = type opaque
define void @brcmf_of_probe(%struct.device* nocapture %0, %struct.brcmfmac_sdio_pd* nocapture %1) {
ret void
}
void test___atomic_fetch_or_2(int *mem) { __atomic_fetch_or(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_or_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
or     %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test___atomic_fetch_or_2+0x4b>
jmp    1122 <test___atomic_fetch_or_2+0x22>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_or_2>:
lock orl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_fetch_or_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw or i32* %5, i32 %6 acq_rel
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_or_2(i32* nocapture %0) {
%2 = atomicrmw or i32* %0, i32 1 acq_rel
ret void
}
void XtSetKeyboardFocus() {}


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

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

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

LLVM IR (-O2):
define void @XtSetKeyboardFocus() {
ret void
}
int add(int num1, int num2) { return num1 + num2; }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x11() {
  Assert_real((isbdigit(17) == 0),
              "/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_isbdigit.c",
              90, ("isbdigit should be 0 for 0x11"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x11>:
push   %rbp
mov    %rsp,%rbp
mov    $0x11,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x5a,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x11>:
push   %rax
mov    $0x11,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x5a,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x11\00"
define void @t_isbdigit_0x11() {
%1 = call i64 @isbdigit(i32 17)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x11\00"
define void @t_isbdigit_0x11() {
%1 = tail call i64 @isbdigit(i32 17)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 90, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTAvloU32GetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloU32GetBestFit() {
ret void
}