xunge/DecIR huggingface dataset:
void test_non_identifiers() {
  int i, x;
#pragma omp parallel
#pragma omp for simd;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp for simd linear(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp for simd private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel
#pragma omp for simd, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_non_identifiers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x9e() {
  Assert_real((isalnum(158) == 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_isalnum.c",
              795, ("isalnum should be 0 for 0x9e"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x9e>:
push   %rax
mov    $0x9e,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x31b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9e\00"
define void @t_isalnum_0x9e() {
%1 = call i64 @isalnum(i32 158)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 795, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9e\00"
define void @t_isalnum_0x9e() {
%1 = tail call i64 @isalnum(i32 158)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 795, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ __ptr_t;

/* Variables and functions */
int PTHREAD_CANCEL_ASYNCHRONOUS;
int /*<<< orphan*/ __libc_send(int, int /*<<< orphan*/ const, size_t, int);
int /*<<< orphan*/ pthread_setcanceltype(int, int *);
ssize_t __attribute__((weak))
send(int fd, const __ptr_t buf, size_t n, int flags) {
  ssize_t result;
  int oldtype;
  pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);
  result = __libc_send(fd, buf, n, flags);
  pthread_setcanceltype(oldtype, NULL);
  return result;
}


x86 assembly (clang, -O0):
<send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    -0x1c(%rbp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <__libc_send@plt>
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_setcanceltype@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
call   1040 <pthread_setcanceltype@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1030 <__libc_send@plt>
mov    %eax,%ebx
mov    0x4(%rsp),%edi
xor    %esi,%esi
call   1040 <pthread_setcanceltype@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @send(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%11 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%12 = call i32 @pthread_setcanceltype(i32 %11, i32* %10)
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = load i64, i64* %7
%16 = load i32, i32* %8
%17 = call i32 @__libc_send(i32 %13, i32 %14, i64 %15, i32 %16)
store i32 %17, i32* %9
%18 = load i32, i32* %10
%19 = call i32 @pthread_setcanceltype(i32 %18, i32* null)
%20 = load i32, i32* %9
ret i32 %20
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ASYNCHRONOUS = global i32 0
define weak i32 @send(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = load i32, i32* @PTHREAD_CANCEL_ASYNCHRONOUS
%8 = call i32 @pthread_setcanceltype(i32 %7, i32* %5)
%9 = call i32 @__libc_send(i32 %0, i32 %1, i64 %2, i32 %3)
%10 = load i32, i32* %5
%11 = call i32 @pthread_setcanceltype(i32 %10, i32* null)
ret i32 %9
}
double Max(double x, double y) {
  if (x > y)
    return (x);
  return (y);
}


x86 assembly (clang, -O0):
<Max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <Max+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <Max+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max>:
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Max(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ogt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @Max(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_add0() { CALC_appendString("0"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define void @CALC_add0() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main_fini1(void) {
  printf("main_fini1"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"main_fini1\00"
define void @main_fini1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
int crit_none(void *foo, void *bar) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @crit_none(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ readPWM(int);
void PWM_ISR_6() { readPWM(6); }


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

x86 assembly (clang, -O2):
<PWM_ISR_6>:
mov    $0x6,%edi
jmp    1030 <readPWM@plt>

LLVM IR (-O0):
define void @PWM_ISR_6() {
%1 = call i32 @readPWM(i32 6)
ret void
}

LLVM IR (-O2):
define void @PWM_ISR_6() {
%1 = tail call i32 @readPWM(i32 6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, char *, int);
ssize_t Read(int sock, char *buf, int len) { return read(sock, buf, len); }


x86 assembly (clang, -O0):
<Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @Read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
float __infer_nondet_float();
float remainderf(float x, float y) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<remainderf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @remainderf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @remainderf(float %0, float %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
/* Type definitions */
struct hostent {
  char *h_addr;
};

/* Variables and functions */
struct hostent *gethostbyname(char const *);
int /*<<< orphan*/ usage(char *);
char *parse_host(const char *str) {
  struct hostent *host = gethostbyname(str);
  if (!host)
    usage("Unknown host address");
  return host->h_addr;
}


x86 assembly (clang, -O0):
<parse_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gethostbyname@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <parse_host+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_host>:
push   %rbx
call   1030 <gethostbyname@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <parse_host+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <usage@plt>
mov    (%rbx),%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.hostent = type { i8* }
@.str = [21 x i8] c"Unknown host address\00"
define i8* @parse_host(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.hostent*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.hostent* @gethostbyname(i8* %4)
store %struct.hostent* %5, %struct.hostent** %3
%6 = load %struct.hostent*, %struct.hostent** %3
%7 = icmp ne %struct.hostent* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @usage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load %struct.hostent*, %struct.hostent** %3
%12 = getelementptr inbounds %struct.hostent, %struct.hostent* %11, i32 0, i32 0
%13 = load i8*, i8** %12
ret i8* %13
}

LLVM IR (-O2):
%struct.hostent = type { i8* }
@.str = [21 x i8] c"Unknown host address\00"
define i8* @parse_host(i8* %0) {
%2 = tail call %struct.hostent* @gethostbyname(i8* %0)
%3 = icmp eq %struct.hostent* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @usage(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = getelementptr inbounds %struct.hostent, %struct.hostent* %2, i64 0, i32 0
%8 = load i8*, i8** %7
ret i8* %8
}
/* Variables and functions */
int ARRAY_SIZE(int *);
int get_hbm_index(int idx) {
  int i = 0;
  int idx_list[] = {20000};
  while (i < ARRAY_SIZE(idx_list)) {
    if (idx < idx_list[i])
      break;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_hbm_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <ARRAY_SIZE@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116b <get_hbm_index+0x5b>
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rcx
cmp    -0xc(%rbp,%rcx,4),%eax
jge    115d <get_hbm_index+0x4d>
jmp    116b <get_hbm_index+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <get_hbm_index+0x1b>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hbm_index>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movl   $0x4e20,0xc(%rsp)
mov    $0xffffffff,%ebp
lea    0xc(%rsp),%r14
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r14,%rdi
call   1030 <ARRAY_SIZE@plt>
cmp    %eax,%ebp
jge    1145 <get_hbm_index+0x35>
cmp    %ebx,0xc(%rsp)
jle    1130 <get_hbm_index+0x20>
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @get_hbm_index(i32 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 20000, i32* %4
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ 0, %1 ], [ %12, %5 ]
%7 = call i32 @ARRAY_SIZE(i32* %4)
%8 = icmp sge i32 %6, %7
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, %0
%11 = select i1 %8, i1 true, i1 %10
%12 = add nuw nsw i32 %6, 1
br i1 %11, label %13, label %5
13: ; preds = %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ loff_t;

/* Variables and functions */
int main(void) {
  loff_t offset = 0;
  (void)offset;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int gpio_close(int fd) {
  close(fd);
  return 0;
}


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

x86 assembly (clang, -O2):
<gpio_close>:
push   %rax
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gpio_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
/* Variables and functions */
unsigned long long XXH64(void const *, unsigned int, unsigned int);
unsigned int XXH64_32(const void *key, unsigned int len, unsigned int seed) {
  unsigned long long hash = XXH64(key, len, seed);
  return (unsigned int)(hash & 0xFFFFFFFF);
}


x86 assembly (clang, -O0):
<XXH64_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <XXH64@plt>
mov    %rax,-0x18(%rbp)
movabs $0xffffffff,%rax
and    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XXH64_32>:
jmp    1030 <XXH64@plt>

LLVM IR (-O0):
define i32 @XXH64_32(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i64 @XXH64(i8* %8, i32 %9, i32 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = and i64 %12, 4294967295
%14 = trunc i64 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @XXH64_32(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @XXH64(i8* %0, i32 %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
struct bufferevent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufferevent_free(struct bufferevent *);
int /*<<< orphan*/ bufferevent_get_output(struct bufferevent *);
scalar_t__ evbuffer_get_length(int /*<<< orphan*/);
void closeonflush_writecb(struct bufferevent *bev, void *arg) {
  if (evbuffer_get_length(bufferevent_get_output(bev)) == 0)
    bufferevent_free(bev);
}


x86 assembly (clang, -O0):
<closeonflush_writecb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bufferevent_get_output@plt>
mov    %eax,%edi
call   1040 <evbuffer_get_length@plt>
cmp    $0x0,%rax
jne    1163 <closeonflush_writecb+0x33>
mov    -0x8(%rbp),%rdi
call   1050 <bufferevent_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeonflush_writecb>:
push   %rbx
mov    %rdi,%rbx
call   1030 <bufferevent_get_output@plt>
mov    %eax,%edi
call   1040 <evbuffer_get_length@plt>
test   %rax,%rax
je     1147 <closeonflush_writecb+0x17>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <bufferevent_free@plt>

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

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
define void @closeonflush_writecb(%struct.bufferevent* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bufferevent_get_output(%struct.bufferevent* %0)
%4 = tail call i64 @evbuffer_get_length(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @bufferevent_free(%struct.bufferevent* %0)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int do_parent_job() {
  usleep(13 * 1000000L);
  return 1;
}


x86 assembly (clang, -O0):
<do_parent_job>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc65d40,%edi
call   1030 <usleep@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_parent_job>:
push   %rax
mov    $0xc65d40,%edi
call   1030 <usleep@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_parent_job() {
%1 = call i32 @usleep(i32 13000000)
ret i32 1
}

LLVM IR (-O2):
define i32 @do_parent_job() {
%1 = tail call i32 @usleep(i32 13000000)
ret i32 1
}
char gridChar(int i) {
  switch (i) {
  case -1:
    return 'X';
  case 0:
    return ' ';
  case 1:
    return 'O';
  }
}


x86 assembly (clang, -O0):
<gridChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xffffffff,%eax
je     113c <gridChar+0x3c>
jmp    111b <gridChar+0x1b>
mov    -0xc(%rbp),%eax
test   %eax,%eax
je     1145 <gridChar+0x45>
jmp    112b <gridChar+0x2b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     114e <gridChar+0x4e>
jmp    1152 <gridChar+0x52>
movb   $0x58,-0x1(%rbp)
jmp    1152 <gridChar+0x52>
movb   $0x20,-0x1(%rbp)
jmp    1152 <gridChar+0x52>
movb   $0x4f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gridChar>:
test   %edi,%edi
mov    $0x20,%eax
mov    $0x58,%ecx
cmove  %eax,%ecx
cmp    $0x1,%edi
mov    $0x4f,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @gridChar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 -1, label %5
i32 0, label %6
i32 1, label %7
]
5: ; preds = %1
store i8 88, i8* %2
br label %8
6: ; preds = %1
store i8 32, i8* %2
br label %8
7: ; preds = %1
store i8 79, i8* %2
br label %8
8: ; preds = %5, %6, %7, %1
%9 = load i8, i8* %2
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @gridChar(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8 32, i8 88
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i8 79, i8 %3
ret i8 %5
}
double test_asin(double x) { return __builtin_asin(x); }


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

x86 assembly (clang, -O2):
<test_asin>:
jmp    1030 <asin@plt>

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

LLVM IR (-O2):
define double @test_asin(double %0) {
%2 = tail call double @asin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  for (i = 1; i <= 100; i++) {
    if (i % 3 == 0) {
      printf("%3d ", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1166 <main+0x56>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1153 <main+0x43>
mov    -0x8(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x65,%ebx
je     1159 <main+0x49>
movzbl %bl,%eax
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %cl,%al
jne    1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%3d \00"
define i32 @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 1, %0 ], [ %9, %8 ]
%3 = trunc i32 %2 to i8
%4 = urem i8 %3, 3
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %8
8: ; preds = %1, %6
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 101
br i1 %10, label %11, label %1
11: ; preds = %8
ret i32 0
}
/* Variables and functions */
scalar_t__ isPrime(int);
int sum_primes(int start, int end) {
  int sum = 0;
  for (int i = start; i <= end; i++)
    if (isPrime(i))
      sum += i;
  return sum;
}


x86 assembly (clang, -O0):
<sum_primes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1165 <sum_primes+0x55>
mov    -0x10(%rbp),%edi
call   1030 <isPrime@plt>
cmp    $0x0,%rax
je     1152 <sum_primes+0x42>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <sum_primes+0x47>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112b <sum_primes+0x1b>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_primes>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
cmp    %esi,%edi
jle    1121 <sum_primes+0x11>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %esi,%r14d
mov    %edi,%ebp
add    $0x1,%r14d
xor    %ebx,%ebx
jmp    113a <sum_primes+0x2a>
xchg   %ax,%ax
add    %ecx,%ebx
add    $0x1,%ebp
cmp    %ebp,%r14d
je     111a <sum_primes+0xa>
mov    %ebp,%edi
call   1030 <isPrime@plt>
mov    $0x0,%ecx
test   %rax,%rax
je     1130 <sum_primes+0x20>
mov    %ebp,%ecx
jmp    1130 <sum_primes+0x20>

LLVM IR (-O0):
define i32 @sum_primes(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
%7 = load i32, i32* %3
store i32 %7, i32* %6
br label %8
8: ; preds = %21, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32, i32* %6
%14 = call i64 @isPrime(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = add nsw i32 %18, %17
store i32 %19, i32* %5
br label %20
20: ; preds = %16, %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %8
24: ; preds = %8
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @sum_primes(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = phi i32 [ 0, %2 ], [ %12, %6 ]
ret i32 %5
6: ; preds = %2, %6
%7 = phi i32 [ %13, %6 ], [ %0, %2 ]
%8 = phi i32 [ %12, %6 ], [ 0, %2 ]
%9 = tail call i64 @isPrime(i32 %7)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i32 0, i32 %7
%12 = add nsw i32 %11, %8
%13 = add i32 %7, 1
%14 = icmp eq i32 %7, %1
br i1 %14, label %4, label %6
}
void foo210(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo210(i32 %0) {
ret void
}
int main() {
  unsigned long long i = 0;
  while (1) {
    i++;
    if (i > 1000000000)
      break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x3b9aca00,-0x10(%rbp)
3b
jbe    1132 <main+0x32>
jmp    1137 <main+0x37>
jmp    1113 <main+0x13>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
bool isPunctuation(const char character) {
  switch (character) {
  case '-':
    return true;
  case '_':
    return true;
  case ':':
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<isPunctuation>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2d,%eax
je     1141 <isPunctuation+0x41>
jmp    111f <isPunctuation+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x3a,%eax
je     1159 <isPunctuation+0x59>
jmp    1130 <isPunctuation+0x30>
mov    -0xc(%rbp),%eax
sub    $0x5f,%eax
je     114d <isPunctuation+0x4d>
jmp    1165 <isPunctuation+0x65>
movl   $0x1,-0x4(%rbp)
jmp    116c <isPunctuation+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    116c <isPunctuation+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    116c <isPunctuation+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPunctuation>:
add    $0xffffffd3,%edi
cmp    $0x32,%edi
ja     111e <isPunctuation+0x1e>
mov    $0x1,%eax
movabs $0x4000000002001,%rcx
bt     %rdi,%rcx
jae    111e <isPunctuation+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPunctuation(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 45, label %6
i32 95, label %7
i32 58, label %8
]
6: ; preds = %1
store i32 1, i32* %2
br label %10
7: ; preds = %1
store i32 1, i32* %2
br label %10
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @isPunctuation(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 45, label %4
i32 95, label %4
i32 58, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ your_event_mask;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
long get_XWindowAttributes_your_event_mask(void *_p) {
  return (long)((XWindowAttributes *)_p)->your_event_mask;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XWindowAttributes_your_event_mask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XWindowAttributes_your_event_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
void ref_int8_t(int8_t arg, int8_t *result) { *result = arg; }


x86 assembly (clang, -O0):
<ref_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_int8_t>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @ref_int8_t(i32 %0, i32* nocapture writeonly %1) {
store i32 %0, i32* %1
ret void
}
int func_89(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @func_89() {
ret i32 1
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *WpeStrdup(const char *str) {
  char *newstr;
  newstr = malloc((strlen(str) + 1) * sizeof(char));
  if (newstr != NULL) {
    strcpy(newstr, str);
  }
  return (newstr);
}


x86 assembly (clang, -O0):
<WpeStrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1171 <WpeStrdup+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WpeStrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1157 <WpeStrdup+0x27>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @WpeStrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
br label %17
17: ; preds = %13, %1
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @WpeStrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
void GPS_PPS_Off(void) {}


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

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

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

LLVM IR (-O2):
define void @GPS_PPS_Off() {
ret void
}
/* Variables and functions */
int spi_command_write(int, char *, int, char *);
int nrf_write_tx_payload_noack(char *txpayload, int length, char *retstatus) {
  return spi_command_write(0xB0, txpayload, length, retstatus);
}


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

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

LLVM IR (-O0):
define i32 @nrf_write_tx_payload_noack(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @spi_command_write(i32 176, i8* %7, i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @nrf_write_tx_payload_noack(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @spi_command_write(i32 176, i8* %0, i32 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFD;
int O_CREAT;
int O_NONBLOCK;
int O_WRONLY;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int);
int open(char const *, int, int);
int open_write(const char *fn) {
  int fd = open(fn, O_CREAT | O_WRONLY | O_NONBLOCK, 0644);
  if (fd == -1)
    return -1;
  fcntl(fd, F_SETFD, 1);
  return fd;
}


x86 assembly (clang, -O0):
<open_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2e80(%rip),%rax
or     (%rax),%esi
mov    0x2e97(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    116e <open_write+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    118a <open_write+0x6a>
mov    -0x14(%rbp),%edi
mov    0x2e58(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1030 <fcntl@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_write>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    0x2e91(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ea6(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
call   1040 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1162 <open_write+0x42>
mov    0x2e7c(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    $0x1,%edx
call   1030 <fcntl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFD = global i32 0
define i32 @open_write(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_CREAT
%7 = load i32, i32* @O_WRONLY
%8 = or i32 %6, %7
%9 = load i32, i32* @O_NONBLOCK
%10 = or i32 %8, %9
%11 = call i32 @open(i8* %5, i32 %10, i32 420)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %20
15: ; preds = %1
%16 = load i32, i32* %4
%17 = load i32, i32* @F_SETFD
%18 = call i32 @fcntl(i32 %16, i32 %17, i32 1)
%19 = load i32, i32* %4
store i32 %19, i32* %2
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_WRONLY = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFD = global i32 0
define i32 @open_write(i8* nocapture %0) {
%2 = load i32, i32* @O_CREAT
%3 = load i32, i32* @O_WRONLY
%4 = or i32 %3, %2
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %4, %5
%7 = tail call i32 @open(i8* %0, i32 %6, i32 420)
%8 = icmp eq i32 %7, -1
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* @F_SETFD
%11 = tail call i32 @fcntl(i32 %7, i32 %10, i32 1)
br label %12
12: ; preds = %1, %9
ret i32 %7
}
void convolve_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @convolve_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void VM_sysexit(void) { exit(0); }


x86 assembly (clang, -O0):
<VM_sysexit>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<VM_sysexit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @VM_sysexit() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @VM_sysexit() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
void bf_set(uint8_t field[], size_t idx) {
  field[idx / 8] |= (1u << (7 - (idx % 8)));
}


x86 assembly (clang, -O0):
<bf_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
and    $0x7,%rcx
mov    $0x7,%eax
sub    %rcx,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x3,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_set>:
mov    %esi,%ecx
not    %cl
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x3,%rsi
or     %eax,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @bf_set(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = urem i64 %5, 8
%7 = sub i64 7, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 1, %8
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = udiv i64 %11, 8
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = or i32 %14, %9
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @bf_set(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 7
%5 = xor i32 %4, 7
%6 = shl nuw i32 1, %5
%7 = lshr i64 %1, 3
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = or i32 %9, %6
store i32 %10, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsRenew();
void ems_renew_(void) {
  emsRenew();
  return;
}


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

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

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

LLVM IR (-O2):
define void @ems_renew_() {
%1 = tail call i32 (...) @emsRenew()
ret void
}
/* Type definitions */
struct domain {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ boundary_fixed_rout(struct domain *);
int /*<<< orphan*/ boundary_fixed_zbot(struct domain *);
int /*<<< orphan*/ boundary_fixed_ztop(struct domain *);
void boundary_trans(struct domain *theDomain, int dim) {
  if (dim == 1) {
    boundary_fixed_rout(theDomain);
  } else if (dim == 2) {
    boundary_fixed_zbot(theDomain);
    boundary_fixed_ztop(theDomain);
  }
}


x86 assembly (clang, -O0):
<boundary_trans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1157 <boundary_trans+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <boundary_fixed_rout@plt>
jmp    1178 <boundary_trans+0x48>
cmpl   $0x2,-0xc(%rbp)
jne    1173 <boundary_trans+0x43>
mov    -0x8(%rbp),%rdi
call   1040 <boundary_fixed_zbot@plt>
mov    -0x8(%rbp),%rdi
call   1050 <boundary_fixed_ztop@plt>
jmp    1178 <boundary_trans+0x48>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boundary_trans>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x2,%esi
je     1147 <boundary_trans+0x17>
cmp    $0x1,%esi
jne    1158 <boundary_trans+0x28>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <boundary_fixed_rout@plt>
mov    %rbx,%rdi
call   1040 <boundary_fixed_zbot@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <boundary_fixed_ztop@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.domain = type { i32 }
define void @boundary_trans(%struct.domain* %0, i32 %1) {
%3 = alloca %struct.domain*
%4 = alloca i32
store %struct.domain* %0, %struct.domain** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.domain*, %struct.domain** %3
%9 = call i32 @boundary_fixed_rout(%struct.domain* %8)
br label %19
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load %struct.domain*, %struct.domain** %3
%15 = call i32 @boundary_fixed_zbot(%struct.domain* %14)
%16 = load %struct.domain*, %struct.domain** %3
%17 = call i32 @boundary_fixed_ztop(%struct.domain* %16)
br label %18
18: ; preds = %13, %10
br label %19
19: ; preds = %18, %7
ret void
}

LLVM IR (-O2):
%struct.domain = type { i32 }
define void @boundary_trans(%struct.domain* %0, i32 %1) {
switch i32 %1, label %8 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i32 @boundary_fixed_rout(%struct.domain* %0)
br label %8
5: ; preds = %2
%6 = tail call i32 @boundary_fixed_zbot(%struct.domain* %0)
%7 = tail call i32 @boundary_fixed_ztop(%struct.domain* %0)
br label %8
8: ; preds = %2, %5, %3
ret void
}