xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, short);
char *strdup(char *);
char *get_field_imm(long instr) {
  char tmpstr[25];
  sprintf(tmpstr, "%d", (short)((instr & 0x0000FFFF) >> 0));
  return (strdup(tmpstr));
}


x86 assembly (clang, -O0):
<get_field_imm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rax
and    $0xffff,%rax
sar    $0x0,%rax
lea    0xebb(%rip),%rsi
movswl %ax,%edx
call   1030 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_field_imm>:
push   %rbx
sub    $0x20,%rsp
movswl %di,%edx
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @get_field_imm(i64 %0) {
%2 = alloca i64
%3 = alloca [25 x i8]
store i64 %0, i64* %2
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%5 = load i64, i64* %2
%6 = and i64 %5, 65535
%7 = ashr i64 %6, 0
%8 = trunc i64 %7 to i16
%9 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i16 signext %8)
%10 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%11 = call i8* @strdup(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @get_field_imm(i64 %0) {
%2 = alloca [25 x i8]
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%4 = trunc i64 %0 to i16
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i16 signext %4)
%6 = call i8* @strdup(i8* %3)
ret i8* %6
}
int fun545() { return 545; }


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

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

LLVM IR (-O0):
define i32 @fun545() {
ret i32 545
}

LLVM IR (-O2):
define i32 @fun545() {
ret i32 545
}
void rop3_139_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T ^ *D;
  stk2 = S | stk3;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_139_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_139_0_0>:
mov    (%rdi),%al
xor    %al,%dl
or     %sil,%dl
xor    %al,%dl
not    %dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_139_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = xor i32 %31, -1
%33 = trunc i32 %32 to i8
store i8 %33, i8* %7
%34 = load i8, i8* %7
%35 = load i8*, i8** %4
store i8 %34, i8* %35
ret void
}

LLVM IR (-O2):
define void @rop3_139_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = xor i8 %4, %6
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
char *pasa_ez_komilla(char *s) {
  while ((*s != '\42') && (*s != '\n'))
    s++;
  return (s);
}


x86 assembly (clang, -O0):
<pasa_ez_komilla>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x9(%rbp)
je     112d <pasa_ez_komilla+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <pasa_ez_komilla+0x3d>
jmp    114e <pasa_ez_komilla+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <pasa_ez_komilla+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pasa_ez_komilla>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
cmp    $0xa,%cl
je     1123 <pasa_ez_komilla+0x23>
cmp    $0x22,%cl
je     1123 <pasa_ez_komilla+0x23>
add    $0x1,%rax
jmp    1110 <pasa_ez_komilla+0x10>
ret

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

