xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ntpdate();
main() { ntpdate(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @ntpdate()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ntpdate()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ absolutey();
int /*<<< orphan*/ adc16(int /*<<< orphan*/);
int /*<<< orphan*/ readmemw65816(int /*<<< orphan*/);
void adcAbsy16(void) { adc16(readmemw65816(absolutey())); }


x86 assembly (clang, -O0):
<adcAbsy16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <absolutey@plt>
mov    %eax,%edi
call   1040 <readmemw65816@plt>
mov    %eax,%edi
call   1050 <adc16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcAbsy16>:
push   %rax
xor    %eax,%eax
call   1030 <absolutey@plt>
mov    %eax,%edi
call   1040 <readmemw65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <adc16@plt>

LLVM IR (-O0):
define void @adcAbsy16() {
%1 = call i32 (...) @absolutey()
%2 = call i32 @readmemw65816(i32 %1)
%3 = call i32 @adc16(i32 %2)
ret void
}

LLVM IR (-O2):
define void @adcAbsy16() {
%1 = tail call i32 (...) @absolutey()
%2 = tail call i32 @readmemw65816(i32 %1)
%3 = tail call i32 @adc16(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, char *, char *, int /*<<< orphan*/ *);
int main() { execl("/bin/ls", "ls", "-al", "/etc/passwd", NULL); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee3(%rip),%rsi
lea    0xedf(%rip),%rdx
lea    0xedc(%rip),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <execl@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
lea    0xee2(%rip),%rdx
lea    0xedf(%rip),%rcx
xor    %r8d,%r8d
call   1030 <execl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [4 x i8] c"-al\00"
@.str.3 = [12 x i8] c"/etc/passwd\00"
define i32 @main() {
%1 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"/bin/ls\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [4 x i8] c"-al\00"
@.str.3 = [12 x i8] c"/etc/passwd\00"
define i32 @main() {
%1 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32* null)
ret i32 0
}
int test_imm_EEint8_reg(signed char val) {
  return ((val) & (0xEE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EEint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xee,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EEint8_reg>:
test   $0xee,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EEint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 238
%6 = icmp ne i32 %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_EEint8_reg(i8 signext %0) {
%2 = and i8 %0, -18
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float CelParaFahr(float c) {
  float f;
  f = c * 1.8 + 32;
  return f;
}


x86 assembly (clang, -O0):
<CelParaFahr>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CelParaFahr>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @CelParaFahr(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 1.800000e+00, double 3.200000e+01)
%7 = fptrunc double %6 to float
store float %7, float* %3
%8 = load float, float* %3
ret float %8
}

LLVM IR (-O2):
define float @CelParaFahr(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fptrunc double %3 to float
ret float %4
}
/* Type definitions */
struct ifaddrs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeifaddrs(struct ifaddrs *);
void __dispose_if_list_3(struct ifaddrs **if_list) {
  if (if_list && *if_list) {
    freeifaddrs(*if_list);
    *if_list = 0;
  }
}


x86 assembly (clang, -O0):
<__dispose_if_list_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <__dispose_if_list_3+0x3c>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114c <__dispose_if_list_3+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <freeifaddrs@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dispose_if_list_3>:
push   %rbx
test   %rdi,%rdi
je     112d <__dispose_if_list_3+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <__dispose_if_list_3+0x1d>
call   1030 <freeifaddrs@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.ifaddrs = type { i32 }
define void @__dispose_if_list_3(%struct.ifaddrs** %0) {
%2 = icmp eq %struct.ifaddrs** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.ifaddrs*, %struct.ifaddrs** %0
%5 = icmp eq %struct.ifaddrs* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @freeifaddrs(%struct.ifaddrs* %4)
store %struct.ifaddrs* null, %struct.ifaddrs** %0
br label %8
8: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello world\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void trim_back(char *buffer) {
  do {
    *buffer-- = 0;
  } while (*buffer == ' ' || *buffer == '\t');
}


x86 assembly (clang, -O0):
<trim_back>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     113f <trim_back+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1108 <trim_back+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim_back>:
movb   $0x0,(%rdi)
movzbl -0x1(%rdi),%eax
add    $0xffffffffffffffff,%rdi
cmp    $0x9,%al
je     1100 <trim_back>
cmp    $0x20,%al
je     1100 <trim_back>
ret

LLVM IR (-O0):
define void @trim_back(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 -1
store i8* %5, i8** %2
store i8 0, i8* %4
br label %6
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 32
br i1 %10, label %16, label %11
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 9
br label %16
16: ; preds = %11, %6
%17 = phi i1 [ true, %6 ], [ %15, %11 ]
br i1 %17, label %3, label %18
18: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @trim_back(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %4, %6 ]
%4 = getelementptr inbounds i8, i8* %3, i64 -1
store i8 0, i8* %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %2, %2
br label %2
7: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *scan_JPEG(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
char *detect_threat(FILE *f, char *type) {
  if (strcmp(type, "JPEG Image File         ") == 0)
    return scan_JPEG(f);
  return NULL;
}


x86 assembly (clang, -O0):
<detect_threat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115c <detect_threat+0x3c>
mov    -0x10(%rbp),%rdi
call   1040 <scan_JPEG@plt>
mov    %rax,-0x8(%rbp)
jmp    1164 <detect_threat+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detect_threat>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     113f <detect_threat+0x1f>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <scan_JPEG@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"JPEG Image File \00"
define i8* @detect_threat(i32* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32*, i32** %4
%11 = call i8* @scan_JPEG(i32* %10)
store i8* %11, i8** %3
br label %13
12: ; preds = %2
store i8* null, i8** %3
br label %13
13: ; preds = %12, %9
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [25 x i8] c"JPEG Image File \00"
define i8* @detect_threat(i32* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i8* @scan_JPEG(i32* %0)
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ LCD_SET_A0();
int /*<<< orphan*/ Send1(char);
void LCD_X_Write01(char Data) {
  ;
  LCD_SET_A0();
  Send1(Data);
  ;
}


x86 assembly (clang, -O0):
<LCD_X_Write01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <LCD_SET_A0@plt>
movsbl -0x1(%rbp),%edi
call   1030 <Send1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_X_Write01>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <LCD_SET_A0@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <Send1@plt>

LLVM IR (-O0):
define void @LCD_X_Write01(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @LCD_SET_A0()
%4 = load i8, i8* %2
%5 = call i32 @Send1(i8 signext %4)
ret void
}

LLVM IR (-O2):
define void @LCD_X_Write01(i8 signext %0) {
%2 = tail call i32 (...) @LCD_SET_A0()
%3 = tail call i32 @Send1(i8 signext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ code;

/* Variables and functions */
int /*<<< orphan*/ __console_write(char const *, int);
void console_green() {
  static const char code[] = {0x1b, '[', '3', '2', ';', '0', '1', 'm'};
  __console_write(code, sizeof(code));
}


x86 assembly (clang, -O0):
<console_green>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <__console_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_green>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <__console_write@plt>

LLVM IR (-O0):
@console_green.code = internal constant [8 x i8] c"\1B[32;01m"
define void @console_green() {
%1 = call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_green.code, i64 0, i64 0), i32 8)
ret void
}

LLVM IR (-O2):
@console_green.code = internal constant [8 x i8] c"\1B[32;01m"
define void @console_green() {
%1 = tail call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_green.code, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_batch_context_recv_status_on_client_trailing_metadata() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_batch_context_recv_status_on_client_trailing_metadata>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_batch_context_recv_status_on_client_trailing_metadata>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_status_on_client_trailing_metadata() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_status_on_client_trailing_metadata() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ uwsgi_build_plugin(char *);
int /*<<< orphan*/ uwsgi_exit(int);
void uwsgi_opt_build_plugin(char *opt, char *directory, void *foobar) {
  uwsgi_build_plugin(directory);
  uwsgi_exit(1);
}


x86 assembly (clang, -O0):
<uwsgi_opt_build_plugin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <uwsgi_build_plugin@plt>
mov    $0x1,%edi
call   1040 <uwsgi_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_opt_build_plugin>:
push   %rax
mov    %rsi,%rdi
call   1030 <uwsgi_build_plugin@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <uwsgi_exit@plt>

LLVM IR (-O0):
define void @uwsgi_opt_build_plugin(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 @uwsgi_build_plugin(i8* %7)
%9 = call i32 @uwsgi_exit(i32 1)
ret void
}

LLVM IR (-O2):
define void @uwsgi_opt_build_plugin(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @uwsgi_build_plugin(i8* %1)
%5 = tail call i32 @uwsgi_exit(i32 1)
ret void
}
int writepng(const char *name, int xres, int yres, unsigned char *imgdata) {
  return 2;
}


x86 assembly (clang, -O0):
<writepng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @writepng(i8* nocapture readnone %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ SA1Direct(int);
int /*<<< orphan*/ STZ8(int /*<<< orphan*/);
void Op64M1(void) { STZ8(SA1Direct(2)); }


x86 assembly (clang, -O0):
<Op64M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <SA1Direct@plt>
mov    %eax,%edi
call   1030 <STZ8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op64M1>:
push   %rax
mov    $0x2,%edi
call   1040 <SA1Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STZ8@plt>

LLVM IR (-O0):
define void @Op64M1() {
%1 = call i32 @SA1Direct(i32 2)
%2 = call i32 @STZ8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op64M1() {
%1 = tail call i32 @SA1Direct(i32 2)
%2 = tail call i32 @STZ8(i32 %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void sg_put_unaligned_le24(uint32_t val, void *p) {
  ((uint8_t *)p)[2] = (val >> 16) & 0xff;
  ((uint8_t *)p)[1] = (val >> 8) & 0xff;
  ((uint8_t *)p)[0] = val & 0xff;
}


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

x86 assembly (clang, -O2):
<sg_put_unaligned_le24>:
mov    %edi,%eax
movzbl %ah,%ecx
movzbl %al,%edx
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,0x8(%rsi)
mov    %ecx,0x4(%rsi)
mov    %edx,(%rsi)
ret

LLVM IR (-O0):
define void @sg_put_unaligned_le24(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 = ashr i32 %5, 16
%7 = and i32 %6, 255
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = getelementptr inbounds i32, i32* %9, i64 2
store i32 %7, i32* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = load i8*, i8** %4
%15 = bitcast i8* %14 to i32*
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %13, i32* %16
%17 = load i32, i32* %3
%18 = and i32 %17, 255
%19 = load i8*, i8** %4
%20 = bitcast i8* %19 to i32*
%21 = getelementptr inbounds i32, i32* %20, i64 0
store i32 %18, i32* %21
ret void
}

LLVM IR (-O2):
define void @sg_put_unaligned_le24(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = bitcast i8* %1 to i32*
%6 = getelementptr inbounds i8, i8* %1, i64 8
%7 = bitcast i8* %6 to i32*
store i32 %4, i32* %7
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i8, i8* %1, i64 4
%11 = bitcast i8* %10 to i32*
store i32 %9, i32* %11
%12 = and i32 %0, 255
store i32 %12, i32* %5
ret void
}
void path_001_expected_1(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @path_001_expected_1() {
ret void
}
int open(const char *name, int flags, ...) {}


x86 assembly (clang, -O0):
<open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @open(i8* nocapture readnone %0, i32 %1, ...) {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool UARTBusy(uint32_t ui32Base) {
  ;
  return (((*((volatile unsigned long *)(ui32Base + 0x00000018))) & 0x00000008)
              ? 0x00000001
              : 0x00000000);
}


x86 assembly (clang, -O0):
<UARTBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdx
and    $0x8,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTBusy>:
mov    0x18(%rdi),%rax
shr    $0x3,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @UARTBusy(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 24
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 8
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @UARTBusy(i64 %0) {
%2 = add nsw i64 %0, 24
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = lshr i32 %5, 3
%7 = and i32 %6, 1
ret i32 %7
}
/* Variables and functions */
size_t round_size_to_next_multiple(size_t x, size_t r) {
  r--;
  return (x + r) & ~r;
}


x86 assembly (clang, -O0):
<round_size_to_next_multiple>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rcx
xor    $0xffffffffffffffff,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_size_to_next_multiple>:
lea    (%rdi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
neg    %rsi
and    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @round_size_to_next_multiple(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = add i64 %5, -1
store i64 %6, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = add i64 %7, %8
%10 = load i64, i64* %4
%11 = xor i64 %10, -1
%12 = and i64 %9, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @round_size_to_next_multiple(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = sub i64 0, %1
%6 = and i64 %4, %5
ret i64 %6
}
int f(int x) {
  int i;
  for (i = 0; i < 8 && (x & 1) == 0; x >>= 1, i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x8,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    112c <f+0x2c>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113c <f+0x3c>
jmp    1158 <f+0x58>
jmp    1141 <f+0x41>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <f+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   $0x1,%dil
jne    115b <f+0x5b>
mov    $0x1,%eax
test   $0x2,%dil
jne    115b <f+0x5b>
mov    $0x2,%eax
test   $0x4,%dil
jne    115b <f+0x5b>
mov    $0x3,%eax
test   $0x8,%dil
jne    115b <f+0x5b>
mov    $0x4,%eax
test   $0x10,%dil
jne    115b <f+0x5b>
mov    $0x5,%eax
test   $0x20,%dil
jne    115b <f+0x5b>
mov    $0x6,%eax
test   $0x40,%dil
jne    115b <f+0x5b>
and    $0x80,%edi
cmp    $0x1,%edi
mov    $0x7,%eax
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br label %11
11: ; preds = %7, %4
%12 = phi i1 [ false, %4 ], [ %10, %7 ]
br i1 %12, label %13, label %19
13: ; preds = %11
br label %14
14: ; preds = %13
%15 = load i32, i32* %2
%16 = ashr i32 %15, 1
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %26
4: ; preds = %1
%5 = and i32 %0, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %26
7: ; preds = %4
%8 = and i32 %0, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = and i32 %0, 8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = and i32 %0, 16
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = and i32 %0, 32
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = and i32 %0, 64
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = and i32 %0, 128
%24 = icmp eq i32 %23, 0
%25 = select i1 %24, i32 8, i32 7
br label %26
26: ; preds = %22, %4, %7, %10, %13, %16, %19, %1
%27 = phi i32 [ 0, %1 ], [ 1, %4 ], [ 2, %7 ], [ 3, %10 ], [ 4, %13 ], [ 5, %16 ], [ 6, %19 ], [ %25, %22 ]
ret i32 %27
}
/* Variables and functions */
double __floatsidf(int);
float __floatsisf(int l) {
  double foo = __floatsidf(l);
  return foo;
}


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

x86 assembly (clang, -O2):
<__floatsisf>:
push   %rax
call   1030 <__floatsidf@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__floatsisf(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call double @__floatsidf(i32 %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @__floatsisf(i32 %0) {
%2 = tail call double @__floatsidf(i32 %0)
%3 = fptrunc double %2 to float
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: emitc [-n] [-s] [-l]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: emitc [-n] [-s] [-l]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: emitc [-n] [-s] [-l]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ cubictcp_unregister();
void module_unregister_fake(void) {
  if (0)
    cubictcp_unregister();
}


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

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

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

LLVM IR (-O2):
define void @module_unregister_fake() {
ret void
}
/* Variables and functions */
scalar_t__ mgetline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int lim = 10;
  char c[1000];
  while (mgetline(c, lim) > 0)
    printf("%s\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <mgetline@plt>
cmp    $0x0,%rax
jle    116a <main+0x4a>
lea    -0x3f0(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <mgetline@plt>
test   %rax,%rax
jle    116d <main+0x4d>
lea    0xebd(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <mgetline@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @mgetline(i8* %2, i32 10)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i64 @mgetline(i8* %2, i32 10)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
bool verify_dummy(bool x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @verify_dummy(i32 returned %0) {
ret i32 %0
}
char killchar() { return 0; }


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

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

LLVM IR (-O0):
define signext i8 @killchar() {
ret i8 0
}

LLVM IR (-O2):
define signext i8 @killchar() {
ret i8 0
}
int sock_set_dontfrag(int sock, int val) {}


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

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

LLVM IR (-O0):
define i32 @sock_set_dontfrag(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @sock_set_dontfrag(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int type1(int *, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
          int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int Type(void *v) {
  int *msgvec = v;
  return (type1(msgvec, 0, 0, 0, 0, NULL, NULL));
}


x86 assembly (clang, -O0):
<Type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
movq   $0x0,(%rsp)
call   1030 <type1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Type>:
push   %rax
movq   $0x0,(%rsp)
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <type1@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Type(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @type1(i32* %6, i32 0, i32 0, i32 0, i32 0, i32* null, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @Type(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @type1(i32* %2, i32 0, i32 0, i32 0, i32 0, i32* null, i32* null)
ret i32 %3
}
char hex2int(unsigned char hex) {
  hex = hex - '0';
  if (hex > 9) {
    hex = (hex + '0' - 1) | 0x20;
    hex = hex - 'a' + 11;
  }
  if (hex > 15) {
    hex = 0xFF;
  }
  return hex;
}


x86 assembly (clang, -O0):
<hex2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x9,%eax
jle    113e <hex2int+0x3e>
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
sub    $0x1,%eax
or     $0x20,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0xb,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xf,%eax
jle    114f <hex2int+0x4f>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2int>:
lea    -0x30(%rdi),%eax
add    $0xff,%dil
or     $0x20,%dil
add    $0xaa,%dil
cmp    $0xa,%al
movzbl %al,%eax
movzbl %dil,%ecx
cmovb  %eax,%ecx
cmp    $0x10,%cl
mov    $0xff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @hex2int(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = trunc i32 %5 to i8
store i8 %6, i8* %2
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %8, 9
br i1 %9, label %10, label %22
10: ; preds = %1
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = add nsw i32 %12, 48
%14 = sub nsw i32 %13, 1
%15 = or i32 %14, 32
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
%17 = load i8, i8* %2
%18 = zext i8 %17 to i32
%19 = sub nsw i32 %18, 97
%20 = add nsw i32 %19, 11
%21 = trunc i32 %20 to i8
store i8 %21, i8* %2
br label %22
22: ; preds = %10, %1
%23 = load i8, i8* %2
%24 = zext i8 %23 to i32
%25 = icmp sgt i32 %24, 15
br i1 %25, label %26, label %27
26: ; preds = %22
store i8 -1, i8* %2
br label %27
27: ; preds = %26, %22
%28 = load i8, i8* %2
ret i8 %28
}

LLVM IR (-O2):
define signext i8 @hex2int(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ugt i8 %2, 9
%4 = add i8 %0, -1
%5 = or i8 %4, 32
%6 = add i8 %5, -86
%7 = select i1 %3, i8 %6, i8 %2
%8 = icmp ugt i8 %7, 15
%9 = select i1 %8, i8 -1, i8 %7
ret i8 %9
}
/* Variables and functions */
#define GLUT_KEY_DOWN 131
#define GLUT_KEY_LEFT 130
#define GLUT_KEY_RIGHT 129
#define GLUT_KEY_UP 128
void processSpecialKeys(int key, int x, int y) {
  float fraction = 0.1f;
  switch (key) {
  case GLUT_KEY_LEFT:
    break;
  case GLUT_KEY_RIGHT:
    break;
  case GLUT_KEY_UP:
    break;
  case GLUT_KEY_DOWN:
    break;
  }
}


x86 assembly (clang, -O0):
<processSpecialKeys>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x3dcccccd,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     1151 <processSpecialKeys+0x51>
mov    -0x18(%rbp),%rax
lea    0xecc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1151 <processSpecialKeys+0x51>
jmp    1151 <processSpecialKeys+0x51>
jmp    1151 <processSpecialKeys+0x51>
jmp    1151 <processSpecialKeys+0x51>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @processSpecialKeys(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store float 0x3FB99999A0000000, float* %7
%8 = load i32, i32* %4
switch i32 %8, label %13 [
i32 130, label %9
i32 129, label %10
i32 128, label %11
i32 131, label %12
]
9: ; preds = %3
br label %13
10: ; preds = %3
br label %13
11: ; preds = %3
br label %13
12: ; preds = %3
br label %13
13: ; preds = %3, %12, %11, %10, %9
ret void
}

LLVM IR (-O2):
define void @processSpecialKeys(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
bool unload(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @unload() {
ret i32 0
}
/* Variables and functions */
double _f(int, int /*<<< orphan*/, double const, double const *);
double _n_1(const double omega, const double vertices_omegas[4]) {
  return (_f(1, 0, omega, vertices_omegas) * _f(2, 0, omega, vertices_omegas) *
          _f(3, 0, omega, vertices_omegas));
}


x86 assembly (clang, -O0):
<_n_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <_f@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_n_1>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <_f@plt>
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x3,%edi
xor    %esi,%esi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rdx
call   1030 <_f@plt>
mulsd  (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define double @_n_1(double %0, double* %1) {
%3 = tail call double @_f(i32 1, i32 0, double %0, double* %1)
%4 = tail call double @_f(i32 2, i32 0, double %0, double* %1)
%5 = fmul double %3, %4
%6 = tail call double @_f(i32 3, i32 0, double %0, double* %1)
%7 = fmul double %5, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned short int a1 = 1;
  signed int b1 = -1;
  if (sizeof(short) < sizeof(int))
    assert(a1 > b1);
  else
    assert(a1 < b1);
  unsigned char a2 = 1;
  signed char b2 = -1;
  if (sizeof(char) < sizeof(int))
    assert(a2 > b2);
  else
    assert(a2 < b2);
  unsigned int a3 = 1;
  signed int b3 = -1;
  assert(a3 < b3);
  unsigned long long int a4 = 1;
  long long signed int b4 = -1;
  assert(a4 < b4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movw   $0x1,-0x2(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movb   $0x1,-0x9(%rbp)
movb   $0xff,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movsbl -0xa(%rbp),%ecx
cmp    %ecx,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x1,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movq   $0x1,-0x20(%rbp)
movq   $0xffffffffffffffff,-0x28(%rbp)
ff
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i16
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
store i16 1, i16* %1
store i32 -1, i32* %2
%9 = load i16, i16* %1
%10 = zext i16 %9 to i32
%11 = load i32, i32* %2
%12 = icmp sgt i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
store i8 1, i8* %3
store i8 -1, i8* %4
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp sgt i32 %16, %18
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
store i32 1, i32* %5
store i32 -1, i32* %6
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = icmp ult i32 %22, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
store i64 1, i64* %7
store i64 -1, i64* %8
%27 = load i64, i64* %7
%28 = load i64, i64* %8
%29 = icmp ult i64 %27, %28
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pwm_set_duty(int, int);
void heater_part_fan_speed(int s) { pwm_set_duty(2, 4 * s); }


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

x86 assembly (clang, -O2):
<heater_part_fan_speed>:
lea    0x0(,%rdi,4),%esi
mov    $0x2,%edi
jmp    1030 <pwm_set_duty@plt>

LLVM IR (-O0):
define void @heater_part_fan_speed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 4, %3
%5 = call i32 @pwm_set_duty(i32 2, i32 %4)
ret void
}

LLVM IR (-O2):
define void @heater_part_fan_speed(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = tail call i32 @pwm_set_duty(i32 2, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ rint(double);
long long llrint(double x) { return (long long)rint(x); }


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

x86 assembly (clang, -O2):
<llrint>:
jmp    1030 <rint@plt>

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

LLVM IR (-O2):
define i64 @llrint(double %0) {
%2 = tail call i64 @rint(double %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ DEC_();
int /*<<< orphan*/ c64_memZeroX();
void DEC_zpx(void) {
  c64_memZeroX();
  DEC_();
}


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

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

LLVM IR (-O0):
define void @DEC_zpx() {
%1 = call i32 (...) @c64_memZeroX()
%2 = call i32 (...) @DEC_()
ret void
}

LLVM IR (-O2):
define void @DEC_zpx() {
%1 = tail call i32 (...) @c64_memZeroX()
%2 = tail call i32 (...) @DEC_()
ret void
}
void hal_disable_preemption() {}


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

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

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

LLVM IR (-O2):
define void @hal_disable_preemption() {
ret void
}
/* Variables and functions */
int calmiddle(char *);
int /*<<< orphan*/ middle(int, char *);
int /*<<< orphan*/ printf(char *, char *, char *);
int main(void) {
  char a[] = "hello world!", b[6];
  int i = calmiddle(a);
  middle(i, b);
  printf("%s%s", b, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb3(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x11(%rbp),%rdi
call   1030 <calmiddle@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
lea    -0x17(%rbp),%rsi
call   1050 <middle@plt>
lea    -0x17(%rbp),%rsi
lea    -0x11(%rbp),%rdx
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x21646c726f7720,%rax
mov    %rax,0x5(%rsp)
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <calmiddle@plt>
lea    0x12(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
call   1050 <middle@plt>
lea    0xe98(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.a = [13 x i8] c"hello world!\00"
@.str = [5 x i8] c"%s%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
%3 = alloca [6 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [13 x i8]* %2 to i8*
%6 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%7 = call i32 @calmiddle(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = call i32 @middle(i32 %8, i8* %9)
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [13 x i8] c"hello world!\00"
@.str = [5 x i8] c"%s%s\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @calmiddle(i8* %3)
%6 = call i32 @middle(i32 %5, i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
ret i32 0
}
/* Variables and functions */
int U_PMR_NODATAREC_print(char const *);
int U_PMR_MULTIFORMATEND_print(const char *contents) {
  return (U_PMR_NODATAREC_print(contents));
}


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

x86 assembly (clang, -O2):
<U_PMR_MULTIFORMATEND_print>:
jmp    1030 <U_PMR_NODATAREC_print@plt>

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

LLVM IR (-O2):
define i32 @U_PMR_MULTIFORMATEND_print(i8* %0) {
%2 = tail call i32 @U_PMR_NODATAREC_print(i8* %0)
ret i32 %2
}