xunge/DecIR huggingface dataset:
/* Type definitions */
struct ctrl_command {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ send_error(char *);
void cmd_set_crypt_in_cipher(struct ctrl_command *cmd) {
  send_error("can't set decryption cipher - no OpenSSL support!");
}


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

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

LLVM IR (-O0):
%struct.ctrl_command = type { i32 }
@.str = [50 x i8] c"can't set decryption cipher - no OpenSSL support!\00"
define void @cmd_set_crypt_in_cipher(%struct.ctrl_command* %0) {
%2 = alloca %struct.ctrl_command*
store %struct.ctrl_command* %0, %struct.ctrl_command** %2
%3 = call i32 @send_error(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ctrl_command = type { i32 }
@.str = [50 x i8] c"can't set decryption cipher - no OpenSSL support!\00"
define void @cmd_set_crypt_in_cipher(%struct.ctrl_command* nocapture readnone %0) {
%2 = tail call i32 @send_error(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_i4();
int /*<<< orphan*/ take_struct_i4(int /*<<< orphan*/);
void test_struct_i4() { take_struct_i4(return_struct_i4()); }


x86 assembly (clang, -O0):
<test_struct_i4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <return_struct_i4@plt>
mov    %eax,%edi
call   1040 <take_struct_i4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_struct_i4>:
push   %rax
xor    %eax,%eax
call   1030 <return_struct_i4@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <take_struct_i4@plt>

LLVM IR (-O0):
define void @test_struct_i4() {
%1 = call i32 (...) @return_struct_i4()
%2 = call i32 @take_struct_i4(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_i4() {
%1 = tail call i32 (...) @return_struct_i4()
%2 = tail call i32 @take_struct_i4(i32 %1)
ret void
}
void TEST_RunEnter() {
  printf("<<%s>> \r\n", __FUNCTION__);
  return;
}


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

x86 assembly (clang, -O2):
<TEST_RunEnter>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"<<%s>> \0D\0A\00"
@__FUNCTION__.TEST_RunEnter = [14 x i8] c"TEST_RunEnter\00"
define void @TEST_RunEnter() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.TEST_RunEnter, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"<<%s>> \0D\0A\00"
@__FUNCTION__.TEST_RunEnter = [14 x i8] c"TEST_RunEnter\00"
define void @TEST_RunEnter() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.TEST_RunEnter, i64 0, i64 0))
ret void
}
void connection() {}


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

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

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

LLVM IR (-O2):
define void @connection() {
ret void
}
int kallsyms_lookup_size_offset(unsigned long addr, unsigned long *symbolsize,
                                unsigned long *offset) {
  return 0;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __syscall(int);
uid_t geteuid(void) { return __syscall(49); }


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

x86 assembly (clang, -O2):
<geteuid>:
mov    $0x31,%edi
jmp    1030 <__syscall@plt>

LLVM IR (-O0):
define i32 @geteuid() {
%1 = call i32 @__syscall(i32 49)
ret i32 %1
}

LLVM IR (-O2):
define i32 @geteuid() {
%1 = tail call i32 @__syscall(i32 49)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
long openFile(char *filename) {
  FILE *fd = NULL;
  fd = fopen(filename, "r+b");
  if (fd == NULL) {
    fprintf(stderr, "Error during opening of %s\n", filename);
    exit(-2);
  }
  return (long)fd;
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1186 <openFile+0x56>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <openFile+0x17>
pop    %rbx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"r+b\00"
@stderr = global i32 0
@.str.1 = [28 x i8] c"Error during opening of %s\0A\00"
define i64 @openFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
store i32* null, i32** %3
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 -2)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
%15 = ptrtoint i32* %14 to i64
ret i64 %15
}

LLVM IR (-O2):
@.str = [4 x i8] c"r+b\00"
@stderr = global i32 0
@.str.1 = [28 x i8] c"Error during opening of %s\0A\00"
define i64 @openFile(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 -2)
unreachable
8: ; preds = %1
%9 = ptrtoint i32* %2 to i64
ret i64 %9
}
/* Variables and functions */
char *strerror_r(int, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *sigar_strerror_get(int err, char *errbuf, int buflen) {
  char *buf = NULL;
  buf = strerror_r(err, errbuf, buflen);
  if (buf != NULL) {
    strncpy(errbuf, buf, buflen);
    errbuf[buflen - 1] = '\0';
  }
  return errbuf;
}


x86 assembly (clang, -O0):
<sigar_strerror_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <strerror_r@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1179 <sigar_strerror_get+0x59>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigar_strerror_get>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
call   1040 <strerror_r@plt>
test   %rax,%rax
je     1147 <sigar_strerror_get+0x27>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @sigar_strerror_get(i32 %0, i8* returned %1, i32 %2) {
%4 = tail call i8* @strerror_r(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32 @strncpy(i8* %1, i8* %4, i32 %2)
%8 = add nsw i32 %2, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %1, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %6, %3
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
const uint8_t *read_u16(const uint8_t *p, size_t *s, uint16_t *v) {
  *v = 0;
  *v |= *p++ << 8;
  *v |= *p++ << 0;
  *s -= 2;
  return (p);
}


x86 assembly (clang, -O0):
<read_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%ecx
shl    $0x8,%ecx
mov    -0x18(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%ecx
shl    $0x0,%ecx
mov    -0x18(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u16>:
movl   $0x0,(%rdx)
mov    (%rdi),%ecx
shl    $0x8,%ecx
mov    %ecx,(%rdx)
or     0x4(%rdi),%ecx
lea    0x8(%rdi),%rax
mov    %ecx,(%rdx)
addq   $0xfffffffffffffffe,(%rsi)
ret

LLVM IR (-O0):
define i32* @read_u16(i32* %0, i64* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i64*
%6 = alloca i32*
store i32* %0, i32** %4
store i64* %1, i64** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 0, i32* %7
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %4
%10 = load i32, i32* %8
%11 = shl i32 %10, 8
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = or i32 %13, %11
store i32 %14, i32* %12
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i32 1
store i32* %16, i32** %4
%17 = load i32, i32* %15
%18 = shl i32 %17, 0
%19 = load i32*, i32** %6
%20 = load i32, i32* %19
%21 = or i32 %20, %18
store i32 %21, i32* %19
%22 = load i64*, i64** %5
%23 = load i64, i64* %22
%24 = sub i64 %23, 2
store i64 %24, i64* %22
%25 = load i32*, i32** %4
ret i32* %25
}

LLVM IR (-O2):
define i32* @read_u16(i32* %0, i64* nocapture %1, i32* nocapture writeonly %2) {
store i32 0, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %0
%6 = shl i32 %5, 8
store i32 %6, i32* %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %4
%9 = or i32 %8, %6
store i32 %9, i32* %2
%10 = load i64, i64* %1
%11 = add i64 %10, -2
store i64 %11, i64* %1
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_196() {
  Assert_real((isqrt(196) == 14),
              "/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/stdlib/isqrt.c",
              985, ("Integer square root of 196 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_196>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc4,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x3d9,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_196>:
push   %rax
mov    $0xc4,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x3d9,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 196 should be 14\00"
define void @t_sqrt_196() {
%1 = call i32 @isqrt(i32 196)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 985, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 196 should be 14\00"
define void @t_sqrt_196() {
%1 = tail call i32 @isqrt(i32 196)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 985, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void XGetScreenSaver() {}


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

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

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

LLVM IR (-O2):
define void @XGetScreenSaver() {
ret void
}
/* Variables and functions */
char *getConfig(int /*<<< orphan*/);
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
char *getLogPath(char *log) {
  char *home = getConfig(0);
  char *buffer = malloc(sizeof(char) * 100);
  strcat(buffer, home);
  strcat(buffer, log);
  strcat(buffer, ".lumb");
  return buffer;
}


x86 assembly (clang, -O0):
<getLogPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <getConfig@plt>
mov    %rax,-0x10(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLogPath>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <getConfig@plt>
mov    %rax,%r15
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
lea    0xe94(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c".lumb\00"
define i8* @getLogPath(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call i8* @getConfig(i32 0)
store i8* %5, i8** %3
%6 = call i8* @malloc(i32 100)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @strcat(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcat(i8* %10, i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @strcat(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
@.str = [6 x i8] c".lumb\00"
define i8* @getLogPath(i8* %0) {
%2 = tail call i8* @getConfig(i32 0)
%3 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
%4 = tail call i32 @strcat(i8* %3, i8* %2)
%5 = tail call i32 @strcat(i8* %3, i8* %0)
%6 = tail call i32 @strcat(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ILI948x_drv_deinit_LCD();
void gfx_deinit_lcd(void) { ILI948x_drv_deinit_LCD(); }


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

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

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

LLVM IR (-O2):
define void @gfx_deinit_lcd() {
%1 = tail call i32 (...) @ILI948x_drv_deinit_LCD()
ret void
}
int gcd(unsigned int x, unsigned int y) {
  int results = 1;
  if (y == 0)
    return x;
  results = gcd(y, x % y);
  return results;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    113a <gcd+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1155 <gcd+0x45>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111e <gcd+0x1e>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = urem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
double calc_glop(double const x) { return x * 756; }


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

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

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

LLVM IR (-O2):
define double @calc_glop(double %0) {
%2 = fmul double %0, 7.560000e+02
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ mp2vseqdx_set_color(int /*<<< orphan*/ *);
void mp2vseqdx_set_transfer(uint8_t *p_mp2vseqdx, uint8_t i_transfer) {
  mp2vseqdx_set_color(p_mp2vseqdx);
  p_mp2vseqdx[6] = i_transfer;
}


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

x86 assembly (clang, -O2):
<mp2vseqdx_set_transfer>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <mp2vseqdx_set_color@plt>
mov    %ebp,0x18(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @mp2vseqdx_set_transfer(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 = call i32 @mp2vseqdx_set_color(i32* %5)
%7 = load i32, i32* %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 6
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @mp2vseqdx_set_transfer(i32* %0, i32 %1) {
%3 = tail call i32 @mp2vseqdx_set_color(i32* %0)
%4 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g(int);
int y(void) {
  f();
  g(0xa);
}


x86 assembly (clang, -O0):
<y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <f@plt>
mov    $0xa,%edi
call   1040 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <g@plt>

LLVM IR (-O0):
define i32 @y() {
%1 = alloca i32
%2 = call i32 (...) @f()
%3 = call i32 @g(i32 10)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @y() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 @g(i32 10)
ret i32 undef
}
void init_sub_mask_color_pt_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_sub_mask_color_pt_funcs_c() {
ret void
}
char *strcat(char *s, const char *append) {
  char *save = s;
  for (; *s; ++s)
    ;
  while ((*s++ = *append++))
    ;
  return save;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1137 <strcat+0x37>
jmp    1126 <strcat+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    113c <strcat+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     116b <strcat+0x6b>
jmp    113c <strcat+0x3c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
/* Variables and functions */
void *malloc(size_t);
void *myalloc1(size_t sz) { return malloc(sz); }


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

x86 assembly (clang, -O2):
<myalloc1>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @myalloc1(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ free5(void *****);
void free5float(float *****p) { free5((void *****)p); }


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

x86 assembly (clang, -O2):
<free5float>:
jmp    1030 <free5@plt>

LLVM IR (-O0):
define void @free5float(float***** %0) {
%2 = alloca float*****
store float***** %0, float****** %2
%3 = load float*****, float****** %2
%4 = bitcast float***** %3 to i8*****
%5 = call i32 @free5(i8***** %4)
ret void
}

LLVM IR (-O2):
define void @free5float(float***** %0) {
%2 = bitcast float***** %0 to i8*****
%3 = tail call i32 @free5(i8***** %2)
ret void
}
float todeg(float x) { return x * 180 / 3.14159; }


x86 assembly (clang, -O0):
<todeg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<todeg>:
mulss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @todeg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 1.800000e+02
%5 = fpext float %4 to double
%6 = fdiv double %5, 3.141590e+00
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @todeg(float %0) {
%2 = fmul float %0, 1.800000e+02
%3 = fpext float %2 to double
%4 = fdiv double %3, 3.141590e+00
%5 = fptrunc double %4 to float
ret float %5
}
/* Type definitions */
struct ebmb_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebmb_node *__ebmb_lookup_prefix(struct eb_root *, void const *,
                                       unsigned int);
struct ebmb_node *ebmb_lookup_prefix(struct eb_root *root, const void *x,
                                     unsigned int pfx) {
  return __ebmb_lookup_prefix(root, x, pfx);
}


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

x86 assembly (clang, -O2):
<ebmb_lookup_prefix>:
jmp    1030 <__ebmb_lookup_prefix@plt>

LLVM IR (-O0):
%struct.ebmb_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebmb_node* @ebmb_lookup_prefix(%struct.eb_root* %0, i8* %1, i32 %2) {
%4 = alloca %struct.eb_root*
%5 = alloca i8*
%6 = alloca i32
store %struct.eb_root* %0, %struct.eb_root** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.eb_root*, %struct.eb_root** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call %struct.ebmb_node* @__ebmb_lookup_prefix(%struct.eb_root* %7, i8* %8, i32 %9)
ret %struct.ebmb_node* %10
}

LLVM IR (-O2):
%struct.ebmb_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebmb_node* @ebmb_lookup_prefix(%struct.eb_root* %0, i8* %1, i32 %2) {
%4 = tail call %struct.ebmb_node* @__ebmb_lookup_prefix(%struct.eb_root* %0, i8* %1, i32 %2)
ret %struct.ebmb_node* %4
}
/* Variables and functions */
int /*<<< orphan*/ gdb1253();
int /*<<< orphan*/ gdb1338();
int /*<<< orphan*/ gdb1718();
int /*<<< orphan*/ jump_at_beginning();
int /*<<< orphan*/ stack_align();
int /*<<< orphan*/ standard();
int main(void) {
  standard();
  stack_align();
  gdb1253();
  gdb1718();
  gdb1338();
  jump_at_beginning();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <standard@plt>
mov    $0x0,%al
call   1080 <stack_align@plt>
mov    $0x0,%al
call   1060 <gdb1253@plt>
mov    $0x0,%al
call   1070 <gdb1718@plt>
mov    $0x0,%al
call   1030 <gdb1338@plt>
mov    $0x0,%al
call   1040 <jump_at_beginning@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <standard@plt>
xor    %eax,%eax
call   1080 <stack_align@plt>
xor    %eax,%eax
call   1060 <gdb1253@plt>
xor    %eax,%eax
call   1070 <gdb1718@plt>
xor    %eax,%eax
call   1030 <gdb1338@plt>
xor    %eax,%eax
call   1040 <jump_at_beginning@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @standard()
%3 = call i32 (...) @stack_align()
%4 = call i32 (...) @gdb1253()
%5 = call i32 (...) @gdb1718()
%6 = call i32 (...) @gdb1338()
%7 = call i32 (...) @jump_at_beginning()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @standard()
%2 = tail call i32 (...) @stack_align()
%3 = tail call i32 (...) @gdb1253()
%4 = tail call i32 (...) @gdb1718()
%5 = tail call i32 (...) @gdb1338()
%6 = tail call i32 (...) @jump_at_beginning()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage_error(char *program) {
  fprintf(stderr, "Usage: %s -f file.zip -l wordlist.txt\n", program);
  exit(1);
}


x86 assembly (clang, -O0):
<usage_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: %s -f file.zip -l wordlist.txt\0A\00"
define void @usage_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: %s -f file.zip -l wordlist.txt\0A\00"
define void @usage_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int ft_isvalid(char c, const char *to_avoid) {
  while (*to_avoid != '\0') {
    if (*to_avoid == c)
      return (0);
    ++to_avoid;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_isvalid>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114e <ft_isvalid+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    113d <ft_isvalid+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1155 <ft_isvalid+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <ft_isvalid+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isvalid>:
mov    (%rsi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1120 <ft_isvalid+0x20>
add    $0x1,%rsi
nop
cmp    %dil,%cl
je     1121 <ft_isvalid+0x21>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <ft_isvalid+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isvalid(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %12, %5 ], [ %1, %2 ]
%11 = icmp eq i8 %9, %0
%12 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 0, %8 ]
ret i32 %14
}
void NoPinC__0__GeneralIO__set(void) {}


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

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

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

LLVM IR (-O2):
define void @NoPinC__0__GeneralIO__set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void actual(void) { printf("in actual-so\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"in actual-so\0A\00"
define void @actual() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"in actual-so\00"
define void @actual() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double pow(double, int);
double linear_to_sRGB(double y) {
  if (y <= 0.0031308)
    return 12.92 * y;
  return 1.055 * pow(y, 1 / 2.4) - 0.055;
}


x86 assembly (clang, -O0):
<linear_to_sRGB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1147 <linear_to_sRGB+0x37>
movsd  0xee0(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1170 <linear_to_sRGB+0x60>
movsd  -0x10(%rbp),%xmm0
xor    %edi,%edi
call   1030 <pow@plt>
movsd  0xead(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_to_sRGB>:
push   %rax
movsd  0xee7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1138 <linear_to_sRGB+0x28>
xor    %edi,%edi
call   1030 <pow@plt>
mulsd  0xee2(%rip),%xmm0
addsd  0xee2(%rip),%xmm0
pop    %rax
ret
mulsd  0xec8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @linear_to_sRGB(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 3.130800e-03
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fmul double 1.292000e+01, %7
store double %8, double* %2
br label %13
9: ; preds = %1
%10 = load double, double* %3
%11 = call double @pow(double %10, i32 0)
%12 = call double @llvm.fmuladd.f64(double 1.055000e+00, double %11, double -5.500000e-02)
store double %12, double* %2
br label %13
13: ; preds = %9, %6
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @linear_to_sRGB(double %0) {
%2 = fcmp ugt double %0, 3.130800e-03
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fmul double %0, 1.292000e+01
br label %8
5: ; preds = %1
%6 = tail call double @pow(double %0, i32 0)
%7 = tail call double @llvm.fmuladd.f64(double %6, double 1.055000e+00, double -5.500000e-02)
br label %8
8: ; preds = %5, %3
%9 = phi double [ %4, %3 ], [ %7, %5 ]
ret double %9
}
const char *skipchar(const char *string, char tok) {
  while (*string != 0 && *string == tok)
    string++;
  return string;
}


x86 assembly (clang, -O0):
<skipchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     1136 <skipchar+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    1146 <skipchar+0x46>
jmp    1157 <skipchar+0x57>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <skipchar+0xe>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipchar>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <skipchar+0x21>
cmp    %sil,%cl
je     1110 <skipchar+0x10>
ret

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

LLVM IR (-O2):
define i8* @skipchar(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = and i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %3, label %10
10: ; preds = %3
ret i8* %4
}
void CAN1_SCE_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @CAN1_SCE_IRQHandler() {
ret void
}
int cheia(int fimLista) {
  if (fimLista + 1 == 50) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<cheia>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x32,%eax
jne    1122 <cheia+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <cheia+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cheia>:
xor    %eax,%eax
cmp    $0x31,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @cheia(i32 %0) {
%2 = icmp eq i32 %0, 49
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int DoVprintf(char const *, int);
int /*<<< orphan*/ Fail(char *, int, int);
int strlen(char const *);
void DoNumTest(const char *formatstr, int param, const char *checkstr) {
  int ret;
  ret = DoVprintf(formatstr, param);
  if (ret != strlen(checkstr)) {
    Fail("Expected vprintf to return %d, got %d.\n", strlen(checkstr), ret);
  }
}


x86 assembly (clang, -O0):
<DoNumTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <DoVprintf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
je     1188 <DoNumTest+0x58>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x1c(%rbp),%edx
lea    0xe7d(%rip),%rdi
call   1050 <Fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoNumTest>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1040 <DoVprintf@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebp
jne    1150 <DoNumTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <Fail@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoNumTest(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @DoVprintf(i8* %8, i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = icmp ne i32 %11, %13
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = call i32 @strlen(i8* %16)
%18 = load i32, i32* %7
%19 = call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
br label %20
20: ; preds = %15, %3
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Expected vprintf to return %d, got %d.\0A\00"
define void @DoNumTest(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @DoVprintf(i8* %0, i32 %1)
%5 = tail call i32 @strlen(i8* %2)
%6 = icmp eq i32 %4, %5
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i32 @strlen(i8* %2)
%9 = tail call i32 @Fail(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %4)
br label %10
10: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
unsigned long PWMFaultIntGet(unsigned long);
void PWMFaultIntUnregister(unsigned long ulBase) {
  unsigned long ulInt;
  DEBUG_ASSERT((ulBase == 0x40028000) || (ulBase == 0x40029000));
  ulInt = PWMFaultIntGet(ulBase);
  IntDisable(ulInt);
  IntUnregister(ulInt);
}


x86 assembly (clang, -O0):
<PWMFaultIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x40028000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     116d <PWMFaultIntUnregister+0x2d>
cmpq   $0x40029000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rdi
call   1030 <PWMFaultIntGet@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <IntDisable@plt>
mov    -0x10(%rbp),%rdi
call   1060 <IntUnregister@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMFaultIntUnregister>:
push   %rbx
mov    %rdi,%rbx
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40028000,%rax
sete   %dil
call   1050 <DEBUG_ASSERT@plt>
mov    %rbx,%rdi
call   1030 <PWMFaultIntGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <IntDisable@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <IntUnregister@plt>

LLVM IR (-O0):
define void @PWMFaultIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp eq i64 %4, 1073905664
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp eq i64 %7, 1073909760
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @DEBUG_ASSERT(i32 %11)
%13 = load i64, i64* %2
%14 = call i64 @PWMFaultIntGet(i64 %13)
store i64 %14, i64* %3
%15 = load i64, i64* %3
%16 = call i32 @IntDisable(i64 %15)
%17 = load i64, i64* %3
%18 = call i32 @IntUnregister(i64 %17)
ret void
}

LLVM IR (-O2):
define void @PWMFaultIntUnregister(i64 %0) {
%2 = and i64 %0, -4097
%3 = icmp eq i64 %2, 1073905664
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = tail call i64 @PWMFaultIntGet(i64 %0)
%7 = tail call i32 @IntDisable(i64 %6)
%8 = tail call i32 @IntUnregister(i64 %6)
ret void
}
int do_053() { return 53; }


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

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

LLVM IR (-O0):
define i32 @do_053() {
ret i32 53
}

LLVM IR (-O2):
define i32 @do_053() {
ret i32 53
}
/* Variables and functions */
int path2(int);
int path1(int x) { return path2(x + 1); }


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

x86 assembly (clang, -O2):
<path1>:
add    $0x1,%edi
jmp    1030 <path2@plt>

LLVM IR (-O0):
define i32 @path1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 @path2(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @path1(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @path2(i32 %2)
ret i32 %3
}
/* Type definitions */
struct hdr_mutex {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct hdr_mutex *);
void hdr_mutex_free(struct hdr_mutex *mutex) { free(mutex); }


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

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

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

LLVM IR (-O2):
%struct.hdr_mutex = type { i32 }
define void @hdr_mutex_free(%struct.hdr_mutex* nocapture %0) {
%2 = tail call i32 @free(%struct.hdr_mutex* %0)
ret void
}