xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct TYPE_2__ {
  int /*<<< orphan*/ s_addr;
};
struct sockaddr_in {
  TYPE_1__ sin_addr;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ memcpy(struct sockaddr *, struct sockaddr_in *, int);
void set_s_addr(struct sockaddr *saddr, uint32_t ipaddr) {
  struct sockaddr_in sin = {
      .sin_family = AF_INET,
      .sin_addr.s_addr = ipaddr,
  };
  memcpy(saddr, &sin, sizeof sin);
}


x86 assembly (clang, -O0):
<set_s_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_s_addr>:
push   %rax
mov    %esi,(%rsp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.sockaddr_in = type { %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define void @set_s_addr(%struct.sockaddr* %0, i32 %1) {
%3 = alloca %struct.sockaddr*
%4 = alloca i32
%5 = alloca %struct.sockaddr_in
store %struct.sockaddr* %0, %struct.sockaddr** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 0
%7 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i32 0, i32 0
%8 = load i32, i32* %4
store i32 %8, i32* %7
%9 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %5, i32 0, i32 1
%10 = load i32, i32* @AF_INET
store i32 %10, i32* %9
%11 = load %struct.sockaddr*, %struct.sockaddr** %3
%12 = call i32 @memcpy(%struct.sockaddr* %11, %struct.sockaddr_in* %5, i32 8)
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.sockaddr_in = type { %struct.TYPE_2__, i32 }
%struct.TYPE_2__ = type { i32 }
@AF_INET = global i32 0
define void @set_s_addr(%struct.sockaddr* %0, i32 %1) {
%3 = alloca %struct.sockaddr_in
%4 = bitcast %struct.sockaddr_in* %3 to i8*
%5 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %3, i64 0, i32 1
%7 = load i32, i32* @AF_INET
store i32 %7, i32* %6
%8 = call i32 @memcpy(%struct.sockaddr* %0, %struct.sockaddr_in* %3, i32 8)
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
void pwdb(char **args) { printf("%s\n", getenv("PWD")); }


x86 assembly (clang, -O0):
<pwdb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwdb>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"PWD\00"
define void @pwdb(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i8* @getenv(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"PWD\00"
define void @pwdb(i8** nocapture readnone %0) {
%2 = tail call i8* @getenv(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
int next_index(void) {
  static int index = 0;
  return index++;
}


x86 assembly (clang, -O0):
<next_index>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_index>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
ret

LLVM IR (-O0):
@next_index.index = internal global i32 0
define i32 @next_index() {
%1 = load i32, i32* @next_index.index
%2 = add nsw i32 %1, 1
store i32 %2, i32* @next_index.index
ret i32 %1
}

LLVM IR (-O2):
@next_index.index = internal unnamed_addr global i32 0
define i32 @next_index() {
%1 = load i32, i32* @next_index.index
%2 = add nsw i32 %1, 1
store i32 %2, i32* @next_index.index
ret i32 %1
}
/* Variables and functions */
char *memmove(char *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
char *strmove(char *dest, const char *src) {
  return memmove(dest, src, strlen(src) + 1);
}


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

x86 assembly (clang, -O2):
<strmove>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define i8* @strmove(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @memmove(i8* %5, i8* %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strmove(i8* returned writeonly %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
tail call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %4, i1 false)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ MemCheck_off();
int /*<<< orphan*/ MemCheck_on();
scalar_t__ is_MemCheck_on();
int /*<<< orphan*/ *pop_info();
int CRYPTO_dbg_remove_all_info(void) {
  int ret = 0;
  if (is_MemCheck_on()) {
    MemCheck_off();
    while (pop_info() != NULL)
      ret++;
    MemCheck_on();
  }
  return (ret);
}


x86 assembly (clang, -O0):
<CRYPTO_dbg_remove_all_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <is_MemCheck_on@plt>
cmp    $0x0,%rax
je     118d <CRYPTO_dbg_remove_all_info+0x4d>
mov    $0x0,%al
call   1050 <MemCheck_off@plt>
mov    $0x0,%al
call   1030 <pop_info@plt>
cmp    $0x0,%rax
je     1186 <CRYPTO_dbg_remove_all_info+0x46>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <CRYPTO_dbg_remove_all_info+0x27>
mov    $0x0,%al
call   1060 <MemCheck_on@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_dbg_remove_all_info>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <is_MemCheck_on@plt>
test   %rax,%rax
je     1176 <CRYPTO_dbg_remove_all_info+0x36>
xor    %eax,%eax
call   1050 <MemCheck_off@plt>
mov    $0xffffffff,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pop_info@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1160 <CRYPTO_dbg_remove_all_info+0x20>
xor    %eax,%eax
call   1060 <MemCheck_on@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CRYPTO_dbg_remove_all_info() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @is_MemCheck_on()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %0
%5 = call i32 (...) @MemCheck_off()
br label %6
6: ; preds = %9, %4
%7 = call i32* (...) @pop_info()
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %6
12: ; preds = %6
%13 = call i32 (...) @MemCheck_on()
br label %14
14: ; preds = %12, %0
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @CRYPTO_dbg_remove_all_info() {
%1 = tail call i64 (...) @is_MemCheck_on()
%2 = icmp eq i64 %1, 0
br i1 %2, label %12, label %3
3: ; preds = %0
%4 = tail call i32 (...) @MemCheck_off()
br label %5
5: ; preds = %5, %3
%6 = phi i32 [ 0, %3 ], [ %9, %5 ]
%7 = tail call i32* (...) @pop_info()
%8 = icmp eq i32* %7, null
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %5
10: ; preds = %5
%11 = tail call i32 (...) @MemCheck_on()
br label %12
12: ; preds = %10, %0
%13 = phi i32 [ %6, %10 ], [ 0, %0 ]
ret i32 %13
}
void ubi_dbg_dump_flash(struct ubi_device *ubi, int pnum, int offset, int len) {
  return;
}


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

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

LLVM IR (-O0):
%struct.ubi_device = type opaque
define void @ubi_dbg_dump_flash(%struct.ubi_device* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.ubi_device*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.ubi_device* %0, %struct.ubi_device** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
%struct.ubi_device = type opaque
define void @ubi_dbg_dump_flash(%struct.ubi_device* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
unsigned long time_elapsed(struct timeval *last, struct timeval *current) {
  unsigned long secs, diff;
  secs = (unsigned long)current->tv_sec - (unsigned long)last->tv_sec;
  diff = 1000000 * secs + (unsigned long)current->tv_usec -
         (unsigned long)last->tv_usec;
  return (diff);
}


x86 assembly (clang, -O0):
<time_elapsed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
sub    0x8(%rcx),%rax
mov    %rax,-0x18(%rbp)
imul   $0xf4240,-0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
add    (%rcx),%rax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_elapsed>:
mov    0x8(%rsi),%rax
sub    0x8(%rdi),%rax
imul   $0xf4240,%rax,%rax
add    (%rsi),%rax
sub    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @time_elapsed(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
%5 = alloca i64
%6 = alloca i64
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%7 = load %struct.timeval*, %struct.timeval** %4
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = load %struct.timeval*, %struct.timeval** %3
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %10, i32 0, i32 1
%12 = load i64, i64* %11
%13 = sub i64 %9, %12
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = mul i64 1000000, %14
%16 = load %struct.timeval*, %struct.timeval** %4
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 0
%18 = load i64, i64* %17
%19 = add i64 %15, %18
%20 = load %struct.timeval*, %struct.timeval** %3
%21 = getelementptr inbounds %struct.timeval, %struct.timeval* %20, i32 0, i32 0
%22 = load i64, i64* %21
%23 = sub i64 %19, %22
store i64 %23, i64* %6
%24 = load i64, i64* %6
ret i64 %24
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @time_elapsed(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%6 = load i64, i64* %5
%7 = sub i64 %4, %6
%8 = mul i64 %7, 1000000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = add i64 %8, %10
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%13 = load i64, i64* %12
%14 = sub i64 %11, %13
ret i64 %14
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned long *, void const *, int);
unsigned long osrp4(const void *p) {
  uint32_t tmp;
  memcpy(&tmp, p, 4);
  return tmp;
}


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

x86 assembly (clang, -O2):
<osrp4>:
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @osrp4(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i64* %3, i8* %4, i32 4)
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @osrp4(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @memcpy(i64* %2, i8* %0, i32 4)
%5 = load i64, i64* %2
ret i64 %5
}
void ps3_console_write(const char *buf, int len) {}


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

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

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

LLVM IR (-O2):
define void @ps3_console_write(i8* nocapture %0, i32 %1) {
ret void
}
void XSharpFreeResources(char *value) {}


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

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

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

LLVM IR (-O2):
define void @XSharpFreeResources(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main() { exit(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int abs(int);
double erfc(int);
int sqrt(int);
double Frequency(int total, unsigned short size) {
  return erfc(abs(total) / sqrt(1024 * size) / sqrt(2));
}


x86 assembly (clang, -O0):
<Frequency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x10(%rbp)
movzwl -0x6(%rbp),%edi
shl    $0xa,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <erfc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Frequency>:
push   %rbx
mov    %edi,%ebx
neg    %ebx
cmovs  %edi,%ebx
shl    $0xa,%esi
mov    %esi,%edi
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%ebx
mov    $0x2,%edi
call   1030 <sqrt@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%edi
pop    %rbx
jmp    1040 <erfc@plt>

LLVM IR (-O0):
define double @Frequency(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i32, i32* %3
%6 = call i32 @abs(i32 %5)
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = mul nsw i32 1024, %8
%10 = call i32 @sqrt(i32 %9)
%11 = sdiv i32 %6, %10
%12 = call i32 @sqrt(i32 2)
%13 = sdiv i32 %11, %12
%14 = call double @erfc(i32 %13)
ret double %14
}

LLVM IR (-O2):
define double @Frequency(i32 %0, i16 zeroext %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = zext i16 %1 to i32
%5 = shl nuw nsw i32 %4, 10
%6 = tail call i32 @sqrt(i32 %5)
%7 = sdiv i32 %3, %6
%8 = tail call i32 @sqrt(i32 2)
%9 = sdiv i32 %7, %8
%10 = tail call double @erfc(i32 %9)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
void print_steps(double distance, double result) {
  printf("%.6f   %.6f\n", distance, result);
}


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"%.6f %.6f\0A\00"
define void @print_steps(double %0, double %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double %0, double %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int *, int);
void f(int x, int *y) {
  int z;
  if (x > 0) {
    f(x - 1, &z);
    *y = x * z;
  } else
    *y = 1;
  if (*y > 2)
    g(y, x);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    115a <f+0x3a>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
lea    -0x14(%rbp),%rsi
call   1030 <f@plt>
mov    -0x4(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1164 <f+0x44>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
jle    117d <f+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <g@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
test   %edi,%edi
jle    1155 <f+0x35>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
lea    0x4(%rsp),%rsi
call   1030 <f@plt>
mov    0x4(%rsp),%eax
imul   %ebx,%eax
mov    %eax,(%r14)
cmp    $0x3,%eax
jl     115c <f+0x3c>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <g@plt>
jmp    115c <f+0x3c>
movl   $0x1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @f(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = load i32*, i32** %4
store i32 %13, i32* %14
br label %17
15: ; preds = %2
%16 = load i32*, i32** %4
store i32 1, i32* %16
br label %17
17: ; preds = %15, %8
%18 = load i32*, i32** %4
%19 = load i32, i32* %18
%20 = icmp sgt i32 %19, 2
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i32*, i32** %4
%23 = load i32, i32* %3
%24 = call i32 @g(i32* %22, i32 %23)
br label %25
25: ; preds = %21, %17
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp sgt i32 %0, 0
br i1 %5, label %7, label %6
6: ; preds = %2
store i32 1, i32* %1
br label %14
7: ; preds = %2
%8 = add nsw i32 %0, -1
%9 = load i32, i32* %3
%10 = mul nsw i32 %9, %0
store i32 %10, i32* %1
%11 = icmp sgt i32 %10, 2
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @g(i32* %1, i32 %0)
br label %14
14: ; preds = %6, %12, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_op_reg(int, int, int, int);
void emit_mul_rx(int base, int reg) { emit_op_reg(0x0F, 0xAF, reg, base); }


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

x86 assembly (clang, -O2):
<emit_mul_rx>:
mov    %esi,%edx
mov    %edi,%ecx
mov    $0xf,%edi
mov    $0xaf,%esi
jmp    1030 <emit_op_reg@plt>

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

LLVM IR (-O2):
define void @emit_mul_rx(i32 %0, i32 %1) {
%3 = tail call i32 @emit_op_reg(i32 15, i32 175, i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_ingredients(char);
int /*<<< orphan*/ init();
scalar_t__ my_strcmp(char *, char *);
char *readLine();
void get_type() {
  char *get;
  get = readLine();
  if (my_strcmp(get, "1") == 0 || my_strcmp(get, "2") == 0)
    get_ingredients(get[0]);
  else
    init();
}


x86 assembly (clang, -O0):
<get_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <readLine@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1030 <my_strcmp@plt>
cmp    $0x0,%rax
je     1187 <get_type+0x47>
mov    -0x8(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <my_strcmp@plt>
cmp    $0x0,%rax
jne    1198 <get_type+0x58>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1060 <get_ingredients@plt>
jmp    119f <get_type+0x5f>
mov    $0x0,%al
call   1050 <init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_type>:
push   %rbx
xor    %eax,%eax
call   1040 <readLine@plt>
mov    %rax,%rbx
lea    0xeae(%rip),%rsi
mov    %rax,%rdi
call   1030 <my_strcmp@plt>
test   %rax,%rax
je     117b <get_type+0x3b>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <my_strcmp@plt>
test   %rax,%rax
je     117b <get_type+0x3b>
xor    %eax,%eax
pop    %rbx
jmp    1050 <init@plt>
movsbl (%rbx),%edi
pop    %rbx
jmp    1060 <get_ingredients@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"2\00"
define void @get_type() {
%1 = tail call i8* (...) @readLine()
%2 = tail call i64 @my_strcmp(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i64 @my_strcmp(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4, %0
%8 = load i8, i8* %1
%9 = tail call i32 @get_ingredients(i8 signext %8)
br label %12
10: ; preds = %4
%11 = tail call i32 (...) @init()
br label %12
12: ; preds = %10, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _test_getaddrinfo();
int /*<<< orphan*/ _test_gethostbyaddr();
int /*<<< orphan*/ _test_gethostbyname();
int /*<<< orphan*/ _test_strRev();
int trueMain(int argc, char *argv[]) {
  _test_gethostbyname();
  _test_gethostbyaddr();
  _test_getaddrinfo();
  _test_strRev();
  return 0;
}


x86 assembly (clang, -O0):
<trueMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <_test_gethostbyname@plt>
mov    $0x0,%al
call   1060 <_test_gethostbyaddr@plt>
mov    $0x0,%al
call   1030 <_test_getaddrinfo@plt>
mov    $0x0,%al
call   1040 <_test_strRev@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trueMain>:
push   %rax
xor    %eax,%eax
call   1050 <_test_gethostbyname@plt>
xor    %eax,%eax
call   1060 <_test_gethostbyaddr@plt>
xor    %eax,%eax
call   1030 <_test_getaddrinfo@plt>
xor    %eax,%eax
call   1040 <_test_strRev@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @trueMain(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @_test_gethostbyname()
%6 = call i32 (...) @_test_gethostbyaddr()
%7 = call i32 (...) @_test_getaddrinfo()
%8 = call i32 (...) @_test_strRev()
ret i32 0
}

LLVM IR (-O2):
define i32 @trueMain(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @_test_gethostbyname()
%4 = tail call i32 (...) @_test_gethostbyaddr()
%5 = tail call i32 (...) @_test_getaddrinfo()
%6 = tail call i32 (...) @_test_strRev()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void ctrC(int sig) { printf("Je ne veux pas m'arreter\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Je ne veux pas m'arreter\0A\00"
define void @ctrC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Je ne veux pas m'arreter\00"
define void @ctrC(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("EOF = %d\n", EOF);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"EOF = %d\0A\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EOF
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
_Atomic int func2(int i) { return i; }


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

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

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

LLVM IR (-O2):
define i32 @func2(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int creat(char const *, int /*<<< orphan*/);
int txc_libc_creat(const char *pathname, mode_t mode) {
  return creat(pathname, mode);
}


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

x86 assembly (clang, -O2):
<txc_libc_creat>:
jmp    1030 <creat@plt>

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

LLVM IR (-O2):
define i32 @txc_libc_creat(i8* %0, i32 %1) {
%3 = tail call i32 @creat(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage(void) {
  puts("plot only takes 1 argument specifying the source file to interpret");
}


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

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

LLVM IR (-O0):
@.str = [67 x i8] c"plot only takes 1 argument specifying the source file to interpret\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"plot only takes 1 argument specifying the source file to interpret\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char);
int main() {
  printf("c%\n", (char)65);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x41,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"c%\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ StopSoundExt(int, int);
void FadeSound(int nr) { StopSoundExt(nr, ((1 << 2))); }


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

x86 assembly (clang, -O2):
<FadeSound>:
mov    $0x4,%esi
jmp    1030 <StopSoundExt@plt>

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

LLVM IR (-O2):
define void @FadeSound(i32 %0) {
%2 = tail call i32 @StopSoundExt(i32 %0, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_hl(int);
void opcb_de() { set_hl(3); }


x86 assembly (clang, -O0):
<opcb_de>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <set_hl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<opcb_de>:
mov    $0x3,%edi
jmp    1030 <set_hl@plt>

LLVM IR (-O0):
define void @opcb_de() {
%1 = call i32 @set_hl(i32 3)
ret void
}

LLVM IR (-O2):
define void @opcb_de() {
%1 = tail call i32 @set_hl(i32 3)
ret void
}
int sqmIndex(int colsn, int row, int col) { return row * colsn + col; }


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

x86 assembly (clang, -O2):
<sqmIndex>:
imul   %esi,%edi
lea    (%rdi,%rdx,1),%eax
ret

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

LLVM IR (-O2):
define i32 @sqmIndex(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
char is_free(char p) { return (p & (1 << 7)) == (1 << 7); }


x86 assembly (clang, -O0):
<is_free>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x80,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_free>:
mov    %edi,%eax
shr    $0x7,%al
ret

LLVM IR (-O0):
define signext i8 @is_free(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 128
%6 = icmp eq i32 %5, 128
%7 = zext i1 %6 to i32
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @is_free(i8 signext %0) {
%2 = lshr i8 %0, 7
ret i8 %2
}
void UARTSmartCardDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000014))) &= ~0x00000020;
}


x86 assembly (clang, -O0):
<UARTSmartCardDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%rcx
and    $0xffffffffffffffdf,%rcx
mov    %rcx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSmartCardDisable>:
andq   $0xffffffffffffffdf,0x14(%rdi)
ret

LLVM IR (-O0):
define void @UARTSmartCardDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 20
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -33
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @UARTSmartCardDisable(i64 %0) {
%2 = add i64 %0, 20
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -33
store volatile i64 %5, i64* %3
ret void
}
void pci_restore_ptm_state(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_restore_ptm_state(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double fRand(double fMin, double fMax) {
  double f = ((double)rand()) / RAND_MAX;
  return fMin + f * (fMax - fMin);
}


x86 assembly (clang, -O0):
<fRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2eb3(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fRand>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
mov    0x2eb2(%rip),%rax
divsd  (%rax),%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @fRand(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
%8 = load double, double* @RAND_MAX
%9 = fdiv double %7, %8
store double %9, double* %5
%10 = load double, double* %3
%11 = load double, double* %5
%12 = load double, double* %4
%13 = load double, double* %3
%14 = fsub double %12, %13
%15 = call double @llvm.fmuladd.f64(double %11, double %14, double %10)
ret double %15
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @fRand(double %0, double %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = load double, double* @RAND_MAX
%6 = fdiv double %4, %5
%7 = fsub double %1, %0
%8 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %0)
ret double %8
}
int test_imm_ECuint16_reg(unsigned short val) {
  return ((val) & (0xEC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ECuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xec,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_ECuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 236
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct wpa_ctrl {
  int dummy;
};

/* Variables and functions */
int wpa_ctrl_attach_helper(struct wpa_ctrl *, int);
int wpa_ctrl_attach(struct wpa_ctrl *ctrl) {
  return wpa_ctrl_attach_helper(ctrl, 1);
}


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

x86 assembly (clang, -O2):
<wpa_ctrl_attach>:
mov    $0x1,%esi
jmp    1030 <wpa_ctrl_attach_helper@plt>

LLVM IR (-O0):
%struct.wpa_ctrl = type { i32 }
define i32 @wpa_ctrl_attach(%struct.wpa_ctrl* %0) {
%2 = alloca %struct.wpa_ctrl*
store %struct.wpa_ctrl* %0, %struct.wpa_ctrl** %2
%3 = load %struct.wpa_ctrl*, %struct.wpa_ctrl** %2
%4 = call i32 @wpa_ctrl_attach_helper(%struct.wpa_ctrl* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.wpa_ctrl = type { i32 }
define i32 @wpa_ctrl_attach(%struct.wpa_ctrl* %0) {
%2 = tail call i32 @wpa_ctrl_attach_helper(%struct.wpa_ctrl* %0, i32 1)
ret i32 %2
}
float degrees_to_radians(float degrees) {
  return degrees * (3.141592653589793238462643383279f / 180.0f);
}


x86 assembly (clang, -O0):
<degrees_to_radians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @degrees_to_radians(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F91DF46A0000000
ret float %4
}

LLVM IR (-O2):
define float @degrees_to_radians(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
__attribute__((no)) struct A *foo(struct A *x) {
  asm volatile("" : : "g"(x) : "memory");
  return x;
}


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

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

LLVM IR (-O0):
%struct.A = type opaque
define %struct.A* @foo(%struct.A* %0) {
%2 = alloca %struct.A*
store %struct.A* %0, %struct.A** %2
%3 = load %struct.A*, %struct.A** %2
%4 = load %struct.A*, %struct.A** %2
ret %struct.A* %4
}

LLVM IR (-O2):
%struct.A = type opaque
define %struct.A* @foo(%struct.A* returned %0) {
tail call void asm sideeffect "", "imr,~{memory},~{dirflag},~{fpsr},~{flags}"(%struct.A* %0)
ret %struct.A* %0
}
unsigned int clearBit(unsigned int ch, int i) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @clearBit(i32 %0, i32 %1) {
ret i32 0
}
int c_1(int tt, int *n, char *s) { return 0; }


x86 assembly (clang, -O0):
<c_1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ bits_have_fixed_bytes(struct struct_def const *);
scalar_t__ v_bytes(struct struct_def const *);
int need_pack_bits_counter(const struct struct_def *s) {
  return v_bytes(s) && !bits_have_fixed_bytes(s);
}


x86 assembly (clang, -O0):
<need_pack_bits_counter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <v_bytes@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115b <need_pack_bits_counter+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <bits_have_fixed_bytes@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<need_pack_bits_counter>:
push   %rbx
mov    %rdi,%rbx
call   1040 <v_bytes@plt>
test   %rax,%rax
je     1141 <need_pack_bits_counter+0x21>
mov    %rbx,%rdi
call   1030 <bits_have_fixed_bytes@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.struct_def = type { i32 }
define i32 @need_pack_bits_counter(%struct.struct_def* %0) {
%2 = alloca %struct.struct_def*
store %struct.struct_def* %0, %struct.struct_def** %2
%3 = load %struct.struct_def*, %struct.struct_def** %2
%4 = call i64 @v_bytes(%struct.struct_def* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load %struct.struct_def*, %struct.struct_def** %2
%8 = call i32 @bits_have_fixed_bytes(%struct.struct_def* %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
%struct.struct_def = type { i32 }
define i32 @need_pack_bits_counter(%struct.struct_def* %0) {
%2 = tail call i64 @v_bytes(%struct.struct_def* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @bits_have_fixed_bytes(%struct.struct_def* %0)
%6 = icmp eq i32 %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*/ db(int);
void daa() { db(0x27); }


x86 assembly (clang, -O0):
<daa>:
push   %rbp
mov    %rsp,%rbp
mov    $0x27,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<daa>:
mov    $0x27,%edi
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @daa() {
%1 = call i32 @db(i32 39)
ret void
}

LLVM IR (-O2):
define void @daa() {
%1 = tail call i32 @db(i32 39)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Print_Version_Information() {
  printf("i7z DEBUG: i7z version: %s\n", "svn-r93-(27-MAY-2013)");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"i7z DEBUG: i7z version: %s\0A\00"
@.str.1 = [22 x i8] c"svn-r93-(27-MAY-2013)\00"
define void @Print_Version_Information() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"i7z DEBUG: i7z version: %s\0A\00"
@.str.1 = [22 x i8] c"svn-r93-(27-MAY-2013)\00"
define void @Print_Version_Information() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}
start() {}


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

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

LLVM IR (-O0):
define i32 @start() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @start() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x5e() {
  Assert_real((isalnum(94) == 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_isalnum.c",
              475, ("isalnum should be 0 for ^"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x5e>:
push   %rax
mov    $0x5e,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1db,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ^\00"
define void @t_isalnum_0x5e() {
%1 = call i64 @isalnum(i32 94)
%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 475, i8* getelementptr inbounds ([26 x i8], [26 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for ^\00"
define void @t_isalnum_0x5e() {
%1 = tail call i64 @isalnum(i32 94)
%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 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int pocsqlite_fun() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pocsqlite_fun() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void QEIPositionSet(uint32_t ui32Base, uint32_t ui32Position) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000008))) = ui32Position;
}


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

x86 assembly (clang, -O2):
<QEIPositionSet>:
mov    %rsi,0x8(%rdi)
ret

LLVM IR (-O0):
define void @QEIPositionSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 %6, 8
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @QEIPositionSet(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 8
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}