xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
char getchar();
void Flush_Input() {
  int ch = 0;
  while ((ch = getchar() != '\n' && ch != EOF))
    ;
}


x86 assembly (clang, -O0):
<Flush_Input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x5(%rbp)
je     1149 <Flush_Input+0x39>
mov    -0x4(%rbp),%eax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x4(%rbp)
test   $0x1,%al
jne    1164 <Flush_Input+0x54>
jmp    1169 <Flush_Input+0x59>
jmp    111f <Flush_Input+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Flush_Input>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     1140 <Flush_Input+0x30>
mov    0x2ec5(%rip),%rbx
cmpl   $0x0,(%rbx)
je     1140 <Flush_Input+0x30>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     1140 <Flush_Input+0x30>
cmpl   $0x1,(%rbx)
jne    1130 <Flush_Input+0x20>
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @Flush_Input() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %13, %0
%3 = call signext i8 (...) @getchar()
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load i32, i32* %1
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br label %10
10: ; preds = %6, %2
%11 = phi i1 [ false, %2 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
store i32 %12, i32* %1
br i1 %11, label %13, label %14
13: ; preds = %10
br label %2
14: ; preds = %10
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @Flush_Input() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp ne i8 %1, 10
%3 = load i32, i32* @EOF
%4 = icmp ne i32 %3, 0
%5 = select i1 %2, i1 %4, i1 false
br i1 %5, label %6, label %12
6: ; preds = %0, %6
%7 = tail call signext i8 (...) @getchar()
%8 = icmp ne i8 %7, 10
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %9, 1
%11 = select i1 %8, i1 %10, i1 false
br i1 %11, label %6, label %12
12: ; preds = %6, %0
ret void
}
void RTZipGzipDecompressIoStream(void) {}


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

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

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

LLVM IR (-O2):
define void @RTZipGzipDecompressIoStream() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IOPi_init(int, int);
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  setvbuf(stdout, NULL, _IONBF, 0);
  printf("Logic output Started \n");
  IOPi_init(0x20, 1);
  printf("Logic output Ended \n");
  (void)argc;
  (void)argv;
  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    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    $0x20,%edi
