xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ root;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcrossing_root(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcrossing.root;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcrossing_root>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XEvent_xcrossing_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int flat_dev_length();
size_t flat_part_length(void) { return flat_dev_length() / 2; }


x86 assembly (clang, -O0):
<flat_part_length>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <flat_dev_length@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<flat_part_length>:
push   %rax
xor    %eax,%eax
call   1030 <flat_dev_length@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @flat_part_length() {
%1 = call i32 (...) @flat_dev_length()
%2 = sdiv i32 %1, 2
%3 = sext i32 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @flat_part_length() {
%1 = tail call i32 (...) @flat_dev_length()
%2 = sdiv i32 %1, 2
%3 = sext i32 %2 to i64
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_i3();
int /*<<< orphan*/ take_struct_i3(int /*<<< orphan*/);
void test_struct_i3() { take_struct_i3(return_struct_i3()); }


x86 assembly (clang, -O0):
<test_struct_i3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <return_struct_i3@plt>
mov    %eax,%edi
call   1040 <take_struct_i3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_i3>:
push   %rax
xor    %eax,%eax
call   1030 <return_struct_i3@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <take_struct_i3@plt>

LLVM IR (-O0):
define void @test_struct_i3() {
%1 = call i32 (...) @return_struct_i3()
%2 = call i32 @take_struct_i3(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_i3() {
%1 = tail call i32 (...) @return_struct_i3()
%2 = tail call i32 @take_struct_i3(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GenNop();
int /*<<< orphan*/ GenPrintInstr(int, int);
int /*<<< orphan*/ GenPrintNewLine();
int /*<<< orphan*/ GenPrintOperand(int, int);
void GenPrintInstr1Operand(int instr, int instrval, int operand,
                           int operandval) {
  GenPrintInstr(instr, instrval);
  GenPrintOperand(operand, operandval);
  GenPrintNewLine();
  if (instr == 0x1F || instr == 0x20)
    GenNop();
}


x86 assembly (clang, -O0):
<GenPrintInstr1Operand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <GenPrintInstr@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1050 <GenPrintOperand@plt>
mov    $0x0,%al
call   1060 <GenPrintNewLine@plt>
cmpl   $0x1f,-0x4(%rbp)
je     1185 <GenPrintInstr1Operand+0x45>
cmpl   $0x20,-0x4(%rbp)
jne    118c <GenPrintInstr1Operand+0x4c>
mov    $0x0,%al
call   1030 <GenNop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstr1Operand>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %edi,%ebx
call   1040 <GenPrintInstr@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1050 <GenPrintOperand@plt>
xor    %eax,%eax
call   1060 <GenPrintNewLine@plt>
add    $0xffffffe1,%ebx
cmp    $0x1,%ebx
ja     1174 <GenPrintInstr1Operand+0x34>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <GenNop@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @GenPrintInstr1Operand(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @GenPrintInstr(i32 %9, i32 %10)
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @GenPrintOperand(i32 %12, i32 %13)
%15 = call i32 (...) @GenPrintNewLine()
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 31
br i1 %17, label %21, label %18
18: ; preds = %4
%19 = load i32, i32* %5
%20 = icmp eq i32 %19, 32
br i1 %20, label %21, label %23
21: ; preds = %18, %4
%22 = call i32 (...) @GenNop()
br label %23
23: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
define void @GenPrintInstr1Operand(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @GenPrintInstr(i32 %0, i32 %1)
%6 = tail call i32 @GenPrintOperand(i32 %2, i32 %3)
%7 = tail call i32 (...) @GenPrintNewLine()
%8 = add i32 %0, -31
%9 = icmp ult i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 (...) @GenNop()
br label %12
12: ; preds = %4, %10
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void helpAndLeave(const char *progname, int status) {
  FILE *stream = stderr;
  if (status == EXIT_SUCCESS) {
    stream = stdout;
  }
  fprintf(stream, "%s [<username>]\n", progname);
  exit(status);
}


x86 assembly (clang, -O0):
<helpAndLeave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%eax
jne    115d <helpAndLeave+0x3d>
mov    0x2e82(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<helpAndLeave>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2ea3(%rip),%rax
cmp    %esi,(%rax)
jne    113a <helpAndLeave+0x1a>
mov    0x2ea0(%rip),%rax
jmp    1141 <helpAndLeave+0x21>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [17 x i8] c"%s [<username>]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32*, i32** @stderr
store i32* %6, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @EXIT_SUCCESS
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32*, i32** @stdout
store i32* %11, i32** %5
br label %12
12: ; preds = %10, %2
%13 = load i32*, i32** %5
%14 = load i8*, i8** %3
%15 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %4
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@EXIT_SUCCESS = global i32 0
@stdout = global i32* null
@.str = [17 x i8] c"%s [<username>]\0A\00"
define void @helpAndLeave(i8* %0, i32 %1) {
%3 = load i32, i32* @EXIT_SUCCESS
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stdout
%6 = load i32*, i32** @stderr
%7 = select i1 %4, i32* %5, i32* %6
%8 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
unsigned int xxh32_getIntermediateResult(void *);
unsigned int XXH32_getIntermediateResult(void *state) {
  return xxh32_getIntermediateResult(state);
}


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

x86 assembly (clang, -O2):
<XXH32_getIntermediateResult>:
jmp    1030 <xxh32_getIntermediateResult@plt>

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

LLVM IR (-O2):
define i32 @XXH32_getIntermediateResult(i8* %0) {
%2 = tail call i32 @xxh32_getIntermediateResult(i8* %0)
ret i32 %2
}
long GetCol(Pos)
long Pos;
{ return Pos % (long)100; }


x86 assembly (clang, -O0):
<GetCol>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCol>:
movabs $0xa3d70a3d70a3d70b,%rcx
0a d7 a3
mov    %rdi,%rax
imul   %rcx
add    %rdi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x6,%rdx
add    %rax,%rdx
imul   $0x64,%rdx,%rax
sub    %rax,%rdi
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @GetCol(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 100
ret i64 %4
}

LLVM IR (-O2):
define i64 @GetCol(i64 %0) {
%2 = srem i64 %0, 100
ret i64 %2
}
void swapPointers(int *a, int *b) {
  int c = *a;
  *a = *b;
  *b = c;
}


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

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

LLVM IR (-O0):
define void @swapPointers(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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swapPointers(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
char *FirstWithinSymbols_internal(char *, char *, char const, char const, char,
                                  char);
char *FirstWithinSymbols(char *output, char *input, const char openSymbol,
                         const char closeSymbol) {
  return FirstWithinSymbols_internal(output, input, openSymbol, closeSymbol,
                                     '\0', '\0');
}


x86 assembly (clang, -O0):
<FirstWithinSymbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x11(%rbp),%al
xor    %r9d,%r9d
movsbl %al,%edx
movsbl -0x12(%rbp),%ecx
mov    %r9d,%r8d
call   1030 <FirstWithinSymbols_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FirstWithinSymbols>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <FirstWithinSymbols_internal@plt>

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

LLVM IR (-O2):
define i8* @FirstWithinSymbols(i8* %0, i8* %1, i8 signext %2, i8 signext %3) {
%5 = tail call i8* @FirstWithinSymbols_internal(i8* %0, i8* %1, i8 signext %2, i8 signext %3, i8 signext 0, i8 signext 0)
ret i8* %5
}
/* Variables and functions */
scalar_t__ strcmp(char *, void *);
extern int CompareSomePointer(void *ptr) {
  int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
  return x;
}


x86 assembly (clang, -O0):
<CompareSomePointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompareSomePointer>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Got passed back the pointer I returned\00"
define i32 @CompareSomePointer(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@.str = [39 x i8] c"Got passed back the pointer I returned\00"
define i32 @CompareSomePointer(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int gob_encode_uint64(char *, size_t, int /*<<< orphan*/);
int gob_encode_bool(char *buf, size_t buf_size, int v) {
  return gob_encode_uint64(buf, buf_size, (int64_t)(v != 0));
}


x86 assembly (clang, -O0):
<gob_encode_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edx
call   1030 <gob_encode_uint64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_encode_bool>:
xor    %eax,%eax
test   %edx,%edx
setne  %al
mov    %eax,%edx
jmp    1030 <gob_encode_uint64@plt>

LLVM IR (-O0):
define i32 @gob_encode_bool(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @gob_encode_uint64(i8* %7, i64 %8, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @gob_encode_bool(i8* %0, i64 %1, i32 %2) {
%4 = icmp ne i32 %2, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @gob_encode_uint64(i8* %0, i64 %1, i32 %5)
ret i32 %6
}
void LCD_X_SetCS(void) { ; }


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

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

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

LLVM IR (-O2):
define void @LCD_X_SetCS() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int array[], int size) {
  for (int i = 0; i < size; i++) {
    printf("%d ", array[i]);
  }
}


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

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <print+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @av_dynamic_hdr_plus_alloc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ newfile(char *);
void opencscad_init(void) { newfile("main_openscad_tmpfile.txt"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"main_openscad_tmpfile.txt\00"
define void @opencscad_init() {
%1 = call i32 @newfile(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"main_openscad_tmpfile.txt\00"
define void @opencscad_init() {
%1 = tail call i32 @newfile(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ regressionTest();
void _M2_Fractions_init(__attribute__((unused)) int argc,
                        __attribute__((unused)) char *argv[]) {
  init();
  if ((1 == 0)) {
    regressionTest();
  }
}


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

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

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

LLVM IR (-O2):
define void @_M2_Fractions_init(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
ret void
}
void set_matrix(unsigned int **matrix, unsigned int x, unsigned int y,
                unsigned int value) {
  (matrix[y])[x] = value;
}


x86 assembly (clang, -O0):
<set_matrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_matrix>:
mov    %edx,%eax
mov    (%rdi,%rax,8),%rax
mov    %esi,%edx
mov    %ecx,(%rax,%rdx,4)
ret

LLVM IR (-O0):
define void @set_matrix(i32** %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32** %0, i32*** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32**, i32*** %5
%11 = load i32, i32* %7
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32*, i32** %10, i64 %12
%14 = load i32*, i32** %13
%15 = load i32, i32* %6
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %9, i32* %17
ret void
}

LLVM IR (-O2):
define void @set_matrix(i32** nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i32*, i32** %0, i64 %5
%7 = load i32*, i32** %6
%8 = zext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %3, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xbe() {
  Assert_real((isbdigit(190) == 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",
              955, ("isbdigit should be 0 for 0xbe"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3bb,%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 = [30 x i8] c"isbdigit should be 0 for 0xbe\00"
define void @t_isbdigit_0xbe() {
%1 = call i64 @isbdigit(i32 190)
%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 955, i8* getelementptr inbounds ([30 x i8], [30 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 = [30 x i8] c"isbdigit should be 0 for 0xbe\00"
define void @t_isbdigit_0xbe() {
%1 = tail call i64 @isbdigit(i32 190)
%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 955, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char tolower(char);
void strtolower(char *s, long l) {
  long i;
  for (i = 0; i < l; i++)
    s[i] = tolower(s[i]);
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1165 <strtolower+0x55>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <strtolower+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
jle    1147 <strtolower+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <strtolower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @strtolower(i8* nocapture %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void FreeAllStack(char **ppchStack) {
  int inCnt;
  for (inCnt = 0; inCnt < 100; inCnt++) {
    if (ppchStack[inCnt] == NULL)
      continue;
    free(ppchStack[inCnt]);
    ppchStack[inCnt] = NULL;
  }
}


x86 assembly (clang, -O0):
<FreeAllStack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1174 <FreeAllStack+0x64>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jne    1145 <FreeAllStack+0x35>
jmp    1166 <FreeAllStack+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <FreeAllStack+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FreeAllStack>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
jmp    112a <FreeAllStack+0x1a>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    $0x64,%rbx
je     1142 <FreeAllStack+0x32>
mov    (%r14,%rbx,8),%rdi
test   %rdi,%rdi
je     1120 <FreeAllStack+0x10>
call   1030 <free@plt>
movq   $0x0,(%r14,%rbx,8)
jmp    1120 <FreeAllStack+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @FreeAllStack(i8** nocapture %0) {
br label %2
2: ; preds = %1, %9
%3 = phi i64 [ 0, %1 ], [ %10, %9 ]
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @free(i8* %5)
store i8* null, i8** %4
br label %9
9: ; preds = %2, %7
%10 = add nuw nsw i64 %3, 1
%11 = icmp eq i64 %10, 100
br i1 %11, label %12, label %2
12: ; preds = %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bx_unicode_sqlite3_reset_auto_extension();
void bx_unicode_sqlite3_unicode_free() {
  bx_unicode_sqlite3_reset_auto_extension();
}


x86 assembly (clang, -O0):
<bx_unicode_sqlite3_unicode_free>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <bx_unicode_sqlite3_reset_auto_extension@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bx_unicode_sqlite3_unicode_free() {
%1 = call i32 (...) @bx_unicode_sqlite3_reset_auto_extension()
ret void
}

LLVM IR (-O2):
define void @bx_unicode_sqlite3_unicode_free() {
%1 = tail call i32 (...) @bx_unicode_sqlite3_reset_auto_extension()
ret void
}
void InputDestroy() {}


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

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

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

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

/* Variables and functions */
bool SpiBusIsValid(int32_t bus) {
  return bus == 1 || bus == 3 || bus == 4 || bus == 5;
}


x86 assembly (clang, -O0):
<SpiBusIsValid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <SpiBusIsValid+0x3e>
mov    $0x1,%al
cmpl   $0x3,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <SpiBusIsValid+0x3e>
mov    $0x1,%al
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     113e <SpiBusIsValid+0x3e>
cmpl   $0x5,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SpiBusIsValid>:
cmp    $0x4,%edi
ja     1115 <SpiBusIsValid+0x15>
mov    $0x1,%eax
mov    $0x1a,%ecx
bt     %edi,%ecx
jae    1115 <SpiBusIsValid+0x15>
ret
xor    %eax,%eax
cmp    $0x5,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @SpiBusIsValid(i32 %0) {
switch i32 %0, label %2 [
i32 4, label %5
i32 3, label %5
i32 1, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 5
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int vasprintf(char **, char const *, int /*<<< orphan*/);
char *sr_vasprintf(const char *format, va_list p) {
  int r;
  char *string_ptr;
  r = vasprintf(&string_ptr, format, p);
  if (r < 0) {
    fprintf(stderr, "satyr: out of memory");
    exit(1);
  }
  return string_ptr;
}


x86 assembly (clang, -O0):
<sr_vasprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    -0x18(%rbp),%rdi
call   1030 <vasprintf@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    117b <sr_vasprintf+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_vasprintf>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <vasprintf@plt>
test   %eax,%eax
js     1148 <sr_vasprintf+0x18>
mov    (%rsp),%rax
pop    %rcx
ret
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"satyr: out of memory\00"
define i8* @sr_vasprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @vasprintf(i8** %6, i8* %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %6
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"satyr: out of memory\00"
define i8* @sr_vasprintf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @vasprintf(i8** %3, i8* %0, i32 %1)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i8*, i8** %3
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ dotest(int, int, int, int);
int main() {
  dotest(4895, 55, 89, 1);
  dotest(5895, 89, 144, 0);
  dotest(74049690, 6765, 10946, 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x131f,%edi
mov    $0x37,%esi
mov    $0x59,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
mov    $0x1707,%edi
mov    $0x59,%esi
mov    $0x90,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
mov    $0x469e89a,%edi
mov    $0x1a6d,%esi
mov    $0x2ac2,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x131f,%edi
mov    $0x37,%esi
mov    $0x59,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
mov    $0x1707,%edi
mov    $0x59,%esi
mov    $0x90,%edx
xor    %ecx,%ecx
call   1030 <dotest@plt>
mov    $0x469e89a,%edi
mov    $0x1a6d,%esi
mov    $0x2ac2,%edx
mov    $0x1,%ecx
call   1030 <dotest@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @dotest(i32 4895, i32 55, i32 89, i32 1)
%2 = call i32 @dotest(i32 5895, i32 89, i32 144, i32 0)
%3 = call i32 @dotest(i32 74049690, i32 6765, i32 10946, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @dotest(i32 4895, i32 55, i32 89, i32 1)
%2 = tail call i32 @dotest(i32 5895, i32 89, i32 144, i32 0)
%3 = tail call i32 @dotest(i32 74049690, i32 6765, i32 10946, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ initialize_string(char *);
int /*<<< orphan*/ realpath(char *, char *);
void set_real_path(char *variable, char *stipulated_path) {
  initialize_string(variable);
  realpath(stipulated_path, variable);
}


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

x86 assembly (clang, -O2):
<set_real_path>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <initialize_string@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <realpath@plt>

LLVM IR (-O0):
define void @set_real_path(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 = call i32 @initialize_string(i8* %5)
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @realpath(i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
define void @set_real_path(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @initialize_string(i8* %0)
%4 = tail call i32 @realpath(i8* %1, i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, unsigned int);
void invalidPrintfArgType_test(BIO *bio) { BIO_printf(bio, "%d\n", 5U); }


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

x86 assembly (clang, -O2):
<invalidPrintfArgType_test>:
lea    0xee9(%rip),%rsi
mov    $0x5,%edx
jmp    1030 <BIO_printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @invalidPrintfArgType_test(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @BIO_printf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @invalidPrintfArgType_test(i32* %0) {
%2 = tail call i32 @BIO_printf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret void
}
int fconf_istoken(const char src, const char cmp) {
  if (src == cmp)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fconf_istoken>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    112c <fconf_istoken+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <fconf_istoken+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fconf_istoken>:
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @fconf_istoken(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr(char const *s) {
  if (s)
    write(1, s, ft_strlen(s));
  else
    write(1, "null", 4);
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115d <ft_putstr+0x3d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
jmp    1173 <ft_putstr+0x53>
mov    $0x1,%edi
lea    0xe97(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
test   %rdi,%rdi
je     113e <ft_putstr+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>
lea    0xebb(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"null\00"
define void @ft_putstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @ft_strlen(i8* %0)
%5 = tail call i32 @write(i32 1, i8* %0, i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
br label %8
8: ; preds = %6, %3
ret void
}
int I_NoAppServicesOverlayEatsShiftTab(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @I_NoAppServicesOverlayEatsShiftTab() {
ret i32 0
}
/* Variables and functions */
int ya_random();
float myrnd(void) {
  return 2.0 * ((float)((ya_random() % 10000000) / 10000000.0) - 0.5);
}


x86 assembly (clang, -O0):
<myrnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ya_random@plt>
mov    $0x989680,%ecx
cltd
idiv   %ecx
cvtsi2sd %edx,%xmm0
movsd  0xee1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrnd>:
push   %rax
xor    %eax,%eax
call   1030 <ya_random@plt>
cltq
imul   $0x6b5fca6b,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x36,%rcx
add    %edx,%ecx
imul   $0x989680,%ecx,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
divsd  0xebe(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xeb6(%rip),%xmm0
addsd  %xmm0,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @myrnd() {
%1 = call i32 (...) @ya_random()
%2 = srem i32 %1, 10000000
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 1.000000e+07
%5 = fptrunc double %4 to float
%6 = fpext float %5 to double
%7 = fsub double %6, 5.000000e-01
%8 = fmul double 2.000000e+00, %7
%9 = fptrunc double %8 to float
ret float %9
}

LLVM IR (-O2):
define float @myrnd() {
%1 = tail call i32 (...) @ya_random()
%2 = srem i32 %1, 10000000
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 1.000000e+07
%5 = fptrunc double %4 to float
%6 = fpext float %5 to double
%7 = fadd double %6, -5.000000e-01
%8 = fmul double %7, 2.000000e+00
%9 = fptrunc double %8 to float
ret float %9
}
void gdk_gc_set_exposures() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_set_exposures() {
ret void
}
double my_div(double *args) { return args[1] / args[0]; }


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

x86 assembly (clang, -O2):
<my_div>:
movsd  0x8(%rdi),%xmm0
divsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @my_div(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fdiv double %5, %8
ret double %9
}

LLVM IR (-O2):
define double @my_div(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = load double, double* %0
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
float log(float r) { return 4.5; }


x86 assembly (clang, -O0):
<log>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @log(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 4.500000e+00
}

LLVM IR (-O2):
define float @log(float %0) {
ret float 4.500000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char *firstName = "Mark";
  char *lastName = "Twain";
  printf("My name is %s %s\n", firstName, lastName);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"Mark\00"
@.str.1 = [6 x i8] c"Twain\00"
@.str.2 = [18 x i8] c"My name is %s %s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_int8_t(int8_t const k1, int8_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_int8_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_int8_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_int8_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _BOOT();
void _BIOS_BOOT() { _BOOT(); }


x86 assembly (clang, -O0):
<_BIOS_BOOT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_BOOT@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_BIOS_BOOT() {
%1 = call i32 (...) @_BOOT()
ret void
}

LLVM IR (-O2):
define void @_BIOS_BOOT() {
%1 = tail call i32 (...) @_BOOT()
ret void
}