xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void lamp_off(const char id[2]) {
  char command[5];
  command[0] = 'L';
  command[1] = id[0];
  command[2] = id[1];
  command[3] = '0';
  command[4] = '\n';
  printf("%s", command);
}


x86 assembly (clang, -O0):
<lamp_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x4c,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0xb(%rbp)
movb   $0x30,-0xa(%rbp)
movb   $0xa,-0x9(%rbp)
lea    -0xd(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lamp_off>:
push   %rax
movb   $0x4c,0x3(%rsp)
mov    (%rdi),%al
mov    %al,0x4(%rsp)
mov    0x1(%rdi),%al
mov    %al,0x5(%rsp)
movw   $0xa30,0x6(%rsp)
lea    0xecf(%rip),%rdi
lea    0x3(%rsp),%rsi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @lamp_off(i8* nocapture %0) {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
store i8 76, i8* %3
%4 = load i8, i8* %0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 1
store i8 %4, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 2
store i8 %7, i8* %8
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 3
store i8 48, i8* %9
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 4
store i8 10, i8* %10
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
void bit(p, a, s) struct h8_opcode *p;
char *a;
int s;
{ printf("%s\n", a); }


x86 assembly (clang, -O0):
<bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit>:
mov    %rsi,%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
%struct.h8_opcode = type opaque
define void @bit(%struct.h8_opcode* nocapture readnone %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) %1)
ret void
}
/* Variables and functions */
int rand();
int grand(int min, int max) {
  int n;
  n = rand();
  n = n % max;
  n = n + min;
  return n;
}


