xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print(int result) { printf("%d\n", result); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @print(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
void plat_video_menu_begin(void) {}


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

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

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

LLVM IR (-O2):
define void @plat_video_menu_begin() {
ret void
}
void ExttConfigAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttConfigAuxTable() {
ret void
}
int esc6270_init_modemctl_device(struct modem_ctl *mc,
                                 struct modem_data *pdata) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @esc6270_init_modemctl_device(%struct.modem_ctl* %0, %struct.modem_data* %1) {
%3 = alloca %struct.modem_ctl*
%4 = alloca %struct.modem_data*
store %struct.modem_ctl* %0, %struct.modem_ctl** %3
store %struct.modem_data* %1, %struct.modem_data** %4
ret i32 0
}

LLVM IR (-O2):
%struct.modem_ctl = type opaque
%struct.modem_data = type opaque
define i32 @esc6270_init_modemctl_device(%struct.modem_ctl* nocapture readnone %0, %struct.modem_data* nocapture readnone %1) {
ret i32 0
}
unsigned int mg_dl_get_unused_bits_num(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @mg_dl_get_unused_bits_num() {
ret i32 1
}

LLVM IR (-O2):
define i32 @mg_dl_get_unused_bits_num() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int __syscall(int, int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int posix_fadvise(int fd, off_t base, off_t len, int advice) {
  return -__syscall(221, fd, (base), (len), advice);
}


x86 assembly (clang, -O0):
<posix_fadvise>:
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),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    $0xdd,%edi
call   1030 <__syscall@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_fadvise>:
push   %rax
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xdd,%edi
call   1030 <__syscall@plt>
neg    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @posix_fadvise(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 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @__syscall(i32 221, i32 %9, i32 %10, i32 %11, i32 %12)
%14 = sub nsw i32 0, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @posix_fadvise(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @__syscall(i32 221, i32 %0, i32 %1, i32 %2, i32 %3)
%6 = sub nsw i32 0, %5
ret i32 %6
}
unsigned short _f_getword(void *ptr) {
  unsigned char *sptr = (unsigned char *)ptr;
  unsigned short ret;
  ret = (unsigned short)(sptr[1] & 0xff);
  ret <<= 8;
  ret |= (sptr[0] & 0xff);
  return ret;
}


x86 assembly (clang, -O0):
<_f_getword>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0xff,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
and    $0xff,%ecx
movzwl -0x12(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_getword>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @_f_getword(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = and i32 %9, 255
%11 = trunc i32 %10 to i16
store i16 %11, i16* %4
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = shl i32 %13, 8
%15 = trunc i32 %14 to i16
store i16 %15, i16* %4
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = and i32 %19, 255
%21 = load i16, i16* %4
%22 = zext i16 %21 to i32
%23 = or i32 %22, %20
%24 = trunc i32 %23 to i16
store i16 %24, i16* %4
%25 = load i16, i16* %4
ret i16 %25
}

LLVM IR (-O2):
define zeroext i16 @_f_getword(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ puts(char const *);
void print_version() {
  const char *s = "version 0.1\n";
  puts(s);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"version 0.1\0A\00"
define void @print_version() {
%1 = alloca i8*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @puts(i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"version 0.1\0A\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int read(int, char *, int);
int /*<<< orphan*/ reportError(char *);
int target(int fd) {
  char buffer[10];
  int bs = read(fd, buffer, 5);
  if (bs < 0) {
    reportError(buffer);
    close(fd);
    return -30;
  }
  return bs + 6;
}


x86 assembly (clang, -O0):
<target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x12(%rbp),%rsi
mov    $0x5,%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1176 <target+0x46>
lea    -0x12(%rbp),%rdi
call   1050 <reportError@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0xffffffe2,-0x4(%rbp)
jmp    117f <target+0x4f>
mov    -0x18(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x6(%rsp),%rsi
mov    $0x5,%edx
call   1040 <read@plt>
test   %eax,%eax
js     114f <target+0x1f>
add    $0x6,%eax
jmp    1165 <target+0x35>
lea    0x6(%rsp),%rdi
call   1050 <reportError@plt>
mov    %ebx,%edi
call   1030 <close@plt>
mov    $0xffffffe2,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @target(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i8]
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 5)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%13 = call i32 @reportError(i8* %12)
%14 = load i32, i32* %3
%15 = call i32 @close(i32 %14)
store i32 -30, i32* %2
br label %19
16: ; preds = %1
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 6
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %11
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @target(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 5)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @reportError(i8* %3)
%8 = call i32 @close(i32 %0)
br label %11
9: ; preds = %1
%10 = add nuw nsw i32 %4, 6
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ -30, %6 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int mixed_volume(int *mv) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(78, mv, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<mixed_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x4e,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixed_volume>:
mov    %rdi,%rsi
mov    $0x4e,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @mixed_volume(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 78, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @mixed_volume(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 78, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void stosb(void *addr, int data, int cnt) {
  __asm__ __volatile__("cld; rep stosb"
                       : "=D"(addr), "=c"(cnt)
                       : "0"(addr), "1"(cnt), "a"(data)
                       : "memory", "cc");
}


x86 assembly (clang, -O0):
<stosb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
cld
rep stos %al,%es:(%rdi)
mov    %rdi,-0x8(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stosb>:
mov    %edx,%ecx
mov    %esi,%eax
cld
rep stos %al,%es:(%rdi)
ret

LLVM IR (-O0):
define void @stosb(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = call { i8*, i32 } asm sideeffect "cld; rep stosb", "={di},={cx},0,1,{ax},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8* %7, i32 %8, i32 %9)
%11 = extractvalue { i8*, i32 } %10, 0
%12 = extractvalue { i8*, i32 } %10, 1
store i8* %11, i8** %4
store i32 %12, i32* %6
ret void
}

LLVM IR (-O2):
define void @stosb(i8* %0, i32 %1, i32 %2) {
%4 = tail call { i8*, i32 } asm sideeffect "cld; rep stosb", "={di},={cx},0,1,{ax},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 %2, i32 %1)
ret void
}
char *Strdup(s)
char *s;
{
  char *cs;
  if (!s)
    return s;
  cs = malloc(strlen(s) + 1);
  strcpy(cs, s);
  return cs;
}


x86 assembly (clang, -O0):
<Strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <Strdup+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1182 <Strdup+0x52>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <Strdup+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <Strdup+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @Strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i8*, i8** %3
store i8* %8, i8** %2
br label %18
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i64 @strlen(i8* %10)
%12 = add i64 %11, 1
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i8* @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %9, %7
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @Strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add i64 %4, 1
%6 = tail call i8* @malloc(i64 %5)
%7 = tail call i8* @strcpy(i8* dereferenceable(1) %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
void exp2ext_unit() {}


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

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

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

LLVM IR (-O2):
define void @exp2ext_unit() {
ret void
}
int cairo_code_draw_silverDial_get_height() { return 77; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_silverDial_get_height() {
ret i32 77
}

LLVM IR (-O2):
define i32 @cairo_code_draw_silverDial_get_height() {
ret i32 77
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t SysCtlSRAMSizeGet(void) {
  return (((*((volatile uint32_t *)(0x400FDFC4))) + 1) * 256);
}


x86 assembly (clang, -O0):
<SysCtlSRAMSizeGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fdfc4,%eax
mov    (%rax),%eax
add    $0x1,%eax
shl    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlSRAMSizeGet>:
mov    0x400fdfc4,%eax
shl    $0x8,%eax
add    $0x100,%eax
ret

LLVM IR (-O0):
define i32 @SysCtlSRAMSizeGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782148 to i32*)
%2 = add nsw i32 %1, 1
%3 = mul nsw i32 %2, 256
ret i32 %3
}

LLVM IR (-O2):
define i32 @SysCtlSRAMSizeGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782148 to i32*)
%2 = shl i32 %1, 8
%3 = add i32 %2, 256
ret i32 %3
}
/* Variables and functions */
char *A7_command_read_string();
scalar_t__ A7board_available();
char *A7read() {
  char *reply = "";
  if (A7board_available()) {
    reply = A7_command_read_string();
  }
  return reply;
}


x86 assembly (clang, -O0):
<A7read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <A7board_available@plt>
cmp    $0x0,%rax
je     114f <A7read+0x2f>
mov    $0x0,%al
call   1040 <A7_command_read_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<A7read>:
push   %rax
xor    %eax,%eax
call   1030 <A7board_available@plt>
test   %rax,%rax
je     1135 <A7read+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <A7_command_read_string@plt>
lea    0xec4(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @A7read() {
%1 = alloca i8*
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = call i64 (...) @A7board_available()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i8* (...) @A7_command_read_string()
store i8* %5, i8** %1
br label %6
6: ; preds = %4, %0
%7 = load i8*, i8** %1
ret i8* %7
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @A7read() {
%1 = tail call i64 (...) @A7board_available()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* (...) @A7_command_read_string()
br label %5
5: ; preds = %3, %0
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %0 ]
ret i8* %6
}
void benchSVML256_DPNontrig() {}


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

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

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

LLVM IR (-O2):
define void @benchSVML256_DPNontrig() {
ret void
}
/* Variables and functions */
char *encode_istat(int);
int /*<<< orphan*/ printf(char *, char *, int, char *);
void show_int(char *msg, int stat) {
  printf("- %s: %04x %s\n", msg, stat, encode_istat(stat));
}


x86 assembly (clang, -O0):
<show_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <encode_istat@plt>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    %rax,%rcx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_int>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <encode_istat@plt>
lea    0xec9(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %rax,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"- %s: %04x %s\0A\00"
define void @show_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* %4
%8 = call i8* @encode_istat(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"- %s: %04x %s\0A\00"
define void @show_int(i8* %0, i32 %1) {
%3 = tail call i8* @encode_istat(i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hola mundo\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hola mundo\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Hola mundo\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void *int2ptr(int i) { return ((void *)i); }


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

x86 assembly (clang, -O2):
<int2ptr>:
movslq %edi,%rax
ret

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

LLVM IR (-O2):
define i8* @int2ptr(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int begin();
int end() { return begin(); }


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

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

LLVM IR (-O0):
define i32 @end() {
%1 = call i32 (...) @begin()
ret i32 %1
}

LLVM IR (-O2):
define i32 @end() {
%1 = tail call i32 (...) @begin()
ret i32 %1
}
char *skip_string(char *s) {
  while (*s && *s != '"')
    s++;
  return s;
}


x86 assembly (clang, -O0):
<skip_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <skip_string+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skip_string+0x3d>
jmp    114e <skip_string+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_string+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_string>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1122 <skip_string+0x22>
cmp    $0x22,%cl
je     1122 <skip_string+0x22>
add    $0x1,%rax
jmp    1110 <skip_string+0x10>
ret

LLVM IR (-O0):
define i8* @skip_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 34
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skip_string(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 34, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
ret i8* %3
}
/* Variables and functions */
int rand();
int randomInRange(int max) { return rand() % max; }


x86 assembly (clang, -O0):
<randomInRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomInRange>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @randomInRange(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @randomInRange(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
char *skipsp(char *str) {
  while (*(str) && isspace((unsigned char)*(str)))
    (str)++;
  ;
  return (str);
}


x86 assembly (clang, -O0):
<skipsp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skipsp+0x37>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skipsp+0x47>
jmp    1168 <skipsp+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skipsp+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipsp>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skipsp+0x29>
nopw   0x0(%rax,%rax,1)
movzbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skipsp+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skipsp+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skipsp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 zeroext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skipsp(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 zeroext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
void load_RGB_lut(char *a) { return; }


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

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

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

LLVM IR (-O2):
define void @load_RGB_lut(i8* nocapture %0) {
ret void
}
void option_set_unit2MODIF_UNGREEDY() {}


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

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

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

LLVM IR (-O2):
define void @option_set_unit2MODIF_UNGREEDY() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *swe_version(char *s) {
  strcpy(s, "2.09.03");
  return s;
}


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

x86 assembly (clang, -O2):
<swe_version>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"2.09.03\00"
define i8* @swe_version(i8* returned %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %0
}
/* Variables and functions */
float expm1f(float);
float eluf(float x) { return (x >= 0.0f) ? x : expm1f(x); }


x86 assembly (clang, -O0):
<eluf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113d <eluf+0x2d>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    114c <eluf+0x3c>
movss  -0x4(%rbp),%xmm0
call   1030 <expm1f@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eluf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jae    111d <eluf+0xd>
jmp    1030 <expm1f@plt>
ret

LLVM IR (-O0):
define float @eluf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load float, float* %2
br label %10
7: ; preds = %1
%8 = load float, float* %2
%9 = call float @expm1f(float %8)
br label %10
10: ; preds = %7, %5
%11 = phi float [ %6, %5 ], [ %9, %7 ]
ret float %11
}

LLVM IR (-O2):
define float @eluf(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call float @expm1f(float %0)
br label %5
5: ; preds = %1, %3
%6 = phi float [ %4, %3 ], [ %0, %1 ]
ret float %6
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  unsigned long long tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
unsigned long long time_usec() {
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  return (unsigned long long)tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<time_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_usec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define i64 @time_usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = add i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define i64 @time_usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = mul i64 %7, 1000000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = add i64 %8, %10
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ is_hex_palindrome(unsigned long long);
int /*<<< orphan*/ printf(char *, unsigned long long);
int /*<<< orphan*/ scanf(char *, unsigned long long *);
int main() {
  unsigned long long number;
  scanf("%llu", &number);
  while (!is_hex_palindrome(number)) {
    number++;
  }
  printf("%llX\n", number);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <is_hex_palindrome@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    116d <main+0x3d>
jmp    117e <main+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114f <main+0x1f>
mov    -0x10(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <is_hex_palindrome@plt>
test   %eax,%eax
jne    1167 <main+0x37>
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
jmp    1150 <main+0x20>
mov    (%rsp),%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llX\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
br label %4
4: ; preds = %9, %0
%5 = load i64, i64* %2
%6 = call i32 @is_hex_palindrome(i64 %5)
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i64, i64* %2
%11 = add i64 %10, 1
store i64 %11, i64* %2
br label %4
12: ; preds = %4
%13 = load i64, i64* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
@.str.1 = [6 x i8] c"%llX\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @is_hex_palindrome(i64 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = load i64, i64* %1
%9 = add i64 %8, 1
store i64 %9, i64* %1
%10 = call i32 @is_hex_palindrome(i64 %9)
%11 = icmp eq i32 %10, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
%13 = load i64, i64* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %13)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ __pmp_inline_atomic_cmpxchg32(int /*<<< orphan*/ volatile *,
                                                 int /*<<< orphan*/,
                                                 int /*<<< orphan*/);
int32_t __pmp_atomic_cmpxchg32(volatile int32_t *p, int32_t old_value,
                               int32_t new_value) {
  return __pmp_inline_atomic_cmpxchg32(p, old_value, new_value);
}


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

x86 assembly (clang, -O2):
<__pmp_atomic_cmpxchg32>:
jmp    1030 <__pmp_inline_atomic_cmpxchg32@plt>

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

LLVM IR (-O2):
define i32 @__pmp_atomic_cmpxchg32(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @__pmp_inline_atomic_cmpxchg32(i32* %0, i32 %1, i32 %2)
ret i32 %4
}
long getpacket(long *other, char *bufptr) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @getpacket(i64* nocapture readnone %0, i8* nocapture readnone %1) {
ret i64 0
}
void beepLeft() {}


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

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

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

LLVM IR (-O2):
define void @beepLeft() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hola Mundo! svm_model_matlab"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Hola Mundo! svm_model_matlab\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Hola Mundo! svm_model_matlab\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/JosenChareles/os-virt-viewer/refs/"
             "heads/master/src/.libs/lt-windows-cmdline-wrapper.c",
             332, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x14c,%esi
lea    0xf59(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf74(%rip),%rdx
mov    $0x14c,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JosenChareles/os-virt-viewer/refs/heads/master/src/.libs/lt-windows-cmdline-wrapper.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 332, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [176 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/JosenChareles/os-virt-viewer/refs/heads/master/src/.libs/lt-windows-cmdline-wrapper.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([176 x i8], [176 x i8]* @.str, i64 0, i64 0), i32 332, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_cmpeq_pi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_cmpeq_pi16@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpeq_pi16(i32 %0, i32 %1)
ret i32 %3
}
unsigned int funB(unsigned int x) {
  int res = 1;
  while (x) {
    x >>= 1;
    res <<= 1;
  }
  return res;
}


x86 assembly (clang, -O0):
<funB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <funB+0x2f>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <funB+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funB>:
mov    $0x1,%eax
test   %edi,%edi
je     111b <funB+0x1b>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    %eax,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <funB+0x10>
ret

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

LLVM IR (-O2):
define i32 @funB(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = shl i32 %4, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
void opal_atomic_rmb(void) { (*((void (*)(void))(0xffff0fa0)))(); }


x86 assembly (clang, -O0):
<opal_atomic_rmb>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffff0fa0,%eax
call   *%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opal_atomic_rmb>:
mov    $0xffff0fa0,%eax
jmp    *%rax

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

LLVM IR (-O2):
define void @opal_atomic_rmb() {
tail call void inttoptr (i64 4294905760 to void ()*)()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void display_names(char *names[], int size) {
  for (int i = 0; i < size; i++) {
    printf("%s  ", names[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<display_names>:
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 <display_names+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <display_names+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%s \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @display_names(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 = %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 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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %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 = [5 x i8] c"%s \00"
define void @display_names(i8** 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 %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
int lm_prepare_lockspace_dlm(struct lockspace *ls) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.lockspace = type opaque
define i32 @lm_prepare_lockspace_dlm(%struct.lockspace* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
int __builtin_wasm_memory_atomic_wait32(int *, int, long long);
int memory_atomic_wait32(int *addr, int expected, long long timeout) {
  return __builtin_wasm_memory_atomic_wait32(addr, expected, timeout);
}


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

x86 assembly (clang, -O2):
<memory_atomic_wait32>:
jmp    1030 <__builtin_wasm_memory_atomic_wait32@plt>

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

LLVM IR (-O2):
define i32 @memory_atomic_wait32(i32* %0, i32 %1, i64 %2) {
%4 = tail call i32 @__builtin_wasm_memory_atomic_wait32(i32* %0, i32 %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
double __ocml_cbrt_f64(double);
double cbrt(double x) { return __ocml_cbrt_f64(x); }


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

x86 assembly (clang, -O2):
<cbrt>:
jmp    1030 <__ocml_cbrt_f64@plt>

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

LLVM IR (-O2):
define double @cbrt(double %0) {
%2 = tail call double @__ocml_cbrt_f64(double %0)
ret double %2
}