xunge/DecIR huggingface dataset:
int compar_int(const void *a, const void *b, void *param) {
  return (*(int *)(a)) - (*(int *)(b));
}


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

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

LLVM IR (-O0):
define i32 @compar_int(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = sub nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @compar_int(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = bitcast i8* %1 to i32*
%7 = load i32, i32* %6
%8 = sub nsw i32 %5, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ my_log_error(char *, char const *);
scalar_t__ my_string_equals(char const *, char *);
void my_assert_notEmpty(const char *description, const char *string) {
  if (my_string_equals(string, ""))
    my_log_error("assert failed, \"%s\" must not be empty\n", description);
}


x86 assembly (clang, -O0):
<my_assert_notEmpty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeeb(%rip),%rsi
call   1040 <my_string_equals@plt>
cmp    $0x0,%rax
je     115a <my_assert_notEmpty+0x3a>
mov    -0x8(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <my_log_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_assert_notEmpty>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xef8(%rip),%rsi
mov    %rax,%rdi
call   1040 <my_string_equals@plt>
test   %rax,%rax
je     114b <my_assert_notEmpty+0x2b>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <my_log_error@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [39 x i8] c"assert failed, \22%s\22 must not be empty\0A\00"
define void @my_assert_notEmpty(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @my_string_equals(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @my_log_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [39 x i8] c"assert failed, \22%s\22 must not be empty\0A\00"
define void @my_assert_notEmpty(i8* %0, i8* %1) {
%3 = tail call i64 @my_string_equals(i8* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @my_log_error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef char uint16_t;

/* Variables and functions */
size_t uint16PackSize(char *);
size_t uint16Unpack(const char *buffer, size_t size, uint16_t *data) {
  size_t req = uint16PackSize(data);
  if (size >= req) {
    *data = (buffer[0] << 8) | (buffer[1]);
  }
  return req;
}


x86 assembly (clang, -O0):
<uint16Unpack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <uint16PackSize@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     115b <uint16Unpack+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint16Unpack>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <uint16PackSize@plt>
cmp    %r15,%rax
ja     1131 <uint16Unpack+0x21>
mov    0x1(%r14),%cl
mov    %cl,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @uint16Unpack(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i64 @uint16PackSize(i8* %2)
%5 = icmp ugt i64 %4, %1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %2
br label %9
9: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar_fd(long, int);
void puthexa_fd(long code, int fd) {
  if (code >= 16 * 16) {
    puthexa_fd(code / (16 * 16), fd);
    puthexa_fd(code % (16 * 16), fd);
  } else
    ft_putchar_fd(code, fd);
}


x86 assembly (clang, -O0):
<puthexa_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x100,-0x8(%rbp)
jl     1174 <puthexa_fd+0x54>
mov    -0x8(%rbp),%rax
mov    $0x100,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
mov    -0xc(%rbp),%esi
call   1030 <puthexa_fd@plt>
mov    -0x8(%rbp),%rax
mov    $0x100,%ecx
cqto
idiv   %rcx
mov    %rdx,%rdi
mov    -0xc(%rbp),%esi
call   1030 <puthexa_fd@plt>
jmp    1180 <puthexa_fd+0x60>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <ft_putchar_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puthexa_fd>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
cmp    $0x100,%rdi
jl     1141 <puthexa_fd+0x21>
movzbl %dil,%r14d
shr    $0x8,%rdi
mov    %ebx,%esi
call   1030 <puthexa_fd@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ft_putchar_fd@plt>

LLVM IR (-O0):
define void @puthexa_fd(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = icmp sge i64 %5, 256
br i1 %6, label %7, label %14
7: ; preds = %2
%8 = load i64, i64* %3
%9 = sdiv i64 %8, 256
%10 = load i32, i32* %4
%11 = load i64, i64* %3
%12 = srem i64 %11, 256
%13 = load i32, i32* %4
br label %18
14: ; preds = %2
%15 = load i64, i64* %3
%16 = load i32, i32* %4
%17 = call i32 @ft_putchar_fd(i64 %15, i32 %16)
br label %18
18: ; preds = %14, %7
ret void
}

LLVM IR (-O2):
define void @puthexa_fd(i64 %0, i32 %1) {
%3 = icmp sgt i64 %0, 255
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = and i64 %0, 255
%6 = lshr i64 %0, 8
tail call void @puthexa_fd(i64 %6, i32 %1)
br label %7
7: ; preds = %4, %2
%8 = phi i64 [ %0, %2 ], [ %5, %4 ]
%9 = tail call i32 @ft_putchar_fd(i64 %8, i32 %1)
ret void
}
int main() {
  (1 + 2) * 4;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char const *_mpw_getline(char const *, int);
const char *mpw_getline(const char *prompt) {
  return _mpw_getline(prompt, false);
}


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

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

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

LLVM IR (-O2):
define i8* @mpw_getline(i8* %0) {
%2 = tail call i8* @_mpw_getline(i8* %0, i32 0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ test_narrow();
int /*<<< orphan*/ test_wide();
int main() {
  test_narrow();
  test_wide();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_narrow@plt>
mov    $0x0,%al
call   1030 <test_wide@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_narrow@plt>
xor    %eax,%eax
call   1030 <test_wide@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_narrow()
%2 = call i32 (...) @test_wide()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_narrow()
%2 = tail call i32 (...) @test_wide()
ret i32 0
}
void blur_deinit() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @DBGFR3CpuGetMode() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __cpuid_count(unsigned int, unsigned int, unsigned int,
                                 unsigned int, unsigned int, unsigned int);
void cpuid(unsigned func, unsigned subfunc, unsigned cpuinfo[4]) {
  __cpuid_count(func, subfunc, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]);
}


x86 assembly (clang, -O0):
<cpuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%r9d
call   1030 <__cpuid_count@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid>:
mov    (%rdx),%eax
mov    0x4(%rdx),%ecx
mov    0x8(%rdx),%r8d
mov    0xc(%rdx),%r9d
mov    %eax,%edx
jmp    1030 <__cpuid_count@plt>

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

LLVM IR (-O2):
define void @cpuid(i32 %0, i32 %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = getelementptr inbounds i32, i32* %2, i64 1
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %2, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %2, i64 3
%10 = load i32, i32* %9
%11 = tail call i32 @__cpuid_count(i32 %0, i32 %1, i32 %4, i32 %6, i32 %8, i32 %10)
ret void
}
void INT_Excep_PERIA_INTA255(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA255() {
ret void
}
/* Variables and functions */
int check_translation_with_mode(char const *, char const *, char const *,
                                char const *, int /*<<< orphan*/);
int check_translation(const char *tableList, const char *str,
                      const char *typeform, const char *expected) {
  return check_translation_with_mode(tableList, str, typeform, expected, 0);
}


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

x86 assembly (clang, -O2):
<check_translation>:
xor    %r8d,%r8d
jmp    1030 <check_translation_with_mode@plt>

LLVM IR (-O0):
define i32 @check_translation(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @check_translation_with_mode(i8* %9, i8* %10, i8* %11, i8* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @check_translation(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @check_translation_with_mode(i8* %0, i8* %1, i8* %2, i8* %3, i32 0)
ret i32 %5
}
void unpack_config(unsigned char config, int *mtout, int *scout) {
  *scout = config & 0x0f;
  *mtout = (config & 0xf0) >> 4;
}


x86 assembly (clang, -O0):
<unpack_config>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movzbl -0x1(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x4,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_config>:
mov    %edi,%eax
and    $0xf,%eax
mov    %eax,(%rdx)
shr    $0x4,%edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @unpack_config(i8 zeroext %0, i32* %1, i32* %2) {
%4 = alloca i8
%5 = alloca i32*
%6 = alloca i32*
store i8 %0, i8* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = and i32 %8, 15
%10 = load i32*, i32** %6
store i32 %9, i32* %10
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = and i32 %12, 240
%14 = ashr i32 %13, 4
%15 = load i32*, i32** %5
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @unpack_config(i8 zeroext %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = zext i8 %0 to i32
%5 = and i32 %4, 15
store i32 %5, i32* %2
%6 = lshr i32 %4, 4
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
void *thread_function(void *thread_arg) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @thread_function(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
void *memset(void *, int, unsigned int);
__attribute__((regparm(0))) void *__deputy_memset(void *s, int c,
                                                  unsigned int n) {
  return memset(s, c, n);
}


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

x86 assembly (clang, -O2):
<__deputy_memset>:
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define i8* @__deputy_memset(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @memset(i8* %0, i32 %1, i32 %2)
ret i8* %4
}
/* Variables and functions */
scalar_t__ modf(double, double *);
double ceil(double x) {
  double val;
  return modf(x, &val) > 0 ? val + 1.0 : val;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
call   1030 <modf@plt>
cmp    $0x0,%rax
jle    114c <ceil+0x3c>
movsd  0xec3(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1156 <ceil+0x46>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
push   %rax
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
test   %rax,%rax
jle    112b <ceil+0x1b>
addsd  0xed5(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i64 @modf(double %4, double* %3)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %3
%9 = fadd double %8, 1.000000e+00
br label %12
10: ; preds = %1
%11 = load double, double* %3
br label %12
12: ; preds = %10, %7
%13 = phi double [ %9, %7 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i64 @modf(double %0, double* %2)
%5 = icmp sgt i64 %4, 0
%6 = load double, double* %2
%7 = fadd double %6, 1.000000e+00
%8 = select i1 %5, double %7, double %6
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ cmus_next();
void cmd_p_next(char *arg) { cmus_next(); }


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

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

LLVM IR (-O0):
define void @cmd_p_next(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @cmus_next()
ret void
}

LLVM IR (-O2):
define void @cmd_p_next(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @cmus_next()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy_test_0(int);
int /*<<< orphan*/ mempcpy_test_0(int);
int /*<<< orphan*/ memset_test_0(int);
void test_stringops_0(int len) {
  memcpy_test_0(len);
  mempcpy_test_0(len);
  memset_test_0(len);
}


x86 assembly (clang, -O0):
<test_stringops_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <memcpy_test_0@plt>
mov    -0x4(%rbp),%edi
call   1050 <mempcpy_test_0@plt>
mov    -0x4(%rbp),%edi
call   1030 <memset_test_0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringops_0>:
push   %rbx
mov    %edi,%ebx
call   1040 <memcpy_test_0@plt>
mov    %ebx,%edi
call   1050 <mempcpy_test_0@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <memset_test_0@plt>

LLVM IR (-O0):
define void @test_stringops_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @memcpy_test_0(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @mempcpy_test_0(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @memset_test_0(i32 %7)
ret void
}

LLVM IR (-O2):
define void @test_stringops_0(i32 %0) {
%2 = tail call i32 @memcpy_test_0(i32 %0)
%3 = tail call i32 @mempcpy_test_0(i32 %0)
%4 = tail call i32 @memset_test_0(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PicocParse(char const *, char *, int /*<<< orphan*/, int,
                              int /*<<< orphan*/, int, int);
char *PlatformReadFile(char const *);
int /*<<< orphan*/ strlen(char *);
void PicocPlatformScanFile(const char *FileName) {
  char *SourceStr = PlatformReadFile(FileName);
  PicocParse(FileName, SourceStr, strlen(SourceStr), 1, 0, 1, 1);
}


x86 assembly (clang, -O0):
<PicocPlatformScanFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <PlatformReadFile@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%r9d
xor    %r8d,%r8d
mov    %r9d,%ecx
movl   $0x1,(%rsp)
call   1040 <PicocParse@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PicocPlatformScanFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <PlatformReadFile@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
movl   $0x1,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
call   1040 <PicocParse@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @PicocPlatformScanFile(i8* %0) {
%2 = tail call i8* @PlatformReadFile(i8* %0)
%3 = tail call i32 @strlen(i8* %2)
%4 = tail call i32 @PicocParse(i8* %0, i8* %2, i32 %3, i32 1, i32 0, i32 1, i32 1)
ret void
}
int test_04(unsigned char *a) { return a[0] + ((a[0] & 0x80) != 0); }


x86 assembly (clang, -O0):
<test_04>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
and    $0x80,%ecx
cmp    $0x0,%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_04>:
movzbl (%rdi),%ecx
mov    %ecx,%eax
shr    $0x7,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_04(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = and i32 %10, 128
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
%14 = add nsw i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @test_04(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = lshr i32 %3, 7
%5 = add nuw nsw i32 %4, %3
ret i32 %5
}
void TimerDMAConfigure(unsigned long ulBase, unsigned long ulDMABase,
                       unsigned long ulDMABurstLength) {

  ;

  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000048))) =
      (ulDMABase | ulDMABurstLength);
}


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

x86 assembly (clang, -O2):
<TimerDMAConfigure>:
or     %rdx,%rsi
mov    %rsi,0x48(%rdi)
ret

LLVM IR (-O0):
define void @TimerDMAConfigure(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
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = or i64 %7, %8
%10 = load i64, i64* %4
%11 = add i64 %10, 72
%12 = inttoptr i64 %11 to i64*
store volatile i64 %9, i64* %12
ret void
}

LLVM IR (-O2):
define void @TimerDMAConfigure(i64 %0, i64 %1, i64 %2) {
%4 = or i64 %2, %1
%5 = add i64 %0, 72
%6 = inttoptr i64 %5 to i64*
store volatile i64 %4, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x38() {
  Assert_real((isalnum(56)),
              "/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",
              285, ("isalnum should be 1 for 8"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x38>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x11d,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x38>:
push   %rax
mov    $0x38,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x11d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 8\00"
define void @t_isalnum_0x38() {
%1 = call i32 @isalnum(i32 56)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for 8\00"
define void @t_isalnum_0x38() {
%1 = tail call i32 @isalnum(i32 56)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float Rand(unsigned int *);
float UnitRandFloat(unsigned int *state) { return (Rand(state) / 32767.f); }


x86 assembly (clang, -O0):
<UnitRandFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Rand@plt>
movss  0xed3(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnitRandFloat>:
push   %rax
call   1030 <Rand@plt>
divss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @UnitRandFloat(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call float @Rand(i32* %3)
%5 = fdiv float %4, 3.276700e+04
ret float %5
}

LLVM IR (-O2):
define float @UnitRandFloat(i32* %0) {
%2 = tail call float @Rand(i32* %0)
%3 = fdiv float %2, 3.276700e+04
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
void msg_settext(char *msg, const char *text) {
  strncpy(&msg[6], text, 128 - 6);
}


x86 assembly (clang, -O0):
<msg_settext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x6,%rdi
mov    -0x10(%rbp),%rsi
mov    $0x7a,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_settext>:
add    $0x6,%rdi
mov    $0x7a,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @msg_settext(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 6
%7 = load i8*, i8** %4
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 122)
ret void
}

LLVM IR (-O2):
define void @msg_settext(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 6
%4 = tail call i32 @strncpy(i8* %3, i8* %1, i32 122)
ret void
}
void cvector_zero(double *v, int n) {
  for (int i = 0; i < n; i++) {
    v[i] = 0.0;
  }
}


x86 assembly (clang, -O0):
<cvector_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <cvector_zero+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <cvector_zero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector_zero>:
test   %esi,%esi
jle    1126 <cvector_zero+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @cvector_zero(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
float wssin(float *x) { float wssin_(float *x); }


x86 assembly (clang, -O0):
<wssin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @wssin(float* nocapture readnone %0) {
ret float undef
}
/* Variables and functions */
unsigned int f11(unsigned int);
unsigned int f12(unsigned int a) { return f11(f11(a)); }


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

x86 assembly (clang, -O2):
<f12>:
push   %rax
call   1030 <f11@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f11@plt>

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

LLVM IR (-O2):
define i32 @f12(i32 %0) {
%2 = tail call i32 @f11(i32 %0)
%3 = tail call i32 @f11(i32 %2)
ret i32 %3
}
extern void fget_ignore_newline(char *arr_no_newline) {
  int i = 0;
  while (arr_no_newline[i] != '\0') {
    if (arr_no_newline[i] == '\n') {
      arr_no_newline[i] = '\0';
      break;
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<fget_ignore_newline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <fget_ignore_newline+0x58>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    114a <fget_ignore_newline+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1158 <fget_ignore_newline+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <fget_ignore_newline+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget_ignore_newline>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1129 <fget_ignore_newline+0x29>
cmp    $0xa,%cl
je     1123 <fget_ignore_newline+0x23>
add    $0x1,%rax
jmp    1110 <fget_ignore_newline+0x10>
mov    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @fget_ignore_newline(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %10, %9 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %9 [
i8 0, label %11
i8 10, label %6
]
6: ; preds = %2
%7 = and i64 %3, 4294967295
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
br label %11
9: ; preds = %2
%10 = add nuw i64 %3, 1
br label %2
11: ; preds = %2, %6
ret void
}
void g_utf8_offset_to_pointer() {}


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

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

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

LLVM IR (-O2):
define void @g_utf8_offset_to_pointer() {
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetGreenVideoBlackLevel(
    struct UPnPService *Service, int ErrorCode, void *User) {
  printf("RND Invoke Response: "
         "RenderingControl/SetGreenVideoBlackLevel[ErrorCode:%d]()\r\n",
         ErrorCode);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_SetGreenVideoBlackLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"RND Invoke Response: RenderingControl/SetGreenVideoBlackLevel[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetGreenVideoBlackLevel(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [80 x i8] c"RND Invoke Response: RenderingControl/SetGreenVideoBlackLevel[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetGreenVideoBlackLevel(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void mhl_unpowered_init(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @mhl_unpowered_init(%struct.device* nocapture %0) {
ret void
}
void driveLeft(int dist) {}


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

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

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

LLVM IR (-O2):
define void @driveLeft(i32 %0) {
ret void
}
char *ft_strcat(char *dest, char *src) {
  char *tmp;
  tmp = dest;
  while (*tmp)
    tmp++;
  while ((*tmp++ = *src++))
    ;
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <ft_strcat+0x32>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <ft_strcat+0x14>
jmp    1137 <ft_strcat+0x37>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1166 <ft_strcat+0x66>
jmp    1137 <ft_strcat+0x37>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <ft_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 <ft_strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @ft_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 */
scalar_t__ islower(int);
scalar_t__ isupper(int);
int shifter(int character) {
  int result;
  if (isupper(character)) {
    result = character - 'A';
  } else if (islower(character)) {
    result = character - 'a';
  } else {
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<shifter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     114b <shifter+0x2b>
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1177 <shifter+0x57>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     116b <shifter+0x4b>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1172 <shifter+0x52>
movl   $0x0,-0x8(%rbp)
jmp    1177 <shifter+0x57>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shifter>:
push   %rbx
mov    %edi,%ebx
call   1040 <isupper@plt>
test   %rax,%rax
je     1132 <shifter+0x12>
add    $0xffffffbf,%ebx
jmp    1144 <shifter+0x24>
mov    %ebx,%edi
call   1030 <islower@plt>
add    $0xffffff9f,%ebx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %ecx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @shifter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @isupper(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 65
store i32 %9, i32* %3
br label %19
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i64 @islower(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %2
%16 = sub nsw i32 %15, 97
store i32 %16, i32* %3
br label %18
17: ; preds = %10
store i32 0, i32* %3
br label %18
18: ; preds = %17, %14
br label %19
19: ; preds = %18, %7
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @shifter(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -65
br label %11
6: ; preds = %1
%7 = tail call i64 @islower(i32 %0)
%8 = icmp eq i64 %7, 0
%9 = add nsw i32 %0, -97
%10 = select i1 %8, i32 0, i32 %9
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ %5, %4 ], [ %10, %6 ]
ret i32 %12
}
void *vabsptr(void *ptr) { return (void *)((unsigned int)ptr | 0x90000000); }


x86 assembly (clang, -O0):
<vabsptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x90000000,%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vabsptr>:
mov    %rdi,%rax
or     $0x90000000,%eax
ret

LLVM IR (-O0):
define i8* @vabsptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = or i32 %4, -1879048192
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @vabsptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 1879048191
%4 = or i64 %3, 2415919104
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_signed_char(signed char const k1,
                                          signed char const k2) {
  return k1 == k2;
}


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

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_signed_char>:
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_signed_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_signed_char(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void av_hash_freep() {}


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

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

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

LLVM IR (-O2):
define void @av_hash_freep() {
ret void
}
int GetGpioSize(int direction) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @GetGpioSize(i32 %0) {
ret i32 0
}
/* Variables and functions */
double floor(double);
double distorter_mirror(double value) {
  double i_value = floor(value);
  if (((int)i_value) % 2 == 0) {
    value -= i_value;
  } else {
    value = 1.0 - (value - i_value);
  }
  return value;
}


x86 assembly (clang, -O0):
<distorter_mirror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115a <distorter_mirror+0x4a>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1175 <distorter_mirror+0x65>
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xe94(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distorter_mirror>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
cvttsd2si %xmm0,%eax
test   $0x1,%al
je     1132 <distorter_mirror+0x22>
subsd  (%rsp),%xmm0
addsd  0xed0(%rip),%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @distorter_mirror(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.floor.f64(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fptosi double %6 to i32
%8 = srem i32 %7, 2
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = load double, double* %2
%13 = fsub double %12, %11
store double %13, double* %2
br label %19
14: ; preds = %1
%15 = load double, double* %2
%16 = load double, double* %3
%17 = fsub double %15, %16
%18 = fsub double 1.000000e+00, %17
store double %18, double* %2
br label %19
19: ; preds = %14, %10
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @distorter_mirror(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fptosi double %2 to i32
%4 = and i32 %3, 1
%5 = icmp eq i32 %4, 0
%6 = fsub double %0, %2
%7 = fsub double %2, %0
%8 = fadd double %7, 1.000000e+00
%9 = select i1 %5, double %6, double %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned long, int);
int /*<<< orphan*/ outl(unsigned long, int);
int /*<<< orphan*/ outw(unsigned long, int);
void outx(unsigned long value, int addr, int width) {
  switch (width) {
  case 2:
    outw(value, addr);
    break;
  case 4:
    outl(value, addr);
    break;
  default:
    outb(value, addr);
  }
}


x86 assembly (clang, -O0):
<outx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2,%eax
je     1167 <outx+0x37>
jmp    1156 <outx+0x26>
mov    -0x14(%rbp),%eax
sub    $0x4,%eax
je     1178 <outx+0x48>
jmp    1189 <outx+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <outw@plt>
jmp    1195 <outx+0x65>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <outl@plt>
jmp    1195 <outx+0x65>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <outb@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outx>:
cmp    $0x4,%edx
je     113f <outx+0xf>
cmp    $0x2,%edx
jne    1144 <outx+0x14>
jmp    1050 <outw@plt>
jmp    1040 <outl@plt>
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @outx(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
switch i32 %7, label %16 [
i32 2, label %8
i32 4, label %12
]
8: ; preds = %3
%9 = load i64, i64* %4
%10 = load i32, i32* %5
%11 = call i32 @outw(i64 %9, i32 %10)
br label %20
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i32, i32* %5
%15 = call i32 @outl(i64 %13, i32 %14)
br label %20
16: ; preds = %3
%17 = load i64, i64* %4
%18 = load i32, i32* %5
%19 = call i32 @outb(i64 %17, i32 %18)
br label %20
20: ; preds = %16, %12, %8
ret void
}

LLVM IR (-O2):
define void @outx(i64 %0, i32 %1, i32 %2) {
switch i32 %2, label %8 [
i32 2, label %4
i32 4, label %6
]
4: ; preds = %3
%5 = tail call i32 @outw(i64 %0, i32 %1)
br label %10
6: ; preds = %3
%7 = tail call i32 @outl(i64 %0, i32 %1)
br label %10
8: ; preds = %3
%9 = tail call i32 @outb(i64 %0, i32 %1)
br label %10
10: ; preds = %8, %6, %4
ret void
}