xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(char *c, int s) {
  int i = 0;
  for (; i < s; i++)
    printf("%c", c[i]);
  printf("\n");
}


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    115a <print+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <print+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <print+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
int /*<<< orphan*/ mem_free(void *);
void mem_allocate(void *memptr, size_t size) {
  mem_free(memptr);
  *(void **)memptr = malloc(size);
  if (!*(void **)memptr)
    abort();
}


x86 assembly (clang, -O0):
<mem_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mem_free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1171 <mem_allocate+0x41>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_allocate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <mem_free@plt>
mov    %r14,%rdi
call   1050 <malloc@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     1157 <mem_allocate+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @mem_allocate(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @mem_free(i8* %5)
%7 = load i64, i64* %4
%8 = call i8* @malloc(i64 %7)
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i8**
store i8* %8, i8** %10
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to i8**
%13 = load i8*, i8** %12
%14 = icmp ne i8* %13, null
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @mem_allocate(i8* %0, i64 %1) {
%3 = tail call i32 @mem_free(i8* %0)
%4 = tail call i8* @malloc(i64 %1)
%5 = bitcast i8* %0 to i8**
store i8* %4, i8** %5
%6 = icmp eq i8* %4, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret void
}
const char *cmpname(void *arg) { return "foo"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"foo\00"
define i8* @cmpname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"foo\00"
define i8* @cmpname(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
const void *dmc_unrar_unicode_advance_uint8(const void *opaque) {
  return (const void *)(((const uint8_t *)opaque) + 2);
}


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

x86 assembly (clang, -O2):
<dmc_unrar_unicode_advance_uint8>:
lea    0x8(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @dmc_unrar_unicode_advance_uint8(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
ret i8* %2
}
void ble_rsp_dfu_flash_upload(
    const struct ble_msg_dfu_flash_upload_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_dfu_flash_upload_rsp_t = type opaque
define void @ble_rsp_dfu_flash_upload(%struct.ble_msg_dfu_flash_upload_rsp_t* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glScalef(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
void Scalef(GLfloat x, GLfloat y, GLfloat z) { glScalef(x, y, z); }


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

x86 assembly (clang, -O2):
<Scalef>:
jmp    1030 <glScalef@plt>

LLVM IR (-O0):
define void @Scalef(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 = load i32, i32* %6
%10 = call i32 @glScalef(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @Scalef(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glScalef(i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void msg_badinput() {
  printf("\nSorry, I did not recognize that answer. Please enter either 'yes' "
         "or 'no'.");
  return;
}


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

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

LLVM IR (-O0):
@.str = [76 x i8] c"\0ASorry, I did not recognize that answer. Please enter either 'yes' or 'no'.\00"
define void @msg_badinput() {
%1 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [76 x i8] c"\0ASorry, I did not recognize that answer. Please enter either 'yes' or 'no'.\00"
define void @msg_badinput() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}
int bint_comp(const void *a, const void *b) {
  if (*(int *)a > *(int *)b)
    return 1;
  if (*(int *)a == *(int *)b)
    return 0;
  if (*(int *)a < *(int *)b)
    return -1;
}


x86 assembly (clang, -O0):
<bint_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112a <bint_comp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1161 <bint_comp+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <bint_comp+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1161 <bint_comp+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1161 <bint_comp+0x61>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bint_comp>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setne  %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @bint_comp(i8* %0, i8* %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 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = icmp sgt i32 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 1, i32* %3
br label %32
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i32*
%20 = load i32, i32* %19
%21 = icmp eq i32 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 0, i32* %3
br label %32
23: ; preds = %14
%24 = load i8*, i8** %4
%25 = bitcast i8* %24 to i32*
%26 = load i32, i32* %25
%27 = load i8*, i8** %5
%28 = bitcast i8* %27 to i32*
%29 = load i32, i32* %28
%30 = icmp slt i32 %26, %29
br i1 %30, label %31, label %32
31: ; preds = %23
store i32 -1, i32* %3
br label %32
32: ; preds = %13, %22, %31, %23
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @bint_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp sgt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned Microseconds(void) {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
}


x86 assembly (clang, -O0):
<Microseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Microseconds>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @Microseconds() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @Microseconds() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = add nsw i32 %10, %7
ret i32 %11
}
double epj2ts(epoch)
double epoch;
{
  double dj;
  dj = epj2jd(epoch);
  return ((dj - 2433282.5) * 86400.0);
}


x86 assembly (clang, -O0):
<epj2ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <epj2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<epj2ts>:
push   %rax
mov    $0x1,%al
call   1030 <epj2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xed9(%rip),%xmm0
mulsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @epj2ts(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 (double, ...) bitcast (i32 (...)* @epj2jd to i32 (double, ...)*)(double %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = fsub double %7, 0x4142908140000000
%9 = fmul double %8, 8.640000e+04
ret double %9
}

LLVM IR (-O2):
define double @epj2ts(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @epj2jd to i32 (double, ...)*)(double %0)
%3 = sitofp i32 %2 to double
%4 = fadd double %3, 0xC142908140000000
%5 = fmul double %4, 8.640000e+04
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int load_fpga_main(char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "Use: \"%s <filename>\"\n", argv[0]);
  }
  return load_fpga_main(argv[1]);
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    115c <main+0x3c>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <load_fpga_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
jg     1141 <main+0x21>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x8(%rbx),%rdi
pop    %rbx
jmp    1040 <load_fpga_main@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Use: \22%s <filename>\22\0A\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %8, %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @load_fpga_main(i8* %17)
ret i32 %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Use: \22%s <filename>\22\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @load_fpga_main(i8* %10)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int main(int argc, char **argv) {
  char *ptr1, *ptr2;
  ptr1 = malloc(1024);
  free(ptr1);
  ptr2 = malloc(1024);
  free(ptr1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x400,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* @malloc(i32 1024)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @free(i8* %9)
%11 = call i8* @malloc(i32 1024)
store i8* %11, i8** %7
%12 = load i8*, i8** %6
%13 = call i32 @free(i8* %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%4 = tail call i32 @free(i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 0
}
void testInlineCheckInMacro(int *p) {
  int i = (((p) != 0) ? *p : 17);
  (void)i;
  *p = 1;
}


x86 assembly (clang, -O0):
<testInlineCheckInMacro>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1121 <testInlineCheckInMacro+0x21>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
jmp    112e <testInlineCheckInMacro+0x2e>
mov    $0x11,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <testInlineCheckInMacro+0x2e>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<testInlineCheckInMacro>:
movl   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @testInlineCheckInMacro(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %6
%11 = phi i32 [ %8, %6 ], [ 17, %9 ]
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32*, i32** %2
store i32 1, i32* %13
ret void
}

LLVM IR (-O2):
define void @testInlineCheckInMacro(i32* writeonly %0) {
store i32 1, i32* %0
ret void
}
/* Variables and functions */
size_t oui_append_1o(unsigned char *cp, const unsigned char data) {
  *cp = data;
  return 1;
}


x86 assembly (clang, -O0):
<oui_append_1o>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oui_append_1o>:
mov    %sil,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i64 @oui_append_1o(i8* nocapture writeonly %0, i8 zeroext %1) {
store i8 %1, i8* %0
ret i64 1
}
int do_620() { return 620; }


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

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

LLVM IR (-O0):
define i32 @do_620() {
ret i32 620
}

LLVM IR (-O2):
define i32 @do_620() {
ret i32 620
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_list(int *l, int len) {
  int c;
  for (c = 0; c < len; c++) {
    printf("%03d ", l[c]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_list>:
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    1159 <print_list+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_list+0x16>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_list>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_list+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_list+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%03d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_list(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 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 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
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @trigger_relay() {
ret void
}
void wfff_xml_rd_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @wfff_xml_rd_deinit() {
ret void
}
void ctrlc_raise(void) {}


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

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

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

LLVM IR (-O2):
define void @ctrlc_raise() {
ret void
}
void dummy_move(int sx __attribute__((unused)), int sy __attribute__((unused)),
                int dx __attribute__((unused)), int dy __attribute__((unused)),
                int w __attribute__((unused)), int h __attribute__((unused))) {}


x86 assembly (clang, -O0):
<dummy_move>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_move(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @dummy_move(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x65() {
  Assert_real((isdigit(101) == 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_isdigit.c",
              510, ("isdigit should be 0 for e"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x65>:
push   %rax
mov    $0x65,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1fe,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for e\00"
define void @t_isdigit_0x65() {
%1 = call i64 @isdigit(i32 101)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 510, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for e\00"
define void @t_isdigit_0x65() {
%1 = tail call i64 @isdigit(i32 101)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 510, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int _mini_isspace(int c) {
  return c == ' ' || c == '\n' || c == '\t' || c == '\r' || c == '\f' ||
         c == '\v';
}


x86 assembly (clang, -O0):
<_mini_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_mini_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_mini_isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_mini_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_mini_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_mini_isspace+0x5c>
cmpl   $0xb,-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):
<_mini_isspace>:
cmp    $0x20,%edi
ja     111d <_mini_isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <_mini_isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @_mini_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int nsep(char *p) {
  int i = 0, r = 0;
  while (p[i] != '\0')
    if (p[i++] == ' ')
      r++;
  return r;
}


x86 assembly (clang, -O0):
<nsep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <nsep+0x58>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1153 <nsep+0x53>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <nsep+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsep>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <nsep+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    $0x20,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <nsep+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @nsep(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i8 %6, 32
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = getelementptr inbounds i8, i8* %0, i64 %8
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void not_enough() {
  printf("Not enough operands.\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"Not enough operands.\0A\00"
@EXIT_FAILURE = global i32 0
define void @not_enough() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [21 x i8] c"Not enough operands.\00"
define void @not_enough() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct ss7 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ss7_message(struct ss7 *, char *, unsigned char);
int((redirect_counter_dump))(struct ss7 *ss7, int messagetype,
                             unsigned char *parm, int len) {
  ss7_message(ss7, "\t\t\tRedirect count: %i\n", parm[0] & 0x1f);
  return 1;
}


x86 assembly (clang, -O0):
<redirect_counter_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
and    $0x1f,%eax
lea    0xec5(%rip),%rsi
movzbl %al,%edx
call   1030 <ss7_message@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redirect_counter_dump>:
push   %rax
movzbl (%rdx),%edx
and    $0x1f,%edx
lea    0xee2(%rip),%rsi
call   1030 <ss7_message@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ss7 = type { i32 }
@.str = [23 x i8] c"\09\09\09Redirect count: %i\0A\00"
define i32 @redirect_counter_dump(%struct.ss7* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.ss7*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.ss7* %0, %struct.ss7** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.ss7*, %struct.ss7** %5
%10 = load i8*, i8** %7
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 31
%15 = trunc i32 %14 to i8
%16 = call i32 @ss7_message(%struct.ss7* %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 zeroext %15)
ret i32 1
}

LLVM IR (-O2):
%struct.ss7 = type { i32 }
@.str = [23 x i8] c"\09\09\09Redirect count: %i\0A\00"
define i32 @redirect_counter_dump(%struct.ss7* %0, i32 %1, i8* nocapture %2, i32 %3) {
%5 = load i8, i8* %2
%6 = and i8 %5, 31
%7 = tail call i32 @ss7_message(%struct.ss7* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret i32 1
}
float findafrom_vf_vi_t(float vf, float vi, float t) { return (vf - vi) / t; }


x86 assembly (clang, -O0):
<findafrom_vf_vi_t>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<findafrom_vf_vi_t>:
subss  %xmm1,%xmm0
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @findafrom_vf_vi_t(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float %7, %8
%10 = load float, float* %6
%11 = fdiv float %9, %10
ret float %11
}

LLVM IR (-O2):
define float @findafrom_vf_vi_t(float %0, float %1, float %2) {
%4 = fsub float %0, %1
%5 = fdiv float %4, %2
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned char *, int);
unsigned int zipmapDecodeLength(unsigned char *p) {
  unsigned int len = *p;
  if (len < 254)
    return len;
  memcpy(&len, p + 1, sizeof(unsigned int));
  ;
  return len;
}


x86 assembly (clang, -O0):
<zipmapDecodeLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xfe,-0x14(%rbp)
jae    113e <zipmapDecodeLength+0x2e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115a <zipmapDecodeLength+0x4a>
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
lea    -0x14(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipmapDecodeLength>:
push   %rax
movzbl (%rdi),%eax
mov    %eax,0x4(%rsp)
cmp    $0xfe,%eax
jb     1139 <zipmapDecodeLength+0x29>
mov    %rdi,%rsi
add    $0x1,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @zipmapDecodeLength(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ult i32 %8, 254
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %17
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = call i32 @memcpy(i32* %4, i8* %14, i32 4)
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %12, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @zipmapDecodeLength(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i8, i8* %0
%5 = zext i8 %4 to i32
store i32 %5, i32* %2
%6 = icmp ult i8 %4, -2
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = call i32 @memcpy(i32* %2, i8* %8, i32 4)
%10 = load i32, i32* %2
br label %11
11: ; preds = %1, %7
%12 = phi i32 [ %10, %7 ], [ %5, %1 ]
ret i32 %12
}
int fileagrep_search(pattern_len, pattern_buffer, file_num, file_buffer,
                     output_len, output)
int pattern_len;
char *pattern_buffer;
int file_num;
char **file_buffer;
int output_len;
void *output;
{
  return (agrep_search(pattern_len, pattern_buffer, 3, file_num, file_buffer,
                       output_len, output));
}


x86 assembly (clang, -O0):
<fileagrep_search>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    -0x30(%rbp),%rax
mov    $0x3,%edx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <agrep_search@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileagrep_search>:
push   %rax
mov    %r8d,%eax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %r9,(%rsp)
mov    $0x3,%edx
mov    %eax,%r9d
xor    %eax,%eax
call   1030 <agrep_search@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fileagrep_search(i32 %0, i8* %1, i32 %2, i8** %3, i32 %4, i8* %5) {
%7 = tail call i32 (i32, i8*, i32, i32, i8**, i32, i8*, ...) bitcast (i32 (...)* @agrep_search to i32 (i32, i8*, i32, i32, i8**, i32, i8*, ...)*)(i32 %0, i8* %1, i32 3, i32 %2, i8** %3, i32 %4, i8* %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ g();
scalar_t__ h();
f(int i) {
  if (i && h() && 0) {
    g();
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115c <f+0x3c>
mov    $0x0,%al
call   1030 <h@plt>
cmp    $0x0,%rax
je     115c <f+0x3c>
xor    %eax,%eax
test   $0x1,%al
jne    1155 <f+0x35>
jmp    115c <f+0x3c>
mov    $0x0,%al
call   1040 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
je     1120 <f+0x10>
push   %rax
xor    %eax,%eax
call   1030 <h@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = call i64 (...) @h()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
br i1 false, label %10, label %12
10: ; preds = %9
%11 = call i32 (...) @g()
br label %12
12: ; preds = %10, %9, %6, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i64 (...) @h()
br label %5
5: ; preds = %3, %1
ret i32 undef
}
/* Variables and functions */
void *malloc(int const);
void *realloc(void *, int const);
void *ap_resize_buffer(void *buf, const int min_size) {
  if (buf)
    buf = realloc(buf, min_size);
  else
    buf = malloc(min_size);
  return buf;
}


x86 assembly (clang, -O0):
<ap_resize_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114f <ap_resize_buffer+0x2f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
jmp    115b <ap_resize_buffer+0x3b>
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_resize_buffer>:
test   %rdi,%rdi
je     112a <ap_resize_buffer+0xa>
jmp    1040 <realloc@plt>
mov    %esi,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define i8* @ap_resize_buffer(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @realloc(i8* %0, i32 %1)
br label %8
6: ; preds = %2
%7 = tail call i8* @malloc(i32 %1)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ test_getset_ephem();
int /*<<< orphan*/ test_getset_simple();
int /*<<< orphan*/ test_highslot();
int /*<<< orphan*/ test_lots_of_stuff();
int /*<<< orphan*/ test_simple();
int main() {
  test_simple();
  test_getset_simple();
  test_getset_ephem();
  test_highslot();
  test_lots_of_stuff();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_simple@plt>
mov    $0x0,%al
call   1060 <test_getset_simple@plt>
mov    $0x0,%al
call   1030 <test_getset_ephem@plt>
mov    $0x0,%al
call   1050 <test_highslot@plt>
mov    $0x0,%al
call   1040 <test_lots_of_stuff@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <test_simple@plt>
xor    %eax,%eax
call   1060 <test_getset_simple@plt>
xor    %eax,%eax
call   1030 <test_getset_ephem@plt>
xor    %eax,%eax
call   1050 <test_highslot@plt>
xor    %eax,%eax
call   1040 <test_lots_of_stuff@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_simple()
%3 = call i32 (...) @test_getset_simple()
%4 = call i32 (...) @test_getset_ephem()
%5 = call i32 (...) @test_highslot()
%6 = call i32 (...) @test_lots_of_stuff()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_simple()
%2 = tail call i32 (...) @test_getset_simple()
%3 = tail call i32 (...) @test_getset_ephem()
%4 = tail call i32 (...) @test_highslot()
%5 = tail call i32 (...) @test_lots_of_stuff()
ret i32 0
}
/* Variables and functions */
int OSDIsVisible(int /*<<< orphan*/);
int GetOSDToggle(void) { return OSDIsVisible(0); }


x86 assembly (clang, -O0):
<GetOSDToggle>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <OSDIsVisible@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetOSDToggle>:
xor    %edi,%edi
jmp    1030 <OSDIsVisible@plt>

LLVM IR (-O0):
define i32 @GetOSDToggle() {
%1 = call i32 @OSDIsVisible(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @GetOSDToggle() {
%1 = tail call i32 @OSDIsVisible(i32 0)
ret i32 %1
}
/* Variables and functions */
unsigned long FD_SETSIZE;
unsigned long __NFDBITS;
int /*<<< orphan*/ __chk_fail();
unsigned long int __wrap___fdelt_chk(unsigned long int index) {
  if (index >= FD_SETSIZE)
    __chk_fail();
  return index / __NFDBITS;
}


x86 assembly (clang, -O0):
<__wrap___fdelt_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2eb9(%rip),%rcx
cmp    (%rcx),%rax
jb     1137 <__wrap___fdelt_chk+0x27>
mov    $0x0,%al
call   1030 <__chk_fail@plt>
mov    -0x8(%rbp),%rax
mov    0x2e8e(%rip),%rcx
xor    %edx,%edx
divq   (%rcx)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap___fdelt_chk>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ec5(%rip),%rax
cmp    %rdi,(%rax)
ja     1127 <__wrap___fdelt_chk+0x17>
xor    %eax,%eax
call   1030 <__chk_fail@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1147 <__wrap___fdelt_chk+0x37>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
pop    %rbx
ret
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
ret

LLVM IR (-O0):
@FD_SETSIZE = global i64 0
@__NFDBITS = global i64 0
define i64 @__wrap___fdelt_chk(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @FD_SETSIZE
%5 = icmp uge i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @__chk_fail()
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = load i64, i64* @__NFDBITS
%11 = udiv i64 %9, %10
ret i64 %11
}

LLVM IR (-O2):
@FD_SETSIZE = global i64 0
@__NFDBITS = global i64 0
define i64 @__wrap___fdelt_chk(i64 %0) {
%2 = load i64, i64* @FD_SETSIZE
%3 = icmp ugt i64 %2, %0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @__chk_fail()
br label %6
6: ; preds = %4, %1
%7 = load i64, i64* @__NFDBITS
%8 = udiv i64 %0, %7
ret i64 %8
}