xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void merge_sort(int *a, int l, int r) {
  if (l < r) {
    int mid = (l + r) / 2;
    merge_sort(a, l, mid);
    merge_sort(a, mid + 1, r);
    merge(a, l, mid, r);
  }
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <merge_sort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <merge_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
cmp    %edx,%esi
jge    1172 <merge_sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1040 <merge_sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1040 <merge_sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <merge@plt>
ret

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

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @merge_sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @merge_sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(int /*<<< orphan*/ *, char *, int);
int i2c_init(int busno) {
  uint8_t name[256];
  sprintf(name, "/dev/i2c-%d", busno);
  return open(name, O_RDWR);
}


x86 assembly (clang, -O0):
<i2c_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
call   1030 <open@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_init>:
push   %rbx
sub    $0x400,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <open@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/i2c-%d\00"
@O_RDWR = global i32 0
define i32 @i2c_init(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i32* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i32], [256 x i32]* %3, i64 0, i64 0
%8 = load i32, i32* @O_RDWR
%9 = call i32 @open(i32* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/i2c-%d\00"
@O_RDWR = global i32 0
define i32 @i2c_init(i32 %0) {
%2 = alloca [256 x i32]
%3 = bitcast [256 x i32]* %2 to i8*
%4 = getelementptr inbounds [256 x i32], [256 x i32]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i32* %4, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = load i32, i32* @O_RDWR
%7 = call i32 @open(i32* %4, i32 %6)
ret i32 %7
}
int main() {
  int a = 1;
  int c = ({
    char b[a + 1];
    b[0] = 0;
    b[0];
  });
  return c;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x18(%rbp)
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x20(%rbp)
movb   $0x0,(%rax)
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
movsbl -0x21(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
store i32 0, i32* %1
store i32 1, i32* %2
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %4
%11 = alloca i8, i64 %9
store i64 %9, i64* %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 0, i8* %12
%13 = getelementptr inbounds i8, i8* %11, i64 0
%14 = load i8, i8* %13
store i8 %14, i8* %6
%15 = load i8*, i8** %4
%16 = load i8, i8* %6
%17 = sext i8 %16 to i32
store i32 %17, i32* %3
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
OP(fd, c3) {
  illegal_1();
  op_c3();
}


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

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_c3()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_c3()
ret i32 undef
}
void mat4_imul(float a[4][4], const float b[4][4]) { mat4_mul(a, b, a); }


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

x86 assembly (clang, -O2):
<mat4_imul>:
mov    %rdi,%rdx
xor    %eax,%eax
jmp    1030 <mat4_mul@plt>

LLVM IR (-O0):
define void @mat4_imul([4 x float]* %0, [4 x float]* %1) {
%3 = alloca [4 x float]*
%4 = alloca [4 x float]*
store [4 x float]* %0, [4 x float]** %3
store [4 x float]* %1, [4 x float]** %4
%5 = load [4 x float]*, [4 x float]** %3
%6 = load [4 x float]*, [4 x float]** %4
%7 = load [4 x float]*, [4 x float]** %3
%8 = call i32 ([4 x float]*, [4 x float]*, [4 x float]*, ...) bitcast (i32 (...)* @mat4_mul to i32 ([4 x float]*, [4 x float]*, [4 x float]*, ...)*)([4 x float]* %5, [4 x float]* %6, [4 x float]* %7)
ret void
}

LLVM IR (-O2):
define void @mat4_imul([4 x float]* %0, [4 x float]* %1) {
%3 = tail call i32 ([4 x float]*, [4 x float]*, [4 x float]*, ...) bitcast (i32 (...)* @mat4_mul to i32 ([4 x float]*, [4 x float]*, [4 x float]*, ...)*)([4 x float]* %0, [4 x float]* %1, [4 x float]* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
FILE *open_master(void) {
  FILE *master = fopen("include/master.h", "w");
  if (master == NULL) {
    fprintf(stderr, "ERROR: unable to open file include/master.h\n");
    exit(-2);
  }
  return master;
}


x86 assembly (clang, -O0):
<open_master>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xecb(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1179 <open_master+0x49>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_master>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     114b <open_master+0x1b>
pop    %rcx
ret
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"include/master.h\00"
@.str.1 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.2 = [45 x i8] c"ERROR: unable to open file include/master.h\0A\00"
define i32* @open_master() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @exit(i32 -2)
unreachable
9: ; preds = %0
%10 = load i32*, i32** %1
ret i32* %10
}

LLVM IR (-O2):
@.str = [17 x i8] c"include/master.h\00"
@.str.1 = [2 x i8] c"w\00"
@stderr = global i32 0
@.str.2 = [45 x i8] c"ERROR: unable to open file include/master.h\0A\00"
define noalias i32* @open_master() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -2)
unreachable
7: ; preds = %0
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void btshas_mm_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<btshas_mm_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @btshas_mm_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void main(void) {
  int n;
  do {
    printf("enter an integer: \n");
    scanf("%d", &n);
  } while (n < 0);
  printf("n value: %d\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x4(%rbp)
jl     1128 <main+0x8>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%r14
lea    0xeb9(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
js     1150 <main+0x20>
lea    0xe91(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [20 x i8] c"enter an integer: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [13 x i8] c"n value: %d\0A\00"
define void @main() {
%1 = alloca i32
br label %2
2: ; preds = %5, %0
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
br label %5
5: ; preds = %2
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [13 x i8] c"n value: %d\0A\00"
@str = [19 x i8] c"enter an integer: \00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 0
br i1 %7, label %3, label %8
8: ; preds = %3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret void
}
void ADCCalibrationStart(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000008))) |= 0x00000004;
}


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

x86 assembly (clang, -O2):
<ADCCalibrationStart>:
orq    $0x4,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @ADCCalibrationStart(i64 %0) {
%2 = add i64 %0, 8
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = or i64 %4, 4
store volatile i64 %5, i64* %3
ret void
}
void ff_hevc_put_hevc_uni_epel_h64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_h64_8_sse4() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  double tv_sec;
  double tv_usec;
};
struct rusage {
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ RUSAGE_SELF;
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
double millitime() {
  struct rusage rusage;
  getrusage(RUSAGE_SELF, &rusage);
  return rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec / 1000000.0;
}


x86 assembly (clang, -O0):
<millitime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <getrusage@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<millitime>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <getrusage@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, double }
@RUSAGE_SELF = global i32 0
define double @millitime() {
%1 = alloca %struct.rusage
%2 = load i32, i32* @RUSAGE_SELF
%3 = call i32 @getrusage(i32 %2, %struct.rusage* %1)
%4 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 1
%9 = load double, double* %8
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %6, %10
ret double %11
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, double }
@RUSAGE_SELF = global i32 0
define double @millitime() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = load i32, i32* @RUSAGE_SELF
%4 = call i32 @getrusage(i32 %3, %struct.rusage* %1)
%5 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 1
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %6, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int func_2(int a, int b) {
  puts("Inside func_2\n");
  return (a + b);
}


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

x86 assembly (clang, -O2):
<func_2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Inside func_2\0A\00"
define i32 @func_2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"Inside func_2\0A\00"
define i32 @func_2(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %1, %0
ret i32 %4
}
/* Type definitions */
struct rbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rbuf_seek(struct rbuf *, size_t, int, int /*<<< orphan*/);
void rbuf_seek_reader(struct rbuf *b, size_t offset, int whence) {
  rbuf_seek(b, offset, whence, 0);
}


x86 assembly (clang, -O0):
<rbuf_seek_reader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <rbuf_seek@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.rbuf = type { i32 }
define void @rbuf_seek_reader(%struct.rbuf* %0, i64 %1, i32 %2) {
%4 = tail call i32 @rbuf_seek(%struct.rbuf* %0, i64 %1, i32 %2, i32 0)
ret void
}
/* Variables and functions */
int ev_key(int, int, int);
int ev_key_click(int fd, int key) {
  if (ev_key(fd, key, 1) < 0)
    return -1;
  return ev_key(fd, key, 0);
}


x86 assembly (clang, -O0):
<ev_key_click>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1030 <ev_key@plt>
cmp    $0x0,%eax
jge    1143 <ev_key_click+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1153 <ev_key_click+0x43>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <ev_key@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev_key_click>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edx
call   1030 <ev_key@plt>
test   %eax,%eax
js     1136 <ev_key_click+0x26>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ev_key@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ev_key_click(i32 %0, i32 %1) {
%3 = tail call i32 @ev_key(i32 %0, i32 %1, i32 1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @ev_key(i32 %0, i32 %1, i32 0)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ casemap(int /*<<< orphan*/, int);
wint_t towupper(wint_t wc) { return casemap(wc, 1); }


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

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

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

LLVM IR (-O2):
define i32 @towupper(i32 %0) {
%2 = tail call i32 @casemap(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ F_ULOCK;
int /*<<< orphan*/ close(int);
int lockf(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char const *);
int unlock(int fd, const char *lock_path) {
  int err = 1;
  if (fd >= 0) {
    err = lockf(fd, F_ULOCK, 0);
    close(fd);
    unlink(lock_path);
    ;
  }
  return err;
}


x86 assembly (clang, -O0):
<unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1177 <unlock+0x47>
mov    -0x4(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <lockf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock>:
test   %edi,%edi
js     1165 <unlock+0x35>
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <lockf@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1050 <close@plt>
mov    %r14,%rdi
call   1030 <unlink@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@F_ULOCK = global i32 0
define i32 @unlock(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 1, i32* %5
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* @F_ULOCK
%11 = call i32 @lockf(i32 %9, i32 %10, i32 0)
store i32 %11, i32* %5
%12 = load i32, i32* %3
%13 = call i32 @close(i32 %12)
%14 = load i8*, i8** %4
%15 = call i32 @unlink(i8* %14)
br label %16
16: ; preds = %8, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@F_ULOCK = global i32 0
define i32 @unlock(i32 %0, i8* nocapture %1) {
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = load i32, i32* @F_ULOCK
%6 = tail call i32 @lockf(i32 %0, i32 %5, i32 0)
%7 = tail call i32 @close(i32 %0)
%8 = tail call i32 @unlink(i8* %1)
br label %9
9: ; preds = %4, %2
%10 = phi i32 [ %6, %4 ], [ 1, %2 ]
ret i32 %10
}
/* Variables and functions */
int errno;
int __set_errno(int n) {
  errno = n;
  return -1;
}


x86 assembly (clang, -O0):
<__set_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2ecf(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_errno>:
mov    0x2ed9(%rip),%rax
mov    %edi,(%rax)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__set_errno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__set_errno(i32 %0) {
store i32 %0, i32* @errno
ret i32 -1
}
int cmp_lt_ll(const void *p, const void *q) {
  const long long a = *(const long long *)p;
  const long long b = *(const long long *)q;
  do {
    if (a > b)
      return +1;
    if (b > a)
      return -1;
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<cmp_lt_ll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jle    113c <cmp_lt_ll+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_lt_ll+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    1156 <cmp_lt_ll+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_lt_ll+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_lt_ll>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rax,%rcx
setg   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_lt_ll(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp sgt i64 %6, %4
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ __is_bigendian();
int /*<<< orphan*/ foundVirus(char *);
int entrypoint(void) {
  if (__is_bigendian())
    foundVirus("A");
  else
    foundVirus("B");
  return 0;
}


x86 assembly (clang, -O0):
<entrypoint>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <__is_bigendian@plt>
cmp    $0x0,%rax
je     1146 <entrypoint+0x26>
lea    0xec4(%rip),%rdi
call   1030 <foundVirus@plt>
jmp    1152 <entrypoint+0x32>
lea    0xeb5(%rip),%rdi
call   1030 <foundVirus@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<entrypoint>:
push   %rax
xor    %eax,%eax
call   1040 <__is_bigendian@plt>
test   %rax,%rax
lea    0xed0(%rip),%rax
lea    0xec7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <foundVirus@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i32 @entrypoint() {
%1 = call i64 (...) @__is_bigendian()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @foundVirus(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = call i32 @foundVirus(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
define i32 @entrypoint() {
%1 = tail call i64 (...) @__is_bigendian()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @foundVirus(i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xbd() {
  Assert_real((isxdigit(189) == 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_isxdigit.c",
              950, ("isxdigit should be 0 for 0xbd"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xbd>:
push   %rax
mov    $0xbd,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3b6,%edx
pop    %rax
jmp    1040 <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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbd\00"
define void @t_isxdigit_0xbd() {
%1 = call i64 @isxdigit(i32 189)
%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 950, 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xbd\00"
define void @t_isxdigit_0xbd() {
%1 = tail call i64 @isxdigit(i32 189)
%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 950, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char tolower(char);
void str_lowercase(char *str) {
  while (*str) {
    *str = tolower(*str);
    ++str;
  }
}


x86 assembly (clang, -O0):
<str_lowercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <str_lowercase+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <str_lowercase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_lowercase>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <str_lowercase+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <str_lowercase+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @str_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int led(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @led() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __SETFAULTMASK();
void NVIC_SETFAULTMASK(void) { __SETFAULTMASK(); }


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

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

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

LLVM IR (-O2):
define void @NVIC_SETFAULTMASK() {
%1 = tail call i32 (...) @__SETFAULTMASK()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FCEU_DispMessage(char *);
void FCEUD_AviRecordTo(void) { FCEU_DispMessage("Not implemented."); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Not implemented.\00"
define void @FCEUD_AviRecordTo() {
%1 = call i32 @FCEU_DispMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Not implemented.\00"
define void @FCEUD_AviRecordTo() {
%1 = tail call i32 @FCEU_DispMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add128(long long *);
int /*<<< orphan*/ shift128Right(int, long long *);
void float128_rem() {
  signed int expDiff;
  long long int aSig1;
  long long int sigMean1;
  if (-64 < expDiff)
    shift128Right(-expDiff, &aSig1);
  add128(&sigMean1);
}


x86 assembly (clang, -O0):
<float128_rem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xffffffc0,%eax
cmp    -0x4(%rbp),%eax
jge    1144 <float128_rem+0x24>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <shift128Right@plt>
lea    -0x18(%rbp),%rdi
call   1030 <add128@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float128_rem>:
push   %rax
mov    %rsp,%rdi
call   1030 <add128@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @float128_rem() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = load i32, i32* %1
%5 = icmp slt i32 -64, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* %1
%8 = sub nsw i32 0, %7
%9 = call i32 @shift128Right(i32 %8, i64* %2)
br label %10
10: ; preds = %6, %0
%11 = call i32 @add128(i64* %3)
ret void
}

LLVM IR (-O2):
define void @float128_rem() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @add128(i64* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArgs(int _argc, char **_argv) {
  while (--_argc) {
    printf("Arg: %s\n", *++_argv);
  }
  printf("All Done\n\n");
}


x86 assembly (clang, -O0):
<printArgs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1157 <printArgs+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    0x8(%rax),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    111f <printArgs+0xf>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArgs>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x1,%edi
je     1157 <printArgs+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xec1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <printArgs+0x20>
lea    0xeab(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"Arg: %s\0A\00"
@str = [10 x i8] c"All Done\0A\00"
define void @printArgs(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %1, %2 ]
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nsw i32 %6, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ omp_get_default_device();
int omp_target_is_present(int *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main() {
  int arr[100];
#pragma omp target data map(alloc : arr [50:2])
  {
#pragma omp target
    {
      arr[50] = 5;
      arr[51] = 6;
    }
  }
  fprintf(stderr, "still present: %d\n",
          omp_target_is_present(&arr[50], omp_get_default_device()));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xd8(%rbp)
movl   $0x6,-0xd4(%rbp)
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1a4(%rbp)
lea    -0x1a0(%rbp),%rax
add    $0xc8,%rax
mov    %rax,-0x1b0(%rbp)
mov    $0x0,%al
call   1030 <omp_get_default_device@plt>
mov    -0x1b0(%rbp),%rdi
mov    %eax,%esi
call   1040 <omp_target_is_present@plt>
mov    -0x1a4(%rbp),%edi
mov    %eax,%edx
lea    0xe63(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x198,%rsp
lea    0xc8(%rsp),%rbx
movabs $0x600000005,%rax
mov    %rax,0xc8(%rsp)
mov    0x2e86(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <omp_get_default_device@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <omp_target_is_present@plt>
lea    0xe8c(%rip),%rsi
mov    %ebp,%edi
mov    %eax,%edx
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"still present: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 50
store i32 5, i32* %3
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 51
store i32 6, i32* %4
%5 = load i32, i32* @stderr
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 50
%7 = call i32 (...) @omp_get_default_device()
%8 = call i32 @omp_target_is_present(i32* %6, i32 %7)
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"still present: %d\0A\00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 50
store i32 5, i32* %3
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 51
store i32 6, i32* %4
%5 = load i32, i32* @stderr
%6 = tail call i32 (...) @omp_get_default_device()
%7 = call i32 @omp_target_is_present(i32* %3, i32 %6)
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void const *);
void unmap_domain_page(const void *va) { __coverity_free__(va); }


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

x86 assembly (clang, -O2):
<unmap_domain_page>:
jmp    1030 <__coverity_free__@plt>

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

LLVM IR (-O2):
define void @unmap_domain_page(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ sse_mov128(int /*<<< orphan*/ *, int /*<<< orphan*/ const *);
void sse_mov256(uint8_t *dst, const uint8_t *src) {
  sse_mov128(dst, src);
  sse_mov128(dst + 128, src + 128);
}


x86 assembly (clang, -O0):
<sse_mov256>:
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 <sse_mov128@plt>
mov    -0x8(%rbp),%rdi
add    $0x200,%rdi
mov    -0x10(%rbp),%rsi
add    $0x200,%rsi
call   1030 <sse_mov128@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sse_mov256>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <sse_mov128@plt>
add    $0x200,%rbx
add    $0x200,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sse_mov128@plt>

LLVM IR (-O0):
define void @sse_mov256(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 = call i32 @sse_mov128(i32* %5, i32* %6)
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 128
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 128
%12 = call i32 @sse_mov128(i32* %9, i32* %11)
ret void
}

LLVM IR (-O2):
define void @sse_mov256(i32* %0, i32* %1) {
%3 = tail call i32 @sse_mov128(i32* %0, i32* %1)
%4 = getelementptr inbounds i32, i32* %0, i64 128
%5 = getelementptr inbounds i32, i32* %1, i64 128
%6 = tail call i32 @sse_mov128(i32* %4, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  int i, j, sum = 0;
#pragma omp parallel
  {
#pragma omp for reduction(+ : sum)
    for (i = 0; i < 10; i++) {
#pragma omp parallel
      {
#pragma omp for reduction(+ : sum)
        for (j = 0; j < 10; j++)
          sum += j;
      }
    }
  }
  if (sum != 450)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1172 <main+0x62>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    115f <main+0x4f>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113e <main+0x2e>
jmp    1164 <main+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0x1c2,-0x10(%rbp)
je     1186 <main+0x76>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %2
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %23
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %16, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, %13
store i32 %15, i32* %4
br label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %5
23: ; preds = %5
%24 = load i32, i32* %4
%25 = icmp ne i32 %24, 450
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 (...) @abort()
unreachable
28: ; preds = %23
ret i32 0
}

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