xunge/DecIR huggingface dataset:
/* Variables and functions */
long HTTP_GetServerVersion();
int /*<<< orphan*/ printf(char *, int, int, int);
void version(void) {
  long version = HTTP_GetServerVersion();
  printf("Webserver-Version %d.%d.%d\n", (int)((version >> 16) & 0xFF),
         (int)((version >> 8) & 0xFF), (int)(version & 0xFF));
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <HTTP_GetServerVersion@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x10,%rax
and    $0xff,%rax
mov    %eax,%esi
mov    -0x8(%rbp),%rax
sar    $0x8,%rax
and    $0xff,%rax
mov    %eax,%edx
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %eax,%ecx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rax
xor    %eax,%eax
call   1040 <HTTP_GetServerVersion@plt>
movzbl %ah,%edx
movzbl %al,%ecx
shr    $0x10,%eax
movzbl %al,%esi
lea    0xec5(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Webserver-Version %d.%d.%d\0A\00"
define void @version() {
%1 = alloca i64
%2 = call i64 (...) @HTTP_GetServerVersion()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = ashr i64 %3, 16
%5 = and i64 %4, 255
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %1
%8 = ashr i64 %7, 8
%9 = and i64 %8, 255
%10 = trunc i64 %9 to i32
%11 = load i64, i64* %1
%12 = and i64 %11, 255
%13 = trunc i64 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Webserver-Version %d.%d.%d\0A\00"
define void @version() {
%1 = tail call i64 (...) @HTTP_GetServerVersion()
%2 = trunc i64 %1 to i32
%3 = lshr i32 %2, 16
%4 = and i32 %3, 255
%5 = lshr i32 %2, 8
%6 = and i32 %5, 255
%7 = and i32 %2, 255
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %7)
ret void
}
int scm_i_sched_yield(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @scm_i_sched_yield() {
ret i32 0
}
void RTAvlHCPhysInsert(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlHCPhysInsert() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("#!/usr/local/bin/ruby -w\n");
  printf("\n");
  printf("puts \"Hello World!\"\n");
  printf("\n");
  printf("\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xedb(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"#!/usr/local/bin/ruby -w\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [21 x i8] c"puts \22Hello World!\22\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 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"#!/usr/local/bin/ruby -w\00"
@str.3 = [20 x i8] c"puts \22Hello World!\22\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
char *strdup(char *);
void strdupthem(void *string) {
  char **chars = (char **)string;
  *chars = strdup(*chars);
}


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

x86 assembly (clang, -O2):
<strdupthem>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <strdup@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @strdupthem(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i8* @strdup(i8* %7)
%9 = load i8**, i8*** %3
store i8* %8, i8** %9
ret void
}

LLVM IR (-O2):
define void @strdupthem(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i8* @strdup(i8* %3)
store i8* %4, i8** %2
ret void
}
/* Type definitions */
struct ac_buffer {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int _buffer_read(struct ac_buffer *, int /*<<< orphan*/ *, int);
int buffer_read_int64(struct ac_buffer *buffer, int64_t *value) {
  return _buffer_read(buffer, value, sizeof(int64_t));
}


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

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

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

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_read_int64(%struct.ac_buffer* %0, i32* %1) {
%3 = tail call i32 @_buffer_read(%struct.ac_buffer* %0, i32* %1, i32 4)
ret i32 %3
}
int func7() { return 1; }


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

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

LLVM IR (-O0):
define i32 @func7() {
ret i32 1
}

LLVM IR (-O2):
define i32 @func7() {
ret i32 1
}
int test_imm_3Aint8_mem(signed char *val) {
  return ((*val) & (-0x3A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Aint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffc6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Aint8_mem>:
testb  $0xc6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Aint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -58
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned char,
                           unsigned char, unsigned char);
char *ip2str(unsigned int v) {
  static char buf[255];
  unsigned char *p = (unsigned char *)&v;
  sprintf(buf, "%03d.%03d.%03d.%03d", p[0], p[1], p[2], p[3]);
  return buf;
}


x86 assembly (clang, -O0):
<ip2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%dl
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%r8b
mov    -0x10(%rbp),%rax
lea    0x2efd(%rip),%rdi
lea    0xeb6(%rip),%rsi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl 0x3(%rax),%r9d
call   1030 <sprintf@plt>
lea    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip2str>:
push   %rbx
mov    %edi,%ecx
mov    %edi,%esi
shr    $0x10,%esi
mov    %edi,%eax
shr    $0x18,%eax
movzbl %cl,%edx
movzbl %ch,%ecx
movzbl %sil,%r8d
lea    0x2f12(%rip),%rbx
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%r9d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ip2str.buf = internal global [255 x i8] zeroinitializer
@.str = [20 x i8] c"%03d.%03d.%03d.%03d\00"
define i8* @ip2str(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = bitcast i32* %2 to i8*
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 3
%16 = load i8, i8* %15
%17 = call i32 @sprintf(i8* getelementptr inbounds ([255 x i8], [255 x i8]* @ip2str.buf, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %7, i8 zeroext %10, i8 zeroext %13, i8 zeroext %16)
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @ip2str.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@ip2str.buf = internal global [255 x i8] zeroinitializer
@.str = [20 x i8] c"%03d.%03d.%03d.%03d\00"
define i8* @ip2str(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = lshr i32 %0, 8
%4 = trunc i32 %3 to i8
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
%7 = lshr i32 %0, 24
%8 = trunc i32 %7 to i8
%9 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([255 x i8], [255 x i8]* @ip2str.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %2, i8 zeroext %4, i8 zeroext %6, i8 zeroext %8)
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @ip2str.buf, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ exist_argument(char *);
int get_argument_int(char *);
int get_port() {
  int result = 8035;
  if (exist_argument("port")) {
    result = get_argument_int("port");
    if (result <= 0) {
      result = 8035;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<get_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1f63,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <exist_argument@plt>
cmp    $0x0,%rax
je     116a <get_port+0x4a>
lea    0xeb4(%rip),%rdi
call   1040 <get_argument_int@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1165 <get_port+0x45>
movl   $0x1f63,-0x4(%rbp)
jmp    116a <get_port+0x4a>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_port>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <exist_argument@plt>
test   %rax,%rax
je     114c <get_port+0x2c>
lea    0xec7(%rip),%rdi
call   1040 <get_argument_int@plt>
mov    %eax,%ecx
test   %eax,%eax
mov    $0x1f63,%eax
cmovg  %ecx,%eax
pop    %rcx
ret
mov    $0x1f63,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"port\00"
define i32 @get_port() {
%1 = alloca i32
store i32 8035, i32* %1
%2 = call i64 @exist_argument(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = call i32 @get_argument_int(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
store i32 8035, i32* %1
br label %9
9: ; preds = %8, %4
br label %10
10: ; preds = %9, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"port\00"
define i32 @get_port() {
%1 = tail call i64 @exist_argument(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 @get_argument_int(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp slt i32 %4, 1
%6 = select i1 %5, i32 8035, i32 %4
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ %6, %3 ], [ 8035, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ mem_updatemap_ibank();
int /*<<< orphan*/ mem_updatemap_rombank();
int /*<<< orphan*/ mem_updatemap_sbank();
int /*<<< orphan*/ mem_updatemap_vbank();
void mem_updatemap() {
  mem_updatemap_rombank();
  mem_updatemap_vbank();
  mem_updatemap_sbank();
  mem_updatemap_ibank();
}


x86 assembly (clang, -O0):
<mem_updatemap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <mem_updatemap_rombank@plt>
mov    $0x0,%al
call   1050 <mem_updatemap_vbank@plt>
mov    $0x0,%al
call   1040 <mem_updatemap_sbank@plt>
mov    $0x0,%al
call   1060 <mem_updatemap_ibank@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_updatemap>:
push   %rax
xor    %eax,%eax
call   1030 <mem_updatemap_rombank@plt>
xor    %eax,%eax
call   1050 <mem_updatemap_vbank@plt>
xor    %eax,%eax
call   1040 <mem_updatemap_sbank@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <mem_updatemap_ibank@plt>

LLVM IR (-O0):
define void @mem_updatemap() {
%1 = call i32 (...) @mem_updatemap_rombank()
%2 = call i32 (...) @mem_updatemap_vbank()
%3 = call i32 (...) @mem_updatemap_sbank()
%4 = call i32 (...) @mem_updatemap_ibank()
ret void
}

LLVM IR (-O2):
define void @mem_updatemap() {
%1 = tail call i32 (...) @mem_updatemap_rombank()
%2 = tail call i32 (...) @mem_updatemap_vbank()
%3 = tail call i32 (...) @mem_updatemap_sbank()
%4 = tail call i32 (...) @mem_updatemap_ibank()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("passage-c.c\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>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [12 x i8] c"passage-c.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_scalbf();
scalar_t__ scalbf(float, float);
void test_scalbf(float f1, float f2) {
  if (scalbf(f1, f2) != scalbf(f1, f2))
    link_failure_scalbf();
}


x86 assembly (clang, -O0):
<test_scalbf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <scalbf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <scalbf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_scalbf+0x4b>
mov    $0x0,%al
call   1030 <link_failure_scalbf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scalbf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x8(%rsp)
call   1040 <scalbf@plt>
mov    %rax,%rbx
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <scalbf@plt>
cmp    %rax,%rbx
jne    1155 <test_scalbf+0x35>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_scalbf@plt>

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

LLVM IR (-O2):
define void @test_scalbf(float %0, float %1) {
%3 = tail call i64 @scalbf(float %0, float %1)
%4 = tail call i64 @scalbf(float %0, float %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_scalbf()
br label %8
8: ; preds = %6, %2
ret void
}
unsigned char f63(unsigned char x, unsigned int y) {
  return (x << (8 * sizeof(unsigned char) - y)) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f63>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x8,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f63>:
mov    $0x8,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f63(i8 zeroext %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 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = sub i64 8, %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = load i32, i32* %4
%15 = ashr i32 %13, %14
%16 = xor i32 %11, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f63(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = sub i32 8, %1
%5 = shl i32 %3, %4
%6 = lshr i32 %3, %1
%7 = xor i32 %5, %6
%8 = trunc i32 %7 to i8
ret i8 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char *, int);
float unpack_float(char **value) {
  union floatint32 {
    float f;
    int32_t i;
  };
  union floatint32 result;
  memcpy(&(result.i), *value, sizeof(int32_t));
  result.i = htonl(result.i);
  *value += sizeof(int32_t);
  return result.f;
}


x86 assembly (clang, -O0):
<unpack_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x4,%rcx
mov    %rcx,(%rax)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_float>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0x8(%rsp),%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    0x8(%rsp),%edi
call   1030 <htonl@plt>
addq   $0x4,(%rbx)
movd   %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%union.floatint32 = type { float }
define float @unpack_float(i8** %0) {
%2 = alloca i8**
%3 = alloca %union.floatint32
store i8** %0, i8*** %2
%4 = bitcast %union.floatint32* %3 to i32*
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
%7 = call i32 @memcpy(i32* %4, i8* %6, i32 4)
%8 = bitcast %union.floatint32* %3 to i32*
%9 = load i32, i32* %8
%10 = call i32 @htonl(i32 %9)
%11 = bitcast %union.floatint32* %3 to i32*
store i32 %10, i32* %11
%12 = load i8**, i8*** %2
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i64 4
store i8* %14, i8** %12
%15 = bitcast %union.floatint32* %3 to float*
%16 = load float, float* %15
ret float %16
}

LLVM IR (-O2):
%union.floatint32 = type { float }
define float @unpack_float(i8** nocapture %0) {
%2 = alloca %union.floatint32
%3 = bitcast %union.floatint32* %2 to i8*
%4 = bitcast %union.floatint32* %2 to i32*
%5 = load i8*, i8** %0
%6 = call i32 @memcpy(i32* %4, i8* %5, i32 4)
%7 = load i32, i32* %4
%8 = call i32 @htonl(i32 %7)
%9 = load i8*, i8** %0
%10 = getelementptr inbounds i8, i8* %9, i64 4
store i8* %10, i8** %0
%11 = bitcast i32 %8 to float
ret float %11
}
int I_NoAppServicesRecvPacket(void *addr, void **data, unsigned int *size) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @I_NoAppServicesRecvPacket(i8* nocapture readnone %0, i8** nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
scalar_t__ xmalloc(scalar_t__);
char *xstrdup(const char *str) {
  char *data = (char *)xmalloc(strlen(str) + 1);
  if (data == NULL) {
    return NULL;
  }
  strcpy(data, str);
  return data;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <xstrdup+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    1182 <xstrdup+0x52>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <xmalloc@plt>
test   %rax,%rax
je     115a <xstrdup+0x2a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    115c <xstrdup+0x2c>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i64 @xmalloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i8* null, i8** %2
br label %18
13: ; preds = %1
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
store i8* %17, i8** %2
br label %18
18: ; preds = %13, %12
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @xmalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @strcpy(i8* %5, i8* %0)
br label %9
9: ; preds = %1, %7
%10 = phi i8* [ %5, %7 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void phylipsfree(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<phylipsfree>:
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):
<phylipsfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @phylipsfree(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 @phylipsfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LINUX_REBOOT_CMD_POWER_OFF;
int /*<<< orphan*/ reboot(int /*<<< orphan*/);
int /*<<< orphan*/ release_hsa();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ trigger_reipl();
void dump_terminate(void) {
  release_hsa();
  sleep(3);
  trigger_reipl();
  reboot(LINUX_REBOOT_CMD_POWER_OFF);
}


x86 assembly (clang, -O0):
<dump_terminate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <release_hsa@plt>
mov    $0x3,%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1030 <trigger_reipl@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <reboot@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_terminate>:
push   %rax
xor    %eax,%eax
call   1040 <release_hsa@plt>
mov    $0x3,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1030 <trigger_reipl@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <reboot@plt>

LLVM IR (-O0):
@LINUX_REBOOT_CMD_POWER_OFF = global i32 0
define void @dump_terminate() {
%1 = call i32 (...) @release_hsa()
%2 = call i32 @sleep(i32 3)
%3 = call i32 (...) @trigger_reipl()
%4 = load i32, i32* @LINUX_REBOOT_CMD_POWER_OFF
%5 = call i32 @reboot(i32 %4)
ret void
}

LLVM IR (-O2):
@LINUX_REBOOT_CMD_POWER_OFF = global i32 0
define void @dump_terminate() {
%1 = tail call i32 (...) @release_hsa()
%2 = tail call i32 @sleep(i32 3)
%3 = tail call i32 (...) @trigger_reipl()
%4 = load i32, i32* @LINUX_REBOOT_CMD_POWER_OFF
%5 = tail call i32 @reboot(i32 %4)
ret void
}
void outportb(unsigned int port, unsigned char value) {
  asm volatile("outb %%al,%%dx" : : "d"(port), "a"(value));
}


x86 assembly (clang, -O0):
<outportb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x5(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outportb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outportb(i32 %0, i8 zeroext %1) {
tail call void asm sideeffect "outb %al,%dx", "{dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %0, i8 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ format_time(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  time_t t;
  char *ct;
  time(&t);
  format_time(&t);
  for (;; time(&t)) {
    printf("\b\b\b\b\b\b\b\b");
    format_time(&t);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
lea    -0x8(%rbp),%rdi
call   1050 <format_time@plt>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1050 <format_time@plt>
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
jmp    1151 <main+0x21>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1050 <format_time@plt>
lea    0xeb0(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <format_time@plt>
mov    %rbx,%rdi
call   1040 <time@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [9 x i8] c"\08\08\08\08\08\08\08\08\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @time(i32* %2)
%5 = call i32 @format_time(i32* %2)
br label %6
6: ; preds = %9, %0
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @format_time(i32* %2)
br label %9
9: ; preds = %6
%10 = call i32 @time(i32* %2)
br label %6
}

LLVM IR (-O2):
@.str = [9 x i8] c"\08\08\08\08\08\08\08\08\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call i32 @format_time(i32* %1)
br label %5
5: ; preds = %5, %0
%6 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @format_time(i32* %1)
%8 = call i32 @time(i32* %1)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
char *reverseVowels(char *);
int main(void) {
  char str[] = {'l', 'e', 'e', 't', 'c', 'o', 'd', 'e', '\0'};
  printf("%s : %s\n", str, reverseVowels(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xec8(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xd(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xd(%rbp),%rdi
call   1040 <reverseVowels@plt>
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x65646f637465656c,%rax
6f 64 65
mov    %rax,(%rsp)
movb   $0x0,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <reverseVowels@plt>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [9 x i8] c"leetcode\00"
@.str = [9 x i8] c"%s : %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
store i32 0, i32* %1
%3 = bitcast [9 x i8]* %2 to i8*
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%6 = call i8* @reverseVowels(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [9 x i8] c"leetcode\00"
@.str = [9 x i8] c"%s : %s\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%3 = call i8* @reverseVowels(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
ret i32 0
}
void io_wq_worker_running(struct task_struct *tsk) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @io_wq_worker_running(%struct.task_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leLinha(char *);
int /*<<< orphan*/ maiusculas(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buffer[80];
  leLinha(buffer);
  maiusculas(buffer);
  printf("%s\n", buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <leLinha@plt>
lea    -0x60(%rbp),%rdi
call   1050 <maiusculas@plt>
lea    -0x60(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <leLinha@plt>
mov    %rbx,%rdi
call   1050 <maiusculas@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @leLinha(i8* %3)
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = call i32 @maiusculas(i8* %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = call i32 @leLinha(i8* %2)
%4 = call i32 @maiusculas(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void test_index(void) {}


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

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

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

LLVM IR (-O2):
define void @test_index() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_version(void) {
  puts("nsdo"
       " version "
       "2.0");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"nsdo version 2.0\00"
define void @print_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"nsdo version 2.0\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_nines(int NINES_99999) { return NINES_99999; }


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

x86 assembly (clang, -O2):
<test_nines>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_nines(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int ls_costN_nm2_f0(double const **, double **, int *, double *, int);
int ls_costN_nm2(const double **arg, double **res, int *iw, double *w,
                 int mem) {
  return ls_costN_nm2_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<ls_costN_nm2>:
jmp    1030 <ls_costN_nm2_f0@plt>

LLVM IR (-O0):
define i32 @ls_costN_nm2(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i32*, i32** %8
%14 = load double*, double** %9
%15 = load i32, i32* %10
%16 = call i32 @ls_costN_nm2_f0(double** %11, double** %12, i32* %13, double* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @ls_costN_nm2(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = tail call i32 @ls_costN_nm2_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4)
ret i32 %6
}
int min_my(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min_my>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min_my+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min_my+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_my>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min_my(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
unsigned long long pt_tspec2ns(const struct timespec *tspec) {
  return ((unsigned long long)tspec->tv_sec * 1000000000ULL) +
         (unsigned long long)tspec->tv_nsec;
}


x86 assembly (clang, -O0):
<pt_tspec2ns>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3b9aca00,0x8(%rax),%rax
3b
mov    -0x8(%rbp),%rcx
add    (%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt_tspec2ns>:
imul   $0x3b9aca00,0x8(%rdi),%rax
3b
add    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @pt_tspec2ns(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i64 @pt_tspec2ns(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = mul i64 %3, 1000000000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%6 = load i64, i64* %5
%7 = add i64 %4, %6
ret i64 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bitmap_pad;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
int get_XImage_bitmap_pad(void *_p) { return (int)((XImage *)_p)->bitmap_pad; }


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

x86 assembly (clang, -O2):
<get_XImage_bitmap_pad>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XImage_bitmap_pad(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XImage_bitmap_pad(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char *langRomTypeNormalC000() { return "Normal C000h"; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Normal C000h\00"
define i8* @langRomTypeNormalC000() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"Normal C000h\00"
define i8* @langRomTypeNormalC000() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello CLLL\n");
  return 22;
}


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>
mov    $0x16,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x16,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [11 x i8] c"Hello CLLL\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 22
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISBLK(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int fsop_path_isblk(const char *path) {
  struct stat st;
  if (stat(path, &st) < 0)
    return -1;
  return S_ISBLK(st.st_mode);
}


x86 assembly (clang, -O0):
<fsop_path_isblk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    114f <fsop_path_isblk+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <fsop_path_isblk+0x3a>
mov    -0x18(%rbp),%edi
call   1040 <S_ISBLK@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsop_path_isblk>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
test   %rax,%rax
js     1138 <fsop_path_isblk+0x18>
mov    (%rsp),%edi
call   1040 <S_ISBLK@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fsop_path_isblk(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISBLK(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
int ud2fd(void *ud) { return (int)(long)ud; }


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

x86 assembly (clang, -O2):
<ud2fd>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @ud2fd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ud2fd(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;
typedef scalar_t__ msb;
typedef int lsb;

/* Variables and functions */
int us_bits_get_quadlet(void const *, int);
uint32_t us_bits_get_quadlet_bitfield(const void *base, uint16_t offset,
                                      uint16_t msb, uint16_t lsb) {
  uint32_t v = us_bits_get_quadlet(base, offset);
  uint32_t r = ((((v)) & (((0xffffffff) >> (32 - ((lsb) - (msb) + 1)))
                          << (31 - ((lsb))))) >>
                (31 - ((lsb))));
  return r;
}


x86 assembly (clang, -O0):
<us_bits_get_quadlet_bitfield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <us_bits_get_quadlet@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%edx
sub    -0x10(%rbp),%edx
add    $0x1,%edx
mov    $0x20,%ecx
sub    %edx,%ecx
mov    $0xffffffff,%edx
shr    %cl,%edx
mov    $0x1f,%ecx
sub    -0x14(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    $0x1f,%ecx
sub    -0x14(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<us_bits_get_quadlet_bitfield>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
call   1030 <us_bits_get_quadlet@plt>
sub    %ebx,%ebp
add    $0x1f,%bpl
mov    $0xffffffff,%edx
mov    %ebp,%ecx
shr    %cl,%edx
mov    $0x1f,%cl
sub    %bl,%cl
shl    %cl,%edx
and    %edx,%eax
shr    %cl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @us_bits_get_quadlet_bitfield(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @us_bits_get_quadlet(i8* %11, i32 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = sub nsw i32 %15, %16
%18 = add nsw i32 %17, 1
%19 = sub nsw i32 32, %18
%20 = lshr i32 -1, %19
%21 = load i32, i32* %8
%22 = sub nsw i32 31, %21
%23 = shl i32 %20, %22
%24 = and i32 %14, %23
%25 = load i32, i32* %8
%26 = sub nsw i32 31, %25
%27 = lshr i32 %24, %26
store i32 %27, i32* %10
%28 = load i32, i32* %10
ret i32 %28
}

LLVM IR (-O2):
define i32 @us_bits_get_quadlet_bitfield(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @us_bits_get_quadlet(i8* %0, i32 %1)
%6 = add i32 %2, 31
%7 = sub i32 %6, %3
%8 = lshr i32 -1, %7
%9 = sub nsw i32 31, %3
%10 = shl i32 %8, %9
%11 = and i32 %5, %10
%12 = lshr i32 %11, %9
ret i32 %12
}