xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EncFloat(double, char *);
EncVector(double v[3], char *c) {
  EncFloat(v[0], &c[0]);
  EncFloat(v[1], &c[4]);
  EncFloat(v[2], &c[8]);
}


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

x86 assembly (clang, -O2):
<EncVector>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  (%rdi),%xmm0
mov    %rsi,%rdi
call   1030 <EncFloat@plt>
movsd  0x8(%r14),%xmm0
lea    0x4(%rbx),%rdi
call   1030 <EncFloat@plt>
movsd  0x10(%r14),%xmm0
add    $0x8,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <EncFloat@plt>

LLVM IR (-O0):
define i32 @EncVector(double* %0, i8* %1) {
%3 = alloca i32
%4 = alloca double*
%5 = alloca i8*
store double* %0, double** %4
store i8* %1, i8** %5
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = call i32 @EncFloat(double %8, i8* %10)
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 4
%17 = call i32 @EncFloat(double %14, i8* %16)
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 8
%23 = call i32 @EncFloat(double %20, i8* %22)
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @EncVector(double* nocapture %0, i8* %1) {
%3 = load double, double* %0
%4 = tail call i32 @EncFloat(double %3, i8* %1)
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds i8, i8* %1, i64 4
%8 = tail call i32 @EncFloat(double %6, i8* %7)
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds i8, i8* %1, i64 8
%12 = tail call i32 @EncFloat(double %10, i8* %11)
ret i32 undef
}
void init_sub_rel_pixel_mask_pt_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_sub_rel_pixel_mask_pt_funcs_c() {
ret void
}
int f4(void) {
  int c[64] = {}, d[64] = {};
  return (long unsigned int)&c[0] != (long unsigned int)&d[64];
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
lea    -0x200(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
lea    -0x100(%rbp),%rax
lea    -0x200(%rbp),%rcx
add    $0x100,%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x200,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f4() {
%1 = alloca [64 x i32]
%2 = alloca [64 x i32]
%3 = bitcast [64 x i32]* %1 to i8*
%4 = bitcast [64 x i32]* %2 to i8*
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%6 = ptrtoint i32* %5 to i64
%7 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 64
%8 = ptrtoint i32* %7 to i64
%9 = icmp ne i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f4() {
ret i32 1
}
/* Variables and functions */
int PlayWavOffsetDesc(char *, int, int /*<<< orphan*/, unsigned int);
int PlayWavDesc(char *sFilename, int hAudio, unsigned dOptions) {
  return PlayWavOffsetDesc(sFilename, hAudio, 0, dOptions);
}


x86 assembly (clang, -O0):
<PlayWavDesc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
xor    %edx,%edx
call   1030 <PlayWavOffsetDesc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PlayWavDesc>:
mov    %edx,%ecx
xor    %edx,%edx
jmp    1030 <PlayWavOffsetDesc@plt>

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

LLVM IR (-O2):
define i32 @PlayWavDesc(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @PlayWavOffsetDesc(i8* %0, i32 %1, i32 0, i32 %2)
ret i32 %4
}
/* Variables and functions */
int IsMatchUnchecked(unsigned char const, char const *, char const *);
int IsMatch(const unsigned char *offset, const unsigned char *end,
            const char *key, const char *multibyte_start) {
  if ((offset) >= end)
    return 0;
  return IsMatchUnchecked(*offset, key, multibyte_start);
}


x86 assembly (clang, -O0):
<IsMatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jb     1142 <IsMatch+0x32>
movl   $0x0,-0x4(%rbp)
jmp    115b <IsMatch+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movzbl %al,%edi
call   1030 <IsMatchUnchecked@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsMatch>:
cmp    %rsi,%rdi
jae    1123 <IsMatch+0x13>
movzbl (%rdi),%edi
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <IsMatchUnchecked@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @IsMatch(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = icmp uge i8* %10, %11
br i1 %12, label %13, label %14
13: ; preds = %4
store i32 0, i32* %5
br label %20
14: ; preds = %4
%15 = load i8*, i8** %6
%16 = load i8, i8* %15
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @IsMatchUnchecked(i8 zeroext %16, i8* %17, i8* %18)
store i32 %19, i32* %5
br label %20
20: ; preds = %14, %13
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @IsMatch(i8* %0, i8* readnone %1, i8* %2, i8* %3) {
%5 = icmp ult i8* %0, %1
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = load i8, i8* %0
%8 = tail call i32 @IsMatchUnchecked(i8 zeroext %7, i8* %2, i8* %3)
br label %9
9: ; preds = %4, %6
%10 = phi i32 [ %8, %6 ], [ 0, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(void *, void *, unsigned long);
void *memcpy(void *out, void *in, unsigned long length) {
  bcopy(in, out, length);
  return out;
}


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

x86 assembly (clang, -O2):
<memcpy>:
jmp    1030 <memmove@plt>

LLVM IR (-O0):
define i8* @memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i32 @bcopy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
define i8* @memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Variables and functions */
int connect_sock(char const *, int, char *);
int connectUDP(const char *host, int port) {
  return connect_sock(host, port, "udp");
}


x86 assembly (clang, -O0):
<connectUDP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <connect_sock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connectUDP>:
lea    0xee9(%rip),%rdx
jmp    1030 <connect_sock@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"udp\00"
define i32 @connectUDP(i8* %0, i32 %1) {
%3 = tail call i32 @connect_sock(i8* %0, i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int spx_utils_str_starts_with(const char *str, const char *prefix) {
  return 0 == strncmp(str, prefix, strlen(prefix));
}


x86 assembly (clang, -O0):
<spx_utils_str_starts_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spx_utils_str_starts_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @spx_utils_str_starts_with(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 0, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @spx_utils_str_starts_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ init();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int tribonacci(int);
int main() {
  init();
  int n;
  printf("Enter N: ");
  scanf("%d", &n);
  printf("The tribonacci number at position %d is: %d", n, tribonacci(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <init@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <tribonacci@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <init@plt>
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1040 <tribonacci@plt>
lea    0xe8d(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Enter N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"The tribonacci number at position %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @init()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @tribonacci(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Enter N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [44 x i8] c"The tribonacci number at position %d is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (...) @init()
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 @tribonacci(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
char *strtok(char *, char const *);
char *STRTOK(char *_Str, const char *_Delim) { return strtok(_Str, _Delim); }


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

x86 assembly (clang, -O2):
<STRTOK>:
jmp    1030 <strtok@plt>

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

LLVM IR (-O2):
define i8* @STRTOK(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ dup2(int, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ unblock_signals();
void background_process_and_unblock_signals(void) {
  int fd = open("/dev/null", O_RDWR);
  dup2(fd, 0);
  dup2(fd, 1);
  dup2(fd, 2);
  unblock_signals();
}


x86 assembly (clang, -O0):
<background_process_and_unblock_signals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <dup2@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <dup2@plt>
mov    $0x0,%al
call   1040 <unblock_signals@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<background_process_and_unblock_signals>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebx
mov    %eax,%edi
xor    %esi,%esi
call   1030 <dup2@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <dup2@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <dup2@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <unblock_signals@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"/dev/null\00"
@O_RDWR = global i32 0
define void @background_process_and_unblock_signals() {
%1 = alloca i32
%2 = load i32, i32* @O_RDWR
%3 = call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @dup2(i32 %4, i32 0)
%6 = load i32, i32* %1
%7 = call i32 @dup2(i32 %6, i32 1)
%8 = load i32, i32* %1
%9 = call i32 @dup2(i32 %8, i32 2)
%10 = call i32 (...) @unblock_signals()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"/dev/null\00"
@O_RDWR = global i32 0
define void @background_process_and_unblock_signals() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @open(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @dup2(i32 %2, i32 0)
%4 = tail call i32 @dup2(i32 %2, i32 1)
%5 = tail call i32 @dup2(i32 %2, i32 2)
%6 = tail call i32 (...) @unblock_signals()
ret void
}
float float_min1(float a, float b) { return ((a) < (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<float_min1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <float_min1+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <float_min1+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_min1>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @float_min1(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @float_min1(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dec2hex(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(int argc, char **argv) {
  FILE *in;
  dec2hex(stdin);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <dec2hex@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* @stdin
%7 = call i32 @dec2hex(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @dec2hex(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ close_terminal();
int /*<<< orphan*/ start_kmc_server(char **);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  assert(argc > 4);
  if (!strcmp(argv[1], "0"))
    close_terminal();
  start_kmc_server(argv + 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    118b <main+0x4b>
mov    $0x0,%al
call   1030 <close_terminal@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1060 <start_kmc_server@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
cmp    $0x5,%edi
setge  %al
mov    %eax,%edi
call   1050 <assert@plt>
mov    0x8(%rbx),%rdi
lea    0xea2(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    116e <main+0x2e>
xor    %eax,%eax
call   1030 <close_terminal@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
call   1060 <start_kmc_server@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp sgt i32 %6, 4
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = call i32 (...) @close_terminal()
br label %17
17: ; preds = %15, %2
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = call i32 @start_kmc_server(i8** %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp sgt i32 %0, 4
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @close_terminal()
br label %12
12: ; preds = %10, %2
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = tail call i32 @start_kmc_server(i8** %13)
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int opt_help(char *opt) {
  if (strcmp(opt, "-h") == 0)
    return 1;
  if (strcmp(opt, "--help") == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<opt_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <opt_help+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_help+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1168 <opt_help+0x58>
movl   $0x1,-0x4(%rbp)
jmp    116f <opt_help+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_help>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <opt_help+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [7 x i8] c"--help\00"
define i32 @opt_help(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void sgx_report_remote_attestation_failure() {}


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

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

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

LLVM IR (-O2):
define void @sgx_report_remote_attestation_failure() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _HibernateWriteComplete();
void HibernateGPIORetentionEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000100 | 0x40000000;
  _HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateGPIORetentionEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rcx
or     $0x40000100,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <_HibernateWriteComplete@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateGPIORetentionEnable>:
orq    $0x40000100,0x400fc010
xor    %eax,%eax
jmp    1030 <_HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateGPIORetentionEnable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 1073742080
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = call i32 (...) @_HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateGPIORetentionEnable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 1073742080
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
%3 = tail call i32 (...) @_HibernateWriteComplete()
ret void
}
/* Variables and functions */
int mode_bytes_per_pixel(int /*<<< orphan*/);
int /*<<< orphan*/ video_current_mode();
unsigned video_bytes_per_pixel(void) {
  return mode_bytes_per_pixel(video_current_mode());
}


x86 assembly (clang, -O0):
<video_bytes_per_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <video_current_mode@plt>
mov    %eax,%edi
call   1040 <mode_bytes_per_pixel@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<video_bytes_per_pixel>:
push   %rax
xor    %eax,%eax
call   1030 <video_current_mode@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <mode_bytes_per_pixel@plt>

LLVM IR (-O0):
define i32 @video_bytes_per_pixel() {
%1 = call i32 (...) @video_current_mode()
%2 = call i32 @mode_bytes_per_pixel(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @video_bytes_per_pixel() {
%1 = tail call i32 (...) @video_current_mode()
%2 = tail call i32 @mode_bytes_per_pixel(i32 %1)
ret i32 %2
}
int picolcd_init_leds(struct picolcd_data *data, struct hid_report *report) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define i32 @picolcd_init_leds(%struct.picolcd_data* %0, %struct.hid_report* %1) {
%3 = alloca %struct.picolcd_data*
%4 = alloca %struct.hid_report*
store %struct.picolcd_data* %0, %struct.picolcd_data** %3
store %struct.hid_report* %1, %struct.hid_report** %4
ret i32 0
}

LLVM IR (-O2):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define i32 @picolcd_init_leds(%struct.picolcd_data* nocapture readnone %0, %struct.hid_report* nocapture readnone %1) {
ret i32 0
}
void ABGRToYRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToYRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int, char const *);
void ModuleLineMessage(const char *ModuleName, int nLine, const char *Message) {
  printf("%s : Line %d : %s\n", ModuleName, nLine, Message);
}


x86 assembly (clang, -O0):
<ModuleLineMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ModuleLineMessage>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"%s : Line %d : %s\0A\00"
define void @ModuleLineMessage(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%s : Line %d : %s\0A\00"
define void @ModuleLineMessage(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int ft_add_prime(char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int nb;
  nb = ft_add_prime(argv[1]);
  printf("%d\n", nb);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <ft_add_prime@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <ft_add_prime@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @ft_add_prime(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(void) {
  printf("Usage: afpfsd [OPTION]\n"
         "  -l, --logmethod    Either 'syslog' or 'stdout'"
         "  -f, --foreground   Do not fork\n"
         "  -d, --debug        Does not fork, logs to stdout\n"
         "Version %s\n",
         "0.8.1");
}


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

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
lea    0xf89(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [167 x i8] c"Usage: afpfsd [OPTION]\0A -l, --logmethod Either 'syslog' or 'stdout' -f, --foreground Do not fork\0A -d, --debug Does not fork, logs to stdout\0AVersion %s\0A\00"
@.str.1 = [6 x i8] c"0.8.1\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [167 x i8] c"Usage: afpfsd [OPTION]\0A -l, --logmethod Either 'syslog' or 'stdout' -f, --foreground Do not fork\0A -d, --debug Does not fork, logs to stdout\0AVersion %s\0A\00"
@.str.1 = [6 x i8] c"0.8.1\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_grid_mem(int **);
int free_grid_and_return(int **grid, int ret) {
  free_grid_mem(grid);
  return (ret);
}


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

x86 assembly (clang, -O2):
<free_grid_and_return>:
push   %rbx
mov    %esi,%ebx
call   1030 <free_grid_mem@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @free_grid_and_return(i32** %0, i32 returned %1) {
%3 = tail call i32 @free_grid_mem(i32** %0)
ret i32 %1
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_replace_dobldobl_solution(int n, int k, int m, double *sol) {
  int b[2], fail;
  b[0] = n;
  b[1] = m;
  fail = _ada_use_c2phc4c(345, &k, b, sol, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_replace_dobldobl_solution>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x159,%edi
lea    -0x8(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_replace_dobldobl_solution>:
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x159,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @solcon_replace_dobldobl_solution(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %11, i32* %12
%13 = load i32, i32* %7
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%16 = load double*, double** %8
%17 = call i32 @_ada_use_c2phc4c(i32 345, i32* %6, i32* %15, double* %16, i32 0)
store i32 %17, i32* %10
%18 = load i32, i32* %10
ret i32 %18
}

LLVM IR (-O2):
define i32 @solcon_replace_dobldobl_solution(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca [2 x i32]
store i32 %1, i32* %5
%7 = bitcast [2 x i32]* %6 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %2, i32* %9
%10 = call i32 @_ada_use_c2phc4c(i32 345, i32* %5, i32* %8, double* %3, i32 0)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ prologue(char *);
int /*<<< orphan*/ stderr;
void basedefs(void) {
  prologue("curses");
  printf("define(`M4_KEY_MAX',`8#%o#')", 0777);
  if (0401 == 256) {
    fprintf(stderr, "Unexpected value for KEY_MIN: %d\n", 0401);
    exit(1);
  }
  printf("define(`M4_SPECIAL_FIRST',`8#%o#')", 0401 - 1);
}


x86 assembly (clang, -O0):
<basedefs>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <prologue@plt>
lea    0xed0(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x100,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basedefs>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <prologue@plt>
lea    0xed3(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x100,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"curses\00"
@.str.1 = [29 x i8] c"define(`M4_KEY_MAX',`8#%o#')\00"
@.str.2 = [35 x i8] c"define(`M4_SPECIAL_FIRST',`8#%o#')\00"
@stderr = global i32 0
define void @basedefs() {
%1 = call i32 @prologue(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 511)
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 256)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"curses\00"
@.str.1 = [29 x i8] c"define(`M4_KEY_MAX',`8#%o#')\00"
@.str.2 = [35 x i8] c"define(`M4_SPECIAL_FIRST',`8#%o#')\00"
@stderr = global i32 0
define void @basedefs() {
%1 = tail call i32 @prologue(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 511)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 256)
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR60_get(void) { return U_WMRCORENONE_get("U_WMR60"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR60\00"
define i32 @U_WMR60_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR60\00"
define i32 @U_WMR60_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void serial_outc(char c) {
  int i = 0;
  while (1) {
    i++;
    if (i >= 0x6000)
      break;
    if ((*(volatile unsigned int *)((unsigned int)0xb8002014)) & 0x20000000)
      break;
  }
  (*(volatile unsigned int *)((unsigned int)0xb8002000)) = (c << 24);
}


x86 assembly (clang, -O0):
<serial_outc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x6000,-0x8(%rbp)
jl     112c <serial_outc+0x2c>
jmp    114b <serial_outc+0x4b>
mov    $0xb8002014,%eax
mov    (%rax),%eax
and    $0x20000000,%eax
cmp    $0x0,%eax
je     1146 <serial_outc+0x46>
jmp    114b <serial_outc+0x4b>
jmp    1111 <serial_outc+0x11>
movsbl -0x1(%rbp),%ecx
shl    $0x18,%ecx
mov    $0xb8002000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_outc>:
mov    $0x5ffc,%ecx
mov    $0xb8002014,%eax
nopw   0x0(%rax,%rax,1)
testl  $0x20000000,(%rax)
jne    1137 <serial_outc+0x37>
testl  $0x20000000,(%rax)
jne    1137 <serial_outc+0x37>
testl  $0x20000000,(%rax)
jne    1137 <serial_outc+0x37>
test   %ecx,%ecx
je     1137 <serial_outc+0x37>
add    $0xfffffffc,%ecx
testl  $0x20000000,(%rax)
je     1110 <serial_outc+0x10>
movzbl %dil,%ecx
shl    $0x18,%ecx
mov    %ecx,-0x14(%rax)
ret

LLVM IR (-O0):
define void @serial_outc(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
br label %4
4: ; preds = %1, %15
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 24576
br i1 %8, label %9, label %10
9: ; preds = %4
br label %16
10: ; preds = %4
%11 = load volatile i32, i32* inttoptr (i64 3087015956 to i32*)
%12 = and i32 %11, 536870912
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
br label %16
15: ; preds = %10
br label %4
16: ; preds = %14, %9
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = shl i32 %18, 24
store volatile i32 %19, i32* inttoptr (i64 3087015936 to i32*)
ret void
}

LLVM IR (-O2):
define void @serial_outc(i8 signext %0) {
br label %2
2: ; preds = %17, %1
%3 = phi i32 [ 0, %1 ], [ %18, %17 ]
%4 = load volatile i32, i32* inttoptr (i64 3087015956 to i32*)
%5 = and i32 %4, 536870912
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %2
%8 = load volatile i32, i32* inttoptr (i64 3087015956 to i32*)
%9 = and i32 %8, 536870912
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load volatile i32, i32* inttoptr (i64 3087015956 to i32*)
%13 = and i32 %12, 536870912
%14 = icmp ne i32 %13, 0
%15 = icmp eq i32 %3, 24572
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %22, label %17
17: ; preds = %11
%18 = add nuw nsw i32 %3, 4
%19 = load volatile i32, i32* inttoptr (i64 3087015956 to i32*)
%20 = and i32 %19, 536870912
%21 = icmp eq i32 %20, 0
br i1 %21, label %2, label %22
22: ; preds = %17, %11, %7, %2
%23 = zext i8 %0 to i32
%24 = shl nuw i32 %23, 24
store volatile i32 %24, i32* inttoptr (i64 3087015936 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ceil(double);
double log(double);
scalar_t__ pow(double, int /*<<< orphan*/);
float power_of_2(float val) {
  return (float)pow(2.0, ceil(log((double)val) / 0.69314718055994530942));
}


x86 assembly (clang, -O0):
<power_of_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1040 <log@plt>
movsd  0xeb5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
mov    %eax,%edi
movsd  0xe9a(%rip),%xmm0
call   1050 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_of_2>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1040 <log@plt>
divsd  0xebe(%rip),%xmm0
call   1030 <ceil@plt>
movsd  0xeb9(%rip),%xmm0
mov    %eax,%edi
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @power_of_2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call double @log(double %4)
%6 = fdiv double %5, 0x3FE62E42FEFA39EF
%7 = call i32 @ceil(double %6)
%8 = call i64 @pow(double 2.000000e+00, i32 %7)
%9 = sitofp i64 %8 to float
ret float %9
}

LLVM IR (-O2):
define float @power_of_2(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @log(double %2)
%4 = fdiv double %3, 0x3FE62E42FEFA39EF
%5 = tail call i32 @ceil(double %4)
%6 = tail call i64 @pow(double 2.000000e+00, i32 %5)
%7 = sitofp i64 %6 to float
ret float %7
}
int is_ivo_ok(int ivo, unsigned long vsc) {
  long count_pre, count_this, count_post;
  count_pre = (0xFFFF & (ivo * vsc - 1)) + 1;
  count_this = (0xFFFF & ((ivo + 1) * vsc - 1)) + 1;
  count_post = (0xFFFF & ((ivo + 2) * vsc - 1)) + 1;
  return !((count_this > count_pre) || (count_post > count_this));
}


x86 assembly (clang, -O0):
<is_ivo_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rax
imul   -0x10(%rbp),%rax
sub    $0x1,%rax
and    $0xffff,%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
imul   -0x10(%rbp),%rax
sub    $0x1,%rax
and    $0xffff,%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cltq
imul   -0x10(%rbp),%rax
sub    $0x1,%rax
and    $0xffff,%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rcx
mov    $0x1,%al
cmp    -0x18(%rbp),%rcx
mov    %al,-0x29(%rbp)
jg     1185 <is_ivo_ok+0x85>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ivo_ok>:
mov    %edi,%eax
imul   %esi,%eax
add    $0xffffffff,%eax
movzwl %ax,%eax
lea    0x1(%rdi),%ecx
imul   %esi,%ecx
add    $0xffffffff,%ecx
movzwl %cx,%ecx
add    $0x2,%edi
imul   %esi,%edi
add    $0xffffffff,%edi
movzwl %di,%edx
cmp    %rax,%rcx
setbe  %al
cmp    %rcx,%rdx
setbe  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_ivo_ok(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = load i64, i64* %4
%11 = mul i64 %9, %10
%12 = sub i64 %11, 1
%13 = and i64 65535, %12
%14 = add i64 %13, 1
store i64 %14, i64* %5
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = load i64, i64* %4
%19 = mul i64 %17, %18
%20 = sub i64 %19, 1
%21 = and i64 65535, %20
%22 = add i64 %21, 1
store i64 %22, i64* %6
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 2
%25 = sext i32 %24 to i64
%26 = load i64, i64* %4
%27 = mul i64 %25, %26
%28 = sub i64 %27, 1
%29 = and i64 65535, %28
%30 = add i64 %29, 1
store i64 %30, i64* %7
%31 = load i64, i64* %6
%32 = load i64, i64* %5
%33 = icmp sgt i64 %31, %32
br i1 %33, label %38, label %34
34: ; preds = %2
%35 = load i64, i64* %7
%36 = load i64, i64* %6
%37 = icmp sgt i64 %35, %36
br label %38
38: ; preds = %34, %2
%39 = phi i1 [ true, %2 ], [ %37, %34 ]
%40 = xor i1 %39, true
%41 = zext i1 %40 to i32
ret i32 %41
}

LLVM IR (-O2):
define i32 @is_ivo_ok(i32 %0, i64 %1) {
%3 = zext i32 %0 to i64
%4 = mul i64 %3, %1
%5 = add i64 %4, 65535
%6 = and i64 %5, 65535
%7 = add nsw i32 %0, 1
%8 = zext i32 %7 to i64
%9 = mul i64 %8, %1
%10 = add i64 %9, 65535
%11 = and i64 %10, 65535
%12 = add nsw i32 %0, 2
%13 = zext i32 %12 to i64
%14 = mul i64 %13, %1
%15 = add i64 %14, 65535
%16 = and i64 %15, 65535
%17 = icmp ule i64 %11, %6
%18 = icmp ule i64 %16, %11
%19 = select i1 %17, i1 %18, i1 false
%20 = zext i1 %19 to i32
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char **argv) {
  fprintf(stderr, "%s <a = ascending | b = descending>\n", argv[0]);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xecc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"%s <a = ascending | b = descending>\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"%s <a = ascending | b = descending>\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "makejv3: example types dd40, dd80, dd40s, pcdd40s, dd80s, "
                  "sd40, sd80, sd40s, sd80s\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 = [84 x i8] c"makejv3: example types dd40, dd80, dd40s, pcdd40s, dd80s, sd40, sd80, sd40s, sd80s\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [84 x i8] c"makejv3: example types dd40, dd80, dd40s, pcdd40s, dd80s, sd40, sd80, sd40s, sd80s\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}