x86 assembly (clang, -O0):
<grand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @grand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @rand()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = srem i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @grand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ AF_PACKET;
int /*<<< orphan*/ ETH_P_ALL;
int /*<<< orphan*/ SOCK_RAW;
int /*<<< orphan*/ htons(int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int init_socket() {
  int sock_fd;
  if ((sock_fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0) {
    return (-1);
  }
  return sock_fd;
}


x86 assembly (clang, -O0):
<init_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1030 <htons@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
call   1040 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    1173 <init_socket+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <init_socket+0x59>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_socket>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ea6(%rip),%rax
mov    (%rax),%ebx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ebp
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1030 <htons@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <socket@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@AF_PACKET = global i32 0
@SOCK_RAW = global i32 0
@ETH_P_ALL = global i32 0
define i32 @init_socket() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @AF_PACKET
%4 = load i32, i32* @SOCK_RAW
%5 = load i32, i32* @ETH_P_ALL
%6 = call i32 @htons(i32 %5)
%7 = call i32 @socket(i32 %3, i32 %4, i32 %6)
store i32 %7, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 -1, i32* %1
br label %12
10: ; preds = %0
%11 = load i32, i32* %2
store i32 %11, i32* %1
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@AF_PACKET = global i32 0
@SOCK_RAW = global i32 0
@ETH_P_ALL = global i32 0
define i32 @init_socket() {
%1 = load i32, i32* @AF_PACKET
%2 = load i32, i32* @SOCK_RAW
%3 = load i32, i32* @ETH_P_ALL
%4 = tail call i32 @htons(i32 %3)
%5 = tail call i32 @socket(i32 %1, i32 %2, i32 %4)
%6 = icmp sgt i32 %5, -1
%7 = select i1 %6, i32 %5, i32 -1
ret i32 %7
}
void loadOctavesPreset() {}


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

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

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

LLVM IR (-O2):
define void @loadOctavesPreset() {
ret void
}
void acct_account_cputime(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @acct_account_cputime(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
struct btf_type {
  int dummy;
};
struct btf_member {
  int dummy;
};

/* Variables and functions */
struct btf_member *btf_members(const struct btf_type *t) {
  return (struct btf_member *)(t + 1);
}


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

x86 assembly (clang, -O2):
<btf_members>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
%struct.btf_member = type { i32 }
%struct.btf_type = type { i32 }
define %struct.btf_member* @btf_members(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = getelementptr inbounds %struct.btf_type, %struct.btf_type* %3, i64 1
%5 = bitcast %struct.btf_type* %4 to %struct.btf_member*
ret %struct.btf_member* %5
}

LLVM IR (-O2):
%struct.btf_member = type { i32 }
%struct.btf_type = type { i32 }
define %struct.btf_member* @btf_members(%struct.btf_type* readnone %0) {
%2 = getelementptr inbounds %struct.btf_type, %struct.btf_type* %0, i64 1
%3 = bitcast %struct.btf_type* %2 to %struct.btf_member*
ret %struct.btf_member* %3
}
/* Variables and functions */
int /*<<< orphan*/ print_num(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This program uses a recursive function to print the numbers from 1 "
         "to 10.\n");
  print_num(1);
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1050 <print_num@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [75 x i8] c"This program uses a recursive function to print the numbers from 1 to 10.\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @print_num(i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [74 x i8] c"This program uses a recursive function to print the numbers from 1 to 10.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @print_num(i32 1)
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int is_prime(char);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char number;
  int result;
  scanf("%c", &number);
  result = is_prime(number);
  printf("%d", result);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1040 <is_prime@plt>
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = call i32 @is_prime(i8 signext %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ power(long long, long long, long long);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, long long *, long long *, long long *);
int main() {
  long long base, exponent, p;
  scanf("%lli %lli %lli", &base, &exponent, &p);
  printf("The value of given expression is %lli", power(base, exponent, p));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
call   1030 <power@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%lli %lli %lli\00"
@.str.1 = [38 x i8] c"The value of given expression is %lli\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3, i64* %4)
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = call i32 @power(i64 %6, i64 %7, i64 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%lli %lli %lli\00"
@.str.1 = [38 x i8] c"The value of given expression is %lli\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i64* %3)
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = load i64, i64* %3
%11 = call i32 @power(i64 %8, i64 %9, i64 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcrossing_send_event(void *_p) {
  return (int)((XEvent *)_p)->xcrossing.send_event;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcrossing_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xcrossing_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xcrossing_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void rop3_26_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S & T;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


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

x86 assembly (clang, -O2):
<rop3_26_1_0>:
mov    %edx,%eax
and    %sil,%al
mov    (%rdi),%cl
or     %cl,%al
xor    %dl,%al
xor    %al,%cl
and    %sil,%cl
xor    %al,%cl
mov    %cl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_26_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %2
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %5, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
int checker_read_int(int, char const *, int, int *);
int checker_read_corr_int(const char *name, int eof_error_flag, int *p_val) {
  return checker_read_int(2, name, eof_error_flag, p_val);
}


x86 assembly (clang, -O0):
<checker_read_corr_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x2,%edi
call   1030 <checker_read_int@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker_read_corr_int>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x2,%edi
jmp    1030 <checker_read_int@plt>

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

LLVM IR (-O2):
define i32 @checker_read_corr_int(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @checker_read_int(i32 2, i8* %0, i32 %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clk_init();
int /*<<< orphan*/ irq_init();
int /*<<< orphan*/ mux_init();
int /*<<< orphan*/ reset_ctrl();
void mcu_init() {
  clk_init();
  reset_ctrl();
  irq_init();
  mux_init();
}


x86 assembly (clang, -O0):
<mcu_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <clk_init@plt>
mov    $0x0,%al
call   1030 <reset_ctrl@plt>
mov    $0x0,%al
call   1040 <irq_init@plt>
mov    $0x0,%al
call   1060 <mux_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcu_init>:
push   %rax
xor    %eax,%eax
call   1050 <clk_init@plt>
xor    %eax,%eax
call   1030 <reset_ctrl@plt>
xor    %eax,%eax
call   1040 <irq_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <mux_init@plt>

LLVM IR (-O0):
define void @mcu_init() {
%1 = call i32 (...) @clk_init()
%2 = call i32 (...) @reset_ctrl()
%3 = call i32 (...) @irq_init()
%4 = call i32 (...) @mux_init()
ret void
}

LLVM IR (-O2):
define void @mcu_init() {
%1 = tail call i32 (...) @clk_init()
%2 = tail call i32 (...) @reset_ctrl()
%3 = tail call i32 (...) @irq_init()
%4 = tail call i32 (...) @mux_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t const);
char *xmalloc(size_t const);
char *xstrndup(const char *s, const size_t n) {
  char *result;
  result = xmalloc(n + 1);
  strncpy(result, s, n);
  result[n] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @xmalloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @strncpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %4
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
void capturingNon2CAPTURING_NON() {}


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

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

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

LLVM IR (-O2):
define void @capturingNon2CAPTURING_NON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void sigstp() { fputs("\x1b[0m", stdout); }


x86 assembly (clang, -O0):
<sigstp>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[0m\00"
@stdout = global i32 0
define void @sigstp() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
@stdout = global i32 0
define void @sigstp() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void foo060() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @I444Rotate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nr_free_matrix(float **m, long nrl, long nrh, long ncl, long nch) {
  free((char *)(m[nrl] + ncl - 1));
  free((char *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<nr_free_matrix>:
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),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nr_free_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rcx,4),%rdi
add    $0xfffffffffffffffc,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @nr_free_matrix(float** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca float**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store float** %0, float*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load float**, float*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds float*, float** %11, i64 %12
%14 = load float*, float** %13
%15 = load i64, i64* %9
%16 = getelementptr inbounds float, float* %14, i64 %15
%17 = getelementptr inbounds float, float* %16, i64 -1
%18 = bitcast float* %17 to i8*
%19 = call i32 @free(i8* %18)
%20 = load float**, float*** %6
%21 = load i64, i64* %7
%22 = getelementptr inbounds float*, float** %20, i64 %21
%23 = getelementptr inbounds float*, float** %22, i64 -1
%24 = bitcast float** %23 to i8*
%25 = call i32 @free(i8* %24)
ret void
}

LLVM IR (-O2):
define void @nr_free_matrix(float** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds float*, float** %0, i64 %1
%7 = load float*, float** %6
%8 = getelementptr inbounds float, float* %7, i64 %3
%9 = getelementptr inbounds float, float* %8, i64 -1
%10 = bitcast float* %9 to i8*
%11 = tail call i32 @free(i8* %10)
%12 = getelementptr inbounds float*, float** %6, i64 -1
%13 = bitcast float** %12 to i8*
%14 = tail call i32 @free(i8* %13)
ret void
}
double dbl_flt_min3(float a, double b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<dbl_flt_min3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1139 <dbl_flt_min3+0x39>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1143 <dbl_flt_min3+0x43>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_flt_min3>:
cvtss2sd %xmm0,%xmm0
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dbl_flt_min3(float %0, double %1) {
%3 = alloca float
%4 = alloca double
store float %0, float* %3
store double %1, double* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load double, double* %4
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load float, float* %3
%11 = fpext float %10 to double
br label %14
12: ; preds = %2
%13 = load double, double* %4
br label %14
14: ; preds = %12, %9
%15 = phi double [ %11, %9 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @dbl_flt_min3(float %0, double %1) {
%3 = fpext float %0 to double
%4 = fcmp olt double %3, %1
%5 = select i1 %4, double %3, double %1
ret double %5
}
void assertions2FIRSTPOSITION() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_get_type() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ *);
__m128i x(char *s) {
  __m128i sz, z, mvec;
  s -= ((unsigned long)s) % 16;
  sz = _mm_load_si128((__m128i *)s);
  return sz;
}


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xf,%rdx
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x>:
and    $0xfffffffffffffff0,%rdi
jmp    1030 <_mm_load_si128@plt>

LLVM IR (-O0):
define i32 @x(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
%8 = urem i64 %7, 16
%9 = load i8*, i8** %2
%10 = sub i64 0, %8
%11 = getelementptr inbounds i8, i8* %9, i64 %10
store i8* %11, i8** %2
%12 = load i8*, i8** %2
%13 = bitcast i8* %12 to i32*
%14 = call i32 @_mm_load_si128(i32* %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @x(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 15
%4 = sub nsw i64 0, %3
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = bitcast i8* %5 to i32*
%7 = tail call i32 @_mm_load_si128(i32* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ZowiTone(int, int, int, int);
void S_mode1() {
  for (int i = 1318.51; i < 1760; i = i * 1.04) {
    ZowiTone(10, i, 20, 10);
  }
}


x86 assembly (clang, -O0):
<S_mode1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x526,-0x4(%rbp)
cmpl   $0x6e0,-0x4(%rbp)
jge    115d <S_mode1+0x4d>
mov    -0x4(%rbp),%esi
mov    $0xa,%ecx
mov    $0x14,%edx
mov    %ecx,%edi
call   1030 <ZowiTone@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <S_mode1+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_mode1>:
push   %rax
mov    $0xa,%edi
mov    $0x526,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x55a,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x590,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x5c8,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x603,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x640,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x680,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
mov    $0x6c2,%esi
mov    $0x14,%edx
mov    $0xa,%ecx
pop    %rax
jmp    1030 <ZowiTone@plt>

LLVM IR (-O0):
define void @S_mode1() {
%1 = alloca i32
store i32 1318, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1760
br i1 %4, label %5, label %13
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @ZowiTone(i32 10, i32 %6, i32 20, i32 10)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 1.040000e+00
%12 = fptosi double %11 to i32
store i32 %12, i32* %1
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @S_mode1() {
%1 = tail call i32 @ZowiTone(i32 10, i32 1318, i32 20, i32 10)
%2 = tail call i32 @ZowiTone(i32 10, i32 1370, i32 20, i32 10)
%3 = tail call i32 @ZowiTone(i32 10, i32 1424, i32 20, i32 10)
%4 = tail call i32 @ZowiTone(i32 10, i32 1480, i32 20, i32 10)
%5 = tail call i32 @ZowiTone(i32 10, i32 1539, i32 20, i32 10)
%6 = tail call i32 @ZowiTone(i32 10, i32 1600, i32 20, i32 10)
%7 = tail call i32 @ZowiTone(i32 10, i32 1664, i32 20, i32 10)
%8 = tail call i32 @ZowiTone(i32 10, i32 1730, i32 20, i32 10)
ret void
}
/* Variables and functions */
int close(int);
int apm_close(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<apm_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @apm_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
unsigned long clock_command(unsigned long);
int /*<<< orphan*/ printf(char *, int);
void writeLockBits(unsigned long lockBit) {
  unsigned long readBack = 0;
  readBack = clock_command(lockBit);
  int lastbyte = readBack % 0xff;
  printf("Reply : 0x%x\n", lastbyte);
}


x86 assembly (clang, -O0):
<writeLockBits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clock_command@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xff,%ecx
xor    %edx,%edx
div    %rcx
mov    %edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeLockBits>:
push   %rax
call   1040 <clock_command@plt>
mov    %rax,%rsi
movabs $0x8080808080808081,%rcx
80 80 80
mul    %rcx
shr    $0x7,%rdx
mov    %edx,%eax
shl    $0x8,%eax
sub    %eax,%edx
add    %edx,%esi
lea    0xeb6(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Reply : 0x%x\0A\00"
define void @writeLockBits(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %2
store i64 0, i64* %3
%5 = load i64, i64* %2
%6 = call i64 @clock_command(i64 %5)
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = urem i64 %7, 255
%9 = trunc i64 %8 to i32
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Reply : 0x%x\0A\00"
define void @writeLockBits(i64 %0) {
%2 = tail call i64 @clock_command(i64 %0)
%3 = urem i64 %2, 255
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
void I422ToRGBARow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGBARow_Any_AVX2() {
ret void
}
void encode_rgb_frame(int w) {
  int sample_buffer[3][w + 6];
  sizeof sample_buffer;
}


x86 assembly (clang, -O0):
<encode_rgb_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x6,%eax
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @encode_rgb_frame(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 6
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = mul nuw i64 3, %7
%10 = alloca i32, i64 %9
store i64 %7, i64* %4
%11 = mul nuw i64 3, %7
%12 = mul nuw i64 4, %11
%13 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @encode_rgb_frame(i32 %0) {
ret void
}
/* Variables and functions */
double __ocml_sub_rtn_f64(double, double);
double __dsub_ru(double x, double y) { return __ocml_sub_rtn_f64(x, y); }


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

x86 assembly (clang, -O2):
<__dsub_ru>:
jmp    1030 <__ocml_sub_rtn_f64@plt>

LLVM IR (-O0):
define double @__dsub_ru(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @__ocml_sub_rtn_f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @__dsub_ru(double %0, double %1) {
%3 = tail call double @__ocml_sub_rtn_f64(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ path_basedir(char *);
scalar_t__ path_char_is_slash(char);
size_t strlen(char *);
void path_parent_dir(char *path) {
  size_t len = strlen(path);
  if (len && path_char_is_slash(path[len - 1]))
    path[len - 1] = '\0';
  path_basedir(path);
}


x86 assembly (clang, -O0):
<path_parent_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1183 <path_parent_dir+0x53>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <path_char_is_slash@plt>
cmp    $0x0,%rax
je     1183 <path_parent_dir+0x53>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rdi
call   1040 <path_basedir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_parent_dir>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
je     1159 <path_parent_dir+0x29>
mov    %rax,%r14
movsbl -0x1(%rax,%rbx,1),%edi
call   1050 <path_char_is_slash@plt>
test   %rax,%rax
je     1159 <path_parent_dir+0x29>
movb   $0x0,-0x1(%rbx,%r14,1)
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <path_basedir@plt>

LLVM IR (-O0):
define void @path_parent_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = load i64, i64* %3
%11 = sub i64 %10, 1
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = call i64 @path_char_is_slash(i8 signext %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %8
%17 = load i8*, i8** %2
%18 = load i64, i64* %3
%19 = sub i64 %18, 1
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 0, i8* %20
br label %21
21: ; preds = %16, %8, %1
%22 = load i8*, i8** %2
%23 = call i32 @path_basedir(i8* %22)
ret void
}

LLVM IR (-O2):
define void @path_parent_dir(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i64 @path_char_is_slash(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %4
store i8 0, i8* %6
br label %11
11: ; preds = %10, %4, %1
%12 = tail call i32 @path_basedir(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ ct_isnonzero_u64(scalar_t__);
uint64_t ct_mask_u64(uint64_t bit) {
  return 0 - (uint64_t)ct_isnonzero_u64(bit);
}


x86 assembly (clang, -O0):
<ct_mask_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ct_isnonzero_u64@plt>
mov    %rax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_mask_u64>:
push   %rax
call   1030 <ct_isnonzero_u64@plt>
neg    %rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ct_mask_u64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @ct_isnonzero_u64(i64 %3)
%5 = sub nsw i64 0, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @ct_mask_u64(i64 %0) {
%2 = tail call i64 @ct_isnonzero_u64(i64 %0)
%3 = sub nsw i64 0, %2
ret i64 %3
}
/* Variables and functions */
size_t slash_to_tilde(size_t rand) { return rand == '/' ? '~' : rand; }


x86 assembly (clang, -O0):
<slash_to_tilde>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x2f,-0x8(%rbp)
jne    1121 <slash_to_tilde+0x21>
mov    $0x7e,%eax
mov    %rax,-0x10(%rbp)
jmp    1129 <slash_to_tilde+0x29>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slash_to_tilde>:
cmp    $0x2f,%rdi
mov    $0x7e,%eax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i64 @slash_to_tilde(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 47
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i64, i64* %2
br label %8
8: ; preds = %6, %5
%9 = phi i64 [ 126, %5 ], [ %7, %6 ]
ret i64 %9
}

LLVM IR (-O2):
define i64 @slash_to_tilde(i64 %0) {
%2 = icmp eq i64 %0, 47
%3 = select i1 %2, i64 126, i64 %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void _libC_fini(void) { printf("libC_fini():finish - atexit()\n"); }


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

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

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

LLVM IR (-O2):
@str = [30 x i8] c"libC_fini():finish - atexit()\00"
define void @_libC_fini() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __my_stpncpy(char *, char const *, size_t);
char *my_strncpy(char *restrict d, const char *restrict s, size_t n) {
  __my_stpncpy(d, s, n);
  return d;
}


x86 assembly (clang, -O0):
<my_strncpy>:
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 <__my_stpncpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strncpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__my_stpncpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @my_strncpy(i8* noalias %0, i8* noalias %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 @__my_stpncpy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
define i8* @my_strncpy(i8* noalias returned %0, i8* noalias %1, i64 %2) {
%4 = tail call i32 @__my_stpncpy(i8* %0, i8* %1, i64 %2)
ret i8* %0
}
void ARGBMirrorRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBMirrorRow_AVX2() {
ret void
}
void IWDGTimerRestart(void) {
  (*((volatile unsigned long *)(0x40003000))) = 0x0000AAAA;
}


x86 assembly (clang, -O0):
<IWDGTimerRestart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40003000,%eax
movq   $0xaaaa,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IWDGTimerRestart>:
movq   $0xaaaa,0x40003000
ret

LLVM IR (-O0):
define void @IWDGTimerRestart() {
store volatile i64 43690, i64* inttoptr (i64 1073754112 to i64*)
ret void
}

LLVM IR (-O2):
define void @IWDGTimerRestart() {
store volatile i64 43690, i64* inttoptr (i64 1073754112 to i64*)
ret void
}
/* Type definitions */
struct vec4i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec4i_min(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
__attribute__((always_)) struct vec4i *
psvec4i_min(struct vec4i *result, struct vec4i *a, struct vec4i *b) {
  vec4i_min((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec4i_min>:
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 <vec4i_min@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec4i_min>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec4i_min@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_min(%struct.vec4i* %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = alloca %struct.vec4i*
%5 = alloca %struct.vec4i*
%6 = alloca %struct.vec4i*
store %struct.vec4i* %0, %struct.vec4i** %4
store %struct.vec4i* %1, %struct.vec4i** %5
store %struct.vec4i* %2, %struct.vec4i** %6
%7 = load %struct.vec4i*, %struct.vec4i** %4
%8 = bitcast %struct.vec4i* %7 to i32*
%9 = load %struct.vec4i*, %struct.vec4i** %5
%10 = bitcast %struct.vec4i* %9 to i32*
%11 = load %struct.vec4i*, %struct.vec4i** %6
%12 = bitcast %struct.vec4i* %11 to i32*
%13 = call i32 @vec4i_min(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec4i*, %struct.vec4i** %4
ret %struct.vec4i* %14
}

LLVM IR (-O2):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_min(%struct.vec4i* returned %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = getelementptr %struct.vec4i, %struct.vec4i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec4i, %struct.vec4i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec4i, %struct.vec4i* %2, i64 0, i32 0
%7 = tail call i32 @vec4i_min(i32* %4, i32* %5, i32* %6)
ret %struct.vec4i* %0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int fstatat(int /*<<< orphan*/, char const *, struct stat *,
            int /*<<< orphan*/);
int stat(const char *path, struct stat *buf) {
  return fstatat(AT_FDCWD, path, buf, 0);
}


x86 assembly (clang, -O0):
<stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <fstatat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
xor    %ecx,%ecx
jmp    1030 <fstatat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@AT_FDCWD = global i32 0
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @AT_FDCWD
%6 = load i8*, i8** %3
%7 = load %struct.stat*, %struct.stat** %4
%8 = call i32 @fstatat(i32 %5, i8* %6, %struct.stat* %7, i32 0)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@AT_FDCWD = global i32 0
define i32 @stat(i8* %0, %struct.stat* %1) {
%3 = load i32, i32* @AT_FDCWD
%4 = tail call i32 @fstatat(i32 %3, i8* %0, %struct.stat* %1, i32 0)
ret i32 %4
}