xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ http_send_data(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void http_send_string(int fd, char *data) {
  http_send_data(fd, data, strlen(data));
}


x86 assembly (clang, -O0):
<http_send_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <http_send_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_send_string>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <http_send_data@plt>

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

LLVM IR (-O2):
define void @http_send_string(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @http_send_data(i32 %0, i8* %1, i32 %3)
ret void
}
const char *fe_warp_piecewise_linear_doc() {
  return "piecewise_linear :== < w' = a * w, w < F >";
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"piecewise_linear :== < w' = a * w, w < F >\00"
define i8* @fe_warp_piecewise_linear_doc() {
ret i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [43 x i8] c"piecewise_linear :== < w' = a * w, w < F >\00"
define i8* @fe_warp_piecewise_linear_doc() {
ret i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct comp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CloseBreezeSimulation(int);
int /*<<< orphan*/ printf(char *);
void BrzVariable_requp(struct comp *comp, int port) {
  printf("BrzVariable_requp: This code should never be reached\n");
  CloseBreezeSimulation(2);
}


x86 assembly (clang, -O0):
<BrzVariable_requp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <CloseBreezeSimulation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzVariable_requp>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <CloseBreezeSimulation@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
@.str = [54 x i8] c"BrzVariable_requp: This code should never be reached\0A\00"
define void @BrzVariable_requp(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @CloseBreezeSimulation(i32 2)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
@str = [53 x i8] c"BrzVariable_requp: This code should never be reached\00"
define void @BrzVariable_requp(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @CloseBreezeSimulation(i32 2)
ret void
}
double jd2jcent(double jd) { return (jd - 2451545.0) / 36525.0; }


x86 assembly (clang, -O0):
<jd2jcent>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jd2jcent>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @jd2jcent(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x4142B42C80000000
%5 = fdiv double %4, 3.652500e+04
ret double %5
}

LLVM IR (-O2):
define double @jd2jcent(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
ret double %3
}
int is_file(void *name, void *type) {
  if ((*(unsigned long long *)name) == 0ULL)
    return 0;
  if ((*(unsigned long long *)type) == 0ULL)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1126 <is_file+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1147 <is_file+0x47>
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1140 <is_file+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1147 <is_file+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file>:
cmpq   $0x0,(%rdi)
je     1110 <is_file+0x10>
xor    %eax,%eax
cmpq   $0x0,(%rsi)
setne  %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_file(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = bitcast i8* %1 to i64*
%8 = load i64, i64* %7
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ 0, %2 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void smemstat_top_setup(void) {
  (void)initscr();
  (void)cbreak();
  (void)noecho();
  (void)nodelay(stdscr, 1);
  (void)keypad(stdscr, 1);
  (void)curs_set(0);
}


x86 assembly (clang, -O0):
<smemstat_top_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1060 <nodelay@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
call   1080 <curs_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smemstat_top_setup>:
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
mov    0x2e6b(%rip),%rbx
mov    (%rbx),%edi
mov    $0x1,%esi
call   1060 <nodelay@plt>
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %edi,%edi
pop    %rbx
jmp    1080 <curs_set@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @smemstat_top_setup() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = call i32 @nodelay(i32 %4, i32 1)
%6 = load i32, i32* @stdscr
%7 = call i32 @keypad(i32 %6, i32 1)
%8 = call i32 @curs_set(i32 0)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @smemstat_top_setup() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = tail call i32 @nodelay(i32 %4, i32 1)
%6 = load i32, i32* @stdscr
%7 = tail call i32 @keypad(i32 %6, i32 1)
%8 = tail call i32 @curs_set(i32 0)
ret void
}
int isClosingBracket(char ch) {
  if (ch == '}' || ch == ']' || ch == ')') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isClosingBracket>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7d,%eax
je     1131 <isClosingBracket+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x5d,%eax
je     1131 <isClosingBracket+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x29,%eax
jne    113d <isClosingBracket+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <isClosingBracket+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isClosingBracket>:
mov    $0x1,%eax
cmp    $0x29,%dil
je     1119 <isClosingBracket+0x19>
cmp    $0x5d,%dil
je     1119 <isClosingBracket+0x19>
cmp    $0x7d,%dil
je     1119 <isClosingBracket+0x19>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isClosingBracket(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 125
br i1 %6, label %15, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 93
br i1 %10, label %15, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 41
br i1 %14, label %15, label %16
15: ; preds = %11, %7, %1
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @isClosingBracket(i8 signext %0) {
switch i8 %0, label %2 [
i8 125, label %3
i8 93, label %3
i8 41, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int ade7754_probe_trigger(struct iio_dev *indio_dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define i32 @ade7754_probe_trigger(%struct.iio_dev* nocapture readnone %0) {
ret i32 0
}
char *strpbrk(const char *str1, const char *str2) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strpbrk(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
int gaspi_thread_sleep(int msecs) {
  struct timespec sleep_time, rem;
  sleep_time.tv_sec = msecs / 1000;
  sleep_time.tv_nsec = 0;
  return nanosleep(&sleep_time, &rem);
}


x86 assembly (clang, -O0):
<gaspi_thread_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gaspi_thread_sleep>:
sub    $0x28,%rsp
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
mov    %eax,0x8(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i32 @gaspi_thread_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %8
%9 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret i32 %9
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i32 @gaspi_thread_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = sdiv i32 %0, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret i32 %9
}
int jdksavdecc_util_delim(char c) { return c == ':' || c == '-'; }


x86 assembly (clang, -O0):
<jdksavdecc_util_delim>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x2(%rbp)
je     1129 <jdksavdecc_util_delim+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jdksavdecc_util_delim>:
cmp    $0x3a,%dil
sete   %al
cmp    $0x2d,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @jdksavdecc_util_delim(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 58
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @jdksavdecc_util_delim(i8 signext %0) {
%2 = icmp eq i8 %0, 58
%3 = icmp eq i8 %0, 45
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_set_sample_format() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_set_sample_format"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [49 x i8] c"NOT IMPLEMENTED:pa_format_info_set_sample_format\00"
define i32 @pa_format_info_set_sample_format() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
float _sinhf(float);
float sinhf(float x) { return _sinhf(x); }


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

x86 assembly (clang, -O2):
<sinhf>:
jmp    1030 <_sinhf@plt>

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

LLVM IR (-O2):
define float @sinhf(float %0) {
%2 = tail call float @_sinhf(float %0)
ret float %2
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
scalar_t__ bwi_bft(int, struct task_struct *, int);
void bwi_give_server_indirect(struct task_struct *direct_desc, int count) {
  int depth = 0;
  while (bwi_bft(depth, direct_desc, count) != 0)
    depth++;
}


x86 assembly (clang, -O0):
<bwi_give_server_indirect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <bwi_bft@plt>
cmp    $0x0,%rax
je     114d <bwi_give_server_indirect+0x3d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <bwi_give_server_indirect+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwi_give_server_indirect>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <bwi_bft@plt>
add    $0x1,%ebp
test   %rax,%rax
jne    1120 <bwi_give_server_indirect+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @bwi_give_server_indirect(%struct.task_struct* %0, i32 %1) {
%3 = alloca %struct.task_struct*
%4 = alloca i32
%5 = alloca i32
store %struct.task_struct* %0, %struct.task_struct** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %12, %2
%7 = load i32, i32* %5
%8 = load %struct.task_struct*, %struct.task_struct** %3
%9 = load i32, i32* %4
%10 = call i64 @bwi_bft(i32 %7, %struct.task_struct* %8, i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %6
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @bwi_give_server_indirect(%struct.task_struct* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i64 @bwi_bft(i32 %4, %struct.task_struct* %0, i32 %1)
%6 = icmp eq i64 %5, 0
%7 = add nuw nsw i32 %4, 1
br i1 %6, label %8, label %3
8: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  FILE *fp;
  if ((fp = fopen("/tmp/MYFIFO", "w")) != NULL) {
    fputs(argv[1], fp);
    fclose(fp);
  } else
    return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    0xeb8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1186 <main+0x56>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
jmp    118d <main+0x5d>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     116a <main+0x3a>
mov    %rax,%rbx
mov    0x8(%r14),%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
jmp    116f <main+0x3f>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/tmp/MYFIFO\00"
@.str.1 = [2 x i8] c"w\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %7, i32** %6
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = load i32*, i32** %6
%14 = call i32 @fputs(i8* %12, i32* %13)
%15 = load i32*, i32** %6
%16 = call i32 @fclose(i32* %15)
br label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %18
18: ; preds = %17, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [12 x i8] c"/tmp/MYFIFO\00"
@.str.1 = [2 x i8] c"w\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @fputs(i8* %7, i32* %3)
%9 = tail call i32 @fclose(i32* %3)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %11
}
void UsageFault_Handler(void) {
  ;
  while (1) {
  }
}


x86 assembly (clang, -O0):
<UsageFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UsageFault_Handler+0x9>
jmp    1109 <UsageFault_Handler+0x9>

x86 assembly (clang, -O2):
<UsageFault_Handler>:
jmp    1100 <UsageFault_Handler>

LLVM IR (-O0):
define void @UsageFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @UsageFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ win_marks;

/* Variables and functions */
int /*<<< orphan*/ complete_from_string_list(char const *, char const **, int);
void complete_winrun(const char str[]) {
  static const char *win_marks[] = {"^", "$", "%", ".", ","};
  complete_from_string_list(str, win_marks,
                            (sizeof(win_marks) / sizeof((win_marks)[0])));
}


x86 assembly (clang, -O0):
<complete_winrun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f09(%rip),%rsi
mov    $0x5,%edx
call   1030 <complete_from_string_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<complete_winrun>:
lea    0x2f19(%rip),%rsi
mov    $0x5,%edx
jmp    1030 <complete_from_string_list@plt>

LLVM IR (-O0):
@complete_winrun.win_marks = internal global [5 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0)]
@.str = [2 x i8] c"^\00"
@.str.1 = [2 x i8] c"$\00"
@.str.2 = [2 x i8] c"%\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [2 x i8] c",\00"
define void @complete_winrun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @complete_from_string_list(i8* %3, i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @complete_winrun.win_marks, i64 0, i64 0), i32 5)
ret void
}

LLVM IR (-O2):
@complete_winrun.win_marks = internal global [5 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0)]
@.str = [2 x i8] c"^\00"
@.str.1 = [2 x i8] c"$\00"
@.str.2 = [2 x i8] c"%\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [2 x i8] c",\00"
define void @complete_winrun(i8* %0) {
%2 = tail call i32 @complete_from_string_list(i8* %0, i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @complete_winrun.win_marks, i64 0, i64 0), i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int stoi(char *snum) {
  int i;
  sscanf(snum, "%d", &i);
  return i;
}


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

x86 assembly (clang, -O2):
<stoi>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @stoi(i8* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
int __isnonblank(int ch) { return (ch != ' ' && ch != '\t' && ch != '#'); }


x86 assembly (clang, -O0):
<__isnonblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <__isnonblank+0x2f>
xor    %eax,%eax
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <__isnonblank+0x2f>
cmpl   $0x23,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isnonblank>:
xor    %eax,%eax
cmp    $0x9,%edi
je     110c <__isnonblank+0xc>
cmp    $0x20,%edi
jne    110d <__isnonblank+0xd>
ret
xor    %eax,%eax
cmp    $0x23,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @__isnonblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 32
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 9
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 35
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ false, %5 ], [ false, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @__isnonblank(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp ne i32 %0, 35
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %2
%6 = phi i32 [ 0, %1 ], [ %4, %2 ], [ 0, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  time_t rawtime;
  time(&rawtime);
  struct tm *info = localtime(&rawtime);
  printf("%s", asctime(info));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1060 <time@plt>
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <asctime@plt>
mov    %rax,%rsi
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1040 <asctime@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.tm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @time(i32* %6)
%9 = call %struct.tm* @localtime(i32* %6)
store %struct.tm* %9, %struct.tm** %7
%10 = load %struct.tm*, %struct.tm** %7
%11 = call i8* @asctime(%struct.tm* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i8* @asctime(%struct.tm* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char *);
int /*<<< orphan*/ stderr;
char *strerror(int);
void __attribute__((noreturn)) pr_error(const char *msg) {
  (void)fprintf(stderr, "Fatal error: %s: errno=%d (%s)\n", msg, errno,
                strerror(errno));
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<pr_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    %rax,%r8
lea    0xe82(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pr_error>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2ea2(%rip),%rax
mov    (%rax),%ebp
mov    0x2e91(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1050 <strerror@plt>
lea    0xea9(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %ebx,%ecx
mov    %rax,%r8
call   1030 <fprintf@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Fatal error: %s: errno=%d (%s)\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @pr_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5, i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Fatal error: %s: errno=%d (%s)\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @pr_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
int execute_sched_rr_get_interval() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_rr_get_interval() {
ret i32 0
}
double MMHGtoMB(double MMHG) {
  double MB = 1.333224 * MMHG;
  return MB;
}


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

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

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

LLVM IR (-O2):
define double @MMHGtoMB(double %0) {
%2 = fmul double %0, 0x3FF554E2B063E07A
ret double %2
}
void foo_1_1_1_2_1_2_2_1_1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *ptls_encode_quicint(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
uint8_t *quicly_encode_streams_blocked_frame(uint8_t *dst, int uni,
                                             uint64_t count) {
  *dst++ = uni ? 23 : 22;
  dst = ptls_encode_quicint(dst, count);
  return dst;
}


x86 assembly (clang, -O0):
<quicly_encode_streams_blocked_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%edx
mov    $0x16,%ecx
mov    $0x17,%eax
cmp    $0x0,%edx
cmovne %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicly_encode_streams_blocked_frame>:
cmp    $0x1,%esi
mov    $0x17,%eax
sbb    $0x0,%eax
mov    %eax,(%rdi)
add    $0x4,%rdi
mov    %edx,%esi
jmp    1030 <ptls_encode_quicint@plt>

LLVM IR (-O0):
define i32* @quicly_encode_streams_blocked_frame(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* %5
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 23, i32 22
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %4
store i32 %10, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = call i32* @ptls_encode_quicint(i32* %13, i32 %14)
store i32* %15, i32** %4
%16 = load i32*, i32** %4
ret i32* %16
}

LLVM IR (-O2):
define i32* @quicly_encode_streams_blocked_frame(i32* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i32 22, i32 23
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %0
%7 = tail call i32* @ptls_encode_quicint(i32* %6, i32 %2)
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ write_src(char *);
void sub_handler(void) {
  write_src("{\n");
  write_src("imm_t b = POP();\n");
  write_src("imm_t a = POP();\n");
  write_src("PUSH(a-b);\n");
  write_src("}\n");
}


x86 assembly (clang, -O0):
<sub_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <write_src@plt>
lea    0xedc(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee2(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <write_src@plt>
lea    0xedf(%rip),%rdi
call   1030 <write_src@plt>
lea    0xee5(%rip),%rdi
call   1030 <write_src@plt>
lea    0xeeb(%rip),%rdi
call   1030 <write_src@plt>
lea    0xeeb(%rip),%rdi
pop    %rax
jmp    1030 <write_src@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"{\0A\00"
@.str.1 = [18 x i8] c"imm_t b = POP();\0A\00"
@.str.2 = [18 x i8] c"imm_t a = POP();\0A\00"
@.str.3 = [12 x i8] c"PUSH(a-b);\0A\00"
@.str.4 = [3 x i8] c"}\0A\00"
define void @sub_handler() {
%1 = call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @write_src(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"{\0A\00"
@.str.1 = [18 x i8] c"imm_t b = POP();\0A\00"
@.str.2 = [18 x i8] c"imm_t a = POP();\0A\00"
@.str.3 = [12 x i8] c"PUSH(a-b);\0A\00"
@.str.4 = [3 x i8] c"}\0A\00"
define void @sub_handler() {
%1 = tail call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @write_src(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @write_src(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @write_src(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void vt100_cursor_down(void) {
  printf("\x1B[B");
  fflush(stdout);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[B\00"
@stdout = global i32 0
define void @vt100_cursor_down() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[B\00"
@stdout = global i32 0
define void @vt100_cursor_down() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ mtest_aug_allocations(int);
void *mtest_calloc(size_t size, size_t count) {
  mtest_aug_allocations(1);
  return calloc(size, count);
}


x86 assembly (clang, -O0):
<mtest_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <mtest_aug_allocations@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtest_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <mtest_aug_allocations@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @mtest_calloc(i64 %0, i64 %1) {
%3 = tail call i32 @mtest_aug_allocations(i32 1)
%4 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ send(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void send_(int sock, char *msg) {
  if (!send(sock, msg, strlen(msg))) {
    error("send error");
  }
}


x86 assembly (clang, -O0):
<send_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <send@plt>
cmp    $0x0,%eax
jne    1179 <send_+0x49>
lea    0xe8c(%rip),%rdi
call   1050 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <send@plt>
test   %eax,%eax
je     1157 <send_+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xea2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <error@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"send error\00"
define void @send_(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
f(struct { int a, b, c; } * p) { return p->c; }


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

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

LLVM IR (-O0):
%struct.anon = type { i32, i32, i32 }
define i32 @f(%struct.anon* %0) {
%2 = alloca %struct.anon*
store %struct.anon* %0, %struct.anon** %2
%3 = load %struct.anon*, %struct.anon** %2
%4 = getelementptr inbounds %struct.anon, %struct.anon* %3, i32 0, i32 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.anon = type { i32, i32, i32 }
define i32 @f(%struct.anon* nocapture %0) {
%2 = getelementptr inbounds %struct.anon, %struct.anon* %0, i64 0, i32 2
%3 = load i32, i32* %2
ret i32 %3
}
__attribute__((weak)) void BusFault_Handler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<BusFault_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <BusFault_Handler+0x9>
jmp    1109 <BusFault_Handler+0x9>

x86 assembly (clang, -O2):
<BusFault_Handler>:
jmp    1100 <BusFault_Handler>

LLVM IR (-O0):
define weak void @BusFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @BusFault_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ icmpSend();
void sigAlrm(int signo) {
  icmpSend();
  alarm(1);
  return;
}


x86 assembly (clang, -O0):
<sigAlrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <icmpSend@plt>
mov    $0x1,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigAlrm>:
push   %rax
xor    %eax,%eax
call   1030 <icmpSend@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
define void @sigAlrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @icmpSend()
%4 = call i32 @alarm(i32 1)
ret void
}

LLVM IR (-O2):
define void @sigAlrm(i32 %0) {
%2 = tail call i32 (...) @icmpSend()
%3 = tail call i32 @alarm(i32 1)
ret void
}
unsigned runelen(const unsigned short *s) {
  const unsigned short *e = s;
  while (*e++ != 0)
    continue;
  return e - s - 1;
}


x86 assembly (clang, -O0):
<runelen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x10(%rbp)
movzwl (%rax),%eax
cmp    $0x0,%eax
je     1130 <runelen+0x30>
jmp    1110 <runelen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x1,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<runelen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpw   $0x0,(%rdi,%rax,1)
lea    0x2(%rax),%rax
jne    1110 <runelen+0x10>
shr    %rax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @runelen(i16* %0) {
%2 = alloca i16*
%3 = alloca i16*
store i16* %0, i16** %2
%4 = load i16*, i16** %2
store i16* %4, i16** %3
br label %5
5: ; preds = %11, %1
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i32 1
store i16* %7, i16** %3
%8 = load i16, i16* %6
%9 = zext i16 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
%13 = load i16*, i16** %3
%14 = load i16*, i16** %2
%15 = ptrtoint i16* %13 to i64
%16 = ptrtoint i16* %14 to i64
%17 = sub i64 %15, %16
%18 = sdiv exact i64 %17, 2
%19 = sub nsw i64 %18, 1
%20 = trunc i64 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @runelen(i16* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i16* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i16, i16* %3, i64 1
%5 = load i16, i16* %3
%6 = icmp eq i16 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i16* %4 to i64
%9 = ptrtoint i16* %0 to i64
%10 = sub i64 %8, %9
%11 = lshr exact i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = add i32 %12, -1
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ print_color_raw(float);
void print_color(float f) {
  f -= 50;
  print_color_raw(f * f * f / 2500 + 50);
}


x86 assembly (clang, -O0):
<print_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xeba(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xeaa(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <print_color_raw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_color>:
addss  0xee8(%rip),%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
divss  0xed9(%rip),%xmm0
addss  0xed5(%rip),%xmm0
jmp    1030 <print_color_raw@plt>

LLVM IR (-O0):
define void @print_color(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 5.000000e+01
store float %4, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = fdiv float %9, 2.500000e+03
%11 = fadd float %10, 5.000000e+01
%12 = call i32 @print_color_raw(float %11)
ret void
}

LLVM IR (-O2):
define void @print_color(float %0) {
%2 = fadd float %0, -5.000000e+01
%3 = fmul float %2, %2
%4 = fmul float %2, %3
%5 = fdiv float %4, 2.500000e+03
%6 = fadd float %5, 5.000000e+01
%7 = tail call i32 @print_color_raw(float %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void func2() {
  int i = 0;
  return;
  bar();
  i = 2;
}


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

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

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

LLVM IR (-O2):
define void @func2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pn_fini();
__attribute__((destructor)) void fini(void) { pn_fini(); }


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = call i32 (...) @pn_fini()
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = tail call i32 (...) @pn_fini()
ret void
}
int MPI_Op_free(int *op) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @MPI_Op_free(i32* nocapture readnone %0) {
ret i32 0
}