xunge/DecIR huggingface dataset:
/* Variables and functions */
char *heapalloc();
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stringassign(char *, char *, int);
int main() {
  char *s;
  s = heapalloc();
  printf("In main():\n\tBefore malloc string = [%s]\n", s);
  s = malloc(sizeof(char) * sizeof("Goodbye\0"));
  stringassign("Goodbye\0", s, sizeof("Goodbye\0"));
  printf("\tAfter malloc string = [%s]\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <heapalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x9,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec3(%rip),%rdi
mov    $0x9,%edx
call   1040 <stringassign@plt>
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <heapalloc@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x9,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xedb(%rip),%rdi
mov    %rax,%rsi
mov    $0x9,%edx
call   1040 <stringassign@plt>
lea    0xeaa(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"In main():\0A\09Before malloc string = [%s]\0A\00"
@.str.1 = [9 x i8] c"Goodbye\00\00"
@.str.2 = [29 x i8] c"\09After malloc string = [%s]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* (...) @heapalloc()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i8* @malloc(i32 9)
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @stringassign(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %7, i32 9)
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"In main():\0A\09Before malloc string = [%s]\0A\00"
@.str.1 = [9 x i8] c"Goodbye\00\00"
@.str.2 = [29 x i8] c"\09After malloc string = [%s]\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @heapalloc()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call dereferenceable_or_null(9) i8* @malloc(i32 9)
%4 = tail call i32 @stringassign(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %3, i32 9)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Type definitions */
struct FindjoB {
  int dummy;
};

/* Variables and functions */
int Findjob_set_prop_filter(struct FindjoB *, int, int, int /*<<< orphan*/);
int Findjob_set_xattr_filter(struct FindjoB *o, int value, int flag) {
  int ret;
  ret = Findjob_set_prop_filter(o, (flag & 1 ? 14 : 6), value, 0);
  return (ret);
}


x86 assembly (clang, -O0):
<Findjob_set_xattr_filter>:
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    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    $0x6,%esi
mov    $0xe,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
call   1030 <Findjob_set_prop_filter@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Findjob_set_xattr_filter>:
mov    %esi,%eax
and    $0x1,%edx
lea    0x6(,%rdx,8),%esi
mov    %eax,%edx
xor    %ecx,%ecx
jmp    1030 <Findjob_set_prop_filter@plt>

LLVM IR (-O0):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_xattr_filter(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = alloca %struct.FindjoB*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.FindjoB* %0, %struct.FindjoB** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.FindjoB*, %struct.FindjoB** %4
%9 = load i32, i32* %6
%10 = and i32 %9, 1
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 14, i32 6
%14 = load i32, i32* %5
%15 = call i32 @Findjob_set_prop_filter(%struct.FindjoB* %8, i32 %13, i32 %14, i32 0)
store i32 %15, i32* %7
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_xattr_filter(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = and i32 %2, 1
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 6, i32 14
%7 = tail call i32 @Findjob_set_prop_filter(%struct.FindjoB* %0, i32 %6, i32 %1, i32 0)
ret i32 %7
}
void av_cpb_properties_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_cpb_properties_alloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateRTCSSMatch0Set(unsigned long ulMatch) {
  (*((volatile unsigned long *)(0x400FC028))) = ulMatch << 16;
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateRTCSSMatch0Set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
shl    $0x10,%rcx
mov    $0x400fc028,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSSMatch0Set>:
shl    $0x10,%rdi
mov    %rdi,0x400fc028
40
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateRTCSSMatch0Set(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 16
store volatile i64 %4, i64* inttoptr (i64 1074774056 to i64*)
%5 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateRTCSSMatch0Set(i64 %0) {
%2 = shl i64 %0, 16
store volatile i64 %2, i64* inttoptr (i64 1074774056 to i64*)
%3 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freestring(void *data) { free(data); }


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

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

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

LLVM IR (-O2):
define void @freestring(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void *Function10Handle(void *a, void *b, void *c, void *d, void *e, void *f,
                       void *g, void *h, void *i, void *j) {
  return a;
}


x86 assembly (clang, -O0):
<Function10Handle>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @Function10Handle(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9) {
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i8*
store i8* %0, i8** %11
store i8* %1, i8** %12
store i8* %2, i8** %13
store i8* %3, i8** %14
store i8* %4, i8** %15
store i8* %5, i8** %16
store i8* %6, i8** %17
store i8* %7, i8** %18
store i8* %8, i8** %19
store i8* %9, i8** %20
%21 = load i8*, i8** %11
ret i8* %21
}

LLVM IR (-O2):
define i8* @Function10Handle(i8* readnone returned %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7, i8* nocapture readnone %8, i8* nocapture readnone %9) {
ret i8* %0
}
/* Variables and functions */
int do_push(int);
int getchar();
int icall_getchar() {
  int ret;
  ret = do_push(getchar() & 0x00ff);
  if (ret < 0)
    return ret;
  return 0;
}


x86 assembly (clang, -O0):
<icall_getchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,%edi
and    $0xff,%edi
call   1030 <do_push@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1154 <icall_getchar+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <icall_getchar+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icall_getchar>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
movzbl %al,%edi
call   1030 <do_push@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @icall_getchar() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getchar()
%4 = and i32 %3, 255
%5 = call i32 @do_push(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load i32, i32* %2
store i32 %9, i32* %1
br label %11
10: ; preds = %0
store i32 0, i32* %1
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @icall_getchar() {
%1 = tail call i32 (...) @getchar()
%2 = and i32 %1, 255
%3 = tail call i32 @do_push(i32 %2)
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
/* Variables and functions */
int strcmp(char *, char *);
int stringsort(const void *a, const void *b) {
  return strcmp(*(char **)a, *(char **)b);
}


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

x86 assembly (clang, -O2):
<stringsort>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @stringsort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void g_queue_peek_nth() {}


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

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

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

LLVM IR (-O2):
define void @g_queue_peek_nth() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int plugin_open_rig(char *config) {
  printf("Test plugin opened.\n");
  return 1;
}


x86 assembly (clang, -O0):
<plugin_open_rig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"Test plugin opened.\0A\00"
define i32 @plugin_open_rig(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Test plugin opened.\00"
define i32 @plugin_open_rig(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int cmpfunc(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

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

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
void greatest_usage(const char *name) {
  fprintf(stdout,
          "Usage: %s [-hlv] [-s SUITE] [-t TEST]\n"
          "  -h        print this Help\n"
          "  -l        List suites and their tests, then exit\n"
          "  -v        Verbose output\n"
          "  -s SUITE  only run suite named SUITE\n"
          "  -t TEST   only run test named TEST\n",
          name);
}


x86 assembly (clang, -O0):
<greatest_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greatest_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [221 x i8] c"Usage: %s [-hlv] [-s SUITE] [-t TEST]\0A -h print this Help\0A -l List suites and their tests, then exit\0A -v Verbose output\0A -s SUITE only run suite named SUITE\0A -t TEST only run test named TEST\0A\00"
define void @greatest_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [221 x i8] c"Usage: %s [-hlv] [-s SUITE] [-t TEST]\0A -h print this Help\0A -l List suites and their tests, then exit\0A -v Verbose output\0A -s SUITE only run suite named SUITE\0A -t TEST only run test named TEST\0A\00"
define void @greatest_usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void mp2vseqx_set_horizontal(uint8_t *p_mp2vseqx, uint8_t i_horizontal) {
  p_mp2vseqx[5] &= 0xfe;
  p_mp2vseqx[5] |= (i_horizontal >> 1) & 0x1;
  p_mp2vseqx[6] &= 0x7f;
  p_mp2vseqx[6] |= (i_horizontal << 7) & 0x80;
}


x86 assembly (clang, -O0):
<mp2vseqx_set_horizontal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
and    $0xfe,%ecx
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x1,%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
or     0x14(%rax),%ecx
mov    %ecx,0x14(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
and    $0x7f,%ecx
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x7,%ecx
and    $0x80,%ecx
mov    -0x8(%rbp),%rax
or     0x18(%rax),%ecx
mov    %ecx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_set_horizontal>:
mov    $0xfe,%eax
and    0x14(%rdi),%eax
mov    %esi,%ecx
shr    %ecx
and    $0x1,%ecx
or     %eax,%ecx
mov    %ecx,0x14(%rdi)
mov    0x18(%rdi),%eax
and    $0x7f,%eax
shl    $0x7,%esi
movzbl %sil,%ecx
or     %eax,%ecx
mov    %ecx,0x18(%rdi)
ret

LLVM IR (-O0):
define void @mp2vseqx_set_horizontal(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 = getelementptr inbounds i32, i32* %5, i64 5
%7 = load i32, i32* %6
%8 = and i32 %7, 254
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = ashr i32 %9, 1
%11 = and i32 %10, 1
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 5
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 6
%18 = load i32, i32* %17
%19 = and i32 %18, 127
store i32 %19, i32* %17
%20 = load i32, i32* %4
%21 = shl i32 %20, 7
%22 = and i32 %21, 128
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 6
%25 = load i32, i32* %24
%26 = or i32 %25, %22
store i32 %26, i32* %24
ret void
}

LLVM IR (-O2):
define void @mp2vseqx_set_horizontal(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 5
%4 = load i32, i32* %3
%5 = and i32 %4, 254
%6 = lshr i32 %1, 1
%7 = and i32 %6, 1
%8 = or i32 %5, %7
store i32 %8, i32* %3
%9 = getelementptr inbounds i32, i32* %0, i64 6
%10 = load i32, i32* %9
%11 = and i32 %10, 127
%12 = shl i32 %1, 7
%13 = and i32 %12, 128
%14 = or i32 %11, %13
store i32 %14, i32* %9
ret void
}
void pll_setup_uart(void) {}


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

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

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

LLVM IR (-O2):
define void @pll_setup_uart() {
ret void
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_wpa_ieee8021x(int akm) {
  return akm == BIT(0) || akm == BIT(5) || akm == BIT(7);
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1179 <wpa_key_mgmt_wpa_ieee8021x+0x69>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1179 <wpa_key_mgmt_wpa_ieee8021x+0x69>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <BIT@plt>
mov    $0x1,%ebp
cmp    %ebx,%eax
je     1145 <wpa_key_mgmt_wpa_ieee8021x+0x35>
mov    $0x5,%edi
call   1030 <BIT@plt>
cmp    %ebx,%eax
je     1145 <wpa_key_mgmt_wpa_ieee8021x+0x35>
mov    $0x7,%edi
call   1030 <BIT@plt>
xor    %ebp,%ebp
cmp    %ebx,%eax
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 0)
%5 = icmp eq i32 %3, %4
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @BIT(i32 5)
%9 = icmp eq i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @BIT(i32 7)
%13 = icmp eq i32 %11, %12
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = tail call i32 @BIT(i32 0)
%3 = icmp eq i32 %2, %0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @BIT(i32 5)
%6 = icmp eq i32 %5, %0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @BIT(i32 7)
%9 = icmp eq i32 %8, %0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %7 ]
ret i32 %12
}
int sfx_is_enabled() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sfx_is_enabled() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int is_g_NULL(int x) {
  fprintf(stderr, "\n! Internal Err A !\n\n");
  return 0;
}


x86 assembly (clang, -O0):
<is_g_NULL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_g_NULL>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"\0A! Internal Err A !\0A\0A\00"
define i32 @is_g_NULL(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"\0A! Internal Err A !\0A\0A\00"
define i32 @is_g_NULL(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ console_tx_hex32(unsigned int);
void print_emerg_hex32(unsigned int value) { console_tx_hex32(value); }


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

x86 assembly (clang, -O2):
<print_emerg_hex32>:
jmp    1030 <console_tx_hex32@plt>

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

LLVM IR (-O2):
define void @print_emerg_hex32(i32 %0) {
%2 = tail call i32 @console_tx_hex32(i32 %0)
ret void
}
/* Variables and functions */
int log(double);
double f1(double x) { return log(4) * 2 * log(x); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
call   1030 <log@plt>
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  0xedd(%rip),%xmm0
call   1030 <log@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1030 <log@plt>
imul   %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @f1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @log(double 4.000000e+00)
%4 = mul nsw i32 %3, 2
%5 = load double, double* %2
%6 = call i32 @log(double %5)
%7 = mul nsw i32 %4, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @f1(double %0) {
%2 = tail call i32 @log(double 4.000000e+00)
%3 = shl nsw i32 %2, 1
%4 = tail call i32 @log(double %0)
%5 = mul nsw i32 %3, %4
%6 = sitofp i32 %5 to double
ret double %6
}
int soru_5(int dizi[], int N) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @soru_5(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
__attribute__((always_)) void pgdat_resize_init(struct pglist_data *pgdat) {}


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

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

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

LLVM IR (-O2):
%struct.pglist_data = type opaque
define void @pgdat_resize_init(%struct.pglist_data* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UnsafePrint(char const *, int);
void RarelySafePrint(const char *string, int integer) {
  UnsafePrint(string, integer);
}


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

x86 assembly (clang, -O2):
<RarelySafePrint>:
jmp    1030 <UnsafePrint@plt>

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

LLVM IR (-O2):
define void @RarelySafePrint(i8* %0, i32 %1) {
%3 = tail call i32 @UnsafePrint(i8* %0, i32 %1)
ret void
}
float delta(float a, float b, float c) { return b * b - 4 * a * c; }


x86 assembly (clang, -O0):
<delta>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  0xedb(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta>:
mulss  0xef8(%rip),%xmm0
mulss  %xmm2,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @delta(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* %5
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fmul float 4.000000e+00, %9
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = fneg float %12
%14 = call float @llvm.fmuladd.f32(float %7, float %8, float %13)
ret float %14
}

LLVM IR (-O2):
define float @delta(float %0, float %1, float %2) {
%4 = fmul float %0, -4.000000e+00
%5 = fmul float %4, %2
%6 = tail call float @llvm.fmuladd.f32(float %1, float %1, float %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ shell();
int main(int argc, char **argv) {
  init();
  shell();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init@plt>
mov    $0x0,%al
call   1040 <shell@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @shell()
ret i32 0
}
int execute_lremovexattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_lremovexattr() {
ret i32 0
}
/* Variables and functions */
void *opus_alloc(size_t);
void *opus_alloc_scratch(size_t size) { return opus_alloc(size); }


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

x86 assembly (clang, -O2):
<opus_alloc_scratch>:
jmp    1030 <opus_alloc@plt>

LLVM IR (-O0):
define i8* @opus_alloc_scratch(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @opus_alloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @opus_alloc_scratch(i64 %0) {
%2 = tail call i8* @opus_alloc(i64 %0)
ret i8* %2
}
double geocentric_latitude(double b) { return -b; }


x86 assembly (clang, -O0):
<geocentric_latitude>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geocentric_latitude>:
xorps  0xef9(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @geocentric_latitude(double %0) {
%2 = fneg double %0
ret double %2
}
/* Variables and functions */
scalar_t__ digit(char);
scalar_t__ letter(char);
bool alnum(char c) { return letter(c) || digit(c); }


x86 assembly (clang, -O0):
<alnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <letter@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <alnum+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <digit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @alnum(i8 signext %0) {
%2 = tail call i64 @letter(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @digit(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ delwin(int /*<<< orphan*/ *);
int /*<<< orphan*/ wborder(int /*<<< orphan*/ *, char, char, char, char, char,
                           char, char, char);
int /*<<< orphan*/ wclear(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void destroy_win(WINDOW *local_win) {
  wborder(local_win, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ');
  wclear(local_win);
  wrefresh(local_win);
  delwin(local_win);
}


x86 assembly (clang, -O0):
<destroy_win>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x20,(%rsp)
movl   $0x20,0x8(%rsp)
movl   $0x20,0x10(%rsp)
call   1030 <wborder@plt>
mov    -0x8(%rbp),%rdi
call   1060 <wclear@plt>
mov    -0x8(%rbp),%rdi
call   1040 <wrefresh@plt>
mov    -0x8(%rbp),%rdi
call   1050 <delwin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_win>:
push   %rbx
mov    %rdi,%rbx
sub    $0x8,%rsp
mov    $0x20,%esi
mov    $0x20,%edx
mov    $0x20,%ecx
mov    $0x20,%r8d
mov    $0x20,%r9d
push   $0x20
push   $0x20
push   $0x20
call   1030 <wborder@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1060 <wclear@plt>
mov    %rbx,%rdi
call   1040 <wrefresh@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <delwin@plt>

LLVM IR (-O0):
define void @destroy_win(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @wborder(i32* %3, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32)
%5 = load i32*, i32** %2
%6 = call i32 @wclear(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @wrefresh(i32* %7)
%9 = load i32*, i32** %2
%10 = call i32 @delwin(i32* %9)
ret void
}

LLVM IR (-O2):
define void @destroy_win(i32* %0) {
%2 = tail call i32 @wborder(i32* %0, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32, i8 signext 32)
%3 = tail call i32 @wclear(i32* %0)
%4 = tail call i32 @wrefresh(i32* %0)
%5 = tail call i32 @delwin(i32* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
unsigned int mget2l(const uint8_t *data) {
  return data[0] | (data[1] * 0x0100);
}


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

x86 assembly (clang, -O2):
<mget2l>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mget2l(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 256
%10 = or i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @mget2l(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl nsw i32 %4, 8
%6 = or i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int rand();
int get_rand(int ub) { return rand() % ub; }


x86 assembly (clang, -O0):
<get_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_rand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_rand(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ *jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int reset_jmpbuf(jmp_buf buf, jmp_buf backup) {
  printf("CAUGHT!\n");
  *buf = *backup;
  return 1;
}


x86 assembly (clang, -O0):
<reset_jmpbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_jmpbuf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%eax
mov    %eax,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@str = [8 x i8] c"CAUGHT!\00"
define i32 @reset_jmpbuf(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* %1
store i32 %4, i32* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void err_sys(const char *x) {
  fflush(stderr);
  perror(x);
  exit(1);
}


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

x86 assembly (clang, -O2):
<err_sys>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
define void @err_sys(i8* nocapture %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @perror(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *malloc(int);
extern char *ReturnByte() {
  char *i = malloc(sizeof(char));
  *i = -103;
  return i;
}


x86 assembly (clang, -O0):
<ReturnByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x99,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnByte>:
push   %rax
mov    $0x1,%edi
call   1030 <malloc@plt>
movb   $0x99,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ReturnByte() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
store i8 -103, i8* %3
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @ReturnByte() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
store i8 -103, i8* %1
ret i8* %1
}
/* Variables and functions */
scalar_t__ omp_target_alloc(int, int);
int /*<<< orphan*/ omp_target_free(char *, int);
int /*<<< orphan*/ printf(char *, char *);
void validCode() {
  int arr[20] = {0};
#pragma omp parallel for
  for (int i = 0; i < 20; ++i) {
    arr[i] = i * i;
  }
  char *pChars = (char *)omp_target_alloc(4, 1);
  printf("pChars: %p", pChars);
  omp_target_free(pChars, 1);
}


x86 assembly (clang, -O0):
<validCode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x14,-0x54(%rbp)
jge    1186 <validCode+0x46>
mov    -0x54(%rbp),%ecx
imul   -0x54(%rbp),%ecx
movslq -0x54(%rbp),%rax
mov    %ecx,-0x50(%rbp,%rax,4)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    115f <validCode+0x1f>
mov    $0x4,%edi
mov    $0x1,%esi
call   1060 <omp_target_alloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rsi
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1030 <omp_target_free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validCode>:
push   %rbx
mov    $0x4,%edi
mov    $0x1,%esi
call   1050 <omp_target_alloc@plt>
mov    %rax,%rbx
lea    0xeb6(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <omp_target_free@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"pChars: %p\00"
define void @validCode() {
%1 = alloca [20 x i32]
%2 = alloca i32
%3 = alloca i8*
%4 = bitcast [20 x i32]* %1 to i8*
store i32 0, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 20
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %13
store i32 %11, i32* %14
br label %15
15: ; preds = %8
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %5
%19 = call i64 @omp_target_alloc(i32 4, i32 1)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %3
%21 = load i8*, i8** %3
%22 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = load i8*, i8** %3
%24 = call i32 @omp_target_free(i8* %23, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"pChars: %p\00"
define void @validCode() {
%1 = tail call i64 @omp_target_alloc(i32 4, i32 1)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @omp_target_free(i8* %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_cmp();
void e_cmp_abs() {
  e_abs();
  e_cmp();
}


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

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

LLVM IR (-O0):
define void @e_cmp_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_cmp()
ret void
}

LLVM IR (-O2):
define void @e_cmp_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_cmp()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ paren(int /*<<< orphan*/, int, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  paren(0, n, 0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <paren@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
xor    %edi,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <paren@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @paren(i32 0, i32 %4, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @paren(i32 0, i32 %4, i32 0, i32 0)
ret i32 0
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ spriteheight(int);
void basSpriteHeight() {
  int n;
  n = popNumber();
  pushNumber(spriteheight(n));
}


x86 assembly (clang, -O0):
<basSpriteHeight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <spriteheight@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basSpriteHeight>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <spriteheight@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basSpriteHeight() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @spriteheight(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basSpriteHeight() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @spriteheight(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
void g_ascii_strdown() {}


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

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

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

LLVM IR (-O2):
define void @g_ascii_strdown() {
ret void
}
/* Type definitions */
typedef int uint64_t;
struct timeval {
  int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t spy_current_time_usec() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (uint64_t)tv.tv_sec * 1000 * 1000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<spy_current_time_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,%eax,%eax
imul   $0x3e8,%eax,%eax
add    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spy_current_time_usec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i32 @spy_current_time_usec() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i32 @spy_current_time_usec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage() {
  puts("Usage: piparactl <value>");
  puts("  value ... A hexadecimal value for 8-bit parallel output.");
  puts("            ex. e5");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf24(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: piparactl <value>\00"
@.str.1 = [59 x i8] c" value ... A hexadecimal value for 8-bit parallel output.\00"
@.str.2 = [19 x i8] c" ex. e5\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: piparactl <value>\00"
@.str.1 = [59 x i8] c" value ... A hexadecimal value for 8-bit parallel output.\00"
@.str.2 = [19 x i8] c" ex. e5\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}