xunge/DecIR huggingface dataset:
/* Variables and functions */
double exp(double);
void DExp(double *vec, int n) {
  int x;
  for (x = 0; x < n; x++)
    vec[x] = exp(vec[x]);
}


x86 assembly (clang, -O0):
<DExp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <DExp+0x4f>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <exp@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <DExp+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DExp>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114a <DExp+0x3a>
mov    %rdi,%r15
mov    %esi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <DExp+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @DExp(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = tail call double @exp(double %9)
store double %10, double* %8
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsPPServiceInit();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
int main(int argc, char *argv[]) {
  printf("!!!Hello World!!! \n");
  nsPPServiceInit();
  while (1) {
    usleep(100 * 1000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <nsPPServiceInit@plt>
mov    $0x186a0,%edi
call   1050 <usleep@plt>
jmp    1159 <main+0x29>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <nsPPServiceInit@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x186a0,%edi
call   1050 <usleep@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [20 x i8] c"!!!Hello World!!! \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @nsPPServiceInit()
br label %8
8: ; preds = %2, %8
%9 = call i32 @usleep(i32 100000)
br label %8
}

LLVM IR (-O2):
@str = [19 x i8] c"!!!Hello World!!! \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @nsPPServiceInit()
br label %5
5: ; preds = %2, %5
%6 = tail call i32 @usleep(i32 100000)
br label %5
}
/* Type definitions */
typedef scalar_t__ wchar_t;
struct _Locale_codecvt {
  int dummy;
};
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t _WLocale_wctomb(struct _Locale_codecvt *lcodecvt
                       __attribute__((__unused__)),
                       char *to, size_t n __attribute__((__unused__)),
                       const wchar_t c,
                       mbstate_t *st __attribute__((__unused__))) {
  *to = (char)c;
  return 1;
}


x86 assembly (clang, -O0):
<_WLocale_wctomb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_codecvt = type { i32 }
define i64 @_WLocale_wctomb(%struct._Locale_codecvt* %0, i8* %1, i64 %2, i64 %3, i32* %4) {
%6 = alloca %struct._Locale_codecvt*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32*
store %struct._Locale_codecvt* %0, %struct._Locale_codecvt** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i32* %4, i32** %10
%11 = load i64, i64* %9
%12 = trunc i64 %11 to i8
%13 = load i8*, i8** %7
store i8 %12, i8* %13
ret i64 1
}

LLVM IR (-O2):
%struct._Locale_codecvt = type { i32 }
define i64 @_WLocale_wctomb(%struct._Locale_codecvt* nocapture readnone %0, i8* nocapture writeonly %1, i64 %2, i64 %3, i32* nocapture readnone %4) {
%6 = trunc i64 %3 to i8
store i8 %6, i8* %1
ret i64 1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int system(char *);
int main(int argc, char *argv[]) {
  int rc = 0;
  if (argc < 2) {
    abort();
  }
  rc = system(argv[1]);
  if (rc == 0) {
    rc = 1;
  } else {
    rc = 0;
  }
  return rc;
}


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)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <system@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1174 <main+0x54>
movl   $0x1,-0x14(%rbp)
jmp    117b <main+0x5b>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    113a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <system@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
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
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @system(i8* %14)
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %11
store i32 1, i32* %6
br label %20
19: ; preds = %11
store i32 0, i32* %6
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %6
ret i32 %21
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @system(i8* %8)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
void border_ne_ext_corner_special_sand_short_vert(unsigned char *pic,
                                                  unsigned char *mirr) {
  *pic = 0x2C;
  *mirr = 0x02;
}


x86 assembly (clang, -O0):
<border_ne_ext_corner_special_sand_short_vert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2c,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x2,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_ne_ext_corner_special_sand_short_vert>:
movb   $0x2c,(%rdi)
movb   $0x2,(%rsi)
ret

LLVM IR (-O0):
define void @border_ne_ext_corner_special_sand_short_vert(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
store i8 44, i8* %5
%6 = load i8*, i8** %4
store i8 2, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_ne_ext_corner_special_sand_short_vert(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 44, i8* %0
store i8 2, i8* %1
ret void
}
int lwwire_read2(void *v, int i, int j) { return 0; }


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

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

LLVM IR (-O0):
define i32 @lwwire_read2(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @lwwire_read2(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
short serializer_read_short(char *src, int *pointer) {
  short temp;
  temp = ((src[(*pointer)]) | (src[(*pointer) + 1] << 8));
  *pointer += 2;
  return temp;
}


x86 assembly (clang, -O0):
<serializer_read_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rdx
mov    (%rdx),%edx
add    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x2,%ecx
mov    %ecx,(%rax)
movswl -0x12(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serializer_read_short>:
movslq (%rsi),%rcx
movsbl (%rdi,%rcx,1),%edx
movzbl 0x1(%rdi,%rcx,1),%eax
shl    $0x8,%eax
or     %edx,%eax
add    $0x2,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define signext i16 @serializer_read_short(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i16
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i8*, i8** %3
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %13, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = shl i32 %20, 8
%22 = or i32 %12, %21
%23 = trunc i32 %22 to i16
store i16 %23, i16* %5
%24 = load i32*, i32** %4
%25 = load i32, i32* %24
%26 = add nsw i32 %25, 2
store i32 %26, i32* %24
%27 = load i16, i16* %5
ret i16 %27
}

LLVM IR (-O2):
define signext i16 @serializer_read_short(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i16
%8 = add nsw i32 %3, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i16
%13 = shl nuw i16 %12, 8
%14 = or i16 %13, %7
%15 = add nsw i32 %3, 2
store i32 %15, i32* %1
ret i16 %14
}
/* Variables and functions */
int /*<<< orphan*/ ENET_Transmit_DriverIRQHandler();
__attribute__((weak)) void ENET_Transmit_IRQHandler(void) {
  ENET_Transmit_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @ENET_Transmit_IRQHandler() {
%1 = call i32 (...) @ENET_Transmit_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ENET_Transmit_IRQHandler() {
%1 = tail call i32 (...) @ENET_Transmit_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test();
int /*<<< orphan*/ test_const();
int /*<<< orphan*/ test_pure();
int main() {
  test_const();
  test();
  test_pure();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_const@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <test_pure@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_const()
%3 = call i32 (...) @test()
%4 = call i32 (...) @test_pure()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_const()
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @test_pure()
ret i32 0
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll23(struct __test_metadata *);
void wrapper_epoll23(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll23(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll23>:
jmp    1030 <epoll23@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll23(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll23(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll23(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll23(%struct.__test_metadata* %0)
ret void
}
int test_imm_1Aint8_reg(signed char val) {
  return ((val) & (-0x1A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Aint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffe6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Aint8_reg>:
test   $0xe6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Aint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -26
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_1Aint8_reg(i8 signext %0) {
%2 = and i8 %0, -26
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ realloc_array(void **, int, int, int, int, int);
char **realloc_char(char **array, int first, int second, int ext1, int ext2) {
  return (char **)realloc_array((void **)array, sizeof(char), first, second,
                                ext1, ext2);
}


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

x86 assembly (clang, -O2):
<realloc_char>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x1,%esi
jmp    1030 <realloc_array@plt>

LLVM IR (-O0):
define i8** @realloc_char(i8** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8** %0, i8*** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8**, i8*** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i64 @realloc_array(i8** %11, i32 1, i32 %12, i32 %13, i32 %14, i32 %15)
%17 = inttoptr i64 %16 to i8**
ret i8** %17
}

LLVM IR (-O2):
define i8** @realloc_char(i8** %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i64 @realloc_array(i8** %0, i32 1, i32 %1, i32 %2, i32 %3, i32 %4)
%7 = inttoptr i64 %6 to i8**
ret i8** %7
}
void ff_hevc_put_hevc_uni_w_qpel_hv12_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv12_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void event_replay_end(int err) { printf("# replay end: err=%d\n", err); }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"# replay end: err=%d\0A\00"
define void @event_replay_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"# replay end: err=%d\0A\00"
define void @event_replay_end(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void http_free_lines(char **lines) {
  char **line;
  for (line = lines; *line; line++)
    free(*line);
  free(lines);
}


x86 assembly (clang, -O0):
<http_free_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <http_free_lines+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <http_free_lines+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_free_lines>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <http_free_lines+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <http_free_lines+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @http_free_lines(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %2, %1 ]
%6 = phi i8** [ %7, %4 ], [ %0, %1 ]
tail call void @free(i8* %5)
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %1
%11 = bitcast i8** %0 to i8*
tail call void @free(i8* %11)
ret void
}
void hostapd_stop_setup_timers(struct hostapd_iface *iface) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_iface = type opaque
define void @hostapd_stop_setup_timers(%struct.hostapd_iface* nocapture %0) {
ret void
}
void fr(long long *a, long long *b, long long *x) {
  *a += *x;
  *b += *x;
}


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

x86 assembly (clang, -O2):
<fr>:
mov    (%rdx),%rax
add    %rax,(%rdi)
mov    (%rdx),%rax
add    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @fr(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** %6
%8 = load i64, i64* %7
%9 = load i64*, i64** %4
%10 = load i64, i64* %9
%11 = add nsw i64 %10, %8
store i64 %11, i64* %9
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = load i64*, i64** %5
%15 = load i64, i64* %14
%16 = add nsw i64 %15, %13
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @fr(i64* nocapture %0, i64* nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = load i64, i64* %0
%6 = add nsw i64 %5, %4
store i64 %6, i64* %0
%7 = load i64, i64* %2
%8 = load i64, i64* %1
%9 = add nsw i64 %8, %7
store i64 %9, i64* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_TYPE_DESCRIPTOR;
int /*<<< orphan*/ *BIO_find_type(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ BIO_get_fd(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ *SSL_get_rbio(int /*<<< orphan*/ const *);
int SSL_get_rfd(const SSL *s) {
  int ret = -1;
  BIO *b, *r;
  b = SSL_get_rbio(s);
  r = BIO_find_type(b, BIO_TYPE_DESCRIPTOR);
  if (r != NULL)
    BIO_get_fd(r, &ret);
  return (ret);
}


x86 assembly (clang, -O0):
<SSL_get_rfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <SSL_get_rbio@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <BIO_find_type@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     117e <SSL_get_rfd+0x4e>
mov    -0x20(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <BIO_get_fd@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSL_get_rfd>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
call   1050 <SSL_get_rbio@plt>
mov    0x2eab(%rip),%rcx
mov    (%rcx),%esi
mov    %rax,%rdi
call   1030 <BIO_find_type@plt>
test   %rax,%rax
je     1167 <SSL_get_rfd+0x37>
lea    0x4(%rsp),%rsi
mov    %rax,%rdi
call   1040 <BIO_get_fd@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@BIO_TYPE_DESCRIPTOR = global i32 0
define i32 @SSL_get_rfd(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %2
store i32 -1, i32* %3
%6 = load i32*, i32** %2
%7 = call i32* @SSL_get_rbio(i32* %6)
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* @BIO_TYPE_DESCRIPTOR
%10 = call i32* @BIO_find_type(i32* %8, i32 %9)
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = icmp ne i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load i32*, i32** %5
%15 = call i32 @BIO_get_fd(i32* %14, i32* %3)
br label %16
16: ; preds = %13, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@BIO_TYPE_DESCRIPTOR = global i32 0
define i32 @SSL_get_rfd(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%4 = tail call i32* @SSL_get_rbio(i32* %0)
%5 = load i32, i32* @BIO_TYPE_DESCRIPTOR
%6 = tail call i32* @BIO_find_type(i32* %4, i32 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = call i32 @BIO_get_fd(i32* %6, i32* %2)
%10 = load i32, i32* %2
br label %11
11: ; preds = %8, %1
%12 = phi i32 [ %10, %8 ], [ -1, %1 ]
ret i32 %12
}
void hisi_reset_exit(struct hisi_reset_controller *rstc) {}


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

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

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

LLVM IR (-O2):
%struct.hisi_reset_controller = type opaque
define void @hisi_reset_exit(%struct.hisi_reset_controller* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_append_string();
int /*<<< orphan*/ test_match_keywords();
int /*<<< orphan*/ test_parse_depth();
int /*<<< orphan*/ test_word_in_list();
int run_tests() {
  printf("Running tests\n");
  test_append_string();
  test_word_in_list();
  test_parse_depth();
  test_match_keywords();
  printf("All tests completed\n");
  return 1;
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test_append_string@plt>
mov    $0x0,%al
call   1060 <test_word_in_list@plt>
mov    $0x0,%al
call   1070 <test_parse_depth@plt>
mov    $0x0,%al
call   1030 <test_match_keywords@plt>
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_append_string@plt>
xor    %eax,%eax
call   1060 <test_word_in_list@plt>
xor    %eax,%eax
call   1070 <test_parse_depth@plt>
xor    %eax,%eax
call   1040 <test_match_keywords@plt>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Running tests\0A\00"
@.str.1 = [21 x i8] c"All tests completed\0A\00"
define i32 @run_tests() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_append_string()
%3 = call i32 (...) @test_word_in_list()
%4 = call i32 (...) @test_parse_depth()
%5 = call i32 (...) @test_match_keywords()
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [14 x i8] c"Running tests\00"
@str.2 = [20 x i8] c"All tests completed\00"
define i32 @run_tests() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_append_string()
%3 = tail call i32 (...) @test_word_in_list()
%4 = tail call i32 (...) @test_parse_depth()
%5 = tail call i32 (...) @test_match_keywords()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_perf_global_ctrl_EN_PMC() {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 10;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((7)) - ((0)) + 1)) - 1) << ((0)))) >>
       (0)) > 0) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_perf_global_ctrl_EN_PMC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0xff,%eax
sar    $0x0,%eax
cmp    $0x0,%eax
jle    1157 <cpuid_perf_global_ctrl_EN_PMC+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115e <cpuid_perf_global_ctrl_EN_PMC+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_perf_global_ctrl_EN_PMC>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0xa,%edi
call   1030 <cpuid@plt>
xor    %eax,%eax
cmpb   $0x0,0x8(%rsp)
setne  %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuid_perf_global_ctrl_EN_PMC() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 10, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @cpuid(i32 %7, i32* %2, i32* %3, i32* %4, i32* %5)
%9 = load i32, i32* %2
%10 = and i32 %9, 255
%11 = ashr i32 %10, 0
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %0
store i32 1, i32* %1
br label %15
14: ; preds = %0
store i32 0, i32* %1
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @cpuid_perf_global_ctrl_EN_PMC() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 10, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = and i32 %10, 255
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) int softboundmpx_fclose(FILE *fp) {
  return fclose(fp);
}


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

x86 assembly (clang, -O2):
<softboundmpx_fclose>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_fclose(i32* %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 %2
}
void reset_bit(void *data, const unsigned int i) {
  ((unsigned int *)data)[i >> 5] &= ~(1 << (i & 31));
}


x86 assembly (clang, -O0):
<reset_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_bit>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
shr    $0x5,%ecx
and    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @reset_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %4
%12 = lshr i32 %11, 5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load i32, i32* %14
%16 = and i32 %15, %8
store i32 %16, i32* %14
ret void
}

LLVM IR (-O2):
define void @reset_bit(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = bitcast i8* %0 to i32*
%7 = lshr i32 %1, 5
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
%11 = and i32 %10, %5
store i32 %11, i32* %9
ret void
}
void add_d(double *source1, double *source2, double *target) {
  *target = (*source1) + (*source2);
}


x86 assembly (clang, -O0):
<add_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_d>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
ret

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

LLVM IR (-O2):
define void @add_d(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fadd double %4, %5
store double %6, double* %2
ret void
}
/* Variables and functions */
int PAPI_set_cmp_domain(int, int);
void papif_set_cmp_domain__(int *domain, int *cidx, int *check) {
  *check = PAPI_set_cmp_domain(*domain, *cidx);
}


x86 assembly (clang, -O0):
<papif_set_cmp_domain__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <PAPI_set_cmp_domain@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_set_cmp_domain__>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
call   1030 <PAPI_set_cmp_domain@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_set_cmp_domain__(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_set_cmp_domain(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
testUnaryPlus() { printf("+%d = %d\n", 10, +10); }


x86 assembly (clang, -O0):
<testUnaryPlus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0xa,%edx
mov    %edx,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testUnaryPlus>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0xa,%edx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"+%d = %d\0A\00"
define i32 @testUnaryPlus() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i32 10)
ret i32 undef
}
void memcpy_tofs(void *to, const void *from, unsigned long n) {
  __asm__ __volatile__("" : : : "memory");
  memcpy(to, from, n);
  __asm__ __volatile__("" : : : "memory");
}


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

x86 assembly (clang, -O2):
<memcpy_tofs>:
push   %rax
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @memcpy_tofs(i8* nocapture writeonly %0, i8* nocapture %1, i64 %2) {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
double MBtoATM(double);
double KPAtoATM(double KPA) {
  double ATM = MBtoATM(KPA * 10);
  return ATM;
}


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

x86 assembly (clang, -O2):
<KPAtoATM>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <MBtoATM@plt>

LLVM IR (-O0):
define double @KPAtoATM(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 1.000000e+01
%6 = call double @MBtoATM(double %5)
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @KPAtoATM(double %0) {
%2 = fmul double %0, 1.000000e+01
%3 = tail call double @MBtoATM(double %2)
ret double %3
}
int test_imm_2Cint32_mem(int *val) {
  return ((*val) & (0x2C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Cint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x2c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Cint32_mem>:
testb  $0x2c,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Cint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 44
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_2Cint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 44
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *xindex(char *, char);
int test_xindex(void) {
  char *p = "pippo";
  if (xindex(p, 'i') == p + 1)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<test_xindex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x69,%esi
call   1030 <xindex@plt>
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jne    114e <test_xindex+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <test_xindex+0x45>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_xindex>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x69,%esi
call   1030 <xindex@plt>
lea    0xed8(%rip),%rdx
xor    %ecx,%ecx
cmp    %rdx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"pippo\00"
define i32 @test_xindex() {
%1 = tail call i8* @xindex(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext 105)
%2 = icmp ne i8* %1, getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 1)
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double sqrt(double);
double kx_sqrt(register double y) { return sqrt(y); }


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

x86 assembly (clang, -O2):
<kx_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <kx_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @kx_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int strcmp(char const *, char const *);
int dhcpcd_cmpstring(const void *p1, const void *p2) {
  const char *s1, *s2;
  int cmp;
  s1 = *(char *const *)p1;
  s2 = *(char *const *)p2;
  if ((cmp = strcasecmp(s1, s2)) == 0)
    cmp = strcmp(s1, s2);
  return cmp;
}


x86 assembly (clang, -O0):
<dhcpcd_cmpstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jne    116f <dhcpcd_cmpstring+0x4f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhcpcd_cmpstring>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rbx
mov    (%rsi),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1141 <dhcpcd_cmpstring+0x21>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @dhcpcd_cmpstring(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcasecmp(i8* %4, i8* %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
br label %11
11: ; preds = %9, %2
%12 = phi i32 [ %10, %9 ], [ %7, %2 ]
ret i32 %12
}
void gtk_button_new_with_mnemonic() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_new_with_mnemonic() {
ret void
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};
struct timespec {
  int tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
void tv_to_ts(struct timeval *tv, struct timespec *ts) {
  ts->tv_sec = tv->tv_sec;
  ts->tv_nsec = tv->tv_usec * 1000;
}


x86 assembly (clang, -O0):
<tv_to_ts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tv_to_ts>:
mov    0x4(%rdi),%eax
mov    %eax,0x4(%rsi)
imul   $0x3e8,(%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
%struct.timespec = type { i32, i32 }
define void @tv_to_ts(%struct.timeval* %0, %struct.timespec* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timespec*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%7 = load i32, i32* %6
%8 = load %struct.timespec*, %struct.timespec** %4
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
store i32 %7, i32* %9
%10 = load %struct.timeval*, %struct.timeval** %3
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = mul nsw i32 %12, 1000
%14 = load %struct.timespec*, %struct.timespec** %4
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %14, i32 0, i32 0
store i32 %13, i32* %15
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
%struct.timespec = type { i32, i32 }
define void @tv_to_ts(%struct.timeval* nocapture %0, %struct.timespec* nocapture writeonly %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 %8, i32* %9
ret void
}