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

/* Variables and functions */
int /*<<< orphan*/ htons(int /*<<< orphan*/);
void set_seq_num(char *buffer, uint16_t seq_num) {
  uint16_t *seq = (uint16_t *)(buffer + 1);
  *seq = htons(seq_num);
}


x86 assembly (clang, -O0):
<set_seq_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htons@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seq_num>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %eax,0x1(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @set_seq_num(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i32, i32* %4
%10 = call i32 @htons(i32 %9)
%11 = load i32*, i32** %5
store i32 %10, i32* %11
ret void
}

LLVM IR (-O2):
define void @set_seq_num(i8* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = bitcast i8* %3 to i32*
%5 = tail call i32 @htons(i32 %1)
store i32 %5, i32* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_key_t;

/* Variables and functions */
int pthread_key_delete(pthread_key_t __key) {
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_key_delete(i32 %0) {
ret i32 0
}
void rop3_214_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T & S;
  stk3 = *D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_214_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 -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %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_214_1_0>:
mov    %edx,%eax
and    %sil,%al
mov    (%rdi),%cl
or     %cl,%al
xor    %sil,%dl
xor    %al,%dl
xor    %dl,%cl
and    %sil,%cl
xor    %dl,%cl
mov    %cl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_214_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 %2, %1
%8 = xor i8 %7, %6
%9 = xor i8 %1, -1
%10 = and i8 %8, %9
%11 = and i8 %5, %1
%12 = or i8 %10, %11
store i8 %12, i8* %0
ret void
}
/* Variables and functions */
const char *isns_timestamp_help(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @isns_timestamp_help() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @isns_timestamp_help() {
ret i8* null
}
unsigned int DRV_WIFI_DATA_RESERVED_TAIL(unsigned int len) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DRV_WIFI_DATA_RESERVED_TAIL(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popinteger16array_(char *x, unsigned int *n) { popNarray(x, (*n * 16)); }


x86 assembly (clang, -O0):
<popinteger16array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popinteger16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popinteger16array_(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** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 16
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popinteger16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getstring(char *, int);
int sscanf(char *, char *, double *);
double inflt() {
  char aline[80];
  double res;
  getstring(aline, 80);
  if (sscanf(aline, "%lf", &res) < 1)
    res = 0;
  return (res);
}


x86 assembly (clang, -O0):
<inflt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
mov    $0x50,%esi
call   1030 <getstring@plt>
lea    -0x50(%rbp),%rdi
lea    0xebf(%rip),%rsi
lea    -0x58(%rbp),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
jge    115b <inflt+0x3b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inflt>:
push   %rbx
sub    $0x60,%rsp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <getstring@plt>
lea    0xec2(%rip),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <sscanf@plt>
xorps  %xmm0,%xmm0
test   %eax,%eax
jle    1158 <inflt+0x38>
movsd  0x8(%rsp),%xmm0
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @inflt() {
%1 = alloca [80 x i8]
%2 = alloca double
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = call i32 @getstring(i8* %3, i32 80)
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %0
store double 0.000000e+00, double* %2
br label %9
9: ; preds = %8, %0
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @inflt() {
%1 = alloca [80 x i8]
%2 = alloca double
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = bitcast double* %2 to i8*
%5 = call i32 @getstring(i8* %3, i32 80)
%6 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%7 = icmp slt i32 %6, 1
%8 = load double, double* %2
%9 = select i1 %7, double 0.000000e+00, double %8
ret double %9
}
/* Variables and functions */
double ibeta(int, double, double);
double ibetac(double x, double a, double b) {
  double oup;
  oup = ibeta(1. - x, b, a);
  return oup;
}


x86 assembly (clang, -O0):
<ibetac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <ibeta@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibetac>:
movsd  0xee8(%rip),%xmm3
subsd  %xmm0,%xmm3
cvttsd2si %xmm3,%edi
movaps %xmm2,%xmm0
jmp    1030 <ibeta@plt>

LLVM IR (-O0):
define double @ibetac(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = fsub double 1.000000e+00, %8
%10 = fptosi double %9 to i32
%11 = load double, double* %6
%12 = load double, double* %5
%13 = call double @ibeta(i32 %10, double %11, double %12)
store double %13, double* %7
%14 = load double, double* %7
ret double %14
}

LLVM IR (-O2):
define double @ibetac(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %0
%5 = fptosi double %4 to i32
%6 = tail call double @ibeta(i32 %5, double %2, double %1)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ msm_ois_eeprom_read(unsigned int, unsigned char *);
void E2PRegRead(unsigned char RegAddrH, unsigned char RegAddrL,
                unsigned char *RegData) {
  unsigned int addr;
  addr = (RegAddrH << 8) | RegAddrL;
  msm_ois_eeprom_read(addr, (unsigned char *)RegData);
}


x86 assembly (clang, -O0):
<E2PRegRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <msm_ois_eeprom_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E2PRegRead>:
shl    $0x8,%edi
or     %esi,%edi
mov    %rdx,%rsi
jmp    1030 <msm_ois_eeprom_read@plt>

LLVM IR (-O0):
define void @E2PRegRead(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = load i8*, i8** %6
%16 = call i32 @msm_ois_eeprom_read(i32 %14, i8* %15)
ret void
}

LLVM IR (-O2):
define void @E2PRegRead(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = zext i8 %0 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = zext i8 %1 to i32
%7 = or i32 %5, %6
%8 = tail call i32 @msm_ois_eeprom_read(i32 %7, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ExitApp(int /*<<< orphan*/);
int /*<<< orphan*/ Initialize_App();
int main() {
  Initialize_App();
  ExitApp(0);
  return 1;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Initialize_App@plt>
xor    %edi,%edi
call   1040 <ExitApp@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Initialize_App()
%2 = tail call i32 @ExitApp(i32 0)
ret i32 1
}
void exit_aio(struct mm_struct *mm) {}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
define void @exit_aio(%struct.mm_struct* nocapture %0) {
ret void
}
void gtk_calendar_unmark_day() {}


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

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

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

LLVM IR (-O2):
define void @gtk_calendar_unmark_day() {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ wait(int *);
int main() {
  pid_t pid = fork();
  if (pid < 0) {
    perror("fork failed");
    exit(1);
  }
  if (pid > 0) {
    sleep(600);
    int wstatus;
    wait(&wstatus);
    exit(0);
  } else {
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    118b <main+0x3b>
lea    0xe84(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
cmpq   $0x0,-0x10(%rbp)
jle    11b0 <main+0x60>
mov    $0x258,%edi
call   1050 <sleep@plt>
lea    -0x14(%rbp),%rdi
call   1060 <wait@plt>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <fork@plt>
test   %rax,%rax
jns    1173 <main+0x23>
lea    0xe9c(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
je     1189 <main+0x39>
mov    $0x258,%edi
call   1050 <sleep@plt>
lea    0x4(%rsp),%rdi
call   1060 <wait@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"fork failed\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 (...) @fork()
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
%11 = load i64, i64* %2
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = call i32 @sleep(i32 600)
%15 = call i32 @wait(i32* %3)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %10
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"fork failed\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i64 (...) @fork()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %0
%8 = icmp eq i64 %2, 0
br i1 %8, label %14, label %9
9: ; preds = %7
%10 = tail call i32 @sleep(i32 600)
%11 = bitcast i32* %1 to i8*
%12 = call i32 @wait(i32* %1)
%13 = call i32 @exit(i32 0)
unreachable
14: ; preds = %7
%15 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
unsigned int foo1(int);
__attribute__((no)) unsigned int bar1(int x) { return foo1(x + 6); }


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

x86 assembly (clang, -O2):
<bar1>:
add    $0x6,%edi
jmp    1030 <foo1@plt>

LLVM IR (-O0):
define i32 @bar1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 6
%5 = call i32 @foo1(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar1(i32 %0) {
%2 = add nsw i32 %0, 6
%3 = tail call i32 @foo1(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopenf(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *);
scalar_t__ getpid();
int /*<<< orphan*/ stderr;
FILE *fopen(const char *name, const char *mode) {
  fprintf(stderr, "[%d] opening %s\n", (int)getpid(), name);
  return fopenf(name, mode);
}


x86 assembly (clang, -O0):
<fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%edx
mov    -0x8(%rbp),%rcx
lea    0xe9d(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fopenf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeaf(%rip),%rsi
mov    %ebp,%edi
mov    %eax,%edx
mov    %rbx,%rcx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fopenf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"[%d] opening %s\0A\00"
define i32* @fopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i64 (...) @getpid()
%7 = trunc i64 %6 to i32
%8 = load i8*, i8** %3
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32* @fopenf(i8* %10, i8* %11)
ret i32* %12
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"[%d] opening %s\0A\00"
define i32* @fopen(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %0)
%7 = tail call i32* @fopenf(i8* %0, i8* %1)
ret i32* %7
}
/* Variables and functions */
char *strchr(char *, char);
void zap_comment(char *str) {
  char *p = strchr(str, '#');
  if (p)
    *p = '\0';
}


x86 assembly (clang, -O0):
<zap_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x23,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <zap_comment+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zap_comment>:
push   %rax
mov    $0x23,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <zap_comment+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @zap_comment(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 35)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @zap_comment(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 35)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void dumpCurrentTime() {
  struct timeval timeCurrent;
  gettimeofday(&timeCurrent, NULL);
}


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

x86 assembly (clang, -O2):
<dumpCurrentTime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @dumpCurrentTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @dumpCurrentTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
ret void
}
/* Variables and functions */
void *malloc(int);
void *a999(int x) { return malloc(100); }


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

x86 assembly (clang, -O2):
<a999>:
mov    $0x64,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @a999(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @malloc(i32 100)
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @a999(i32 %0) {
%2 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
ret i8* %2
}
void ff_hevc_put_hevc_uni_w_epel_v32_10_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ CopyToVRAM(int /*<<< orphan*/ volatile *,
                              int /*<<< orphan*/ const *, int);
void LoadPaletteBGData(int first_entry, const void *data, int data_bytes) {
  CopyToVRAM(((volatile uint16_t *)(0x5000000)) + first_entry,
             (const uint16_t *)data, data_bytes / 2);
}


x86 assembly (clang, -O0):
<LoadPaletteBGData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x4(%rbp),%rax
mov    $0x5000000,%edi
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1030 <CopyToVRAM@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadPaletteBGData>:
movslq %edi,%rax
lea    0x5000000(,%rax,4),%rdi
05
mov    %edx,%eax
shr    $0x1f,%eax
add    %eax,%edx
sar    %edx
jmp    1030 <CopyToVRAM@plt>

LLVM IR (-O0):
define void @LoadPaletteBGData(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* inttoptr (i64 83886080 to i32*), i64 %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %6
%13 = sdiv i32 %12, 2
%14 = call i32 @CopyToVRAM(i32* %9, i32* %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @LoadPaletteBGData(i32 %0, i8* %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i32, i32* inttoptr (i64 83886080 to i32*), i64 %4
%6 = bitcast i8* %1 to i32*
%7 = sdiv i32 %2, 2
%8 = tail call i32 @CopyToVRAM(i32* %5, i32* %6, i32 %7)
ret void
}
/* Variables and functions */
int func1_in_obj();
int main(int argc, char **argv) { return func1_in_obj(); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @func1_in_obj()
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @func1_in_obj()
ret i32 %3
}
/* Variables and functions */
int spawn(int, char **);
int main(int argc, char *argv[]) {
  argv[0] = "/bin/ls";
  return (spawn(argc, argv));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <spawn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rax
mov    %rax,(%rsi)
jmp    1030 <spawn@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @spawn(i32 %8, i8** %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
define i32 @main(i32 %0, i8** %1) {
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = tail call i32 @spawn(i32 %0, i8** %1)
ret i32 %3
}
void rop3_242_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = *D & stk3;
  stk1 = T | stk2;
  *D = stk1;
}


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

x86 assembly (clang, -O2):
<rop3_242_0_0>:
not    %sil
and    (%rdi),%sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_242_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = load i8, i8* %0
%6 = and i8 %5, %4
%7 = or i8 %6, %2
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int snprintf(char *, int, char *, unsigned int, unsigned int, unsigned int,
             unsigned int);
int ipv4_derank(char *ip_str, unsigned int ip) {
  unsigned int a, b, c, d;
  a = ip >> 24;
  b = (ip << 8) >> 24;
  c = (ip << 16) >> 24;
  d = (ip << 24) >> 24;
  return snprintf(ip_str, 16, "%d.%d.%d.%d", a, b, c, d);
}


x86 assembly (clang, -O0):
<ipv4_derank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
shr    $0x18,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
shr    $0x18,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x18,%eax
shr    $0x18,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    -0x1c(%rbp),%eax
mov    $0x10,%esi
lea    0xe96(%rip),%rdx
mov    %eax,(%rsp)
call   1030 <snprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_derank>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ecx
mov    %esi,%eax
movzbl %ch,%ebx
movzbl %cl,%edx
shr    $0x18,%ecx
shr    $0x10,%eax
movzbl %al,%r8d
mov    %edx,(%rsp)
lea    0xecd(%rip),%rdx
mov    $0x10,%esi
mov    %ebx,%r9d
call   1030 <snprintf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i32 @ipv4_derank(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%9 = load i32, i32* %4
%10 = lshr i32 %9, 24
store i32 %10, i32* %5
%11 = load i32, i32* %4
%12 = shl i32 %11, 8
%13 = lshr i32 %12, 24
store i32 %13, i32* %6
%14 = load i32, i32* %4
%15 = shl i32 %14, 16
%16 = lshr i32 %15, 24
store i32 %16, i32* %7
%17 = load i32, i32* %4
%18 = shl i32 %17, 24
%19 = lshr i32 %18, 24
store i32 %19, i32* %8
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @snprintf(i8* %20, i32 16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22, i32 %23, i32 %24)
ret i32 %25
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define i32 @ipv4_derank(i8* %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = lshr i32 %1, 8
%7 = and i32 %6, 255
%8 = and i32 %1, 255
%9 = tail call i32 @snprintf(i8* %0, i32 16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %7, i32 %8)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clearScreen() { printf("\033[2J\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @clearScreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @clearScreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((constructor)) void unload(void) {}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @unload, i8* null }]
define void @unload() {
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @unload() {
ret void
}
/* Variables and functions */
int uncompress(void *, unsigned long *, void const *, unsigned long);
int grfio_decode_zip(void *dest, unsigned long *dest_len, const void *source,
                     unsigned long source_len) {
  return uncompress(dest, dest_len, source, source_len);
}


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

x86 assembly (clang, -O2):
<grfio_decode_zip>:
jmp    1030 <uncompress@plt>

LLVM IR (-O0):
define i32 @grfio_decode_zip(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i64*, i64** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @uncompress(i8* %9, i64* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @grfio_decode_zip(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @uncompress(i8* %0, i64* %1, i8* %2, i64 %3)
ret i32 %5
}
void eclear(x) register unsigned short *x;
{
  register int i;
  for (i = 0; i < 6; i++)
    *x++ = 0;
}


x86 assembly (clang, -O0):
<eclear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    113b <eclear+0x3b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movw   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <eclear+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eclear>:
movl   $0x0,0x8(%rdi)
movq   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @eclear(i16* nocapture writeonly %0) {
%2 = bitcast i16* %0 to i8*
ret void
}
/* Variables and functions */
int do_hwreset(int, int, char **);
int do_hwreset_en(int nargs, char **argv) {
  return do_hwreset((0x01), nargs, argv);
}


x86 assembly (clang, -O0):
<do_hwreset_en>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1030 <do_hwreset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_hwreset_en>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <do_hwreset@plt>

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

LLVM IR (-O2):
define i32 @do_hwreset_en(i32 %0, i8** %1) {
%3 = tail call i32 @do_hwreset(i32 1, i32 %0, i8** %1)
ret i32 %3
}
unsigned char f80(unsigned char x, unsigned long int y) {
  return (x << y) + (x >> ((-y) & (8 * sizeof(unsigned char) - 1)));
}


x86 assembly (clang, -O0):
<f80>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x7,%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f80>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
and    $0x7,%cl
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f80(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 0, %12
%14 = and i64 %13, 7
%15 = trunc i64 %14 to i32
%16 = ashr i32 %11, %15
%17 = add nsw i32 %9, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f80(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 0, %4
%7 = and i32 %6, 7
%8 = lshr i32 %3, %7
%9 = add nsw i32 %8, %5
%10 = trunc i32 %9 to i8
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ q();
scalar_t__ t(int);
void threading(int a, int b) {
  if (t(a)) {
    if (t(a))
      q();
  }
}


x86 assembly (clang, -O0):
<threading>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <t@plt>
cmp    $0x0,%rax
je     115e <threading+0x3e>
mov    -0x4(%rbp),%edi
call   1030 <t@plt>
cmp    $0x0,%rax
je     1159 <threading+0x39>
mov    $0x0,%al
call   1040 <q@plt>
jmp    115e <threading+0x3e>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threading>:
push   %rbx
mov    %edi,%ebx
call   1030 <t@plt>
test   %rax,%rax
je     1141 <threading+0x21>
mov    %ebx,%edi
call   1030 <t@plt>
test   %rax,%rax
je     1141 <threading+0x21>
xor    %eax,%eax
pop    %rbx
jmp    1040 <q@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @threading(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 = call i64 @t(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %3
%10 = call i64 @t(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @q()
br label %14
14: ; preds = %12, %8
br label %15
15: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
define void @threading(i32 %0, i32 %1) {
%3 = tail call i64 @t(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i64 @t(i32 %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @q()
br label %10
10: ; preds = %5, %8, %2
ret void
}
void music_sheet_insert_note_at(struct music_sheet *self,
                                struct music_sheet_iter *iter,
                                struct note *note) {}


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

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

LLVM IR (-O0):
%struct.music_sheet = type opaque
%struct.music_sheet_iter = type opaque
%struct.note = type opaque
define void @music_sheet_insert_note_at(%struct.music_sheet* %0, %struct.music_sheet_iter* %1, %struct.note* %2) {
%4 = alloca %struct.music_sheet*
%5 = alloca %struct.music_sheet_iter*
%6 = alloca %struct.note*
store %struct.music_sheet* %0, %struct.music_sheet** %4
store %struct.music_sheet_iter* %1, %struct.music_sheet_iter** %5
store %struct.note* %2, %struct.note** %6
ret void
}

LLVM IR (-O2):
%struct.music_sheet = type opaque
%struct.music_sheet_iter = type opaque
%struct.note = type opaque
define void @music_sheet_insert_note_at(%struct.music_sheet* nocapture %0, %struct.music_sheet_iter* nocapture %1, %struct.note* nocapture %2) {
ret void
}
int __attribute__((weak)) sigfillset() { return -1; }


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

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

LLVM IR (-O0):
define weak i32 @sigfillset() {
ret i32 -1
}

LLVM IR (-O2):
define weak i32 @sigfillset() {
ret i32 -1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, char *);
void inspect_fw_phexpost(char *label, uint32_t val, char *post) {
  printf("%-23s: 0x%08x (%s)\n", label, val, post);
}


x86 assembly (clang, -O0):
<inspect_fw_phexpost>:
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
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inspect_fw_phexpost>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"%-23s: 0x%08x (%s)\0A\00"
define void @inspect_fw_phexpost(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == '\n') {
      putchar(0);
      putchar(0);
    } else
      putchar(c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1172 <main+0x52>
cmpl   $0xa,-0x8(%rbp)
jne    1165 <main+0x45>
xor    %edi,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1030 <putchar@plt>
jmp    116d <main+0x4d>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %eax,%ebx
jmp    1165 <main+0x45>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
je     1137 <main+0x17>
cmp    $0xa,%ebx
jne    1150 <main+0x30>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <putchar@plt>
jmp    1150 <main+0x30>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %17
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = call i32 @putchar(i32 0)
%12 = call i32 @putchar(i32 0)
br label %16
13: ; preds = %7
%14 = load i32, i32* %2
%15 = call i32 @putchar(i32 %14)
br label %16
16: ; preds = %13, %10
br label %3
17: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %15, label %4
4: ; preds = %0, %9
%5 = phi i32 [ %12, %9 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @putchar(i32 0)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ 0, %7 ], [ %5, %4 ]
%11 = tail call i32 @putchar(i32 %10)
%12 = tail call i32 (...) @getchar()
%13 = load i32, i32* @EOF
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %4
15: ; preds = %9, %0
ret i32 0
}
regx0adrx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[x0]) <= (((short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac7,%ecx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <regx0adrx1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <regx0adrx1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adrx1>:
movslq %edx,%rax
movzwl (%r8,%rax,2),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(%rcx,%rcx,1),%dx
setle  %al
ret

LLVM IR (-O0):
define i32 @regx0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16*, i16** %12
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i16, i16* %16, i64 %18
%20 = load i16, i16* %19
%21 = sext i16 %20 to i32
%22 = load i32, i32* %11
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %23
%25 = load i16, i16* %24
%26 = sext i16 %25 to i32
%27 = icmp sle i32 %21, %26
br i1 %27, label %28, label %29
28: ; preds = %6
store i32 1, i32* %7
br label %30
29: ; preds = %6
store i32 0, i32* %7
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %7
ret i32 %31
}

LLVM IR (-O2):
define i32 @regx0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XProcessInternalConnection() {
  printf("XProcessInternalConnection called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XProcessInternalConnection>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [34 x i8] c"XProcessInternalConnection called\00"
define i32 @XProcessInternalConnection() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ff_hevc_put_hevc_bi_w_epel_hv24_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv24_8_sse4() {
ret void
}
/* Variables and functions */
unsigned long long bswap64(unsigned long long);
unsigned long long cpu_to_be64(unsigned long long x) { return bswap64(x); }


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

x86 assembly (clang, -O2):
<cpu_to_be64>:
jmp    1030 <bswap64@plt>

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

LLVM IR (-O2):
define i64 @cpu_to_be64(i64 %0) {
%2 = tail call i64 @bswap64(i64 %0)
ret i64 %2
}
void X509_NAME_entry_count(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_entry_count() {
ret void
}
extern int cel_lzw_encode_file(char *srcfile, char *dstfile) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @cel_lzw_encode_file(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}