xunge/DecIR huggingface dataset:
/* Variables and functions */
double strtod(char const *, char **);
double atof(const char *nptr) { return strtod(nptr, (char **)NULL); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @strtod(i8* %3, i8** null)
ret double %4
}

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i8** null)
ret double %2
}
/* Variables and functions */
int strncasecmp(char const *, char const *, size_t);
__attribute__((__weak__, __always___)) int
softboundmpx_strncasecmp(const char *s1, const char *s2, size_t n) {
  return strncasecmp(s1, s2, n);
}


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

x86 assembly (clang, -O2):
<softboundmpx_strncasecmp>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_strncasecmp(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
int _min_(int a, int b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<_min_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <_min_+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <_min_+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_min_>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @_min_(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int apr_base64_encode_binary(char *, unsigned char const *, int);
int apr_base64_encode(char *encoded, const char *string, int len) {
  return apr_base64_encode_binary(encoded, (const unsigned char *)string, len);
}


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

x86 assembly (clang, -O2):
<apr_base64_encode>:
jmp    1030 <apr_base64_encode_binary@plt>

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

LLVM IR (-O2):
define i32 @apr_base64_encode(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @apr_base64_encode_binary(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
unsigned __attribute__((visibility("hidden"))) MOZ_Z_gz_intmax() {
  unsigned p, q;
  p = 1;
  do {
    q = p;
    p <<= 1;
    p++;
  } while (p > q);
  return q >> 1;
}


x86 assembly (clang, -O0):
<MOZ_Z_gz_intmax>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     110b <MOZ_Z_gz_intmax+0xb>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define hidden i32 @MOZ_Z_gz_intmax() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %1
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = shl i32 %5, 1
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = add i32 %7, 1
store i32 %8, i32* %1
br label %9
9: ; preds = %3
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = icmp ugt i32 %10, %11
br i1 %12, label %3, label %13
13: ; preds = %9
%14 = load i32, i32* %2
%15 = lshr i32 %14, 1
ret i32 %15
}

LLVM IR (-O2):
define hidden i32 @MOZ_Z_gz_intmax() {
ret i32 2147483647
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x60() {
  Assert_real((isupper(96) == 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_isupper.c",
              485, ("isupper should be 0 for `"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x60>:
push   %rax
mov    $0x60,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e5,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for `\00"
define void @t_isupper_0x60() {
%1 = call i64 @isupper(i32 96)
%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 485, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for `\00"
define void @t_isupper_0x60() {
%1 = tail call i64 @isupper(i32 96)
%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 485, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cmsghdr {
  int dummy;
};

/* Variables and functions */
unsigned char *CMSG_DATA(struct cmsghdr *);
unsigned char *cmsg_data(struct cmsghdr *cmsg) { return CMSG_DATA(cmsg); }


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

x86 assembly (clang, -O2):
<cmsg_data>:
jmp    1030 <CMSG_DATA@plt>

LLVM IR (-O0):
%struct.cmsghdr = type { i32 }
define i8* @cmsg_data(%struct.cmsghdr* %0) {
%2 = alloca %struct.cmsghdr*
store %struct.cmsghdr* %0, %struct.cmsghdr** %2
%3 = load %struct.cmsghdr*, %struct.cmsghdr** %2
%4 = call i8* @CMSG_DATA(%struct.cmsghdr* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.cmsghdr = type { i32 }
define i8* @cmsg_data(%struct.cmsghdr* %0) {
%2 = tail call i8* @CMSG_DATA(%struct.cmsghdr* %0)
ret i8* %2
}
falLoadQueryFont() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @falLoadQueryFont() {
ret i32 0
}
/* Variables and functions */
int syscall2(int, unsigned int);
int unlink(const char *path) { return syscall2(10, (unsigned int)path); }


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

x86 assembly (clang, -O2):
<unlink>:
mov    %rdi,%rsi
mov    $0xa,%edi
jmp    1030 <syscall2@plt>

LLVM IR (-O0):
define i32 @unlink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @syscall2(i32 10, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @unlink(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @syscall2(i32 10, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: make_index file\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: make_index file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: make_index file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_perf_global_ctrl_EN_FIXED_CTRnum(void) {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 10;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((7)) - ((0)) + 1)) - 1) << ((0)))) >>
       (0)) > 1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_perf_global_ctrl_EN_FIXED_CTRnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xa,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0xff,%eax
sar    $0x0,%eax
cmp    $0x1,%eax
jle    1157 <cpuid_perf_global_ctrl_EN_FIXED_CTRnum+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115e <cpuid_perf_global_ctrl_EN_FIXED_CTRnum+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_perf_global_ctrl_EN_FIXED_CTRnum>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0xa,%edi
call   1030 <cpuid@plt>
xor    %eax,%eax
testb  $0xfe,0x8(%rsp)
setne  %al
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_perf_global_ctrl_EN_FIXED_CTRnum() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 10, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = and i32 %10, 254
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ ircproto_privmsg(char *, char *);
int init() {
  ircproto_privmsg("#bots", "Hello, world!");
  return 0;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee4(%rip),%rsi
call   1030 <ircproto_privmsg@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"#bots\00"
@.str.1 = [14 x i8] c"Hello, world!\00"
define i32 @init() {
%1 = call i32 @ircproto_privmsg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"#bots\00"
@.str.1 = [14 x i8] c"Hello, world!\00"
define i32 @init() {
%1 = tail call i32 @ircproto_privmsg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage(void) { printf("sockdump [-l length] -p port\n"); }


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"sockdump [-l length] -p port\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [29 x i8] c"sockdump [-l length] -p port\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exitapp(int /*<<< orphan*/);
void handleinterupt(int signum) { exitapp(EXIT_SUCCESS); }


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

x86 assembly (clang, -O2):
<handleinterupt>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <exitapp@plt>

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @handleinterupt(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exitapp(i32 %2)
ret void
}
long HTTP_GetServerVersion(void) { return ((0 << 16) | (1 << 8) | (5)); }


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

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

LLVM IR (-O0):
define i64 @HTTP_GetServerVersion() {
ret i64 261
}

LLVM IR (-O2):
define i64 @HTTP_GetServerVersion() {
ret i64 261
}
void glwin_draw_image(void *voidhandle, signed int xsize, signed int ysize,
                      unsigned char *img) {
  return;
}


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

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

LLVM IR (-O0):
define void @glwin_draw_image(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
define void @glwin_draw_image(i8* nocapture %0, i32 %1, i32 %2, i8* nocapture %3) {
ret void
}
void PyDTrace_INSTANCE_DELETE_START(int arg0) {}


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

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

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

LLVM IR (-O2):
define void @PyDTrace_INSTANCE_DELETE_START(i32 %0) {
ret void
}
/* Type definitions */
typedef char const curl_slist;

/* Variables and functions */
int /*<<< orphan*/ check_expected(char const *);
scalar_t__ mock();
struct curl_slist *curl_slist_append(struct curl_slist *list,
                                     const char *string) {
  check_expected(list);
  check_expected(string);
  return (struct curl_slist *)mock();
}


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

x86 assembly (clang, -O2):
<curl_slist_append>:
push   %rbx
mov    %rsi,%rbx
call   1040 <check_expected@plt>
mov    %rbx,%rdi
call   1040 <check_expected@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <mock@plt>

LLVM IR (-O0):
%struct.curl_slist = type opaque
define %struct.curl_slist* @curl_slist_append(%struct.curl_slist* %0, i8* %1) {
%3 = alloca %struct.curl_slist*
%4 = alloca i8*
store %struct.curl_slist* %0, %struct.curl_slist** %3
store i8* %1, i8** %4
%5 = load %struct.curl_slist*, %struct.curl_slist** %3
%6 = bitcast %struct.curl_slist* %5 to i8*
%7 = call i32 @check_expected(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @check_expected(i8* %8)
%10 = call i64 (...) @mock()
%11 = inttoptr i64 %10 to %struct.curl_slist*
ret %struct.curl_slist* %11
}

LLVM IR (-O2):
%struct.curl_slist = type opaque
define %struct.curl_slist* @curl_slist_append(%struct.curl_slist* %0, i8* %1) {
%3 = bitcast %struct.curl_slist* %0 to i8*
%4 = tail call i32 @check_expected(i8* %3)
%5 = tail call i32 @check_expected(i8* %1)
%6 = tail call i64 (...) @mock()
%7 = inttoptr i64 %6 to %struct.curl_slist*
ret %struct.curl_slist* %7
}
int invert(int x, unsigned int p, unsigned int n) {
  int a;
  int i;
  a = x & ~(~(~0 << n) << (p - n + 1));
  i = (~((x >> (p - n + 1)) & ~(~0 << n)) & ~(~0 << n)) << (p - n + 1);
  x = a | i;
  return x;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
sar    %cl,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
xor    $0xffffffff,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    %eax,%edx
shl    %cl,%edx
not    %edx
and    %edi,%edx
sar    %cl,%edi
not    %edi
and    %edi,%eax
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %6
%11 = shl i32 -1, %10
%12 = xor i32 %11, -1
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub i32 %13, %14
%16 = add i32 %15, 1
%17 = shl i32 %12, %16
%18 = xor i32 %17, -1
%19 = and i32 %9, %18
store i32 %19, i32* %7
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = sub i32 %21, %22
%24 = add i32 %23, 1
%25 = ashr i32 %20, %24
%26 = load i32, i32* %6
%27 = shl i32 -1, %26
%28 = xor i32 %27, -1
%29 = and i32 %25, %28
%30 = xor i32 %29, -1
%31 = load i32, i32* %6
%32 = shl i32 -1, %31
%33 = xor i32 %32, -1
%34 = and i32 %30, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = sub i32 %35, %36
%38 = add i32 %37, 1
%39 = shl i32 %34, %38
store i32 %39, i32* %8
%40 = load i32, i32* %7
%41 = load i32, i32* %8
%42 = or i32 %40, %41
store i32 %42, i32* %4
%43 = load i32, i32* %4
ret i32 %43
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = sub i32 %1, %2
%7 = add i32 %6, 1
%8 = shl i32 %5, %7
%9 = xor i32 %8, -1
%10 = and i32 %9, %0
%11 = ashr i32 %0, %7
%12 = xor i32 %11, -1
%13 = and i32 %12, %5
%14 = shl i32 %13, %7
%15 = or i32 %14, %10
ret i32 %15
}
void EVP_CIPHER_flags(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_flags() {
ret void
}
/* Variables and functions */
short and_h(short *, short *);
short intr_wrap_513(short p1, short p2) { return and_h(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_513>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <and_h@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_513>:
push   %rax
mov    %di,0x6(%rsp)
mov    %si,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <and_h@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_513(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @and_h(i16* %3, i16* %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @intr_wrap_513(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @and_h(i16* %3, i16* %4)
ret i16 %5
}
/* Variables and functions */
int foo();
int firstuse(void) { return foo(); }


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

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

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

LLVM IR (-O2):
define i32 @firstuse() {
%1 = tail call i32 (...) @foo()
ret i32 %1
}
void av_ripemd_final() {}


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

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

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

LLVM IR (-O2):
define void @av_ripemd_final() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
void fct_safe_str_cpy(char *dst, char const *src, size_t num) {
  assert(dst != NULL);
  assert(src != NULL);
  assert(num > 0);
  strncpy(dst, src, num);
  dst[num - 1] = '\0';
}


x86 assembly (clang, -O0):
<fct_safe_str_cpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fct_safe_str_cpy>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %edi,%edi
test   %r12,%r12
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
mov    %r14,%rbx
add    $0xffffffffffffffff,%rbx
setb   %dil
call   1040 <assert@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r12,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fct_safe_str_cpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i64, i64* %6
%16 = icmp ugt i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %4
%20 = load i8*, i8** %5
%21 = load i64, i64* %6
%22 = call i32 @strncpy(i8* %19, i8* %20, i64 %21)
%23 = load i8*, i8** %4
%24 = load i64, i64* %6
%25 = sub i64 %24, 1
%26 = getelementptr inbounds i8, i8* %23, i64 %25
store i8 0, i8* %26
ret void
}

LLVM IR (-O2):
define void @fct_safe_str_cpy(i8* %0, i8* %1, i64 %2) {
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp ne i8* %1, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = icmp ne i64 %2, 0
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %2)
%14 = add i64 %2, -1
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hasard(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nombreEnnemiNiveau();
int /*<<< orphan*/ placerCleEnnemi(int /*<<< orphan*/);
void initialiserEmplacementCleEnnemi(void) {
  placerCleEnnemi(hasard(0, nombreEnnemiNiveau()));
}


x86 assembly (clang, -O0):
<initialiserEmplacementCleEnnemi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <nombreEnnemiNiveau@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1030 <hasard@plt>
mov    %eax,%edi
call   1050 <placerCleEnnemi@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiserEmplacementCleEnnemi>:
push   %rax
xor    %eax,%eax
call   1040 <nombreEnnemiNiveau@plt>
xor    %edi,%edi
mov    %eax,%esi
call   1030 <hasard@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <placerCleEnnemi@plt>

LLVM IR (-O0):
define void @initialiserEmplacementCleEnnemi() {
%1 = call i32 (...) @nombreEnnemiNiveau()
%2 = call i32 @hasard(i32 0, i32 %1)
%3 = call i32 @placerCleEnnemi(i32 %2)
ret void
}

LLVM IR (-O2):
define void @initialiserEmplacementCleEnnemi() {
%1 = tail call i32 (...) @nombreEnnemiNiveau()
%2 = tail call i32 @hasard(i32 0, i32 %1)
%3 = tail call i32 @placerCleEnnemi(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x1f() {
  Assert_real((isalnum(31) == 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",
              160, ("isalnum should be 0 for 0x1f"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x1f>:
push   %rax
mov    $0x1f,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xa0,%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 = [29 x i8] c"isalnum should be 0 for 0x1f\00"
define void @t_isalnum_0x1f() {
%1 = call i64 @isalnum(i32 31)
%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 160, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x1f\00"
define void @t_isalnum_0x1f() {
%1 = tail call i64 @isalnum(i32 31)
%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 160, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WSACleanup();
void server_cleanup_winsock(void) { WSACleanup(); }


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

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

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

LLVM IR (-O2):
define void @server_cleanup_winsock() {
%1 = tail call i32 (...) @WSACleanup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_indent();
int /*<<< orphan*/ out_str(char const *, char const *);
int /*<<< orphan*/ outc(char);
void indent_put2s(const char fmt[], const char arg[]) {
  do_indent();
  out_str(fmt, arg);
  outc('\n');
}


x86 assembly (clang, -O0):
<indent_put2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <do_indent@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <out_str@plt>
mov    $0xa,%edi
call   1050 <outc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent_put2s>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <do_indent@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <out_str@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <outc@plt>

LLVM IR (-O0):
define void @indent_put2s(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @do_indent()
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @out_str(i8* %6, i8* %7)
%9 = call i32 @outc(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @indent_put2s(i8* %0, i8* %1) {
%3 = tail call i32 (...) @do_indent()
%4 = tail call i32 @out_str(i8* %0, i8* %1)
%5 = tail call i32 @outc(i8 signext 10)
ret void
}
/* Variables and functions */
float degree2radians(float *);
float degree2radians_no_pointer(float degree) {
  return degree2radians(&degree);
}


x86 assembly (clang, -O0):
<degree2radians_no_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <degree2radians@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<degree2radians_no_pointer>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <degree2radians@plt>
pop    %rax
ret

LLVM IR (-O0):
define float @degree2radians_no_pointer(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float @degree2radians(float* %2)
ret float %3
}

LLVM IR (-O2):
define float @degree2radians_no_pointer(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float @degree2radians(float* %2)
ret float %3
}
void criterion_inittime(void) {}


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

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

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

LLVM IR (-O2):
define void @criterion_inittime() {
ret void
}
/* Variables and functions */
void *__attribute__((fastcall)) _zmalloc(size_t n) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @_zmalloc(i64 %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ ZowiTone(int, double, int, int);
void S_disconnection() {
  ZowiTone(10, 659.26, 50, 30);
  ZowiTone(10, 1760, 50, 30);
  ZowiTone(10, 1318.51, 50, 30);
}


x86 assembly (clang, -O0):
<S_disconnection>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
movsd  0xeef(%rip),%xmm0
mov    $0x32,%esi
mov    $0x1e,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xecb(%rip),%xmm0
mov    $0x32,%esi
mov    $0x1e,%edx
call   1030 <ZowiTone@plt>
mov    $0xa,%edi
movsd  0xea7(%rip),%xmm0
mov    $0x32,%esi
mov    $0x1e,%edx
call   1030 <ZowiTone@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_disconnection>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x1e,%edx
call   1030 <ZowiTone@plt>
movsd  0xed3(%rip),%xmm0
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x1e,%edx
call   1030 <ZowiTone@plt>
movsd  0xebf(%rip),%xmm0
mov    $0xa,%edi
mov    $0x32,%esi
mov    $0x1e,%edx
pop    %rax
jmp    1030 <ZowiTone@plt>

LLVM IR (-O0):
define void @S_disconnection() {
%1 = call i32 @ZowiTone(i32 10, double 6.592600e+02, i32 50, i32 30)
%2 = call i32 @ZowiTone(i32 10, double 1.760000e+03, i32 50, i32 30)
%3 = call i32 @ZowiTone(i32 10, double 1.318510e+03, i32 50, i32 30)
ret void
}

LLVM IR (-O2):
define void @S_disconnection() {
%1 = tail call i32 @ZowiTone(i32 10, double 6.592600e+02, i32 50, i32 30)
%2 = tail call i32 @ZowiTone(i32 10, double 1.760000e+03, i32 50, i32 30)
%3 = tail call i32 @ZowiTone(i32 10, double 1.318510e+03, i32 50, i32 30)
ret void
}
unsigned short crc_update(unsigned short crc, unsigned char data) {
  data ^= (crc & 0xff);
  data ^= data << 4;
  return ((((unsigned short)data << 8) | ((crc >> 8) & 0xff)) ^
          (unsigned char)(data >> 4) ^ ((unsigned short)data << 3));
}


x86 assembly (clang, -O0):
<crc_update>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%ecx
and    $0xff,%ecx
movzbl -0x3(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%ecx
shl    $0x4,%ecx
movzbl -0x3(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
movzwl %ax,%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
movzbl -0x3(%rbp),%ecx
sar    $0x4,%ecx
movzbl %cl,%ecx
xor    %ecx,%eax
movzbl -0x3(%rbp),%ecx
movzwl %cx,%ecx
shl    $0x3,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc_update>:
xor    %edi,%esi
mov    %esi,%eax
shl    $0x4,%al
xor    %sil,%al
movzbl %al,%eax
mov    %eax,%ecx
shl    $0x8,%ecx
shr    $0x8,%edi
or     %edi,%ecx
mov    %eax,%edx
shr    $0x4,%dl
movzbl %dl,%edx
shl    $0x3,%eax
xor    %edx,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @crc_update(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = and i32 %6, 255
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = xor i32 %9, %7
%11 = trunc i32 %10 to i8
store i8 %11, i8* %4
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 4
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = xor i32 %16, %14
%18 = trunc i32 %17 to i8
store i8 %18, i8* %4
%19 = load i8, i8* %4
%20 = zext i8 %19 to i16
%21 = zext i16 %20 to i32
%22 = shl i32 %21, 8
%23 = load i16, i16* %3
%24 = zext i16 %23 to i32
%25 = ashr i32 %24, 8
%26 = and i32 %25, 255
%27 = or i32 %22, %26
%28 = load i8, i8* %4
%29 = zext i8 %28 to i32
%30 = ashr i32 %29, 4
%31 = trunc i32 %30 to i8
%32 = zext i8 %31 to i32
%33 = xor i32 %27, %32
%34 = load i8, i8* %4
%35 = zext i8 %34 to i16
%36 = zext i16 %35 to i32
%37 = shl i32 %36, 3
%38 = xor i32 %33, %37
%39 = trunc i32 %38 to i16
ret i16 %39
}

LLVM IR (-O2):
define zeroext i16 @crc_update(i16 zeroext %0, i8 zeroext %1) {
%3 = trunc i16 %0 to i8
%4 = xor i8 %3, %1
%5 = shl i8 %4, 4
%6 = xor i8 %5, %4
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = lshr i16 %0, 8
%10 = zext i16 %9 to i32
%11 = or i32 %8, %10
%12 = lshr i8 %6, 4
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %7, 3
%15 = xor i32 %14, %13
%16 = xor i32 %15, %11
%17 = trunc i32 %16 to i16
ret i16 %17
}
/* Type definitions */
struct rtavl_table {
  int dummy;
};

/* Variables and functions */
void **rtavl_probe(struct rtavl_table *, void *);
void *rtavl_insert(struct rtavl_table *table, void *item) {
  void **p = rtavl_probe(table, item);
  return p == NULL || *p == item ? NULL : *p;
}


x86 assembly (clang, -O0):
<rtavl_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <rtavl_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <rtavl_insert+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    1158 <rtavl_insert+0x48>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1163 <rtavl_insert+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtavl_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <rtavl_probe@plt>
test   %rax,%rax
je     112c <rtavl_insert+0x1c>
mov    (%rax),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.rtavl_table = type { i32 }
define i8* @rtavl_insert(%struct.rtavl_table* %0, i8* %1) {
%3 = alloca %struct.rtavl_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.rtavl_table* %0, %struct.rtavl_table** %3
store i8* %1, i8** %4
%6 = load %struct.rtavl_table*, %struct.rtavl_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @rtavl_probe(%struct.rtavl_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp eq i8** %9, null
br i1 %10, label %16, label %11
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11, %2
br label %20
17: ; preds = %11
%18 = load i8**, i8*** %5
%19 = load i8*, i8** %18
br label %20
20: ; preds = %17, %16
%21 = phi i8* [ null, %16 ], [ %19, %17 ]
ret i8* %21
}

LLVM IR (-O2):
%struct.rtavl_table = type { i32 }
define i8* @rtavl_insert(%struct.rtavl_table* %0, i8* %1) {
%3 = tail call i8** @rtavl_probe(%struct.rtavl_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = select i1 %7, i8* null, i8* %6
br label %9
9: ; preds = %5, %2
%10 = phi i8* [ null, %2 ], [ %8, %5 ]
ret i8* %10
}
/* Variables and functions */
int sum_128(unsigned int *, unsigned int *);
int sum_int(unsigned int x, unsigned int *y) {
  unsigned int z[4] = {0, 0, 0, 0};
  z[3] = x;
  return sum_128(z, y);
}


x86 assembly (clang, -O0):
<sum_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <sum_128@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_int>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %edi,0xc(%rsp)
mov    %rsp,%rdi
call   1030 <sum_128@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @sum_int(i32 %0, i32* %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
store i32 %0, i32* %5
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%7 = call i32 @sum_128(i32* %6, i32* %1)
ret i32 %7
}
streq(s, t) char *s, *t;
{
  int c;
  while ((c = *s++) == *t++)
    if (c == 0)
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<streq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1156 <streq+0x56>
cmpl   $0x0,-0x1c(%rbp)
jne    1151 <streq+0x51>
movl   $0x1,-0x4(%rbp)
jmp    115d <streq+0x5d>
jmp    110c <streq+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<streq>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1126 <streq+0x26>
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <streq+0x10>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @streq(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %7
7: ; preds = %21, %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %5
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %11, %15
br i1 %16, label %17, label %22
17: ; preds = %7
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 1, i32* %3
br label %23
21: ; preds = %17
br label %7
22: ; preds = %7
store i32 0, i32* %3
br label %23
23: ; preds = %22, %20
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @streq(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %13, label %3
13: ; preds = %3, %9
%14 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ get_cuisine();
int /*<<< orphan*/ my_putstr(char *);
int /*<<< orphan*/ read_user();
void cuisiner() {
  my_putstr("\t\t|============================|\n\t\t|");
  my_putstr("    INTERFACE DE CUISINE    ");
  my_putstr("|\n\t\t|============================|\n\n\n");
  my_putstr("\tRecettes :\n\n");
  get_cuisine();
  read_user();
}


x86 assembly (clang, -O0):
<cuisiner>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xede(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xeef(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xf09(%rip),%rdi
call   1040 <my_putstr@plt>
mov    $0x0,%al
call   1050 <get_cuisine@plt>
mov    $0x0,%al
call   1030 <read_user@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cuisiner>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xee1(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xef2(%rip),%rdi
call   1040 <my_putstr@plt>
lea    0xf0c(%rip),%rdi
call   1040 <my_putstr@plt>
xor    %eax,%eax
call   1050 <get_cuisine@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <read_user@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\09\09|============================|\0A\09\09|\00"
@.str.1 = [29 x i8] c" INTERFACE DE CUISINE \00"
@.str.2 = [38 x i8] c"|\0A\09\09|============================|\0A\0A\0A\00"
@.str.3 = [14 x i8] c"\09Recettes :\0A\0A\00"
define void @cuisiner() {
%1 = call i32 @my_putstr(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @my_putstr(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @my_putstr(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @my_putstr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 (...) @get_cuisine()
%6 = call i32 (...) @read_user()
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"\09\09|============================|\0A\09\09|\00"
@.str.1 = [29 x i8] c" INTERFACE DE CUISINE \00"
@.str.2 = [38 x i8] c"|\0A\09\09|============================|\0A\0A\0A\00"
@.str.3 = [14 x i8] c"\09Recettes :\0A\0A\00"
define void @cuisiner() {
%1 = tail call i32 @my_putstr(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @my_putstr(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @my_putstr(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @my_putstr(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (...) @get_cuisine()
%6 = tail call i32 (...) @read_user()
ret void
}
int tolower(int c) {
  if (c >= 'A' && c <= 'Z')
    return c - 'A' + 'a';
  else
    return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112c <tolower+0x2c>
cmpl   $0x5a,-0x8(%rbp)
jg     112c <tolower+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <tolower+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}