xunge/DecIR huggingface dataset:
void av_get_packed_sample_fmt() {}


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

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

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

LLVM IR (-O2):
define void @av_get_packed_sample_fmt() {
ret void
}
void dequeue_pushable_task(struct rq *rq, struct task_struct *p) {}


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

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

LLVM IR (-O0):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @dequeue_pushable_task(%struct.rq* %0, %struct.task_struct* %1) {
%3 = alloca %struct.rq*
%4 = alloca %struct.task_struct*
store %struct.rq* %0, %struct.rq** %3
store %struct.task_struct* %1, %struct.task_struct** %4
ret void
}

LLVM IR (-O2):
%struct.rq = type opaque
%struct.task_struct = type opaque
define void @dequeue_pushable_task(%struct.rq* nocapture %0, %struct.task_struct* nocapture %1) {
ret void
}
long long s_fib(void) {
  static long long first = 0;
  static long long second = 1;
  long long out = first + second;
  first = second;
  second = out;
  return out;
}


x86 assembly (clang, -O0):
<s_fib>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f25(%rip),%rax
add    0x2f0e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2f03(%rip),%rax
mov    %rax,0x2f0c(%rip)
mov    -0x8(%rbp),%rax
mov    %rax,0x2ef1(%rip)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_fib>:
mov    0x2f19(%rip),%rcx
mov    0x2f22(%rip),%rax
add    %rcx,%rax
mov    %rcx,0x2f18(%rip)
mov    %rax,0x2f01(%rip)
ret

LLVM IR (-O0):
@s_fib.first = internal global i64 0
@s_fib.second = internal global i64 1
define i64 @s_fib() {
%1 = alloca i64
%2 = load i64, i64* @s_fib.first
%3 = load i64, i64* @s_fib.second
%4 = add nsw i64 %2, %3
store i64 %4, i64* %1
%5 = load i64, i64* @s_fib.second
store i64 %5, i64* @s_fib.first
%6 = load i64, i64* %1
store i64 %6, i64* @s_fib.second
%7 = load i64, i64* %1
ret i64 %7
}

LLVM IR (-O2):
@s_fib.first = internal unnamed_addr global i64 0
@s_fib.second = internal unnamed_addr global i64 1
define i64 @s_fib() {
%1 = load i64, i64* @s_fib.first
%2 = load i64, i64* @s_fib.second
%3 = add nsw i64 %2, %1
store i64 %2, i64* @s_fib.first
store i64 %3, i64* @s_fib.second
ret i64 %3
}
/* Variables and functions */
char *strchr(char *, char);
char decryptChar(char ch, char table[]) {
  return 'A' + (int)(strchr(table, ch) - table);
}


x86 assembly (clang, -O0):
<decryptChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x41,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decryptChar>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
mov    %rbx,%rdi
call   1030 <strchr@plt>
sub    %ebx,%eax
add    $0x41,%al
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @decryptChar(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8, i8* %3
%7 = call i8* @strchr(i8* %5, i8 signext %6)
%8 = load i8*, i8** %4
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = add nsw i32 65, %12
%14 = trunc i32 %13 to i8
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @decryptChar(i8 signext %0, i8* %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %1, i8 signext %0)
%4 = ptrtoint i8* %3 to i64
%5 = ptrtoint i8* %1 to i64
%6 = sub i64 %4, %5
%7 = trunc i64 %6 to i8
%8 = add i8 %7, 65
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *,
                           char const *, unsigned int);
int /*<<< orphan*/ *stderr;
void ciron_assert(const char *exp, const char *file, unsigned line) {
  fflush(NULL);
  fprintf(stderr, "\n\nAssertion \"%s\" failed in %s, line %u\n", exp, file,
          line);
  fflush(stderr);
  abort();
}


