xunge/DecIR huggingface dataset:
/* Type definitions */
struct mintaka_record {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ record_find_next(long *, int, struct mintaka_record *);
void record_find_first(int p, struct mintaka_record *record) {
  long element;
  element = 0;
  record_find_next(&element, p, record);
}


x86 assembly (clang, -O0):
<record_find_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rdi
call   1030 <record_find_next@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<record_find_first>:
push   %rax
mov    %rsi,%rdx
mov    %edi,%esi
movq   $0x0,(%rsp)
mov    %rsp,%rdi
call   1030 <record_find_next@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.mintaka_record = type { i32 }
define void @record_find_first(i32 %0, %struct.mintaka_record* %1) {
%3 = alloca i32
%4 = alloca %struct.mintaka_record*
%5 = alloca i64
store i32 %0, i32* %3
store %struct.mintaka_record* %1, %struct.mintaka_record** %4
store i64 0, i64* %5
%6 = load i32, i32* %3
%7 = load %struct.mintaka_record*, %struct.mintaka_record** %4
%8 = call i32 @record_find_next(i64* %5, i32 %6, %struct.mintaka_record* %7)
ret void
}

LLVM IR (-O2):
%struct.mintaka_record = type { i32 }
define void @record_find_first(i32 %0, %struct.mintaka_record* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%5 = call i32 @record_find_next(i64* %3, i32 %0, %struct.mintaka_record* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Rquit() { printf("Rquite executed\n"); }


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"Rquite executed\00"
define void @Rquit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
int main() {
  (*(volatile unsigned char *)0x24) |= (1 << 5);
  while (1) {
    (*(volatile unsigned char *)0x25) |= (1 << 5);
    delay_ms(10000);
    (*(volatile unsigned char *)0x25) &= ~(1 << 5);
    delay_ms(10000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x24,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %al,%cl
mov    $0x24,%eax
mov    %cl,(%rax)
mov    $0x25,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x20,%eax
mov    %eax,-0xc(%rbp)
mov    %al,%cl
mov    $0x25,%eax
mov    %cl,(%rax)
mov    $0x2710,%edi
call   1030 <delay_ms@plt>
mov    $0x25,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0xffffffdf,%eax
mov    %eax,-0x8(%rbp)
mov    %al,%cl
mov    $0x25,%eax
mov    %cl,(%rax)
mov    $0x2710,%edi
call   1030 <delay_ms@plt>
jmp    1135 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %rax
orb    $0x20,0x24
20
nopl   0x0(%rax)
orb    $0x20,0x25
20
mov    $0x2710,%edi
call   1030 <delay_ms@plt>
andb   $0xdf,0x25
df
mov    $0x2710,%edi
call   1030 <delay_ms@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load volatile i8, i8* inttoptr (i64 36 to i8*)
%3 = zext i8 %2 to i32
%4 = or i32 %3, 32
%5 = trunc i32 %4 to i8
store volatile i8 %5, i8* inttoptr (i64 36 to i8*)
br label %6
6: ; preds = %0, %6
%7 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%8 = zext i8 %7 to i32
%9 = or i32 %8, 32
%10 = trunc i32 %9 to i8
store volatile i8 %10, i8* inttoptr (i64 37 to i8*)
%11 = call i32 @delay_ms(i32 10000)
%12 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%13 = zext i8 %12 to i32
%14 = and i32 %13, -33
%15 = trunc i32 %14 to i8
store volatile i8 %15, i8* inttoptr (i64 37 to i8*)
%16 = call i32 @delay_ms(i32 10000)
br label %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = load volatile i8, i8* inttoptr (i64 36 to i8*)
%2 = or i8 %1, 32
store volatile i8 %2, i8* inttoptr (i64 36 to i8*)
br label %3
3: ; preds = %0, %3
%4 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%5 = or i8 %4, 32
store volatile i8 %5, i8* inttoptr (i64 37 to i8*)
%6 = tail call i32 @delay_ms(i32 10000)
%7 = load volatile i8, i8* inttoptr (i64 37 to i8*)
%8 = and i8 %7, -33
store volatile i8 %8, i8* inttoptr (i64 37 to i8*)
%9 = tail call i32 @delay_ms(i32 10000)
br label %3
}
void swap_int(int *a, int *b) {
  int t;
  t = *a;
  *a = *b;
  *b = t;
}


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

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

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

LLVM IR (-O2):
define void @swap_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void ff_hevc_put_hevc_epel_h64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_h64_10_avx2() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solve_with_multiprecision(int dcp, int max, double eps, int *nit) {
  int fail = _ada_use_c2phc4c(275, &max, nit, &eps, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solve_with_multiprecision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
mov    $0x113,%edi
lea    -0x8(%rbp),%rsi
lea    -0x10(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_with_multiprecision>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x113,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @solve_with_multiprecision(i32 %0, i32 %1, double %2, i32* %3) {
%5 = alloca i32
%6 = alloca double
store i32 %1, i32* %5
store double %2, double* %6
%7 = call i32 @_ada_use_c2phc4c(i32 275, i32* %5, i32* %3, double* %6, i32 0)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void MCThread_exitWithStatus(void *status) { pthread_exit(status); }


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

x86 assembly (clang, -O2):
<MCThread_exitWithStatus>:
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define void @MCThread_exitWithStatus(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int);
char *pw_name(int uid) {
  struct passwd *pw;
  pw = getpwuid(uid);
  return pw->pw_name;
}


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

x86 assembly (clang, -O2):
<pw_name>:
push   %rax
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @pw_name(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.passwd*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.passwd* @getpwuid(i32 %4)
store %struct.passwd* %5, %struct.passwd** %3
%6 = load %struct.passwd*, %struct.passwd** %3
%7 = getelementptr inbounds %struct.passwd, %struct.passwd* %6, i32 0, i32 0
%8 = load i8*, i8** %7
ret i8* %8
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @pw_name(i32 %0) {
%2 = tail call %struct.passwd* @getpwuid(i32 %0)
%3 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *pname) {
  printf("Usage: %s [OPTION] <deletions.haplotypes> <snps.haplotypes>\n"
         "\n"
         " -p\tNUM\tP-value threshold.\n"
         " -r\tNUM\tR^2 threshold.\n"
         " -s\tNUM\tRange in which to search for appropriate tag SNPs. \n"
         " -v\t\tVerbose.\n"
         " -h\t\tPrint this help.\n\n",
         pname);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [209 x i8] c"Usage: %s [OPTION] <deletions.haplotypes> <snps.haplotypes>\0A\0A -p\09NUM\09P-value threshold.\0A -r\09NUM\09R^2 threshold.\0A -s\09NUM\09Range in which to search for appropriate tag SNPs. \0A -v\09\09Verbose.\0A -h\09\09Print this help.\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [209 x i8] c"Usage: %s [OPTION] <deletions.haplotypes> <snps.haplotypes>\0A\0A -p\09NUM\09P-value threshold.\0A -r\09NUM\09R^2 threshold.\0A -s\09NUM\09Range in which to search for appropriate tag SNPs. \0A -v\09\09Verbose.\0A -h\09\09Print this help.\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pixel_satd_wxh(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                   int);
int pixel_satd_16x8(uint8_t *pix1, int i_stride_pix1, uint8_t *pix2,
                    int i_stride_pix2) {
  return pixel_satd_wxh(pix1, i_stride_pix1, pix2, i_stride_pix2, 16, 8);
}


x86 assembly (clang, -O0):
<pixel_satd_16x8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x10,%r8d
mov    $0x8,%r9d
call   1030 <pixel_satd_wxh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_satd_16x8>:
mov    $0x10,%r8d
mov    $0x8,%r9d
jmp    1030 <pixel_satd_wxh@plt>

LLVM IR (-O0):
define i32 @pixel_satd_16x8(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 @pixel_satd_wxh(i32* %9, i32 %10, i32* %11, i32 %12, i32 16, i32 8)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pixel_satd_16x8(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @pixel_satd_wxh(i32* %0, i32 %1, i32* %2, i32 %3, i32 16, i32 8)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint64_t read_u32(const void *const ptr) { return *(uint32_t *)ptr; }


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

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

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

LLVM IR (-O2):
define i32 @read_u32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void resetArray(int **x, int n) {
  if (*x == NULL)
    *x = (int *)malloc(sizeof(int) * n);
  memset(*x, 0, n * sizeof(int));
}


x86 assembly (clang, -O0):
<resetArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1156 <resetArray+0x36>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetArray>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    (%rdi),%rdi
shl    $0x2,%ebx
test   %rdi,%rdi
jne    1141 <resetArray+0x21>
mov    %ebx,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    %rax,(%r14)
xor    %esi,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @resetArray(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** %5
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = mul i64 4, %10
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
%15 = load i32**, i32*** %3
store i32* %14, i32** %15
br label %16
16: ; preds = %8, %2
%17 = load i32**, i32*** %3
%18 = load i32*, i32** %17
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = mul i64 %20, 4
%22 = trunc i64 %21 to i32
%23 = call i32 @memset(i32* %18, i32 0, i32 %22)
ret void
}

LLVM IR (-O2):
define void @resetArray(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
%4 = icmp eq i32* %3, null
%5 = shl i32 %1, 2
br i1 %4, label %6, label %9
6: ; preds = %2
%7 = tail call i64 @malloc(i32 %5)
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %0
br label %9
9: ; preds = %2, %6
%10 = phi i32* [ %8, %6 ], [ %3, %2 ]
%11 = tail call i32 @memset(i32* %10, i32 0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int NumMenu(void) {
  int myInt;
  printf("Enter the movie number (UPC Code): ");
  scanf("%i", &myInt);
  return myInt;
}


x86 assembly (clang, -O0):
<NumMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumMenu>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Enter the movie number (UPC Code): \00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @NumMenu() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [36 x i8] c"Enter the movie number (UPC Code): \00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @NumMenu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ CreatePath(char *);
int LoadFile(char *, void **);
int /*<<< orphan*/ Q_free(void *);
int /*<<< orphan*/ SaveFile(char *, void *, int);
void CopyFile(char *from, char *to) {
  void *buffer;
  int length;
  length = LoadFile(from, &buffer);
  CreatePath(to);
  SaveFile(to, buffer, length);
  Q_free(buffer);
}


x86 assembly (clang, -O0):
<CopyFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1060 <LoadFile@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <CreatePath@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <SaveFile@plt>
mov    -0x18(%rbp),%rdi
call   1030 <Q_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyFile>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1060 <LoadFile@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <CreatePath@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1050 <SaveFile@plt>
mov    (%rsp),%rdi
call   1030 <Q_free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @CopyFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @LoadFile(i8* %7, i8** %5)
store i32 %8, i32* %6
%9 = load i8*, i8** %4
%10 = call i32 @CreatePath(i8* %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 @SaveFile(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %5
%16 = call i32 @Q_free(i8* %15)
ret void
}

LLVM IR (-O2):
define void @CopyFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @LoadFile(i8* %0, i8** %3)
%6 = call i32 @CreatePath(i8* %1)
%7 = load i8*, i8** %3
%8 = call i32 @SaveFile(i8* %1, i8* %7, i32 %5)
%9 = load i8*, i8** %3
%10 = call i32 @Q_free(i8* %9)
ret void
}
void pdr_(x, y, z) float *x, *y, *z;
{ pdr(*x, *y, *z); }


x86 assembly (clang, -O0):
<pdr_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
call   1030 <pdr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdr_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
movss  (%rdx),%xmm2
cvtss2sd %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <pdr@plt>

LLVM IR (-O0):
define void @pdr_(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float, float* %7
%9 = fpext float %8 to double
%10 = load float*, float** %5
%11 = load float, float* %10
%12 = fpext float %11 to double
%13 = load float*, float** %6
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = call i32 (double, double, double, ...) bitcast (i32 (...)* @pdr to i32 (double, double, double, ...)*)(double %9, double %12, double %15)
ret void
}

LLVM IR (-O2):
define void @pdr_(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = fpext float %4 to double
%6 = load float, float* %1
%7 = fpext float %6 to double
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @pdr to i32 (double, double, double, ...)*)(double %5, double %7, double %9)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int affirmative(unsigned char *s) {
  if (strcmp((char *)s, "on") == 0)
    return (1);
  if (strcmp((char *)s, "yes") == 0)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<affirmative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <affirmative+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <affirmative+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <affirmative+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <affirmative+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<affirmative>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <affirmative+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"on\00"
@.str.1 = [4 x i8] c"yes\00"
define i32 @affirmative(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq 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
}
/* Variables and functions */
int chdir(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
char *getenv(char *);
int /*<<< orphan*/ stderr;
void goHome() {
  char *home = getenv("HOME");
  if (chdir(home) == -1) {
    fprintf(stderr, "Unable to go to HOME directory. Possibly not set.\n");
  }
}


x86 assembly (clang, -O0):
<goHome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <chdir@plt>
cmp    $0xffffffff,%eax
jne    116f <goHome+0x3f>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
lea    0xe9b(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goHome>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rdi
call   1040 <chdir@plt>
cmp    $0xffffffff,%eax
je     114c <goHome+0x1c>
pop    %rax
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea9(%rip),%rsi
pop    %rax
jmp    1050 <fprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
@stderr = global i32 0
@.str.1 = [51 x i8] c"Unable to go to HOME directory. Possibly not set.\0A\00"
define void @goHome() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @chdir(i8* %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
@stderr = global i32 0
@.str.1 = [51 x i8] c"Unable to go to HOME directory. Possibly not set.\0A\00"
define void @goHome() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @chdir(i8* %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %4, %0
ret void
}
void apply_DIRICHLET_Y_END(double *V) {
  long i, index;
  for (i = 0; i < 100; i++) {
    index = i * 50 + 50 - 1;
    V[index] = (0.0) + i * ((((10.0) - (0.0)) / 100));
  }
}


x86 assembly (clang, -O0):
<apply_DIRICHLET_Y_END>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x64,-0x10(%rbp)
jge    1163 <apply_DIRICHLET_Y_END+0x63>
imul   $0x32,-0x10(%rbp),%rax
add    $0x32,%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
mulsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <apply_DIRICHLET_Y_END+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_DIRICHLET_Y_END>:
add    $0x318,%rdi
xor    %eax,%eax
movsd  0xeef(%rip),%xmm0
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nop
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,-0x190(%rdi)
ff
lea    0x1(%rax),%rcx
xorps  %xmm2,%xmm2
cvtsi2sd %rcx,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rdi)
add    $0x320,%rdi
add    $0x2,%rax
cmp    $0x64,%rax
jne    1120 <apply_DIRICHLET_Y_END+0x20>
ret

LLVM IR (-O0):
define void @apply_DIRICHLET_Y_END(double* %0) {
%2 = alloca double*
%3 = alloca i64
%4 = alloca i64
store double* %0, double** %2
store i64 0, i64* %3
br label %5
5: ; preds = %19, %1
%6 = load i64, i64* %3
%7 = icmp slt i64 %6, 100
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i64, i64* %3
%10 = mul nsw i64 %9, 50
%11 = add nsw i64 %10, 50
%12 = sub nsw i64 %11, 1
store i64 %12, i64* %4
%13 = load i64, i64* %3
%14 = sitofp i64 %13 to double
%15 = call double @llvm.fmuladd.f64(double %14, double 1.000000e-01, double 0.000000e+00)
%16 = load double*, double** %2
%17 = load i64, i64* %4
%18 = getelementptr inbounds double, double* %16, i64 %17
store double %15, double* %18
br label %19
19: ; preds = %8
%20 = load i64, i64* %3
%21 = add nsw i64 %20, 1
store i64 %21, i64* %3
br label %5
22: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @apply_DIRICHLET_Y_END(double* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %15, %2 ]
%4 = mul nuw nsw i64 %3, 50
%5 = add nuw nsw i64 %4, 49
%6 = sitofp i64 %3 to double
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.000000e-01, double 0.000000e+00)
%8 = getelementptr inbounds double, double* %0, i64 %5
store double %7, double* %8
%9 = or i64 %3, 1
%10 = mul nuw nsw i64 %9, 50
%11 = add nuw nsw i64 %10, 49
%12 = sitofp i64 %9 to double
%13 = tail call double @llvm.fmuladd.f64(double %12, double 1.000000e-01, double 0.000000e+00)
%14 = getelementptr inbounds double, double* %0, i64 %11
store double %13, double* %14
%15 = add nuw nsw i64 %3, 2
%16 = icmp eq i64 %15, 100
br i1 %16, label %17, label %2
17: ; preds = %2
ret void
}
int opng_isalpha(int ch) {
  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
}


x86 assembly (clang, -O0):
<opng_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <opng_isalpha+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <opng_isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <opng_isalpha+0x39>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opng_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @opng_isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @opng_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void virtio_rmb(void) {}


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

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

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

LLVM IR (-O2):
define void @virtio_rmb() {
ret void
}
double grib_op_div_d(double a, double b) { return a / b; }


x86 assembly (clang, -O0):
<grib_op_div_d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_op_div_d>:
divsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @grib_op_div_d(double %0, double %1) {
%3 = fdiv double %0, %1
ret double %3
}
void isr_1_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @isr_1_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_set_sleep_low() { pmu_set_sleep_clk(0xF, 0x0, 0x1, 0x1); }


x86 assembly (clang, -O0):
<pmu_set_sleep_low>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <pmu_set_sleep_clk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_sleep_low>:
mov    $0xf,%edi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <pmu_set_sleep_clk@plt>

LLVM IR (-O0):
define void @pmu_set_sleep_low() {
%1 = call i32 @pmu_set_sleep_clk(i32 15, i32 0, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @pmu_set_sleep_low() {
%1 = tail call i32 @pmu_set_sleep_clk(i32 15, i32 0, i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_glsl_block_comment();
int /*<<< orphan*/ test_glsl_comment_entities();
int /*<<< orphan*/ test_glsl_comments();
int /*<<< orphan*/ test_glsl_empty_comments();
void all_glsl_tests() {
  test_glsl_comments();
  test_glsl_empty_comments();
  test_glsl_block_comment();
  test_glsl_comment_entities();
}


x86 assembly (clang, -O0):
<all_glsl_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_glsl_comments@plt>
mov    $0x0,%al
call   1040 <test_glsl_empty_comments@plt>
mov    $0x0,%al
call   1060 <test_glsl_block_comment@plt>
mov    $0x0,%al
call   1030 <test_glsl_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_glsl_tests>:
push   %rax
xor    %eax,%eax
call   1050 <test_glsl_comments@plt>
xor    %eax,%eax
call   1040 <test_glsl_empty_comments@plt>
xor    %eax,%eax
call   1060 <test_glsl_block_comment@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_glsl_comment_entities@plt>

LLVM IR (-O0):
define void @all_glsl_tests() {
%1 = call i32 (...) @test_glsl_comments()
%2 = call i32 (...) @test_glsl_empty_comments()
%3 = call i32 (...) @test_glsl_block_comment()
%4 = call i32 (...) @test_glsl_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_glsl_tests() {
%1 = tail call i32 (...) @test_glsl_comments()
%2 = tail call i32 (...) @test_glsl_empty_comments()
%3 = tail call i32 (...) @test_glsl_block_comment()
%4 = tail call i32 (...) @test_glsl_comment_entities()
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gui_buffer_notify_set_all();
void config_change_buffer_notify_default(void *data,
                                         struct t_config_option *option) {
  (void)data;
  (void)option;
  gui_buffer_notify_set_all();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @config_change_buffer_notify_default(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @gui_buffer_notify_set_all()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @config_change_buffer_notify_default(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @gui_buffer_notify_set_all()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void fatal(char *errorMessage) {
  perror(errorMessage);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @fatal(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xcirculaterequest;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xcirculaterequest_display(void *_p, void *_v) {
  ((XEvent *)_p)->xcirculaterequest.display = (Display *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xcirculaterequest_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
int xmlUCSIsBopomofoExtended(int code) {
  return (((code >= 0x31A0) && (code <= 0x31BF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsBopomofoExtended>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x31a0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsBopomofoExtended+0x26>
cmpl   $0x31bf,-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):
<xmlUCSIsBopomofoExtended>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x31a0,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsBopomofoExtended(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 12704
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 12735
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 @xmlUCSIsBopomofoExtended(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 12704
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/ *);
void fputhex(int c, FILE *o) {
  if (c >= 10) {
    fputc('a' + c - 10, o);
  } else {
    fputc('0' + c, o);
  }
}


x86 assembly (clang, -O0):
<fputhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     1140 <fputhex+0x30>
mov    -0x4(%rbp),%edi
add    $0x61,%edi
sub    $0xa,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
jmp    114f <fputhex+0x3f>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputhex>:
lea    0x30(%rdi),%ecx
lea    0x57(%rdi),%eax
cmp    $0xa,%edi
cmovl  %ecx,%eax
mov    %eax,%edi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @fputhex(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 = icmp sge i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = add nsw i32 97, %8
%10 = sub nsw i32 %9, 10
%11 = load i32*, i32** %4
%12 = call i32 @fputc(i32 %10, i32* %11)
br label %18
13: ; preds = %2
%14 = load i32, i32* %3
%15 = add nsw i32 48, %14
%16 = load i32*, i32** %4
%17 = call i32 @fputc(i32 %15, i32* %16)
br label %18
18: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
define void @fputhex(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 9
%4 = select i1 %3, i32 87, i32 48
%5 = add nsw i32 %4, %0
%6 = tail call i32 @fputc(i32 %5, i32* %1)
ret void
}
int limit(int x, int min, int max) {
  if (x < min) {
    return min;
  }
  if (x > max) {
    return max;
  }
  return x;
}


x86 assembly (clang, -O0):
<limit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <limit+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <limit+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <limit+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <limit+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<limit>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @limit(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
void t7() {
  int array[1] = {0};
  unsigned char sudirript = 0;
  int val = array[sudirript];
}


x86 assembly (clang, -O0):
<t7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movb   $0x0,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    -0x4(%rbp,%rax,4),%eax
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t7() {
%1 = alloca [1 x i32]
%2 = alloca i8
%3 = alloca i32
%4 = bitcast [1 x i32]* %1 to i8*
store i8 0, i8* %2
%5 = load i8, i8* %2
%6 = zext i8 %5 to i64
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 %6
%8 = load i32, i32* %7
store i32 %8, i32* %3
ret void
}

LLVM IR (-O2):
define void @t7() {
ret void
}
void init3Bits(int bits[3], const int bit1, const int bit2, const int bit3) {
  bits[0] = bit1;
  bits[1] = bit2;
  bits[2] = bit3;
}


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

x86 assembly (clang, -O2):
<init3Bits>:
mov    %esi,(%rdi)
mov    %edx,0x4(%rdi)
mov    %ecx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @init3Bits(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* %6
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %7
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %8
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 2
store i32 %15, i32* %17
ret void
}

LLVM IR (-O2):
define void @init3Bits(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
store i32 %1, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %2, i32* %5
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %3, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void cbmarch_driver_close(int f) {
  if (f >= 0) {
    close(f);
  }
}


x86 assembly (clang, -O0):
<cbmarch_driver_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112d <cbmarch_driver_close+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_driver_close>:
test   %edi,%edi
js     1119 <cbmarch_driver_close+0x9>
jmp    1030 <close@plt>
ret

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

LLVM IR (-O2):
define void @cbmarch_driver_close(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
long g_free_library(long);
long sync_unload(long param1, long param2) { return g_free_library(param1); }


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

x86 assembly (clang, -O2):
<sync_unload>:
jmp    1030 <g_free_library@plt>

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

LLVM IR (-O2):
define i64 @sync_unload(i64 %0, i64 %1) {
%3 = tail call i64 @g_free_library(i64 %0)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ bennu_int_init();
int /*<<< orphan*/ bennu_obj_init();
int /*<<< orphan*/ bennu_setting_init();
void bennu_init(void) {
  bennu_obj_init();
  bennu_setting_init();
  bennu_int_init();
}


x86 assembly (clang, -O0):
<bennu_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <bennu_obj_init@plt>
mov    $0x0,%al
call   1030 <bennu_setting_init@plt>
mov    $0x0,%al
call   1040 <bennu_int_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bennu_init>:
push   %rax
xor    %eax,%eax
call   1050 <bennu_obj_init@plt>
xor    %eax,%eax
call   1030 <bennu_setting_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <bennu_int_init@plt>

LLVM IR (-O0):
define void @bennu_init() {
%1 = call i32 (...) @bennu_obj_init()
%2 = call i32 (...) @bennu_setting_init()
%3 = call i32 (...) @bennu_int_init()
ret void
}

LLVM IR (-O2):
define void @bennu_init() {
%1 = tail call i32 (...) @bennu_obj_init()
%2 = tail call i32 (...) @bennu_setting_init()
%3 = tail call i32 (...) @bennu_int_init()
ret void
}
void test_23_1(short *mem) { __atomic_fetch_add(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_23_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%ax
lock xadd %ax,(%rcx)
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_23_1(i16* nocapture %0) {
%2 = atomicrmw add i16* %0, i16 1 acq_rel
ret void
}