xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("argv[%d]: %s\n", i, argv[i]);
  }
  exit(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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1157 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"argv[%d]: %s\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
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
%23 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"argv[%d]: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @exit(i32 0)
unreachable
}
int do_521() { return 521; }


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

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

LLVM IR (-O0):
define i32 @do_521() {
ret i32 521
}

LLVM IR (-O2):
define i32 @do_521() {
ret i32 521
}
double c_to_k(double celsius) { return celsius + 273.15; }


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

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

LLVM IR (-O0):
define double @c_to_k(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 2.731500e+02
ret double %4
}

LLVM IR (-O2):
define double @c_to_k(double %0) {
%2 = fadd double %0, 2.731500e+02
ret double %2
}
/* Variables and functions */
scalar_t__ GenerateFastRandom();
int PRANDInt3(void) {
  int x = (int)GenerateFastRandom() & 0x03;
  return ((x < 3) ? x : x - 3);
}


x86 assembly (clang, -O0):
<PRANDInt3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <GenerateFastRandom@plt>
and    $0x3,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    113a <PRANDInt3+0x2a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <PRANDInt3+0x33>
mov    -0x4(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRANDInt3>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <GenerateFastRandom@plt>
and    $0x3,%eax
cmp    $0x3,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @PRANDInt3() {
%1 = alloca i32
%2 = call i64 (...) @GenerateFastRandom()
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 3
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = load i32, i32* %1
br label %12
9: ; preds = %0
%10 = load i32, i32* %1
%11 = sub nsw i32 %10, 3
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ %8, %7 ], [ %11, %9 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @PRANDInt3() {
%1 = tail call i64 (...) @GenerateFastRandom()
%2 = trunc i64 %1 to i32
%3 = and i32 %2, 3
%4 = icmp eq i32 %3, 3
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ UART_OutByte(int);
void putc(int c) { UART_OutByte(c); }


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

x86 assembly (clang, -O2):
<putc>:
jmp    1030 <UART_OutByte@plt>

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

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i32 @UART_OutByte(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mem_dump();
int /*<<< orphan*/ reg_set(int, int, int);
void sys_dump(int reg) {
  reg_set(0x0, 0x1, 0x0);
  mem_dump();
}


x86 assembly (clang, -O0):
<sys_dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1040 <reg_set@plt>
mov    $0x0,%al
call   1030 <mem_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_dump>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <reg_set@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mem_dump@plt>

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

LLVM IR (-O2):
define void @sys_dump(i32 %0) {
%2 = tail call i32 @reg_set(i32 0, i32 1, i32 0)
%3 = tail call i32 (...) @mem_dump()
ret void
}
void ui_close(struct ui *is) {}


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

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

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

LLVM IR (-O2):
%struct.ui = type opaque
define void @ui_close(%struct.ui* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int genieWriteObj(int, int, int /*<<< orphan*/);
int genieWriteShortToIntLedDigits(int index, int16_t data) {
  return genieWriteObj(47, index, data);
}


x86 assembly (clang, -O0):
<genieWriteShortToIntLedDigits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x2f,%edi
call   1030 <genieWriteObj@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genieWriteShortToIntLedDigits>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x2f,%edi
jmp    1030 <genieWriteObj@plt>

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

LLVM IR (-O2):
define i32 @genieWriteShortToIntLedDigits(i32 %0, i32 %1) {
%3 = tail call i32 @genieWriteObj(i32 47, i32 %0, i32 %1)
ret i32 %3
}
void curs_cbreak(void) {}


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

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

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

LLVM IR (-O2):
define void @curs_cbreak() {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int strings_cmp(char *first, char *second) { return strcmp(first, second); }


x86 assembly (clang, -O0):
<strings_cmp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strings_cmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @strings_cmp(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 i32 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strings_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
char toupper(char);
int xtoi(char *string) {
  char chr = toupper(string[0]);
  if (chr > '9')
    return (int)(chr - 'A' + 10);
  else
    return (int)(chr - '0');
}


x86 assembly (clang, -O0):
<xtoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x39,%eax
jle    114a <xtoi+0x3a>
movsbl -0x11(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <xtoi+0x44>
movsbl -0x11(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtoi>:
push   %rax
movsbl (%rdi),%edi
call   1030 <toupper@plt>
movsbl %al,%ecx
lea    -0x30(%rcx),%edx
lea    -0x37(%rcx),%eax
cmp    $0x3a,%cl
cmovl  %edx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @xtoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call signext i8 @toupper(i8 signext %2)
%4 = sext i8 %3 to i32
%5 = icmp sgt i8 %3, 57
%6 = select i1 %5, i32 -55, i32 -48
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ len;

/* Variables and functions */
int main(int argc, char **argv) {
  socklen_t len;
  return !!sizeof(len);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
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
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1
}
int cs_nonzero(int i, int j, double aij, void *other) {
  (void)i;
  (void)j;
  (void)other;
  return (aij != 0);
}


x86 assembly (clang, -O0):
<cs_nonzero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs_nonzero>:
xorpd  %xmm1,%xmm1
cmpneqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double %2, double* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %8
%12 = load double, double* %7
%13 = fcmp une double %12, 0.000000e+00
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @cs_nonzero(i32 %0, i32 %1, double %2, i8* nocapture readnone %3) {
%5 = fcmp une double %2, 0.000000e+00
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
unsigned char *xsalsa12poly1305_encrypt(unsigned char *, size_t *,
                                        unsigned char const *, size_t,
                                        unsigned char const *,
                                        unsigned char const *);
unsigned char *crypt_encrypt_xsalsa12poly1305(
    unsigned char *out, size_t *out_len, const unsigned char *in, size_t in_len,
    const unsigned char *nonce, const unsigned char *key) {
  return xsalsa12poly1305_encrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_encrypt_xsalsa12poly1305>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <xsalsa12poly1305_encrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_encrypt_xsalsa12poly1305>:
jmp    1030 <xsalsa12poly1305_encrypt@plt>

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

LLVM IR (-O2):
define i8* @crypt_encrypt_xsalsa12poly1305(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @xsalsa12poly1305_encrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ DrawCenteredBox(double, double, double, double);
int GetWindowHeight();
int GetWindowWidth();
int /*<<< orphan*/ InitGraphics();
main() {
  double cx, cy;
  InitGraphics();
  cx = GetWindowWidth() / 2;
  cy = GetWindowHeight() / 2;
  DrawCenteredBox(cx, cy, 2.0, 1.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <InitGraphics@plt>
mov    $0x0,%al
call   1030 <GetWindowWidth@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <GetWindowHeight@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe6f(%rip),%xmm2
movsd  0xe6f(%rip),%xmm3
call   1060 <DrawCenteredBox@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <InitGraphics@plt>
xor    %eax,%eax
call   1030 <GetWindowWidth@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <GetWindowHeight@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
cvtsi2sd %ecx,%xmm1
movsd  0xe83(%rip),%xmm2
movsd  0xe83(%rip),%xmm3
movsd  (%rsp),%xmm0
call   1060 <DrawCenteredBox@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @InitGraphics()
%4 = call i32 (...) @GetWindowWidth()
%5 = sdiv i32 %4, 2
%6 = sitofp i32 %5 to double
store double %6, double* %1
%7 = call i32 (...) @GetWindowHeight()
%8 = sdiv i32 %7, 2
%9 = sitofp i32 %8 to double
store double %9, double* %2
%10 = load double, double* %1
%11 = load double, double* %2
%12 = call i32 @DrawCenteredBox(double %10, double %11, double 2.000000e+00, double 1.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitGraphics()
%2 = tail call i32 (...) @GetWindowWidth()
%3 = sdiv i32 %2, 2
%4 = sitofp i32 %3 to double
%5 = tail call i32 (...) @GetWindowHeight()
%6 = sdiv i32 %5, 2
%7 = sitofp i32 %6 to double
%8 = tail call i32 @DrawCenteredBox(double %4, double %7, double 2.000000e+00, double 1.000000e+00)
ret i32 0
}
int sub2(unsigned long long i) {
  if (i <= 0x7FFFFFFF)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<sub2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x7fffffff,-0x10(%rbp)
7f
ja     1122 <sub2+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <sub2+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub2>:
xor    %eax,%eax
test   $0xffffffff80000000,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @sub2(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ule i64 %4, 2147483647
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @sub2(i64 %0) {
%2 = icmp ult i64 %0, 2147483648
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn55() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn55");
  return result;
}


x86 assembly (clang, -O0):
<fn55>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn55>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn55\00"
define i8* @fn55() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn55\00"
define i8* @fn55() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Type definitions */
struct feed_text_iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
feed_text_iterator_validate_glyph(struct feed_text_iterator *const);
void feed_text_iterator_validate(
    struct feed_text_iterator *const p_text_iterator) {
  feed_text_iterator_validate_glyph(p_text_iterator);
}


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

x86 assembly (clang, -O2):
<feed_text_iterator_validate>:
jmp    1030 <feed_text_iterator_validate_glyph@plt>

LLVM IR (-O0):
%struct.feed_text_iterator = type { i32 }
define void @feed_text_iterator_validate(%struct.feed_text_iterator* %0) {
%2 = alloca %struct.feed_text_iterator*
store %struct.feed_text_iterator* %0, %struct.feed_text_iterator** %2
%3 = load %struct.feed_text_iterator*, %struct.feed_text_iterator** %2
%4 = call i32 @feed_text_iterator_validate_glyph(%struct.feed_text_iterator* %3)
ret void
}

LLVM IR (-O2):
%struct.feed_text_iterator = type { i32 }
define void @feed_text_iterator_validate(%struct.feed_text_iterator* %0) {
%2 = tail call i32 @feed_text_iterator_validate_glyph(%struct.feed_text_iterator* %0)
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *concat(const char *left, const char *right) {
  char *result = malloc(strlen(left) + strlen(right) + 1);
  strcpy(result, left);
  strcat(result, right);
  return result;
}


x86 assembly (clang, -O0):
<concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%r15,%rax,1),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @concat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 1
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %5
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @concat(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @malloc(i64 %6)
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
%9 = tail call i32 @strcat(i8* %7, i8* %1)
ret i8* %7
}
/* Variables and functions */
int core7_swap(char *, int);
int U_EMRLINETO_swap(char *record, int torev) {
  return (core7_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRLINETO_swap>:
jmp    1030 <core7_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRLINETO_swap(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 @core7_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRLINETO_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core7_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void lwesfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<lwesfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @lwesfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int d_ne_rc1(double a1) { return (((a1) != (100))); }


x86 assembly (clang, -O0):
<d_ne_rc1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_ne_rc1>:
cmpneqsd 0xef7(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d_ne_rc1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp une double %3, 1.000000e+02
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @d_ne_rc1(double %0) {
%2 = fcmp une double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
void gtk_icon_view_set_margin() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ initializeLCDController();
int32_t LCDIntf_InitializeLCDController(void) {
  return initializeLCDController();
}


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

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

LLVM IR (-O0):
define i32 @LCDIntf_InitializeLCDController() {
%1 = call i32 (...) @initializeLCDController()
ret i32 %1
}

LLVM IR (-O2):
define i32 @LCDIntf_InitializeLCDController() {
%1 = tail call i32 (...) @initializeLCDController()
ret i32 %1
}
int func(int arg) {
  int i = 2;
  i = i * arg;
  return arg;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @func(i32 returned %0) {
ret i32 %0
}
const char *C_Str_Name(void) { return "C_Str"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"C_Str\00"
define i8* @C_Str_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"C_Str\00"
define i8* @C_Str_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct taint {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void shift_cf_taint(struct taint *dst, struct taint *cond, struct taint *prev) {
  fprintf(stderr, "Should not use SHIFT CF taints in copy mode\n");
}


x86 assembly (clang, -O0):
<shift_cf_taint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_cf_taint>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.taint = type { i32 }
@stderr = global i32 0
@.str = [45 x i8] c"Should not use SHIFT CF taints in copy mode\0A\00"
define void @shift_cf_taint(%struct.taint* %0, %struct.taint* %1, %struct.taint* %2) {
%4 = alloca %struct.taint*
%5 = alloca %struct.taint*
%6 = alloca %struct.taint*
store %struct.taint* %0, %struct.taint** %4
store %struct.taint* %1, %struct.taint** %5
store %struct.taint* %2, %struct.taint** %6
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.taint = type { i32 }
@stderr = global i32 0
@.str = [45 x i8] c"Should not use SHIFT CF taints in copy mode\0A\00"
define void @shift_cf_taint(%struct.taint* nocapture readnone %0, %struct.taint* nocapture readnone %1, %struct.taint* nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct B {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void B_F2(struct B *Bthis) { printf("It is B_Fun\n"); }


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

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

LLVM IR (-O0):
%struct.B = type { i32 }
@.str = [13 x i8] c"It is B_Fun\0A\00"
define void @B_F2(%struct.B* %0) {
%2 = alloca %struct.B*
store %struct.B* %0, %struct.B** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.B = type { i32 }
@str = [12 x i8] c"It is B_Fun\00"
define void @B_F2(%struct.B* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_read_multprec_Laurent_system(int deci) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(570, &deci, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_read_multprec_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x23a,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_read_multprec_Laurent_system>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x23a,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_read_multprec_Laurent_system(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 570, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_read_multprec_Laurent_system(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 570, i32* %2, i32* undef, double* undef)
ret i32 %3
}
float convert_humidity(float h, int units_in, int units_out) { return (h); }


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

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

LLVM IR (-O0):
define float @convert_humidity(float %0, i32 %1, i32 %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load float, float* %4
ret float %7
}

LLVM IR (-O2):
define float @convert_humidity(float returned %0, i32 %1, i32 %2) {
ret float %0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct stat {
  scalar_t__ st_mtime;
};

/* Variables and functions */
int stat(char const *, struct stat *);
time_t local_file_write_date(const char *filename) {
  struct stat statbuf;
  int err;
  err = stat(filename, &statbuf);
  if (err < 0)
    return ((time_t)0);
  return ((time_t)(statbuf.st_mtime));
}


x86 assembly (clang, -O0):
<local_file_write_date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1142 <local_file_write_date+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1149 <local_file_write_date+0x39>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_file_write_date>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
js     1124 <local_file_write_date+0x14>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i32 @local_file_write_date(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %15
11: ; preds = %1
%12 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
store i32 %14, i32* %2
br label %15
15: ; preds = %11, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i32 @local_file_write_date(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i32 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = select i1 %5, i32 0, i32 %8
ret i32 %9
}
int sg_set_text_mode(int fd) { return fd; }


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

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

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

LLVM IR (-O2):
define i32 @sg_set_text_mode(i32 returned %0) {
ret i32 %0
}
void test___atomic_fetch_sub_0(char *mem) { __atomic_fetch_sub(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_fetch_sub_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%al
neg    %al
lock xadd %al,(%rcx)
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_fetch_sub_0>:
lock subb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_fetch_sub_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw sub i8* %5, i8 %6 acq_rel
store i8 %7, i8* %4
%8 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_fetch_sub_0(i8* nocapture %0) {
%2 = atomicrmw sub i8* %0, i8 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log2(double);
int /*<<< orphan*/ log2f(float);
int /*<<< orphan*/ log2l(long double);
void uninitvar_log2(void) {
  float f;
  (void)log2f(f);
  double d;
  (void)log2(d);
  long double ld;
  (void)log2l(ld);
}


x86 assembly (clang, -O0):
<uninitvar_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  -0x4(%rbp),%xmm0
call   1050 <log2f@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <log2@plt>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <log2l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_log2>:
sub    $0x18,%rsp
call   1050 <log2f@plt>
call   1030 <log2@plt>
call   1040 <log2l@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_log2() {
%1 = alloca float
%2 = alloca double
%3 = alloca x86_fp80
%4 = load float, float* %1
%5 = call i32 @log2f(float %4)
%6 = load double, double* %2
%7 = call i32 @log2(double %6)
%8 = load x86_fp80, x86_fp80* %3
%9 = call i32 @log2l(x86_fp80 %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_log2() {
%1 = tail call i32 @log2f(float undef)
%2 = tail call i32 @log2(double undef)
%3 = tail call i32 @log2l(x86_fp80 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ mergeSort(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printArray(int *, int);
int main() {
  int array[] = {14, 21, 33, 15, 6, 17, 9, 28};
  int size = sizeof(array) / sizeof(array[0]);
  printArray(array, size);
  mergeSort(array, 0, size - 1);
  printArray(array, size);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x8,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <printArray@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <mergeSort@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <mergeSort@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.array = [8 x i32] [i32 14, i32 21, i32 33, i32 15, i32 6, i32 17, i32 9, i32 28]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = alloca i32
%3 = bitcast [8 x i32]* %1 to i8*
store i32 8, i32* %2
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @printArray(i32* %4, i32 %5)
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
%10 = call i32 @mergeSort(i32* %7, i32 0, i32 %9)
%11 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%12 = load i32, i32* %2
%13 = call i32 @printArray(i32* %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [8 x i32] [i32 14, i32 21, i32 33, i32 15, i32 6, i32 17, i32 9, i32 28]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @printArray(i32* %3, i32 8)
%5 = call i32 @mergeSort(i32* %3, i32 0, i32 7)
%6 = call i32 @printArray(i32* %3, i32 8)
ret i32 0
}
void rop3_69_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = T & stk3;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_69_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_69_0_0>:
not    %sil
and    %dl,%sil
or     (%rdi),%sil
not    %sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_69_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = xor i32 %28, -1
%30 = trunc i32 %29 to i8
store i8 %30, i8* %7
%31 = load i8, i8* %7
%32 = load i8*, i8** %4
store i8 %31, i8* %32
ret void
}

LLVM IR (-O2):
define void @rop3_69_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = and i8 %4, %2
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
double test4(int a, int b, double c) { return a + b + c; }


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
add    %esi,%edi
cvtsi2sd %edi,%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @test4(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = sitofp i32 %9 to double
%11 = load double, double* %6
%12 = fadd double %10, %11
ret double %12
}

LLVM IR (-O2):
define double @test4(i32 %0, i32 %1, double %2) {
%4 = add nsw i32 %1, %0
%5 = sitofp i32 %4 to double
%6 = fadd double %5, %2
ret double %6
}
int compare_and_set(long long *ptr, long long exp, long long val) {
  return __atomic_compare_exchange_n(ptr, &exp, val, 0, 5, 5);
}


x86 assembly (clang, -O0):
<compare_and_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rdx
lock cmpxchg %rdx,(%rcx)
mov    %rax,%rcx
sete   %al
mov    %al,-0x31(%rbp)
mov    %rcx,-0x30(%rbp)
test   $0x1,%al
jne    1146 <compare_and_set+0x46>
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x31(%rbp),%al
and    $0x1,%al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_and_set>:
mov    %rsi,%rax
xor    %ecx,%ecx
lock cmpxchg %rdx,(%rdi)
sete   %cl
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_and_set(i64* nocapture %0, i64 %1, i64 %2) {
%4 = cmpxchg i64* %0, i64 %1, i64 %2 seq_cst seq_cst
%5 = extractvalue { i64, i1 } %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}
int get_processor_number_online(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @get_processor_number_online() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ escape_character(char *, char *, char);
char *timlib_escape_single_quotes(char *destination, char *source) {
  escape_character(destination, source, '\'');
  return destination;
}


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

x86 assembly (clang, -O2):
<timlib_escape_single_quotes>:
push   %rbx
mov    %rdi,%rbx
mov    $0x27,%edx
call   1030 <escape_character@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @timlib_escape_single_quotes(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 i32 @escape_character(i8* %5, i8* %6, i8 signext 39)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @timlib_escape_single_quotes(i8* returned %0, i8* %1) {
%3 = tail call i32 @escape_character(i8* %0, i8* %1, i8 signext 39)
ret i8* %0
}
int wmt_ge_sync(struct fb_info *p) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.fb_info = type opaque
define i32 @wmt_ge_sync(%struct.fb_info* nocapture readnone %0) {
ret i32 0
}