xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void dc_armor_radix64_destroy(char *index) { free(index); }


x86 assembly (clang, -O0):
<dc_armor_radix64_destroy>:
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):
<dc_armor_radix64_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @dc_armor_radix64_destroy(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 @dc_armor_radix64_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ baz(int);
__attribute__((no)) void fn11(int x) {
  int i = 1;
  if (x > 1)
    do
      baz(i);
    while (++i != x);
}


x86 assembly (clang, -O0):
<fn11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1150 <fn11+0x40>
jmp    1131 <fn11+0x21>
mov    -0x8(%rbp),%edi
call   1030 <baz@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    -0x4(%rbp),%eax
jne    1131 <fn11+0x21>
jmp    1150 <fn11+0x40>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn11>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     112e <fn11+0x1e>
mov    %edi,%ebx
mov    $0x1,%ebp
nop
mov    %ebp,%edi
call   1030 <baz@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1120 <fn11+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @fn11(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %16
6: ; preds = %1
br label %7
7: ; preds = %10, %6
%8 = load i32, i32* %3
%9 = call i32 @baz(i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %2
%14 = icmp ne i32 %12, %13
br i1 %14, label %7, label %15
15: ; preds = %10
br label %16
16: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
define void @fn11(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = tail call i32 @baz(i32 %4)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
double *cvp(const double *v1, const double *v2, unsigned n) {
  double *product = (double *)malloc(sizeof(double) * n);
  return product;
}


x86 assembly (clang, -O0):
<cvp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvp>:
lea    0x0(,%rdx,8),%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define double* @cvp(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = zext i32 %8 to i64
%10 = mul i64 8, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to double*
store double* %13, double** %7
%14 = load double*, double** %7
ret double* %14
}

LLVM IR (-O2):
define double* @cvp(double* nocapture readnone %0, double* nocapture readnone %1, i32 %2) {
%4 = shl i32 %2, 3
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to double*
ret double* %6
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int read_int() {
  int number;
  scanf("%d", &number);
  return number;
}


x86 assembly (clang, -O0):
<read_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @read_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
int NativeFileSelectionSupported() { return 0; }


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

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

LLVM IR (-O0):
define i32 @NativeFileSelectionSupported() {
ret i32 0
}

LLVM IR (-O2):
define i32 @NativeFileSelectionSupported() {
ret i32 0
}
int nf2_linux_close(struct netfpga *nf, void *ctx) {
  (void)nf;
  (void)ctx;
  return (0);
}


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

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

LLVM IR (-O0):
%struct.netfpga = type opaque
define i32 @nf2_linux_close(%struct.netfpga* %0, i8* %1) {
%3 = alloca %struct.netfpga*
%4 = alloca i8*
store %struct.netfpga* %0, %struct.netfpga** %3
store i8* %1, i8** %4
%5 = load %struct.netfpga*, %struct.netfpga** %3
%6 = load i8*, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.netfpga = type opaque
define i32 @nf2_linux_close(%struct.netfpga* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int test_imm_37int8_reg(signed char val) {
  return ((val) & (0x37 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_37int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x37,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_37int8_reg>:
test   $0x37,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_37int8_reg(i8 signext %0) {
%2 = and i8 %0, 55
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Cartridge_Remove();
int /*<<< orphan*/ setInsertedCartPath(int /*<<< orphan*/);
void GenericInterface_RemoveCartridge(void) {
  Cartridge_Remove();
  setInsertedCartPath(0);
}


x86 assembly (clang, -O0):
<GenericInterface_RemoveCartridge>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Cartridge_Remove@plt>
xor    %edi,%edi
call   1040 <setInsertedCartPath@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenericInterface_RemoveCartridge>:
push   %rax
xor    %eax,%eax
call   1030 <Cartridge_Remove@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <setInsertedCartPath@plt>

LLVM IR (-O0):
define void @GenericInterface_RemoveCartridge() {
%1 = call i32 (...) @Cartridge_Remove()
%2 = call i32 @setInsertedCartPath(i32 0)
ret void
}

LLVM IR (-O2):
define void @GenericInterface_RemoveCartridge() {
%1 = tail call i32 (...) @Cartridge_Remove()
%2 = tail call i32 @setInsertedCartPath(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ BUFSIZ;
int /*<<< orphan*/ _IOFBF;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void setbuf(FILE *restrict file, char *restrict buffer) {
  setvbuf(file, buffer, buffer ? _IOFBF : _IONBF, BUFSIZ);
}


x86 assembly (clang, -O0):
<setbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <setbuf+0x3c>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    1158 <setbuf+0x48>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    0x2e6e(%rip),%rax
mov    (%rax),%ecx
call   1030 <setvbuf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbuf>:
test   %rsi,%rsi
jne    111e <setbuf+0xe>
mov    0x2ecc(%rip),%rax
jmp    1125 <setbuf+0x15>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <setvbuf@plt>

LLVM IR (-O0):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(i32* noalias %0, i8* noalias %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* @_IOFBF
br label %13
11: ; preds = %2
%12 = load i32, i32* @_IONBF
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = load i32, i32* @BUFSIZ
%16 = call i32 @setvbuf(i32* %5, i8* %6, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@_IOFBF = global i32 0
@_IONBF = global i32 0
@BUFSIZ = global i32 0
define void @setbuf(i32* noalias nocapture %0, i8* noalias %1) {
%3 = icmp eq i8* %1, null
%4 = load i32, i32* @_IOFBF
%5 = load i32, i32* @_IONBF
%6 = select i1 %3, i32 %5, i32 %4
%7 = load i32, i32* @BUFSIZ
%8 = tail call i32 @setvbuf(i32* %0, i8* %1, i32 %6, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "Usage: %s [-nrsvF] [-f config-file] [file ...]\n",
                getprogname());
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: %s [-nrsvF] [-f config-file] [file ...]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: %s [-nrsvF] [-f config-file] [file ...]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ scrprintf(char *, int);
void csrup(int n) { scrprintf("\033[%dA", n); }


x86 assembly (clang, -O0):
<csrup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <scrprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csrup>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <scrprintf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dA\00"
define void @csrup(i32 %0) {
%2 = tail call i32 @scrprintf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ markovcurrylambdahardware();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world\n");
  printf("markovcurrylambdahardware\n");
  markovcurrylambdahardware();
  return (0);
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
@str.2 = [26 x i8] c"markovcurrylambdahardware\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @markovcurrylambdahardware()
ret i32 0
}
/* Variables and functions */
int min(int, int);
int min3(int a, int b, int c) { return a < b ? min(a, c) : min(b, c); }


x86 assembly (clang, -O0):
<min3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1140 <min3+0x30>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <min@plt>
mov    %eax,-0x10(%rbp)
jmp    114e <min3+0x3e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <min@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min3>:
cmp    %esi,%edi
cmovge %esi,%edi
mov    %edx,%esi
jmp    1030 <min@plt>

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

LLVM IR (-O2):
define i32 @min3(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = select i1 %4, i32 %0, i32 %1
%6 = tail call i32 @min(i32 %5, i32 %2)
ret i32 %6
}
char KingFromPieceColor(unsigned char pieceColor) {
  return (pieceColor == 1) ? 'K' : 'k';
  ;
}


x86 assembly (clang, -O0):
<KingFromPieceColor>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
mov    $0x6b,%eax
mov    $0x4b,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<KingFromPieceColor>:
cmp    $0x1,%dil
setne  %al
shl    $0x5,%al
or     $0x4b,%al
ret

LLVM IR (-O0):
define signext i8 @KingFromPieceColor(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 75, i32 107
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @KingFromPieceColor(i8 zeroext %0) {
%2 = icmp eq i8 %0, 1
%3 = select i1 %2, i8 75, i8 107
ret i8 %3
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_listen_fds(int unset_environment) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_listen_fds>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed0(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_listen_fds>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_listen_fds(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_listen_fds(i32 %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void jason_Free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<jason_Free>:
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):
<jason_Free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @jason_Free(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 @jason_Free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char *malloc(unsigned int);
char *imalloc(int n) {
  if (n == 0)
    n = 1;
  return malloc((unsigned)n);
}


x86 assembly (clang, -O0):
<imalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112c <imalloc+0x1c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imalloc>:
test   %edi,%edi
mov    $0x1,%eax
cmove  %eax,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @imalloc(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 %0
%4 = tail call i8* @malloc(i32 %3)
ret i8* %4
}
void BSP_L1DInvalid(void) {
  unsigned long tmp;
  tmp = ({
    unsigned long __v = (*(volatile unsigned long *)(0x01845048));
    __v;
  });
  tmp |= 0x1;
  ({
    unsigned long __v = tmp;
    (*(volatile unsigned long *)(0x01845048) = (__v));
    __v;
  });
}


x86 assembly (clang, -O0):
<BSP_L1DInvalid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1845048,%eax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    $0x1845048,%eax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_L1DInvalid>:
orq    $0x1,0x1845048
01 01
ret

LLVM IR (-O0):
define void @BSP_L1DInvalid() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = load volatile i64, i64* inttoptr (i64 25448520 to i64*)
store i64 %6, i64* %2
%7 = load i64, i64* %2
store i64 %7, i64* %3
%8 = load i64, i64* %3
store i64 %8, i64* %1
%9 = load i64, i64* %1
%10 = or i64 %9, 1
store i64 %10, i64* %1
%11 = load i64, i64* %1
store i64 %11, i64* %4
%12 = load i64, i64* %4
store volatile i64 %12, i64* inttoptr (i64 25448520 to i64*)
%13 = load i64, i64* %4
store i64 %13, i64* %5
%14 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @BSP_L1DInvalid() {
%1 = load volatile i64, i64* inttoptr (i64 25448520 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 25448520 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CmdLO_Get(char *);
long atol(int /*<<< orphan*/);
long CmdLO_GetLong(char *name) { return atol(CmdLO_Get(name)); }


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

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

LLVM IR (-O0):
define i64 @CmdLO_GetLong(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @CmdLO_Get(i8* %3)
%5 = call i64 @atol(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @CmdLO_GetLong(i8* %0) {
%2 = tail call i32 @CmdLO_Get(i8* %0)
%3 = tail call i64 @atol(i32 %2)
ret i64 %3
}
short int get_boot_drive(void) { return 0xAAAA; }


x86 assembly (clang, -O0):
<get_boot_drive>:
push   %rbp
mov    %rsp,%rbp
mov    $0xaaaa,%ax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_boot_drive>:
mov    $0xaaaa,%ax
ret

LLVM IR (-O0):
define signext i16 @get_boot_drive() {
ret i16 -21846
}

LLVM IR (-O2):
define signext i16 @get_boot_drive() {
ret i16 -21846
}
int toint_f(float x) {
  int i;
  __asm__ __volatile__("cvttss2si %1, %0" : "=r"(i) : "x"(x));
  return i;
}


x86 assembly (clang, -O0):
<toint_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toint_f>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @toint_f(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = call i32 asm sideeffect "cvttss2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(float %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @toint_f(float %0) {
%2 = tail call i32 asm sideeffect "cvttss2si $1, $0", "=r,x,~{dirflag},~{fpsr},~{flags}"(float %0)
ret i32 %2
}
/* Variables and functions */
void *malloc(unsigned long);
void *Xalloc(unsigned long m) { return malloc(m); }


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

x86 assembly (clang, -O2):
<Xalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @Xalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int main() { return sizeof(signed short); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
int security_inode_revalidate(struct dentry *inode) { return 0; }


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

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

LLVM IR (-O0):
%struct.dentry = type opaque
define i32 @security_inode_revalidate(%struct.dentry* %0) {
%2 = alloca %struct.dentry*
store %struct.dentry* %0, %struct.dentry** %2
ret i32 0
}

LLVM IR (-O2):
%struct.dentry = type opaque
define i32 @security_inode_revalidate(%struct.dentry* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x63() {
  Assert_real((isalnum(99)),
              "/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_isalnum.c",
              500, ("isalnum should be 1 for c"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x63>:
push   %rbp
mov    %rsp,%rbp
mov    $0x63,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1f4,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x63>:
push   %rax
mov    $0x63,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1f4,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for c\00"
define void @t_isalnum_0x63() {
%1 = call i32 @isalnum(i32 99)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for c\00"
define void @t_isalnum_0x63() {
%1 = tail call i32 @isalnum(i32 99)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 500, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ selcall_init(struct demod_state *);
void ccir_init(struct demod_state *s) { selcall_init(s); }


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

x86 assembly (clang, -O2):
<ccir_init>:
jmp    1030 <selcall_init@plt>

LLVM IR (-O0):
%struct.demod_state = type { i32 }
define void @ccir_init(%struct.demod_state* %0) {
%2 = alloca %struct.demod_state*
store %struct.demod_state* %0, %struct.demod_state** %2
%3 = load %struct.demod_state*, %struct.demod_state** %2
%4 = call i32 @selcall_init(%struct.demod_state* %3)
ret void
}

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @ccir_init(%struct.demod_state* %0) {
%2 = tail call i32 @selcall_init(%struct.demod_state* %0)
ret void
}
unsigned int highest_order_bit_i(unsigned int n) {
  n |= (n >> 1);
  n |= (n >> 2);
  n |= (n >> 4);
  n |= (n >> 8);
  n |= (n >> 16);
  return n - (n >> 1);
}


x86 assembly (clang, -O0):
<highest_order_bit_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<highest_order_bit_i>:
mov    %edi,%eax
shr    %eax
or     %edi,%eax
mov    %eax,%ecx
shr    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x4,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    %ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @highest_order_bit_i(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = load i32, i32* %2
%25 = lshr i32 %24, 1
%26 = sub i32 %23, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @highest_order_bit_i(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 16
%11 = or i32 %10, %9
%12 = lshr i32 %11, 1
%13 = sub i32 %11, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "tee usage:\n\ttee [-a] file ... file_n\n\n\t-a\tappend to files "
          "instead of truncating\n\nTee reads its input, and writes to each of "
          "the specified files,\nas well as to the standard output.\n\nThis "
          "version supplied with Vim 4.2 to make ':make' possible.\nFor a more "
          "complete and stable version, consider getting\n[a port of] the GNU "
          "shellutils package.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [340 x i8] c"tee usage:\0A\09tee [-a] file ... file_n\0A\0A\09-a\09append to files instead of truncating\0A\0ATee reads its input, and writes to each of the specified files,\0Aas well as to the standard output.\0A\0AThis version supplied with Vim 4.2 to make ':make' possible.\0AFor a more complete and stable version, consider getting\0A[a port of] the GNU shellutils package.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [340 x i8] c"tee usage:\0A\09tee [-a] file ... file_n\0A\0A\09-a\09append to files instead of truncating\0A\0ATee reads its input, and writes to each of the specified files,\0Aas well as to the standard output.\0A\0AThis version supplied with Vim 4.2 to make ':make' possible.\0AFor a more complete and stable version, consider getting\0A[a port of] the GNU shellutils package.\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([340 x i8], [340 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a = 0, b = 10;
  if (a = 0)
    b = 0;
  else
    b *= 2;
  printf("%d", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1143 <main+0x33>
jmp    114f <main+0x3f>
movl   $0x0,-0xc(%rbp)
jmp    1158 <main+0x48>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 20)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ n32016_disassemble(int /*<<< orphan*/, char *, size_t);
uint32_t dbg_disassemble(uint32_t addr, char *buf, size_t bufsize) {
  return n32016_disassemble(addr, buf, bufsize);
}


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

x86 assembly (clang, -O2):
<dbg_disassemble>:
jmp    1030 <n32016_disassemble@plt>

LLVM IR (-O0):
define i32 @dbg_disassemble(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 @n32016_disassemble(i32 %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @dbg_disassemble(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @n32016_disassemble(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
float drand48();
void init(float *m, int n) {
  int i;
  for (i = 0; i < n * n; i++)
    m[i] = drand48();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    115a <init+0x4a>
mov    $0x0,%al
call   1030 <drand48@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <init+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r15
push   %r14
push   %rbx
imul   %esi,%esi
test   %esi,%esi
je     1146 <init+0x36>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <drand48@plt>
movss  %xmm0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <init+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @init(float* nocapture writeonly %0, i32 %1) {
%3 = mul i32 %1, %1
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = zext i32 %3 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = tail call float (...) @drand48()
%10 = getelementptr inbounds float, float* %0, i64 %8
store float %9, float* %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %6
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret void
}
void RTAvloU32Destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloU32Destroy() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(void *, int, int, int /*<<< orphan*/ *);
void stbi__stdio_write(void *context, void *data, int size) {
  fwrite(data, 1, size, (FILE *)context);
}


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

x86 assembly (clang, -O2):
<stbi__stdio_write>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define void @stbi__stdio_write(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello World!!!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Hello World!!!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int foo(int a[restrict], int b[const], int c[restrict const]) {
  return *a + *b + *c;
}


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

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

LLVM IR (-O0):
define i32 @foo(i32* noalias %0, i32* %1, i32* noalias %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %8, %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @foo(i32* noalias nocapture %0, i32* nocapture %1, i32* noalias nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
%7 = load i32, i32* %2
%8 = add nsw i32 %6, %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int values_equal_display_error(int /*<<< orphan*/ const,
                               int /*<<< orphan*/ const);
int check_value(const uint64_t value, const uint64_t check_value_data) {
  return values_equal_display_error(value, check_value_data);
}


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

x86 assembly (clang, -O2):
<check_value>:
jmp    1030 <values_equal_display_error@plt>

LLVM IR (-O0):
define i32 @check_value(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 = call i32 @values_equal_display_error(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @check_value(i32 %0, i32 %1) {
%3 = tail call i32 @values_equal_display_error(i32 %0, i32 %1)
ret i32 %3
}
int coda_gcd(int m, int n) {
  if (m <= 0 || n <= 0) {
    return -1;
  }
  while (n > 0) {
    int r = m % n;
    m = n;
    n = r;
  }
  return m;
}


x86 assembly (clang, -O0):
<coda_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111e <coda_gcd+0x1e>
cmpl   $0x0,-0xc(%rbp)
jg     112a <coda_gcd+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <coda_gcd+0x5a>
jmp    112f <coda_gcd+0x2f>
cmpl   $0x0,-0xc(%rbp)
jle    1154 <coda_gcd+0x54>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112f <coda_gcd+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coda_gcd>:
mov    $0xffffffff,%ecx
test   %edi,%edi
jle    112c <coda_gcd+0x2c>
mov    %esi,%edx
test   %esi,%esi
jle    112c <coda_gcd+0x2c>
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jg     1120 <coda_gcd+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @coda_gcd(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
%4 = icmp slt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %1, %2 ]
%8 = phi i32 [ %7, %6 ], [ %0, %2 ]
%9 = urem i32 %8, %7
%10 = icmp sgt i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %2
%12 = phi i32 [ -1, %2 ], [ %7, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_pawn_defenders_from_east(int);
void w_pawn_defenders_from_east_test(void **state) {
  assert_int_equal(0x0000000000100000ul,
                   w_pawn_defenders_from_east(0x0000000008100000ul));
}


x86 assembly (clang, -O0):
<w_pawn_defenders_from_east_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8100000,%edi
call   1040 <w_pawn_defenders_from_east@plt>
mov    %eax,%esi
mov    $0x100000,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_pawn_defenders_from_east_test>:
push   %rax
mov    $0x8100000,%edi
call   1040 <w_pawn_defenders_from_east@plt>
mov    $0x100000,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @w_pawn_defenders_from_east_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_pawn_defenders_from_east(i32 135266304)
%4 = call i32 @assert_int_equal(i32 1048576, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_pawn_defenders_from_east_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_pawn_defenders_from_east(i32 135266304)
%3 = tail call i32 @assert_int_equal(i32 1048576, i32 %2)
ret void
}
int msm_hsusb_enable_pmic_ulpidata0(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @msm_hsusb_enable_pmic_ulpidata0() {
ret i32 0
}

LLVM IR (-O2):
define i32 @msm_hsusb_enable_pmic_ulpidata0() {
ret i32 0
}
void G_LogWeaponOutput(void) {}


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

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

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

LLVM IR (-O2):
define void @G_LogWeaponOutput() {
ret void
}
int max(int num1, int num2) {
  int result;
  if (num1 > num2) {
    result = num1;
  } else {
    result = num2;
  }
  return result;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}