xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
char *my_strncat(char *, char *, int /*<<< orphan*/);
char *my_strcat(char *s1, char *s2) {
  return my_strncat(s1, s2, my_strlen(s2));
}


x86 assembly (clang, -O0):
<my_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <my_strncat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <my_strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <my_strncat@plt>

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

LLVM IR (-O2):
define i8* @my_strcat(i8* %0, i8* %1) {
%3 = tail call i32 @my_strlen(i8* %1)
%4 = tail call i8* @my_strncat(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
void delay(unsigned int i) {
  while (i)
    i--;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111f <delay+0x1f>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay+0x7>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add i32 %7, -1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
ret void
}
/* Variables and functions */
int pal(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
void main() {
  char a[1000];
  int b;
  printf("Vavedi tekst: ");
  scanf("%s", a);
  b = pal(a);
  printf("%d\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <pal@plt>
mov    %eax,-0x3f4(%rbp)
mov    -0x3f4(%rbp),%esi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <pal@plt>
lea    0xeab(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Vavedi tekst: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @pal(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ standard_extension(char *, char *, char *);
void macho_filename(char *inname, char *outname) {
  standard_extension(inname, outname, ".o");
}


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

x86 assembly (clang, -O2):
<macho_filename>:
lea    0xee9(%rip),%rdx
jmp    1030 <standard_extension@plt>

LLVM IR (-O0):
@.str = [3 x i8] c".o\00"
define void @macho_filename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @standard_extension(i8* %5, i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c".o\00"
define void @macho_filename(i8* %0, i8* %1) {
%3 = tail call i32 @standard_extension(i8* %0, i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
int sign(int x) {
  if (x >= 0) {
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     111d <sign+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <sign+0x24>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @sign(i32 %0) {
%2 = icmp sgt i32 %0, -1
%3 = select i1 %2, i32 1, i32 -1
ret i32 %3
}
/* Type definitions */
struct snmp_pdu {
  int dummy;
};

/* Variables and functions */
struct snmp_pdu *_clone_pdu_header(struct snmp_pdu *);
struct snmp_pdu *_copy_pdu_vars(struct snmp_pdu *, struct snmp_pdu *, int,
                                int /*<<< orphan*/, int);
struct snmp_pdu *_clone_pdu(struct snmp_pdu *pdu, int drop_err) {
  struct snmp_pdu *newpdu;
  newpdu = _clone_pdu_header(pdu);
  newpdu = _copy_pdu_vars(pdu, newpdu, drop_err, 0, 10000);
  return newpdu;
}


x86 assembly (clang, -O0):
<_clone_pdu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_clone_pdu_header@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %ecx,%ecx
mov    $0x2710,%r8d
call   1030 <_copy_pdu_vars@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clone_pdu>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <_clone_pdu_header@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    $0x2710,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_copy_pdu_vars@plt>

LLVM IR (-O0):
%struct.snmp_pdu = type { i32 }
define %struct.snmp_pdu* @_clone_pdu(%struct.snmp_pdu* %0, i32 %1) {
%3 = alloca %struct.snmp_pdu*
%4 = alloca i32
%5 = alloca %struct.snmp_pdu*
store %struct.snmp_pdu* %0, %struct.snmp_pdu** %3
store i32 %1, i32* %4
%6 = load %struct.snmp_pdu*, %struct.snmp_pdu** %3
%7 = call %struct.snmp_pdu* @_clone_pdu_header(%struct.snmp_pdu* %6)
store %struct.snmp_pdu* %7, %struct.snmp_pdu** %5
%8 = load %struct.snmp_pdu*, %struct.snmp_pdu** %3
%9 = load %struct.snmp_pdu*, %struct.snmp_pdu** %5
%10 = load i32, i32* %4
%11 = call %struct.snmp_pdu* @_copy_pdu_vars(%struct.snmp_pdu* %8, %struct.snmp_pdu* %9, i32 %10, i32 0, i32 10000)
store %struct.snmp_pdu* %11, %struct.snmp_pdu** %5
%12 = load %struct.snmp_pdu*, %struct.snmp_pdu** %5
ret %struct.snmp_pdu* %12
}

LLVM IR (-O2):
%struct.snmp_pdu = type { i32 }
define %struct.snmp_pdu* @_clone_pdu(%struct.snmp_pdu* %0, i32 %1) {
%3 = tail call %struct.snmp_pdu* @_clone_pdu_header(%struct.snmp_pdu* %0)
%4 = tail call %struct.snmp_pdu* @_copy_pdu_vars(%struct.snmp_pdu* %0, %struct.snmp_pdu* %3, i32 %1, i32 0, i32 10000)
ret %struct.snmp_pdu* %4
}
/* Variables and functions */
int /*<<< orphan*/ arch_init();
int /*<<< orphan*/ dev_init();
int /*<<< orphan*/ fs_init();
int /*<<< orphan*/ mm_init();
int /*<<< orphan*/ proc_init();
int /*<<< orphan*/ splash();
void init() {
  splash();
  arch_init();
  mm_init();
  dev_init();
  fs_init();
  proc_init();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <splash@plt>
mov    $0x0,%al
call   1030 <arch_init@plt>
mov    $0x0,%al
call   1050 <mm_init@plt>
mov    $0x0,%al
call   1060 <dev_init@plt>
mov    $0x0,%al
call   1070 <fs_init@plt>
mov    $0x0,%al
call   1080 <proc_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1040 <splash@plt>
xor    %eax,%eax
call   1030 <arch_init@plt>
xor    %eax,%eax
call   1050 <mm_init@plt>
xor    %eax,%eax
call   1060 <dev_init@plt>
xor    %eax,%eax
call   1070 <fs_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <proc_init@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @splash()
%2 = call i32 (...) @arch_init()
%3 = call i32 (...) @mm_init()
%4 = call i32 (...) @dev_init()
%5 = call i32 (...) @fs_init()
%6 = call i32 (...) @proc_init()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @splash()
%2 = tail call i32 (...) @arch_init()
%3 = tail call i32 (...) @mm_init()
%4 = tail call i32 (...) @dev_init()
%5 = tail call i32 (...) @fs_init()
%6 = tail call i32 (...) @proc_init()
ret void
}
double geoSum(double a1, double an, double r) {
  double result = 0.0;
  for (; a1 <= an; a1 *= r) {
    result += a1;
  }
  return result;
}


x86 assembly (clang, -O0):
<geoSum>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1152 <geoSum+0x52>
movsd  -0x8(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    111b <geoSum+0x1b>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geoSum>:
xorpd  %xmm3,%xmm3
ucomisd %xmm0,%xmm1
jb     111e <geoSum+0x1e>
xorpd  %xmm3,%xmm3
xchg   %ax,%ax
addsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
jae    1110 <geoSum+0x10>
movapd %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @geoSum(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
store double 0.000000e+00, double* %7
br label %8
8: ; preds = %16, %3
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fcmp ole double %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load double, double* %4
%14 = load double, double* %7
%15 = fadd double %14, %13
store double %15, double* %7
br label %16
16: ; preds = %12
%17 = load double, double* %6
%18 = load double, double* %4
%19 = fmul double %18, %17
store double %19, double* %4
br label %8
20: ; preds = %8
%21 = load double, double* %7
ret double %21
}

LLVM IR (-O2):
define double @geoSum(double %0, double %1, double %2) {
%4 = fcmp ugt double %0, %1
br i1 %4, label %11, label %5
5: ; preds = %3, %5
%6 = phi double [ %8, %5 ], [ 0.000000e+00, %3 ]
%7 = phi double [ %9, %5 ], [ %0, %3 ]
%8 = fadd double %7, %6
%9 = fmul double %7, %2
%10 = fcmp ugt double %9, %1
br i1 %10, label %11, label %5
11: ; preds = %5, %3
%12 = phi double [ 0.000000e+00, %3 ], [ %8, %5 ]
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ fibonaci_brat(int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, j, n, k;
  printf("Unesite n: ");
  scanf("%d", &n);
  fibonaci_brat(1, 1, n);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"Unesite n: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @fibonaci_brat(i32 1, i32 1, i32 %5)
ret i32 0
}
/* Variables and functions */
char *getenv(char *);
int al_is_ssh_connection() {
  char *val = getenv("SSH_CONNECTION");
  if (val != NULL) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<al_is_ssh_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113f <al_is_ssh_connection+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <al_is_ssh_connection+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<al_is_ssh_connection>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"SSH_CONNECTION\00"
define i32 @al_is_ssh_connection() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [15 x i8] c"SSH_CONNECTION\00"
define i32 @al_is_ssh_connection() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i8* %1, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int f40(int *);
int f41(int *p) { return f40(p); }


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

x86 assembly (clang, -O2):
<f41>:
jmp    1030 <f40@plt>

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

LLVM IR (-O2):
define i32 @f41(i32* %0) {
%2 = tail call i32 @f40(i32* %0)
ret i32 %2
}
void SteamAPI_ISteamFriends_ActivateGameOverlayToUser(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamFriends_ActivateGameOverlayToUser>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToUser = [49 x i8] c"SteamAPI_ISteamFriends_ActivateGameOverlayToUser\00"
define void @SteamAPI_ISteamFriends_ActivateGameOverlayToUser(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToUser, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToUser = [49 x i8] c"SteamAPI_ISteamFriends_ActivateGameOverlayToUser\00"
define void @SteamAPI_ISteamFriends_ActivateGameOverlayToUser(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToUser, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REQINFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REQINFO_it;
void OCSP_REQINFO_free(OCSP_REQINFO *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_REQINFO_it);
}


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

x86 assembly (clang, -O2):
<OCSP_REQINFO_free>:
mov    0x2ed9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@OCSP_REQINFO_it = global i32 0
define void @OCSP_REQINFO_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @OCSP_REQINFO_it)
ret void
}

LLVM IR (-O2):
@OCSP_REQINFO_it = global i32 0
define void @OCSP_REQINFO_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_REQINFO_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  extern char *__progname;
  (void)fprintf(stderr,
                "usage: %s [-BEFnNPV] [-d delim ] [-D date] [-f family] "
                "[-p protocol] [-t dir] [-u user] interface [...]\n",
                __progname);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [105 x i8] c"usage: %s [-BEFnNPV] [-d delim ] [-D date] [-f family] [-p protocol] [-t dir] [-u user] interface [...]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [105 x i8] c"usage: %s [-BEFnNPV] [-d delim ] [-D date] [-f family] [-p protocol] [-t dir] [-u user] interface [...]\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
unsigned GetVersionAsNumber(void) { return ((2U * 0x100) + (18U * 0x10)); }


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

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

LLVM IR (-O0):
define i32 @GetVersionAsNumber() {
ret i32 800
}

LLVM IR (-O2):
define i32 @GetVersionAsNumber() {
ret i32 800
}
void FaultISR(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<FaultISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <FaultISR+0x9>
jmp    1109 <FaultISR+0x9>

x86 assembly (clang, -O2):
<FaultISR>:
jmp    1100 <FaultISR>

LLVM IR (-O0):
define void @FaultISR() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @FaultISR() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned char inb(unsigned short _port) {
  unsigned char rv;
  asm volatile("inb %1, %0" : "=a"(rv) : "dN"(_port));
  return rv;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 zeroext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int syscall(int, char *, int /*<<< orphan*/);
int getname() {
  char x[64];
  int i = syscall(12, x, 0);
  printf("Proc Name: %s, size: %d", x, i);
  return i;
}


x86 assembly (clang, -O0):
<getname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rsi
mov    $0xc,%edi
xor    %edx,%edx
call   1040 <syscall@plt>
mov    %eax,-0x44(%rbp)
lea    -0x40(%rbp),%rsi
mov    -0x44(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getname>:
push   %rbp
push   %rbx
sub    $0x48,%rsp
mov    %rsp,%rbx
mov    $0xc,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <syscall@plt>
mov    %eax,%ebp
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Proc Name: %s, size: %d\00"
define i32 @getname() {
%1 = alloca [64 x i8]
%2 = alloca i32
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = call i32 @syscall(i32 12, i8* %3, i32 0)
store i32 %4, i32* %2
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [24 x i8] c"Proc Name: %s, size: %d\00"
define i32 @getname() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = call i32 @syscall(i32 12, i8* %2, i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
ret i32 %3
}
int addit(int a, int b, int *c) { return a + b; }


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

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

LLVM IR (-O0):
define i32 @addit(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 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @addit(i32 %0, i32 %1, i32* nocapture readnone %2) {
%4 = add nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ indirect();
int /*<<< orphan*/ readmemw65816(int /*<<< orphan*/);
int /*<<< orphan*/ sbc16(int /*<<< orphan*/);
void sbcIndirect16(void) { sbc16(readmemw65816(indirect())); }


x86 assembly (clang, -O0):
<sbcIndirect16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <indirect@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
call   1050 <sbc16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbcIndirect16>:
push   %rax
xor    %eax,%eax
call   1040 <indirect@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <sbc16@plt>

LLVM IR (-O0):
define void @sbcIndirect16() {
%1 = call i32 (...) @indirect()
%2 = call i32 @readmemw65816(i32 %1)
%3 = call i32 @sbc16(i32 %2)
ret void
}

LLVM IR (-O2):
define void @sbcIndirect16() {
%1 = tail call i32 (...) @indirect()
%2 = tail call i32 @readmemw65816(i32 %1)
%3 = tail call i32 @sbc16(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) { printf("hola\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"hola\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void PrintArray(int *array, int length) {
  int i;
  for (i = 0; i < length; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<PrintArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <PrintArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <PrintArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <PrintArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <PrintArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @PrintArray(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @PrintArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int get_input();
int do_input(void) {
  int input = get_input();
  return input;
}


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

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

LLVM IR (-O0):
define i32 @do_input() {
%1 = alloca i32
%2 = call i32 (...) @get_input()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @do_input() {
%1 = tail call i32 (...) @get_input()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float velocidade;
  printf("m/s: ");
  scanf("%f", &velocidade);
  printf("km/h: %.2f", velocidade * 3.6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xeae(%rip),%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"m/s: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [11 x i8] c"km/h: %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fmul double %6, 3.600000e+00
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"m/s: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [11 x i8] c"km/h: %.2f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 3.600000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
/* Type definitions */
struct tinyrl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tinyrl_reset_line_state(struct tinyrl *);
int /*<<< orphan*/ tinyrl_vt100_clear_screen(struct tinyrl *);
int /*<<< orphan*/ tinyrl_vt100_cursor_home(struct tinyrl *);
bool tinyrl_key_clear_screen(void *context, char *key) {
  struct tinyrl *this = context;
  tinyrl_vt100_clear_screen(this);
  tinyrl_vt100_cursor_home(this);
  tinyrl_reset_line_state(this);
  return true;
}


x86 assembly (clang, -O0):
<tinyrl_key_clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <tinyrl_vt100_clear_screen@plt>
mov    -0x18(%rbp),%rdi
call   1040 <tinyrl_vt100_cursor_home@plt>
mov    -0x18(%rbp),%rdi
call   1030 <tinyrl_reset_line_state@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tinyrl_key_clear_screen>:
push   %rbx
mov    %rdi,%rbx
call   1050 <tinyrl_vt100_clear_screen@plt>
mov    %rbx,%rdi
call   1040 <tinyrl_vt100_cursor_home@plt>
mov    %rbx,%rdi
call   1030 <tinyrl_reset_line_state@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tinyrl = type { i32 }
define i32 @tinyrl_key_clear_screen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.tinyrl*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.tinyrl*
store %struct.tinyrl* %7, %struct.tinyrl** %5
%8 = load %struct.tinyrl*, %struct.tinyrl** %5
%9 = call i32 @tinyrl_vt100_clear_screen(%struct.tinyrl* %8)
%10 = load %struct.tinyrl*, %struct.tinyrl** %5
%11 = call i32 @tinyrl_vt100_cursor_home(%struct.tinyrl* %10)
%12 = load %struct.tinyrl*, %struct.tinyrl** %5
%13 = call i32 @tinyrl_reset_line_state(%struct.tinyrl* %12)
ret i32 1
}

LLVM IR (-O2):
%struct.tinyrl = type { i32 }
define i32 @tinyrl_key_clear_screen(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to %struct.tinyrl*
%4 = tail call i32 @tinyrl_vt100_clear_screen(%struct.tinyrl* %3)
%5 = tail call i32 @tinyrl_vt100_cursor_home(%struct.tinyrl* %3)
%6 = tail call i32 @tinyrl_reset_line_state(%struct.tinyrl* %3)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ owr_bridge_start();
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  owr_bridge_start();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <owr_bridge_start@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 (...) @owr_bridge_start()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @owr_bridge_start()
ret i32 0
}
void load_knowed_track_num(void) {}


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

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

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

LLVM IR (-O2):
define void @load_knowed_track_num() {
ret void
}
void my_task_wrong_target_arg(int foo, char *bar) {}


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

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

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

LLVM IR (-O2):
define void @my_task_wrong_target_arg(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int ms_rand();
char rchar(char *map) {
  int i = ms_rand() % 62;
  return map[i];
}


x86 assembly (clang, -O0):
<rchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ms_rand@plt>
mov    $0x3e,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rchar>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <ms_rand@plt>
cltq
imul   $0xffffffff84210843,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
mov    %ecx,%edx
shl    $0x6,%edx
mov    %ecx,%esi
sub    %edx,%esi
add    %ecx,%esi
add    %eax,%esi
movslq %esi,%rax
mov    (%rbx,%rax,1),%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @rchar(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @ms_rand()
%5 = srem i32 %4, 62
store i32 %5, i32* %3
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @rchar(i8* nocapture %0) {
%2 = tail call i32 (...) @ms_rand()
%3 = srem i32 %2, 62
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}
void foo615() {}


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

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

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

LLVM IR (-O2):
define void @foo615() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int socketpair(int domain, int type, int protocol, int sv[2]) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<socketpair>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    0x2ed0(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb7(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socketpair>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socketpair(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* @ENOSYS
store i32 %9, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socketpair(i32 %0, i32 %1, i32 %2, i32* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ easy();
int /*<<< orphan*/ hard();
int main() {
  easy();
  hard();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <easy@plt>
mov    $0x0,%al
call   1040 <hard@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <easy@plt>
xor    %eax,%eax
call   1040 <hard@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @easy()
%2 = call i32 (...) @hard()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @easy()
%2 = tail call i32 (...) @hard()
ret i32 0
}
void translate(s, c1, c2) char *s;
char c1;
char c2;
{
  for (; *s != '\0'; ++s)
    if (*s == c1)
      *s = c2;
}


x86 assembly (clang, -O0):
<translate>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%cl
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <translate+0x55>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113f <translate+0x3f>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1144 <translate+0x44>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <translate+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<translate>:
mov    (%rdi),%cl
test   %cl,%cl
je     1127 <translate+0x27>
movsbl %sil,%eax
add    $0x1,%rdi
jmp    111b <translate+0x1b>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
je     1127 <translate+0x27>
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1110 <translate+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <translate+0x10>
ret

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

LLVM IR (-O2):
define void @translate(i8* nocapture %0, i32 %1, i32 %2) {
%4 = trunc i32 %2 to i8
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %20, label %7
7: ; preds = %3
%8 = shl i32 %1, 24
%9 = ashr exact i32 %8, 24
br label %10
10: ; preds = %7, %16
%11 = phi i8 [ %5, %7 ], [ %18, %16 ]
%12 = phi i8* [ %0, %7 ], [ %17, %16 ]
%13 = sext i8 %11 to i32
%14 = icmp eq i32 %9, %13
br i1 %14, label %15, label %16
15: ; preds = %10
store i8 %4, i8* %12
br label %16
16: ; preds = %10, %15
%17 = getelementptr inbounds i8, i8* %12, i64 1
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %10
20: ; preds = %16, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  time_t now;
  time_t time1 = time(&now);
  printf("%ld\n", now);
  printf("%ld\n", time1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @time(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void init_int(char *str, void *val) { *((int *)val) = *((int *)str); }


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

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

LLVM IR (-O0):
define void @init_int(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @init_int(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
store i32 %4, i32* %5
ret void
}
__attribute__((no, noclone)) unsigned __int128 t172_5mul(unsigned __int128 x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (unsigned __int128)(0), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t172_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
test   $0x1,%al
jne    114f <t172_5mul+0x3f>
jmp    1156 <t172_5mul+0x46>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define { i64, i64 } @t172_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 %11, i128 0)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t172_5mul(i64 %0, i64 %1) {
ret { i64, i64 } zeroinitializer
}
/* Type definitions */
typedef int /*<<< orphan*/ query;

/* Variables and functions */
int RS400_sendbytes(unsigned char *, int);
int RS400_factoryreset() {
  unsigned char query[] = {0x09};
  return RS400_sendbytes(query, sizeof(query));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <RS400_sendbytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
movb   $0x9,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <RS400_sendbytes@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.RS400_factoryreset.query = [1 x i8] c"\09"
define i32 @RS400_factoryreset() {
%1 = alloca [1 x i8]
%2 = bitcast [1 x i8]* %1 to i8*
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%4 = call i32 @RS400_sendbytes(i8* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @RS400_factoryreset() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
store i8 9, i8* %2
%3 = call i32 @RS400_sendbytes(i8* %2, i32 1)
ret i32 %3
}