xunge/DecIR huggingface dataset:
/* Variables and functions */
int VsReadRegister(int);
int /*<<< orphan*/ VsSoftReset();
int /*<<< orphan*/ VsStreamSameByte32Times(unsigned char);
int /*<<< orphan*/ VsWriteRegister(int, int);
unsigned char VsCancelDataStream() {
  VsSoftReset();
  return 0;
  VsWriteRegister(0x07, 0x1E06);
  unsigned char endFillByte = VsReadRegister(0x06), i = 70, stoppedOk;
  while (i--) {
    while (!((*(volatile unsigned long *)(0x3FFFC000 + 0x14)) & (1 << 6)))
      ;
    VsStreamSameByte32Times(endFillByte);
  }
  VsWriteRegister(0x00, 0x080AU);
  stoppedOk = 0;
  i = 64;
  while (i--) {
    while (!((*(volatile unsigned long *)(0x3FFFC000 + 0x14)) & (1 << 6)))
      ;
    VsStreamSameByte32Times(endFillByte);
    if ((VsReadRegister(0x00) & 0x0008) == 0) {
      stoppedOk = 1;
      break;
    }
  }
  if (stoppedOk == 0) {
    VsSoftReset();
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<VsCancelDataStream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <VsSoftReset@plt>
xor    %eax,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @VsCancelDataStream() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 (...) @VsSoftReset()
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @VsCancelDataStream() {
%1 = tail call i32 (...) @VsSoftReset()
ret i8 0
}
/* Variables and functions */
int rand();
unsigned roll() { return rand() % 20; }


x86 assembly (clang, -O0):
<roll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll>:
push   %rax
xor    %eax,%eax
call   1030 <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
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @roll() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 20
ret i32 %2
}

LLVM IR (-O2):
define i32 @roll() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
ret i32 %2
}
/* Variables and functions */
char *strchr(char *, int);
bool isPieceChar(int c) {
  const char *s = strchr("KQRBNP", c);
  return (s != NULL) && (*s != '\0');
}


