xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __svgalib_driver32_putbox(int, int, int, int, void *, int);
void __svgalib_driver32_putboxpart(int x, int y, int w, int h, int ow, int oh,
                                   void *b, int xo, int yo) {
  __svgalib_driver32_putbox(x, y, w, h, b + yo * ow * 4 + xo * 4, ow);
}


x86 assembly (clang, -O0):
<__svgalib_driver32_putboxpart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
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),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    0x10(%rbp),%r8
mov    0x20(%rbp),%eax
imul   -0x14(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%r8
mov    0x18(%rbp),%eax
shl    $0x2,%eax
cltq
add    %rax,%r8
mov    -0x14(%rbp),%r9d
call   1030 <__svgalib_driver32_putbox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__svgalib_driver32_putboxpart>:
mov    %r8d,%r9d
mov    0x18(%rsp),%eax
imul   %r8d,%eax
shl    $0x2,%eax
movslq %eax,%r10
add    0x8(%rsp),%r10
mov    0x10(%rsp),%eax
shl    $0x2,%eax
movslq %eax,%r8
add    %r10,%r8
jmp    1030 <__svgalib_driver32_putbox@plt>

LLVM IR (-O0):
define void @__svgalib_driver32_putboxpart(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i8* %6, i8** %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load i8*, i8** %16
%24 = load i32, i32* %18
%25 = load i32, i32* %14
%26 = mul nsw i32 %24, %25
%27 = mul nsw i32 %26, 4
%28 = sext i32 %27 to i64
%29 = getelementptr i8, i8* %23, i64 %28
%30 = load i32, i32* %17
%31 = mul nsw i32 %30, 4
%32 = sext i32 %31 to i64
%33 = getelementptr i8, i8* %29, i64 %32
%34 = load i32, i32* %14
%35 = call i32 @__svgalib_driver32_putbox(i32 %19, i32 %20, i32 %21, i32 %22, i8* %33, i32 %34)
ret void
}

LLVM IR (-O2):
define void @__svgalib_driver32_putboxpart(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7, i32 %8) {
%10 = shl i32 %4, 2
%11 = mul i32 %10, %8
%12 = sext i32 %11 to i64
%13 = getelementptr i8, i8* %6, i64 %12
%14 = shl nsw i32 %7, 2
%15 = sext i32 %14 to i64
%16 = getelementptr i8, i8* %13, i64 %15
%17 = tail call i32 @__svgalib_driver32_putbox(i32 %0, i32 %1, i32 %2, i32 %3, i8* %16, i32 %4)
ret void
}
/* Variables and functions */
unsigned char *dh_compute_public_key(unsigned char *, size_t,
                                     unsigned char const *, size_t);
unsigned char *ke_dh_public(unsigned char *pub, size_t pub_size,
                            const unsigned char *priv, size_t priv_size) {
  return dh_compute_public_key(pub, pub_size, priv, priv_size);
}


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

x86 assembly (clang, -O2):
<ke_dh_public>:
jmp    1030 <dh_compute_public_key@plt>

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

LLVM IR (-O2):
define i8* @ke_dh_public(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i8* @dh_compute_public_key(i8* %0, i64 %1, i8* %2, i64 %3)
ret i8* %5
}
void omap_cm_base_init(void) {}


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

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

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

LLVM IR (-O2):
define void @omap_cm_base_init() {
ret void
}
signed char delta_clip(signed char i, signed char min, signed char max) {
  if (i < min)
    return min;
  else if (i > max)
    return max;
  else
    return i;
}


x86 assembly (clang, -O0):
<delta_clip>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jge    1130 <delta_clip+0x30>
mov    -0x3(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1151 <delta_clip+0x51>
movsbl -0x2(%rbp),%eax
movsbl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    114b <delta_clip+0x4b>
mov    -0x4(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1151 <delta_clip+0x51>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delta_clip>:
cmp    %dl,%dil
mov    %edi,%eax
cmovg  %edx,%eax
cmp    %sil,%dil
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @delta_clip(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp slt i8 %0, %1
%5 = icmp sgt i8 %0, %2
%6 = select i1 %5, i8 %2, i8 %0
%7 = select i1 %4, i8 %1, i8 %6
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ message();
int /*<<< orphan*/ printf(char *);
int main() {
  message();
  printf("Cry, and you stop the monotony\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"Cry, and you stop the monotony\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @message()
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [31 x i8] c"Cry, and you stop the monotony\00"
define i32 @main() {
%1 = tail call i32 (...) @message()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct iam_leaf {
  int dummy;
};
struct iam_key {
  int dummy;
};

/* Variables and functions */
struct iam_key *e_key(int /*<<< orphan*/);
int /*<<< orphan*/ n_cur(struct iam_leaf const *);
struct iam_key *lvar_key(const struct iam_leaf *l) {
  return e_key(n_cur(l));
}


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

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

LLVM IR (-O0):
%struct.iam_key = type { i32 }
%struct.iam_leaf = type { i32 }
define %struct.iam_key* @lvar_key(%struct.iam_leaf* %0) {
%2 = alloca %struct.iam_leaf*
store %struct.iam_leaf* %0, %struct.iam_leaf** %2
%3 = load %struct.iam_leaf*, %struct.iam_leaf** %2
%4 = call i32 @n_cur(%struct.iam_leaf* %3)
%5 = call %struct.iam_key* @e_key(i32 %4)
ret %struct.iam_key* %5
}

LLVM IR (-O2):
%struct.iam_key = type { i32 }
%struct.iam_leaf = type { i32 }
define %struct.iam_key* @lvar_key(%struct.iam_leaf* %0) {
%2 = tail call i32 @n_cur(%struct.iam_leaf* %0)
%3 = tail call %struct.iam_key* @e_key(i32 %2)
ret %struct.iam_key* %3
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M37_f(char *s) {
  debug("M37_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


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

x86 assembly (clang, -O2):
<M37_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M37_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M37_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M37_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M37_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
struct sysentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ get_name(char *, char *);
char *strchr(char *, char);
void get_node_name(struct sysentry *se, char *buf) {
  char *nl;
  get_name("/proc/sys/kernel/hostname", buf);
  nl = strchr(buf, '\n');
  *nl = '\0';
}


x86 assembly (clang, -O0):
<get_node_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <get_name@plt>
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_node_name>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <get_name@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
movb   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.sysentry = type { i32 }
@.str = [26 x i8] c"/proc/sys/kernel/hostname\00"
define void @get_node_name(%struct.sysentry* %0, i8* %1) {
%3 = alloca %struct.sysentry*
%4 = alloca i8*
%5 = alloca i8*
store %struct.sysentry* %0, %struct.sysentry** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @get_name(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i8* @strchr(i8* %8, i8 signext 10)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
store i8 0, i8* %10
ret void
}

LLVM IR (-O2):
%struct.sysentry = type { i32 }
@.str = [26 x i8] c"/proc/sys/kernel/hostname\00"
define void @get_node_name(%struct.sysentry* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @get_name(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %1, i8 signext 10)
store i8 0, i8* %4
ret void
}
void CNFGHandleInput() {}


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

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

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

LLVM IR (-O2):
define void @CNFGHandleInput() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(short *);
void C_Utils_free_short_ptr(short *item) { free(item); }


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

x86 assembly (clang, -O2):
<C_Utils_free_short_ptr>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @C_Utils_free_short_ptr(i16* nocapture %0) {
%2 = tail call i32 @free(i16* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int gn_fasta_read_close(FILE *_stream) { return fclose(_stream); }


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

x86 assembly (clang, -O2):
<gn_fasta_read_close>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define i32 @gn_fasta_read_close(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rol(uint32_t value, uint32_t bits) {
  return (value << bits) | (value >> (32 - bits));
}


x86 assembly (clang, -O0):
<rol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
double squarePerimeter(double side) { return 4 * side; }


x86 assembly (clang, -O0):
<squarePerimeter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<squarePerimeter>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @squarePerimeter(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 4.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @squarePerimeter(double %0) {
%2 = fmul double %0, 4.000000e+00
ret double %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool check_parity(uint8_t byte) {
  byte ^= byte >> 4;
  byte ^= byte >> 2;
  byte ^= byte >> 1;
  return (~byte) & 1;
}


x86 assembly (clang, -O0):
<check_parity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_parity>:
mov    %edi,%eax
sar    $0x4,%eax
xor    %edi,%eax
mov    %eax,%ecx
sar    $0x2,%ecx
xor    %eax,%ecx
mov    %ecx,%eax
shr    %eax
xor    %ecx,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @check_parity(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 2
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 1
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = xor i32 %15, -1
%17 = and i32 %16, 1
ret i32 %17
}

LLVM IR (-O2):
define i32 @check_parity(i32 %0) {
%2 = ashr i32 %0, 4
%3 = xor i32 %2, %0
%4 = ashr i32 %3, 2
%5 = xor i32 %4, %3
%6 = lshr i32 %5, 1
%7 = xor i32 %6, %5
%8 = and i32 %7, 1
%9 = xor i32 %8, 1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x54() {
  Assert_real((isbdigit(84) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              425, ("isbdigit should be 0 for T"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x54>:
push   %rbp
mov    %rsp,%rbp
mov    $0x54,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1a9,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x54>:
push   %rax
mov    $0x54,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x1a9,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for T\00"
define void @t_isbdigit_0x54() {
%1 = call i64 @isbdigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for T\00"
define void @t_isbdigit_0x54() {
%1 = tail call i64 @isbdigit(i32 84)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 425, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int am_destroy_index(char *filename, int indexno) { return -1; }


x86 assembly (clang, -O0):
<am_destroy_index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @am_destroy_index(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
int svc_base_shutdown(void *context) { return (context != 0); }


x86 assembly (clang, -O0):
<svc_base_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<svc_base_shutdown>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @svc_base_shutdown(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @svc_base_shutdown(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
void *Cyc_AssnDef_aggr(int /*<<< orphan*/, unsigned int, struct Cyc_List_List *,
                       void *);
void *Cyc_AssnDef_struct_aggr(struct Cyc_List_List *ts, void *tp) {
  unsigned _T0;
  struct Cyc_List_List *_T1;
  void *_T2;
  void *_T3;
  _T0 = -1U;
  _T1 = ts;
  _T2 = tp;
  _T3 = Cyc_AssnDef_aggr(0, _T0, _T1, _T2);
  return _T3;
}


x86 assembly (clang, -O0):
<Cyc_AssnDef_struct_aggr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
xor    %edi,%edi
call   1030 <Cyc_AssnDef_aggr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_AssnDef_struct_aggr>:
mov    %rsi,%rcx
mov    %rdi,%rdx
xor    %edi,%edi
mov    $0xffffffff,%esi
jmp    1030 <Cyc_AssnDef_aggr@plt>

LLVM IR (-O0):
%struct.Cyc_List_List = type { i32 }
define i8* @Cyc_AssnDef_struct_aggr(%struct.Cyc_List_List* %0, i8* %1) {
%3 = alloca %struct.Cyc_List_List*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.Cyc_List_List*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Cyc_List_List* %0, %struct.Cyc_List_List** %3
store i8* %1, i8** %4
store i32 -1, i32* %5
%9 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %3
store %struct.Cyc_List_List* %9, %struct.Cyc_List_List** %6
%10 = load i8*, i8** %4
store i8* %10, i8** %7
%11 = load i32, i32* %5
%12 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %6
%13 = load i8*, i8** %7
%14 = call i8* @Cyc_AssnDef_aggr(i32 0, i32 %11, %struct.Cyc_List_List* %12, i8* %13)
store i8* %14, i8** %8
%15 = load i8*, i8** %8
ret i8* %15
}

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define i8* @Cyc_AssnDef_struct_aggr(%struct.Cyc_List_List* %0, i8* %1) {
%3 = tail call i8* @Cyc_AssnDef_aggr(i32 0, i32 -1, %struct.Cyc_List_List* %0, i8* %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ next_opendir(char const *);
int /*<<< orphan*/ *opendir_common(int /*<<< orphan*/);
DIR *opendir(const char *name) { return opendir_common(next_opendir(name)); }


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

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

LLVM IR (-O0):
define i32* @opendir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @next_opendir(i8* %3)
%5 = call i32* @opendir_common(i32 %4)
ret i32* %5
}

LLVM IR (-O2):
define i32* @opendir(i8* %0) {
%2 = tail call i32 @next_opendir(i8* %0)
%3 = tail call i32* @opendir_common(i32 %2)
ret i32* %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_permute_quaddobl_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(479, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_permute_quaddobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1df,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_permute_quaddobl_system>:
mov    $0x1df,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_permute_quaddobl_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 479, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_permute_quaddobl_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 479, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
int get_XConfigureEvent_y(void *_p) { return (int)((XConfigureEvent *)_p)->y; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XConfigureEvent_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XConfigureEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: passgen [-l passlength] [-n passnum]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"usage: passgen [-l passlength] [-n passnum]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"usage: passgen [-l passlength] [-n passnum]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void convert_init(void) {}


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

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

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

LLVM IR (-O2):
define void @convert_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
int totalNQueens(int);
int main() {
  int n = 8;
  printf("size = %d\n", totalNQueens(n));
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <totalNQueens@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
call   1030 <totalNQueens@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
lea    0xebb(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"size = %d\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 @totalNQueens(i32 8)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int M_PI;
double to_radians(double value) { return (M_PI / 180) * value; }


x86 assembly (clang, -O0):
<to_radians>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
mov    (%rax),%eax
mov    $0xb4,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_radians>:
mov    0x2ee1(%rip),%rax
movslq (%rax),%rax
imul   $0xffffffffb60b60b7,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x7,%ecx
add    %eax,%ecx
cvtsi2sd %ecx,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @to_radians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @M_PI
%4 = sdiv i32 %3, 180
%5 = sitofp i32 %4 to double
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @to_radians(double %0) {
%2 = load i32, i32* @M_PI
%3 = sdiv i32 %2, 180
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
ret double %5
}
/* Type definitions */
struct cpufreq_available_governors {
  int dummy;
};

/* Variables and functions */
struct cpufreq_available_governors *proc_get_available_governors(unsigned int);
struct cpufreq_available_governors *sysfs_get_available_governors(unsigned int);
struct cpufreq_available_governors *
cpufreq_get_available_governors(unsigned int cpu) {
  struct cpufreq_available_governors *ret;
  ret = sysfs_get_available_governors(cpu);
  if (!ret)
    ret = proc_get_available_governors(cpu);
  return (ret);
}


x86 assembly (clang, -O0):
<cpufreq_get_available_governors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sysfs_get_available_governors@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <cpufreq_get_available_governors+0x2e>
mov    -0x4(%rbp),%edi
call   1040 <proc_get_available_governors@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufreq_get_available_governors>:
push   %rbx
mov    %edi,%ebx
call   1030 <sysfs_get_available_governors@plt>
test   %rax,%rax
je     112f <cpufreq_get_available_governors+0xf>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1040 <proc_get_available_governors@plt>

LLVM IR (-O0):
%struct.cpufreq_available_governors = type { i32 }
define %struct.cpufreq_available_governors* @cpufreq_get_available_governors(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.cpufreq_available_governors*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call %struct.cpufreq_available_governors* @sysfs_get_available_governors(i32 %4)
store %struct.cpufreq_available_governors* %5, %struct.cpufreq_available_governors** %3
%6 = load %struct.cpufreq_available_governors*, %struct.cpufreq_available_governors** %3
%7 = icmp ne %struct.cpufreq_available_governors* %6, null
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call %struct.cpufreq_available_governors* @proc_get_available_governors(i32 %9)
store %struct.cpufreq_available_governors* %10, %struct.cpufreq_available_governors** %3
br label %11
11: ; preds = %8, %1
%12 = load %struct.cpufreq_available_governors*, %struct.cpufreq_available_governors** %3
ret %struct.cpufreq_available_governors* %12
}

LLVM IR (-O2):
%struct.cpufreq_available_governors = type { i32 }
define %struct.cpufreq_available_governors* @cpufreq_get_available_governors(i32 %0) {
%2 = tail call %struct.cpufreq_available_governors* @sysfs_get_available_governors(i32 %0)
%3 = icmp eq %struct.cpufreq_available_governors* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call %struct.cpufreq_available_governors* @proc_get_available_governors(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi %struct.cpufreq_available_governors* [ %2, %1 ], [ %5, %4 ]
ret %struct.cpufreq_available_governors* %7
}
/* Type definitions */
struct MemoryPage {
  int dummy;
};

/* Variables and functions */
int _AllocMemoryQuarterTrieTreeLeaf(struct MemoryPage *, char *, void *,
                                    unsigned long, int);
int MASetMemoryQuarterTrieTreeLeaf(struct MemoryPage *p_mempage, char *key,
                                   void *value, unsigned long value_size) {
  return _AllocMemoryQuarterTrieTreeLeaf(p_mempage, key, value, value_size, 1);
}


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

x86 assembly (clang, -O2):
<MASetMemoryQuarterTrieTreeLeaf>:
mov    $0x1,%r8d
jmp    1030 <_AllocMemoryQuarterTrieTreeLeaf@plt>

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

LLVM IR (-O2):
%struct.MemoryPage = type { i32 }
define i32 @MASetMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @_AllocMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %0, i8* %1, i8* %2, i64 %3, i32 1)
ret i32 %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
void test_vorrimm_u16x8(uint16_t *__restrict__ dest, uint16_t *a) {
  int i;
  for (i = 0; i < 8; i++) {
    dest[i] = a[i] | 1;
  }
}


x86 assembly (clang, -O0):
<test_vorrimm_u16x8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1144 <test_vorrimm_u16x8+0x44>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <test_vorrimm_u16x8+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorrimm_u16x8>:
movups (%rsi),%xmm0
movaps 0xef6(%rip),%xmm1
orps   %xmm1,%xmm0
movups %xmm0,(%rdi)
movups 0x10(%rsi),%xmm0
orps   %xmm1,%xmm0
movups %xmm0,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorrimm_u16x8(i32* noalias nocapture writeonly %0, i32* nocapture %1) {
%3 = bitcast i32* %1 to <4 x i32>*
%4 = load <4 x i32>, <4 x i32>* %3
%5 = or <4 x i32> %4, <i32 1, i32 1, i32 1, i32 1>
%6 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %5, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %1, i64 4
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = bitcast i32* %7 to <4 x i32>*
%10 = load <4 x i32>, <4 x i32>* %9
%11 = or <4 x i32> %10, <i32 1, i32 1, i32 1, i32 1>
%12 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void device_stop_pwm(void *chip) { free(chip); }


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

x86 assembly (clang, -O2):
<device_stop_pwm>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @device_stop_pwm(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ both_logs(char *);
int /*<<< orphan*/ exit(int);
scalar_t__ malloc(scalar_t__);
scalar_t__ strlen(char const *);
char *allocate_mountpoint(const char *path) {
  char *mountpoint = (char *)malloc(strlen(path) + 6);
  if (!mountpoint) {
    both_logs("The malloc call failed, this is a fatal error, exiting....\n");
    exit(-1);
  }
  return mountpoint;
}


x86 assembly (clang, -O0):
<allocate_mountpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x6,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1186 <allocate_mountpoint+0x46>
lea    0xe89(%rip),%rdi
call   1040 <both_logs@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_mountpoint>:
push   %rax
call   1030 <strlen@plt>
lea    0x6(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1156 <allocate_mountpoint+0x16>
pop    %rcx
ret
lea    0xea3(%rip),%rdi
call   1040 <both_logs@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"The malloc call failed, this is a fatal error, exiting....\0A\00"
define i8* @allocate_mountpoint(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 6
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %14, label %11
11: ; preds = %1
%12 = call i32 @both_logs(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [60 x i8] c"The malloc call failed, this is a fatal error, exiting....\0A\00"
define i8* @allocate_mountpoint(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 6
%4 = tail call i64 @malloc(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @both_logs(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %4 to i8*
ret i8* %10
}
void av_hwdevice_get_hwframe_constraints() {}


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

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

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

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

/* Variables and functions */
uint16_t le_short(uint16_t x) {
  uint16_t val;
  uint8_t *p = (uint8_t *)(&x);
  val = (*p++ & 0xff) << 0;
  val |= (*p & 0xff) << 8;
  return val;
}


x86 assembly (clang, -O0):
<le_short>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
and    $0xff,%eax
shl    $0x0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @le_short(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %2
store i32* %2, i32** %4
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i32 1
store i32* %6, i32** %4
%7 = load i32, i32* %5
%8 = and i32 %7, 255
%9 = shl i32 %8, 0
store i32 %9, i32* %3
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = and i32 %11, 255
%13 = shl i32 %12, 8
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @le_short(i32 %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
usage() {
  printf("Usage: loop count\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Usage: loop count\0A\00"
define i32 @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [18 x i8] c"Usage: loop count\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int anetUnixGenericConnect(char *, char const *, int);
int anetUnixNonBlockConnect(char *err, const char *path) {
  return anetUnixGenericConnect(err, path, 1);
}


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

x86 assembly (clang, -O2):
<anetUnixNonBlockConnect>:
mov    $0x1,%edx
jmp    1030 <anetUnixGenericConnect@plt>

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

LLVM IR (-O2):
define i32 @anetUnixNonBlockConnect(i8* %0, i8* %1) {
%3 = tail call i32 @anetUnixGenericConnect(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void freeMem(char *buffer, int len) {
  memset(buffer, 0, len);
  free(buffer);
}


x86 assembly (clang, -O0):
<freeMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeMem>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeMem(i8* %0, i32 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i32 %1)
%4 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: permcheck "
        "[-g group] [-n] [-p] [-Rwx] [-u user] [-v] [-X] "
        "file [file1 ..]\n",
        stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [82 x i8] c"Usage: permcheck [-g group] [-n] [-p] [-Rwx] [-u user] [-v] [-X] file [file1 ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [82 x i8] c"Usage: permcheck [-g group] [-n] [-p] [-Rwx] [-u user] [-v] [-X] file [file1 ..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fopen(char *, char *);
int /*<<< orphan*/ printf(char *);
main() {
  fopen("demo.txt", "w+");
  printf("Hello furzoom\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1040 <fopen@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1040 <fopen@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"demo.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [15 x i8] c"Hello furzoom\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"demo.txt\00"
@.str.1 = [3 x i8] c"w+\00"
@str = [14 x i8] c"Hello furzoom\00"
define i32 @main() {
%1 = tail call i32 @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}