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

/* Variables and functions */
int /*<<< orphan*/ utest_test(struct utest *, int, char *, char *, int);
void ut_testNul(struct utest *utest, struct ndiff *dif) {
  utest_test(
      utest, (dif != 0), "dif != 0",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c",
      1042);
}


x86 assembly (clang, -O0):
<ut_testNul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xec8(%rip),%rdx
lea    0xeca(%rip),%rcx
mov    $0x412,%r8d
call   1030 <utest_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ut_testNul>:
xor    %eax,%eax
test   %rsi,%rsi
setne  %al
lea    0xee1(%rip),%rdx
lea    0xee3(%rip),%rcx
mov    %eax,%esi
mov    $0x412,%r8d
jmp    1030 <utest_test@plt>

LLVM IR (-O0):
%struct.utest = type { i32 }
%struct.ndiff = type { i32 }
@.str = [9 x i8] c"dif != 0\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c\00"
define void @ut_testNul(%struct.utest* %0, %struct.ndiff* %1) {
%3 = alloca %struct.utest*
%4 = alloca %struct.ndiff*
store %struct.utest* %0, %struct.utest** %3
store %struct.ndiff* %1, %struct.ndiff** %4
%5 = load %struct.utest*, %struct.utest** %3
%6 = load %struct.ndiff*, %struct.ndiff** %4
%7 = icmp ne %struct.ndiff* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @utest_test(%struct.utest* %5, i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 1042)
ret void
}

