xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal16array_(void *x, unsigned int *n) {
  popNarray((char *)x, (*n * 16));
}


x86 assembly (clang, -O0):
<popreal16array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x4,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popreal16array_>:
mov    (%rsi),%esi
shl    $0x4,%esi
jmp    1030 <popNarray@plt>

LLVM IR (-O0):
define void @popreal16array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 16
%9 = call i32 @popNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @popreal16array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 4
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
/* Type definitions */
struct json {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ json_delete(int /*<<< orphan*/);
int /*<<< orphan*/ json_detach_item_from_object(struct json *, char const *);
void json_delete_item_from_object(struct json *object, const char *string) {
  json_delete(json_detach_item_from_object(object, string));
}


x86 assembly (clang, -O0):
<json_delete_item_from_object>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <json_detach_item_from_object@plt>
mov    %eax,%edi
call   1030 <json_delete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_delete_item_from_object>:
push   %rax
call   1040 <json_detach_item_from_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <json_delete@plt>

LLVM IR (-O0):
%struct.json = type { i32 }
define void @json_delete_item_from_object(%struct.json* %0, i8* %1) {
%3 = alloca %struct.json*
%4 = alloca i8*
store %struct.json* %0, %struct.json** %3
store i8* %1, i8** %4
%5 = load %struct.json*, %struct.json** %3
%6 = load i8*, i8** %4
%7 = call i32 @json_detach_item_from_object(%struct.json* %5, i8* %6)
%8 = call i32 @json_delete(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.json = type { i32 }
define void @json_delete_item_from_object(%struct.json* %0, i8* %1) {
%3 = tail call i32 @json_detach_item_from_object(%struct.json* %0, i8* %1)
%4 = tail call i32 @json_delete(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func_returning_struct();
void loop(void) { func_returning_struct(); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @startTiming() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dialer_view_deinit();
void phoneui_backend_dialer_deinit() { dialer_view_deinit(); }


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

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

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

LLVM IR (-O2):
define void @phoneui_backend_dialer_deinit() {
%1 = tail call i32 (...) @dialer_view_deinit()
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
long *crial(long val) {
  long *pval = (long *)malloc(sizeof(long));
  *pval = val;
  return pval;
}


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

x86 assembly (clang, -O2):
<crial>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rbx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define i64* @crial(i64 %0) {
%2 = tail call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to i64*
store i64 %0, i64* %3
ret i64* %3
}
int INDEX(int x, int y, int z, int s) {
  int i = (x * (z + 1)) + y;
  return i;
}


x86 assembly (clang, -O0):
<INDEX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<INDEX>:
lea    0x1(%rdx),%eax
imul   %edi,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @INDEX(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = add nsw i32 %11, 1
%13 = mul nsw i32 %10, %12
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
store i32 %15, i32* %9
%16 = load i32, i32* %9
ret i32 %16
}

LLVM IR (-O2):
define i32 @INDEX(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, 1
%6 = mul nsw i32 %5, %0
%7 = add nsw i32 %6, %1
ret i32 %7
}
/* Type definitions */
typedef int int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int32_t mul_mov_24(int16_t coef, int16_t data) {
  return (int32_t)coef * (int32_t)data;
}


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

x86 assembly (clang, -O2):
<mul_mov_24>:
mov    %rsi,%rax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @mul_mov_24(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @mul_mov_24(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = mul nsw i32 %4, %3
ret i32 %5
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
bool timespec_eq(const struct timespec *a, const struct timespec *b) {
  return a->tv_sec == b->tv_sec && a->tv_nsec == b->tv_nsec;
}


x86 assembly (clang, -O0):
<timespec_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    113b <timespec_eq+0x3b>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    0x8(%rcx),%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_eq>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
jne    1117 <timespec_eq+0x17>
mov    0x8(%rdi),%rcx
xor    %eax,%eax
cmp    0x8(%rsi),%rcx
sete   %al
ret

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

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i32 @timespec_eq(%struct.timespec* nocapture %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %8, %2
%16 = phi i32 [ 0, %2 ], [ %14, %8 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_play_sample() {
  printf("NOT IMPLEMENTED:"
         "pa_context_play_sample"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"NOT IMPLEMENTED:pa_context_play_sample\0A\00"
define i32 @pa_context_play_sample() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_context_play_sample\00"
define i32 @pa_context_play_sample() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void foo776() {}


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

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

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

LLVM IR (-O2):
define void @foo776() {
ret void
}
char movimento(int x0, int y0, int x1, int y1) {
  if (x1 - x0 > 0) {
    return 'D';
  } else if (x1 - x0 < 0) {
    return 'E';
  } else if (y1 - y0 > 0) {
    return 'C';
  } else if (y1 - y0 < 0) {
    return 'B';
  }
  return 'X';
}


x86 assembly (clang, -O0):
<movimento>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
jle    1128 <movimento+0x28>
movb   $0x44,-0x1(%rbp)
jmp    1183 <movimento+0x83>
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
jge    1140 <movimento+0x40>
movb   $0x45,-0x1(%rbp)
jmp    1183 <movimento+0x83>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jle    1158 <movimento+0x58>
movb   $0x43,-0x1(%rbp)
jmp    1183 <movimento+0x83>
mov    -0x14(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x0,%eax
jge    1170 <movimento+0x70>
movb   $0x42,-0x1(%rbp)
jmp    1183 <movimento+0x83>
jmp    1175 <movimento+0x75>
jmp    117a <movimento+0x7a>
jmp    117f <movimento+0x7f>
movb   $0x58,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<movimento>:
mov    $0x44,%al
sub    %edi,%edx
jle    1107 <movimento+0x7>
ret
js     111d <movimento+0x1d>
mov    $0x43,%al
sub    %esi,%ecx
jg     1106 <movimento+0x6>
mov    $0x58,%ecx
mov    $0x42,%eax
cmove  %ecx,%eax
ret
mov    $0x45,%al
ret

LLVM IR (-O0):
define signext i8 @movimento(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %8
%11 = load i32, i32* %6
%12 = sub nsw i32 %10, %11
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %4
store i8 68, i8* %5
br label %37
15: ; preds = %4
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = sub nsw i32 %16, %17
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
store i8 69, i8* %5
br label %37
21: ; preds = %15
%22 = load i32, i32* %9
%23 = load i32, i32* %7
%24 = sub nsw i32 %22, %23
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %21
store i8 67, i8* %5
br label %37
27: ; preds = %21
%28 = load i32, i32* %9
%29 = load i32, i32* %7
%30 = sub nsw i32 %28, %29
%31 = icmp slt i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %27
store i8 66, i8* %5
br label %37
33: ; preds = %27
br label %34
34: ; preds = %33
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
store i8 88, i8* %5
br label %37
37: ; preds = %36, %32, %26, %20, %14
%38 = load i8, i8* %5
ret i8 %38
}

LLVM IR (-O2):
define signext i8 @movimento(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = icmp sgt i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %4
%8 = icmp slt i32 %5, 0
br i1 %8, label %15, label %9
9: ; preds = %7
%10 = sub nsw i32 %3, %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = icmp eq i32 %10, 0
%14 = select i1 %13, i8 88, i8 66
br label %15
15: ; preds = %12, %9, %7, %4
%16 = phi i8 [ 68, %4 ], [ 69, %7 ], [ 67, %9 ], [ %14, %12 ]
ret i8 %16
}
/* Variables and functions */
int /*<<< orphan*/ emsFacer(char const *, int);
void errFacer(const char *token, int status) { emsFacer(token, status); }


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

x86 assembly (clang, -O2):
<errFacer>:
jmp    1030 <emsFacer@plt>

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

LLVM IR (-O2):
define void @errFacer(i8* %0, i32 %1) {
%3 = tail call i32 @emsFacer(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ t();
int a(int b) {
  if (!b) {
    t();
    t();
    t();
    t();
    t();
    t();
    t();
  }
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1156 <a+0x46>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    $0x0,%al
call   1030 <t@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
test   %edi,%edi
je     1115 <a+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
xor    %eax,%eax
call   1030 <t@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @a(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = tail call i32 (...) @t()
%5 = tail call i32 (...) @t()
%6 = tail call i32 (...) @t()
%7 = tail call i32 (...) @t()
%8 = tail call i32 (...) @t()
%9 = tail call i32 (...) @t()
%10 = tail call i32 (...) @t()
br label %11
11: ; preds = %3, %1
ret i32 undef
}
/* Variables and functions */
float fmodf(float, float);
float num_mod(float a, float b) { return fmodf(a, b); }


x86 assembly (clang, -O0):
<num_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <fmodf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_mod>:
jmp    1030 <fmodf@plt>

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

LLVM IR (-O2):
define float @num_mod(float %0, float %1) {
%3 = tail call float @fmodf(float %0, float %1)
ret float %3
}
/* Variables and functions */
double atan2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(double);
void math_atan2(void) {
  lua_pushnumber(((atan2(luaL_check_number(1), luaL_check_number(2))) /
                  ((3.14159265358979323846) / 180.0)));
}


x86 assembly (clang, -O0):
<math_atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <luaL_check_number@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1030 <atan2@plt>
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_atan2>:
push   %rbx
mov    $0x1,%edi
call   1040 <luaL_check_number@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <atan2@plt>
divsd  0xea8(%rip),%xmm0
pop    %rbx
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_atan2() {
%1 = call i32 @luaL_check_number(i32 1)
%2 = call i32 @luaL_check_number(i32 2)
%3 = call double @atan2(i32 %1, i32 %2)
%4 = fdiv double %3, 0x3F91DF46A2529D39
%5 = call i32 @lua_pushnumber(double %4)
ret void
}

LLVM IR (-O2):
define void @math_atan2() {
%1 = tail call i32 @luaL_check_number(i32 1)
%2 = tail call i32 @luaL_check_number(i32 2)
%3 = tail call double @atan2(i32 %1, i32 %2)
%4 = fdiv double %3, 0x3F91DF46A2529D39
%5 = tail call i32 @lua_pushnumber(double %4)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int empty(char *s) {
  while (isspace(*s))
    s++;
  return (*s == '\0');
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <empty+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <empty+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <empty+0x10>
xor    %eax,%eax
cmpb   $0x0,-0x1(%rbx)
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @empty(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int sysnerr(int x, char *s) {
  if (x == 0) {
    perror(s);
    exit(1);
  }
  return x;
}


x86 assembly (clang, -O0):
<sysnerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114c <sysnerr+0x2c>
mov    -0x10(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysnerr>:
test   %edi,%edi
je     1127 <sysnerr+0x7>
mov    %edi,%eax
ret
push   %rax
mov    %rsi,%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define i32 @sysnerr(i32 returned %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @perror(i8* %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret i32 %0
}
int main(void) {
  int fa;
#pragma acc kernels
  for (int rw = 0; rw < 1; ++rw)
    fa = 0;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    1131 <main+0x31>
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %4
store i32 0, i32* %2
br label %8
8: ; preds = %7
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
int /*<<< orphan*/ *getcwd(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void bi_pwd(void) {
  char cwd[1024];
  if (getcwd(cwd, sizeof(cwd)) != NULL)
    printf("%s\n", cwd);
  else
    printf("pwd error\n");
}


x86 assembly (clang, -O0):
<bi_pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
je     1160 <bi_pwd+0x40>
lea    -0x400(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116e <bi_pwd+0x4e>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_pwd>:
sub    $0x408,%rsp
mov    %rsp,%rdi
mov    $0x400,%esi
call   1040 <getcwd@plt>
test   %rax,%rax
je     113e <bi_pwd+0x1e>
mov    %rsp,%rdi
jmp    1145 <bi_pwd+0x25>
lea    0xebb(%rip),%rdi
call   1030 <puts@plt>
add    $0x408,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [11 x i8] c"pwd error\0A\00"
define void @bi_pwd() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"pwd error\00"
define void @bi_pwd() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32* @getcwd(i8* %2, i32 1024)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @puts(i8* %2)
br label %9
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/ *);
scalar_t__ isspace(int);
int peek(int /*<<< orphan*/ *);
int skip_whitespace(FILE *fp) {
  int c, count = 0;
  while (1) {
    c = peek(fp);
    if (isspace(c)) {
      getc(fp);
      count++;
    } else {
      break;
    }
  }
  return count;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <peek@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1178 <skip_whitespace+0x48>
mov    -0x8(%rbp),%rdi
call   1050 <getc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    117d <skip_whitespace+0x4d>
jmp    1182 <skip_whitespace+0x52>
jmp    1143 <skip_whitespace+0x13>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <peek@plt>
mov    %eax,%edi
call   1040 <isspace@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     116f <skip_whitespace+0x3f>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1050 <getc@plt>
add    $0x1,%ebp
mov    %rbx,%rdi
call   1030 <peek@plt>
mov    %eax,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1150 <skip_whitespace+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @skip_whitespace(i32* %0) {
%2 = tail call i32 @peek(i32* %0)
%3 = tail call i64 @isspace(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @getc(i32* %0)
%8 = add nuw nsw i32 %6, 1
%9 = tail call i32 @peek(i32* %0)
%10 = tail call i64 @isspace(i32 %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = phi i32 [ 0, %1 ], [ %8, %5 ]
ret i32 %13
}
/* Type definitions */
struct Queue {
  int dummy;
};
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _PushBack(struct Queue *, struct Node *);
void PushBack(struct Queue *queue, struct Node *node) {
  if (queue == NULL)
    return;
  _PushBack(queue, node);
}


x86 assembly (clang, -O0):
<PushBack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1130 <PushBack+0x20>
jmp    113d <PushBack+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_PushBack@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Queue = type { i32 }
%struct.Node = type { i32 }
define void @PushBack(%struct.Queue* %0, %struct.Node* %1) {
%3 = alloca %struct.Queue*
%4 = alloca %struct.Node*
store %struct.Queue* %0, %struct.Queue** %3
store %struct.Node* %1, %struct.Node** %4
%5 = load %struct.Queue*, %struct.Queue** %3
%6 = icmp eq %struct.Queue* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load %struct.Queue*, %struct.Queue** %3
%10 = load %struct.Node*, %struct.Node** %4
%11 = call i32 @_PushBack(%struct.Queue* %9, %struct.Node* %10)
br label %12
12: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
%struct.Queue = type { i32 }
%struct.Node = type { i32 }
define void @PushBack(%struct.Queue* %0, %struct.Node* %1) {
%3 = icmp eq %struct.Queue* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @_PushBack(%struct.Queue* %0, %struct.Node* %1)
br label %6
6: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestVarArg(char *, int);
void TestPassVarInt(int x) { TestVarArg("A", x); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
define void @TestPassVarInt(i32 %0) {
%2 = tail call i32 @TestVarArg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int uscrn(char *str) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @uscrn(i8* nocapture readnone %0) {
ret i32 0
}
int SDL_imageFilterClipToRangeMMX(unsigned char *Src1, unsigned char *Dest,
                                  unsigned int SrcLength, unsigned char Tmin,
                                  unsigned char Tmax) {
  return (-1);
}


x86 assembly (clang, -O0):
<SDL_imageFilterClipToRangeMMX>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %cl,-0x15(%rbp)
mov    %al,-0x16(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SDL_imageFilterClipToRangeMMX(i8* %0, i8* %1, i32 %2, i8 zeroext %3, i8 zeroext %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
ret i32 -1
}

LLVM IR (-O2):
define i32 @SDL_imageFilterClipToRangeMMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8 zeroext %3, i8 zeroext %4) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ dump_stack();
void die(char *str, void *fp, int nr) {
  dump_stack();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <dump_stack@plt>
jmp    112a <die+0x1a>

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %eax,%eax
call   1030 <dump_stack@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <die+0x10>

LLVM IR (-O0):
define void @die(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 (...) @dump_stack()
br label %8
8: ; preds = %3, %8
br label %8
}

LLVM IR (-O2):
define void @die(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @dump_stack()
br label %5
5: ; preds = %3, %5
br label %5
}
int foo(int a) { return a * 2; }


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

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int f(unsigned int);
unsigned g(unsigned i) { return f(i); }


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

x86 assembly (clang, -O2):
<g>:
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = tail call i32 @f(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void showHelp(FILE *f) {
  fprintf(
      f,
      "Usage: acurite [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i "
      "mcastinterface]\n"
      "  -h | -? | --help                      display usage and exit\n"
      "  -v | --verbose                        verbose logging\n"
      "  -a addr | --multicast-address addr    multicast address, default "
      "236.0.0.1\n"
      "  -p port | --multicast-port port       multicast port, default 3636\n"
      "  -i addr | --multicast-interface addr  address of the multicast "
      "interface, default 127.0.0.1\n"
      "  -r path | --recent path               path to most recent data, "
      "/tmp/current-weather, appends channel, identifier, and .json.\n");
}


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

x86 assembly (clang, -O2):
<showHelp>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x237,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [568 x i8] c"Usage: acurite [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i mcastinterface]\0A -h | -? | --help display usage and exit\0A -v | --verbose verbose logging\0A -a addr | --multicast-address addr multicast address, default 236.0.0.1\0A -p port | --multicast-port port multicast port, default 3636\0A -i addr | --multicast-interface addr address of the multicast interface, default 127.0.0.1\0A -r path | --recent path path to most recent data, /tmp/current-weather, appends channel, identifier, and .json.\0A\00"
define void @showHelp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [568 x i8] c"Usage: acurite [-h] [-?] [-v] [-a mcastaddr] [-p mcastport] [-i mcastinterface]\0A -h | -? | --help display usage and exit\0A -v | --verbose verbose logging\0A -a addr | --multicast-address addr multicast address, default 236.0.0.1\0A -p port | --multicast-port port multicast port, default 3636\0A -i addr | --multicast-interface addr address of the multicast interface, default 127.0.0.1\0A -r path | --recent path path to most recent data, /tmp/current-weather, appends channel, identifier, and .json.\0A\00"
define void @showHelp(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([568 x i8], [568 x i8]* @.str, i64 0, i64 0), i64 567, i64 1, i32* %0)
ret void
}
void rop3_245_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = ~*D;
  stk1 = T | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_245_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_245_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
not    %cl
or     %dl,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_245_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %8
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %7
%20 = load i8, i8* %7
%21 = zext i8 %20 to i32
%22 = load i8, i8* %5
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = and i32 %21, %24
%26 = load i8*, i8** %4
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = or i32 %25, %31
%33 = trunc i32 %32 to i8
%34 = load i8*, i8** %4
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @rop3_245_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = or i8 %5, %2
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %4, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app_init();
int /*<<< orphan*/ buf_destroy();
int /*<<< orphan*/ buf_init();
int /*<<< orphan*/ test_buf_put_buf_get();
int main(int argc, char *argv[]) {
  app_init();
  buf_init();
  test_buf_put_buf_get();
  buf_destroy();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <app_init@plt>
mov    $0x0,%al
call   1050 <buf_init@plt>
mov    $0x0,%al
call   1030 <test_buf_put_buf_get@plt>
mov    $0x0,%al
call   1060 <buf_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <app_init@plt>
xor    %eax,%eax
call   1050 <buf_init@plt>
xor    %eax,%eax
call   1030 <test_buf_put_buf_get@plt>
xor    %eax,%eax
call   1060 <buf_destroy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @app_init()
%7 = call i32 (...) @buf_init()
%8 = call i32 (...) @test_buf_put_buf_get()
%9 = call i32 (...) @buf_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @app_init()
%4 = tail call i32 (...) @buf_init()
%5 = tail call i32 (...) @test_buf_put_buf_get()
%6 = tail call i32 (...) @buf_destroy()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_IteratorSyntaxArgumentMustBindToInOutParameter(long p_position) {
  _Error(p_position, "'iterator' syntax argument must bind to inout parameter");
}


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

x86 assembly (clang, -O2):
<Error_IteratorSyntaxArgumentMustBindToInOutParameter>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"'iterator' syntax argument must bind to inout parameter\00"
define void @Error_IteratorSyntaxArgumentMustBindToInOutParameter(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"'iterator' syntax argument must bind to inout parameter\00"
define void @Error_IteratorSyntaxArgumentMustBindToInOutParameter(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int syscall(int /*<<< orphan*/);
int PerfxLog_GetThread(void) { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<PerfxLog_GetThread>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PerfxLog_GetThread>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @PerfxLog_GetThread() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @PerfxLog_GetThread() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fabs_() {
  put8(0xD9);
  put8(0xE1);
}


x86 assembly (clang, -O0):
<fabs_>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <put8@plt>
mov    $0xe1,%edi
call   1030 <put8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs_>:
push   %rax
mov    $0xd9,%edi
call   1030 <put8@plt>
mov    $0xe1,%edi
pop    %rax
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fabs_() {
%1 = call i32 @put8(i32 217)
%2 = call i32 @put8(i32 225)
ret void
}

LLVM IR (-O2):
define void @fabs_() {
%1 = tail call i32 @put8(i32 217)
%2 = tail call i32 @put8(i32 225)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sex();
void sextend(int byte) {
  if (byte)
    sex();
}


x86 assembly (clang, -O0):
<sextend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <sextend+0x1c>
mov    $0x0,%al
call   1030 <sex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sextend>:
test   %edi,%edi
je     111b <sextend+0xb>
xor    %eax,%eax
jmp    1030 <sex@plt>
ret

LLVM IR (-O0):
define void @sextend(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 %7
5: ; preds = %1
%6 = call i32 (...) @sex()
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @sextend(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @sex()
br label %5
5: ; preds = %3, %1
ret void
}
void phasefield_initialize() {
  long i, j, z;
  double r;
}


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

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

LLVM IR (-O0):
define void @phasefield_initialize() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca double
ret void
}

LLVM IR (-O2):
define void @phasefield_initialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 42;
  assert(x == 42);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 42
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xbutton_display(void *_p, void *_v) {
  ((XEvent *)_p)->xbutton.display = (Display *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XEvent_xbutton_display(i8* %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 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xbutton_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(unsigned char *, char *);
int ParseContainerMode(unsigned char *arg) {
  if (strcasecmp(arg, "MPEG2-TS") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ParseContainerMode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1142 <ParseContainerMode+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <ParseContainerMode+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"MPEG2-TS\00"
define i32 @ParseContainerMode(i8* nocapture %0) {
%2 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}