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

/* Variables and functions */
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ write(int, int *, int);
int write_int_to_pipe(FILE *r, int w) {
  int num;
  fscanf(r, "%d", &num);
  write(w, &num, sizeof(int));
  if (feof(r))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<write_int_to_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x14(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    -0x10(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%rax
je     1183 <write_int_to_pipe+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    118a <write_int_to_pipe+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_int_to_pipe>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xebc(%rip),%rsi
lea    0xc(%rsp),%r14
mov    %r14,%rdx
call   1040 <fscanf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1050 <feof@plt>
neg    %rax
sbb    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @write_int_to_pipe(i32* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = call i32 @write(i32 %1, i32* %3, i32 4)
%7 = call i64 @feof(i32* %0)
%8 = icmp ne i64 %7, 0
%9 = sext i1 %8 to i32
ret i32 %9
}
void foo() {
  register int zmm_var asm("ymm9");
  register int zmm_var2 asm("23");
}


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

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int x = 9;
  int y = 11;
  if (x < 10) {
    if (y > 10)
      puts("*****");
  } else {
    puts("#####");
    puts("$$$$$");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1152 <main+0x42>
cmpl   $0xa,-0xc(%rbp)
jle    114d <main+0x3d>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
jmp    116a <main+0x5a>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@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 = [6 x i8] c"*****\00"
@.str.1 = [6 x i8] c"#####\00"
@.str.2 = [6 x i8] c"$$$$$\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 9, i32* %2
store i32 11, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 10
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
br label %15
12: ; preds = %0
%13 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %12, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"*****\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
float sqrModule3f(float vx, float vy, float vz) {
  return (vx * vx) + (vy * vy) + (vz * vz);
}


x86 assembly (clang, -O0):
<sqrModule3f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrModule3f>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @sqrModule3f(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %4
%9 = load float, float* %5
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = call float @llvm.fmuladd.f32(float %7, float %8, float %11)
%13 = load float, float* %6
%14 = load float, float* %6
%15 = call float @llvm.fmuladd.f32(float %13, float %14, float %12)
ret float %15
}

LLVM IR (-O2):
define float @sqrModule3f(float %0, float %1, float %2) {
%4 = fmul float %1, %1
%5 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %4)
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
ret float %6
}
int game_get_scrollwheel(int num, int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @game_get_scrollwheel(i32 %0, i32 %1) {
ret i32 0
}
void istrncpy(dest, orig, tam) register char *dest;
char *orig;
register int tam;
{
  strncpy(dest, orig, tam);
  dest[tam] = '\0';
}


x86 assembly (clang, -O0):
<istrncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<istrncpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movslq %edx,%rbx
mov    %rbx,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @istrncpy(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = call i8* @strncpy(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @istrncpy(i8* %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
void string__NativeString__init(char *self) {
RET_LABEL:;
}


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

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

LLVM IR (-O0):
define void @string__NativeString__init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @string__NativeString__init(i8* nocapture %0) {
ret void
}
OP(fd, af) { op_af(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_af@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_af()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void puts(char *s) {
  char c;
  while ((c = *s++) != '\0')
    putchar(c);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     114a <puts+0x3a>
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @putchar(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *fs_fnread(int /*<<< orphan*/ *, size_t);
size_t fs_fsize(int /*<<< orphan*/ *);
char *fs_fread(FILE *file) {
  size_t fsize = fs_fsize(file);
  return fs_fnread(file, fsize);
}


x86 assembly (clang, -O0):
<fs_fread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fs_fsize@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fs_fnread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_fread>:
push   %rbx
mov    %rdi,%rbx
call   1030 <fs_fsize@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <fs_fnread@plt>

LLVM IR (-O0):
define i8* @fs_fread(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i64 @fs_fsize(i32* %4)
store i64 %5, i64* %3
%6 = load i32*, i32** %2
%7 = load i64, i64* %3
%8 = call i8* @fs_fnread(i32* %6, i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @fs_fread(i32* %0) {
%2 = tail call i64 @fs_fsize(i32* %0)
%3 = tail call i8* @fs_fnread(i32* %0, i64 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_EXTRA_LED_INPUT() { clear_io_bit(0x39, 4); }


x86 assembly (clang, -O0):
<TOSH_MAKE_EXTRA_LED_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x39,%edi
mov    $0x4,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_EXTRA_LED_INPUT>:
mov    $0x39,%edi
mov    $0x4,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_EXTRA_LED_INPUT() {
%1 = call i32 @clear_io_bit(i32 57, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_EXTRA_LED_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 57, i32 4)
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ bsd_syscall_recvfrom(int, void *, size_t, int,
                                        struct sockaddr *,
                                        int /*<<< orphan*/ *);
ssize_t uptcp_recvfrom(int s, void *buf, size_t len, int flags,
                       struct sockaddr *from, socklen_t *fromlenaddr) {
  return bsd_syscall_recvfrom(s, buf, len, flags, from, fromlenaddr);
}


x86 assembly (clang, -O0):
<uptcp_recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <bsd_syscall_recvfrom@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptcp_recvfrom>:
jmp    1030 <bsd_syscall_recvfrom@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @uptcp_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = load i32*, i32** %12
%19 = call i32 @bsd_syscall_recvfrom(i32 %13, i8* %14, i64 %15, i32 %16, %struct.sockaddr* %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @uptcp_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = tail call i32 @bsd_syscall_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5)
ret i32 %7
}
int the_answer(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @the_answer() {
ret i32 42
}

LLVM IR (-O2):
define i32 @the_answer() {
ret i32 42
}
void RTMsgWarning(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMsgWarning() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hook_signal_send(char *, char *, int /*<<< orphan*/ *);
void gui_hotlist_changed_signal() {
  (void)hook_signal_send("hotlist_changed", "string", NULL);
}


x86 assembly (clang, -O0):
<gui_hotlist_changed_signal>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <hook_signal_send@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_hotlist_changed_signal>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
xor    %edx,%edx
jmp    1030 <hook_signal_send@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"hotlist_changed\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_hotlist_changed_signal() {
%1 = call i32 @hook_signal_send(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"hotlist_changed\00"
@.str.1 = [7 x i8] c"string\00"
define void @gui_hotlist_changed_signal() {
%1 = tail call i32 @hook_signal_send(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* null)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ isdigit(char);
char mint_skip_space(int /*<<< orphan*/ *);
int mint_values_waiting(FILE *file) {
  char c = mint_skip_space(file);
  return isdigit(c) || c == '.' || c == '-' || c == '+';
}


x86 assembly (clang, -O0):
<mint_values_waiting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mint_skip_space@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
jne    1184 <mint_values_waiting+0x64>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0xa(%rbp)
je     1184 <mint_values_waiting+0x64>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0xa(%rbp)
je     1184 <mint_values_waiting+0x64>
movsbl -0x9(%rbp),%eax
cmp    $0x2b,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mint_values_waiting>:
push   %rbx
call   1040 <mint_skip_space@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
lea    -0x2d(%rbx),%ecx
cmp    $0x2,%cl
setb   %cl
cmp    $0x2b,%bl
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mint_values_waiting(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call signext i8 @mint_skip_space(i32* %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = call i64 @isdigit(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %21, label %9
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 46
br i1 %12, label %21, label %13
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 45
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 43
br label %21
21: ; preds = %17, %13, %9, %1
%22 = phi i1 [ true, %13 ], [ true, %9 ], [ true, %1 ], [ %20, %17 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @mint_values_waiting(i32* %0) {
%2 = tail call signext i8 @mint_skip_space(i32* %0)
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp ne i64 %3, 0
%5 = add i8 %2, -45
%6 = icmp ult i8 %5, 2
%7 = or i1 %6, %4
%8 = icmp eq i8 %2, 43
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
  int /*<<< orphan*/ sa_flags;
  int /*<<< orphan*/ sa_mask;
};

/* Variables and functions */
int /*<<< orphan*/ SA_RESTART;
int sigaction(int, struct sigaction *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int setup_signal(int signal, void (*handler)(int)) {
  struct sigaction s;
  s.sa_handler = handler;
  sigemptyset(&s.sa_mask);
  s.sa_flags = SA_RESTART;
  return sigaction(signal, &s, NULL);
}


x86 assembly (clang, -O0):
<setup_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
add    $0xc,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_signal>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %rsi,(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x8(%rsp)
mov    %rsp,%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)*, i32, i32 }
@SA_RESTART = global i32 0
define i32 @setup_signal(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%6 = load void (i32)*, void (i32)** %4
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (i32)* %6, void (i32)** %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 2
%9 = call i32 @sigemptyset(i32* %8)
%10 = load i32, i32* @SA_RESTART
%11 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
store i32 %10, i32* %11
%12 = load i32, i32* %3
%13 = call i32 @sigaction(i32 %12, %struct.sigaction* %5, i32* null)
ret i32 %13
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)*, i32, i32 }
@SA_RESTART = global i32 0
define i32 @setup_signal(i32 %0, void (i32)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (i32)* %1, void (i32)** %5
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 2
%7 = call i32 @sigemptyset(i32* %6)
%8 = load i32, i32* @SA_RESTART
%9 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
store i32 %8, i32* %9
%10 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, i32* null)
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_andnot_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sqrt_ps(int /*<<< orphan*/);
__m128 t2(__m128 a, __m128 b) {
  a = _mm_sqrt_ps(a);
  b = _mm_sqrt_ps(b);
  return _mm_andnot_ps(a, b);
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_andnot_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_mm_sqrt_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_mm_sqrt_ps@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_mm_andnot_ps@plt>

LLVM IR (-O0):
define i32 @t2(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 = call i32 @_mm_sqrt_ps(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @_mm_sqrt_ps(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @_mm_andnot_ps(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @t2(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_ps(i32 %0)
%4 = tail call i32 @_mm_sqrt_ps(i32 %1)
%5 = tail call i32 @_mm_andnot_ps(i32 %3, i32 %4)
ret i32 %5
}
int test_imm_D4int64_midword_reg(long long val) {
  return ((val >> 16) & (0xD4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D4int64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0xd4,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D4int64_midword_reg>:
test   $0xd40000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D4int64_midword_reg(i64 %0) {
%2 = and i64 %0, 13893632
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a;
  for (a = 0; a <= 255; a++) {
    printf("%d,%c", a, a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d,%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 255
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d,%c\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_rexx_comment();
int /*<<< orphan*/ test_rexx_comment_entities();
void all_rexx_tests() {
  test_rexx_comment();
  test_rexx_comment_entities();
}


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

x86 assembly (clang, -O2):
<all_rexx_tests>:
push   %rax
xor    %eax,%eax
call   1040 <test_rexx_comment@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_rexx_comment_entities@plt>

LLVM IR (-O0):
define void @all_rexx_tests() {
%1 = call i32 (...) @test_rexx_comment()
%2 = call i32 (...) @test_rexx_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_rexx_tests() {
%1 = tail call i32 (...) @test_rexx_comment()
%2 = tail call i32 (...) @test_rexx_comment_entities()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool OneWireDataGetNonBlocking(uint32_t ui32Base, uint32_t *pui32Data) {
  ;
  ;
  if ((*((volatile uint32_t *)(ui32Base + 0x00000000))) & 0x00000100) {
    return (false);
  }
  *pui32Data = (*((volatile uint32_t *)(ui32Base + 0x0000000C)));
  return (true);
}


x86 assembly (clang, -O0):
<OneWireDataGetNonBlocking>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     112f <OneWireDataGetNonBlocking+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1146 <OneWireDataGetNonBlocking+0x46>
mov    -0x8(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OneWireDataGetNonBlocking>:
movslq %edi,%rcx
xor    %eax,%eax
testl  $0x100,(%rcx)
jne    1117 <OneWireDataGetNonBlocking+0x17>
mov    0xc(%rcx),%eax
mov    %eax,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @OneWireDataGetNonBlocking(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 0
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 256
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %21
14: ; preds = %2
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 12
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
%19 = load volatile i32, i32* %18
%20 = load i32*, i32** %5
store i32 %19, i32* %20
store i32 1, i32* %3
br label %21
21: ; preds = %14, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @OneWireDataGetNonBlocking(i32 %0, i32* nocapture writeonly %1) {
%3 = sext i32 %0 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 256
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = add nsw i32 %0, 12
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
store i32 %12, i32* %1
br label %13
13: ; preds = %2, %8
%14 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %14
}
/* Variables and functions */
int kernel___Pointer_address_is_null___impl(void *self) { return self == NULL; }


x86 assembly (clang, -O0):
<kernel___Pointer_address_is_null___impl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel___Pointer_address_is_null___impl>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @kernel___Pointer_address_is_null___impl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @kernel___Pointer_address_is_null___impl(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *fileInit(char *filename, char *permission) {
  FILE *filePointer = fopen(filename, permission);
  return filePointer;
}


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

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

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

LLVM IR (-O2):
define noalias i32* @fileInit(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
void ff_hevc_put_hevc_uni_w_qpel_h24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h24_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ static_assert(int);
scalar_t__ unknown1();
int main() {
  int a = 0;
  int j;
  int m;
  int __BLAST_NONDET;
  if (m <= 0)
    return 0;
  for (j = 1; j <= m; j++) {
    if (unknown1())
      a++;
    else
      a--;
  }
  static_assert(a >= -m);
  static_assert(a <= m);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x10(%rbp)
jg     114c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    11c4 <main+0xa4>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     119a <main+0x7a>
mov    $0x0,%al
call   1030 <unknown1@plt>
cmp    $0x0,%rax
je     117e <main+0x5e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1187 <main+0x67>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    118c <main+0x6c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <main+0x33>
mov    -0x8(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
cmp    %ecx,%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <static_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 0, i32* %1
br label %39
9: ; preds = %0
store i32 1, i32* %3
br label %10
10: ; preds = %24, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = call i64 (...) @unknown1()
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %23
20: ; preds = %14
%21 = load i32, i32* %2
%22 = add nsw i32 %21, -1
store i32 %22, i32* %2
br label %23
23: ; preds = %20, %17
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %10
27: ; preds = %10
%28 = load i32, i32* %2
%29 = load i32, i32* %4
%30 = sub nsw i32 0, %29
%31 = icmp sge i32 %28, %30
%32 = zext i1 %31 to i32
%33 = call i32 @static_assert(i32 %32)
%34 = load i32, i32* %2
%35 = load i32, i32* %4
%36 = icmp sle i32 %34, %35
%37 = zext i1 %36 to i32
%38 = call i32 @static_assert(i32 %37)
br label %39
39: ; preds = %27, %8
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void NewEntry(int p1, int p2) { return; }


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

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

LLVM IR (-O0):
define void @NewEntry(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @NewEntry(i32 %0, i32 %1) {
ret void
}
unsigned testfun(unsigned val) { return val + val; }


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

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

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

LLVM IR (-O2):
define i32 @testfun(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
void __attribute__((dj)) foo() {}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
float berechne_durchschnittsverbrauch_l_pro_100km(float strecke,
                                                  float verbrauch) {
  float durchschnittsverbrauch = 0.0;
  durchschnittsverbrauch = verbrauch / (strecke / 100);
  return durchschnittsverbrauch;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xed8(%rip),%xmm2
divss  %xmm2,%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
divss  0xef8(%rip),%xmm0
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @berechne_durchschnittsverbrauch_l_pro_100km(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0.000000e+00, float* %5
%6 = load float, float* %4
%7 = load float, float* %3
%8 = fdiv float %7, 1.000000e+02
%9 = fdiv float %6, %8
store float %9, float* %5
%10 = load float, float* %5
ret float %10
}

LLVM IR (-O2):
define float @berechne_durchschnittsverbrauch_l_pro_100km(float %0, float %1) {
%3 = fdiv float %0, 1.000000e+02
%4 = fdiv float %1, %3
ret float %4
}
void ds_code_load_rb(void) {}


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

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

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

LLVM IR (-O2):
define void @ds_code_load_rb() {
ret void
}
/* Type definitions */
typedef int __u8;
typedef int const __u16;

/* Variables and functions */
__u16 __get_unaligned_be16(const __u8 *p) { return p[0] << 8 | p[1]; }


x86 assembly (clang, -O0):
<__get_unaligned_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_unaligned_be16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__get_unaligned_be16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @__get_unaligned_be16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
unsigned long long ullsum(unsigned long long a, unsigned long long b) {
  return a + b;
}


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

x86 assembly (clang, -O2):
<ullsum>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @ullsum(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @ullsum(i64 %0, i64 %1) {
%3 = add i64 %1, %0
ret i64 %3
}
void int2le(unsigned char *addr, unsigned int val) {
  addr[0] = val & 0xff;
  addr[1] = (val >> 8) & 0xff;
  addr[2] = (val >> 16) & 0xff;
  addr[3] = (val >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<int2le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2le>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @int2le(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = lshr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = lshr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @int2le(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
int fun562() { return 562; }


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

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

LLVM IR (-O0):
define i32 @fun562() {
ret i32 562
}

LLVM IR (-O2):
define i32 @fun562() {
ret i32 562
}
/* Variables and functions */
int /*<<< orphan*/ down_adjust(int *, int);
void create(int heap[]) {
  int i, n;
  n = heap[0];
  for (i = n / 2; i >= 1; i--)
    down_adjust(heap, i);
}


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

x86 assembly (clang, -O2):
<create>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%ebx
cmp    $0x2,%ebx
jl     1134 <create+0x24>
mov    %rdi,%r14
shr    %ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <down_adjust@plt>
lea    -0x1(%rbx),%eax
cmp    $0x1,%ebx
mov    %eax,%ebx
ja     1120 <create+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @create(i32* %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = lshr i32 %2, 1
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @down_adjust(i32* %0, i32 %7)
%9 = add nsw i32 %7, -1
%10 = icmp ugt i32 %7, 1
br i1 %10, label %6, label %11
11: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int suma, a;
  suma = 0;
  a = 11;
  while (a <= 50) {
    suma = suma + a;
    a++;
  }
  printf("suma liczb od 11 do 50=%d\n", suma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jg     114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <main+0x1d>
mov    -0x8(%rbp),%esi
lea    0xea8(%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
mov    $0x4c4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"suma liczb od 11 do 50=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 11, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 50
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = load i32, i32* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"suma liczb od 11 do 50=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 1220)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_head(void) {
  printf("\nPC   A  SZHPNC I  IFF BC   DE   HL   A'F' B'C' D'E' H'L' IX   IY   "
         "SP\n");
}


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

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

LLVM IR (-O0):
@.str = [72 x i8] c"\0APC A SZHPNC I IFF BC DE HL A'F' B'C' D'E' H'L' IX IY SP\0A\00"
define void @print_head() {
%1 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [71 x i8] c"\0APC A SZHPNC I IFF BC DE HL A'F' B'C' D'E' H'L' IX IY SP\00"
define void @print_head() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str, i64 0, i64 0))
ret void
}
void zError(void) {}


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

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

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

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

/* Variables and functions */
int time(int /*<<< orphan*/);
time_t realtime(time_t exptime) {
  time_t now;
  if (exptime == 0)
    return 0;
  if (exptime > 60 * 60 * 24 * 30)
    return exptime;
  else {
    now = time(0);
    return exptime + now;
  }
}


x86 assembly (clang, -O0):
<realtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <realtime+0x21>
movl   $0x0,-0x4(%rbp)
jmp    115c <realtime+0x4c>
cmpl   $0x278d00,-0x8(%rbp)
jle    1149 <realtime+0x39>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <realtime+0x4c>
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realtime>:
push   %rbx
test   %edi,%edi
je     112a <realtime+0x1a>
mov    %edi,%ebx
cmp    $0x278d00,%edi
jg     112c <realtime+0x1c>
xor    %edi,%edi
call   1030 <time@plt>
add    %eax,%ebx
jmp    112c <realtime+0x1c>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @realtime(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = icmp sgt i32 %0, 2592000
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @time(i32 0)
%7 = add nsw i32 %6, %0
br label %8
8: ; preds = %3, %1, %5
%9 = phi i32 [ %7, %5 ], [ 0, %1 ], [ %0, %3 ]
ret i32 %9
}