LLVM IR (-O2):
%struct.utest = type { i32 }
%struct.ndiff = type { i32 }
@.str = [9 x i8] c"dif != 0\00"
@.str.1 = [134 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jbakosi/ndiff/refs/heads/master/src/ndiff.c\00"
define void @ut_testNul(%struct.utest* %0, %struct.ndiff* readnone %1) {
%3 = icmp ne %struct.ndiff* %1, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @utest_test(%struct.utest* %0, i32 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0), i32 1042)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_unique_function_name(int);
int myfunction(int /*<<< orphan*/);
int myfunction2(int);
int main(void) {
  int i, j;
  for (i = 0, j = 0; i < 1000; ++i)
    j += myfunction(0);
  my_unique_function_name(j);
  return myfunction2(j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jge    1175 <main+0x45>
xor    %edi,%edi
call   1050 <myfunction@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <main+0x1d>
mov    -0xc(%rbp),%edi
call   1030 <my_unique_function_name@plt>
mov    -0xc(%rbp),%edi
call   1040 <myfunction2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    $0x3e8,%ebp
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1050 <myfunction@plt>
add    %eax,%ebx
add    $0xffffffff,%ebp
jne    1140 <main+0x10>
mov    %ebx,%edi
call   1030 <my_unique_function_name@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <myfunction2@plt>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = phi i32 [ 0, %0 ], [ %6, %1 ]
%4 = tail call i32 @myfunction(i32 0)
%5 = add nsw i32 %4, %2
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 1000
br i1 %7, label %8, label %1
8: ; preds = %1
%9 = tail call i32 @my_unique_function_name(i32 %5)
%10 = tail call i32 @myfunction2(i32 %5)
ret i32 %10
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int);
void make_data(int *data, int len, int seed) {
  int k;
  srand(seed * 3333333 + 14756123);
  for (k = 0; k < len; k++)
    data[k] = rand();
}


x86 assembly (clang, -O0):
<make_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
imul   $0x32dcd5,-0x10(%rbp),%edi
add    $0xe1291b,%edi
call   1030 <srand@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1179 <make_data+0x59>
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <make_data+0x2b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_data>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
imul   $0x32dcd5,%edx,%edi
add    $0xe1291b,%edi
call   1030 <srand@plt>
test   %ebp,%ebp
jle    1164 <make_data+0x44>
mov    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <rand@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <make_data+0x30>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @make_data(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = mul nsw i32 %8, 3333333
%10 = add nsw i32 %9, 14756123
%11 = call i32 @srand(i32 %10)
store i32 0, i32* %7
br label %12
12: ; preds = %22, %3
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = call i32 (...) @rand()
%18 = load i32*, i32** %4
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
br label %22
22: ; preds = %16
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %12
25: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @make_data(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, 3333333
%5 = add nsw i32 %4, 14756123
%6 = tail call i32 @srand(i32 %5)
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %16
8: ; preds = %3
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %14, %10 ]
%12 = tail call i32 (...) @rand()
%13 = getelementptr inbounds i32, i32* %0, i64 %11
store i32 %12, i32* %13
%14 = add nuw nsw i64 %11, 1
%15 = icmp eq i64 %14, %9
br i1 %15, label %16, label %10
16: ; preds = %10, %3
ret void
}
double sqrt(double x) {
  return ({
    extern __typeof__(sqrt) module_libc_sqrt;
    &module_libc_sqrt;
  })(x);
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  -0x8(%rbp),%xmm0
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
jmp    1030 <module_libc_sqrt@plt>

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

LLVM IR (-O2):
define double @sqrt(double %0) {
%2 = tail call double @module_libc_sqrt(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printstring(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void printdecimald0(int d0) {
  char temp[12];
  sprintf(temp, "%d", d0);
  printstring(temp);
}


x86 assembly (clang, -O0):
<printdecimald0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x10(%rbp),%rdi
call   1030 <printstring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printdecimald0>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <printstring@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @printdecimald0(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%8 = call i32 @printstring(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printdecimald0(i32 %0) {
%2 = alloca [12 x i8]
%3 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @printstring(i8* %3)
ret void
}
/* Type definitions */
struct Scsi_Host {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ usb_storage_proc_info(char *, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int, int, int);
int usb_storage_info(int i, struct Scsi_Host *myhostptr) {
  char *buffer;
  int hostno = 40;
  usb_storage_proc_info(buffer, 0, 0, 100, 40, -1);
}


x86 assembly (clang, -O0):
<usb_storage_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x28,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
xor    %edx,%edx
mov    $0x64,%ecx
mov    $0x28,%r8d
mov    $0xffffffff,%r9d
mov    %edx,%esi
call   1030 <usb_storage_proc_info@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_storage_info>:
xor    %esi,%esi
xor    %edx,%edx
mov    $0x64,%ecx
mov    $0x28,%r8d
mov    $0xffffffff,%r9d
jmp    1030 <usb_storage_proc_info@plt>

LLVM IR (-O0):
%struct.Scsi_Host = type { i32 }
define i32 @usb_storage_info(i32 %0, %struct.Scsi_Host* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.Scsi_Host*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.Scsi_Host* %1, %struct.Scsi_Host** %5
store i32 40, i32* %7
%8 = load i8*, i8** %6
%9 = call i32 @usb_storage_proc_info(i8* %8, i32 0, i32 0, i32 100, i32 40, i32 -1)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.Scsi_Host = type { i32 }
define i32 @usb_storage_info(i32 %0, %struct.Scsi_Host* nocapture readnone %1) {
%3 = tail call i32 @usb_storage_proc_info(i8* undef, i32 0, i32 0, i32 100, i32 40, i32 -1)
ret i32 undef
}
/* Variables and functions */
double pow(double, int);
double mil_to_mm(double mil, int exponent) {
  return mil * pow(0.0254, exponent);
}


x86 assembly (clang, -O0):
<mil_to_mm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
movsd  0xecb(%rip),%xmm0
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mil_to_mm>:
push   %rax
movsd  %xmm0,(%rsp)
movsd  0xee2(%rip),%xmm0
call   1030 <pow@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mil_to_mm(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = call double @pow(double 2.540000e-02, i32 %6)
%8 = fmul double %5, %7
ret double %8
}

LLVM IR (-O2):
define double @mil_to_mm(double %0, i32 %1) {
%3 = tail call double @pow(double 2.540000e-02, i32 %1)
%4 = fmul double %3, %0
ret double %4
}
void r8a7779_init_pm_domains(void) {}


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

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

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

LLVM IR (-O2):
define void @r8a7779_init_pm_domains() {
ret void
}
/* Type definitions */
struct KRNode {
  int dummy;
};
struct KRList {
  int dummy;
};

/* Variables and functions */
struct KRNode *getNode(struct KRList *, int);
struct KRNode *nth(struct KRList *list, int index) {
  return getNode(list, index);
}


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

x86 assembly (clang, -O2):
<nth>:
jmp    1030 <getNode@plt>

LLVM IR (-O0):
%struct.KRNode = type { i32 }
%struct.KRList = type { i32 }
define %struct.KRNode* @nth(%struct.KRList* %0, i32 %1) {
%3 = alloca %struct.KRList*
%4 = alloca i32
store %struct.KRList* %0, %struct.KRList** %3
store i32 %1, i32* %4
%5 = load %struct.KRList*, %struct.KRList** %3
%6 = load i32, i32* %4
%7 = call %struct.KRNode* @getNode(%struct.KRList* %5, i32 %6)
ret %struct.KRNode* %7
}

LLVM IR (-O2):
%struct.KRNode = type { i32 }
%struct.KRList = type { i32 }
define %struct.KRNode* @nth(%struct.KRList* %0, i32 %1) {
%3 = tail call %struct.KRNode* @getNode(%struct.KRList* %0, i32 %1)
ret %struct.KRNode* %3
}
void ReclaimGarbage() {}


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

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

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

LLVM IR (-O2):
define void @ReclaimGarbage() {
ret void
}
/* Type definitions */
struct string {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct string *);
void string_delete(struct string *str) { free(str); }


x86 assembly (clang, -O0):
<string_delete>:
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):
<string_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.string = type { i32 }
define void @string_delete(%struct.string* nocapture %0) {
%2 = tail call i32 @free(%struct.string* %0)
ret void
}
int muxingAudioVideo() {}


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

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

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

LLVM IR (-O2):
define i32 @muxingAudioVideo() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *p = strdup(s);
  if (p == NULL)
    err(1, "strdup");
  return p;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <xstrdup+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xstrdup+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"strdup\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printit(int *x) { printf("printme(%i)\n", *x); }


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

x86 assembly (clang, -O2):
<printit>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"printme(%i)\0A\00"
define void @printit(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"printme(%i)\0A\00"
define void @printit(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
void Change(int *a, int *b) {
  const int c = *a;
  *a = *b;
  *b = c;
}


x86 assembly (clang, -O0):
<Change>:
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):
<Change>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @Change(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 @Change(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
}
int mDNSIsFileAndPrintSharingEnabled(int *ignored) {
  (void)ignored;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @mDNSIsFileAndPrintSharingEnabled(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int *malloc(size_t);
int /*<<< orphan*/ memcpy(int *, int const *, size_t);
int *zidup(int const *src, size_t len) {
  int *p = malloc(len * sizeof(int));
  memcpy(p, src, len * sizeof(int));
  return p;
}


x86 assembly (clang, -O0):
<zidup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
shl    $0x2,%rdx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zidup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0x0(,%rsi,4),%r15
mov    %r15,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @zidup(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 %6, 4
%8 = call i32* @malloc(i64 %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = load i32*, i32** %3
%11 = load i64, i64* %4
%12 = mul i64 %11, 4
%13 = call i32 @memcpy(i32* %9, i32* %10, i64 %12)
%14 = load i32*, i32** %5
ret i32* %14
}

LLVM IR (-O2):
define i32* @zidup(i32* %0, i64 %1) {
%3 = shl i64 %1, 2
%4 = tail call i32* @malloc(i64 %3)
%5 = tail call i32 @memcpy(i32* %4, i32* %0, i64 %3)
ret i32* %4
}
double f4_cb_send_pre_int_int_int_int_long(double (*cb)(int, int, int, int,
                                                        long)) {
  long r = 33;
  return cb(8, 9, 10, 11, r) + 1.0;
}


x86 assembly (clang, -O0):
<f4_cb_send_pre_int_int_int_int_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x21,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%r8
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0xa,%edx
mov    $0xb,%ecx
call   *%rax
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4_cb_send_pre_int_int_int_int_long>:
push   %rax
mov    %rdi,%rax
mov    $0x21,%r8d
mov    $0x8,%edi
mov    $0x9,%esi
mov    $0xa,%edx
mov    $0xb,%ecx
call   *%rax
addsd  0xed8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f4_cb_send_pre_int_int_int_int_long(double (i32, i32, i32, i32, i64)* %0) {
%2 = alloca double (i32, i32, i32, i32, i64)*
%3 = alloca i64
store double (i32, i32, i32, i32, i64)* %0, double (i32, i32, i32, i32, i64)** %2
store i64 33, i64* %3
%4 = load double (i32, i32, i32, i32, i64)*, double (i32, i32, i32, i32, i64)** %2
%5 = load i64, i64* %3
%6 = call double %4(i32 8, i32 9, i32 10, i32 11, i64 %5)
%7 = fadd double %6, 1.000000e+00
ret double %7
}

LLVM IR (-O2):
define double @f4_cb_send_pre_int_int_int_int_long(double (i32, i32, i32, i32, i64)* nocapture %0) {
%2 = tail call double %0(i32 8, i32 9, i32 10, i32 11, i64 33)
%3 = fadd double %2, 1.000000e+00
ret double %3
}
int ansi_color_to_ncurses(int nr) {
  switch (nr) {
  case 0:
    return 1;
  case 1:
    return 4;
  case 2:
    return 3;
  case 3:
    return 8;
  case 4:
    return 2;
  case 5:
    return 12;
  case 6:
    return 11;
  case 7:
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ansi_color_to_ncurses>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x7,%rax
ja     118c <ansi_color_to_ncurses+0x8c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0x4,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0x3,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0x8,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0x2,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0xc,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0xb,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0x0,-0x4(%rbp)
jmp    1193 <ansi_color_to_ncurses+0x93>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ansi_color_to_ncurses>:
mov    $0xffffffff,%eax
cmp    $0x7,%edi
ja     1117 <ansi_color_to_ncurses+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @ansi_color_to_ncurses(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 6, label %11
i32 7, label %12
]
5: ; preds = %1
store i32 1, i32* %2
br label %14
6: ; preds = %1
store i32 4, i32* %2
br label %14
7: ; preds = %1
store i32 3, i32* %2
br label %14
8: ; preds = %1
store i32 8, i32* %2
br label %14
9: ; preds = %1
store i32 2, i32* %2
br label %14
10: ; preds = %1
store i32 12, i32* %2
br label %14
11: ; preds = %1
store i32 11, i32* %2
br label %14
12: ; preds = %1
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@switch.table.ansi_color_to_ncurses = [8 x i32] [i32 1, i32 4, i32 3, i32 8, i32 2, i32 12, i32 11, i32 0]
define i32 @ansi_color_to_ncurses(i32 %0) {
%2 = icmp ult i32 %0, 8
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [8 x i32], [8 x i32]* @switch.table.ansi_color_to_ncurses, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
unsigned long long zig_zag_fixll(long long inp) {
  return (
      (((unsigned long long)(inp) >> ((sizeof(unsigned long long) << 3) - 1))
           ? ((~(unsigned long long)(inp)) << 1)
           : ((unsigned long long)(inp) << 1)) ^
      ((unsigned long long)(inp) >> ((sizeof(unsigned long long) << 3) - 1)));
}


x86 assembly (clang, -O0):
<zig_zag_fixll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x3f,%rax
cmp    $0x0,%rax
je     112f <zig_zag_fixll+0x2f>
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113b <zig_zag_fixll+0x3b>
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x3f,%rcx
xor    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zig_zag_fixll>:
mov    %rdi,%rax
sar    $0x3f,%rax
xor    %rdi,%rax
shld   $0x1,%rdi,%rax
ret

LLVM IR (-O0):
define i64 @zig_zag_fixll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 63
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i64, i64* %2
%8 = xor i64 %7, -1
%9 = shl i64 %8, 1
br label %13
10: ; preds = %1
%11 = load i64, i64* %2
%12 = shl i64 %11, 1
br label %13
13: ; preds = %10, %6
%14 = phi i64 [ %9, %6 ], [ %12, %10 ]
%15 = load i64, i64* %2
%16 = lshr i64 %15, 63
%17 = xor i64 %14, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @zig_zag_fixll(i64 %0) {
%2 = ashr i64 %0, 63
%3 = xor i64 %2, %0
%4 = tail call i64 @llvm.fshl.i64(i64 %3, i64 %0, i64 1)
ret i64 %4
}
void fa119(int n) {
a : {
  int b[n];
  {
    int c[n];
    0;
  }
  {
    int d[n];
    0;
  };
  int e[n];
  0;
};
  goto a;
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa119>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
jmp    110e <fa119+0xe>

x86 assembly (clang, -O2):
<fa119>:
jmp    1100 <fa119>

LLVM IR (-O0):
define void @fa119(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
br label %19
19: ; preds = %19, %1
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %3
%23 = alloca i32, i64 %21
store i64 %21, i64* %4
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %5
%27 = alloca i32, i64 %25
store i64 %25, i64* %6
%28 = load i8*, i8** %5
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
%36 = alloca i32, i64 %35
store i64 %35, i64* %9
%37 = load i8*, i8** %3
br label %19
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %10
%42 = alloca i32, i64 %40
store i64 %40, i64* %11
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = call i8* @llvm.stacksave()
store i8* %45, i8** %12
%46 = alloca i32, i64 %44
store i64 %44, i64* %13
%47 = load i8*, i8** %12
%48 = load i32, i32* %2
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %14
%51 = alloca i32, i64 %49
store i64 %49, i64* %15
%52 = load i8*, i8** %14
%53 = load i32, i32* %2
%54 = zext i32 %53 to i64
%55 = alloca i32, i64 %54
store i64 %54, i64* %16
%56 = load i8*, i8** %10
%57 = load i32, i32* %2
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %17
%60 = alloca i32, i64 %58
store i64 %58, i64* %18
%61 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa119(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x;
  int y;
  if (!(x == y && y == 0))
    return 0;
  while (1) {
    x++;
    y++;
    assert(x == y && x >= 0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1135 <main+0x25>
cmpl   $0x0,-0xc(%rbp)
je     113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1142 <main+0x32>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jne    116f <main+0x5f>
cmpl   $0x0,-0x8(%rbp)
setge  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    1142 <main+0x32>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7, %0
ret i32 0
11: ; preds = %7
br label %12
12: ; preds = %11, %23
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %12
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 0
br label %23
23: ; preds = %20, %12
%24 = phi i1 [ false, %12 ], [ %22, %20 ]
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
br label %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ acc_device_t;

/* Variables and functions */
int /*<<< orphan*/ acc_device_host;
int /*<<< orphan*/ acc_init(int /*<<< orphan*/);
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int main(int argc, char **argv) {
  acc_device_t devtype = acc_device_host;
  acc_init(devtype);
  acc_shutdown(devtype);
  acc_shutdown(devtype);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <acc_init@plt>
mov    -0x14(%rbp),%edi
call   1030 <acc_shutdown@plt>
mov    -0x14(%rbp),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1040 <acc_init@plt>
mov    %ebx,%edi
call   1030 <acc_shutdown@plt>
mov    %ebx,%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@acc_device_host = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @acc_device_host
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @acc_init(i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @acc_shutdown(i32 %10)
%12 = load i32, i32* %6
%13 = call i32 @acc_shutdown(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@acc_device_host = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @acc_device_host
%4 = tail call i32 @acc_init(i32 %3)
%5 = tail call i32 @acc_shutdown(i32 %3)
%6 = tail call i32 @acc_shutdown(i32 %3)
ret i32 0
}
/* Type definitions */
struct aom_write_bit_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ aom_wb_write_literal(struct aom_write_bit_buffer *, int,
                                        int);
void aom_wb_write_inv_signed_literal(struct aom_write_bit_buffer *wb, int data,
                                     int bits) {
  aom_wb_write_literal(wb, data, bits + 1);
}


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

x86 assembly (clang, -O2):
<aom_wb_write_inv_signed_literal>:
add    $0x1,%edx
jmp    1030 <aom_wb_write_literal@plt>

LLVM IR (-O0):
%struct.aom_write_bit_buffer = type { i32 }
define void @aom_wb_write_inv_signed_literal(%struct.aom_write_bit_buffer* %0, i32 %1, i32 %2) {
%4 = alloca %struct.aom_write_bit_buffer*
%5 = alloca i32
%6 = alloca i32
store %struct.aom_write_bit_buffer* %0, %struct.aom_write_bit_buffer** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.aom_write_bit_buffer*, %struct.aom_write_bit_buffer** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %9, 1
%11 = call i32 @aom_wb_write_literal(%struct.aom_write_bit_buffer* %7, i32 %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.aom_write_bit_buffer = type { i32 }
define void @aom_wb_write_inv_signed_literal(%struct.aom_write_bit_buffer* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, 1
%5 = tail call i32 @aom_wb_write_literal(%struct.aom_write_bit_buffer* %0, i32 %1, i32 %4)
ret void
}
int cmp_int(const void *a, const void *b) { return *(int *)a > *(int *)b; }


x86 assembly (clang, -O0):
<cmp_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_int>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @cmp_int(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 = icmp sgt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @cmp_int(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 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int Pidentifier();
PkeywordNameRef() {
  int b = -1;
  ;
  b = Pidentifier();
  return (b);
}


x86 assembly (clang, -O0):
<PkeywordNameRef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Pidentifier@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @PkeywordNameRef() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i32 (...) @Pidentifier()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @PkeywordNameRef() {
%1 = tail call i32 (...) @Pidentifier()
ret i32 %1
}
int main() {
  int a, b, c;
  printf("enter the value for a,b");
  scanf("%d%d", &a, &b);
  c = a + b;
  printf("the value of c:%d", &c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
add    0x14(%rsp),%eax
mov    %eax,0xc(%rsp)
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"enter the value for a,b\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [18 x i8] c"the value of c:%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"enter the value for a,b\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [18 x i8] c"the value of c:%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 %10, %9
store i32 %11, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* %3)
ret i32 0
}
int get_nearest_ge_multiple(int value, int factor) {
  return factor * ((value / factor) + 1);
}


x86 assembly (clang, -O0):
<get_nearest_ge_multiple>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    $0x1,%ecx
imul   %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nearest_ge_multiple>:
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @get_nearest_ge_multiple(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = mul nsw i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_nearest_ge_multiple(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = add nsw i32 %3, 1
%5 = mul nsw i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pushbit(int);
void pushcontrol4b(int cc) {
  pushbit(cc % 2);
  cc >>= 1;
  pushbit(cc % 2);
  cc >>= 1;
  pushbit(cc % 2);
  cc >>= 1;
  pushbit(cc);
}


x86 assembly (clang, -O0):
<pushcontrol4b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <pushbit@plt>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <pushbit@plt>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <pushbit@plt>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pushbit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushcontrol4b>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
mov    %edi,%ebx
shr    $0x1f,%ebx
lea    (%r14,%rbx,1),%eax
and    $0xfffffffe,%eax
sub    %eax,%edi
call   1030 <pushbit@plt>
mov    %r14d,%edi
sar    %edi
lea    (%rdi,%rbx,1),%eax
and    $0xfffffffe,%eax
sub    %eax,%edi
call   1030 <pushbit@plt>
mov    %r14d,%edi
sar    $0x2,%edi
add    %edi,%ebx
and    $0xfffffffe,%ebx
sub    %ebx,%edi
call   1030 <pushbit@plt>
sar    $0x3,%r14d
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <pushbit@plt>

LLVM IR (-O0):
define void @pushcontrol4b(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = call i32 @pushbit(i32 %4)
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = srem i32 %8, 2
%10 = call i32 @pushbit(i32 %9)
%11 = load i32, i32* %2
%12 = ashr i32 %11, 1
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = srem i32 %13, 2
%15 = call i32 @pushbit(i32 %14)
%16 = load i32, i32* %2
%17 = ashr i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = call i32 @pushbit(i32 %18)
ret void
}

LLVM IR (-O2):
define void @pushcontrol4b(i32 %0) {
%2 = srem i32 %0, 2
%3 = tail call i32 @pushbit(i32 %2)
%4 = ashr i32 %0, 1
%5 = srem i32 %4, 2
%6 = tail call i32 @pushbit(i32 %5)
%7 = ashr i32 %0, 2
%8 = srem i32 %7, 2
%9 = tail call i32 @pushbit(i32 %8)
%10 = ashr i32 %0, 3
%11 = tail call i32 @pushbit(i32 %10)
ret void
}
/* Variables and functions */
scalar_t__ string2long(char const *, char **, int, int);
long int strtol(register const char *nptr, char **endptr, int base) {
  return (signed long)string2long(nptr, endptr, base, 1);
}


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

x86 assembly (clang, -O2):
<strtol>:
mov    $0x1,%ecx
jmp    1030 <string2long@plt>

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

LLVM IR (-O2):
define i64 @strtol(i8* %0, i8** %1, i32 %2) {
%4 = tail call i64 @string2long(i8* %0, i8** %1, i32 %2, i32 1)
ret i64 %4
}
int sum(int num1, int num2) { return num1 + num2; }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_write(char const *, unsigned int const);
void drv_LW_ABP_send(const char *data, const unsigned int len) {
  drv_generic_serial_write(data, len);
}


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

x86 assembly (clang, -O2):
<drv_LW_ABP_send>:
jmp    1030 <drv_generic_serial_write@plt>

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

LLVM IR (-O2):
define void @drv_LW_ABP_send(i8* %0, i32 %1) {
%3 = tail call i32 @drv_generic_serial_write(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ string_ends_with_extension(char *, char *);
int strlen(char *);
int is_account_database(char filename[]) {
  if (strlen(filename) < 9)
    return 0;
  if (string_ends_with_extension(filename, "sqlite3"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_account_database>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x9,%eax
jge    114a <is_account_database+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1177 <is_account_database+0x57>
mov    -0x10(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1040 <string_ends_with_extension@plt>
cmp    $0x0,%rax
je     1170 <is_account_database+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1177 <is_account_database+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_account_database>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
jl     114c <is_account_database+0x2c>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
call   1040 <string_ends_with_extension@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"sqlite3\00"
define i32 @is_account_database(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strlen(i8* %4)
%6 = icmp slt i32 %5, 9
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @string_ends_with_extension(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne 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 = [8 x i8] c"sqlite3\00"
define i32 @is_account_database(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 9
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @string_ends_with_extension(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
long long not_ll(long long *);
long long intr_wrap_580(long long p1) { return not_ll(&p1); }


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

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

LLVM IR (-O0):
define i64 @intr_wrap_580(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @not_ll(i64* %2)
ret i64 %3
}

LLVM IR (-O2):
define i64 @intr_wrap_580(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @not_ll(i64* %2)
ret i64 %3
}