LLVM IR (-O2):
define i8* @pasa_ez_komilla(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 34, label %7
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
ret i8* %3
}
int least_common_multiple(int ival1, int ival2) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @least_common_multiple(i32 %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ memcpy(void *, void *, int);
void *mem_double(void *ptr, int size) {
  void *newptr;
  newptr = calloc(2 * size, 1);
  if (newptr == NULL)
    return NULL;
  memcpy(newptr, ptr, size);
  free(ptr);
  return newptr;
}


x86 assembly (clang, -O0):
<mem_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
shl    $0x1,%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    116b <mem_double+0x3b>
movq   $0x0,-0x8(%rbp)
jmp    118c <mem_double+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <memcpy@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_double>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    (%r15,%r15,1),%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1167 <mem_double+0x37>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1050 <memcpy@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mem_double(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = mul nsw i32 2, %7
%9 = call i8* @calloc(i32 %8, i32 1)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %2
store i8* null, i8** %3
br label %21
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = call i32 @memcpy(i8* %14, i8* %15, i32 %16)
%18 = load i8*, i8** %4
%19 = call i32 @free(i8* %18)
%20 = load i8*, i8** %6
store i8* %20, i8** %3
br label %21
21: ; preds = %13, %12
%22 = load i8*, i8** %3
ret i8* %22
}

LLVM IR (-O2):
define i8* @mem_double(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 1
%4 = tail call i8* @calloc(i32 %3, i32 1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %1)
%8 = tail call i32 @free(i8* %0)
br label %9
9: ; preds = %2, %6
ret i8* %4
}
/* Variables and functions */
size_t round_blocksize(size_t size) { return size; }


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

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

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

LLVM IR (-O2):
define i64 @round_blocksize(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vmars_counters_sighandler(int);
int /*<<< orphan*/ vmars_latency_sighandler(int);
int /*<<< orphan*/ vmars_packet_sighandler(int);
void root_sighandler(int num) {
  printf("Terminating\n");
  vmars_packet_sighandler(num);
  vmars_latency_sighandler(num);
  vmars_counters_sighandler(num);
}


x86 assembly (clang, -O0):
<root_sighandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1060 <vmars_packet_sighandler@plt>
mov    -0x4(%rbp),%edi
call   1030 <vmars_latency_sighandler@plt>
mov    -0x4(%rbp),%edi
call   1050 <vmars_counters_sighandler@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<root_sighandler>:
push   %rbx
mov    %edi,%ebx
lea    0xeb6(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   1060 <vmars_packet_sighandler@plt>
mov    %ebx,%edi
call   1030 <vmars_latency_sighandler@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <vmars_counters_sighandler@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Terminating\0A\00"
define void @root_sighandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @vmars_packet_sighandler(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @vmars_latency_sighandler(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @vmars_counters_sighandler(i32 %8)
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Terminating\00"
define void @root_sighandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @vmars_packet_sighandler(i32 %0)
%4 = tail call i32 @vmars_latency_sighandler(i32 %0)
%5 = tail call i32 @vmars_counters_sighandler(i32 %0)
ret void
}
void malloc_memory_check(void) { ; }


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

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

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

LLVM IR (-O2):
define void @malloc_memory_check() {
ret void
}
/* Variables and functions */
size_t StringArray_getLength(const char **array) {
  int length = 0;
  if (array)
    while (*array++)
      length++;
  return length;
}


x86 assembly (clang, -O0):
<StringArray_getLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <StringArray_getLength+0x4b>
jmp    111f <StringArray_getLength+0x1f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
cmpq   $0x0,(%rax)
je     1146 <StringArray_getLength+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <StringArray_getLength+0x1f>
jmp    114b <StringArray_getLength+0x4b>
movslq -0xc(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringArray_getLength>:
test   %rdi,%rdi
je     1120 <StringArray_getLength+0x20>
cmpq   $0x0,(%rdi)
je     1120 <StringArray_getLength+0x20>
xor    %ecx,%ecx
nopl   (%rax)
lea    0x1(%rcx),%rax
cmpq   $0x0,0x8(%rdi,%rcx,8)
mov    %rax,%rcx
jne    1110 <StringArray_getLength+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @StringArray_getLength(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 0, %3 ]
%8 = phi i8** [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = add nuw nsw i32 %7, 1
%11 = load i8*, i8** %9
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6
%14 = zext i32 %10 to i64
br label %15
15: ; preds = %13, %3, %1
%16 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %14, %13 ]
ret i64 %16
}
/* Variables and functions */
double drand48();
long binary(double prob) {
  if (drand48() < prob)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <drand48@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1143 <binary+0x33>
movq   $0x1,-0x8(%rbp)
jmp    114b <binary+0x3b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <drand48@plt>
xor    %eax,%eax
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
pop    %rcx
ret

LLVM IR (-O0):
define i64 @binary(double %0) {
%2 = alloca i64
%3 = alloca double
store double %0, double* %3
%4 = call double (...) @drand48()
%5 = load double, double* %3
%6 = fcmp olt double %4, %5
br i1 %6, label %7, label %8
7: ; preds = %1
store i64 1, i64* %2
br label %9
8: ; preds = %1
store i64 0, i64* %2
br label %9
9: ; preds = %8, %7
%10 = load i64, i64* %2
ret i64 %10
}

LLVM IR (-O2):
define i64 @binary(double %0) {
%2 = tail call double (...) @drand48()
%3 = fcmp olt double %2, %0
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void printUsage(char **argv) {
  printf("Usage: \n%s <p/b>\n%s <p/b> d\n", argv[0], argv[0]);
}


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

x86 assembly (clang, -O2):
<printUsage>:
mov    (%rdi),%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Usage: \0A%s <p/b>\0A%s <p/b> d\0A\00"
define void @printUsage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Usage: \0A%s <p/b>\0A%s <p/b> d\0A\00"
define void @printUsage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %2)
ret void
}
void m68kq68_sync(void) {}


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

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

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

LLVM IR (-O2):
define void @m68kq68_sync() {
ret void
}
int pcapack_rowsums(const int m, const int n, double *x, double *rowsums) {
  int i, j;
  double tmp;
  for (i = 0; i < n; i++) {
    tmp = 0.;
    for (j = 0; j < m; j++) {
      tmp += x[i + m * j];
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<pcapack_rowsums>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1183 <pcapack_rowsums+0x83>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1170 <pcapack_rowsums+0x70>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    -0x4(%rbp),%edx
imul   -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1134 <pcapack_rowsums+0x34>
jmp    1175 <pcapack_rowsums+0x75>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <pcapack_rowsums+0x19>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pcapack_rowsums(i32 %0, i32 %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %12
12: ; preds = %37, %4
%13 = load i32, i32* %9
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %40
16: ; preds = %12
store double 0.000000e+00, double* %11
store i32 0, i32* %10
br label %17
17: ; preds = %33, %16
%18 = load i32, i32* %10
%19 = load i32, i32* %5
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %36
21: ; preds = %17
%22 = load double*, double** %7
%23 = load i32, i32* %9
%24 = load i32, i32* %5
%25 = load i32, i32* %10
%26 = mul nsw i32 %24, %25
%27 = add nsw i32 %23, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %22, i64 %28
%30 = load double, double* %29
%31 = load double, double* %11
%32 = fadd double %31, %30
store double %32, double* %11
br label %33
33: ; preds = %21
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
br label %17
36: ; preds = %17
br label %37
37: ; preds = %36
%38 = load i32, i32* %9
%39 = add nsw i32 %38, 1
store i32 %39, i32* %9
br label %12
40: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @pcapack_rowsums(i32 %0, i32 %1, double* nocapture readnone %2, double* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void so_init2(void) {
  printf("so_init2"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"so_init2\00"
define void @so_init2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned long native_save_fl(void) {
  unsigned long flags;
  asm volatile("# __raw_save_flags\n\t"
               "pushf ; pop %0"
               : "=rm"(flags)
               :
               : "memory");
  return flags;
}


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

x86 assembly (clang, -O2):
<native_save_fl>:
pushf
pop    -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @native_save_fl() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = load i64, i64* %1
ret i64 %3
}
int test_02(float val) {
  union {
    int i;
    float f;
  } tmp;
  tmp.f = val;
  return tmp.i;
}


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

x86 assembly (clang, -O2):
<test_02>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @test_02(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_02(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void success(void) { puts("success"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"success\00"
define void @success() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_time() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @get_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @get_time() {
%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 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ isSameDropSet(int *, int *);
int compareDropSet(void *a, void *b) {
  return !(isSameDropSet((int *)a, (int *)b));
}


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

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

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

LLVM IR (-O2):
define i32 @compareDropSet(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = tail call i32 @isSameDropSet(i32* %3, i32* %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ ftpexpect(int, char *);
int /*<<< orphan*/ ftpsend(int, char *);
void ftp_close(int in) {
  ftpsend(in, "QUIT\r\n");
  ftpexpect(in, "221 ");
  close(in);
}


x86 assembly (clang, -O0):
<ftp_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xebb(%rip),%rsi
call   1050 <ftpsend@plt>
mov    -0x4(%rbp),%edi
lea    0xeb3(%rip),%rsi
call   1030 <ftpexpect@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftp_close>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rsi
call   1050 <ftpsend@plt>
lea    0xec1(%rip),%rsi
mov    %ebx,%edi
call   1030 <ftpexpect@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"QUIT\0D\0A\00"
@.str.1 = [5 x i8] c"221 \00"
define void @ftp_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ftpsend(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @ftpexpect(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"QUIT\0D\0A\00"
@.str.1 = [5 x i8] c"221 \00"
define void @ftp_close(i32 %0) {
%2 = tail call i32 @ftpsend(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @ftpexpect(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @close(i32 %0)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int setsid();
pid_t xsetsid() {
  pid_t pid = setsid();
  if (pid == -1) {
    ;
  }
  return pid;
}


x86 assembly (clang, -O0):
<xsetsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <setsid@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    1131 <xsetsid+0x21>
jmp    1131 <xsetsid+0x21>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xsetsid() {
%1 = alloca i32
%2 = call i32 (...) @setsid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @xsetsid() {
%1 = tail call i32 (...) @setsid()
ret i32 %1
}
/* Variables and functions */
char *calloc(int, int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *grow_buffer(char **b, int *sz) {
  *sz += 32768;
  char *tmp = calloc(*sz, sizeof(char));
  strcpy(tmp, *b);
  free(*b);
  *b = tmp;
  return tmp;
}


x86 assembly (clang, -O0):
<grow_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x8000,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grow_buffer>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x8000,%edi
add    (%rsi),%edi
mov    %edi,(%rsi)
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    (%r14),%rsi
mov    %rax,%rdi
call   1040 <strcpy@plt>
mov    (%r14),%rdi
call   1030 <free@plt>
mov    %rbx,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @grow_buffer(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i8*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 32768
store i32 %8, i32* %6
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = call i8* @calloc(i32 %10, i32 1)
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = call i32 @strcpy(i8* %12, i8* %14)
%16 = load i8**, i8*** %3
%17 = load i8*, i8** %16
%18 = call i32 @free(i8* %17)
%19 = load i8*, i8** %5
%20 = load i8**, i8*** %3
store i8* %19, i8** %20
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @grow_buffer(i8** nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 32768
store i32 %4, i32* %1
%5 = tail call i8* @calloc(i32 %4, i32 1)
%6 = load i8*, i8** %0
%7 = tail call i32 @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %0
%9 = tail call i32 @free(i8* %8)
store i8* %5, i8** %0
ret i8* %5
}
/* Variables and functions */
int isalnum(int const);
int is_lcchar(const int c) { return isalnum(c); }


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

x86 assembly (clang, -O2):
<is_lcchar>:
jmp    1030 <isalnum@plt>

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

LLVM IR (-O2):
define i32 @is_lcchar(i32 %0) {
%2 = tail call i32 @isalnum(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ snprintf(char *, int, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ write(int, char *, scalar_t__);
void do_something(int connfd) {
  char buf[50];
  memset(buf, 0, sizeof(buf));
  snprintf(buf, sizeof(buf), "nice to meet you");
  write(connfd, buf, strlen(buf) + 1);
}


x86 assembly (clang, -O0):
<do_something>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1060 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    $0x32,%esi
lea    0xe95(%rip),%rdx
call   1050 <snprintf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x4c(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x4c(%rbp),%edi
mov    -0x48(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <write@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_something>:
push   %rbp
push   %rbx
sub    $0x38,%rsp
mov    %edi,%ebp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1060 <memset@plt>
lea    0xe9f(%rip),%rdx
mov    %rbx,%rdi
mov    $0x32,%esi
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <write@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"nice to meet you\00"
define void @do_something(i32 %0) {
%2 = alloca i32
%3 = alloca [50 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i32 0, i32 50)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 50, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%11 = call i64 @strlen(i8* %10)
%12 = add nsw i64 %11, 1
%13 = call i32 @write(i32 %8, i8* %9, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"nice to meet you\00"
define void @do_something(i32 %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i32 0, i32 50)
%5 = call i32 @snprintf(i8* %3, i32 50, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @strlen(i8* %3)
%7 = add nsw i64 %6, 1
%8 = call i32 @write(i32 %0, i8* %3, i64 %7)
ret void
}
void ble_rsp_attributes_user_read_response(const void *nul) {}


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

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

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

LLVM IR (-O2):
define void @ble_rsp_attributes_user_read_response(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *malloc(int);
void xstrcpy(char *dest_string, char *orig_string) {
  int i = 0;
  while (orig_string[i] != '\0') {
    i++;
  }
  dest_string = malloc(sizeof(char) * i);
  for (int j = 0; j <= i; j++)
    dest_string[j] = orig_string[j];
}


x86 assembly (clang, -O0):
<xstrcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114a <xstrcpy+0x3a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <xstrcpy+0x17>
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1194 <xstrcpy+0x84>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1164 <xstrcpy+0x54>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @xstrcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %7
7: ; preds = %15, %2
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %7
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %7
18: ; preds = %7
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = mul i64 1, %20
%22 = trunc i64 %21 to i32
%23 = call i8* @malloc(i32 %22)
store i8* %23, i8** %3
store i32 0, i32* %6
br label %24
24: ; preds = %38, %18
%25 = load i32, i32* %6
%26 = load i32, i32* %5
%27 = icmp sle i32 %25, %26
br i1 %27, label %28, label %41
28: ; preds = %24
%29 = load i8*, i8** %4
%30 = load i32, i32* %6
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = load i8*, i8** %3
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8, i8* %34, i64 %36
store i8 %33, i8* %37
br label %38
38: ; preds = %28
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
br label %24
41: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @xstrcpy(i8* nocapture %0, i8* nocapture %1) {
ret void
}
char *icl_xz_description(void) { return "LZMA used in xz"; }


x86 assembly (clang, -O0):
<icl_xz_description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<icl_xz_description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"LZMA used in xz\00"
define i8* @icl_xz_description() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"LZMA used in xz\00"
define i8* @icl_xz_description() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int joinLength();
int benchmarkRun() { return joinLength(); }


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

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

LLVM IR (-O0):
define i32 @benchmarkRun() {
%1 = call i32 (...) @joinLength()
ret i32 %1
}

LLVM IR (-O2):
define i32 @benchmarkRun() {
%1 = tail call i32 (...) @joinLength()
ret i32 %1
}
int isdigit(int a) { return (int)(((unsigned)(a) - (unsigned)'0') < 10U); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
cmp    $0xa,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 48
%5 = icmp ult i32 %4, 10
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CDE_begin_standard_fileop(struct tcb *, char *);
void CDE_begin_mkdir(struct tcb *tcp) {
  CDE_begin_standard_fileop(tcp, "mkdir");
}


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

x86 assembly (clang, -O2):
<CDE_begin_mkdir>:
lea    0xee9(%rip),%rsi
jmp    1030 <CDE_begin_standard_fileop@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
@.str = [6 x i8] c"mkdir\00"
define void @CDE_begin_mkdir(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @CDE_begin_standard_fileop(%struct.tcb* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
@.str = [6 x i8] c"mkdir\00"
define void @CDE_begin_mkdir(%struct.tcb* %0) {
%2 = tail call i32 @CDE_begin_standard_fileop(%struct.tcb* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_text_iter_backward_char() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_backward_char() {
ret void
}
void df(struct CMD *c) {
  extern void fs_df(void);
  fs_df();
}


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

x86 assembly (clang, -O2):
<df>:
jmp    1030 <fs_df@plt>

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

LLVM IR (-O2):
%struct.CMD = type opaque
define void @df(%struct.CMD* nocapture readnone %0) {
tail call void @fs_df()
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t lclamp(int64_t value, int64_t low, int64_t high) {
  return value < low ? low : (value > high ? high : value);
}


x86 assembly (clang, -O0):
<lclamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <lclamp+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <lclamp+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <lclamp+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <lclamp+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lclamp>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @lclamp(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ jx9_lib_shutdown();
int /*<<< orphan*/ puts(char const *);
void Fatal(const char *zMsg) {
  if (zMsg) {
    puts(zMsg);
  }
  jx9_lib_shutdown();
  exit(0);
}


x86 assembly (clang, -O0):
<Fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <Fatal+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <jx9_lib_shutdown@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<Fatal>:
push   %rax
test   %rdi,%rdi
je     113b <Fatal+0xb>
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <jx9_lib_shutdown@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @Fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @puts(i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 (...) @jx9_lib_shutdown()
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Fatal(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @jx9_lib_shutdown()
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Absolute(int);
int /*<<< orphan*/ INC8(int /*<<< orphan*/);
void OpEEM1(void) { INC8(Absolute(3)); }


x86 assembly (clang, -O0):
<OpEEM1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <Absolute@plt>
mov    %eax,%edi
call   1030 <INC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpEEM1>:
push   %rax
mov    $0x3,%edi
call   1040 <Absolute@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <INC8@plt>

LLVM IR (-O0):
define void @OpEEM1() {
%1 = call i32 @Absolute(i32 3)
%2 = call i32 @INC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpEEM1() {
%1 = tail call i32 @Absolute(i32 3)
%2 = tail call i32 @INC8(i32 %1)
ret void
}
int cmp_ge(long arg1, long arg2) { return arg1 < arg2; }


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

x86 assembly (clang, -O2):
<cmp_ge>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @cmp_ge(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmp_ge(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void strcpy(char *dest, const char *src) {
  int i;
  for (i = 0; src[i] != 0; ++i) {
    dest[i] = src[i];
  }
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <strcpy+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    (%rsi),%al
test   %al,%al
je     1120 <strcpy+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define void @strcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
void gtk_visibility_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_visibility_get_type() {
ret void
}