xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int registers_read_byte(int);
int /*<<< orphan*/ registers_write_byte(int, int);
void registers_write_disable(void) {
  uint8_t flags_lo = registers_read_byte(0x05);
  registers_write_byte(0x05, flags_lo & ~(1 << 0x01));
}


x86 assembly (clang, -O0):
<registers_write_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xfffffffd,%esi
mov    $0x5,%edi
call   1030 <registers_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<registers_write_disable>:
push   %rax
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
and    $0xfffffffd,%eax
mov    $0x5,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <registers_write_byte@plt>

LLVM IR (-O0):
define void @registers_write_disable() {
%1 = alloca i32
%2 = call i32 @registers_read_byte(i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -3
%5 = call i32 @registers_write_byte(i32 5, i32 %4)
ret void
}

LLVM IR (-O2):
define void @registers_write_disable() {
%1 = tail call i32 @registers_read_byte(i32 5)
%2 = and i32 %1, -3
%3 = tail call i32 @registers_write_byte(i32 5, i32 %2)
ret void
}
void bu_compile_listp(args) struct conscell *args;
{
  int n = bu_compile_arg_list(args);
  if (n != 1)
    goto er;
  EMIT1ATM("LISTP");
  EMITEND();
  return;
er:
  cerror("listp: wrong # of args", args);
}


x86 assembly (clang, -O0):
<bu_compile_listp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <bu_compile_arg_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1169 <bu_compile_listp+0x29>
jmp    1183 <bu_compile_listp+0x43>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <EMIT1ATM@plt>
mov    $0x0,%al
call   1030 <EMITEND@plt>
jmp    1195 <bu_compile_listp+0x55>
mov    -0x8(%rbp),%rsi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1060 <cerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bu_compile_listp>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <bu_compile_arg_list@plt>
cmp    $0x1,%eax
jne    1166 <bu_compile_listp+0x26>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <EMIT1ATM@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <EMITEND@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <cerror@plt>

LLVM IR (-O0):
%struct.conscell = type opaque
@.str = [6 x i8] c"LISTP\00"
@.str.1 = [23 x i8] c"listp: wrong # of args\00"
define void @bu_compile_listp(%struct.conscell* %0) {
%2 = alloca %struct.conscell*
%3 = alloca i32
store %struct.conscell* %0, %struct.conscell** %2
%4 = load %struct.conscell*, %struct.conscell** %2
%5 = call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @EMITEND()
br label %15
12: ; preds = %8
%13 = load %struct.conscell*, %struct.conscell** %2
%14 = call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %13)
br label %15
15: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
%struct.conscell = type opaque
@.str = [6 x i8] c"LISTP\00"
@.str.1 = [23 x i8] c"listp: wrong # of args\00"
define void @bu_compile_listp(%struct.conscell* %0) {
%2 = tail call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @EMITEND()
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %0)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printSharpRow(int row) {
  int i;
  for (i = 0; i < row; i++) {
    printf("#");
  }
}


x86 assembly (clang, -O0):
<printSharpRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <printSharpRow+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printSharpRow+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSharpRow>:
push   %rbx
test   %edi,%edi
jle    112f <printSharpRow+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x23,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printSharpRow+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printSharpRow(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 35)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void swapv2(int *a, int *b) {
  *a = *a + *b;
  *b = *a - *b;
  *a = *a - *b;
}


x86 assembly (clang, -O0):
<swapv2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapv2>:
mov    (%rsi),%eax
add    (%rdi),%eax
mov    %eax,(%rdi)
sub    (%rsi),%eax
mov    %eax,(%rsi)
sub    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @swapv2(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = sub nsw i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @swapv2(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = sub nsw i32 %8, %7
store i32 %9, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *malloc_trap(size_t malloc_size) {
  void *ret = malloc(malloc_size);
  if (!ret) {
    perror("err: malloc_trap: \n");
    exit(EXIT_FAILURE);
  }
  return ret;
}


x86 assembly (clang, -O0):
<malloc_trap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <malloc_trap+0x3e>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_trap>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <malloc_trap+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"err: malloc_trap: \0A\00"
@EXIT_FAILURE = global i32 0
define i8* @malloc_trap(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [20 x i8] c"err: malloc_trap: \0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @malloc_trap(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
char *getenv(char const *);
long strtol(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
long getenvInt(const char *key, long default_value) {
  const char *pv = getenv(key);
  if (pv) {
    return strtol(pv, 0, 0);
  } else {
    return default_value;
  }
}


x86 assembly (clang, -O0):
<getenvInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115e <getenvInt+0x3e>
mov    -0x20(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <strtol@plt>
mov    %rax,-0x8(%rbp)
jmp    1166 <getenvInt+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getenvInt>:
push   %rbx
mov    %rsi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
je     113b <getenvInt+0x1b>
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
jmp    1040 <strtol@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @getenvInt(i8* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = call i8* @getenv(i8* %7)
store i8* %8, i8** %6
%9 = load i8*, i8** %6
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %6
%13 = call i64 @strtol(i8* %12, i32 0, i32 0)
store i64 %13, i64* %3
br label %16
14: ; preds = %2
%15 = load i64, i64* %5
store i64 %15, i64* %3
br label %16
16: ; preds = %14, %11
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @getenvInt(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @getenv(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i64 @strtol(i8* %3, i32 0, i32 0)
br label %7
7: ; preds = %2, %5
%8 = phi i64 [ %6, %5 ], [ %1, %2 ]
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ pxa_gpio_mode(int);
void init_drive() {
  pxa_gpio_mode((115 | 0x080));
  do {
    if (1)
      (*((((115) & 0x7f) < 96)
             ? &(*(volatile unsigned long
                       *)((unsigned long)&(
                              *((volatile unsigned long *)0x40E00018)) +
                          (((115) & 0x60) >> 3)))
             : &(*((volatile unsigned long *)0x40E00118)))) =
          (1 << ((115) & 0x1f));
    else
      (*((((115) & 0x7f) < 96)
             ? &(*(volatile unsigned long
                       *)((unsigned long)&(
                              *((volatile unsigned long *)0x40E00024)) +
                          (((115) & 0x60) >> 3)))
             : &(*((volatile unsigned long *)0x40E00124)))) =
          (1 << ((115) & 0x1f));
  } while (0);
}


x86 assembly (clang, -O0):
<init_drive>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf3,%edi
call   1030 <pxa_gpio_mode@plt>
mov    $0x40e00118,%eax
movq   $0x80000,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_drive>:
push   %rax
mov    $0xf3,%edi
call   1030 <pxa_gpio_mode@plt>
movq   $0x80000,0x40e00118
pop    %rax
ret

LLVM IR (-O0):
define void @init_drive() {
%1 = call i32 @pxa_gpio_mode(i32 243)
br label %2
2: ; preds = %0
store volatile i64 524288, i64* inttoptr (i64 1088422168 to i64*)
br label %3
3: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @init_drive() {
%1 = tail call i32 @pxa_gpio_mode(i32 243)
store volatile i64 524288, i64* inttoptr (i64 1088422168 to i64*)
ret void
}
void loop2(int sum, int n) {
  do {
    sum += n;
  } while (--n != 0);
  return;
}


x86 assembly (clang, -O0):
<loop2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    110a <loop2+0xa>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @loop2(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ObjWrite8(unsigned long);
void ObjWrite24(unsigned long V) {
  ObjWrite8(V);
  ObjWrite8(V >> 8);
  ObjWrite8(V >> 16);
}


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

x86 assembly (clang, -O2):
<ObjWrite24>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ObjWrite8@plt>
mov    %rbx,%rdi
shr    $0x8,%rdi
call   1030 <ObjWrite8@plt>
shr    $0x10,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ObjWrite8@plt>

LLVM IR (-O0):
define void @ObjWrite24(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @ObjWrite8(i64 %3)
%5 = load i64, i64* %2
%6 = lshr i64 %5, 8
%7 = call i32 @ObjWrite8(i64 %6)
%8 = load i64, i64* %2
%9 = lshr i64 %8, 16
%10 = call i32 @ObjWrite8(i64 %9)
ret void
}

LLVM IR (-O2):
define void @ObjWrite24(i64 %0) {
%2 = tail call i32 @ObjWrite8(i64 %0)
%3 = lshr i64 %0, 8
%4 = tail call i32 @ObjWrite8(i64 %3)
%5 = lshr i64 %0, 16
%6 = tail call i32 @ObjWrite8(i64 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ htole16(int /*<<< orphan*/);
void WriteLE16(unsigned char *ptr, uint16_t x) {
  *((uint16_t *)ptr) = htole16(x);
}


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

x86 assembly (clang, -O2):
<WriteLE16>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htole16@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @WriteLE16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @htole16(i32 %5)
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @WriteLE16(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @htole16(i32 %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
int test_imm_B9uint8_mem(unsigned char *val) {
  return ((*val) & (-0xB9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B9uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff47,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B9uint8_mem>:
testb  $0x47,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B9uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -185
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_B9uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 71
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
void *malloc(size_t);
void *memcpy(void *, void const *, size_t);
void *memdup(const void *p, size_t n) {
  void *r = malloc(n);
  if (r == NULL)
    return NULL;
  return memcpy(r, p, n);
}


x86 assembly (clang, -O0):
<memdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1155 <memdup+0x35>
movq   $0x0,-0x8(%rbp)
jmp    1172 <memdup+0x52>
mov    -0x20(%rbp),%rdi
mov    %rdi,-0x28(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <memdup+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @memdup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %0, i64 %1, i1 false)
br label %6
6: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
char *malloc(size_t);
scalar_t__ memcpy(char *, char const *, size_t);
size_t strnlen(char const *, size_t);
char *strndup(const char *s, size_t n) {
  size_t len = strnlen(s, n);
  char *new = malloc(len + 1);
  if (new == NULL)
    return NULL;
  new[len] = '\0';
  return (char *)memcpy(new, s, len);
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strnlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117a <strndup+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    119b <strndup+0x6b>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strnlen@plt>
mov    %rax,%rbx
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1161 <strndup+0x31>
movb   $0x0,(%rax,%rbx,1)
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
jmp    1163 <strndup+0x33>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = call i64 @strnlen(i8* %8, i64 %9)
store i64 %10, i64* %6
%11 = load i64, i64* %6
%12 = add i64 %11, 1
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %7
%14 = load i8*, i8** %7
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %2
store i8* null, i8** %3
br label %26
17: ; preds = %2
%18 = load i8*, i8** %7
%19 = load i64, i64* %6
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %7
%22 = load i8*, i8** %4
%23 = load i64, i64* %6
%24 = call i64 @memcpy(i8* %21, i8* %22, i64 %23)
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %3
br label %26
26: ; preds = %17, %16
%27 = load i8*, i8** %3
ret i8* %27
}

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = tail call i64 @strnlen(i8* %0, i64 %1)
%4 = add i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %5, i64 %3
store i8 0, i8* %8
%9 = tail call i64 @memcpy(i8* %5, i8* %0, i64 %3)
%10 = inttoptr i64 %9 to i8*
br label %11
11: ; preds = %2, %7
%12 = phi i8* [ %10, %7 ], [ null, %2 ]
ret i8* %12
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t bitCount_fun_uint8_t(uint8_t x) {
  uint32_t r = x & 1;
  while (x >>= 1)
    r += x & 1;
  return r;
}


x86 assembly (clang, -O0):
<bitCount_fun_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1133 <bitCount_fun_uint8_t+0x33>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1110 <bitCount_fun_uint8_t+0x10>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitCount_fun_uint8_t>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%edi
jb     1120 <bitCount_fun_uint8_t+0x20>
mov    %edi,%ecx
nopl   0x0(%rax)
sar    %ecx
mov    %ecx,%edx
and    $0x1,%edx
add    %edx,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <bitCount_fun_uint8_t+0x10>
ret

LLVM IR (-O0):
define i32 @bitCount_fun_uint8_t(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 1
store i32 %5, i32* %3
br label %6
6: ; preds = %10, %1
%7 = load i32, i32* %2
%8 = ashr i32 %7, 1
store i32 %8, i32* %2
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %2
%12 = and i32 %11, 1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
br label %6
15: ; preds = %6
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @bitCount_fun_uint8_t(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ult i32 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ %2, %1 ]
%7 = ashr i32 %5, 1
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %8, %6
%10 = icmp ult i32 %5, 4
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ %2, %1 ], [ %9, %4 ]
ret i32 %12
}
int system(const char *cmd) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @system(i8* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
struct fio_file {
  int dummy;
};

/* Variables and functions */
int EINVAL;
int blockdev_invalidate_cache(struct fio_file *f) { return EINVAL; }


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

x86 assembly (clang, -O2):
<blockdev_invalidate_cache>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.fio_file = type { i32 }
@EINVAL = global i32 0
define i32 @blockdev_invalidate_cache(%struct.fio_file* %0) {
%2 = alloca %struct.fio_file*
store %struct.fio_file* %0, %struct.fio_file** %2
%3 = load i32, i32* @EINVAL
ret i32 %3
}

LLVM IR (-O2):
%struct.fio_file = type { i32 }
@EINVAL = global i32 0
define i32 @blockdev_invalidate_cache(%struct.fio_file* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void dummy_aux(uint32_t n) {
  for (; n != 0; --n) {
  }
}


x86 assembly (clang, -O0):
<dummy_aux>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <dummy_aux+0x29>
jmp    1118 <dummy_aux+0x18>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <dummy_aux+0x8>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @dummy_aux(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %7, %1
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i64, i64* %2
%9 = add nsw i64 %8, -1
store i64 %9, i64* %2
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @dummy_aux(i64 %0) {
ret void
}
/* Variables and functions */
scalar_t__ Getline(char *, int);
scalar_t__ Remove(char *);
int /*<<< orphan*/ printf(char *, char *);
main() {
  int i;
  char line[1000];
  while (Getline(line, 1000) > 0) {
    if (Remove(line) > 0)
      printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
cmp    $0x0,%rax
jle    118b <main+0x5b>
lea    -0x3f0(%rbp),%rdi
call   1050 <Remove@plt>
cmp    $0x0,%rax
jle    1186 <main+0x56>
lea    -0x3f0(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
test   %rax,%rax
jle    118c <main+0x5c>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
jmp    1172 <main+0x42>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <Getline@plt>
test   %rax,%rax
jle    118c <main+0x5c>
mov    %rbx,%rdi
call   1050 <Remove@plt>
test   %rax,%rax
jle    1160 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @Getline(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = call i64 @Remove(i8* %2)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i64 @Getline(i8* %2, i32 1000)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ command(char *);
pwd() { (void)command("PWD"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"PWD\00"
define i32 @pwd() {
%1 = alloca i32
%2 = call i32 @command(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"PWD\00"
define i32 @pwd() {
%1 = tail call i32 @command(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct c2interface {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ c2ck_set(struct c2interface *, int);
int /*<<< orphan*/ usleep(int);
void c2_reset(struct c2interface *c2if) {
  c2ck_set(c2if, 0);
  usleep(25);
  c2ck_set(c2if, 1);
  usleep(1);
}


x86 assembly (clang, -O0):
<c2_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <c2ck_set@plt>
mov    $0x19,%edi
call   1040 <usleep@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <c2ck_set@plt>
mov    $0x1,%edi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c2_reset>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
call   1030 <c2ck_set@plt>
mov    $0x19,%edi
call   1040 <usleep@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <c2ck_set@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1040 <usleep@plt>

LLVM IR (-O0):
%struct.c2interface = type { i32 }
define void @c2_reset(%struct.c2interface* %0) {
%2 = alloca %struct.c2interface*
store %struct.c2interface* %0, %struct.c2interface** %2
%3 = load %struct.c2interface*, %struct.c2interface** %2
%4 = call i32 @c2ck_set(%struct.c2interface* %3, i32 0)
%5 = call i32 @usleep(i32 25)
%6 = load %struct.c2interface*, %struct.c2interface** %2
%7 = call i32 @c2ck_set(%struct.c2interface* %6, i32 1)
%8 = call i32 @usleep(i32 1)
ret void
}

LLVM IR (-O2):
%struct.c2interface = type { i32 }
define void @c2_reset(%struct.c2interface* %0) {
%2 = tail call i32 @c2ck_set(%struct.c2interface* %0, i32 0)
%3 = tail call i32 @usleep(i32 25)
%4 = tail call i32 @c2ck_set(%struct.c2interface* %0, i32 1)
%5 = tail call i32 @usleep(i32 1)
ret void
}
/* Variables and functions */
size_t bitmap_get_bpp(void *bitmap) { return 4; }


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

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

LLVM IR (-O0):
define i64 @bitmap_get_bpp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i64 4
}

LLVM IR (-O2):
define i64 @bitmap_get_bpp(i8* nocapture readnone %0) {
ret i64 4
}
unsigned read_register(unsigned component, unsigned reg) {
  return *(((unsigned *)(((component & ~(1 << 31)) | 0xFDD00000) + reg)));
}


x86 assembly (clang, -O0):
<read_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7fffffff,%eax
or     $0xfdd00000,%eax
add    -0x8(%rbp),%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_register>:
or     $0xfdd00000,%edi
add    %esi,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read_register(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 = and i32 %5, 2147483647
%7 = or i32 %6, -36700160
%8 = load i32, i32* %4
%9 = add i32 %7, %8
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_register(i32 %0, i32 %1) {
%3 = or i32 %0, -36700160
%4 = add i32 %3, %1
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ larger_of(double *, double *);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main(void) {
  double x, y;
  scanf("%lf%lf", &x, &y);
  larger_of(&x, &y);
  printf("%g %g\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <larger_of@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rdi
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <larger_of@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [7 x i8] c"%g %g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = call i32 @larger_of(double* %2, double* %3)
%6 = load double, double* %2
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %6, double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@.str.1 = [7 x i8] c"%g %g\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = call i32 @larger_of(double* %1, double* %2)
%7 = load double, double* %1
%8 = load double, double* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %7, double %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xaf() {
  Assert_real((isspace(175) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              880, ("isspace should be 0 for 0xaf"));
}


x86 assembly (clang, -O0):
<t_isspace_0xaf>:
push   %rbp
mov    %rsp,%rbp
mov    $0xaf,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x370,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xaf>:
push   %rax
mov    $0xaf,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x370,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xaf\00"
define void @t_isspace_0xaf() {
%1 = call i64 @isspace(i32 175)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xaf\00"
define void @t_isspace_0xaf() {
%1 = tail call i64 @isspace(i32 175)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void IO_InitCasablancaGlY2Y4(void) {}


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

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

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

LLVM IR (-O2):
define void @IO_InitCasablancaGlY2Y4() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int height;
};
typedef TYPE_1__ XCreateWindowEvent;

/* Variables and functions */
void set_XCreateWindowEvent_height(void *_p, int _v) {
  ((XCreateWindowEvent *)_p)->height = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XCreateWindowEvent_height>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XCreateWindowEvent_height(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void xml_read(void) {}


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

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

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

LLVM IR (-O2):
define void @xml_read() {
ret void
}
void preach(struct battle_char *origin, struct battle_char *target) {}


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

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

LLVM IR (-O0):
%struct.battle_char = type opaque
define void @preach(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
ret void
}

LLVM IR (-O2):
%struct.battle_char = type opaque
define void @preach(%struct.battle_char* nocapture %0, %struct.battle_char* nocapture %1) {
ret void
}
int stringLength(const char *str) {
  int length;
  for (length = 0; str[length] != '\0'; ++length)
    ;
  return length;
}


x86 assembly (clang, -O0):
<stringLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <stringLength+0x37>
jmp    1129 <stringLength+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <stringLength+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringLength>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <stringLength+0x10>
ret

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

LLVM IR (-O2):
define i32 @stringLength(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) int64_t
_MM_EXTRACT_EPI64(__m128i val, const int LANE) {
  __attribute__((aligned(16))) int64_t tmp[2];
  _mm_store_si128((__m128i *)tmp, val);
  return tmp[LANE];
}


x86 assembly (clang, -O0):
<_MM_EXTRACT_EPI64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <_mm_store_si128@plt>
movslq -0x8(%rbp),%rax
mov    -0x10(%rbp,%rax,4),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MM_EXTRACT_EPI64>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%esi
mov    %rsp,%rdi
call   1030 <_mm_store_si128@plt>
movslq %ebx,%rax
mov    (%rsp,%rax,4),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_MM_EXTRACT_EPI64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @_mm_store_si128(i32* %6, i32 %7)
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 %10
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @_MM_EXTRACT_EPI64(i32 %0, i32 %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%6 = call i32 @_mm_store_si128(i32* %5, i32 %0)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
void g_signal_remove_emission_hook() {}


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

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

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

LLVM IR (-O2):
define void @g_signal_remove_emission_hook() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char string[] = "dad";
  string[0] = 'b';
  printf("%s\n", string);
  *string = 'm';
  printf("%s\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x8(%rbp)
movb   $0x62,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movb   $0x6d,-0x8(%rbp)
lea    -0x8(%rbp),%rsi
lea    0xeb9(%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
movl   $0x646162,0x4(%rsp)
lea    0xedd(%rip),%rbx
lea    0x4(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
movb   $0x6d,0x4(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.string = [4 x i8] c"dad\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = bitcast [4 x i8]* %2 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 98, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8 109, i8* %7
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6578530, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
store i8 109, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memmove(char *, char *, int);
size_t strlen(char *);
void delete_string(char *string, size_t count) {
  size_t length = strlen(string);
  assert(0 != count && count <= length);
  (void)memmove(string, string + count, 1 + length - count);
}


x86 assembly (clang, -O0):
<delete_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
xor    %ecx,%ecx
cmp    -0x10(%rbp),%rcx
mov    %al,-0x19(%rbp)
je     116c <delete_string+0x3c>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
setbe  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
add    $0x1,%rax
sub    -0x10(%rbp),%rax
mov    %eax,%edx
call   1050 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_string>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
test   %r15,%r15
setne  %al
cmp    %r15,%rbx
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
lea    (%r14,%r15,1),%rsi
sub    %r15d,%ebx
add    $0x1,%ebx
mov    %r14,%rdi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <memmove@plt>

LLVM IR (-O0):
define void @delete_string(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i64, i64* %4
%9 = icmp ne i64 0, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i64, i64* %4
%12 = load i64, i64* %5
%13 = icmp ule i64 %11, %12
br label %14
14: ; preds = %10, %2
%15 = phi i1 [ false, %2 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i8*, i8** %3
%19 = load i8*, i8** %3
%20 = load i64, i64* %4
%21 = getelementptr inbounds i8, i8* %19, i64 %20
%22 = load i64, i64* %5
%23 = add i64 1, %22
%24 = load i64, i64* %4
%25 = sub i64 %23, %24
%26 = trunc i64 %25 to i32
%27 = call i32 @memmove(i8* %18, i8* %21, i32 %26)
ret void
}

LLVM IR (-O2):
define void @delete_string(i8* %0, i64 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = icmp ne i64 %1, 0
%5 = icmp uge i64 %3, %1
%6 = select i1 %4, i1 %5, i1 false
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = getelementptr inbounds i8, i8* %0, i64 %1
%10 = sub i64 1, %1
%11 = add i64 %10, %3
%12 = trunc i64 %11 to i32
%13 = tail call i32 @memmove(i8* %0, i8* %9, i32 %12)
ret void
}
void sl811_init_irq(void) {}


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

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

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

LLVM IR (-O2):
define void @sl811_init_irq() {
ret void
}