xunge/DecIR huggingface dataset:
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  int /*<<< orphan*/ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int semop(int, struct sembuf *, int);
int cwirc_sem_inc(int semid, int semnum) {
  struct sembuf sops;
  sops.sem_num = semnum;
  sops.sem_op = 1;
  sops.sem_flg = SEM_UNDO;
  if (semop(semid, &sops, 1) == -1)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<cwirc_sem_inc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
cmp    $0xffffffff,%eax
jne    115d <cwirc_sem_inc+0x4d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1164 <cwirc_sem_inc+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwirc_sem_inc>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movl   $0x1,0xc(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @cwirc_sem_inc(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sembuf
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 0
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 1
store i32 1, i32* %9
%10 = load i32, i32* @SEM_UNDO
%11 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %6, i32 0, i32 2
store i32 %10, i32* %11
%12 = load i32, i32* %4
%13 = call i32 @semop(i32 %12, %struct.sembuf* %6, i32 1)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %17
16: ; preds = %2
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @cwirc_sem_inc(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 1, i32* %6
%7 = load i32, i32* @SEM_UNDO
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i32 %7, i32* %8
%9 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
%10 = icmp eq i32 %9, -1
%11 = sext i1 %10 to i32
ret i32 %11
}
void gtk_icon_info_get_embedded_rect() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_info_get_embedded_rect() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void command_poop(char *line) { printf("pooped ya pants\n"); }


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

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

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

LLVM IR (-O2):
@str = [16 x i8] c"pooped ya pants\00"
define void @command_poop(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
void _start(void) { _exit(0); }


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 @_exit(i32 0)
unreachable
}
/* Variables and functions */
int AF_LOCAL;
int SOCK_STREAM;
int socket_is_stream_and_domain(int domain, int type) {
  return domain == AF_LOCAL && type == SOCK_STREAM;
}


x86 assembly (clang, -O0):
<socket_is_stream_and_domain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
mov    0x2ed2(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x9(%rbp)
jne    1133 <socket_is_stream_and_domain+0x33>
mov    -0x8(%rbp),%eax
mov    0x2ead(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_is_stream_and_domain>:
mov    0x2ee1(%rip),%rax
xor    (%rax),%edi
mov    0x2ec8(%rip),%rax
xor    (%rax),%esi
xor    %eax,%eax
or     %edi,%esi
sete   %al
ret

LLVM IR (-O0):
@AF_LOCAL = global i32 0
@SOCK_STREAM = global i32 0
define i32 @socket_is_stream_and_domain(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* @AF_LOCAL
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* @SOCK_STREAM
%11 = icmp eq i32 %9, %10
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ false, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@AF_LOCAL = global i32 0
@SOCK_STREAM = global i32 0
define i32 @socket_is_stream_and_domain(i32 %0, i32 %1) {
%3 = load i32, i32* @AF_LOCAL
%4 = icmp eq i32 %3, %0
%5 = load i32, i32* @SOCK_STREAM
%6 = icmp eq i32 %5, %1
%7 = select i1 %4, i1 %6, i1 false
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ gen_ptr2arg(int **, int);
int /*<<< orphan*/ limit2_i32(int *, int, int);
int mksym_i32();
int ptr2arg(int **);
void test_ptr2arg() {
  int x = mksym_i32();
  limit2_i32(&x, 101, 128);
  int *y = &x;
  int res = ptr2arg(&y);
  gen_ptr2arg(&y, res);
}


x86 assembly (clang, -O0):
<test_ptr2arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <mksym_i32@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x65,%esi
mov    $0x80,%edx
call   1040 <limit2_i32@plt>
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1050 <ptr2arg@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    -0x10(%rbp),%rdi
call   1060 <gen_ptr2arg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ptr2arg>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <mksym_i32@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x65,%esi
mov    $0x80,%edx
call   1040 <limit2_i32@plt>
mov    %rbx,0x8(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <ptr2arg@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <gen_ptr2arg@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test_ptr2arg() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
%4 = call i32 (...) @mksym_i32()
store i32 %4, i32* %1
%5 = call i32 @limit2_i32(i32* %1, i32 101, i32 128)
store i32* %1, i32** %2
%6 = call i32 @ptr2arg(i32** %2)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @gen_ptr2arg(i32** %2, i32 %7)
ret void
}

LLVM IR (-O2):
define void @test_ptr2arg() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 (...) @mksym_i32()
store i32 %4, i32* %1
%5 = call i32 @limit2_i32(i32* %1, i32 101, i32 128)
%6 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%7 = call i32 @ptr2arg(i32** %2)
%8 = call i32 @gen_ptr2arg(i32** %2, i32 %7)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ gen(int *, int *, int, int, int, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int *, int *, int);
void gen_129033(uint8_t *b, uint32_t *buflen) {
  gen(b, buflen, 8, 129033, 2, 0, 0);
  uint8_t sentence[] = {0x3a, 0x34, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f};
  memcpy(&b[10], sentence, 8);
  *buflen = 18;
}


x86 assembly (clang, -O0):
<gen_129033>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
mov    $0x1f809,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1040 <gen@plt>
mov    0xea2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x28,%rdi
lea    -0x30(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movl   $0x12,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_129033>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movl   $0x0,(%rsp)
mov    $0x8,%edx
mov    $0x1f809,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
call   1040 <gen@plt>
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
add    $0x28,%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movl   $0x12,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.gen_129033.sentence = [8 x i32] [i32 58, i32 52, i32 255, i32 255, i32 255, i32 255, i32 255, i32 127]
define void @gen_129033(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [8 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = call i32 @gen(i32* %6, i32* %7, i32 8, i32 129033, i32 2, i32 0, i32 0)
%9 = bitcast [8 x i32]* %5 to i8*
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 10
%12 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%13 = call i32 @memcpy(i32* %11, i32* %12, i32 8)
%14 = load i32*, i32** %4
store i32 18, i32* %14
ret void
}

LLVM IR (-O2):
@__const.gen_129033.sentence = [8 x i32] [i32 58, i32 52, i32 255, i32 255, i32 255, i32 255, i32 255, i32 127]
define void @gen_129033(i32* %0, i32* %1) {
%3 = alloca [8 x i32]
%4 = tail call i32 @gen(i32* %0, i32* %1, i32 8, i32 129033, i32 2, i32 0, i32 0)
%5 = bitcast [8 x i32]* %3 to i8*
%6 = getelementptr inbounds i32, i32* %0, i64 10
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%8 = call i32 @memcpy(i32* %6, i32* %7, i32 8)
store i32 18, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_HIF_SetReg8(int, int);
void VIM_DISP_ResetState(void) { VIM_HIF_SetReg8((0x2800 + 0x004), 0x80); }


x86 assembly (clang, -O0):
<VIM_DISP_ResetState>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2804,%edi
mov    $0x80,%esi
call   1030 <VIM_HIF_SetReg8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_DISP_ResetState>:
mov    $0x2804,%edi
mov    $0x80,%esi
jmp    1030 <VIM_HIF_SetReg8@plt>

LLVM IR (-O0):
define void @VIM_DISP_ResetState() {
%1 = call i32 @VIM_HIF_SetReg8(i32 10244, i32 128)
ret void
}

LLVM IR (-O2):
define void @VIM_DISP_ResetState() {
%1 = tail call i32 @VIM_HIF_SetReg8(i32 10244, i32 128)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
double get_counter() {
  printf("ERROR: You are trying to use a get_counter routine in clock.c\n");
  printf("that has not been implemented yet on this platform.\n");
  printf("Please choose another timing package in config.h.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<get_counter>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rdi
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<get_counter>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"ERROR: You are trying to use a get_counter routine in clock.c\0A\00"
@.str.1 = [53 x i8] c"that has not been implemented yet on this platform.\0A\00"
@.str.2 = [51 x i8] c"Please choose another timing package in config.h.\0A\00"
define double @get_counter() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [62 x i8] c"ERROR: You are trying to use a get_counter routine in clock.c\00"
@str.3 = [52 x i8] c"that has not been implemented yet on this platform.\00"
@str.4 = [50 x i8] c"Please choose another timing package in config.h.\00"
define double @get_counter() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
void func6(unsigned count) {
begin:
  if (count--)
    goto begin;
}


x86 assembly (clang, -O0):
<func6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1120 <func6+0x20>
jmp    1107 <func6+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @func6(i32 %0) {
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ warn(char *, int);
void closew(int fd) {
  if (close(fd) == -1)
    warn("close fd %d failed", fd);
}


x86 assembly (clang, -O0):
<closew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    114b <closew+0x2b>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <warn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closew>:
push   %rbx
mov    %edi,%ebx
call   1040 <close@plt>
cmp    $0xffffffff,%eax
je     112f <closew+0xf>
pop    %rbx
ret
lea    0xeca(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <warn@plt>

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

LLVM IR (-O2):
@.str = [19 x i8] c"close fd %d failed\00"
define void @closew(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @warn(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_pairing_natural(int *, int);
int /*<<< orphan*/ shuffle_sequence(int *, int);
void init_pairing_random(int *pairing, int N) {
  init_pairing_natural(pairing, N);
  shuffle_sequence(pairing, N);
}


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

x86 assembly (clang, -O2):
<init_pairing_random>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <init_pairing_natural@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <shuffle_sequence@plt>

LLVM IR (-O0):
define void @init_pairing_random(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 @init_pairing_natural(i32* %5, i32 %6)
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = call i32 @shuffle_sequence(i32* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @init_pairing_random(i32* %0, i32 %1) {
%3 = tail call i32 @init_pairing_natural(i32* %0, i32 %1)
%4 = tail call i32 @shuffle_sequence(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x55() {
  Assert_real((islower(85) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              430, ("islower should be 0 for U"));
}


x86 assembly (clang, -O0):
<t_islower_0x55>:
push   %rbp
mov    %rsp,%rbp
mov    $0x55,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1ae,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x55>:
push   %rax
mov    $0x55,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1ae,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for U\00"
define void @t_islower_0x55() {
%1 = call i64 @islower(i32 85)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for U\00"
define void @t_islower_0x55() {
%1 = tail call i64 @islower(i32 85)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutIdleFunc(void (*)());
void s2winIdleFunc(void (*func)(void)) { glutIdleFunc(func); }


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

x86 assembly (clang, -O2):
<s2winIdleFunc>:
jmp    1030 <glutIdleFunc@plt>

LLVM IR (-O0):
define void @s2winIdleFunc(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @glutIdleFunc(void (...)* %4)
ret void
}

LLVM IR (-O2):
define void @s2winIdleFunc(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @glutIdleFunc(void (...)* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
void FileUtil_close(FILE *fp, char *fname) {
  if (strcmp(fname, "stdout") && strcmp(fname, "stderr")) {
    fclose(fp);
  }
}


x86 assembly (clang, -O0):
<FileUtil_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     116d <FileUtil_close+0x4d>
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     116d <FileUtil_close+0x4d>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileUtil_close>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xecf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1161 <FileUtil_close+0x41>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1161 <FileUtil_close+0x41>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"stdout\00"
@.str.1 = [7 x i8] c"stderr\00"
define void @FileUtil_close(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
br label %15
15: ; preds = %12, %8, %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"stdout\00"
@.str.1 = [7 x i8] c"stderr\00"
define void @FileUtil_close(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @fclose(i32* %0)
br label %10
10: ; preds = %8, %5, %2
ret void
}
void ScaleRowDown4Box_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4Box_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("*%d\n", 931);
  printf("*%2d*\n", 931);
  printf("*%10d\n", 931);
  printf("*-10d*\n", 931);
  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
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x3a3,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"*%d\0A\00"
@.str.1 = [7 x i8] c"*%2d*\0A\00"
@.str.2 = [7 x i8] c"*%10d\0A\00"
@.str.3 = [8 x i8] c"*-10d*\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 ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 931)
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 931)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 931)
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 931)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"*%d\0A\00"
@.str.1 = [7 x i8] c"*%2d*\0A\00"
@.str.2 = [7 x i8] c"*%10d\0A\00"
@.str.3 = [8 x i8] c"*-10d*\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 931)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 931)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 931)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 931)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ printf(char *, int, int);
int waitpid(int, int *, int /*<<< orphan*/);
void terminar_hijo() {
  int pid, res;
  pid = waitpid(-1, &res, WNOHANG);
  printf("Termino el proceso %d con resultado %d\n", pid, res);
}


x86 assembly (clang, -O0):
<terminar_hijo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0x8(%rbp),%rsi
call   1040 <waitpid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminar_hijo>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rsi
mov    $0xffffffff,%edi
call   1040 <waitpid@plt>
mov    0x4(%rsp),%edx
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
@.str = [40 x i8] c"Termino el proceso %d con resultado %d\0A\00"
define void @terminar_hijo() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @WNOHANG
%4 = call i32 @waitpid(i32 -1, i32* %2, i32 %3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
@.str = [40 x i8] c"Termino el proceso %d con resultado %d\0A\00"
define void @terminar_hijo() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @WNOHANG
%4 = call i32 @waitpid(i32 -1, i32* %1, i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret void
}
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_port;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  scalar_t__ sa_family;
};
typedef int /*<<< orphan*/ in_port_t;

/* Variables and functions */
scalar_t__ AF_INET;
in_port_t get_in_port_from(struct sockaddr *sa) {
  if (sa->sa_family == AF_INET) {
    return (((struct sockaddr_in *)sa)->sin_port);
  }
  return (((struct sockaddr_in6 *)sa)->sin6_port);
}


x86 assembly (clang, -O0):
<get_in_port_from>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112d <get_in_port_from+0x2d>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <get_in_port_from+0x36>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@AF_INET = global i64 0
define i32 @get_in_port_from(%struct.sockaddr* %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = load i64, i64* @AF_INET
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load %struct.sockaddr*, %struct.sockaddr** %3
%11 = bitcast %struct.sockaddr* %10 to %struct.sockaddr_in*
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %2
br label %19
14: ; preds = %1
%15 = load %struct.sockaddr*, %struct.sockaddr** %3
%16 = bitcast %struct.sockaddr* %15 to %struct.sockaddr_in6*
%17 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %16, i32 0, i32 0
%18 = load i32, i32* %17
store i32 %18, i32* %2
br label %19
19: ; preds = %14, %9
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
%struct.sockaddr = type { i64 }
@AF_INET = global i64 0
define i32 @get_in_port_from(%struct.sockaddr* nocapture %0) {
%2 = bitcast %struct.sockaddr* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int mdt_hsm_copytool_send(struct obd_export *exp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.obd_export = type opaque
define i32 @mdt_hsm_copytool_send(%struct.obd_export* nocapture readnone %0) {
ret i32 0
}
int fun982() { return 982; }


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

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

LLVM IR (-O0):
define i32 @fun982() {
ret i32 982
}

LLVM IR (-O2):
define i32 @fun982() {
ret i32 982
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
u_int32_t F(u_int32_t b, u_int32_t c, u_int32_t d) {
  return (b & c) | ((~b) & d);
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
mov    %esi,%eax
xor    %edx,%eax
and    %edi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @F(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = xor i32 %10, -1
%12 = load i32, i32* %6
%13 = and i32 %11, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @F(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, %0
%5 = xor i32 %0, -1
%6 = and i32 %5, %2
%7 = or i32 %6, %4
ret i32 %7
}
void cli_val_powerpc_attr_deinit(struct cli_val_powerpc_attr *a) {}


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

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

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

LLVM IR (-O2):
%struct.cli_val_powerpc_attr = type opaque
define void @cli_val_powerpc_attr_deinit(%struct.cli_val_powerpc_attr* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int RFCNB_Close(int socket) {
  close(socket);
  return 0;
}


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

x86 assembly (clang, -O2):
<RFCNB_Close>:
push   %rax
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @RFCNB_Close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 0
}
int octave_o_async_wrapper(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @octave_o_async_wrapper() {
ret i32 -1
}
double roose_1975(double annual_pmm) {
  double result;
  result = annual_pmm * 0.5 * 1.73;
  return result;
}


x86 assembly (clang, -O0):
<roose_1975>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<roose_1975>:
mulsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @roose_1975(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 5.000000e-01
%6 = fmul double %5, 1.730000e+00
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @roose_1975(double %0) {
%2 = fmul double %0, 5.000000e-01
%3 = fmul double %2, 1.730000e+00
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
const char *
hfp_subevent_call_waiting_notification_get_number(const uint8_t *event) {
  return (const char *)&event[4];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_call_waiting_notification_get_number>:
lea    0x10(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @hfp_subevent_call_waiting_notification_get_number(i32* readnone %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = bitcast i32* %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void usage(int exitval) {
  fprintf(exitval ? stderr : stdout, "Usage: testugci [--help] [--simul]\n");
  exit(exitval);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1146 <usage+0x26>
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <usage+0x32>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jne    1130 <usage+0x10>
mov    0x2eaa(%rip),%rax
jmp    1137 <usage+0x17>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@stdout = global i32 0
@.str = [36 x i8] c"Usage: testugci [--help] [--simul]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @stderr
br label %9
7: ; preds = %1
%8 = load i32, i32* @stdout
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @exit(i32 %12)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@stdout = global i32 0
@.str = [36 x i8] c"Usage: testugci [--help] [--simul]\0A\00"
define void @usage(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = load i32, i32* @stderr
%4 = load i32, i32* @stdout
%5 = select i1 %2, i32 %4, i32 %3
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 %0)
unreachable
}
void XSetErrorHandler() {}


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

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

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

LLVM IR (-O2):
define void @XSetErrorHandler() {
ret void
}
int testBit_fun_uchar(unsigned char x, unsigned i) { return (x & 1 << i) != 0; }


x86 assembly (clang, -O0):
<testBit_fun_uchar>:
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    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBit_fun_uchar>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @testBit_fun_uchar(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 = shl i32 1, %7
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @testBit_fun_uchar(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = lshr i32 %3, %1
%5 = and i32 %4, 1
ret i32 %5
}
void free_char_2D_AP(char **char_2D_AP, int nrow) {
  int i;
  for (i = 0; i < nrow; i++) {
    free(char_2D_AP[i]);
  }
  free(char_2D_AP);
}


x86 assembly (clang, -O0):
<free_char_2D_AP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_char_2D_AP+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_char_2D_AP+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_char_2D_AP>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_char_2D_AP+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_char_2D_AP+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_char_2D_AP(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit(char const *);
int /*<<< orphan*/ printf(char *);
void emitln(const char *s) {
  emit(s);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<emitln>:
push   %rax
call   1040 <emit@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @emitln(i8* %0) {
%2 = tail call i32 @emit(i8* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_string(char *);
void html_para(void) {
  write_break();
  write_string("<P>");
}


x86 assembly (clang, -O0):
<html_para>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <write_break@plt>
lea    0xece(%rip),%rdi
call   1030 <write_string@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_para>:
push   %rax
xor    %eax,%eax
call   1040 <write_break@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <write_string@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"<P>\00"
define void @html_para() {
%1 = call i32 (...) @write_break()
%2 = call i32 @write_string(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"<P>\00"
define void @html_para() {
%1 = tail call i32 (...) @write_break()
%2 = tail call i32 @write_string(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct plainstring {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cstr_loaddouble(char *, double);
int plainstring_lessequal(struct plainstring const *, char *);
int plainstring_lessequal_double(const struct plainstring *this_string,
                                 double d) {
  char buffer[0xFF];
  cstr_loaddouble(buffer, d);
  return plainstring_lessequal(this_string, buffer);
}


x86 assembly (clang, -O0):
<plainstring_lessequal_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <cstr_loaddouble@plt>
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <plainstring_lessequal@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plainstring_lessequal_double>:
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <cstr_loaddouble@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <plainstring_lessequal@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.plainstring = type { i32 }
define i32 @plainstring_lessequal_double(%struct.plainstring* %0, double %1) {
%3 = alloca %struct.plainstring*
%4 = alloca double
%5 = alloca [255 x i8]
store %struct.plainstring* %0, %struct.plainstring** %3
store double %1, double* %4
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = load double, double* %4
%8 = call i32 @cstr_loaddouble(i8* %6, double %7)
%9 = load %struct.plainstring*, %struct.plainstring** %3
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%11 = call i32 @plainstring_lessequal(%struct.plainstring* %9, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.plainstring = type { i32 }
define i32 @plainstring_lessequal_double(%struct.plainstring* %0, double %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%5 = call i32 @cstr_loaddouble(i8* %4, double %1)
%6 = call i32 @plainstring_lessequal(%struct.plainstring* %0, i8* %4)
ret i32 %6
}
int fun724() { return 724; }


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

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

LLVM IR (-O0):
define i32 @fun724() {
ret i32 724
}

LLVM IR (-O2):
define i32 @fun724() {
ret i32 724
}
void XcmsCCCOfColormap() {}


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

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

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

LLVM IR (-O2):
define void @XcmsCCCOfColormap() {
ret void
}
int isparen(int c) {
  switch (c) {
  case '{':
  case '(':
  case '[':
  case '}':
  case ')':
  case ']':
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isparen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffd8,%eax
sub    $0x2,%eax
jb     1162 <isparen+0x62>
jmp    111e <isparen+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x5b,%eax
je     1162 <isparen+0x62>
jmp    112f <isparen+0x2f>
mov    -0xc(%rbp),%eax
sub    $0x5d,%eax
je     1162 <isparen+0x62>
jmp    1140 <isparen+0x40>
mov    -0xc(%rbp),%eax
sub    $0x7b,%eax
je     1162 <isparen+0x62>
jmp    1151 <isparen+0x51>
mov    -0xc(%rbp),%eax
sub    $0x7d,%eax
jne    116e <isparen+0x6e>
jmp    1162 <isparen+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1175 <isparen+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isparen>:
mov    $0x1,%eax
lea    -0x5b(%rdi),%ecx
cmp    $0x22,%ecx
ja     111d <isparen+0x1d>
movabs $0x500000005,%rdx
bt     %rcx,%rdx
jb     1125 <isparen+0x25>
add    $0xffffffd8,%edi
cmp    $0x2,%edi
jae    1126 <isparen+0x26>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isparen(i32 %0) {
switch i32 %0, label %2 [
i32 123, label %3
i32 40, label %3
i32 91, label %3
i32 125, label %3
i32 41, label %3
i32 93, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ search_postfix_add(char const *);
void evdns_search_add(const char *domain) { search_postfix_add(domain); }


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

x86 assembly (clang, -O2):
<evdns_search_add>:
jmp    1030 <search_postfix_add@plt>

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

LLVM IR (-O2):
define void @evdns_search_add(i8* %0) {
%2 = tail call i32 @search_postfix_add(i8* %0)
ret void
}
int esq(int pos) { return pos << 1; }


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

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

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

LLVM IR (-O2):
define i32 @esq(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}