xunge/DecIR huggingface dataset:
/* Variables and functions */
short barriereNatif16(short);
scalar_t__ systemeBigEndian();
short little16VersNatif(short little) {
  if (systemeBigEndian()) {
    return barriereNatif16(little);
  } else {
    return little;
  }
}


x86 assembly (clang, -O0):
<little16VersNatif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <systemeBigEndian@plt>
cmp    $0x0,%rax
je     1152 <little16VersNatif+0x32>
movswl -0x4(%rbp),%edi
call   1040 <barriereNatif16@plt>
mov    %ax,-0x2(%rbp)
jmp    115a <little16VersNatif+0x3a>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<little16VersNatif>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <systemeBigEndian@plt>
test   %rax,%rax
je     1138 <little16VersNatif+0x18>
movswl %bx,%edi
pop    %rbx
jmp    1040 <barriereNatif16@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @little16VersNatif(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = call i64 (...) @systemeBigEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i16, i16* %3
%8 = call signext i16 @barriereNatif16(i16 signext %7)
store i16 %8, i16* %2
br label %11
9: ; preds = %1
%10 = load i16, i16* %3
store i16 %10, i16* %2
br label %11
11: ; preds = %9, %6
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @little16VersNatif(i16 signext %0) {
%2 = tail call i64 (...) @systemeBigEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call signext i16 @barriereNatif16(i16 signext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i16 [ %5, %4 ], [ %0, %1 ]
ret i16 %7
}
unsigned int ConvertGrayToBinary8(unsigned int num) {
  unsigned int numBits = 8;
  unsigned int shift;
  for (shift = 1; shift < numBits; shift = 2 * shift)
    num = num ^ (num >> shift);
  return num;
}


x86 assembly (clang, -O0):
<ConvertGrayToBinary8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1141 <ConvertGrayToBinary8+0x41>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    -0xc(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <ConvertGrayToBinary8+0x15>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertGrayToBinary8>:
mov    %edi,%eax
shr    %eax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ConvertGrayToBinary8(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 8, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = icmp ult i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %2
%11 = load i32, i32* %2
%12 = load i32, i32* %4
%13 = lshr i32 %11, %12
%14 = xor i32 %10, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = mul i32 2, %16
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @ConvertGrayToBinary8(i32 %0) {
%2 = lshr i32 %0, 1
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 2
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 4
%7 = xor i32 %6, %5
ret i32 %7
}
short int decode(int smp, int vol, int cf1, int cf2, int p1, int p2) {
  return (((smp << 28) >> (vol + 8)) + cf1 * p1 + cf2 * p2 + 0x80) >> 8;
}


x86 assembly (clang, -O0):
<decode>:
push   %rbp
mov    %rsp,%rbp
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    -0x4(%rbp),%eax
shl    $0x1c,%eax
mov    -0x8(%rbp),%ecx
add    $0x8,%ecx
sar    %cl,%eax
mov    -0xc(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode>:
mov    %ecx,%eax
shl    $0x1c,%edi
lea    0x8(%rsi),%ecx
sar    %cl,%edi
imul   %r8d,%edx
add    %edi,%edx
imul   %r9d,%eax
add    %edx,%eax
add    $0x80,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define signext i16 @decode(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = shl i32 %13, 28
%15 = load i32, i32* %8
%16 = add nsw i32 %15, 8
%17 = ashr i32 %14, %16
%18 = load i32, i32* %9
%19 = load i32, i32* %11
%20 = mul nsw i32 %18, %19
%21 = add nsw i32 %17, %20
%22 = load i32, i32* %10
%23 = load i32, i32* %12
%24 = mul nsw i32 %22, %23
%25 = add nsw i32 %21, %24
%26 = add nsw i32 %25, 128
%27 = ashr i32 %26, 8
%28 = trunc i32 %27 to i16
ret i16 %28
}

LLVM IR (-O2):
define signext i16 @decode(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = shl i32 %0, 28
%8 = add nsw i32 %1, 8
%9 = ashr i32 %7, %8
%10 = mul nsw i32 %4, %2
%11 = mul nsw i32 %5, %3
%12 = add i32 %9, 128
%13 = add i32 %12, %10
%14 = add i32 %13, %11
%15 = lshr i32 %14, 8
%16 = trunc i32 %15 to i16
ret i16 %16
}
int fn1(int p) {
  int a = 0;
  return a || p < 0 || p >= 2 || 1 >> p;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jne    114e <fn1+0x4e>
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     114e <fn1+0x4e>
mov    $0x1,%al
cmpl   $0x2,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jge    114e <fn1+0x4e>
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
sar    %cl,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 2
br i1 %11, label %16, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = ashr i32 1, %13
%15 = icmp ne i32 %14, 0
br label %16
16: ; preds = %12, %9, %6, %1
%17 = phi i1 [ true, %9 ], [ true, %6 ], [ true, %1 ], [ %15, %12 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @fn1(i32 %0) {
%2 = icmp ne i32 %0, 1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ XMotionEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XMotionEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XMotionEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XMotionEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XMotionEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XMotionEvent>:
test   %rdi,%rdi
je     112a <free_XMotionEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XMotionEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XMotionEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Variables and functions */
double sinh(double);
double d_sinh(double *x) { return (sinh(*x)); }


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

x86 assembly (clang, -O2):
<d_sinh>:
movsd  (%rdi),%xmm0
jmp    1030 <sinh@plt>

LLVM IR (-O0):
define double @d_sinh(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
%5 = call double @sinh(double %4)
ret double %5
}

LLVM IR (-O2):
define double @d_sinh(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @sinh(double %2)
ret double %3
}
void do_exit() {}


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

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

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

LLVM IR (-O2):
define void @do_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _or(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ _shiftL(unsigned char *, unsigned char *, unsigned char);
int /*<<< orphan*/ _shiftR(unsigned char *, unsigned char *, int);
void ROL(unsigned char ans[8], unsigned char x[8], unsigned char r) {
  unsigned char r1[8];
  unsigned char r2[8];
  _shiftL(r1, x, r);
  _shiftR(r2, x, 64 - r);
  _or(ans, r1, r2);
}


x86 assembly (clang, -O0):
<ROL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
lea    -0x19(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movzbl -0x11(%rbp),%edx
call   1040 <_shiftL@plt>
lea    -0x21(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movzbl -0x11(%rbp),%eax
mov    $0x40,%edx
sub    %eax,%edx
call   1030 <_shiftR@plt>
mov    -0x8(%rbp),%rdi
lea    -0x19(%rbp),%rsi
lea    -0x21(%rbp),%rdx
call   1050 <_or@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROL>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x10(%rsp),%r12
mov    %r12,%rdi
call   1040 <_shiftL@plt>
mov    $0x40,%edx
sub    %ebx,%edx
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <_shiftR@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <_or@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ROL(i8* %0, i8* %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca [8 x i8]
%8 = alloca [8 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %5
%11 = load i8, i8* %6
%12 = call i32 @_shiftL(i8* %9, i8* %10, i8 zeroext %11)
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%14 = load i8*, i8** %5
%15 = load i8, i8* %6
%16 = zext i8 %15 to i32
%17 = sub nsw i32 64, %16
%18 = call i32 @_shiftR(i8* %13, i8* %14, i32 %17)
%19 = load i8*, i8** %4
%20 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%21 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%22 = call i32 @_or(i8* %19, i8* %20, i8* %21)
ret void
}

LLVM IR (-O2):
define void @ROL(i8* %0, i8* %1, i8 zeroext %2) {
%4 = alloca [8 x i8]
%5 = alloca [8 x i8]
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%8 = call i32 @_shiftL(i8* %6, i8* %1, i8 zeroext %2)
%9 = zext i8 %2 to i32
%10 = sub nsw i32 64, %9
%11 = call i32 @_shiftR(i8* %7, i8* %1, i32 %10)
%12 = call i32 @_or(i8* %0, i8* %6, i8* %7)
ret void
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *SEC_OSAL_dlsym(void *handle, const char *symbol) {
  return dlsym(handle, symbol);
}


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

x86 assembly (clang, -O2):
<SEC_OSAL_dlsym>:
jmp    1030 <dlsym@plt>

LLVM IR (-O0):
define i8* @SEC_OSAL_dlsym(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 i8* @dlsym(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @SEC_OSAL_dlsym(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
size_t packet_size_4gfsk_rx() { return (0x00 << 8) + 0x7C; }


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

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

LLVM IR (-O0):
define i64 @packet_size_4gfsk_rx() {
ret i64 124
}

LLVM IR (-O2):
define i64 @packet_size_4gfsk_rx() {
ret i64 124
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ mem_list_add(void *);
void *m_malloc(size_t size) {
  void *ptr;
  ptr = malloc(size);
  mem_list_add(ptr);
  return ptr;
}


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

x86 assembly (clang, -O2):
<m_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <mem_list_add@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @m_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @mem_list_add(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @m_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @mem_list_add(i8* %2)
ret i8* %2
}
void foo(void) {
  char a[1];
  int t = 1;
  ((char(*)[t])a)[0][0] = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   $0x0,%rax,%rax
movb   $0x0,-0x1(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca [1 x i8]
%2 = alloca i32
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%6 = mul nsw i64 0, %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 0, i8* %8
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
unsigned int getle16(const unsigned char *p) {
  return (p[0] << 0) | (p[1] << 8);
}


x86 assembly (clang, -O0):
<getle16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getle16>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @getle16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int somavet(int *);
main() {
  int vet[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  printf("Soma dos elementos e: %d", somavet(vet));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1030 <somavet@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <somavet@plt>
lea    0xed2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.vet = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [25 x i8] c"Soma dos elementos e: %d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @somavet(i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.vet = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
@.str = [25 x i8] c"Soma dos elementos e: %d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @somavet(i32* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void d2i_ASN1_ENUMERATED(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_ASN1_ENUMERATED() {
ret void
}
/* Variables and functions */
float scale(float, int /*<<< orphan*/, float, double, float);
float get_scrollbar_scroller_y1(float realline, float num_reallines,
                                float scrollbar_height,
                                float scrollbar_scroller_height) {
  return scale(realline, 0, num_reallines, 2.5,
               (scrollbar_height - scrollbar_scroller_height));
}


x86 assembly (clang, -O0):
<get_scrollbar_scroller_y1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm3
subss  -0x10(%rbp),%xmm3
xor    %edi,%edi
movsd  0xeb6(%rip),%xmm2
call   1030 <scale@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_scrollbar_scroller_y1>:
movaps %xmm2,%xmm4
subss  %xmm3,%xmm4
movsd  0xee1(%rip),%xmm2
xor    %edi,%edi
movaps %xmm4,%xmm3
jmp    1030 <scale@plt>

LLVM IR (-O0):
define float @get_scrollbar_scroller_y1(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = fsub float %11, %12
%14 = call float @scale(float %9, i32 0, float %10, double 2.500000e+00, float %13)
ret float %14
}

LLVM IR (-O2):
define float @get_scrollbar_scroller_y1(float %0, float %1, float %2, float %3) {
%5 = fsub float %2, %3
%6 = tail call float @scale(float %0, i32 0, float %1, double 2.500000e+00, float %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ puts(char *);
void usage_short() {
  puts("usage: zar [options] {zarfile} [input files]");
  exit(64);
}


x86 assembly (clang, -O0):
<usage_short>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x40,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_short>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x40,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"usage: zar [options] {zarfile} [input files]\00"
define void @usage_short() {
%1 = call i32 @puts(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 64)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"usage: zar [options] {zarfile} [input files]\00"
define void @usage_short() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 64)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_system_program_index_from_name() {
  printf("test_system_program_index_from_name...");
  printf("Ok\n");
}


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

x86 assembly (clang, -O2):
<test_system_program_index_from_name>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xef3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"test_system_program_index_from_name...\00"
@.str.1 = [4 x i8] c"Ok\0A\00"
define void @test_system_program_index_from_name() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"test_system_program_index_from_name...\00"
@str = [3 x i8] c"Ok\00"
define void @test_system_program_index_from_name() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ llvm_fcmp_uno(double, double);
int llvm_fcmp_ule(double X, double Y) { return X <= Y || llvm_fcmp_uno(X, Y); }


x86 assembly (clang, -O0):
<llvm_fcmp_ule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jae    1154 <llvm_fcmp_ule+0x44>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <llvm_fcmp_uno@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llvm_fcmp_ule>:
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
jae    1130 <llvm_fcmp_ule+0x20>
push   %rax
call   1030 <llvm_fcmp_uno@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @llvm_fcmp_ule(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call i64 @llvm_fcmp_uno(double %9, double %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %2
%14 = phi i1 [ true, %2 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @llvm_fcmp_ule(double %0, double %1) {
%3 = fcmp ugt double %0, %1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i64 @llvm_fcmp_uno(double %0, double %1)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ 1, %2 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ printf(char *, int, int);
void int_handler(int sig) {
  printf("Process %d received signal %d\n", getpid(), sig);
  exit(0);
}


x86 assembly (clang, -O0):
<int_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x4(%rbp),%edx
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<int_handler>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
mov    %ebx,%edx
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Process %d received signal %d\0A\00"
define void @int_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @getpid()
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Process %d received signal %d\0A\00"
define void @int_handler(i32 %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%i", 5550123);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x54b02b,%esi
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    $0x54b02b,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5550123)
ret i32 0
}
void loop_delay(long howlong) {
  long i;
  for (i = 0; i < (howlong * 30000000); i++) {
  }
}


x86 assembly (clang, -O0):
<loop_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x1c9c380,-0x8(%rbp),%rcx
01
cmp    %rcx,%rax
jge    113b <loop_delay+0x3b>
jmp    112a <loop_delay+0x2a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <loop_delay+0x10>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @loop_delay(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbuf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ strlen(char const *);
void outstr(const char *string) { outbuf(strlen(string), string); }


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

x86 assembly (clang, -O2):
<outstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <outbuf@plt>

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

LLVM IR (-O2):
define void @outstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @outbuf(i32 %2, i8* %0)
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ warnx(char *);
const char *get_home_dir(void) {
  const char *home_dir;
  if ((home_dir = getenv("HOME")) == NULL) {
    warnx("HOME not set, using / as home dir");
    home_dir = "/";
  }
}


x86 assembly (clang, -O0):
<get_home_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1159 <get_home_dir+0x39>
lea    0xebc(%rip),%rdi
call   1040 <warnx@plt>
lea    0xed2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_home_dir>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1134 <get_home_dir+0x14>
pop    %rcx
ret
lea    0xeca(%rip),%rdi
call   1040 <warnx@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
@.str.1 = [34 x i8] c"HOME not set, using / as home dir\00"
@.str.2 = [2 x i8] c"/\00"
define i8* @get_home_dir() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @warnx(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %5, %0
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
@.str.1 = [34 x i8] c"HOME not set, using / as home dir\00"
define noalias i8* @get_home_dir() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @warnx(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i8* undef
}
void X509_VERIFY_PARAM_set_depth(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_VERIFY_PARAM_set_depth() {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ entropium_getRandomBlock(void *);
uint8_t entropium_getRandomByte(void) {
  static uint8_t block[32];
  static uint8_t i = 32;
  if (i == 32) {
    entropium_getRandomBlock((void *)block);
    i = 0;
  }
  return block[i++];
}


x86 assembly (clang, -O0):
<entropium_getRandomByte>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x20,0x2f0d(%rip)
jne    1137 <entropium_getRandomByte+0x27>
lea    0x2f18(%rip),%rdi
call   1030 <entropium_getRandomBlock@plt>
movl   $0x0,0x2ef1(%rip)
mov    0x2eeb(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2ee0(%rip)
movslq %eax,%rcx
lea    0x2eee(%rip),%rax
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<entropium_getRandomByte>:
push   %rax
mov    0x2f11(%rip),%eax
cmp    $0x20,%eax
jne    112a <entropium_getRandomByte+0x1a>
lea    0x2f1d(%rip),%rdi
call   1030 <entropium_getRandomBlock@plt>
xor    %eax,%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2ef5(%rip)
cltq
lea    0x2f04(%rip),%rcx
mov    (%rcx,%rax,4),%eax
pop    %rcx
ret

LLVM IR (-O0):
@entropium_getRandomByte.block = internal global [32 x i32] zeroinitializer
@entropium_getRandomByte.i = internal global i32 32
define i32 @entropium_getRandomByte() {
%1 = load i32, i32* @entropium_getRandomByte.i
%2 = icmp eq i32 %1, 32
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @entropium_getRandomBlock(i8* bitcast ([32 x i32]* @entropium_getRandomByte.block to i8*))
store i32 0, i32* @entropium_getRandomByte.i
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @entropium_getRandomByte.i
%7 = add nsw i32 %6, 1
store i32 %7, i32* @entropium_getRandomByte.i
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds [32 x i32], [32 x i32]* @entropium_getRandomByte.block, i64 0, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
@entropium_getRandomByte.block = internal global [32 x i32] zeroinitializer
@entropium_getRandomByte.i = internal unnamed_addr global i32 32
define i32 @entropium_getRandomByte() {
%1 = load i32, i32* @entropium_getRandomByte.i
%2 = icmp eq i32 %1, 32
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @entropium_getRandomBlock(i8* bitcast ([32 x i32]* @entropium_getRandomByte.block to i8*))
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ 0, %3 ], [ %1, %0 ]
%7 = add nsw i32 %6, 1
store i32 %7, i32* @entropium_getRandomByte.i
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds [32 x i32], [32 x i32]* @entropium_getRandomByte.block, i64 0, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}
/* Variables and functions */
void Default_Handler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
p(int a) {
  printf(a);
  if (a) {
    p(a - 1);
  }
}


x86 assembly (clang, -O0):
<p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movslq -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     114b <p+0x2b>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <p@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
movslq %edi,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebx,%ebx
je     1143 <p+0x33>
add    $0xffffffffffffffff,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
add    $0xffffffff,%ebp
jne    1130 <p+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = call i32 (i8*, ...) @printf(i8* %6)
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 1
%13 = call i32 @p(i32 %12)
br label %14
14: ; preds = %10, %1
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @p(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %3)
%5 = icmp eq i32 %0, 0
br i1 %5, label %13, label %6
6: ; preds = %1, %6
%7 = phi i64 [ %8, %6 ], [ %2, %1 ]
%8 = add nsw i64 %7, -1
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9)
%11 = trunc i64 %8 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %1
ret i32 undef
}
/* Variables and functions */
float __nv_fast_fdividef(float, float);
float __fdividef(float __a, float __b) { return __nv_fast_fdividef(__a, __b); }


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

x86 assembly (clang, -O2):
<__fdividef>:
jmp    1030 <__nv_fast_fdividef@plt>

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

LLVM IR (-O2):
define float @__fdividef(float %0, float %1) {
%3 = tail call float @__nv_fast_fdividef(float %0, float %1)
ret float %3
}
/* Variables and functions */
char const *gui_color_get_custom(char const *);
char *gui_color_search_config(char const *);
const char *plugin_api_color(const char *color_name) {
  const char *str_color;
  if (!color_name)
    return "\x1C";
  str_color = gui_color_search_config(color_name);
  if (str_color)
    return str_color;
  return gui_color_get_custom(color_name);
}


x86 assembly (clang, -O0):
<plugin_api_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <plugin_api_color+0x27>
lea    0xec2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <plugin_api_color+0x59>
mov    -0x10(%rbp),%rdi
call   1040 <gui_color_search_config@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116c <plugin_api_color+0x4c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <plugin_api_color+0x59>
mov    -0x10(%rbp),%rdi
call   1030 <gui_color_get_custom@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_color>:
push   %rbx
test   %rdi,%rdi
je     1135 <plugin_api_color+0x15>
mov    %rdi,%rbx
call   1040 <gui_color_search_config@plt>
test   %rax,%rax
je     113e <plugin_api_color+0x1e>
pop    %rbx
ret
lea    0xec4(%rip),%rax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <gui_color_get_custom@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\1C\00"
define i8* @plugin_api_color(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %2
br label %18
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @gui_color_search_config(i8* %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %18
15: ; preds = %8
%16 = load i8*, i8** %3
%17 = call i8* @gui_color_get_custom(i8* %16)
store i8* %17, i8** %2
br label %18
18: ; preds = %15, %13, %7
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [2 x i8] c"\1C\00"
define i8* @plugin_api_color(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @gui_color_search_config(i8* %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* @gui_color_get_custom(i8* %0)
br label %8
8: ; preds = %3, %1, %6
%9 = phi i8* [ %7, %6 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ], [ %4, %3 ]
ret i8* %9
}
int isstump(char c) { return c == '*' || c == 'S' || c == 'T'; }


x86 assembly (clang, -O0):
<isstump>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     113b <isstump+0x3b>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x53,%ecx
mov    %al,-0x2(%rbp)
je     113b <isstump+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x54,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstump>:
mov    $0x1,%eax
cmp    $0x2a,%dil
je     1111 <isstump+0x11>
cmp    $0x53,%dil
jne    1112 <isstump+0x12>
ret
xor    %eax,%eax
cmp    $0x54,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isstump(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 42
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 83
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 84
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @isstump(i8 signext %0) {
switch i8 %0, label %2 [
i8 83, label %5
i8 42, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 84
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int display_progress(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
int main(void) {
  int i = 0;
  int ret = 0;
  printf("progress:  ");
  for (i = 0; i < 101; i++) {
    ret = display_progress(i, ret);
    usleep(1000 * 200);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1190 <main+0x60>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <display_progress@plt>
mov    %eax,-0xc(%rbp)
mov    $0x30d40,%edi
call   1050 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1160 <main+0x30>
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %ebx,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <display_progress@plt>
mov    %eax,%ebx
mov    $0x30d40,%edi
call   1060 <usleep@plt>
add    $0x1,%ebp
cmp    $0x65,%ebp
jne    1160 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"progress: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = phi i32 [ 0, %0 ], [ %7, %2 ]
%5 = tail call i32 @display_progress(i32 %4, i32 %3)
%6 = tail call i32 @usleep(i32 200000)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 101
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = tail call i32 @putchar(i32 10)
ret i32 0
}
const char *nxs_version() { return "1.5"; }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"1.5\00"
define i8* @nxs_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetWMColormapWindows() {
  printf("XSetWMColormapWindows called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [29 x i8] c"XSetWMColormapWindows called\00"
define i32 @XSetWMColormapWindows() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void rop3_168_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


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

x86 assembly (clang, -O2):
<rop3_168_1_0>:
or     %edx,%esi
and    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_168_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %5, %4
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
int main() {
  a();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @a()
ret i32 0
}
/* Type definitions */
struct hash_table {
  int dummy;
};

/* Variables and functions */
void *hash_delete_at(struct hash_table *, void **);
void **hash_find_slot(struct hash_table *, void const *);
void *hash_delete(struct hash_table *ht, const void *item) {
  void **slot = hash_find_slot(ht, item);
  return hash_delete_at(ht, slot);
}


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

x86 assembly (clang, -O2):
<hash_delete>:
push   %rbx
mov    %rdi,%rbx
call   1040 <hash_find_slot@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <hash_delete_at@plt>

LLVM IR (-O0):
%struct.hash_table = type { i32 }
define i8* @hash_delete(%struct.hash_table* %0, i8* %1) {
%3 = alloca %struct.hash_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.hash_table* %0, %struct.hash_table** %3
store i8* %1, i8** %4
%6 = load %struct.hash_table*, %struct.hash_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @hash_find_slot(%struct.hash_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load %struct.hash_table*, %struct.hash_table** %3
%10 = load i8**, i8*** %5
%11 = call i8* @hash_delete_at(%struct.hash_table* %9, i8** %10)
ret i8* %11
}

LLVM IR (-O2):
%struct.hash_table = type { i32 }
define i8* @hash_delete(%struct.hash_table* %0, i8* %1) {
%3 = tail call i8** @hash_find_slot(%struct.hash_table* %0, i8* %1)
%4 = tail call i8* @hash_delete_at(%struct.hash_table* %0, i8** %3)
ret i8* %4
}