x86 assembly (clang, -O0):
<ciron_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%rdi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<ciron_assert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %edi,%edi
call   1050 <fflush@plt>
mov    0x2e92(%rip),%r15
mov    (%r15),%rdi
lea    0xea8(%rip),%rsi
mov    %rbp,%rdx
mov    %rbx,%rcx
mov    %r14d,%r8d
call   1040 <fprintf@plt>
mov    (%r15),%rdi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32* null
@.str = [40 x i8] c"\0A\0AAssertion \22%s\22 failed in %s, line %u\0A\00"
define void @ciron_assert(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 i32 @fflush(i32* null)
%8 = load i32*, i32** @stderr
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11)
%13 = load i32*, i32** @stderr
%14 = call i32 @fflush(i32* %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32* null
@.str = [40 x i8] c"\0A\0AAssertion \22%s\22 failed in %s, line %u\0A\00"
define void @ciron_assert(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @fflush(i32* null)
%5 = load i32*, i32** @stderr
%6 = tail call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%7 = load i32*, i32** @stderr
%8 = tail call i32 @fflush(i32* %7)
%9 = tail call i32 (...) @abort()
unreachable
}
int f(int year, int month) { return month <= 2 ? year - 1 : year; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     1122 <f+0x22>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <f+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
xor    %ecx,%ecx
cmp    $0x3,%esi
setl   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(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 = icmp sle i32 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %7
%13 = phi i32 [ %9, %7 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 3
%4 = sext i1 %3 to i32
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_ultrasonic_sensor_get_distance(int32_t port) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_ultrasonic_sensor_get_distance(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ popattributes();
void popattributes_() { popattributes(); }


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

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

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

LLVM IR (-O2):
define void @popattributes_() {
%1 = tail call i32 (...) @popattributes()
ret void
}
Error(emsg) char *emsg;
{ printf(" Error in Towers: %s\n", emsg); }


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

x86 assembly (clang, -O2):
<Error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c" Error in Towers: %s\0A\00"
define i32 @Error(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(int /*<<< orphan*/ *);
void error_fatal(int ret) {
  if (ret != 0) {
    perror(NULL);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<error_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <error_fatal+0x28>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_fatal>:
test   %edi,%edi
jne    1125 <error_fatal+0x5>
ret
push   %rax
xor    %edi,%edi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @error_fatal(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @perror(i32* null)
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ mvwaddch(int /*<<< orphan*/ *, int, int, char);
void wclrscr(WINDOW *pwin) {
  int y, x, maxy, maxx;
  getmaxyx(pwin, maxy, maxx);
  for (y = 0; y < maxy; y++)
    for (x = 0; x < maxx; x++)
      mvwaddch(pwin, y, x, ' ');
}


x86 assembly (clang, -O0):
<wclrscr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <getmaxyx@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1196 <wclrscr+0x76>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1183 <wclrscr+0x63>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x20,%ecx
call   1040 <mvwaddch@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <wclrscr+0x35>
jmp    1188 <wclrscr+0x68>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <wclrscr+0x22>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wclrscr>:
jmp    1030 <getmaxyx@plt>

LLVM IR (-O0):
define void @wclrscr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @getmaxyx(i32* %7, i32 %8, i32 %9)
store i32 0, i32* %3
br label %11
11: ; preds = %29, %1
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %32
15: ; preds = %11
store i32 0, i32* %4
br label %16
16: ; preds = %25, %15
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i32*, i32** %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = call i32 @mvwaddch(i32* %21, i32 %22, i32 %23, i8 signext 32)
br label %25
25: ; preds = %20
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %16
28: ; preds = %16
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %11
32: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @wclrscr(i32* %0) {
%2 = tail call i32 @getmaxyx(i32* %0, i32 undef, i32 undef)
ret void
}
__attribute__((always_)) void kunmap(struct page *page) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ sem_post(int /*<<< orphan*/ *);
void signalSem(sem_t *sem) { sem_post(sem); }


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

x86 assembly (clang, -O2):
<signalSem>:
jmp    1030 <sem_post@plt>

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

LLVM IR (-O2):
define void @signalSem(i32* %0) {
%2 = tail call i32 @sem_post(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gmp_default_free(void *p, size_t size) { free(p); }


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

x86 assembly (clang, -O2):
<gmp_default_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @gmp_default_free(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @gmp_default_free(i8* nocapture %0, i64 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char **ptr;
  extern char **environ;
  for (ptr = environ; *ptr != 0; ptr++)
    printf("%s\n", *ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1166 <main+0x56>
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%rax
mov    (%rax),%rbx
mov    (%rbx),%rsi
test   %rsi,%rsi
je     1154 <main+0x44>
add    $0x8,%rbx
lea    0xecf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1140 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@environ = external global i8**
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** @environ
store i8** %7, i8*** %6
br label %8
8: ; preds = %16, %2
%9 = load i8**, i8*** %6
%10 = load i8*, i8** %9
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12
%17 = load i8**, i8*** %6
%18 = getelementptr inbounds i8*, i8** %17, i32 1
store i8** %18, i8*** %6
br label %8
19: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@environ = external global i8**
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i8**, i8*** @environ
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %2, %6
%7 = phi i8* [ %11, %6 ], [ %4, %2 ]
%8 = phi i8** [ %10, %6 ], [ %3, %2 ]
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char *, struct stat *);
int _is_file_dir(char *pathname) {
  struct stat st;
  if (stat(pathname, &st) != 0)
    return 0;
  return S_ISDIR(st.st_mode) ? 1 : 0;
}


x86 assembly (clang, -O0):
<_is_file_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114f <_is_file_dir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    116b <_is_file_dir+0x4b>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_file_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <_is_file_dir+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @_is_file_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %16
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @S_ISDIR(i32 %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
store i32 %15, i32* %2
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @_is_file_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
/* Type definitions */
struct rtas_ibm_diag_scn {
  int dummy;
};
struct rtas_event {
  int dummy;
};

/* Variables and functions */
scalar_t__ get_re_scn(struct rtas_event *, int);
struct rtas_ibm_diag_scn *rtas_get_ibm_diag_scn(struct rtas_event *re) {
  return (struct rtas_ibm_diag_scn *)get_re_scn(re, 6);
}


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

x86 assembly (clang, -O2):
<rtas_get_ibm_diag_scn>:
mov    $0x6,%esi
jmp    1030 <get_re_scn@plt>

LLVM IR (-O0):
%struct.rtas_ibm_diag_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_ibm_diag_scn* @rtas_get_ibm_diag_scn(%struct.rtas_event* %0) {
%2 = alloca %struct.rtas_event*
store %struct.rtas_event* %0, %struct.rtas_event** %2
%3 = load %struct.rtas_event*, %struct.rtas_event** %2
%4 = call i64 @get_re_scn(%struct.rtas_event* %3, i32 6)
%5 = inttoptr i64 %4 to %struct.rtas_ibm_diag_scn*
ret %struct.rtas_ibm_diag_scn* %5
}

LLVM IR (-O2):
%struct.rtas_ibm_diag_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_ibm_diag_scn* @rtas_get_ibm_diag_scn(%struct.rtas_event* %0) {
%2 = tail call i64 @get_re_scn(%struct.rtas_event* %0, i32 6)
%3 = inttoptr i64 %2 to %struct.rtas_ibm_diag_scn*
ret %struct.rtas_ibm_diag_scn* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void stockfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<stockfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @stockfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ABGRToUVRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToUVRow_NEON() {
ret void
}
long int unpacki32(unsigned char *buf) {
  unsigned long int i2 = ((unsigned long int)buf[0] << 24) |
                         ((unsigned long int)buf[1] << 16) |
                         ((unsigned long int)buf[2] << 8) | buf[3];
  long int i;
  if (i2 <= 0x7fffffffu) {
    i = i2;
  } else {
    i = -1 - (long int)(0xffffffffu - i2);
  }
  return i;
}


x86 assembly (clang, -O0):
<unpacki32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x7fffffff,-0x10(%rbp)
7f
ja     115b <unpacki32+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1172 <unpacki32+0x72>
mov    $0xffffffff,%ecx
sub    -0x10(%rbp),%rcx
mov    $0xffffffffffffffff,%rax
sub    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpacki32>:
mov    (%rdi),%ecx
shl    $0x20,%rcx
bswap  %rcx
movabs $0xffffffff00000000,%rax
ff ff ff
or     %rcx,%rax
test   $0x80000000,%ecx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @unpacki32(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i64
%9 = shl i64 %8, 24
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = shl i64 %13, 16
%15 = or i64 %9, %14
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i64
%20 = shl i64 %19, 8
%21 = or i64 %15, %20
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i64
%26 = or i64 %21, %25
store i64 %26, i64* %3
%27 = load i64, i64* %3
%28 = icmp ule i64 %27, 2147483647
br i1 %28, label %29, label %31
29: ; preds = %1
%30 = load i64, i64* %3
store i64 %30, i64* %4
br label %35
31: ; preds = %1
%32 = load i64, i64* %3
%33 = sub i64 4294967295, %32
%34 = sub nsw i64 -1, %33
store i64 %34, i64* %4
br label %35
35: ; preds = %31, %29
%36 = load i64, i64* %4
ret i64 %36
}

LLVM IR (-O2):
define i64 @unpacki32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i64
%4 = shl nuw nsw i64 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %7, 16
%9 = or i64 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = shl nuw nsw i64 %12, 8
%14 = or i64 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = or i64 %14, %17
%19 = icmp ult i64 %18, 2147483648
%20 = or i64 %18, -4294967296
%21 = select i1 %19, i64 %18, i64 %20
ret i64 %21
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_UART_RXD1_INPUT() { clear_io_bit(0x45, 2); }


x86 assembly (clang, -O0):
<TOSH_MAKE_UART_RXD1_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
mov    $0x2,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_UART_RXD1_INPUT>:
mov    $0x45,%edi
mov    $0x2,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_UART_RXD1_INPUT() {
%1 = call i32 @clear_io_bit(i32 69, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_UART_RXD1_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 69, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int st103_get_epreg(int /*<<< orphan*/);
int /*<<< orphan*/ st103_set_epreg(int /*<<< orphan*/, int);
void st103_ep_set_tx_status(uint8_t ep_num, uint16_t st_tx) {
  uint16_t value = st103_get_epreg(ep_num);
  value &= (((0x8000) | (0x0800) | (0x0600) | (0x0100) | (0x0080) | (0x000F)) |
            (0x0030));
  value ^= ((0x0010) & st_tx);
  value ^= ((0x0020) & st_tx);
  value |= (0x8000) | (0x0080);
  st103_set_epreg(ep_num, value);
}


x86 assembly (clang, -O0):
<st103_ep_set_tx_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <st103_get_epreg@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x8fbf,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x10,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x20,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x8080,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <st103_set_epreg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<st103_ep_set_tx_status>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <st103_get_epreg@plt>
and    $0xf3f,%eax
and    $0x30,%ebx
xor    %eax,%ebx
or     $0x8080,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <st103_set_epreg@plt>

LLVM IR (-O0):
define void @st103_ep_set_tx_status(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @st103_get_epreg(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = and i32 %8, 36799
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = and i32 16, %10
%12 = load i32, i32* %5
%13 = xor i32 %12, %11
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = and i32 32, %14
%16 = load i32, i32* %5
%17 = xor i32 %16, %15
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = or i32 %18, 32896
store i32 %19, i32* %5
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = call i32 @st103_set_epreg(i32 %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @st103_ep_set_tx_status(i32 %0, i32 %1) {
%3 = tail call i32 @st103_get_epreg(i32 %0)
%4 = and i32 %3, 3903
%5 = and i32 %1, 48
%6 = xor i32 %4, %5
%7 = or i32 %6, 32896
%8 = tail call i32 @st103_set_epreg(i32 %0, i32 %7)
ret void
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
double *dzeros(unsigned int n) { return (double *)calloc(n, sizeof(double)); }


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

x86 assembly (clang, -O2):
<dzeros>:
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define double* @dzeros(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @calloc(i32 %3, i32 8)
%5 = inttoptr i64 %4 to double*
ret double* %5
}

LLVM IR (-O2):
define double* @dzeros(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = inttoptr i64 %2 to double*
ret double* %3
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_115(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 115)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_115>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x73,%eax
jne    1144 <fn_ch_115+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_115+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_115>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x73,%ecx
jne    1133 <fn_ch_115+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fn_ch_115(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 115
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
void func() { return; }


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

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

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

LLVM IR (-O2):
define void @func() {
ret void
}
int corpse_value_boost(int sval) {
  switch (sval) {
  case 3:
  case 4: {
    return (1);
  }
  default: {
    return (0);
  }
  }
}


x86 assembly (clang, -O0):
<corpse_value_boost>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffd,%eax
sub    $0x1,%eax
ja     1127 <corpse_value_boost+0x27>
jmp    111b <corpse_value_boost+0x1b>
movl   $0x1,-0x4(%rbp)
jmp    112e <corpse_value_boost+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corpse_value_boost>:
add    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @corpse_value_boost(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 3, label %5
i32 4, label %5
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @corpse_value_boost(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ SNDCTL_DSP_GETBLKSIZE;
int /*<<< orphan*/ err_die(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int ioctl(int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int get_au_blksz(int audio_fd) {
  int blocksize;
  if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &blocksize) == -1)
    err_die("SNDCTL_DSP_GETBLKSIZE ioctl failed: %s\n", strerror(errno));
  return blocksize;
}


x86 assembly (clang, -O0):
<get_au_blksz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1175 <get_au_blksz+0x45>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
call   1040 <err_die@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_au_blksz>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1165 <get_au_blksz+0x35>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <err_die@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SNDCTL_DSP_GETBLKSIZE = global i32 0
@.str = [40 x i8] c"SNDCTL_DSP_GETBLKSIZE ioctl failed: %s\0A\00"
@errno = global i32 0
define i32 @get_au_blksz(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @SNDCTL_DSP_GETBLKSIZE
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @err_die(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@SNDCTL_DSP_GETBLKSIZE = global i32 0
@.str = [40 x i8] c"SNDCTL_DSP_GETBLKSIZE ioctl failed: %s\0A\00"
@errno = global i32 0
define i32 @get_au_blksz(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SNDCTL_DSP_GETBLKSIZE
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @errno
%9 = call i32 @strerror(i32 %8)
%10 = call i32 @err_die(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = load i32, i32* %2
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void BeginCase(FILE *fh, unsigned char Opcode) {
  fprintf(fh, "case 0x0%02x:\r\n", Opcode);
  fprintf(fh, "{\r\n");
}


x86 assembly (clang, -O0):
<BeginCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%edx
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BeginCase>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xed3(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xed5(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"case 0x0%02x:\0D\0A\00"
@.str.1 = [4 x i8] c"{\0D\0A\00"
define void @BeginCase(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32*, i32** %3
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"case 0x0%02x:\0D\0A\00"
@.str.1 = [4 x i8] c"{\0D\0A\00"
define void @BeginCase(i32* nocapture %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 3, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
void loop(int *i, int len_i, int nnz_val) {
  int ii;
  int j_val;
  int64_t len_val = (int64_t)len_i;
  int64_t ii_val;
  for (ii = 0; ii < len_i; ii++, ii_val++) {
    int i__ = i[ii], px1, p2;
    if (nnz_val && ii_val >= len_val) {
      j_val = 0;
    }
    j_val++;
  }
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1179 <loop+0x79>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1156 <loop+0x56>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jl     1156 <loop+0x56>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111d <loop+0x1d>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @loop(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i64
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%14 = load i32, i32* %5
%15 = sext i32 %14 to i64
store i64 %15, i64* %9
store i32 0, i32* %7
br label %16
16: ; preds = %36, %3
%17 = load i32, i32* %7
%18 = load i32, i32* %5
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %41
20: ; preds = %16
%21 = load i32*, i32** %4
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %24
store i32 %25, i32* %11
%26 = load i32, i32* %6
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %20
%29 = load i64, i64* %10
%30 = load i64, i64* %9
%31 = icmp sge i64 %29, %30
br i1 %31, label %32, label %33
32: ; preds = %28
store i32 0, i32* %8
br label %33
33: ; preds = %32, %28, %20
%34 = load i32, i32* %8
%35 = add nsw i32 %34, 1
store i32 %35, i32* %8
br label %36
36: ; preds = %33
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
store i32 %38, i32* %7
%39 = load i64, i64* %10
%40 = add nsw i64 %39, 1
store i64 %40, i64* %10
br label %16
41: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @loop(i32* nocapture %0, i32 %1, i32 %2) {
ret void
}
void nested_parallel_1(float *r, int a, double b) {
#pragma omp parallel
  {
#pragma omp parallel
    { *r = a + b; }
  }
}


x86 assembly (clang, -O0):
<nested_parallel_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nested_parallel_1>:
cvtsi2sd %esi,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @nested_parallel_1(float* %0, i32 %1, double %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca double
store float* %0, float** %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %5
%8 = sitofp i32 %7 to double
%9 = load double, double* %6
%10 = fadd double %8, %9
%11 = fptrunc double %10 to float
%12 = load float*, float** %4
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @nested_parallel_1(float* nocapture writeonly %0, i32 %1, double %2) {
%4 = sitofp i32 %1 to double
%5 = fadd double %4, %2
%6 = fptrunc double %5 to float
store float %6, float* %0
ret void
}
void free_grid_mem(int **grid) {
  int i;
  i = -1;
  while (++i < 9)
    free(grid[i]);
  free(grid);
}


x86 assembly (clang, -O0):
<free_grid_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x9,%eax
jge    114b <free_grid_mem+0x3b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1123 <free_grid_mem+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_grid_mem>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    0x10(%rbx),%rdi
call   1030 <free@plt>
mov    0x18(%rbx),%rdi
call   1030 <free@plt>
mov    0x20(%rbx),%rdi
call   1030 <free@plt>
mov    0x28(%rbx),%rdi
call   1030 <free@plt>
mov    0x30(%rbx),%rdi
call   1030 <free@plt>
mov    0x38(%rbx),%rdi
call   1030 <free@plt>
mov    0x40(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_grid_mem(i32** nocapture %0) {
%2 = bitcast i32** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = getelementptr inbounds i32*, i32** %0, i64 1
%5 = bitcast i32** %4 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = getelementptr inbounds i32*, i32** %0, i64 2
%8 = bitcast i32** %7 to i8**
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = getelementptr inbounds i32*, i32** %0, i64 3
%11 = bitcast i32** %10 to i8**
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = getelementptr inbounds i32*, i32** %0, i64 4
%14 = bitcast i32** %13 to i8**
%15 = load i8*, i8** %14
tail call void @free(i8* %15)
%16 = getelementptr inbounds i32*, i32** %0, i64 5
%17 = bitcast i32** %16 to i8**
%18 = load i8*, i8** %17
tail call void @free(i8* %18)
%19 = getelementptr inbounds i32*, i32** %0, i64 6
%20 = bitcast i32** %19 to i8**
%21 = load i8*, i8** %20
tail call void @free(i8* %21)
%22 = getelementptr inbounds i32*, i32** %0, i64 7
%23 = bitcast i32** %22 to i8**
%24 = load i8*, i8** %23
tail call void @free(i8* %24)
%25 = getelementptr inbounds i32*, i32** %0, i64 8
%26 = bitcast i32** %25 to i8**
%27 = load i8*, i8** %26
tail call void @free(i8* %27)
%28 = bitcast i32** %0 to i8*
tail call void @free(i8* %28)
ret void
}
void core_imv_update(void) {}


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

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

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

LLVM IR (-O2):
define void @core_imv_update() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M752_f(char *s) {
  debug("M752_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M752_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M752_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M752_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M752_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M752_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M752_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
unsigned hash(char *str) {
  unsigned h = 0;
  while (*str)
    h = (h << 1) + *str++;
  return h;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <hash+0x3e>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <hash+0x22>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 1
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}