xunge/DecIR huggingface dataset:
int Checkmonth(int month) {
  if (month < 1 || month > 12) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<Checkmonth>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     111b <Checkmonth+0x1b>
cmpl   $0xc,-0x8(%rbp)
jle    1127 <Checkmonth+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <Checkmonth+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Checkmonth>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0xc,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @Checkmonth(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 12
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int fill_normal_config_req(unsigned char *, int, int, int,
                           int /*<<< orphan*/ *);
int fill_auth_policy_req(unsigned char *buf) {
  return fill_normal_config_req(buf, 0x20, 0x8, 0x0, NULL);
}


x86 assembly (clang, -O0):
<fill_auth_policy_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <fill_normal_config_req@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_auth_policy_req>:
mov    $0x20,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <fill_normal_config_req@plt>

LLVM IR (-O0):
define i32 @fill_auth_policy_req(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fill_normal_config_req(i8* %3, i32 32, i32 8, i32 0, i32* null)
ret i32 %4
}

LLVM IR (-O2):
define i32 @fill_auth_policy_req(i8* %0) {
%2 = tail call i32 @fill_normal_config_req(i8* %0, i32 32, i32 8, i32 0, i32* null)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE1(int);
int /*<<< orphan*/ ROR8(int /*<<< orphan*/);
void Op76E1(void) { ROR8(DirectIndexedXE1(3)); }


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

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

LLVM IR (-O0):
define void @Op76E1() {
%1 = call i32 @DirectIndexedXE1(i32 3)
%2 = call i32 @ROR8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op76E1() {
%1 = tail call i32 @DirectIndexedXE1(i32 3)
%2 = tail call i32 @ROR8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int chislo, kvadrat, kub;
  scanf("%d", &chislo);
  kvadrat = chislo * chislo;
  kub = chislo * chislo * chislo;
  printf("%d\n", kvadrat);
  printf("%d\n", kub);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
int do_066() { return 66; }


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

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

LLVM IR (-O0):
define i32 @do_066() {
ret i32 66
}

LLVM IR (-O2):
define i32 @do_066() {
ret i32 66
}
__attribute__((no)) void func_4(void) {}


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

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

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

LLVM IR (-O2):
define void @func_4() {
ret void
}
int get_dlen(void) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fio_write_zeroes(int /*<<< orphan*/ *, int);
scalar_t__ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int fio_abs_write_zeroes(FILE *f, long offset, int n) {
  if (fseek(f, offset, SEEK_SET) != 0)
    return -1;
  return (fio_write_zeroes(f, n));
}


x86 assembly (clang, -O0):
<fio_abs_write_zeroes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    0x2e9e(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
cmp    $0x0,%rax
je     115f <fio_abs_write_zeroes+0x3f>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <fio_abs_write_zeroes+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <fio_write_zeroes@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_abs_write_zeroes>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
test   %rax,%rax
je     1147 <fio_abs_write_zeroes+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fio_write_zeroes@plt>

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

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @fio_abs_write_zeroes(i32* %0, i64 %1, i32 %2) {
%4 = load i32, i32* @SEEK_SET
%5 = tail call i64 @fseek(i32* %0, i64 %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @fio_write_zeroes(i32* %0, i32 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ %8, %7 ], [ -1, %3 ]
ret i32 %10
}
void foo35() {}


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

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

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

LLVM IR (-O2):
define void @foo35() {
ret void
}
int test_11(unsigned char *x, unsigned short *y) {
  int yy = y[1];
  x[1] = yy;
  return yy;
}


x86 assembly (clang, -O0):
<test_11>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzwl 0x2(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_11>:
movzwl 0x2(%rsi),%eax
mov    %al,0x1(%rdi)
ret

LLVM IR (-O0):
define i32 @test_11(i8* %0, i16* %1) {
%3 = alloca i8*
%4 = alloca i16*
%5 = alloca i32
store i8* %0, i8** %3
store i16* %1, i16** %4
%6 = load i16*, i16** %4
%7 = getelementptr inbounds i16, i16* %6, i64 1
%8 = load i16, i16* %7
%9 = zext i16 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_11(i8* nocapture writeonly %0, i16* nocapture %1) {
%3 = getelementptr inbounds i16, i16* %1, i64 1
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = trunc i16 %4 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ si475xFMRX_set_volume(unsigned char);
void si47xxFMRX_set_volume(int volume) {
  si475xFMRX_set_volume((unsigned char)(volume & 0xff));
}


x86 assembly (clang, -O0):
<si47xxFMRX_set_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
movzbl %al,%edi
call   1030 <si475xFMRX_set_volume@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si47xxFMRX_set_volume>:
movzbl %dil,%edi
jmp    1030 <si475xFMRX_set_volume@plt>

LLVM IR (-O0):
define void @si47xxFMRX_set_volume(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = trunc i32 %4 to i8
%6 = call i32 @si475xFMRX_set_volume(i8 zeroext %5)
ret void
}

LLVM IR (-O2):
define void @si47xxFMRX_set_volume(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @si475xFMRX_set_volume(i8 zeroext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
__attribute__((unused)) void CYCONFIGCPY(void *dest, const void *src,
                                         size_t n) {
  (void)memcpy(dest, src, n);
}


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

LLVM IR (-O0):
define void @CYCONFIGCPY(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
%10 = call i32 @memcpy(i8* %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @CYCONFIGCPY(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
ssize_t write(int fildes, const void *buf, size_t nbyte) { return -1; }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture readnone %1, i64 %2) {
ret i32 -1
}
int alpha(char a) {
  switch (a) {
  case 'm':
    return 1000;
  case 'c':
    return 100;
  case 'x':
    return 10;
  case 'i':
    return 1;
  }
}


x86 assembly (clang, -O0):
<alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffff9d,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x15,%eax
ja     115f <alpha+0x5f>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3e8,-0x4(%rbp)
jmp    115f <alpha+0x5f>
movl   $0x64,-0x4(%rbp)
jmp    115f <alpha+0x5f>
movl   $0xa,-0x4(%rbp)
jmp    115f <alpha+0x5f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha>:
cmp    $0x78,%edi
je     111a <alpha+0x1a>
cmp    $0x69,%edi
je     1120 <alpha+0x20>
mov    $0x3e8,%eax
cmp    $0x63,%edi
jne    1125 <alpha+0x25>
mov    $0x64,%eax
ret
mov    $0xa,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @alpha(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 109, label %6
i32 99, label %7
i32 120, label %8
i32 105, label %9
]
6: ; preds = %1
store i32 1000, i32* %2
br label %10
7: ; preds = %1
store i32 100, i32* %2
br label %10
8: ; preds = %1
store i32 10, i32* %2
br label %10
9: ; preds = %1
store i32 1, i32* %2
br label %10
10: ; preds = %6, %7, %8, %9, %1
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @alpha(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 105, label %5
i32 99, label %3
i32 120, label %4
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %3, %4, %5, %1
%7 = phi i32 [ 1, %5 ], [ 10, %4 ], [ 100, %3 ], [ 1000, %1 ]
ret i32 %7
}
void gdk_screen_get_system_visual() {}


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

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

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

LLVM IR (-O2):
define void @gdk_screen_get_system_visual() {
ret void
}
void *SCRemalloc(void *buffer, long int bufferlen, long int length) {
  unsigned char *memory = 0;
  memory = (unsigned char *)malloc(length);
  if (memory)
    memset(memory, 0, length);
  if (memory)
    memcpy(memory, buffer, bufferlen);
  (buffer);
  return memory;
}


x86 assembly (clang, -O0):
<SCRemalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1173 <SCRemalloc+0x43>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
cmpq   $0x0,-0x20(%rbp)
je     118f <SCRemalloc+0x5f>
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCRemalloc>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r12
test   %rax,%rax
je     1175 <SCRemalloc+0x45>
xor    %edx,%edx
sub    %r14,%rbx
cmovae %rbx,%rdx
mov    %r12,%rdi
add    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <memcpy@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @SCRemalloc(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i8* null, i8** %7
%8 = load i64, i64* %6
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %3
%13 = load i8*, i8** %7
%14 = load i64, i64* %6
br label %15
15: ; preds = %12, %3
%16 = load i8*, i8** %7
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i8*, i8** %7
%20 = load i8*, i8** %4
%21 = load i64, i64* %5
br label %22
22: ; preds = %18, %15
%23 = load i8*, i8** %4
%24 = load i8*, i8** %7
ret i8* %24
}

LLVM IR (-O2):
define noalias i8* @SCRemalloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i8* @malloc(i64 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = call i64 @llvm.usub.sat.i64(i64 %2, i64 %1)
%8 = getelementptr i8, i8* %4, i64 %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %4, i8* align 1 %0, i64 %1, i1 false)
br label %9
9: ; preds = %3, %6
ret i8* %4
}
int makeOdd(int c) {
  do {
    c = c / 2;
  } while ((!((c)&1)));
  return c;
}


x86 assembly (clang, -O0):
<makeOdd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1107 <makeOdd+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeOdd>:
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
sar    %eax
test   $0x1,%al
je     1110 <makeOdd+0x10>
ret

LLVM IR (-O0):
define i32 @makeOdd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 2
store i32 %5, i32* %2
br label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = and i32 %7, 1
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %3, label %11
11: ; preds = %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @makeOdd(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = sdiv i32 %3, 2
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int _MLWriteLog(const char *buf, int buflen) { return fputs(buf, stdout); }


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

x86 assembly (clang, -O2):
<_MLWriteLog>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define i32 @_MLWriteLog(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ tz;
struct timezone {
  int tz_dsttime;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
int /*<<< orphan*/ memset(struct timezone *, int /*<<< orphan*/, int);
int get_tz_dst(void) {
  struct timezone tz;
  struct timeval tv;
  memset(&tz, 0, sizeof(tz));
  gettimeofday(&tv, &tz);
  return tz.tz_dsttime;
}


x86 assembly (clang, -O0):
<get_tz_dst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tz_dst>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
define i32 @get_tz_dst() {
%1 = alloca %struct.timezone
%2 = alloca %struct.timeval
%3 = call i32 @memset(%struct.timezone* %1, i32 0, i32 4)
%4 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* %1)
%5 = getelementptr inbounds %struct.timezone, %struct.timezone* %1, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
%struct.timezone = type { i32 }
%struct.timeval = type { i32 }
define i32 @get_tz_dst() {
%1 = alloca %struct.timezone
%2 = alloca %struct.timeval
%3 = bitcast %struct.timezone* %1 to i8*
%4 = bitcast %struct.timeval* %2 to i8*
%5 = call i32 @memset(%struct.timezone* %1, i32 0, i32 4)
%6 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* %1)
%7 = getelementptr inbounds %struct.timezone, %struct.timezone* %1, i64 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
}
/* Variables and functions */
int nrf_drv_usbd_errata_type_52840();
bool nrf_drv_usbd_errata_type_52840_eng_a(void) {
  return nrf_drv_usbd_errata_type_52840();
}


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

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

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

LLVM IR (-O2):
define i32 @nrf_drv_usbd_errata_type_52840_eng_a() {
%1 = tail call i32 (...) @nrf_drv_usbd_errata_type_52840()
ret i32 %1
}
/* Type definitions */
struct dynref__obj {
  int dummy;
};

/* Variables and functions */
int dynref__close(struct dynref__obj *p, bool del) {}


x86 assembly (clang, -O0):
<dynref__close>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dynref__obj = type { i32 }
define i32 @dynref__close(%struct.dynref__obj* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.dynref__obj*
%5 = alloca i32
store %struct.dynref__obj* %0, %struct.dynref__obj** %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.dynref__obj = type { i32 }
define i32 @dynref__close(%struct.dynref__obj* nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ta_oom_b(int /*<<< orphan*/);
void *ta_realloc_size(void *, void *, size_t);
void *ta_xrealloc_size(void *ta_parent, void *ptr, size_t size) {
  ptr = ta_realloc_size(ta_parent, ptr, size);
  ta_oom_b(ptr || !size);
  return ptr;
}


x86 assembly (clang, -O0):
<ta_xrealloc_size>:
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   1040 <ta_realloc_size@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x19(%rbp)
jne    1166 <ta_xrealloc_size+0x46>
cmpq   $0x0,-0x18(%rbp)
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ta_oom_b@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ta_xrealloc_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1040 <ta_realloc_size@plt>
mov    %rax,%r14
test   %rax,%rax
setne  %al
test   %rbx,%rbx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <ta_oom_b@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @ta_xrealloc_size(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
%10 = call i8* @ta_realloc_size(i8* %7, i8* %8, i64 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %17, label %13
13: ; preds = %3
%14 = load i64, i64* %6
%15 = icmp ne i64 %14, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %13, %3
%18 = phi i1 [ true, %3 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
%20 = call i32 @ta_oom_b(i32 %19)
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @ta_xrealloc_size(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @ta_realloc_size(i8* %0, i8* %1, i64 %2)
%5 = icmp ne i8* %4, null
%6 = icmp eq i64 %2, 0
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
%9 = tail call i32 @ta_oom_b(i32 %8)
ret i8* %4
}
void data_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @data_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log10(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double f;
  scanf("%lf", &f);
  printf("%lf", log10(f));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1050 <log10@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
call   1050 <log10@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call i32 @log10(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
scalar_t__ get_length(int *, int, int);
scalar_t__ get_length_brute(int *, int, int);
int test_target_large() {
  int array[] = {5, 2, 3, 1, 4};
  return 0 == get_length_brute(array, 5, 30) && 0 == get_length(array, 5, 30);
}


x86 assembly (clang, -O0):
<test_target_large>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
mov    $0x1e,%edx
call   1030 <get_length_brute@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0x21(%rbp)
jne    118e <test_target_large+0x6e>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
mov    $0x1e,%edx
call   1040 <get_length@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_target_large>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x1e,%edx
call   1030 <get_length_brute@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     115a <test_target_large+0x3a>
add    $0x18,%rsp
ret
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x1e,%edx
call   1040 <get_length@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_target_large.array = [5 x i32] [i32 5, i32 2, i32 3, i32 1, i32 4]
define i32 @test_target_large() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i64 @get_length_brute(i32* %3, i32 5, i32 30)
%5 = icmp eq i64 0, %4
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%8 = call i64 @get_length(i32* %7, i32 5, i32 30)
%9 = icmp eq i64 0, %8
br label %10
10: ; preds = %6, %0
%11 = phi i1 [ false, %0 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@__const.test_target_large.array = [5 x i32] [i32 5, i32 2, i32 3, i32 1, i32 4]
define i32 @test_target_large() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i64 @get_length_brute(i32* %3, i32 5, i32 30)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i64 @get_length(i32* %3, i32 5, i32 30)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void system_error(const char *error_msg) {
  perror(error_msg);
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<system_error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @system_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void anetTcpAccept(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               44, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<anetTcpAccept>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2c,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<anetTcpAccept>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x2c,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.anetTcpAccept = [14 x i8] c"anetTcpAccept\00"
define void @anetTcpAccept() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.anetTcpAccept, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.anetTcpAccept = [14 x i8] c"anetTcpAccept\00"
define void @anetTcpAccept() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 44, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.anetTcpAccept, i64 0, i64 0))
ret void
}
void usbbus_led_printer(struct bled_priv *bp, struct seq_file *m) {}


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

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

LLVM IR (-O0):
%struct.bled_priv = type opaque
%struct.seq_file = type opaque
define void @usbbus_led_printer(%struct.bled_priv* %0, %struct.seq_file* %1) {
%3 = alloca %struct.bled_priv*
%4 = alloca %struct.seq_file*
store %struct.bled_priv* %0, %struct.bled_priv** %3
store %struct.seq_file* %1, %struct.seq_file** %4
ret void
}

LLVM IR (-O2):
%struct.bled_priv = type opaque
%struct.seq_file = type opaque
define void @usbbus_led_printer(%struct.bled_priv* nocapture %0, %struct.seq_file* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_long_wait(long *ivar, long cmp_value) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_long_wait(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_long_wait(i64* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M753_f(char *s) {
  debug("M753_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


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

x86 assembly (clang, -O2):
<M753_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M753_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M753_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M753_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M753_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
long kernel__Int__rshift(long self, long p0) {
  long var;
  long var1;
  var1 = self >> p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Int__rshift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sar    %cl,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Int__rshift>:
mov    %rsi,%rcx
mov    %rdi,%rax
sar    %cl,%rax
ret

LLVM IR (-O0):
define i64 @kernel__Int__rshift(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = ashr i64 %7, %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
store i64 %10, i64* %5
br label %11
11: ; preds = %2
%12 = load i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @kernel__Int__rshift(i64 %0, i64 %1) {
%3 = ashr i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: t_credstore [-sabi] principal [{key value} ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: t_credstore [-sabi] principal [{key value} ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"Usage: t_credstore [-sabi] principal [{key value} ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *_memmem(void const *, size_t, void const *, size_t, void *);
void *hfuzz_memmem(const void *haystack, size_t haystacklen, const void *needle,
                   size_t needlelen, void *addr) {
  return _memmem(haystack, haystacklen, needle, needlelen, addr);
}


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

x86 assembly (clang, -O2):
<hfuzz_memmem>:
jmp    1030 <_memmem@plt>

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

LLVM IR (-O2):
define i8* @hfuzz_memmem(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4) {
%6 = tail call i8* @_memmem(i8* %0, i64 %1, i8* %2, i64 %3, i8* %4)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ I2cResetFrontpanelLed();
void resetLED(void) { I2cResetFrontpanelLed(); }


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

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

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

LLVM IR (-O2):
define void @resetLED() {
%1 = tail call i32 (...) @I2cResetFrontpanelLed()
ret void
}
int myAddFunc(int a1, int a2) { return (a1 + a2); }


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

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

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

LLVM IR (-O2):
define i32 @myAddFunc(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
extern void pcibios_set_master(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pcibios_set_master(%struct.pci_dev* nocapture %0) {
ret void
}
int count_newlines(char *str) {
  int count;
  count = 0;
  while (*str != '\0') {
    if (*str == '\n')
      count++;
    str++;
  }
  return (count);
}


x86 assembly (clang, -O0):
<count_newlines>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <count_newlines+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1138 <count_newlines+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <count_newlines+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_newlines>:
xor    %eax,%eax
jmp    1117 <count_newlines+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0xa,%cl
je     1110 <count_newlines+0x10>
test   %cl,%cl
jne    1113 <count_newlines+0x13>
ret

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

LLVM IR (-O2):
define i32 @count_newlines(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i32 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 10, label %6
]
6: ; preds = %2
%7 = add nsw i32 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strsignal(int);
void ourhandler(int signo) {
  printf("Haha! You can't stop me with signal %s!!\n", strsignal(signo));
}


x86 assembly (clang, -O0):
<ourhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strsignal@plt>
mov    %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ourhandler>:
push   %rax
call   1040 <strsignal@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Haha! You can't stop me with signal %s!!\0A\00"
define void @ourhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @strsignal(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Haha! You can't stop me with signal %s!!\0A\00"
define void @ourhandler(i32 %0) {
%2 = tail call i8* @strsignal(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ matNd_setColumn(double *, double const *, int const, int);
void mat4d_setColumn(double matrix[16], const double v[4], const int col) {
  matNd_setColumn(matrix, v, col, 4);
}


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

x86 assembly (clang, -O2):
<mat4d_setColumn>:
mov    $0x4,%ecx
jmp    1030 <matNd_setColumn@plt>

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

LLVM IR (-O2):
define void @mat4d_setColumn(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @matNd_setColumn(double* %0, double* %1, i32 %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET6;
int /*<<< orphan*/ SOCK_DGRAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int get_socket_for_afinet6() {
  int fd = -1;
  fd = socket(AF_INET6, SOCK_DGRAM, 0);
  return fd;
}


x86 assembly (clang, -O0):
<get_socket_for_afinet6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_socket_for_afinet6>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET6 = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @get_socket_for_afinet6() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = load i32, i32* @AF_INET6
%3 = load i32, i32* @SOCK_DGRAM
%4 = call i32 @socket(i32 %2, i32 %3, i32 0)
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@AF_INET6 = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @get_socket_for_afinet6() {
%1 = load i32, i32* @AF_INET6
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}