xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(size_t const);
int wcslen(int /*<<< orphan*/ const *);
int /*<<< orphan*/ wcsncpy(int /*<<< orphan*/ *const,
                           int /*<<< orphan*/ const *, size_t const);
wchar_t *vifm_wcsdup(const wchar_t ws[]) {
  const size_t len = wcslen(ws) + 1;
  wchar_t *const result = malloc(len * sizeof(wchar_t));
  if (result == NULL) {
    return NULL;
  }
  wcsncpy(result, ws, len);
  return result;
}


x86 assembly (clang, -O0):
<vifm_wcsdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <wcslen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1177 <vifm_wcsdup+0x47>
movq   $0x0,-0x8(%rbp)
jmp    1190 <vifm_wcsdup+0x60>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <wcsncpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vifm_wcsdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <wcslen@plt>
movslq %eax,%rbx
lea    0x4(,%rbx,4),%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1167 <vifm_wcsdup+0x37>
add    $0x1,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <wcsncpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32* @vifm_wcsdup(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @wcslen(i32* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = mul i64 %10, 4
%12 = call i32* @malloc(i64 %11)
store i32* %12, i32** %5
%13 = load i32*, i32** %5
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %16
15: ; preds = %1
store i32* null, i32** %2
br label %22
16: ; preds = %1
%17 = load i32*, i32** %5
%18 = load i32*, i32** %3
%19 = load i64, i64* %4
%20 = call i32 @wcsncpy(i32* %17, i32* %18, i64 %19)
%21 = load i32*, i32** %5
store i32* %21, i32** %2
br label %22
22: ; preds = %16, %15
%23 = load i32*, i32** %2
ret i32* %23
}

LLVM IR (-O2):
define i32* @vifm_wcsdup(i32* %0) {
%2 = tail call i32 @wcslen(i32* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = shl nsw i64 %4, 2
%6 = tail call i32* @malloc(i64 %5)
%7 = icmp eq i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @wcsncpy(i32* %6, i32* %0, i64 %4)
br label %10
10: ; preds = %1, %8
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void dagoptfree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @dagoptfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo(int, int, int, int, int, int, int, int);
int foo1(int, int, int, int, int, int, int, int);
int main(void) {
  if (foo(1, 2, 3, 4, 5, 6, 7, 8) != 32)
    abort();
  if (foo1(1, 2, 3, 4, 5, 6, 7, 8) != 32)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
call   1040 <foo@plt>
cmp    $0x20,%eax
je     1193 <main+0x53>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
movl   $0x7,(%rsp)
movl   $0x8,0x8(%rsp)
call   1050 <foo1@plt>
cmp    $0x20,%eax
je     11d7 <main+0x97>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0x8
push   $0x7
call   1040 <foo@plt>
add    $0x10,%rsp
cmp    $0x20,%eax
jne    11ac <main+0x6c>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x5,%r8d
mov    $0x6,%r9d
push   $0x8
push   $0x7
call   1050 <foo1@plt>
add    $0x10,%rsp
cmp    $0x20,%eax
jne    11ac <main+0x6c>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
%3 = icmp ne i32 %2, 32
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @foo1(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
%8 = icmp ne i32 %7, 32
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
%2 = icmp eq i32 %1, 32
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @foo1(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
%7 = icmp eq i32 %6, 32
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int snprintf(char *, int, char *, int);
int main() {
  char str[3];
  int retVal = snprintf(str, 3, "%d", 1231);
  printf("%s\n", str);
  return retVal;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7(%rbp),%rdi
mov    $0x3,%esi
lea    0xec1(%rip),%rdx
mov    $0x4cf,%ecx
call   1040 <snprintf@plt>
mov    %eax,-0xc(%rbp)
lea    -0x7(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdx
lea    0x5(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4cf,%ecx
call   1040 <snprintf@plt>
mov    %eax,%ebp
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1231)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg16(int, unsigned short);
void VIM_IPP_SetWindowSize(unsigned short wWidth, unsigned short wHeight) {
  VIM_HIF_SetReg16((0x1c00 + 0x006), wWidth);
  VIM_HIF_SetReg16((0x1c00 + 0x008), wHeight);
}


x86 assembly (clang, -O0):
<VIM_IPP_SetWindowSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    $0x1c06,%edi
movzwl -0x2(%rbp),%esi
call   1030 <VIM_HIF_SetReg16@plt>
mov    $0x1c08,%edi
movzwl -0x4(%rbp),%esi
call   1030 <VIM_HIF_SetReg16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_IPP_SetWindowSize>:
push   %rbx
mov    %esi,%ebx
mov    %edi,%esi
mov    $0x1c06,%edi
call   1030 <VIM_HIF_SetReg16@plt>
mov    $0x1c08,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <VIM_HIF_SetReg16@plt>

LLVM IR (-O0):
define void @VIM_IPP_SetWindowSize(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = call i32 @VIM_HIF_SetReg16(i32 7174, i16 zeroext %5)
%7 = load i16, i16* %4
%8 = call i32 @VIM_HIF_SetReg16(i32 7176, i16 zeroext %7)
ret void
}

LLVM IR (-O2):
define void @VIM_IPP_SetWindowSize(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @VIM_HIF_SetReg16(i32 7174, i16 zeroext %0)
%4 = tail call i32 @VIM_HIF_SetReg16(i32 7176, i16 zeroext %1)
ret void
}
int test_imm_C0int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xC0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C0int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0xc0,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C0int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 12582912
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ futimens;
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  (void)futimens;
  exit(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)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@futimens = global i32 0
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = load i32, i32* @futimens
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@futimens = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int run();
int main() { return run(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run()
ret i32 %1
}
/* Type definitions */
struct hostent {
  int dummy;
};
typedef enum nss_status { ____Placeholder_nss_status } nss_status;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int _nss_dev_tld_gethostbyname2_r(char const *, int /*<<< orphan*/,
                                  struct hostent *, char *, size_t, int *,
                                  int *);
enum nss_status _nss_dev_tld_gethostbyname_r(const char *name,
                                             struct hostent *result,
                                             char *buffer, size_t buflen,
                                             int *errnop, int *h_errnop) {
  return _nss_dev_tld_gethostbyname2_r(name, AF_INET, result, buffer, buflen,
                                       errnop, h_errnop);
}


x86 assembly (clang, -O0):
<_nss_dev_tld_gethostbyname_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <_nss_dev_tld_gethostbyname2_r@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nss_dev_tld_gethostbyname_r>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    0x2ec4(%rip),%rsi
mov    (%rsi),%esi
mov    %r9,(%rsp)
mov    %rax,%r9
call   1030 <_nss_dev_tld_gethostbyname2_r@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@AF_INET = global i32 0
define i32 @_nss_dev_tld_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca %struct.hostent*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32*
%12 = alloca i32*
store i8* %0, i8** %7
store %struct.hostent* %1, %struct.hostent** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* @AF_INET
%15 = load %struct.hostent*, %struct.hostent** %8
%16 = load i8*, i8** %9
%17 = load i64, i64* %10
%18 = load i32*, i32** %11
%19 = load i32*, i32** %12
%20 = call i32 @_nss_dev_tld_gethostbyname2_r(i8* %13, i32 %14, %struct.hostent* %15, i8* %16, i64 %17, i32* %18, i32* %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@AF_INET = global i32 0
define i32 @_nss_dev_tld_gethostbyname_r(i8* %0, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5) {
%7 = load i32, i32* @AF_INET
%8 = tail call i32 @_nss_dev_tld_gethostbyname2_r(i8* %0, i32 %7, %struct.hostent* %1, i8* %2, i64 %3, i32* %4, i32* %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ should_inline1(int, int, int);
main() { should_inline1(1, 0x6002, 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x6002,%esi
mov    $0x4,%edx
call   1030 <should_inline1@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x6002,%esi
mov    $0x4,%edx
call   1030 <should_inline1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @should_inline1(i32 1, i32 24578, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @should_inline1(i32 1, i32 24578, i32 4)
ret i32 0
}
void sys_sanitize(char *s) {}


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

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

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

LLVM IR (-O2):
define void @sys_sanitize(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ ENGINE_add(int /*<<< orphan*/ *);
int /*<<< orphan*/ ENGINE_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ *engine_opencl();
void ENGINE_load_opencl(void) {
  ENGINE *toadd = engine_opencl();
  if (!toadd)
    return;
  ENGINE_add(toadd);
  ENGINE_free(toadd);
  ERR_clear_error();
}


x86 assembly (clang, -O0):
<ENGINE_load_opencl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <engine_opencl@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1163 <ENGINE_load_opencl+0x23>
jmp    117c <ENGINE_load_opencl+0x3c>
mov    -0x8(%rbp),%rdi
call   1040 <ENGINE_add@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ENGINE_free@plt>
mov    $0x0,%al
call   1060 <ERR_clear_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENGINE_load_opencl>:
push   %rbx
xor    %eax,%eax
call   1050 <engine_opencl@plt>
test   %rax,%rax
je     1168 <ENGINE_load_opencl+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <ENGINE_add@plt>
mov    %rbx,%rdi
call   1030 <ENGINE_free@plt>
xor    %eax,%eax
pop    %rbx
jmp    1060 <ERR_clear_error@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @ENGINE_load_opencl() {
%1 = alloca i32*
%2 = call i32* (...) @engine_opencl()
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp ne i32* %3, null
br i1 %4, label %6, label %5
5: ; preds = %0
br label %12
6: ; preds = %0
%7 = load i32*, i32** %1
%8 = call i32 @ENGINE_add(i32* %7)
%9 = load i32*, i32** %1
%10 = call i32 @ENGINE_free(i32* %9)
%11 = call i32 (...) @ERR_clear_error()
br label %12
12: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @ENGINE_load_opencl() {
%1 = tail call i32* (...) @engine_opencl()
%2 = icmp eq i32* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @ENGINE_add(i32* %1)
%5 = tail call i32 @ENGINE_free(i32* %1)
%6 = tail call i32 (...) @ERR_clear_error()
br label %7
7: ; preds = %0, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ http_get(char *);
void next() { http_get("/next"); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  struct timeval *gt;
  gettimeofday(gt, NULL);
  printf("sec is %d,usec is %d\n", gt->tv_sec, gt->tv_usec);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %esi,%esi
call   1040 <gettimeofday@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [22 x i8] c"sec is %d,usec is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval*
store i32 0, i32* %1
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = load %struct.timeval*, %struct.timeval** %2
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [22 x i8] c"sec is %d,usec is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @gettimeofday(%struct.timeval* undef, i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 undef, i32 undef)
ret i32 0
}
void init_espfix_ap(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @init_espfix_ap(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int strftime(char *, int, char const *const, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int format_date(char *data, int sz) {
  time_t now;
  struct tm *tm;
  const char *const FORMAT = "%a, %d %b %Y %H:%M:%S %z";
  now = time(NULL);
  tm = localtime(&now);
  return strftime(data, sz, FORMAT, tm);
}


x86 assembly (clang, -O0):
<format_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
lea    0xe8b(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_date>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %z\00"
define i32 @format_date(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.tm*
%7 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = call i32 @time(i32* null)
store i32 %8, i32* %5
%9 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %9, %struct.tm** %6
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = load %struct.tm*, %struct.tm** %6
%13 = call i32 @strftime(i8* %10, i32 %11, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i32 0, i32 0), %struct.tm* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [25 x i8] c"%a, %d %b %Y %H:%M:%S %z\00"
define i32 @format_date(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i32 @strftime(i8* %0, i32 %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *emalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p == NULL) {
    fprintf(stderr, "FATAL: can't allocate memory.\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <emalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <emalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"FATAL: can't allocate memory.\0A\00"
define i8* @emalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"FATAL: can't allocate memory.\0A\00"
define noalias i8* @emalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
void initialize_dma(void) {}


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

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

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

LLVM IR (-O2):
define void @initialize_dma() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ barrier_memory();
void barrier_write(void) { barrier_memory(); }


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

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

LLVM IR (-O0):
define void @barrier_write() {
%1 = call i32 (...) @barrier_memory()
ret void
}

LLVM IR (-O2):
define void @barrier_write() {
%1 = tail call i32 (...) @barrier_memory()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_dobldobl_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(234, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_dobldobl_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xea,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_dobldobl_start_system>:
mov    $0xea,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_dobldobl_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 234, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_dobldobl_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 234, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ unreachable();
int fle22(int a) {
  unsigned i = a / 4;
  unsigned j = i - 2;
  if (j == 7)
    return -1;
  if (i <= 2)
    return 0;
  if (i <= j)
    unreachable();
  return 1;
}


x86 assembly (clang, -O0):
<fle22>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jne    1148 <fle22+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <fle22+0x68>
cmpl   $0x2,-0xc(%rbp)
ja     115e <fle22+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <fle22+0x68>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     1171 <fle22+0x61>
mov    $0x0,%al
call   1030 <unreachable@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fle22>:
mov    %edi,%ecx
and    $0xfffffffc,%ecx
mov    $0xffffffff,%eax
cmp    $0x24,%ecx
je     1122 <fle22+0x22>
lea    0x3(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x2,%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
setae  %al
ret

LLVM IR (-O0):
define i32 @fle22(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 4
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sub i32 %8, 2
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 7
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %24
13: ; preds = %1
%14 = load i32, i32* %4
%15 = icmp ule i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %2
br label %24
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp ule i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (...) @unreachable()
br label %23
23: ; preds = %21, %17
store i32 1, i32* %2
br label %24
24: ; preds = %23, %16, %12
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @fle22(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 36
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 4
%6 = icmp ugt i32 %5, 2
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  printf("1^0=%d, 0^0=%d, 1^1=%d\n", 0 ^ 1, 0 ^ 0, 1 ^ 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"1^0=%d, 0^0=%d, 1^1=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void writew(uint16_t value, uint32_t addr) {
  *((volatile uint16_t *)addr) = value;
}


x86 assembly (clang, -O0):
<writew>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writew>:
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @writew(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @writew(i32 %0, i64 %1) {
%3 = inttoptr i64 %1 to i32*
store volatile i32 %0, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x47() {
  Assert_real((iscntrl(71) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              360, ("iscntrl should be 0 for G"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x47>:
push   %rbp
mov    %rsp,%rbp
mov    $0x47,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x168,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x47>:
push   %rax
mov    $0x47,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x168,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for G\00"
define void @t_iscntrl_0x47() {
%1 = call i64 @iscntrl(i32 71)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for G\00"
define void @t_iscntrl_0x47() {
%1 = tail call i64 @iscntrl(i32 71)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 360, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct mm_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ BUG();
extern void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start,
                               unsigned long end) {
  BUG();
}


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

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

LLVM IR (-O0):
%struct.mm_struct = type { i32 }
define void @flush_tlb_pgtables(%struct.mm_struct* %0, i64 %1, i64 %2) {
%4 = alloca %struct.mm_struct*
%5 = alloca i64
%6 = alloca i64
store %struct.mm_struct* %0, %struct.mm_struct** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = call i32 (...) @BUG()
ret void
}

LLVM IR (-O2):
%struct.mm_struct = type { i32 }
define void @flush_tlb_pgtables(%struct.mm_struct* nocapture readnone %0, i64 %1, i64 %2) {
%4 = tail call i32 (...) @BUG()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pictdump_usage(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void pictdump_help(void) {
  pictdump_usage(stdout);
  fputs("Dump opcodes from a QuickDraw picture.\n"
        "\n"
        "options:\n"
        "  -all-picts    dump all PICT resources\n"
        "  -id <id>      dump PICT resource id <id>\n"
        "  -no-header    the picture does not have a 512-byte header\n",
        stdout);
}


x86 assembly (clang, -O0):
<pictdump_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <pictdump_usage@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pictdump_help>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
call   1040 <pictdump_usage@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [193 x i8] c"Dump opcodes from a QuickDraw picture.\0A\0Aoptions:\0A -all-picts dump all PICT resources\0A -id <id> dump PICT resource id <id>\0A -no-header the picture does not have a 512-byte header\0A\00"
define void @pictdump_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @pictdump_usage(i32 %1)
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [193 x i8] c"Dump opcodes from a QuickDraw picture.\0A\0Aoptions:\0A -all-picts dump all PICT resources\0A -id <id> dump PICT resource id <id>\0A -no-header the picture does not have a 512-byte header\0A\00"
define void @pictdump_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @pictdump_usage(i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([193 x i8], [193 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int f212(int *);
int f213(int *p) { return f212(p); }


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

x86 assembly (clang, -O2):
<f213>:
jmp    1030 <f212@plt>

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

LLVM IR (-O2):
define i32 @f213(i32* %0) {
%2 = tail call i32 @f212(i32* %0)
ret i32 %2
}
/* Variables and functions */
int getchar();
int getchi() { return (getchar()); }


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

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

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

LLVM IR (-O2):
define i32 @getchi() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_dobldobl_container_to_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(252, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_container_to_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xfc,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_container_to_target_system>:
mov    $0xfc,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_container_to_target_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 252, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_container_to_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 252, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_2040_coex_usage(void) {
  printf("\nUsage : sys_cfg_2040_coex [ENABLE]\n");
  printf("\nOptions: ENABLE  0 - disable");
  printf("\n                 1 - enable");
  printf(
      "\n         empty - Get current 20/40 BSS coexistence configuration\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_sys_cfg_2040_coex_usage>:
push   %rax
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
call   1040 <printf@plt>
lea    0xf13(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0AUsage : sys_cfg_2040_coex [ENABLE]\0A\00"
@.str.1 = [30 x i8] c"\0AOptions: ENABLE 0 - disable\00"
@.str.2 = [29 x i8] c"\0A 1 - enable\00"
@.str.3 = [67 x i8] c"\0A empty - Get current 20/40 BSS coexistence configuration\0A\00"
define void @print_sys_cfg_2040_coex_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"\0AOptions: ENABLE 0 - disable\00"
@.str.2 = [29 x i8] c"\0A 1 - enable\00"
@str = [36 x i8] c"\0AUsage : sys_cfg_2040_coex [ENABLE]\00"
@str.4 = [66 x i8] c"\0A empty - Get current 20/40 BSS coexistence configuration\00"
define void @print_sys_cfg_2040_coex_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.4, i64 0, i64 0))
ret void
}
const char *mb_ver_string(void) { return "1.2"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"1.2\00"
define i8* @mb_ver_string() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"1.2\00"
define i8* @mb_ver_string() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void cmio_err(void) {
  fputs("ERROR: Program terminated. See information file for details.\n",
        stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<cmio_err>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cmio_err>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [62 x i8] c"ERROR: Program terminated. See information file for details.\0A\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @cmio_err() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [62 x i8] c"ERROR: Program terminated. See information file for details.\0A\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @cmio_err() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
double sg(double, double, double);
double price(double price, double g, double r, double t) {
  return (price * sg(g, r, t));
}


x86 assembly (clang, -O0):
<price>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <sg@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<price>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
call   1030 <sg@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @price(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call double @sg(double %10, double %11, double %12)
%14 = fmul double %9, %13
ret double %14
}

LLVM IR (-O2):
define double @price(double %0, double %1, double %2, double %3) {
%5 = tail call double @sg(double %1, double %2, double %3)
%6 = fmul double %5, %0
ret double %6
}
int actuator_filelogger_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @actuator_filelogger_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char const *, char *, int);
int call_p(const char *opcode) {
  return (!strncmp(opcode, "bsr", 3) || !strncmp(opcode, "jsr", 3));
}


x86 assembly (clang, -O0):
<call_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1161 <call_p+0x51>
mov    -0x8(%rbp),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_p>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1148 <call_p+0x38>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"bsr\00"
@.str.1 = [4 x i8] c"jsr\00"
define i32 @call_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"bsr\00"
@.str.1 = [4 x i8] c"jsr\00"
define i32 @call_p(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
int range_strm_offset(const unsigned sub_hdr_ver, const unsigned strm_offset) {
  if (sub_hdr_ver == 0 && strm_offset != 0x40) {
    return 1;
  } else if (strm_offset != 0x44) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<range_strm_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <range_strm_offset+0x2a>
cmpl   $0x40,-0xc(%rbp)
je     112a <range_strm_offset+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    114c <range_strm_offset+0x4c>
cmpl   $0x44,-0xc(%rbp)
je     1140 <range_strm_offset+0x40>
movl   $0x1,-0x4(%rbp)
jmp    114c <range_strm_offset+0x4c>
jmp    1145 <range_strm_offset+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_strm_offset>:
test   %edi,%edi
sete   %al
cmp    $0x44,%esi
setne  %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @range_strm_offset(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp ne i32 %1, 68
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}