xunge/DecIR huggingface dataset:
unsigned xrop3_14_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D | S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_14_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_14_0_0>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
not    %edi
shl    $0x8,%edi
or     %edi,%eax
not    %eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_14_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %3, -1
%7 = shl nsw i32 %6, 8
%8 = or i32 %5, %7
%9 = xor i32 %8, -1
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void I2CSlaveIntClear(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000818))) = 0x00000001;
}


x86 assembly (clang, -O0):
<I2CSlaveIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x1,0x818(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntClear>:
movq   $0x1,0x818(%rdi)
ret

LLVM IR (-O0):
define void @I2CSlaveIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 2072
%5 = inttoptr i64 %4 to i64*
store volatile i64 1, i64* %5
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntClear(i64 %0) {
%2 = add nsw i64 %0, 2072
%3 = inttoptr i64 %2 to i64*
store volatile i64 1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void prool_version() {
  printf("Built by Prool %s %s "
         "proolix@gmail.com\nhttp://calculix.kharkov.org\nUse PROOL command in "
         "CGX main window for additional info\n",
         "Mar 18 2022", "23:08:36");
}


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

x86 assembly (clang, -O2):
<prool_version>:
lea    0xee9(%rip),%rdi
lea    0xf5f(%rip),%rsi
lea    0xf64(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:08:36\00"
define void @prool_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [125 x i8] c"Built by Prool %s %s proolix@gmail.com\0Ahttp://calculix.kharkov.org\0AUse PROOL command in CGX main window for additional info\0A\00"
@.str.1 = [12 x i8] c"Mar 18 2022\00"
@.str.2 = [9 x i8] c"23:08:36\00"
define void @prool_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
unsigned short processorSwap16(unsigned short variable) {
  volatile unsigned short tmp = (variable);
  __asm__ __volatile__("rolw $8, %0" : "=r"(tmp) : "r"(tmp));
  return (tmp);
}


x86 assembly (clang, -O0):
<processorSwap16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
rol    $0x8,%ax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<processorSwap16>:
mov    %di,-0x2(%rsp)
movzwl -0x2(%rsp),%eax
rol    $0x8,%ax
mov    %ax,-0x2(%rsp)
movzwl -0x2(%rsp),%eax
ret

LLVM IR (-O0):
define zeroext i16 @processorSwap16(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
store volatile i16 %4, i16* %3
%5 = load volatile i16, i16* %3
%6 = call i16 asm sideeffect "rolw $$8, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i16 %5)
store volatile i16 %6, i16* %3
%7 = load volatile i16, i16* %3
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @processorSwap16(i16 zeroext %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
store volatile i16 %0, i16* %2
%4 = load volatile i16, i16* %2
%5 = tail call i16 asm sideeffect "rolw $$8, $0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store volatile i16 %5, i16* %2
%6 = load volatile i16, i16* %2
ret i16 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int SM2_sign_ex(int, unsigned char const *, int, unsigned char *,
                unsigned int *, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                int /*<<< orphan*/ *);
int SM2_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig,
             unsigned int *siglen, EC_KEY *eckey) {
  return SM2_sign_ex(type, dgst, dlen, sig, siglen, NULL, NULL, eckey);
}


x86 assembly (clang, -O0):
<SM2_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%rax
xor    %r9d,%r9d
movq   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <SM2_sign_ex@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SM2_sign>:
push   %rax
mov    %r9,%rax
xor    %r9d,%r9d
push   %rax
push   $0x0
call   1030 <SM2_sign_ex@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SM2_sign(i32 %0, i8* %1, i32 %2, i8* %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = call i32 @SM2_sign_ex(i32 %13, i8* %14, i32 %15, i8* %16, i32* %17, i32* null, i32* null, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @SM2_sign(i32 %0, i8* %1, i32 %2, i8* %3, i32* %4, i32* %5) {
%7 = tail call i32 @SM2_sign_ex(i32 %0, i8* %1, i32 %2, i8* %3, i32* %4, i32* null, i32* null, i32* %5)
ret i32 %7
}
/* Variables and functions */
void *aligned_alloc(size_t, size_t);
void *memalign(size_t align, size_t len) { return aligned_alloc(align, len); }


x86 assembly (clang, -O0):
<memalign>:
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 <aligned_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memalign>:
jmp    1030 <aligned_alloc@plt>

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

LLVM IR (-O2):
define i8* @memalign(i64 %0, i64 %1) {
%3 = tail call i8* @aligned_alloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(int n) {
  if (n > 0) {
    int j = 0;
    do {
      if (n > 0) {
        int i = 0;
        do {
          bar();
        } while (i < n);
      }
    } while (j < n);
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    116b <foo+0x5b>
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1155 <foo+0x45>
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     113d <foo+0x2d>
jmp    1155 <foo+0x45>
jmp    115a <foo+0x4a>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     112c <foo+0x1c>
jmp    116b <foo+0x5b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
test   %edi,%edi
jle    1129 <foo+0x19>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <bar@plt>
jmp    1120 <foo+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %25
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %20, %7
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %8
store i32 0, i32* %4
br label %12
12: ; preds = %14, %11
%13 = call i32 (...) @bar()
br label %14
14: ; preds = %12
%15 = load i32, i32* %4
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %12, label %18
18: ; preds = %14
br label %19
19: ; preds = %18, %8
br label %20
20: ; preds = %19
%21 = load i32, i32* %3
%22 = load i32, i32* %2
%23 = icmp slt i32 %21, %22
br i1 %23, label %8, label %24
24: ; preds = %20
br label %25
25: ; preds = %24, %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %3
%4 = tail call i32 (...) @bar()
br label %3
5: ; preds = %1
ret void
}
/* Type definitions */
typedef double int64_t;

/* Variables and functions */
double ceil(double d) {
  double frac = d - (int64_t)d;
  return frac ? d + (1 - frac) : d;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1135 <ceil+0x35>
jp     1135 <ceil+0x35>
jmp    1155 <ceil+0x55>
movsd  -0x8(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    115f <ceil+0x5f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
movapd %xmm0,%xmm1
subsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm2
subsd  %xmm1,%xmm2
xorpd  %xmm3,%xmm3
cmpneqsd %xmm1,%xmm3
andpd  %xmm3,%xmm2
movsd  0xedf(%rip),%xmm1
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %3
%7 = load double, double* %3
%8 = fcmp une double %7, 0.000000e+00
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load double, double* %2
%11 = load double, double* %3
%12 = fsub double 1.000000e+00, %11
%13 = fadd double %10, %12
br label %16
14: ; preds = %1
%15 = load double, double* %2
br label %16
16: ; preds = %14, %9
%17 = phi double [ %13, %9 ], [ %15, %14 ]
ret double %17
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fsub double %0, %0
%3 = fcmp une double %2, 0.000000e+00
%4 = fsub double 1.000000e+00, %2
%5 = select i1 %3, double %4, double -0.000000e+00
%6 = fadd double %5, %0
ret double %6
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
ssize_t checkz(ssize_t r, const char *w) {
  if (r < 0)
    err(1, "%s", w);
  return r;
}


x86 assembly (clang, -O0):
<checkz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1140 <checkz+0x30>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
call   1030 <err@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkz>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jns    112d <checkz+0x1d>
mov    %rsi,%rdx
lea    0xedd(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i64 @checkz(i64 returned %0, i8* %1) {
%3 = icmp slt i64 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret i64 %0
}
int W(int w, int h) { return w + h; }


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

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

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

LLVM IR (-O2):
define i32 @W(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int print_version() { return EXIT_SUCCESS; }


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @print_version() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @print_version() {
%1 = load i32, i32* @EXIT_SUCCESS
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ecdsa_get_pubkeyhash(int /*<<< orphan*/ const *,
                                        int /*<<< orphan*/ *);
void ecdsa_get_address_raw(const uint8_t *pub_key, uint8_t version,
                           uint8_t *addr_raw) {
  addr_raw[0] = version;
  ecdsa_get_pubkeyhash(pub_key, addr_raw + 1);
}


x86 assembly (clang, -O0):
<ecdsa_get_address_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x4,%rsi
call   1030 <ecdsa_get_pubkeyhash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecdsa_get_address_raw>:
mov    %esi,(%rdx)
lea    0x4(%rdx),%rsi
jmp    1030 <ecdsa_get_pubkeyhash@plt>

LLVM IR (-O0):
define void @ecdsa_get_address_raw(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* %5
%8 = load i32*, i32** %6
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32*, i32** %4
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = call i32 @ecdsa_get_pubkeyhash(i32* %10, i32* %12)
ret void
}

LLVM IR (-O2):
define void @ecdsa_get_address_raw(i32* %0, i32 %1, i32* %2) {
store i32 %1, i32* %2
%4 = getelementptr inbounds i32, i32* %2, i64 1
%5 = tail call i32 @ecdsa_get_pubkeyhash(i32* %0, i32* %4)
ret void
}
/* Type definitions */
struct pcmciaDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void pcmciaFreeDevice(struct pcmciaDevice *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<pcmciaFreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.pcmciaDevice = type { i32 }
%struct.device = type { i32 }
define void @pcmciaFreeDevice(%struct.pcmciaDevice* %0) {
%2 = alloca %struct.pcmciaDevice*
store %struct.pcmciaDevice* %0, %struct.pcmciaDevice** %2
%3 = load %struct.pcmciaDevice*, %struct.pcmciaDevice** %2
%4 = bitcast %struct.pcmciaDevice* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.pcmciaDevice = type { i32 }
%struct.device = type { i32 }
define void @pcmciaFreeDevice(%struct.pcmciaDevice* %0) {
%2 = bitcast %struct.pcmciaDevice* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void myprint_libB(char *str) { printf("libB print: %s", str); }


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

x86 assembly (clang, -O2):
<myprint_libB>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"libB print: %s\00"
define void @myprint_libB(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"libB print: %s\00"
define void @myprint_libB(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void fast_log_msgr_info_dump(struct fast_log_entry *fe __attribute__((unused)),
                             char *buf __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_info_dump(%struct.fast_log_entry* %0, i8* %1) {
%3 = alloca %struct.fast_log_entry*
%4 = alloca i8*
store %struct.fast_log_entry* %0, %struct.fast_log_entry** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.fast_log_entry = type opaque
define void @fast_log_msgr_info_dump(%struct.fast_log_entry* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hola \n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [7 x i8] c"Hola \0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Hola \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_E3int16_mem(short *val) {
  return ((*val) & (-0xE3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E3int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff1d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E3int16_mem>:
movzwl (%rdi),%eax
test   $0xff1d,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E3int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -227
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_E3int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -227
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ set_line_gwt(double, double, int);
void default_line_gwt() { set_line_gwt(0.0, 1.0, 1); }


x86 assembly (clang, -O0):
<default_line_gwt>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm0,%xmm0
movsd  0xee1(%rip),%xmm1
mov    $0x1,%edi
call   1030 <set_line_gwt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_line_gwt>:
movsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
mov    $0x1,%edi
jmp    1030 <set_line_gwt@plt>

LLVM IR (-O0):
define void @default_line_gwt() {
%1 = call i32 @set_line_gwt(double 0.000000e+00, double 1.000000e+00, i32 1)
ret void
}

LLVM IR (-O2):
define void @default_line_gwt() {
%1 = tail call i32 @set_line_gwt(double 0.000000e+00, double 1.000000e+00, i32 1)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timespec {
  long tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void sleepm(unsigned int size) {
  struct timespec sleeper, dummy;
  sleeper.tv_sec = (time_t)(size / 1000);
  sleeper.tv_nsec = (long)(size % 1000) * 1000000;
  nanosleep(&sleeper, &dummy);
}


x86 assembly (clang, -O0):
<sleepm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
imul   $0xf4240,%rax,%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleepm>:
sub    $0x28,%rsp
mov    %edi,%eax
imul   $0x10624dd3,%rax,%rax
shr    $0x26,%rax
mov    %rax,0x10(%rsp)
imul   $0x3e8,%eax,%eax
sub    %eax,%edi
imul   $0xf4240,%edi,%eax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define void @sleepm(i32 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = udiv i32 %0, 1000
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 %7, i64* %8
%9 = urem i32 %0, 1000
%10 = mul nuw nsw i32 %9, 1000000
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i64 %11, i64* %12
%13 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ recv(int, void *, size_t, int /*<<< orphan*/);
ssize_t myread_swift_balancer(int fd, void *buf, size_t len) {
  return recv(fd, buf, len, 0);
}


x86 assembly (clang, -O0):
<myread_swift_balancer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myread_swift_balancer>:
xor    %ecx,%ecx
jmp    1030 <recv@plt>

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

LLVM IR (-O2):
define i32 @myread_swift_balancer(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i32 %4
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void sleep(int ms) {
  struct timespec waittime;
  waittime.tv_sec = (ms / 1000);
  ms = ms % 1000;
  waittime.tv_nsec = ms * 1000 * 1000;
  nanosleep(&waittime, NULL);
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 1000
%11 = mul nsw i32 %10, 1000
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %11, i32* %12
%13 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
int f(int x, ...) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0, ...) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_REQUEST;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_REQUEST_it;
OCSP_REQUEST *d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in,
                               long len) {
  return (OCSP_REQUEST *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                       &OCSP_REQUEST_it);
}


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

x86 assembly (clang, -O2):
<d2i_OCSP_REQUEST>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@OCSP_REQUEST_it = global i32 0
define i32* @d2i_OCSP_REQUEST(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @OCSP_REQUEST_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@OCSP_REQUEST_it = global i32 0
define i32* @d2i_OCSP_REQUEST(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @OCSP_REQUEST_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char const *, char const *);
int espif_error(int rv, size_t buflen, char *buf, const char *hostname,
                const char *error) {
  snprintf(buf, buflen, "%s: %s (%m)", hostname, error);
  return (rv);
}


x86 assembly (clang, -O0):
<espif_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<espif_error>:
push   %rbx
mov    %rdx,%rax
mov    %edi,%ebx
lea    0xee3(%rip),%rdx
mov    %rax,%rdi
call   1030 <snprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%s: %s (%m)\00"
define i32 @espif_error(i32 returned %0, i64 %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @snprintf(i8* %2, i64 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret i32 %0
}
void dfn_av(void) {}


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

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

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

LLVM IR (-O2):
define void @dfn_av() {
ret void
}
/* Variables and functions */
unsigned short SYS16_SetBit(unsigned short, unsigned short);
scalar_t__ pow(double, double);
unsigned short SYS16_ClrBit(unsigned short bit, unsigned short value) {
  value = SYS16_SetBit(bit, value);
  return (value ^ (unsigned short)(pow(2.0, (double)bit)));
}


x86 assembly (clang, -O0):
<SYS16_ClrBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%edi
movzwl -0x4(%rbp),%esi
call   1040 <SYS16_SetBit@plt>
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xea2(%rip),%xmm0
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
movzwl %cx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SYS16_ClrBit>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <SYS16_SetBit@plt>
mov    %eax,%ebp
cvtsi2sd %ebx,%xmm1
movsd  0xec8(%rip),%xmm0
call   1030 <pow@plt>
xor    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @SYS16_ClrBit(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = load i16, i16* %4
%7 = call zeroext i16 @SYS16_SetBit(i16 zeroext %5, i16 zeroext %6)
store i16 %7, i16* %4
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = load i16, i16* %3
%11 = uitofp i16 %10 to double
%12 = call i64 @pow(double 2.000000e+00, double %11)
%13 = trunc i64 %12 to i16
%14 = zext i16 %13 to i32
%15 = xor i32 %9, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @SYS16_ClrBit(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call zeroext i16 @SYS16_SetBit(i16 zeroext %0, i16 zeroext %1)
%4 = uitofp i16 %0 to double
%5 = tail call i64 @pow(double 2.000000e+00, double %4)
%6 = trunc i64 %5 to i16
%7 = xor i16 %3, %6
ret i16 %7
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int mlt_audio_calculate_samples_to_position(float, int, scalar_t__);
int mlt_audio_calculate_frame_samples(float fps, int frequency,
                                      int64_t position) {
  return mlt_audio_calculate_samples_to_position(fps, frequency, position + 1) -
         mlt_audio_calculate_samples_to_position(fps, frequency, position);
}


x86 assembly (clang, -O0):
<mlt_audio_calculate_frame_samples>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <mlt_audio_calculate_samples_to_position@plt>
mov    %eax,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mlt_audio_calculate_samples_to_position@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
sub    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlt_audio_calculate_frame_samples>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
movss  %xmm0,0xc(%rsp)
add    $0x1,%rsi
call   1030 <mlt_audio_calculate_samples_to_position@plt>
mov    %eax,%ebx
movss  0xc(%rsp),%xmm0
mov    %ebp,%edi
mov    %r14,%rsi
call   1030 <mlt_audio_calculate_samples_to_position@plt>
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mlt_audio_calculate_frame_samples(float %0, i32 %1, i64 %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i64
store float %0, float* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load float, float* %4
%8 = load i32, i32* %5
%9 = load i64, i64* %6
%10 = add nsw i64 %9, 1
%11 = call i32 @mlt_audio_calculate_samples_to_position(float %7, i32 %8, i64 %10)
%12 = load float, float* %4
%13 = load i32, i32* %5
%14 = load i64, i64* %6
%15 = call i32 @mlt_audio_calculate_samples_to_position(float %12, i32 %13, i64 %14)
%16 = sub nsw i32 %11, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @mlt_audio_calculate_frame_samples(float %0, i32 %1, i64 %2) {
%4 = add nsw i64 %2, 1
%5 = tail call i32 @mlt_audio_calculate_samples_to_position(float %0, i32 %1, i64 %4)
%6 = tail call i32 @mlt_audio_calculate_samples_to_position(float %0, i32 %1, i64 %2)
%7 = sub nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: convert [-b -o -h] decimal_number \n"); }


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"usage: convert [-b -o -h] decimal_number \0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"usage: convert [-b -o -h] decimal_number \00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret void
}
void TeX_search_init(char *exec_name, char *program_identifier,
                     char *env_identifier) {}


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

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

LLVM IR (-O0):
define void @TeX_search_init(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @TeX_search_init(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint64_t u32_to_64(uint32_t low, uint32_t high) {
  return ((uint64_t)high << 32) + (uint64_t)low;
}


x86 assembly (clang, -O0):
<u32_to_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @u32_to_64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 32
%8 = load i64, i64* %3
%9 = trunc i64 %8 to i32
%10 = add nsw i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @u32_to_64(i64 %0, i64 %1) {
ret i32 poison
}
int char2hex(int c) {
  if (c >= '0' && c <= '9')
    return (c - 48);
  else if (c >= 'a' && c <= 'f')
    return (c - 87);
  else if (c >= 'A' && c <= 'F')
    return (c - 55);
  else
    return -1;
}


x86 assembly (clang, -O0):
<char2hex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <char2hex+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <char2hex+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <char2hex+0x74>
cmpl   $0x61,-0x8(%rbp)
jl     114b <char2hex+0x4b>
cmpl   $0x66,-0x8(%rbp)
jg     114b <char2hex+0x4b>
mov    -0x8(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <char2hex+0x74>
cmpl   $0x41,-0x8(%rbp)
jl     116d <char2hex+0x6d>
cmpl   $0x46,-0x8(%rbp)
jg     116d <char2hex+0x6d>
mov    -0x8(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <char2hex+0x74>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char2hex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <char2hex+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <char2hex+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @char2hex(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %31
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 87
store i32 %20, i32* %2
br label %31
21: ; preds = %15, %12
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 65
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sle i32 %25, 70
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %3
%29 = sub nsw i32 %28, 55
store i32 %29, i32* %2
br label %31
30: ; preds = %24, %21
store i32 -1, i32* %2
br label %31
31: ; preds = %30, %27, %18, %9
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @char2hex(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
void uccF(char *x) {
  unsigned char *y;
  y = x;
}


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

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

LLVM IR (-O0):
define void @uccF(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
ret void
}

LLVM IR (-O2):
define void @uccF(i8* nocapture %0) {
ret void
}
int getBank(int count) {
  int retval = count / 1024;
  if (retval < 2)
    retval += 2;
  else if (retval < 4)
    retval -= 2;
  return (retval);
}


x86 assembly (clang, -O0):
<getBank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    112d <getBank+0x2d>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <getBank+0x45>
cmpl   $0x4,-0x8(%rbp)
jge    1140 <getBank+0x40>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <getBank+0x45>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBank>:
lea    0x3ff(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0xa,%ecx
lea    -0x2(%rcx),%eax
cmp    $0x1000,%edi
cmovge %ecx,%eax
add    $0x2,%ecx
cmp    $0x800,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getBank(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1024
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 2
store i32 %10, i32* %3
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 4
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 2
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %11
br label %18
18: ; preds = %17, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @getBank(i32 %0) {
%2 = sdiv i32 %0, 1024
%3 = icmp slt i32 %0, 2048
%4 = add nsw i32 %2, 2
%5 = icmp slt i32 %0, 4096
%6 = add nsw i32 %2, -2
%7 = select i1 %5, i32 %6, i32 %2
%8 = select i1 %3, i32 %4, i32 %7
ret i32 %8
}
void fiq_set_type(int fiq, unsigned int type) {}


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

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

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

LLVM IR (-O2):
define void @fiq_set_type(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t pgm_read_byte(const void *ptr) { return *(const uint8_t *)ptr; }


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

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

LLVM IR (-O0):
define i32 @pgm_read_byte(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @pgm_read_byte(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_configdir(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_configdir>:
jmp    1030 <mock@plt>

LLVM IR (-O0):
define i8* @cf_s_configdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @mock(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @cf_s_configdir(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  bool bool_val;
  bool_val = false;
  printf("false = %d\n", bool_val);
  bool_val = true;
  printf("true = %d\n", bool_val);
  exit(EXIT_SUCCESS);
  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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"false = %d\0A\00"
@.str.1 = [11 x i8] c"true = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
}