x86 assembly (clang, -O0):
<isPieceChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     114e <isPieceChar+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPieceChar>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
mov    $0x7,%edx
call   1030 <memchr@plt>
test   %rax,%rax
je     1136 <isPieceChar+0x26>
mov    %rax,%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"KQRBNP\00"
define i32 @isPieceChar(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %1
%14 = phi i1 [ false, %1 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
@.str = [7 x i8] c"KQRBNP\00"
define i32 @isPieceChar(i32 %0) {
%2 = tail call i8* @memchr(i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i64 7)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %2
%6 = icmp ne i8 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void gpio_status_init() {
  system("echo 4 > /sys/class/gpio/export");
  system("echo low > /sys/class/gpio/gpio4/direction");
  system("echo 1 > /sys/class/gpio/export");
  system("echo low > /sys/class/gpio/gpio1/direction");
}


x86 assembly (clang, -O0):
<gpio_status_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xef9(%rip),%rdi
call   1030 <system@plt>
lea    0xf18(%rip),%rdi
call   1030 <system@plt>
lea    0xf2c(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_status_init>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xefc(%rip),%rdi
call   1030 <system@plt>
lea    0xf1b(%rip),%rdi
call   1030 <system@plt>
lea    0xf2f(%rip),%rdi
pop    %rax
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"echo 4 > /sys/class/gpio/export\00"
@.str.1 = [43 x i8] c"echo low > /sys/class/gpio/gpio4/direction\00"
@.str.2 = [32 x i8] c"echo 1 > /sys/class/gpio/export\00"
@.str.3 = [43 x i8] c"echo low > /sys/class/gpio/gpio1/direction\00"
define void @gpio_status_init() {
%1 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"echo 4 > /sys/class/gpio/export\00"
@.str.1 = [43 x i8] c"echo low > /sys/class/gpio/gpio4/direction\00"
@.str.2 = [32 x i8] c"echo 1 > /sys/class/gpio/export\00"
@.str.3 = [43 x i8] c"echo low > /sys/class/gpio/gpio1/direction\00"
define void @gpio_status_init() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ basm_fwrite(unsigned char *, int, int, void *);
void basm_fputc(int c, void *fd) {
  unsigned char ch[4];
  ch[0] = c;
  basm_fwrite(ch, 1, 1, fd);
}


x86 assembly (clang, -O0):
<basm_fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <basm_fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basm_fputc>:
push   %rax
mov    %rsi,%rcx
mov    %dil,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <basm_fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @basm_fputc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call i32 @basm_fwrite(i8* %9, i32 1, i32 1, i8* %10)
ret void
}

LLVM IR (-O2):
define void @basm_fputc(i32 %0, i8* %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %0 to i8
store i8 %5, i8* %4
%6 = call i32 @basm_fwrite(i8* %4, i32 1, i32 1, i8* %1)
ret void
}
void modinit(void *state, unsigned int samplerate) {
  struct txstate *s = (struct txstate *)state;
}


x86 assembly (clang, -O0):
<modinit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.txstate = type opaque
define void @modinit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.txstate*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.txstate*
store %struct.txstate* %7, %struct.txstate** %5
ret void
}

LLVM IR (-O2):
define void @modinit(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
size_t strlen(const char *str) {
  size_t len = 0;
  while (str[len]) {
    ++len;
  };
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i64, i64* %3
%12 = add i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
int *foo(int n) {
  int(*a)[n];
  int(*volatile b)[n + 1];
  static int k[] = {1, 2, 3};
  a = &k;
  b = a;
  return *a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0x2f12(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x2f19(%rip),%rax
mov    %rax,-0x8(%rsp)
ret

LLVM IR (-O0):
@foo.k = internal global [3 x i32] [i32 1, i32 2, i32 3]
define i32* @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = zext i32 %8 to i64
store i32* getelementptr inbounds ([3 x i32], [3 x i32]* @foo.k, i32 0, i32 0), i32** %3
%10 = load i32*, i32** %3
store volatile i32* %10, i32** %4
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
@foo.k = internal global [3 x i32] [i32 1, i32 2, i32 3]
define i32* @foo(i32 %0) {
%2 = alloca i32*
%3 = bitcast i32** %2 to i8*
store volatile i32* getelementptr inbounds ([3 x i32], [3 x i32]* @foo.k, i64 0, i64 0), i32** %2
ret i32* getelementptr inbounds ([3 x i32], [3 x i32]* @foo.k, i64 0, i64 0)
}
void sd_ct_watchdog_init(void) {}


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

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

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

LLVM IR (-O2):
define void @sd_ct_watchdog_init() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef unsigned int uint16_t;

/* Variables and functions */
uint16_t hdlc_getuint16_addr(const uint8_t *buf) {
  uint16_t data = (uint16_t)(buf[0] >> 1);
  data = data << 8U;
  data = data + (buf[1] >> 1);
  return data;
}


x86 assembly (clang, -O0):
<hdlc_getuint16_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdlc_getuint16_addr>:
mov    (%rdi),%ecx
mov    0x4(%rdi),%eax
and    $0xfffffffe,%ecx
shl    $0x7,%ecx
sar    %eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hdlc_getuint16_addr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = ashr i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = shl i32 %8, 8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i32, i32* %12
%14 = ashr i32 %13, 1
%15 = add i32 %10, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @hdlc_getuint16_addr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 7
%4 = and i32 %3, -256
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = ashr i32 %6, 1
%8 = add i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void instructions(void) {
  printf("Enter your choice:\n"
         "1 to insert an element into the list.\n"
         "2 to delete an element from the list.\n"
         "3 to end.\n");
}


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

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

LLVM IR (-O0):
@.str = [106 x i8] c"Enter your choice:\0A1 to insert an element into the list.\0A2 to delete an element from the list.\0A3 to end.\0A\00"
define void @instructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [105 x i8] c"Enter your choice:\0A1 to insert an element into the list.\0A2 to delete an element from the list.\0A3 to end.\00"
define void @instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number, kv, kub;
  scanf("%d", &number);
  kv = number * number;
  kub = number * number * number;
  printf("\n %d", kv);
  printf("\n %d", kub);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    %ebx,%esi
imul   %ebx,%esi
imul   %esi,%ebx
lea    0xeb8(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"\0A %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"\0A %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mf_logger_close();
int /*<<< orphan*/ mf_logger_open(char *);
int /*<<< orphan*/ mf_write_log(char *);
int main() {
  mf_logger_open("./microflow.log");
  mf_write_log("Test string..");
  mf_write_log("another test string");
  mf_logger_close();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <mf_logger_open@plt>
lea    0xebe(%rip),%rdi
call   1030 <mf_write_log@plt>
lea    0xec0(%rip),%rdi
call   1030 <mf_write_log@plt>
mov    $0x0,%al
call   1050 <mf_logger_close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <mf_logger_open@plt>
lea    0xecc(%rip),%rdi
call   1030 <mf_write_log@plt>
lea    0xece(%rip),%rdi
call   1030 <mf_write_log@plt>
xor    %eax,%eax
call   1050 <mf_logger_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"./microflow.log\00"
@.str.1 = [14 x i8] c"Test string..\00"
@.str.2 = [20 x i8] c"another test string\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @mf_logger_open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @mf_write_log(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mf_write_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @mf_logger_close()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"./microflow.log\00"
@.str.1 = [14 x i8] c"Test string..\00"
@.str.2 = [20 x i8] c"another test string\00"
define i32 @main() {
%1 = tail call i32 @mf_logger_open(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @mf_write_log(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @mf_write_log(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @mf_logger_close()
ret i32 0
}
/* Variables and functions */
double exp(double);
double grad_log_det_inverse_logit(double y) {
  const double exp_y = exp(y);
  return (1.0 - exp_y) / (exp_y + 1.0);
}


x86 assembly (clang, -O0):
<grad_log_det_inverse_logit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grad_log_det_inverse_logit>:
push   %rax
call   1030 <exp@plt>
movsd  0xee2(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @grad_log_det_inverse_logit(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @exp(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fsub double 1.000000e+00, %6
%8 = load double, double* %3
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @grad_log_det_inverse_logit(double %0) {
%2 = tail call double @exp(double %0)
%3 = fsub double 1.000000e+00, %2
%4 = fadd double %2, 1.000000e+00
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
int blosc_compname_to_compcode(const char *compname) {
  int code = -1;
  if (strcmp(compname, "blosclz") == 0) {
    code = 0;
  }
  return code;
}


x86 assembly (clang, -O0):
<blosc_compname_to_compcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1144 <blosc_compname_to_compcode+0x34>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blosc_compname_to_compcode>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"blosclz\00"
define i32 @blosc_compname_to_compcode(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 -1, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 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 0, i32* %3
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"blosclz\00"
define i32 @blosc_compname_to_compcode(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
void main(void) {
  int i;
  i |= 0x80;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = or i32 %2, 128
store i32 %3, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
int ft_isspace(int c) {
  if (c == 32 || (c >= 9 && c <= 13))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1125 <ft_isspace+0x25>
cmpl   $0x9,-0x8(%rbp)
jl     1131 <ft_isspace+0x31>
cmpl   $0xd,-0x8(%rbp)
jg     1131 <ft_isspace+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_isspace+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
cmp    $0x20,%edi
sete   %al
add    $0xfffffff7,%edi
cmp    $0x5,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isspace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 32
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 9
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 13
br i1 %11, label %12, label %13
12: ; preds = %9, %1
store i32 1, i32* %2
br label %14
13: ; preds = %9, %6
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = add i32 %0, -9
%4 = icmp ult i32 %3, 5
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void hint() {
  int a = 0;
#pragma omp atomic hint
  a += 1;
#pragma omp atomic hint(
  a += 1;
#pragma omp atomic hint(+
  a += 1;
#pragma omp atomic hint(a
  a += 1;
#pragma omp atomic hint(a)
  a += 1;
#pragma omp atomic hint(1) hint(1)
  a += 1;
}


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

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

LLVM IR (-O0):
define void @hint() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ wcsxfrm(int /*<<< orphan*/ *, int /*<<< orphan*/ *, size_t);
void uninivar_wcsxfrm(void) {
  wchar_t *ds;
  wchar_t *ss;
  size_t n;
  (void)wcsxfrm(ds, ss, n);
}


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

x86 assembly (clang, -O2):
<uninivar_wcsxfrm>:
jmp    1030 <wcsxfrm@plt>

LLVM IR (-O0):
define void @uninivar_wcsxfrm() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i64
%4 = load i32*, i32** %1
%5 = load i32*, i32** %2
%6 = load i64, i64* %3
%7 = call i32 @wcsxfrm(i32* %4, i32* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninivar_wcsxfrm() {
%1 = tail call i32 @wcsxfrm(i32* undef, i32* undef, i64 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ write_log(int, int, char *, int);
void run_log_writer(int fd_read, int fd_log) {
  char *buffer = (char *)malloc(1024 * sizeof(char));
  write_log(fd_read, fd_log, buffer, 1024);
  free(buffer);
}


x86 assembly (clang, -O0):
<run_log_writer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x400,%ecx
call   1040 <write_log@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_log_writer>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %r14d,%esi
mov    %rax,%rdx
mov    $0x400,%ecx
call   1040 <write_log@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @run_log_writer(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i64 @malloc(i32 1024)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = call i32 @write_log(i32 %8, i32 %9, i8* %10, i32 1024)
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
ret void
}

LLVM IR (-O2):
define void @run_log_writer(i32 %0, i32 %1) {
%3 = tail call i64 @malloc(i32 1024)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @write_log(i32 %0, i32 %1, i8* %4, i32 1024)
%6 = tail call i32 @free(i8* %4)
ret void
}
/* Type definitions */
struct io_buf_handle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ io_error();
size_t io_gz_file_to_mem(struct io_buf_handle *iobh, char *filename) {
  io_error();
  return 0;
}


x86 assembly (clang, -O0):
<io_gz_file_to_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <io_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.io_buf_handle = type { i32 }
define i64 @io_gz_file_to_mem(%struct.io_buf_handle* %0, i8* %1) {
%3 = alloca %struct.io_buf_handle*
%4 = alloca i8*
store %struct.io_buf_handle* %0, %struct.io_buf_handle** %3
store i8* %1, i8** %4
%5 = call i32 (...) @io_error()
ret i64 0
}

LLVM IR (-O2):
%struct.io_buf_handle = type { i32 }
define i64 @io_gz_file_to_mem(%struct.io_buf_handle* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @io_error()
ret i64 0
}
char lower(char c) { return (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c; }


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <lower+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <lower+0x36>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <lower+0x3d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @lower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 65
%14 = add nsw i32 %13, 97
br label %18
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
br label %18
18: ; preds = %15, %10
%19 = phi i32 [ %14, %10 ], [ %17, %15 ]
%20 = trunc i32 %19 to i8
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @lower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void setcpugovernor() { printf("not implemented yet..."); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"not implemented yet...\00"
define void @setcpugovernor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"not implemented yet...\00"
define void @setcpugovernor() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ invalid_mem_err(void const *, char const *);
void invalid_mem_exit(const void *ptr, const char *str) {
  if (invalid_mem_err(ptr, str)) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<invalid_mem_exit>:
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 <invalid_mem_err@plt>
cmp    $0x0,%rax
je     1155 <invalid_mem_exit+0x35>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invalid_mem_exit>:
push   %rax
call   1030 <invalid_mem_err@plt>
test   %rax,%rax
jne    112d <invalid_mem_exit+0xd>
pop    %rax
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @invalid_mem_exit(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 i64 @invalid_mem_err(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @invalid_mem_exit(i8* %0, i8* %1) {
%3 = tail call i64 @invalid_mem_err(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
bool nrf53_errata_52(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_52() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_STORE_CTX;

/* Variables and functions */
int verify_cb(int preverify_ok, X509_STORE_CTX *ctx) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @verify_cb(i32 %0, i32* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int /*<<< orphan*/);
char *write_uint16(char *, int /*<<< orphan*/);
char *write_string(char *buf, char *str, uint16_t str_len) {
  buf = write_uint16(buf, str_len);
  memcpy(buf, str, str_len);
  buf += str_len;
  *buf = '\0';
  return buf + 1;
}


x86 assembly (clang, -O0):
<write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <write_uint16@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_string>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %edx,%esi
call   1040 <write_uint16@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    %rbx,%rax
add    $0x1,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @write_string(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = call i8* @write_uint16(i8* %7, i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i32, i32* %6
%15 = load i8*, i8** %4
%16 = sext i32 %14 to i64
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8* %17, i8** %4
%18 = load i8*, i8** %4
store i8 0, i8* %18
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 1
ret i8* %20
}

LLVM IR (-O2):
define i8* @write_string(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @write_uint16(i8* %0, i32 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i32 %2)
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
%8 = getelementptr inbounds i8, i8* %7, i64 1
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ flush_window_low();
void flush_window() { flush_window_low(); }


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

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

LLVM IR (-O0):
define void @flush_window() {
%1 = call i32 (...) @flush_window_low()
ret void
}

LLVM IR (-O2):
define void @flush_window() {
%1 = tail call i32 (...) @flush_window_low()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lruCacheInit(int);
void init(int cap) { lruCacheInit(cap); }


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

x86 assembly (clang, -O2):
<init>:
jmp    1030 <lruCacheInit@plt>

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

LLVM IR (-O2):
define void @init(i32 %0) {
%2 = tail call i32 @lruCacheInit(i32 %0)
ret void
}
int cond2(void *testme) { return (testme != 0) ?: 0; }


x86 assembly (clang, -O0):
<cond2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0xc(%rbp)
test   $0x1,%al
jne    1128 <cond2+0x28>
jmp    1133 <cond2+0x33>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113d <cond2+0x3d>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <cond2+0x3d>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cond2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
br i1 %4, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
%9 = phi i32 [ %5, %6 ], [ 0, %7 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @cond2(i8* readnone %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ func3();
void func2() { func3(); }


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

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

LLVM IR (-O0):
define void @func2() {
%1 = call i32 (...) @func3()
ret void
}

LLVM IR (-O2):
define void @func2() {
%1 = tail call i32 (...) @func3()
ret void
}
char toInd(char c) {
  if (c < 91)
    return (c - 65);
  else
    return (c - 97);
}


x86 assembly (clang, -O0):
<toInd>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x5b,%eax
jge    1126 <toInd+0x26>
movsbl -0x2(%rbp),%eax
sub    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1130 <toInd+0x30>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toInd>:
cmp    $0x5b,%dil
setl   %al
shl    $0x5,%al
add    %dil,%al
add    $0x9f,%al
ret

LLVM IR (-O0):
define signext i8 @toInd(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 91
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 65
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %17
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 97
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %12, %7
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @toInd(i8 signext %0) {
%2 = icmp slt i8 %0, 91
%3 = select i1 %2, i8 -65, i8 -97
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
char *malloc(size_t const);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  const size_t size = 16;
  char *p = malloc(size);
  p[size] = 0;
  printf(p);
  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)
movq   $0x10,-0x18(%rbp)
mov    $0x10,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x0,0x10(%rax)
mov    -0x20(%rbp),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
call   1040 <malloc@plt>
movb   $0x0,0x10(%rax)
mov    %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 16, i64* %6
%8 = call i8* @malloc(i64 16)
store i8* %8, i8** %7
%9 = load i8*, i8** %7
%10 = getelementptr inbounds i8, i8* %9, i64 16
store i8 0, i8* %10
%11 = load i8*, i8** %7
%12 = call i32 @printf(i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(16) i8* @malloc(i64 16)
%4 = getelementptr inbounds i8, i8* %3, i64 16
store i8 0, i8* %4
%5 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("  bool = %d\n", (-1 < 0U));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c" bool = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Variables and functions */
char *bool_to_str(int);
scalar_t__ make_version_cmp(int *, char const *, unsigned int, char **);
char *make_version_gt(char const *nm, unsigned int argc, char **argv) {
  bool err = false;
  bool res;
  res = (make_version_cmp(&err, nm, argc, argv) > 0);
  if (err)
    return NULL;
  return bool_to_str(res);
}


x86 assembly (clang, -O0):
<make_version_gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    -0x24(%rbp),%rdi
call   1030 <make_version_cmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1174 <make_version_gt+0x54>
movq   $0x0,-0x8(%rbp)
jmp    1180 <make_version_gt+0x60>
mov    -0x28(%rbp),%edi
call   1040 <bool_to_str@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_version_gt>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <make_version_cmp@plt>
cmpl   $0x0,0x4(%rsp)
je     1146 <make_version_gt+0x26>
xor    %eax,%eax
pop    %rcx
ret
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1040 <bool_to_str@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @make_version_gt(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 0, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = call i64 @make_version_cmp(i32* %8, i8* %10, i32 %11, i8** %12)
%14 = icmp sgt i64 %13, 0
%15 = zext i1 %14 to i32
store i32 %15, i32* %9
%16 = load i32, i32* %8
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %3
store i8* null, i8** %4
br label %22
19: ; preds = %3
%20 = load i32, i32* %9
%21 = call i8* @bool_to_str(i32 %20)
store i8* %21, i8** %4
br label %22
22: ; preds = %19, %18
%23 = load i8*, i8** %4
ret i8* %23
}

LLVM IR (-O2):
define i8* @make_version_gt(i8* %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i64 @make_version_cmp(i32* %4, i8* %0, i32 %1, i8** %2)
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = icmp sgt i64 %6, 0
%11 = zext i1 %10 to i32
%12 = call i8* @bool_to_str(i32 %11)
br label %13
13: ; preds = %3, %9
%14 = phi i8* [ %12, %9 ], [ null, %3 ]
ret i8* %14
}
float obdConvert_0F(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A - 40.0f;
}


x86 assembly (clang, -O0):
<obdConvert_0F>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee0(%rip),%xmm1
subss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_0F>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
addss  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_0F(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = fsub float %10, 4.000000e+01
ret float %11
}

LLVM IR (-O2):
define float @obdConvert_0F(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = fadd float %5, -4.000000e+01
ret float %6
}
/* Variables and functions */
double ceil(double);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double Ceil(double a) {
  printf("Enter a number: ");
  scanf("%lf", &a);
  return (ceil(a));
}


x86 assembly (clang, -O0):
<Ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ceil>:
push   %rax
movsd  %xmm0,(%rsp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <ceil@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @llvm.ceil.f64(double %5)
ret double %6
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter a number: \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @Ceil(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%5 = load double, double* %2
%6 = call double @llvm.ceil.f64(double %5)
ret double %6
}