xunge/DecIR huggingface dataset:
/* Variables and functions */
int strlen(char *);
void compute_hashes(char *word, char *final_word) {
  int i;
  for (i = 0; i < strlen(word); i++)
    final_word[i] = word[i] + 5;
}


x86 assembly (clang, -O0):
<compute_hashes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    116d <compute_hashes+0x5d>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x5,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <compute_hashes+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_hashes>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %eax,%eax
jle    114e <compute_hashes+0x3e>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%eax
add    $0x5,%al
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <compute_hashes+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @compute_hashes(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = add i8 %8, 5
%10 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 %9, i8* %10
%11 = add nuw nsw i64 %6, 1
%12 = tail call i32 @strlen(i8* %0)
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %11, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %2
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
clock_t _times(struct tms *buf) {
  if (buf) {
  }
  return -1;
}


x86 assembly (clang, -O0):
<_times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1118 <_times+0x18>
jmp    1118 <_times+0x18>
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @_times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load %struct.tms*, %struct.tms** %2
%4 = icmp ne %struct.tms* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @_times(%struct.tms* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int init_sec(unsigned char **clone_sec) {
  int i;
  for (i = 0; i < 9; i++) {
    clone_sec[i] = NULL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<init_sec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    1137 <init_sec+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <init_sec+0xf>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_sec>:
xorps  %xmm0,%xmm0
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movq   $0x0,0x40(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @init_sec(i8** nocapture writeonly %0) {
%2 = bitcast i8** %0 to i8*
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_regexp_last_index() { exit(1); }


x86 assembly (clang, -O0):
<caml_regexp_last_index>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_regexp_last_index>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_regexp_last_index() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_regexp_last_index() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int errno;
scalar_t__ sigprocmask(int, int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
int thr_sigmask(int how, const sigset_t *set, sigset_t *oset) {
  return (0 == sigprocmask(how, set, oset)) ? 0 : errno;
}


x86 assembly (clang, -O0):
<thr_sigmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    114b <thr_sigmask+0x3b>
xor    %eax,%eax
mov    %eax,-0x1c(%rbp)
jmp    1157 <thr_sigmask+0x47>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_sigmask>:
push   %rax
call   1030 <sigprocmask@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1129 <thr_sigmask+0x19>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @thr_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i64 @sigprocmask(i32 %7, i32* %8, i32* %9)
%11 = icmp eq i64 0, %10
br i1 %11, label %12, label %13
12: ; preds = %3
br label %15
13: ; preds = %3
%14 = load i32, i32* @errno
br label %15
15: ; preds = %13, %12
%16 = phi i32 [ 0, %12 ], [ %14, %13 ]
ret i32 %16
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @thr_sigmask(i32 %0, i32* %1, i32* %2) {
%4 = tail call i64 @sigprocmask(i32 %0, i32* %1, i32* %2)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @errno
%7 = select i1 %5, i32 0, i32 %6
ret i32 %7
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ remove_edge(struct graph *, int, int);
void remove_edge4(struct graph *g, int a, int b, int c, int d) {
  remove_edge(g, a, b);
  remove_edge(g, b, c);
  remove_edge(g, c, d);
}


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

x86 assembly (clang, -O2):
<remove_edge4>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %rdi,%rbp
call   1030 <remove_edge@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
call   1030 <remove_edge@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <remove_edge@plt>

LLVM IR (-O0):
%struct.graph = type { i32 }
define void @remove_edge4(%struct.graph* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.graph*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.graph* %0, %struct.graph** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.graph*, %struct.graph** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @remove_edge(%struct.graph* %11, i32 %12, i32 %13)
%15 = load %struct.graph*, %struct.graph** %6
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = call i32 @remove_edge(%struct.graph* %15, i32 %16, i32 %17)
%19 = load %struct.graph*, %struct.graph** %6
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = call i32 @remove_edge(%struct.graph* %19, i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define void @remove_edge4(%struct.graph* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @remove_edge(%struct.graph* %0, i32 %1, i32 %2)
%7 = tail call i32 @remove_edge(%struct.graph* %0, i32 %2, i32 %3)
%8 = tail call i32 @remove_edge(%struct.graph* %0, i32 %3, i32 %4)
ret void
}
char *longestCommonPrefix(char **strs, int strsSize) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @longestCommonPrefix(i8** nocapture readnone %0, i32 %1) {
ret i8* undef
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint32_t;

/* Variables and functions */
uint32_t rtcp_xr_dlrr_get_dlrr(const uint8_t *p_rtcp_xr_dlrr) {
  return (p_rtcp_xr_dlrr[12] << 24) | (p_rtcp_xr_dlrr[13] << 16) |
         (p_rtcp_xr_dlrr[14] << 8) | p_rtcp_xr_dlrr[15];
}


x86 assembly (clang, -O0):
<rtcp_xr_dlrr_get_dlrr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x34(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x38(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0x3c(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtcp_xr_dlrr_get_dlrr>:
mov    0x30(%rdi),%eax
mov    0x34(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x38(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x3c(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @rtcp_xr_dlrr_get_dlrr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 12
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 13
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 14
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 15
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @rtcp_xr_dlrr_get_dlrr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 12
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i32, i32* %0, i64 13
%6 = load i32, i32* %5
%7 = shl i32 %6, 16
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 14
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = or i32 %8, %11
%13 = getelementptr inbounds i32, i32* %0, i64 15
%14 = load i32, i32* %13
%15 = or i32 %12, %14
ret i32 %15
}
const char *bs_platform_name(void) { return "raspi"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"raspi\00"
define i8* @bs_platform_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void gtk_radio_button_new_with_label_from_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_button_new_with_label_from_widget() {
ret void
}
/* Variables and functions */
double fatorial(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double n;
  double f;
  printf("digiteum numero:");
  scanf("%lf", &n);
  f = fatorial(n);
  printf("N=%.0lf, F=%.0lf\n", n, f);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
call   1040 <fatorial@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
lea    0xeae(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"digiteum numero:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [18 x i8] c"N=%.0lf, F=%.0lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = call double @fatorial(double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = load double, double* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"digiteum numero:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [18 x i8] c"N=%.0lf, F=%.0lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = call double @fatorial(double %5)
%7 = load double, double* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), double %7, double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HDMITX_WriteI2C_Byte(int, int);
void HDCP_Auth_Fire(void) {
  HDMITX_WriteI2C_Byte(0x10, (0 << 1) | (0 << 0));
  HDMITX_WriteI2C_Byte(0x21, 1);
}


x86 assembly (clang, -O0):
<HDCP_Auth_Fire>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HDCP_Auth_Fire>:
push   %rax
mov    $0x10,%edi
xor    %esi,%esi
call   1030 <HDMITX_WriteI2C_Byte@plt>
mov    $0x21,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <HDMITX_WriteI2C_Byte@plt>

LLVM IR (-O0):
define void @HDCP_Auth_Fire() {
%1 = call i32 @HDMITX_WriteI2C_Byte(i32 16, i32 0)
%2 = call i32 @HDMITX_WriteI2C_Byte(i32 33, i32 1)
ret void
}

LLVM IR (-O2):
define void @HDCP_Auth_Fire() {
%1 = tail call i32 @HDMITX_WriteI2C_Byte(i32 16, i32 0)
%2 = tail call i32 @HDMITX_WriteI2C_Byte(i32 33, i32 1)
ret void
}
void unregister_external_dc_charger(struct ext_chg_pm8921 *ext) {
  pr_err("%s.not implemented.\n", __func__);
}


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

x86 assembly (clang, -O2):
<unregister_external_dc_charger>:
lea    0xee9(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
jmp    1030 <pr_err@plt>

LLVM IR (-O0):
%struct.ext_chg_pm8921 = type opaque
@.str = [21 x i8] c"%s.not implemented.\0A\00"
@__func__.unregister_external_dc_charger = [31 x i8] c"unregister_external_dc_charger\00"
define void @unregister_external_dc_charger(%struct.ext_chg_pm8921* %0) {
%2 = alloca %struct.ext_chg_pm8921*
store %struct.ext_chg_pm8921* %0, %struct.ext_chg_pm8921** %2
%3 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_err to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.unregister_external_dc_charger, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ext_chg_pm8921 = type opaque
@.str = [21 x i8] c"%s.not implemented.\0A\00"
@__func__.unregister_external_dc_charger = [31 x i8] c"unregister_external_dc_charger\00"
define void @unregister_external_dc_charger(%struct.ext_chg_pm8921* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_err to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.unregister_external_dc_charger, i64 0, i64 0))
ret void
}
/* Variables and functions */
double sqrt(double);
double modulus(double x, double y) { return sqrt(x * x + y * y); }


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

x86 assembly (clang, -O2):
<modulus>:
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112b <modulus+0x1b>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @modulus(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* %3
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fmul double %7, %8
%10 = call double @llvm.fmuladd.f64(double %5, double %6, double %9)
%11 = call double @sqrt(double %10)
ret double %11
}

LLVM IR (-O2):
define double @modulus(double %0, double %1) {
%3 = fmul double %1, %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %3)
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int fail_open(char *filename) {
  printf("error: fail to open text file: '%s'\n", filename);
  return 301;
}


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

x86 assembly (clang, -O2):
<fail_open>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x12d,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"error: fail to open text file: '%s'\0A\00"
define i32 @fail_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 301
}

LLVM IR (-O2):
@.str = [37 x i8] c"error: fail to open text file: '%s'\0A\00"
define i32 @fail_open(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 301
}
/* Variables and functions */
scalar_t__ malloc(int);
float *zeros_f(int n) {
  float *buf;
  int i;
  buf = (float *)malloc(n * sizeof(float));
  for (i = 0; i < n; i++) {
    buf[i] = 0.0;
  }
  return buf;
}


x86 assembly (clang, -O0):
<zeros_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <zeros_f+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <zeros_f+0x25>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeros_f>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1149 <zeros_f+0x29>
mov    %ebx,%edx
shl    $0x2,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define float* @zeros_f(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = inttoptr i64 %3 to i8*
%7 = zext i32 %0 to i64
%8 = shl nuw nsw i64 %7, 2
br label %9
9: ; preds = %5, %1
%10 = inttoptr i64 %3 to float*
ret float* %10
}
int foo(int *a) { return a[3]; }


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

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

LLVM IR (-O0):
define i32 @foo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: ./primes <increasing positive integers>\n"); }


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"usage: ./primes <increasing positive integers>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"usage: ./primes <increasing positive integers>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int imax(int, int);
int vect_max(int *v, int n, int max) {
  int i;
  int res = max;
  for (i = 0; i < n; i++)
    res = imax(res, v[i]);
  return res;
}


x86 assembly (clang, -O0):
<vect_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <vect_max+0x4f>
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <imax@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112f <vect_max+0x1f>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vect_max>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%eax
test   %esi,%esi
jle    1144 <vect_max+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r14,%rbx,4),%esi
mov    %eax,%edi
call   1030 <imax@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <vect_max+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @vect_max(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %13, %7 ]
%9 = phi i32 [ %2, %5 ], [ %12, %7 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %8
%11 = load i32, i32* %10
%12 = tail call i32 @imax(i32 %9, i32 %11)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
%16 = phi i32 [ %2, %3 ], [ %12, %7 ]
ret i32 %16
}
int test_int_7(int a, int b, int c, int d, int e, int f, int g) { return -19; }


x86 assembly (clang, -O0):
<test_int_7>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    $0xffffffed,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_int_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
ret i32 -19
}

LLVM IR (-O2):
define i32 @test_int_7(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
ret i32 -19
}
/* Variables and functions */
float cos(float);
float f_cos(float x) { return cos(x); }


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

x86 assembly (clang, -O2):
<f_cos>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define float @f_cos(float %0) {
%2 = tail call float @cos(float %0)
ret float %2
}
int get_alarm_time_simple(int interval, int random_factor) {
  (void)random_factor;
  return interval;
}


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

x86 assembly (clang, -O2):
<get_alarm_time_simple>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @get_alarm_time_simple(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main(void) {
  int num = 122;
  printf("O valor de num é %d, e o valor seguinte é %d\n", num, num + 1);
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"O valor de num \C3\A9 %d, e o valor seguinte \C3\A9 %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 122, i32* %1
%2 = load i32, i32* %1
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
%5 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"O valor de num \C3\A9 %d, e o valor seguinte \C3\A9 %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 122, i32 123)
ret i32 0
}
float constrain(float value, float minimum, float maximum) {
  if (value > maximum) {
    return maximum;
  } else if (value < minimum) {
    return minimum;
  } else {
    return value;
  }
}


x86 assembly (clang, -O0):
<constrain>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1131 <constrain+0x31>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrain+0x5d>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1153 <constrain+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <constrain+0x5d>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrain>:
maxss  %xmm0,%xmm1
movaps %xmm2,%xmm3
cmpltss %xmm0,%xmm3
movaps %xmm3,%xmm0
andnps %xmm1,%xmm0
andps  %xmm2,%xmm3
orps   %xmm0,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @constrain(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %7
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %7
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %5
%15 = load float, float* %6
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %6
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %5
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @constrain(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %2
%5 = fcmp olt float %0, %1
%6 = select i1 %5, float %1, float %0
%7 = select i1 %4, float %2, float %6
ret float %7
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ perror_reply(int, char const *);
int /*<<< orphan*/ reply(int, char *);
scalar_t__ stat(char const *, struct stat *);
char *renamefrom(const char *name) {
  struct stat st;
  if (stat(name, &st) < 0) {
    perror_reply(550, name);
    return ((char *)0);
  }
  reply(350, "File exists, ready for destination name");
  return (char *)(name);
}


x86 assembly (clang, -O0):
<renamefrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    116e <renamefrom+0x3e>
mov    -0x10(%rbp),%rsi
mov    $0x226,%edi
call   1050 <perror_reply@plt>
movq   $0x0,-0x8(%rbp)
jmp    1187 <renamefrom+0x57>
mov    $0x15e,%edi
lea    0xe86(%rip),%rsi
call   1030 <reply@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renamefrom>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     115a <renamefrom+0x2a>
lea    0xeb2(%rip),%rsi
mov    $0x15e,%edi
call   1030 <reply@plt>
jmp    1169 <renamefrom+0x39>
mov    $0x226,%edi
mov    %rbx,%rsi
call   1050 <perror_reply@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [40 x i8] c"File exists, ready for destination name\00"
define i8* @renamefrom(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @perror_reply(i32 550, i8* %9)
store i8* null, i8** %2
br label %14
11: ; preds = %1
%12 = call i32 @reply(i32 350, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %3
store i8* %13, i8** %2
br label %14
14: ; preds = %11, %8
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [40 x i8] c"File exists, ready for destination name\00"
define i8* @renamefrom(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @perror_reply(i32 550, i8* %0)
br label %10
8: ; preds = %1
%9 = call i32 @reply(i32 350, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ null, %6 ], [ %0, %8 ]
ret i8* %11
}
/* Variables and functions */
int japi_vscrollbar(int);
int j_vscrollbar(int arg0) { return (japi_vscrollbar(arg0)); }


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

x86 assembly (clang, -O2):
<j_vscrollbar>:
jmp    1030 <japi_vscrollbar@plt>

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

LLVM IR (-O2):
define i32 @j_vscrollbar(i32 %0) {
%2 = tail call i32 @japi_vscrollbar(i32 %0)
ret i32 %2
}
/* Type definitions */
struct timespec {
  unsigned long tv_sec;
  unsigned long tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, int /*<<< orphan*/ *);
int linux_delay_ms(unsigned long num_ms) {
  struct timespec ts;
  ts.tv_sec = num_ms / 1000;
  ts.tv_nsec = (num_ms % 1000) * 1000000;
  return nanosleep(&ts, NULL);
}


x86 assembly (clang, -O0):
<linux_delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
imul   $0xf4240,%rdx,%rax
mov    %rax,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linux_delay_ms>:
sub    $0x18,%rsp
mov    %rdi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
shr    $0x4,%rdx
mov    %rdx,0x8(%rsp)
imul   $0x3e8,%rdx,%rax
sub    %rax,%rdi
imul   $0xf4240,%rdi,%rax
mov    %rax,0x10(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i32 @linux_delay_ms(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.timespec
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = udiv i64 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i64 %5, i64* %6
%7 = load i64, i64* %2
%8 = urem i64 %7, 1000
%9 = mul i64 %8, 1000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 %9, i64* %10
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret i32 %11
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @linux_delay_ms(i64 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = udiv i64 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 %4, i64* %5
%6 = urem i64 %0, 1000
%7 = mul nuw nsw i64 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 %7, i64* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret i32 %9
}
/* Variables and functions */
int set_error(char *);
__attribute__((cold)) int set_nomem(void) {
  return set_error("Allocation failed");
}


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

x86 assembly (clang, -O2):
<set_nomem>:
lea    0xfa9(%rip),%rdi
jmp    1030 <set_error@plt>
nopl   0x0(%rax)

LLVM IR (-O0):
@.str = [18 x i8] c"Allocation failed\00"
define i32 @set_nomem() {
%1 = call i32 @set_error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"Allocation failed\00"
define i32 @set_nomem() {
%1 = tail call i32 @set_error(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ dhcp_packet(int, char *, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                               char *, char *);
void dhcp_leasequery(char *ipaddr, char *gwaddr, char *hardware) {
  dhcp_packet(10, ipaddr, NULL, NULL, NULL, gwaddr, hardware);
}


x86 assembly (clang, -O0):
<dhcp_leasequery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
mov    $0xa,%edi
xor    %ecx,%ecx
mov    %ecx,%r8d
mov    %r8,%rdx
mov    %r8,%rcx
mov    %rax,(%rsp)
call   1030 <dhcp_packet@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dhcp_leasequery>:
push   %rax
mov    %rsi,%r9
mov    %rdi,%rsi
mov    %rdx,(%rsp)
mov    $0xa,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <dhcp_packet@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @dhcp_leasequery(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @dhcp_packet(i32 10, i8* %0, i32* null, i32* null, i32* null, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GET32(unsigned int);
int /*<<< orphan*/ azo_put_val(int /*<<< orphan*/);
void azo_put_addr_val(unsigned int addr) { azo_put_val(GET32(addr)); }


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

x86 assembly (clang, -O2):
<azo_put_addr_val>:
push   %rax
call   1030 <GET32@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <azo_put_val@plt>

LLVM IR (-O0):
define void @azo_put_addr_val(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GET32(i32 %3)
%5 = call i32 @azo_put_val(i32 %4)
ret void
}

LLVM IR (-O2):
define void @azo_put_addr_val(i32 %0) {
%2 = tail call i32 @GET32(i32 %0)
%3 = tail call i32 @azo_put_val(i32 %2)
ret void
}
void ff_hevc_put_hevc_bi_w_qpel_v12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_v12_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
int isaac_strcpy(char *dst, const char *src) {
  if (!dst)
    return 1;
  if (!src)
    return 1;
  strcpy(dst, src);
  return 0;
}


x86 assembly (clang, -O0):
<isaac_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <isaac_strcpy+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1162 <isaac_strcpy+0x52>
cmpq   $0x0,-0x18(%rbp)
jne    114e <isaac_strcpy+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1162 <isaac_strcpy+0x52>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isaac_strcpy>:
mov    $0x1,%eax
test   %rdi,%rdi
je     112b <isaac_strcpy+0x1b>
test   %rsi,%rsi
je     112b <isaac_strcpy+0x1b>
push   %rax
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @isaac_strcpy(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int backtrace(void **, int);
int /*<<< orphan*/ print_backtrace_symbol(void **, int);
void print_backtrace() {
  int size0, size1;
  size0 = 1024;
  void *buffer[size0];
  size1 = backtrace(buffer, size0);
  print_backtrace_symbol(buffer, size1);
}


x86 assembly (clang, -O0):
<print_backtrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x400,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x20(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
call   1040 <backtrace@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
call   1030 <print_backtrace_symbol@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_backtrace>:
push   %rbx
sub    $0x2000,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <backtrace@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <print_backtrace_symbol@plt>
add    $0x2000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @print_backtrace() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 1024, i32* %1
%5 = load i32, i32* %1
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8*, i64 %6
store i64 %6, i64* %4
%9 = load i32, i32* %1
%10 = call i32 @backtrace(i8** %8, i32 %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @print_backtrace_symbol(i8** %8, i32 %11)
%13 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
define void @print_backtrace() {
%1 = alloca [1024 x i8*]
%2 = getelementptr inbounds [1024 x i8*], [1024 x i8*]* %1, i64 0, i64 0
%3 = call i32 @backtrace(i8** %2, i32 1024)
%4 = call i32 @print_backtrace_symbol(i8** %2, i32 %3)
ret void
}
/* Type definitions */
struct S_ELEMENT {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ constructors_ops_solver_DG(struct S_ELEMENT *const);
int /*<<< orphan*/ constructors_ops_solver_HDG(struct S_ELEMENT *const);
void constructors_ops_solver(struct S_ELEMENT *const ELEMENT) {
  constructors_ops_solver_DG(ELEMENT);
  constructors_ops_solver_HDG(ELEMENT);
}


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

x86 assembly (clang, -O2):
<constructors_ops_solver>:
push   %rbx
mov    %rdi,%rbx
call   1040 <constructors_ops_solver_DG@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <constructors_ops_solver_HDG@plt>

LLVM IR (-O0):
%struct.S_ELEMENT = type { i32 }
define void @constructors_ops_solver(%struct.S_ELEMENT* %0) {
%2 = alloca %struct.S_ELEMENT*
store %struct.S_ELEMENT* %0, %struct.S_ELEMENT** %2
%3 = load %struct.S_ELEMENT*, %struct.S_ELEMENT** %2
%4 = call i32 @constructors_ops_solver_DG(%struct.S_ELEMENT* %3)
%5 = load %struct.S_ELEMENT*, %struct.S_ELEMENT** %2
%6 = call i32 @constructors_ops_solver_HDG(%struct.S_ELEMENT* %5)
ret void
}

LLVM IR (-O2):
%struct.S_ELEMENT = type { i32 }
define void @constructors_ops_solver(%struct.S_ELEMENT* %0) {
%2 = tail call i32 @constructors_ops_solver_DG(%struct.S_ELEMENT* %0)
%3 = tail call i32 @constructors_ops_solver_HDG(%struct.S_ELEMENT* %0)
ret void
}
/* Variables and functions */
double atodn(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
double atod(char *s) { return atodn(s, strlen(s)); }


x86 assembly (clang, -O0):
<atod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <atodn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atod>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <atodn@plt>

LLVM IR (-O0):
define double @atod(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call double @atodn(i8* %3, i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @atod(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call double @atodn(i8* %0, i32 %2)
ret double %3
}
void av_color_primaries_from_name() {}


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

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

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

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