mov    $0x1,%esi
call   1050 <IOPi_init@plt>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    $0x20,%edi
mov    $0x1,%esi
call   1050 <IOPi_init@plt>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
@.str = [23 x i8] c"Logic output Started \0A\00"
@.str.1 = [21 x i8] c"Logic output Ended \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = load i32, i32* @_IONBF
%8 = call i32 @setvbuf(i32 %6, i32* null, i32 %7, i32 0)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @IOPi_init(i32 32, i32 1)
%11 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
@str = [22 x i8] c"Logic output Started \00"
@str.2 = [20 x i8] c"Logic output Ended \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = load i32, i32* @_IONBF
%5 = tail call i32 @setvbuf(i32 %3, i32* null, i32 %4, i32 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @IOPi_init(i32 32, i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _mm_free(void *);
void free_mem(void *mem) { _mm_free(mem); }


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

x86 assembly (clang, -O2):
<free_mem>:
jmp    1030 <_mm_free@plt>

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

LLVM IR (-O2):
define void @free_mem(i8* %0) {
%2 = tail call i32 @_mm_free(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ bar();
int foo(int x) {
  int a = -100;
  int b = 2;
  while (b) {
    if (x)
      a += 3;
    else
      a += bar();
    b += a;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0xffffff9c,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     116d <foo+0x5d>
cmpl   $0x0,-0x8(%rbp)
je     114b <foo+0x3b>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0xc(%rbp)
jmp    115f <foo+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <foo+0x19>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0xffffff9c,%ebp
mov    $0x2,%ebx
jmp    1136 <foo+0x26>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %eax,%ebp
add    %ebp,%ebx
je     1149 <foo+0x39>
mov    $0x3,%eax
test   %r14d,%r14d
jne    1130 <foo+0x20>
xor    %eax,%eax
call   1030 <bar@plt>
jmp    1130 <foo+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp eq i32 %0, 0
br label %3
3: ; preds = %1, %9
%4 = phi i32 [ 2, %1 ], [ %12, %9 ]
%5 = phi i32 [ -100, %1 ], [ %11, %9 ]
br i1 %2, label %6, label %9
6: ; preds = %3
%7 = tail call i64 (...) @bar()
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %3, %6
%10 = phi i32 [ %8, %6 ], [ 3, %3 ]
%11 = add i32 %5, %10
%12 = add nsw i32 %11, %4
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %3
14: ; preds = %9
ret i32 undef
}
/* Variables and functions */
void *lp_cod_huff(void *, size_t *, int);
void *lp_cod_huf4(void *data, size_t *data_sz) {
  return lp_cod_huff(data, data_sz, 4);
}


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

x86 assembly (clang, -O2):
<lp_cod_huf4>:
mov    $0x4,%edx
jmp    1030 <lp_cod_huff@plt>

LLVM IR (-O0):
define i8* @lp_cod_huf4(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 = load i64*, i64** %4
%7 = call i8* @lp_cod_huff(i8* %5, i64* %6, i32 4)
ret i8* %7
}

LLVM IR (-O2):
define i8* @lp_cod_huf4(i8* %0, i64* %1) {
%3 = tail call i8* @lp_cod_huff(i8* %0, i64* %1, i32 4)
ret i8* %3
}
int drop_spaces(char const *s) {
  int i;
  i = 0;
  while ((s[i] >= 9 && s[i] <= 13) || s[i] == 32)
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<drop_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
jl     113e <drop_spaces+0x3e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0xd(%rbp)
jle    1153 <drop_spaces+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1163 <drop_spaces+0x63>
jmp    1171 <drop_spaces+0x71>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <drop_spaces+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_spaces>:
xor    %eax,%eax
jmp    1114 <drop_spaces+0x14>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rax
movzbl (%rdi,%rax,1),%ecx
lea    -0x9(%rcx),%edx
cmp    $0x5,%dl
jb     1110 <drop_spaces+0x10>
cmp    $0x20,%cl
je     1110 <drop_spaces+0x10>
ret

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

LLVM IR (-O2):
define i32 @drop_spaces(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 13, label %6
i8 12, label %6
i8 11, label %6
i8 10, label %6
i8 9, label %6
]
6: ; preds = %2, %2, %2, %2, %2, %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void vx_info_exit_cacct(struct _vx_cacct *cacct) { return; }


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

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

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

LLVM IR (-O2):
%struct._vx_cacct = type opaque
define void @vx_info_exit_cacct(%struct._vx_cacct* nocapture %0) {
ret void
}
int sleeptimer_system_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sleeptimer_system_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dsfmt_gv_fill_array_close_open(double *, int);
void fill_array_close_open(double array[], int size) {
  dsfmt_gv_fill_array_close_open(array, size);
}


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

x86 assembly (clang, -O2):
<fill_array_close_open>:
jmp    1030 <dsfmt_gv_fill_array_close_open@plt>

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

LLVM IR (-O2):
define void @fill_array_close_open(double* %0, i32 %1) {
%3 = tail call i32 @dsfmt_gv_fill_array_close_open(double* %0, i32 %1)
ret void
}
int color_offset_f1(int x, int y) {
  return ((y << 10) - (((x << 10) * 164) / 151) + (8 << 10)) >> 10;
}


x86 assembly (clang, -O0):
<color_offset_f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0xa4,%eax,%eax
mov    $0x97,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
add    $0x2000,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f1>:
shl    $0xa,%esi
imul   $0x29000,%edi,%eax
cltq
imul   $0xffffffffc9bf937f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
add    %esi,%eax
add    $0x2000,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f1(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 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 164
%10 = sdiv i32 %9, 151
%11 = sub nsw i32 %6, %10
%12 = add nsw i32 %11, 8192
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f1(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 167936
%5 = sdiv i32 %4, -151
%6 = add i32 %3, 8192
%7 = add i32 %6, %5
%8 = ashr i32 %7, 10
ret i32 %8
}
void cpu_lidt(void *idt) { __asm__ __volatile__("lidt (%0)" : : "r"(idt)); }


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

x86 assembly (clang, -O2):
<cpu_lidt>:
lidt   (%rdi)
ret

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

LLVM IR (-O2):
define void @cpu_lidt(i8* %0) {
tail call void asm sideeffect "lidt ($0)", "r,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRA3_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRA3_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMRA3_swap(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 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRA3_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void outerr(s, p) char *s, *p;
{
  char buf[80];
  sprintf(buf, s, p);
  write(2, buf, (unsigned)strlen(buf));
}


x86 assembly (clang, -O0):
<outerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1050 <sprintf@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x68(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <write@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outerr>:
push   %rbx
sub    $0x50,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <write@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @outerr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [80 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i64 0, i64 0
%12 = call i64 @strlen(i8* %11)
%13 = trunc i64 %12 to i32
%14 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %10, i32 %13)
ret void
}

LLVM IR (-O2):
define void @outerr(i8* nocapture %0, i8* %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) %0, i8* %1)
%6 = call i64 @strlen(i8* %4)
%7 = trunc i64 %6 to i32
%8 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %4, i32 %7)
ret void
}
/* Type definitions */
struct inode {
  int dummy;
};
struct file {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cleanup_current_dev();
int /*<<< orphan*/ fastrpc_release_current_dsp_process();
int fastrpc_device_release(struct inode *inode, struct file *file) {
  (void)fastrpc_release_current_dsp_process();
  cleanup_current_dev();
  return 0;
}


x86 assembly (clang, -O0):
<fastrpc_device_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <fastrpc_release_current_dsp_process@plt>
mov    $0x0,%al
call   1040 <cleanup_current_dev@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastrpc_device_release>:
push   %rax
xor    %eax,%eax
call   1030 <fastrpc_release_current_dsp_process@plt>
xor    %eax,%eax
call   1040 <cleanup_current_dev@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.file = type { i32 }
define i32 @fastrpc_device_release(%struct.inode* %0, %struct.file* %1) {
%3 = alloca %struct.inode*
%4 = alloca %struct.file*
store %struct.inode* %0, %struct.inode** %3
store %struct.file* %1, %struct.file** %4
%5 = call i32 (...) @fastrpc_release_current_dsp_process()
%6 = call i32 (...) @cleanup_current_dev()
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.file = type { i32 }
define i32 @fastrpc_device_release(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1) {
%3 = tail call i32 (...) @fastrpc_release_current_dsp_process()
%4 = tail call i32 (...) @cleanup_current_dev()
ret i32 0
}
short test_condition_add_numbers(short a, short b, short aReturned) {
  return ((a < 0) && (b < 0) && (aReturned > 0)) ||
         ((a > 0) && (b > 0) && (aReturned < 0));
}


x86 assembly (clang, -O0):
<test_condition_add_numbers>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jge    1145 <test_condition_add_numbers+0x45>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jge    1145 <test_condition_add_numbers+0x45>
movswl -0x6(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x7(%rbp)
jg     117c <test_condition_add_numbers+0x7c>
movswl -0x2(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x8(%rbp)
jle    1176 <test_condition_add_numbers+0x76>
movswl -0x4(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x8(%rbp)
jle    1176 <test_condition_add_numbers+0x76>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
setl   %al
mov    %al,-0x8(%rbp)
mov    -0x8(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_condition_add_numbers>:
test   %di,%si
jns    110f <test_condition_add_numbers+0xf>
mov    $0x1,%ax
test   %dx,%dx
jle    110f <test_condition_add_numbers+0xf>
ret
movzwl %dx,%eax
shr    $0xf,%eax
xor    %ecx,%ecx
test   %si,%si
cmovle %ecx,%eax
test   %di,%di
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define signext i16 @test_condition_add_numbers(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %3
%11 = load i16, i16* %5
%12 = sext i16 %11 to i32
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i16, i16* %6
%16 = sext i16 %15 to i32
%17 = icmp sgt i32 %16, 0
br i1 %17, label %32, label %18
18: ; preds = %14, %10, %3
%19 = load i16, i16* %4
%20 = sext i16 %19 to i32
%21 = icmp sgt i32 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %18
%23 = load i16, i16* %5
%24 = sext i16 %23 to i32
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i16, i16* %6
%28 = sext i16 %27 to i32
%29 = icmp slt i32 %28, 0
br label %30
30: ; preds = %26, %22, %18
%31 = phi i1 [ false, %22 ], [ false, %18 ], [ %29, %26 ]
br label %32
32: ; preds = %30, %14
%33 = phi i1 [ true, %14 ], [ %31, %30 ]
%34 = zext i1 %33 to i32
%35 = trunc i32 %34 to i16
ret i16 %35
}

LLVM IR (-O2):
define signext i16 @test_condition_add_numbers(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = and i16 %1, %0
%5 = icmp slt i16 %4, 0
%6 = icmp sgt i16 %2, 0
%7 = and i1 %5, %6
br i1 %7, label %14, label %8
8: ; preds = %3
%9 = icmp sgt i16 %0, 0
%10 = icmp sgt i16 %1, 0
%11 = and i1 %9, %10
%12 = lshr i16 %2, 15
%13 = select i1 %11, i16 %12, i16 0
br label %14
14: ; preds = %8, %3
%15 = phi i16 [ 1, %3 ], [ %13, %8 ]
ret i16 %15
}
/* Variables and functions */
int /*<<< orphan*/ vo_draw_alpha_yuy2_C(int, int, unsigned char *,
                                        unsigned char *, int, unsigned char *,
                                        int);
void vo_draw_alpha_yuy2(int w, int h, unsigned char *src, unsigned char *srca,
                        int srcstride, unsigned char *dstbase, int dststride) {
  vo_draw_alpha_yuy2_C(w, h, src, srca, srcstride, dstbase, dststride);
}


x86 assembly (clang, -O0):
<vo_draw_alpha_yuy2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <vo_draw_alpha_yuy2_C@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vo_draw_alpha_yuy2>:
jmp    1030 <vo_draw_alpha_yuy2_C@plt>

LLVM IR (-O0):
define void @vo_draw_alpha_yuy2(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i32, i32* %12
%20 = load i8*, i8** %13
%21 = load i32, i32* %14
%22 = call i32 @vo_draw_alpha_yuy2_C(i32 %15, i32 %16, i8* %17, i8* %18, i32 %19, i8* %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @vo_draw_alpha_yuy2(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6) {
%8 = tail call i32 @vo_draw_alpha_yuy2_C(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6)
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double doubletime() {
  struct timeval tim;
  gettimeofday(&tim, NULL);
  double t = tim.tv_sec + (tim.tv_usec / 1000000.0);
  return t;
}


x86 assembly (clang, -O0):
<doubletime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubletime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @doubletime() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
store double %9, double* %2
%10 = load double, double* %2
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @doubletime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
/* Variables and functions */
int msntp_close_socket(int /*<<< orphan*/);
int msntp_stop_server(void) { return msntp_close_socket(0); }


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

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

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

LLVM IR (-O2):
define i32 @msntp_stop_server() {
%1 = tail call i32 @msntp_close_socket(i32 0)
ret i32 %1
}
void get_installed_cmd(char **cmd) { *cmd = "dpkg --get-selections"; }


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"dpkg --get-selections\00"
define void @get_installed_cmd(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %3
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"dpkg --get-selections\00"
define void @get_installed_cmd(i8** nocapture writeonly %0) {
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XDestroyWindowEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XDestroyWindowEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XDestroyWindowEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XDestroyWindowEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XDestroyWindowEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XDestroyWindowEvent>:
test   %rdi,%rdi
je     112a <free_XDestroyWindowEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define void @free_XDestroyWindowEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *stbi__fopen(char const *filename, char const *mode) {
  FILE *f;
  f = fopen(filename, mode);
  return f;
}


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

x86 assembly (clang, -O2):
<stbi__fopen>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @stbi__fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ sigdelset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigfillset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigsuspend(int /*<<< orphan*/ *);
void c(void) {
  sigset_t ss;
  (void)sigfillset(&ss);
  (void)sigdelset(&ss, SIGINT);
  (void)sigsuspend(&ss);
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <sigfillset@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigdelset@plt>
lea    -0x4(%rbp),%rdi
call   1040 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <sigfillset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigdelset@plt>
mov    %rbx,%rdi
call   1040 <sigsuspend@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGINT = global i32 0
define void @c() {
%1 = alloca i32
%2 = call i32 @sigfillset(i32* %1)
%3 = load i32, i32* @SIGINT
%4 = call i32 @sigdelset(i32* %1, i32 %3)
%5 = call i32 @sigsuspend(i32* %1)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
define void @c() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigfillset(i32* %1)
%4 = load i32, i32* @SIGINT
%5 = call i32 @sigdelset(i32* %1, i32 %4)
%6 = call i32 @sigsuspend(i32* %1)
ret void
}
void lgtd_jsonrpc_send_response(struct lgtd_client *client, const char *msg) {
  (void)client;
  (void)msg;
}


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

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

LLVM IR (-O0):
%struct.lgtd_client = type opaque
define void @lgtd_jsonrpc_send_response(%struct.lgtd_client* %0, i8* %1) {
%3 = alloca %struct.lgtd_client*
%4 = alloca i8*
store %struct.lgtd_client* %0, %struct.lgtd_client** %3
store i8* %1, i8** %4
%5 = load %struct.lgtd_client*, %struct.lgtd_client** %3
%6 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
%struct.lgtd_client = type opaque
define void @lgtd_jsonrpc_send_response(%struct.lgtd_client* nocapture %0, i8* nocapture %1) {
ret void
}
unsigned xrop3_1_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk1 = D | stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_1_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_1_0_0>:
mov    %edi,%eax
or     %esi,%eax
not    %eax
shl    $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_1_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
%5 = xor i32 %4, -1
%6 = shl nsw i32 %5, 8
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pipe(int *);
void std_pipe(int filedes[2]) {
  if (pipe(filedes) == -1) {
    perror("pipe");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<std_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1164 <std_pipe+0x34>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<std_pipe>:
push   %rax
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
je     113d <std_pipe+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"pipe\00"
define void @std_pipe(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void(__attribute((interrupt_handler)) isr)() { foo(); }


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

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

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

LLVM IR (-O2):
define void @isr() {
%1 = tail call i32 (...) @foo()
ret void
}
/* Type definitions */
struct vsf_session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vsf_privop_do_file_chown(struct vsf_session *, int);
void vsf_one_process_chown_upload(struct vsf_session *p_sess, int fd) {
  vsf_privop_do_file_chown(p_sess, fd);
}


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

x86 assembly (clang, -O2):
<vsf_one_process_chown_upload>:
jmp    1030 <vsf_privop_do_file_chown@plt>

LLVM IR (-O0):
%struct.vsf_session = type { i32 }
define void @vsf_one_process_chown_upload(%struct.vsf_session* %0, i32 %1) {
%3 = alloca %struct.vsf_session*
%4 = alloca i32
store %struct.vsf_session* %0, %struct.vsf_session** %3
store i32 %1, i32* %4
%5 = load %struct.vsf_session*, %struct.vsf_session** %3
%6 = load i32, i32* %4
%7 = call i32 @vsf_privop_do_file_chown(%struct.vsf_session* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.vsf_session = type { i32 }
define void @vsf_one_process_chown_upload(%struct.vsf_session* %0, i32 %1) {
%3 = tail call i32 @vsf_privop_do_file_chown(%struct.vsf_session* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ion_readname_to_xy(char const *, int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int32_t ion_readname_to_rowcol(const char *readname, int32_t *row,
                               int32_t *col) {
  return ion_readname_to_xy(readname, col, row);
}


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

x86 assembly (clang, -O2):
<ion_readname_to_rowcol>:
mov    %rsi,%rax
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <ion_readname_to_xy@plt>

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

LLVM IR (-O2):
define i32 @ion_readname_to_rowcol(i8* %0, i32* %1, i32* %2) {
%4 = tail call i32 @ion_readname_to_xy(i8* %0, i32* %2, i32* %1)
ret i32 %4
}
void sdb_init_lago(void) { ; }


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

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

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

LLVM IR (-O2):
define void @sdb_init_lago() {
ret void
}
/* Variables and functions */
double sin(double);
double BackEaseIn(double p) {
  return p * p * p - p * sin(p * 3.14159265358979323846264338327);
}


x86 assembly (clang, -O0):
<BackEaseIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb8(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BackEaseIn>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @BackEaseIn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %8, 0x400921FB54442D18
%10 = call double @sin(double %9)
%11 = fmul double %7, %10
%12 = fneg double %11
%13 = call double @llvm.fmuladd.f64(double %5, double %6, double %12)
ret double %13
}

LLVM IR (-O2):
define double @BackEaseIn(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %0, 0x400921FB54442D18
%4 = tail call double @sin(double %3)
%5 = fneg double %4
%6 = fmul double %5, %0
%7 = tail call double @llvm.fmuladd.f64(double %2, double %0, double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void boxless_end_cpu(__attribute__((unused)) void *report_data) {
  printf("\n");
}


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

x86 assembly (clang, -O2):
<boxless_end_cpu>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @boxless_end_cpu(i8* nocapture readnone %0) {
%2 = tail call i32 @putchar(i32 10)
ret void
}
void free_trie(struct trienode *root) {}


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

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

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

LLVM IR (-O2):
%struct.trienode = type opaque
define void @free_trie(%struct.trienode* nocapture %0) {
ret void
}
int test_imm_EAint8_reg(signed char val) {
  return ((val) & (0xEA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xea,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EAint8_reg>:
test   $0xea,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EAint8_reg(i8 signext %0) {
%2 = and i8 %0, -22
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t z80_cb_d8_set_3(uint8_t value) { return value | 0x08; }


x86 assembly (clang, -O0):
<z80_cb_d8_set_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<z80_cb_d8_set_3>:
mov    %edi,%eax
or     $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @z80_cb_d8_set_3(i32 %0) {
%2 = or i32 %0, 8
ret i32 %2
}
/* Variables and functions */
scalar_t__ tolower(char);
int get_char_index(char c) {
  if (c == '\'') {
    return 26;
  }
  return (int)tolower(c) - 'a';
}


x86 assembly (clang, -O0):
<get_char_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x27,%eax
jne    1137 <get_char_index+0x27>
movl   $0x1a,-0x4(%rbp)
jmp    1146 <get_char_index+0x36>
movsbl -0x5(%rbp),%edi
call   1030 <tolower@plt>
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char_index>:
mov    $0x1a,%eax
cmp    $0x27,%dil
je     112c <get_char_index+0x1c>
push   %rax
movsbl %dil,%edi
call   1030 <tolower@plt>
add    $0xffffff9f,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @get_char_index(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 39
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 26, i32* %2
br label %13
8: ; preds = %1
%9 = load i8, i8* %3
%10 = call i64 @tolower(i8 signext %9)
%11 = trunc i64 %10 to i32
%12 = sub nsw i32 %11, 97
store i32 %12, i32* %2
br label %13
13: ; preds = %8, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_char_index(i8 signext %0) {
%2 = icmp eq i8 %0, 39
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @tolower(i8 signext %0)
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, -97
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 26, %1 ]
ret i32 %8
}
/* Type definitions */
struct tm {
  int tm_sec;
  int tm_min;
  int tm_hour;
};

/* Variables and functions */
int utc_seconds(const struct tm *tmx) {
  return tmx->tm_sec + (tmx->tm_min * 60) + (tmx->tm_hour * 3600);
}


x86 assembly (clang, -O0):
<utc_seconds>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
imul   $0x3c,0x4(%rcx),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
imul   $0xe10,0x8(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utc_seconds>:
imul   $0x3c,0x4(%rdi),%ecx
add    (%rdi),%ecx
imul   $0xe10,0x8(%rdi),%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define i32 @utc_seconds(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load %struct.tm*, %struct.tm** %2
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 1
%8 = load i32, i32* %7
%9 = mul nsw i32 %8, 60
%10 = add nsw i32 %5, %9
%11 = load %struct.tm*, %struct.tm** %2
%12 = getelementptr inbounds %struct.tm, %struct.tm* %11, i32 0, i32 2
%13 = load i32, i32* %12
%14 = mul nsw i32 %13, 3600
%15 = add nsw i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define i32 @utc_seconds(%struct.tm* nocapture %0) {
%2 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 1
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 60
%7 = add nsw i32 %6, %3
%8 = getelementptr inbounds %struct.tm, %struct.tm* %0, i64 0, i32 2
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 3600
%11 = add nsw i32 %7, %10
ret i32 %11
}