xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ __le16;

/* Variables and functions */
unsigned int le16_to_cpu(int /*<<< orphan*/);
unsigned nilfs_rec_len_from_disk(__le16 dlen) {
  unsigned len = le16_to_cpu(dlen);
  if (len == ((1 << 16) - 1))
    return 1 << 16;
  return len;
}


x86 assembly (clang, -O0):
<nilfs_rec_len_from_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <le16_to_cpu@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffff,-0xc(%rbp)
jne    113f <nilfs_rec_len_from_disk+0x2f>
movl   $0x10000,-0x4(%rbp)
jmp    1145 <nilfs_rec_len_from_disk+0x35>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nilfs_rec_len_from_disk>:
push   %rax
call   1030 <le16_to_cpu@plt>
cmp    $0xffff,%eax
mov    $0x10000,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @nilfs_rec_len_from_disk(i32 %0) {
%2 = tail call i32 @le16_to_cpu(i32 %0)
%3 = icmp eq i32 %2, 65535
%4 = select i1 %3, i32 65536, i32 %2
ret i32 %4
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_event_source_get_io_fd(void *s) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_source_get_io_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_event_source_get_io_fd>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_source_get_io_fd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_source_get_io_fd(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
void band_negative_constant_Good() {
  char a[1];
  int x = (-3) & (-2);
  a[x + 4] = 0;
}


x86 assembly (clang, -O0):
<band_negative_constant_Good>:
push   %rbp
mov    %rsp,%rbp
movl   $0xfffffffc,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
cltq
movb   $0x0,-0x1(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @band_negative_constant_Good() {
%1 = alloca [1 x i8]
%2 = alloca i32
store i32 -4, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 4
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 %5
store i8 0, i8* %6
ret void
}

LLVM IR (-O2):
define void @band_negative_constant_Good() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
__attribute__((__weak__, __always___)) void softboundmpx_rewind(FILE *stream) {
  rewind(stream);
}


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

x86 assembly (clang, -O2):
<softboundmpx_rewind>:
jmp    1030 <rewind@plt>

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

LLVM IR (-O2):
define weak void @softboundmpx_rewind(i32* %0) {
%2 = tail call i32 @rewind(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Usage: change_max_size_fifo <command> filename [new_capacity]\n"
         "    Where:\n"
         "      command can be set or get\n"
         "      set needs the new_capacity argument.\n");
}


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

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

LLVM IR (-O0):
@.str = [149 x i8] c"Usage: change_max_size_fifo <command> filename [new_capacity]\0A Where:\0A command can be set or get\0A set needs the new_capacity argument.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([149 x i8], [149 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [148 x i8] c"Usage: change_max_size_fifo <command> filename [new_capacity]\0A Where:\0A command can be set or get\0A set needs the new_capacity argument.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([148 x i8], [148 x i8]* @str, i64 0, i64 0))
ret void
}
void _setup(void) {}


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

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

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

LLVM IR (-O2):
define void @_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _who_error(char const *message, int ret) {
  fputs("who"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_who_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_who_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"who: \00"
@stderr = global i32 0
define i32 @_who_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"who: \00"
@stderr = global i32 0
define i32 @_who_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
/* Variables and functions */
unsigned int __tzcnt_u32(unsigned int);
unsigned int func_tzcnt32(unsigned int X) { return __tzcnt_u32(X); }


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

x86 assembly (clang, -O2):
<func_tzcnt32>:
jmp    1030 <__tzcnt_u32@plt>

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

LLVM IR (-O2):
define i32 @func_tzcnt32(i32 %0) {
%2 = tail call i32 @__tzcnt_u32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int do_smbus_read_byte(int, unsigned int, unsigned int);
int smbus_read_byte(unsigned device, unsigned address) {
  return do_smbus_read_byte(0x1000, device, address);
}


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

x86 assembly (clang, -O2):
<smbus_read_byte>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1000,%edi
jmp    1030 <do_smbus_read_byte@plt>

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

LLVM IR (-O2):
define i32 @smbus_read_byte(i32 %0, i32 %1) {
%3 = tail call i32 @do_smbus_read_byte(i32 4096, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ heapify(int *, int, int);
void buildHeap(int a[], int n) {
  int i;
  for (i = n / 2 - 1; i >= 0; i--) {
    heapify(a, n, i);
  }
}


x86 assembly (clang, -O0):
<buildHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <buildHeap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <buildHeap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildHeap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%esi
jl     1145 <buildHeap+0x35>
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%ebx
shr    %ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbx),%edx
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <heapify@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <buildHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @buildHeap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = call i32 @heapify(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @buildHeap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = lshr i32 %1, 1
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %5, %4 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @heapify(i32* %0, i32 %1, i32 %8)
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
void close_func(void *state) { getchar(); }


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

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

LLVM IR (-O0):
define void @close_func(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
define void @close_func(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @getchar()
ret void
}
/* Type definitions */
struct page {
  int dummy;
};

/* Variables and functions */
void *lowmem_page_address(struct page *);
__attribute__((always_)) void *kmap(struct page *page) {
  do {
    do {
    } while (0);
  } while (0);
  return lowmem_page_address(page);
}


x86 assembly (clang, -O0):
<kmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1121 <kmap+0x11>
jmp    1126 <kmap+0x16>
jmp    112b <kmap+0x1b>
mov    -0x8(%rbp),%rdi
call   1030 <lowmem_page_address@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmap>:
jmp    1030 <lowmem_page_address@plt>

LLVM IR (-O0):
%struct.page = type { i32 }
define i8* @kmap(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
%7 = load %struct.page*, %struct.page** %2
%8 = call i8* @lowmem_page_address(%struct.page* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.page = type { i32 }
define i8* @kmap(%struct.page* %0) {
%2 = tail call i8* @lowmem_page_address(%struct.page* %0)
ret i8* %2
}
void audio_get_cards() {}


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

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

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

LLVM IR (-O2):
define void @audio_get_cards() {
ret void
}
int test_isAsciiDigit(int x) { return (0x30 <= x) && (x <= 0x39); }


x86 assembly (clang, -O0):
<test_isAsciiDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <test_isAsciiDigit+0x24>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isAsciiDigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @test_isAsciiDigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test_isAsciiDigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int cift_sayi(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sonuc_yazdir(int);
int main() {
  int sayi;
  printf("Bir sayi giriniz: ");
  scanf("%d", &sayi);
  int sonuc;
  sonuc = cift_sayi(sayi);
  sonuc_yazdir(sonuc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <cift_sayi@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <sonuc_yazdir@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <cift_sayi@plt>
mov    %eax,%edi
call   1030 <sonuc_yazdir@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Bir sayi giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @cift_sayi(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @sonuc_yazdir(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Bir sayi giriniz: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @cift_sayi(i32 %5)
%7 = call i32 @sonuc_yazdir(i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void test() { fprintf(stderr, "testing\n"); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"testing\0A\00"
define void @test() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"testing\0A\00"
define void @test() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
void b_ethernet_tx(void *mem, unsigned long len) {
  asm volatile("call *0x00100060" : : "S"(mem), "c"(len));
}


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

x86 assembly (clang, -O2):
<b_ethernet_tx>:
mov    %rsi,%rcx
mov    %rdi,%rsi
call   *0x100060
ret

LLVM IR (-O0):
define void @b_ethernet_tx(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
ret void
}

LLVM IR (-O2):
define void @b_ethernet_tx(i8* %0, i64 %1) {
tail call void asm sideeffect "call *0x00100060", "{si},{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i64 %1)
ret void
}
int do_931() { return 931; }


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

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

LLVM IR (-O0):
define i32 @do_931() {
ret i32 931
}

LLVM IR (-O2):
define i32 @do_931() {
ret i32 931
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void debug_print_info(FILE *fd, const char *mode) {
  fprintf(fd, "[%.7s]", mode);
}


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

x86 assembly (clang, -O2):
<debug_print_info>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"[%.7s]\00"
define void @debug_print_info(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 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"[%.7s]\00"
define void @debug_print_info(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ gcc_cant_inline_me(int);
scalar_t__ malloc(int);
int main() {
  int *x, y;
  x = (int *)malloc(sizeof(int));
  y = *x == 173;
  if (gcc_cant_inline_me(y)) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xad,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <gcc_cant_inline_me@plt>
cmp    $0x0,%rax
je     1169 <main+0x49>
jmp    1169 <main+0x49>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
xor    %edi,%edi
cmpl   $0xad,(%rax)
sete   %dil
call   1030 <gcc_cant_inline_me@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 173
%5 = zext i1 %4 to i32
%6 = tail call i64 @gcc_cant_inline_me(i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGHUP;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ sig_catch(int /*<<< orphan*/, int /*<<< orphan*/);
void sig_hangupdefault() { sig_catch(SIGHUP, SIG_DFL); }


x86 assembly (clang, -O0):
<sig_hangupdefault>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <sig_catch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_hangupdefault>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sig_catch@plt>

LLVM IR (-O0):
@SIGHUP = global i32 0
@SIG_DFL = global i32 0
define void @sig_hangupdefault() {
%1 = load i32, i32* @SIGHUP
%2 = load i32, i32* @SIG_DFL
%3 = call i32 @sig_catch(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGHUP = global i32 0
@SIG_DFL = global i32 0
define void @sig_hangupdefault() {
%1 = load i32, i32* @SIGHUP
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @sig_catch(i32 %1, i32 %2)
ret void
}
int SDL_imageFilterMultDivby2MMX(unsigned char *Src1, unsigned char *Src2,
                                 unsigned char *Dest, int length) {
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @SDL_imageFilterMultDivby2MMX(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @SDL_imageFilterMultDivby2MMX(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 0
}
void JmpZ() {}


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

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

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

LLVM IR (-O2):
define void @JmpZ() {
ret void
}
void task_semaphore_cteate(void) {}


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

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

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

LLVM IR (-O2):
define void @task_semaphore_cteate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo();
int main(void) {
  if (foo() == -42)
    exit(0);
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <foo@plt>
cmp    $0xffffffd6,%eax
jne    1156 <main+0x26>
xor    %edi,%edi
call   1050 <exit@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0xffffffd6,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = icmp eq i32 %2, -42
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = icmp eq i32 %1, -42
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @exit(i32 0)
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ keyedit_trap_exit(int);
void op_keyexit() { keyedit_trap_exit(1); }


x86 assembly (clang, -O0):
<op_keyexit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <keyedit_trap_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_keyexit>:
mov    $0x1,%edi
jmp    1030 <keyedit_trap_exit@plt>

LLVM IR (-O0):
define void @op_keyexit() {
%1 = call i32 @keyedit_trap_exit(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_keyexit() {
%1 = tail call i32 @keyedit_trap_exit(i32 1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_copy_start_dobldobl_solution_to_container(int k, int i) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(598, &k, &i, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_start_dobldobl_solution_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x256,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_start_dobldobl_solution_to_container>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x256,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @celcon_copy_start_dobldobl_solution_to_container(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @_ada_use_c2phc4c(i32 598, i32* %3, i32* %4, double* undef, i32 0)
ret i32 %5
}
/* Type definitions */
struct hmm_multi_s {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int read_trans_prior_files(int nr_priorfiles, void *emission_priorsp,
                           struct hmm_multi_s *hmmp, FILE *file) {
  char s[2048];
  if (fgets(s, 2048, file) != NULL) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<read_trans_prior_files>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    $0x800,%esi
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     114e <read_trans_prior_files+0x3e>
jmp    114e <read_trans_prior_files+0x3e>
xor    %eax,%eax
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_trans_prior_files>:
sub    $0x808,%rsp
mov    %rsp,%rdi
mov    $0x800,%esi
mov    %rcx,%rdx
call   1030 <fgets@plt>
xor    %eax,%eax
add    $0x808,%rsp
ret

LLVM IR (-O0):
%struct.hmm_multi_s = type { i32 }
define i32 @read_trans_prior_files(i32 %0, i8* %1, %struct.hmm_multi_s* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca %struct.hmm_multi_s*
%8 = alloca i32*
%9 = alloca [2048 x i8]
store i32 %0, i32* %5
store i8* %1, i8** %6
store %struct.hmm_multi_s* %2, %struct.hmm_multi_s** %7
store i32* %3, i32** %8
%10 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%11 = load i32*, i32** %8
%12 = call i32* @fgets(i8* %10, i32 2048, i32* %11)
%13 = icmp ne i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %4
br label %15
15: ; preds = %14, %4
ret i32 0
}

LLVM IR (-O2):
%struct.hmm_multi_s = type { i32 }
define i32 @read_trans_prior_files(i32 %0, i8* nocapture readnone %1, %struct.hmm_multi_s* nocapture readnone %2, i32* nocapture %3) {
%5 = alloca [2048 x i8]
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %5, i64 0, i64 0
%7 = call i32* @fgets(i8* %6, i32 2048, i32* %3)
ret i32 0
}
/* Variables and functions */
int abs(int);
int BLSCheck(int *dBuf, int dbPtr, int *maxder) {
  int max, min, maxt, mint, t, x;
  max = min = 0;
  return (0);
  for (t = 0; t < ((int)(220 / (5) + 0.5)); ++t) {
    x = dBuf[dbPtr];
    if (x > max) {
      maxt = t;
      max = x;
    } else if (x < min) {
      mint = t;
      min = x;
    }
    if (++dbPtr ==
        ((int)(17)) +
            (int)(((double)((int)(3)) / 2) + ((double)(12) / 2 - 1) +
                  (((double)((int)(26)) - 1) / 2) + ((int)(200 / (5) + 0.5))) +
            ((int)(100 / (5) + 0.5)))
      dbPtr = 0;
  }
  *maxder = max;
  min = -min;
  if ((max > (min >> 3)) && (min > (max >> 3)) &&
      (abs(maxt - mint) < ((int)(150 / (5) + 0.5))))
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<BLSCheck>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @BLSCheck(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
store i32 0, i32* %8
store i32 0, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @BLSCheck(i32* nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
char *_regname(long);
int /*<<< orphan*/ myprint(char *, char *);
int /*<<< orphan*/ pad_to(int);
void decode_monadic_op(long int op_code, char *instruction) {
  myprint("%s", instruction);
  pad_to(10);
  myprint("%s", _regname((op_code >> 16) & 0x1f));
  return;
}


x86 assembly (clang, -O0):
<decode_monadic_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <myprint@plt>
mov    $0xa,%edi
call   1050 <pad_to@plt>
mov    -0x8(%rbp),%rdi
sar    $0x10,%rdi
and    $0x1f,%rdi
call   1040 <_regname@plt>
mov    %rax,%rsi
lea    0xe8b(%rip),%rdi
call   1030 <myprint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_monadic_op>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%r14
mov    %r14,%rdi
call   1030 <myprint@plt>
mov    $0xa,%edi
call   1050 <pad_to@plt>
shr    $0x10,%ebx
and    $0x1f,%ebx
mov    %rbx,%rdi
call   1040 <_regname@plt>
mov    %r14,%rdi
mov    %rax,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <myprint@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @decode_monadic_op(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @pad_to(i32 10)
%8 = load i64, i64* %3
%9 = ashr i64 %8, 16
%10 = and i64 %9, 31
%11 = call i8* @_regname(i64 %10)
%12 = call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @decode_monadic_op(i64 %0, i8* %1) {
%3 = tail call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @pad_to(i32 10)
%5 = lshr i64 %0, 16
%6 = and i64 %5, 31
%7 = tail call i8* @_regname(i64 %6)
%8 = tail call i32 @myprint(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int somaN(int, int);
main() {
  printf("A soma dos numero entre 10 e 5 eh: %d\n", somaN(5, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
mov    $0xa,%esi
call   1040 <somaN@plt>
mov    %eax,%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [39 x i8] c"A soma dos numero entre 10 e 5 eh: %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @somaN(i32 5, i32 10)
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"A soma dos numero entre 10 e 5 eh: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @somaN(i32 5, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int jep_socket_init() {
  int result = 0;
  return result;
}


x86 assembly (clang, -O0):
<jep_socket_init>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @jep_socket_init() {
ret i32 0
}
/* Variables and functions */
int strncasecmp(char const *, char const *, size_t);
int strncmpi(const char *a, const char *b, size_t count) {
  return strncasecmp(a, b, count);
}


x86 assembly (clang, -O0):
<strncmpi>:
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    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmpi>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @strncmpi(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;
typedef int __u32;

/* Variables and functions */
void __put_unaligned_2_be(__u32 __v, register __u8 *__p) {
  *__p++ = __v >> 8;
  *__p++ = __v;
}


x86 assembly (clang, -O0):
<__put_unaligned_2_be>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__put_unaligned_2_be>:
mov    %edi,%eax
sar    $0x8,%eax
mov    %eax,(%rsi)
mov    %edi,0x4(%rsi)
ret

LLVM IR (-O0):
define void @__put_unaligned_2_be(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 8
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i32 1
store i32* %8, i32** %4
store i32 %6, i32* %7
%9 = load i32, i32* %3
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i32 1
store i32* %11, i32** %4
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_2_be(i32 %0, i32* nocapture writeonly %1) {
%3 = ashr i32 %0, 8
%4 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %3, i32* %1
store i32 %0, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_docstrings();
int /*<<< orphan*/ test_invalid();
int /*<<< orphan*/ test_method_name();
int /*<<< orphan*/ test_name();
int /*<<< orphan*/ test_writer();
int main(void) {
  test_invalid();
  test_method_name();
  test_name();
  test_docstrings();
  test_writer();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_invalid@plt>
mov    $0x0,%al
call   1030 <test_method_name@plt>
mov    $0x0,%al
call   1040 <test_name@plt>
mov    $0x0,%al
call   1070 <test_docstrings@plt>
mov    $0x0,%al
call   1050 <test_writer@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_invalid@plt>
xor    %eax,%eax
call   1030 <test_method_name@plt>
xor    %eax,%eax
call   1040 <test_name@plt>
xor    %eax,%eax
call   1070 <test_docstrings@plt>
xor    %eax,%eax
call   1050 <test_writer@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_invalid()
%3 = call i32 (...) @test_method_name()
%4 = call i32 (...) @test_name()
%5 = call i32 (...) @test_docstrings()
%6 = call i32 (...) @test_writer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_invalid()
%2 = tail call i32 (...) @test_method_name()
%3 = tail call i32 (...) @test_name()
%4 = tail call i32 (...) @test_docstrings()
%5 = tail call i32 (...) @test_writer()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void destroy_bitset(void *bitset) { free(bitset); }


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

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

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

LLVM IR (-O2):
define void @destroy_bitset(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("+---------------+\n");
  printf("| Hello, world! |\n");
  printf("+---------------+\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xefa(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"+---------------+\0A\00"
@.str.1 = [19 x i8] c"| Hello, world! |\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str.2 = [18 x i8] c"| Hello, world! |\00"
@str.3 = [18 x i8] c"+---------------+\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int f_exist(char *fname) {
  struct stat sb;
  return (stat(fname, &sb) == 0);
}


x86 assembly (clang, -O0):
<f_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_exist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @f_exist(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @f_exist(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void sfe_ipv6_update_rule(struct sfe_connection_create *sic) { return; }


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

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

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

LLVM IR (-O2):
%struct.sfe_connection_create = type opaque
define void @sfe_ipv6_update_rule(%struct.sfe_connection_create* nocapture %0) {
ret void
}
double log2(double x) {}


x86 assembly (clang, -O0):
<log2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_toggle_tool_button_new() {
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_disassoc(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x00A0);
}


x86 assembly (clang, -O0):
<ieee80211_is_disassoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xa0,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ieee80211_is_disassoc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 160)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_disassoc(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 160)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int nleaders(v)
struct vars *v;
{
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.vars = type opaque
define i32 @nleaders(%struct.vars* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int r;
  scanf("%i", &r);
  printf("VOLUME = %.3lf\n", (double)((4.0 / 3.0) * 3.14159 * (r * r * r)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
imul   %eax,%ecx
imul   %eax,%ecx
cvtsi2sd %ecx,%xmm0
mulsd  0xeb6(%rip),%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to double
%10 = fmul double 0x4010C1514ABD0449, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [16 x i8] c"VOLUME = %.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = sitofp i32 %6 to double
%8 = fmul double %7, 0x4010C1514ABD0449
%9 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}