xunge/DecIR huggingface dataset:
/* Variables and functions */
int chdir(char const *);
int /*<<< orphan*/ pl_fatal(char *);
void pl_chdir(const char *newdir) {
  if (-1 == chdir(newdir)) {
    if (-1 == chdir("/"))
      pl_fatal("chdir(\"/\")");
  }
}


x86 assembly (clang, -O0):
<pl_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1170 <pl_chdir+0x50>
lea    0xeb5(%rip),%rdi
call   1030 <chdir@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    116b <pl_chdir+0x4b>
lea    0xe9c(%rip),%rdi
call   1040 <pl_fatal@plt>
jmp    1170 <pl_chdir+0x50>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_chdir>:
push   %rax
call   1030 <chdir@plt>
cmp    $0xffffffff,%eax
jne    113c <pl_chdir+0x1c>
lea    0xece(%rip),%rdi
call   1030 <chdir@plt>
cmp    $0xffffffff,%eax
je     113e <pl_chdir+0x1e>
pop    %rax
ret
lea    0xebd(%rip),%rdi
pop    %rax
jmp    1040 <pl_fatal@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
@.str.1 = [11 x i8] c"chdir(\22/\22)\00"
define void @pl_chdir(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @pl_fatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %4, %7, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ imul64(int /*<<< orphan*/, int /*<<< orphan*/);
int32_t imul(int32_t a, int32_t b) { return (int32_t)imul64(a, b); }


x86 assembly (clang, -O0):
<imul>:
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 <imul64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imul>:
jmp    1030 <imul64@plt>

LLVM IR (-O0):
define i32 @imul(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 @imul64(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @imul(i32 %0, i32 %1) {
%3 = tail call i32 @imul64(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "Usage: %s [-h HOST] [-p PORT] COMMAND...\n", progname);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: %s [-h HOST] [-p PORT] COMMAND...\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Usage: %s [-h HOST] [-p PORT] COMMAND...\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void NoDepB_func() {}


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

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

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

LLVM IR (-O2):
define void @NoDepB_func() {
ret void
}
/* Variables and functions */
scalar_t__ numXifres(int);
int igualNumXifres(int n, int m) {
  if (numXifres(n) == numXifres(m)) {
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<igualNumXifres>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <numXifres@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <numXifres@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    114e <igualNumXifres+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <igualNumXifres+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igualNumXifres>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
call   1030 <numXifres@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1030 <numXifres@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @igualNumXifres(i32 %0, i32 %1) {
%3 = tail call i64 @numXifres(i32 %0)
%4 = tail call i64 @numXifres(i32 %1)
%5 = icmp eq i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int strcmp(char *, char *);
int compare(const void *elem1, const void *elem2) {
  int result;
  result = strcmp((char *)elem1, (char *)elem2);
  return (result < 0) ? 1 : ((result == 0) ? 0 : -1);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1147 <compare+0x37>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115a <compare+0x4a>
mov    -0x14(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
neg    %ecx
test   %eax,%eax
mov    $0x1,%eax
cmovns %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp slt i32 %3, 0
%5 = icmp ne i32 %3, 0
%6 = sext i1 %5 to i32
%7 = select i1 %4, i32 1, i32 %6
ret i32 %7
}
void INT_Excep_TMR1_CMI1A(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR1_CMI1A() {
ret void
}
int unloadgldriver(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unloadgldriver() {
ret i32 0
}
void clear() {
  int i;
  for (i = 0; i < 1000; i++)
    *((int *)0xC00b8000 + i) = 0;
  return;
}


x86 assembly (clang, -O0):
<clear>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    1136 <clear+0x36>
movslq -0x4(%rbp),%rcx
mov    $0xc00b8000,%eax
movl   $0x0,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <clear+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear>:
push   %rax
mov    $0xc00b8000,%edi
mov    $0xfa0,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @clear() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1000
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 3221979136 to i32*), i64 %7
store i32 0, i32* %8
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_string(char *);
char *strtok(int /*<<< orphan*/ *, char *);
void cmdPrintString(void) {
  char *token = strtok(NULL, " ");
  if (token != NULL) {
    print_string(token);
  }
}


x86 assembly (clang, -O0):
<cmdPrintString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xecd(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1150 <cmdPrintString+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <print_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmdPrintString>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <strtok@plt>
test   %rax,%rax
je     113d <cmdPrintString+0x1d>
mov    %rax,%rdi
pop    %rax
jmp    1030 <print_string@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @cmdPrintString() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @print_string(i8* %1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
char *malloc(int);
int strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
char *allocate_string(const char *str) {
  int size = strlen(str);
  char *ptr = malloc(size * sizeof(char));
  strncpy(ptr, str, size);
  return ptr;
}


x86 assembly (clang, -O0):
<allocate_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_string>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @allocate_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 1
%10 = trunc i64 %9 to i32
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = call i32 @strncpy(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
define i8* @allocate_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @malloc(i32 %2)
%4 = tail call i32 @strncpy(i8* %3, i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ serial_putc(int /*<<< orphan*/, int);
void serial_write(char *buf, int tty_minor) {
  while (*buf) {
    serial_putc(*buf++, tty_minor);
  }
}


x86 assembly (clang, -O0):
<serial_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <serial_write+0x3b>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0xc(%rbp),%esi
call   1030 <serial_putc@plt>
jmp    111f <serial_write+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_write>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1145 <serial_write+0x35>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <serial_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <serial_write+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @serial_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = call i32 @serial_putc(i32 %13, i32 %14)
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @serial_write(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = sext i8 %6 to i32
%10 = tail call i32 @serial_putc(i32 %9, i32 %1)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int a = 5;
  int b = 10;
  int c = a + b;
  printf("%d + %d = %d\n", a, b, c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 5, i32 10, i32 15)
ret i32 0
}
void time_free(tobj) void *tobj;
{
  if (tobj)
    free(tobj);
}


x86 assembly (clang, -O0):
<time_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <time_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_free>:
test   %rdi,%rdi
je     111a <time_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @time_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i8*, i8** %2
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @time_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @free(i8* %0)
br label %4
4: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ftg__remove_dir_contents(char const *);
scalar_t__ ftg_is_dir(char const *);
int /*<<< orphan*/ ftg_rmdir(char const *);
int remove(char const *);
extern void ftg_rmalldirs(const char *path) {
  if (ftg_is_dir(path)) {
    ftg__remove_dir_contents(path);
    ftg_rmdir(path);
  } else {
    int result = remove(path);
    ((void)0);
    ((void)result);
  }
}


x86 assembly (clang, -O0):
<ftg_rmalldirs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <ftg_is_dir@plt>
cmp    $0x0,%rax
je     1176 <ftg_rmalldirs+0x36>
mov    -0x8(%rbp),%rdi
call   1040 <ftg__remove_dir_contents@plt>
mov    -0x8(%rbp),%rdi
call   1050 <ftg_rmdir@plt>
jmp    1182 <ftg_rmalldirs+0x42>
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftg_rmalldirs>:
push   %rbx
mov    %rdi,%rbx
call   1060 <ftg_is_dir@plt>
test   %rax,%rax
je     115f <ftg_rmalldirs+0x1f>
mov    %rbx,%rdi
call   1040 <ftg__remove_dir_contents@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <ftg_rmdir@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <remove@plt>

LLVM IR (-O0):
define void @ftg_rmalldirs(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @ftg_is_dir(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @ftg__remove_dir_contents(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @ftg_rmdir(i8* %10)
br label %16
12: ; preds = %1
%13 = load i8*, i8** %2
%14 = call i32 @remove(i8* %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
br label %16
16: ; preds = %12, %7
ret void
}

LLVM IR (-O2):
define void @ftg_rmalldirs(i8* %0) {
%2 = tail call i64 @ftg_is_dir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @ftg__remove_dir_contents(i8* %0)
%6 = tail call i32 @ftg_rmdir(i8* %0)
br label %9
7: ; preds = %1
%8 = tail call i32 @remove(i8* %0)
br label %9
9: ; preds = %7, %4
ret void
}
int dolociPrioriteto(char c) {
  if (c == '*') {
    return 3;
  } else if (c == '/') {
    return 3;
  } else if (c == '+') {
    return 2;
  } else if (c == '-') {
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dolociPrioriteto>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
jne    1123 <dolociPrioriteto+0x23>
movl   $0x3,-0x4(%rbp)
jmp    1184 <dolociPrioriteto+0x84>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    113c <dolociPrioriteto+0x3c>
movl   $0x3,-0x4(%rbp)
jmp    1184 <dolociPrioriteto+0x84>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    1155 <dolociPrioriteto+0x55>
movl   $0x2,-0x4(%rbp)
jmp    1184 <dolociPrioriteto+0x84>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
jne    116e <dolociPrioriteto+0x6e>
movl   $0x2,-0x4(%rbp)
jmp    1184 <dolociPrioriteto+0x84>
jmp    1173 <dolociPrioriteto+0x73>
jmp    1178 <dolociPrioriteto+0x78>
jmp    117d <dolociPrioriteto+0x7d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dolociPrioriteto>:
add    $0xd6,%dil
xor    %eax,%eax
cmp    $0x5,%dil
ja     111a <dolociPrioriteto+0x1a>
movsbq %dil,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.dolociPrioriteto = [6 x i32] [i32 3, i32 2, i32 0, i32 2, i32 0, i32 3]
define i32 @dolociPrioriteto(i8 signext %0) {
%2 = add i8 %0, -42
%3 = icmp ult i8 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.dolociPrioriteto, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int myStrlen(char *src) {
  int i;
  while (src[i] != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<myStrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     112b <myStrlen+0x2b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1108 <myStrlen+0x8>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<myStrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <myStrlen+0x10>
ret

LLVM IR (-O0):
define i32 @myStrlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @myStrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ SIGFPE;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int main(int argc, char *argv[]) { raise(SIGFPE); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@SIGFPE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGFPE
%4 = tail call i32 @raise(i32 %3)
ret i32 0
}
void SVCHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @SVCHandler() {
ret void
}
void instruc_31() {}


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

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

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

LLVM IR (-O2):
define void @instruc_31() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  scanf("%c", &c);
  printf("%c\n", 'a' + 'z' - c);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 219, %5
%7 = trunc i32 %6 to i8
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sapxsumpw(int, float, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sapxsumpw(N, 5.0f, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
movss  0xe8c(%rip),%xmm0
call   1030 <stdlib_strided_sapxsumpw@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movss  0xebd(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1030 <stdlib_strided_sapxsumpw@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sapxsumpw(i32 %6, float 5.000000e+00, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sapxsumpw(i32 4, float 5.000000e+00, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void luaI_free(void *block) {
  if (block) {
    *((int *)block) = -1;
    free(block);
  }
}


x86 assembly (clang, -O0):
<luaI_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113a <luaI_free+0x2a>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_free>:
test   %rdi,%rdi
je     1120 <luaI_free+0x10>
movl   $0xffffffff,(%rdi)
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @luaI_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
store i32 -1, i32* %7
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @luaI_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
store i32 -1, i32* %4
%5 = tail call i32 @free(i8* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bot_angle_axis_to_quat(double, double const *, double *);
int /*<<< orphan*/ bot_quat_to_roll_pitch_yaw(double *, double *);
void bot_angle_axis_to_roll_pitch_yaw(double theta, const double axis[3],
                                      double rpy[3]) {
  double q[4];
  bot_angle_axis_to_quat(theta, axis, q);
  bot_quat_to_roll_pitch_yaw(q, rpy);
}


x86 assembly (clang, -O0):
<bot_angle_axis_to_roll_pitch_yaw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <bot_angle_axis_to_quat@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <bot_quat_to_roll_pitch_yaw@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_angle_axis_to_roll_pitch_yaw>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <bot_angle_axis_to_quat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <bot_quat_to_roll_pitch_yaw@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @bot_angle_axis_to_roll_pitch_yaw(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca [4 x double]
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = load double*, double** %5
%10 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%11 = call i32 @bot_angle_axis_to_quat(double %8, double* %9, double* %10)
%12 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%13 = load double*, double** %6
%14 = call i32 @bot_quat_to_roll_pitch_yaw(double* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @bot_angle_axis_to_roll_pitch_yaw(double %0, double* %1, double* %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%7 = call i32 @bot_angle_axis_to_quat(double %0, double* %1, double* %6)
%8 = call i32 @bot_quat_to_roll_pitch_yaw(double* %6, double* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_test_mt1(char const *, char const *, int *);
scalar_t__ testThreadSupport();
void test_mt(const char *zSystem, const char *zPattern, int *pRc) {
  if (testThreadSupport() == 0)
    return;
  do_test_mt1(zSystem, zPattern, pRc);
}


x86 assembly (clang, -O0):
<test_mt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <testThreadSupport@plt>
cmp    $0x0,%rax
jne    114a <test_mt+0x2a>
jmp    115b <test_mt+0x3b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <do_test_mt1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mt>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <testThreadSupport@plt>
test   %rax,%rax
je     114d <test_mt+0x2d>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <do_test_mt1@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @test_mt(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = call i64 (...) @testThreadSupport()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32*, i32** %6
%14 = call i32 @do_test_mt1(i8* %11, i8* %12, i32* %13)
br label %15
15: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @test_mt(i8* %0, i8* %1, i32* %2) {
%4 = tail call i64 (...) @testThreadSupport()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @do_test_mt1(i8* %0, i8* %1, i32* %2)
br label %8
8: ; preds = %3, %6
ret void
}
int js_AlertRetry(const char *title, const char *message) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @js_AlertRetry(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct ps_process {
  int dummy;
};
struct obus_server {
  int dummy;
};
struct obus_object {
  int dummy;
};

/* Variables and functions */
int obus_server_register_object(struct obus_server *, struct obus_object *);
int ps_process_register(struct obus_server *server, struct ps_process *object) {
  struct obus_object *obj = (struct obus_object *)object;
  return obus_server_register_object(server, obj);
}


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

x86 assembly (clang, -O2):
<ps_process_register>:
jmp    1030 <obus_server_register_object@plt>

LLVM IR (-O0):
%struct.obus_server = type { i32 }
%struct.ps_process = type { i32 }
%struct.obus_object = type { i32 }
define i32 @ps_process_register(%struct.obus_server* %0, %struct.ps_process* %1) {
%3 = alloca %struct.obus_server*
%4 = alloca %struct.ps_process*
%5 = alloca %struct.obus_object*
store %struct.obus_server* %0, %struct.obus_server** %3
store %struct.ps_process* %1, %struct.ps_process** %4
%6 = load %struct.ps_process*, %struct.ps_process** %4
%7 = bitcast %struct.ps_process* %6 to %struct.obus_object*
store %struct.obus_object* %7, %struct.obus_object** %5
%8 = load %struct.obus_server*, %struct.obus_server** %3
%9 = load %struct.obus_object*, %struct.obus_object** %5
%10 = call i32 @obus_server_register_object(%struct.obus_server* %8, %struct.obus_object* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.obus_server = type { i32 }
%struct.ps_process = type { i32 }
%struct.obus_object = type { i32 }
define i32 @ps_process_register(%struct.obus_server* %0, %struct.ps_process* %1) {
%3 = bitcast %struct.ps_process* %1 to %struct.obus_object*
%4 = tail call i32 @obus_server_register_object(%struct.obus_server* %0, %struct.obus_object* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *);
int foo() {
  int a = 2;
  int *pa = &a;
  bar(pa);
  return a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <bar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <bar@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32*
store i32 2, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @bar(i32* %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = call i32 @bar(i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
int test_imm_4Aint16_reg(short val) {
  return ((val) & (-0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Aint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffb6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Aint16_reg>:
test   $0xffb6,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Aint16_reg(i16 signext %0) {
%2 = and i16 %0, -74
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printMatrix(int *);
int /*<<< orphan*/ printf(char *);
void printAll(int *a, int *b, int *c) {
  printf("Matrix a: \n");
  printMatrix(a);
  printf("Matrix b: \n");
  printMatrix(b);
  printf("Product: \n");
  printMatrix(c);
}


x86 assembly (clang, -O0):
<printAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <printMatrix@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printMatrix@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printMatrix@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printAll>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <printMatrix@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1040 <printMatrix@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <printMatrix@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Matrix a: \0A\00"
@.str.1 = [12 x i8] c"Matrix b: \0A\00"
@.str.2 = [11 x i8] c"Product: \0A\00"
define void @printAll(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 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = load i32*, i32** %4
%9 = call i32 @printMatrix(i32* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32*, i32** %5
%12 = call i32 @printMatrix(i32* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%14 = load i32*, i32** %6
%15 = call i32 @printMatrix(i32* %14)
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Matrix a: \00"
@str.3 = [11 x i8] c"Matrix b: \00"
@str.4 = [10 x i8] c"Product: \00"
define void @printAll(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @printMatrix(i32* %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
%7 = tail call i32 @printMatrix(i32* %1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0))
%9 = tail call i32 @printMatrix(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_null_(char *, int, int *);
void test_null_fail() {
  int x = 1;
  assert_null_("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/"
               "heads/master/test/fail_test.c",
               14, (&x));
}


x86 assembly (clang, -O0):
<test_null_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xe,%esi
lea    -0x4(%rbp),%rdx
call   1030 <assert_null_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_null_fail>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rdx
mov    $0xe,%esi
call   1030 <assert_null_@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/fail_test.c\00"
define void @test_null_fail() {
%1 = alloca i32
store i32 1, i32* %1
%2 = call i32 @assert_null_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 14, i32* %1)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/fail_test.c\00"
define void @test_null_fail() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 @assert_null_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 14, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PsndReset();
int /*<<< orphan*/ z80_reset();
void PicoResetMS(void) {
  z80_reset();
  PsndReset();
}


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

x86 assembly (clang, -O2):
<PicoResetMS>:
push   %rax
xor    %eax,%eax
call   1030 <z80_reset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <PsndReset@plt>

LLVM IR (-O0):
define void @PicoResetMS() {
%1 = call i32 (...) @z80_reset()
%2 = call i32 (...) @PsndReset()
ret void
}

LLVM IR (-O2):
define void @PicoResetMS() {
%1 = tail call i32 (...) @z80_reset()
%2 = tail call i32 (...) @PsndReset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reconos_cleanup();
void exithandler(int sig) {
  reconos_cleanup();
  printf("[reconos-core] aborted\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exithandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <reconos_cleanup@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exithandler>:
push   %rax
xor    %eax,%eax
call   1040 <reconos_cleanup@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"[reconos-core] aborted\0A\00"
define void @exithandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @reconos_cleanup()
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [23 x i8] c"[reconos-core] aborted\00"
define void @exithandler(i32 %0) {
%2 = tail call i32 (...) @reconos_cleanup()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
uid_t setresuid(void) {
  printf("Setting GUID");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Setting GUID\00"
define i32 @setresuid() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Setting GUID\00"
define i32 @setresuid() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void I2CSlaveIntEnableEx(unsigned int baseAdd, unsigned int intFlag) {
  (*((volatile unsigned int *)(baseAdd + (0x2C)))) |= intFlag;
}


x86 assembly (clang, -O0):
<I2CSlaveIntEnableEx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntEnableEx>:
add    $0x2c,%edi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @I2CSlaveIntEnableEx(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = add i32 %6, 44
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = or i32 %10, %5
store volatile i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntEnableEx(i32 %0, i32 %1) {
%3 = add i32 %0, 44
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = or i32 %6, %1
store volatile i32 %7, i32* %5
ret void
}