xunge/DecIR huggingface dataset:
int xmlUCSIsGreekExtended(int code) {
  return (((code >= 0x1F00) && (code <= 0x1FFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsGreekExtended>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x1f00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsGreekExtended+0x26>
cmpl   $0x1fff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsGreekExtended>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x1f00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsGreekExtended(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 7936
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 8191
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsGreekExtended(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 7936
%4 = zext i1 %3 to i32
ret i32 %4
}
void test_two(int x, int y) {
#pragma omp target teams distribute parallel for simd
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_two+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_two+0x43>
jmp    1135 <test_two+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_two+0x24>
jmp    1148 <test_two+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_two+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_two(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  do {
    if (1) {
      printf("this should print once\n");
    }
  } while (1 < 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <main+0x9>
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"this should print once\0A\00"
define void @main() {
br label %1
1: ; preds = %0
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"this should print once\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int UDFICB(uint8_t *data, uint8_t *FileType, uint16_t *Flags) {
  *FileType = ((uint8_t)data[11]);
  *Flags = ((uint16_t)data[18] | ((uint16_t)data[(18) + 1] << 8));
  return 0;
}


x86 assembly (clang, -O0):
<UDFICB>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x90(%rax),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x98(%rax),%rax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UDFICB>:
mov    0x58(%rdi),%rax
mov    %rax,(%rsi)
mov    0x98(%rdi),%eax
shl    $0x8,%eax
or     0x90(%rdi),%eax
mov    %eax,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @UDFICB(i64* %0, i64* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i32*
store i64* %0, i64** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i64*, i64** %4
%8 = getelementptr inbounds i64, i64* %7, i64 11
%9 = load i64, i64* %8
%10 = load i64*, i64** %5
store i64 %9, i64* %10
%11 = load i64*, i64** %4
%12 = getelementptr inbounds i64, i64* %11, i64 18
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = load i64*, i64** %4
%16 = getelementptr inbounds i64, i64* %15, i64 19
%17 = load i64, i64* %16
%18 = trunc i64 %17 to i32
%19 = shl i32 %18, 8
%20 = or i32 %14, %19
%21 = load i32*, i32** %6
store i32 %20, i32* %21
ret i32 0
}

LLVM IR (-O2):
define i32 @UDFICB(i64* nocapture %0, i64* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = getelementptr inbounds i64, i64* %0, i64 11
%5 = load i64, i64* %4
store i64 %5, i64* %1
%6 = getelementptr inbounds i64, i64* %0, i64 18
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds i64, i64* %0, i64 19
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %12, %8
store i32 %13, i32* %2
ret i32 0
}
/* Variables and functions */
char *setlocale(int category, const char *locale) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @setlocale(i32 %0, i8* nocapture readnone %1) {
ret i8* null
}
void gtk_hscrollbar_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hscrollbar_get_type() {
ret void
}
void dump_string(char *title, char *str, int len) {}


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

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

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

LLVM IR (-O2):
define void @dump_string(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(int);
int isnum(char *s) {
  for (; *s != '\0'; s++) {
    if (!isdigit((int)*s))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1163 <isnum+0x53>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114d <isnum+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    116a <isnum+0x5a>
jmp    1152 <isnum+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <isnum+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1126 <isnum+0x26>
add    $0x1,%rdi
nop
movsbl %cl,%ecx
add    $0xffffffd0,%ecx
cmp    $0xa,%ecx
jae    1127 <isnum+0x27>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <isnum+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isnum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %7
4: ; preds = %7
%5 = load i8, i8* %13
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %13, %4 ], [ %0, %1 ]
%10 = sext i8 %8 to i32
%11 = add nsw i32 %10, -48
%12 = icmp ult i32 %11, 10
%13 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %12, label %4, label %14
14: ; preds = %7, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int semctl(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int cwirc_sem_destroy(int semid) {
  if (semid < 0 || semctl(semid, 0, IPC_RMID, 0) == -1)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<cwirc_sem_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1143 <cwirc_sem_destroy+0x33>
mov    -0x8(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <semctl@plt>
cmp    $0xffffffff,%eax
jne    114f <cwirc_sem_destroy+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <cwirc_sem_destroy+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwirc_sem_destroy>:
test   %edi,%edi
js     1138 <cwirc_sem_destroy+0x28>
push   %rax
mov    0x2ec4(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <semctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
neg    %eax
add    $0x8,%rsp
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @cwirc_sem_destroy(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i32, i32* @IPC_RMID
%5 = tail call i32 @semctl(i32 %0, i32 0, i32 %4, i32 0)
%6 = icmp eq i32 %5, -1
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %3, %1
%9 = phi i32 [ -1, %1 ], [ %7, %3 ]
ret i32 %9
}
int test_imm_91uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x91 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_91uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 145
%6 = icmp ne i64 %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_91uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 145
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ __NR_ioprio_get;
int syscall(int /*<<< orphan*/, int, int);
int ioprio_get(int which, int who) {
  return syscall(__NR_ioprio_get, which, who);
}


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

x86 assembly (clang, -O2):
<ioprio_get>:
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_ioprio_get = global i32 0
define i32 @ioprio_get(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @__NR_ioprio_get
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @syscall(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@__NR_ioprio_get = global i32 0
define i32 @ioprio_get(i32 %0, i32 %1) {
%3 = load i32, i32* @__NR_ioprio_get
%4 = tail call i32 @syscall(i32 %3, i32 %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a = 2;
  int b = 4;
  printf("%d,%d,%d\n", a <= b, a >= b, a >= 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edx
cmpl   $0x3,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%ecx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d,%d,%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
void segfault() {
  write(1, "Not a VMware box.\n", 18);
  exit(1);
}


x86 assembly (clang, -O0):
<segfault>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
mov    $0x12,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<segfault>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x12,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Not a VMware box.\0A\00"
define void @segfault() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Not a VMware box.\0A\00"
define void @segfault() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%2 = tail call i32 @exit(i32 1)
unreachable
}
void RTjpeg_color_init(void) {}


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

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

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

LLVM IR (-O2):
define void @RTjpeg_color_init() {
ret void
}
/* Variables and functions */
scalar_t__ islower(int);
scalar_t__ isupper(int);
int isalpha(int c) { return (islower(c) || isupper(c)) ? 1 : 0; }


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalpha+0x37>
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalpha+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <isupper@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @islower(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @isupper(i32 %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 i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isupper(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct etimer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ timer_elapsed_start_offset(struct etimer *,
                                              int /*<<< orphan*/);
uint32_t timer_elapsed_start(struct etimer *t) {
  return timer_elapsed_start_offset(t, 0);
}


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

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

LLVM IR (-O0):
%struct.etimer = type { i32 }
define i32 @timer_elapsed_start(%struct.etimer* %0) {
%2 = alloca %struct.etimer*
store %struct.etimer* %0, %struct.etimer** %2
%3 = load %struct.etimer*, %struct.etimer** %2
%4 = call i32 @timer_elapsed_start_offset(%struct.etimer* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.etimer = type { i32 }
define i32 @timer_elapsed_start(%struct.etimer* %0) {
%2 = tail call i32 @timer_elapsed_start_offset(%struct.etimer* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x5f() {
  Assert_real((isascii(95)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              480, ("isascii should be 1 for _"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for _\00"
define void @t_isascii_0x5f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long foo(int i) { return (long)((unsigned long)i + 2) - (long)i; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
add    $0x2,%rax
movslq -0x4(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = add i64 %4, 2
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = sub nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @foo(i32 %0) {
ret i64 2
}
void intFunc(int x) { return; }


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

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

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

LLVM IR (-O2):
define void @intFunc(i32 %0) {
ret void
}
void UYVYToYRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToYRow_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int /*<<< orphan*/);
int strbw(char *a, char *b) { return !strncmp(a, b, strlen(b)); }


x86 assembly (clang, -O0):
<strbw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strbw>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strbw(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @strbw(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void __attribute__((mips16)) foo(void) {}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void scb_reset_system(void) { printf("scb_reset_system!\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"scb_reset_system!\00"
define void @scb_reset_system() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
int core_atomic_read_int_mock(int *pointer) { return *pointer; }


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

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

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

LLVM IR (-O2):
define i32 @core_atomic_read_int_mock(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int ada_add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Ada added for me: %d\n", ada_add(3, 4));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <ada_add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Ada added for me: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @ada_add(i32 3, i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Ada added for me: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @ada_add(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void RTTarClose(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarClose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void error(const char *s) {
  fputs(s, stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
bool db_file_exists(const char *path) {
  bool retval = false;
  struct stat buffer;
  if (stat(path, &buffer) == 0)
    retval = true;
  return retval;
}


x86 assembly (clang, -O0):
<db_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    1141 <db_file_exists+0x31>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_file_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @db_file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.stat
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %9
9: ; preds = %8, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @db_file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
__attribute__((always_)) _Bool ctx_no_room(const void *needed,
                                           const void *limit) {
  return __builtin_expect(!!(needed > limit), 0);
}


x86 assembly (clang, -O0):
<ctx_no_room>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
seta   %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctx_no_room>:
cmp    %rsi,%rdi
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @ctx_no_room(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 = icmp ugt i8* %5, %6
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = sext i32 %10 to i64
%12 = icmp ne i64 %11, 0
ret i1 %12
}

LLVM IR (-O2):
define zeroext i1 @ctx_no_room(i8* readnone %0, i8* readnone %1) {
%3 = icmp ugt i8* %0, %1
ret i1 %3
}
int foo(int b) {
  int a[128];
  a[b] = 1;
  if (b) {
    b = 2;
    a[2] = 0;
  }
  a[2] = 3;
  return a[2] + b;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movl   $0x1,-0x210(%rbp,%rax,4)
cmpl   $0x0,-0x4(%rbp)
je     1138 <foo+0x38>
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x208(%rbp)
movl   $0x3,-0x208(%rbp)
mov    -0x208(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
add    %eax,%eax
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 3, i32 5
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int border_width;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcreatewindow_border_width(void *_p, int _v) {
  ((XEvent *)_p)->xcreatewindow.border_width = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcreatewindow_border_width>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcreatewindow_border_width(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcreatewindow_border_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_REUSEADDR;
int __sapi_sock_reset_optint(int, int /*<<< orphan*/, int /*<<< orphan*/);
int sapi_sock_reset_reuseaddr(int sock) {
  return __sapi_sock_reset_optint(sock, SOL_SOCKET, SO_REUSEADDR);
}


x86 assembly (clang, -O0):
<sapi_sock_reset_reuseaddr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <__sapi_sock_reset_optint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sapi_sock_reset_reuseaddr>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <__sapi_sock_reset_optint@plt>

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @sapi_sock_reset_reuseaddr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_REUSEADDR
%6 = call i32 @__sapi_sock_reset_optint(i32 %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_REUSEADDR = global i32 0
define i32 @sapi_sock_reset_reuseaddr(i32 %0) {
%2 = load i32, i32* @SOL_SOCKET
%3 = load i32, i32* @SO_REUSEADDR
%4 = tail call i32 @__sapi_sock_reset_optint(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
call0a(c, s, i, l) char c;
short s;
int i;
long l;
{
  c = 'a';
  s = 5;
  i = 6;
  l = 7;
}


x86 assembly (clang, -O0):
<call0a>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
movb   $0x61,-0x5(%rbp)
movw   $0x5,-0x8(%rbp)
movl   $0x6,-0xc(%rbp)
movq   $0x7,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @call0a(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i16
%8 = alloca i32
%9 = alloca i64
%10 = trunc i32 %0 to i8
%11 = trunc i32 %1 to i16
store i8 %10, i8* %6
store i16 %11, i16* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
store i8 97, i8* %6
store i16 5, i16* %7
store i32 6, i32* %8
store i64 7, i64* %9
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @call0a(i32 %0, i32 %1, i32 %2, i64 %3) {
ret i32 undef
}
int isWhite(char c) { return ' ' == c || '\t' == c; }


x86 assembly (clang, -O0):
<isWhite>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x20,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     1131 <isWhite+0x31>
movsbl -0x1(%rbp),%ecx
mov    $0x9,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWhite>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isWhite(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 32, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 9, %8
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 @isWhite(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int musbgm_exit() { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @musbgm_exit() {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int bnrand(int /*<<< orphan*/, int /*<<< orphan*/ *, int, int, int);
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) {
  return bnrand(0, rnd, bits, top, bottom);
}


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

x86 assembly (clang, -O2):
<BN_rand>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <bnrand@plt>

LLVM IR (-O0):
define i32 @BN_rand(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @bnrand(i32 0, i32* %9, i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @BN_rand(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @bnrand(i32 0, i32* %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ USB_LoadEP0();
void USB_ControlReadDataStage(void) { USB_LoadEP0(); }


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

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

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

LLVM IR (-O2):
define void @USB_ControlReadDataStage() {
%1 = tail call i32 (...) @USB_LoadEP0()
ret void
}
/* Variables and functions */
int rename(char *, char *);
int sr_filemove(char *a, char *b) { return rename(a, b); }


x86 assembly (clang, -O0):
<sr_filemove>:
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 <rename@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_filemove>:
jmp    1030 <rename@plt>

LLVM IR (-O0):
define i32 @sr_filemove(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 @rename(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sr_filemove(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
void gensqrt_d() {}


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

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

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

LLVM IR (-O2):
define void @gensqrt_d() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
int arg_ok(int nargs, const char *prog) {
  if (nargs > 1)
    return (1);
  puts("line counting program for C source files");
  printf("usage: %s fname [fname ...]\n", prog);
  puts("where fname is the name of the file to be counted");
  return (0);
}


x86 assembly (clang, -O0):
<arg_ok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1145 <arg_ok+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1174 <arg_ok+0x54>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_ok>:
mov    $0x1,%eax
cmp    $0x1,%edi
jg     1158 <arg_ok+0x38>
push   %rbx
mov    %rsi,%rbx
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"line counting program for C source files\00"
@.str.1 = [29 x i8] c"usage: %s fname [fname ...]\0A\00"
@.str.2 = [50 x i8] c"where fname is the name of the file to be counted\00"
define i32 @arg_ok(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %14
9: ; preds = %2
%10 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%11 = load i8*, i8** %5
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 @puts(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [41 x i8] c"line counting program for C source files\00"
@.str.1 = [29 x i8] c"usage: %s fname [fname ...]\0A\00"
@.str.2 = [50 x i8] c"where fname is the name of the file to be counted\00"
define i32 @arg_ok(i32 %0, i8* %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ do_recv_completion(int);
void do_recv_completions(int fd) {
  while (do_recv_completion(fd)) {
  }
}


x86 assembly (clang, -O0):
<do_recv_completions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <do_recv_completion@plt>
cmp    $0x0,%rax
je     1132 <do_recv_completions+0x22>
jmp    111b <do_recv_completions+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_recv_completions>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <do_recv_completion@plt>
test   %rax,%rax
jne    1120 <do_recv_completions+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @do_recv_completions(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @do_recv_completion(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
void set_gl_core_attributes() {}


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

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

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

LLVM IR (-O2):
define void @set_gl_core_attributes() {
ret void
}
__attribute__((always_)) unsigned int log2_tmp(unsigned long n) {
  unsigned int i;
  asm("bsrl %1,%0" : "=r"(i) : "rm"(n));
  return i;
}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @log2_tmp(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 asm "bsrl $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
/* Variables and functions */
int socket(int, int, int);
int /*<<< orphan*/ unix_error(char *);
int Socket(int family, int type, int protocol) {
  int n;
  if ((n = socket(family, type, protocol)) < 0)
    unix_error("socket error");
  return n;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
jge    1157 <Socket+0x37>
lea    0xeae(%rip),%rdi
call   1030 <unix_error@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Socket+0x18>
lea    0xecd(%rip),%rdi
call   1030 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(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* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @socket(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @unix_error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
@.str = [13 x i8] c"socket error\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @unix_error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}