xunge/DecIR huggingface dataset:
void _M2_errno_init(int argc, char *p) {}


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

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

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

LLVM IR (-O2):
define void @_M2_errno_init(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
scalar_t__ strerror(int /*<<< orphan*/);
const char *slp_strerror(void) { return (const char *)strerror(errno); }


x86 assembly (clang, -O0):
<slp_strerror>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <strerror@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@errno = global i32 0
define i8* @slp_strerror() {
%1 = load i32, i32* @errno
%2 = call i64 @strerror(i32 %1)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}

LLVM IR (-O2):
@errno = global i32 0
define i8* @slp_strerror() {
%1 = load i32, i32* @errno
%2 = tail call i64 @strerror(i32 %1)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
int f2(unsigned char c) {
  if (c == 0x22 || c <= 0x20)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x22,%eax
je     1124 <f2+0x24>
movzbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jg     1130 <f2+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <f2+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
cmp    $0x22,%dil
sete   %al
cmp    $0x21,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @f2(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 34
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 32
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @f2(i8 zeroext %0) {
%2 = icmp eq i8 %0, 34
%3 = icmp ult i8 %0, 33
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void Fido(void) { printf("%s()\n", __func__); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s()\0A\00"
@__func__.Fido = [5 x i8] c"Fido\00"
define void @Fido() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.Fido, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, char *);
char *strsignal(int);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < 32; i++) {
    printf("%d.%s\n", i, strsignal(i));
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1175 <main+0x55>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <strsignal@plt>
mov    -0x18(%rbp),%esi
mov    %rax,%rdx
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %ebx,%edi
call   1040 <strsignal@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %rax,%rdx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1130 <main+0x10>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d.%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %7, %3 ]
%5 = tail call i8* @strsignal(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4, i8* %5)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 32
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}
/* Variables and functions */
int rom_present(char *);
int mach64vt2_available(void) {
  return rom_present(L"roms/video/mach64/atimach64vt2pci.bin");
}


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

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

LLVM IR (-O0):
@.str = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 47, i32 97, i32 116, i32 105, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 118, i32 116, i32 50, i32 112, i32 99, i32 105, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @mach64vt2_available() {
%1 = call i32 @rom_present(i8* bitcast ([38 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [38 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 47, i32 97, i32 116, i32 105, i32 109, i32 97, i32 99, i32 104, i32 54, i32 52, i32 118, i32 116, i32 50, i32 112, i32 99, i32 105, i32 46, i32 98, i32 105, i32 110, i32 0]
define i32 @mach64vt2_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([38 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
char *get_nick(char const *);
int irc_notice(int, char const *, char *, char const *, char *);
int on_user_echo(int fd, const char *from, const char *to, char *msg) {
  const char *nick = get_nick(from);
  if (!msg)
    msg = "<nothing>";
  return irc_notice(fd, to, "%s said '%s'", nick, msg);
}


x86 assembly (clang, -O0):
<on_user_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_nick@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115a <on_user_echo+0x3a>
lea    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xe9a(%rip),%rdx
call   1030 <irc_notice@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_user_echo>:
push   %rbp
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <get_nick@plt>
test   %rbx,%rbx
lea    0xec2(%rip),%r8
cmovne %rbx,%r8
lea    0xec1(%rip),%rdx
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <irc_notice@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"<nothing>\00"
@.str.1 = [13 x i8] c"%s said '%s'\00"
define i32 @on_user_echo(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %6
%11 = call i8* @get_nick(i8* %10)
store i8* %11, i8** %9
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %15, label %14
14: ; preds = %4
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %8
br label %15
15: ; preds = %14, %4
%16 = load i32, i32* %5
%17 = load i8*, i8** %7
%18 = load i8*, i8** %9
%19 = load i8*, i8** %8
%20 = call i32 @irc_notice(i32 %16, i8* %17, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %18, i8* %19)
ret i32 %20
}

LLVM IR (-O2):
@.str = [10 x i8] c"<nothing>\00"
@.str.1 = [13 x i8] c"%s said '%s'\00"
define i32 @on_user_echo(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @get_nick(i8* %1)
%6 = icmp eq i8* %3, null
%7 = select i1 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3
%8 = tail call i32 @irc_notice(i32 %0, i8* %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ makeISOTestVectors();
int main(int argc, char *argv[]) {
  makeISOTestVectors();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <makeISOTestVectors@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @makeISOTestVectors()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @makeISOTestVectors()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ elg_pform_node_id();
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
const char *elg_pform_node_name() {
  static char node[16];
  sprintf(node, "node%ld", elg_pform_node_id());
  return node;
}


x86 assembly (clang, -O0):
<elg_pform_node_name>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <elg_pform_node_id@plt>
mov    %eax,%edx
lea    0x2f0c(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2ef9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<elg_pform_node_name>:
push   %rbx
xor    %eax,%eax
call   1030 <elg_pform_node_id@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@elg_pform_node_name.node = internal global [16 x i8] zeroinitializer
@.str = [8 x i8] c"node%ld\00"
define i8* @elg_pform_node_name() {
%1 = call i32 (...) @elg_pform_node_id()
%2 = call i32 @sprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @elg_pform_node_name.node, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @elg_pform_node_name.node, i64 0, i64 0)
}

LLVM IR (-O2):
@elg_pform_node_name.node = internal global [16 x i8] zeroinitializer
@.str = [8 x i8] c"node%ld\00"
define i8* @elg_pform_node_name() {
%1 = tail call i32 (...) @elg_pform_node_id()
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @elg_pform_node_name.node, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @elg_pform_node_name.node, i64 0, i64 0)
}
char funny_call1(int a, short b, char c, int d, short e, char f, int g) {
  return (int)(a + b + c + d + e + f + g);
}


x86 assembly (clang, -O0):
<funny_call1>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x20(%rbp)
mov    %ecx,%eax
mov    -0x20(%rbp),%ecx
mov    %eax,-0x1c(%rbp)
mov    %edx,%eax
mov    -0x1c(%rbp),%edx
mov    %eax,-0x18(%rbp)
mov    %esi,%eax
mov    -0x18(%rbp),%esi
mov    %eax,-0x14(%rbp)
mov    %edi,%r8d
mov    -0x14(%rbp),%edi
mov    %r9b,%al
mov    0x10(%rbp),%r9d
mov    %r8d,-0x4(%rbp)
mov    %di,-0x6(%rbp)
mov    %sil,-0x7(%rbp)
mov    %edx,-0xc(%rbp)
mov    %cx,-0xe(%rbp)
mov    %al,-0xf(%rbp)
mov    -0x4(%rbp),%eax
movswl -0x6(%rbp),%ecx
add    %ecx,%eax
movsbl -0x7(%rbp),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
movswl -0xe(%rbp),%ecx
add    %ecx,%eax
movsbl -0xf(%rbp),%ecx
add    %ecx,%eax
add    0x10(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funny_call1>:
movzwl %si,%esi
add    %edi,%esi
movzbl %dl,%eax
add    %esi,%eax
add    %ecx,%eax
add    %r8d,%eax
add    %r9d,%eax
add    0x8(%rsp),%eax
ret

LLVM IR (-O0):
define signext i8 @funny_call1(i32 %0, i16 signext %1, i8 signext %2, i32 %3, i16 signext %4, i8 signext %5, i32 %6) {
%8 = alloca i32
%9 = alloca i16
%10 = alloca i8
%11 = alloca i32
%12 = alloca i16
%13 = alloca i8
%14 = alloca i32
store i32 %0, i32* %8
store i16 %1, i16* %9
store i8 %2, i8* %10
store i32 %3, i32* %11
store i16 %4, i16* %12
store i8 %5, i8* %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i16, i16* %9
%17 = sext i16 %16 to i32
%18 = add nsw i32 %15, %17
%19 = load i8, i8* %10
%20 = sext i8 %19 to i32
%21 = add nsw i32 %18, %20
%22 = load i32, i32* %11
%23 = add nsw i32 %21, %22
%24 = load i16, i16* %12
%25 = sext i16 %24 to i32
%26 = add nsw i32 %23, %25
%27 = load i8, i8* %13
%28 = sext i8 %27 to i32
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %14
%31 = add nsw i32 %29, %30
%32 = trunc i32 %31 to i8
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @funny_call1(i32 %0, i16 signext %1, i8 signext %2, i32 %3, i16 signext %4, i8 signext %5, i32 %6) {
%8 = zext i16 %1 to i32
%9 = add i32 %8, %0
%10 = zext i8 %2 to i32
%11 = add i32 %9, %10
%12 = add i32 %11, %3
%13 = zext i16 %4 to i32
%14 = add i32 %12, %13
%15 = zext i8 %5 to i32
%16 = add i32 %14, %15
%17 = add i32 %16, %6
%18 = trunc i32 %17 to i8
ret i8 %18
}
void av_opt_child_class_next() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_child_class_next() {
ret void
}
void signal(int S) { ++S; }


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

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

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

LLVM IR (-O2):
define void @signal(i32 %0) {
ret void
}
void rar_dbgmsg(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @rar_dbgmsg(i8* nocapture %0, ...) {
ret void
}
char ones_to_twos_complement1(char num) { return num < 0 ? num + 1 : num; }


x86 assembly (clang, -O0):
<ones_to_twos_complement1>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jge    1126 <ones_to_twos_complement1+0x26>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <ones_to_twos_complement1+0x2d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @ones_to_twos_complement1(i8 signext %0) {
%2 = lshr i8 %0, 7
%3 = add i8 %2, %0
ret i8 %3
}
void nrf_802154_lp_timer_critical_section_enter(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
void print_time(struct tm *tval) {
  char buf[128];
  strftime(buf, 128, "%C%y-%m-%eT%TZ GMT %z", tval);
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x80,%esi
lea    0xeba(%rip),%rdx
call   1040 <strftime@plt>
lea    -0x90(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_time>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1040 <strftime@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [22 x i8] c"%C%y-%m-%eT%TZ GMT %z\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @print_time(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca [128 x i8]
store %struct.tm* %0, %struct.tm** %2
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @strftime(i8* %4, i32 128, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [22 x i8] c"%C%y-%m-%eT%TZ GMT %z\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @print_time(%struct.tm* %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = call i32 @strftime(i8* %3, i32 128, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.tm* %0)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
float MemFloatArrIO(float *pMemBlk, unsigned short Wr_Addr, float data) {
  float *pWork;
  if (Wr_Addr >> 15) {
    pWork = pMemBlk + (Wr_Addr - 0x8000);
    *pWork = data;
  } else {
    pWork = pMemBlk + Wr_Addr;
    return *pWork;
  }
}


x86 assembly (clang, -O0):
<MemFloatArrIO>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
movss  %xmm0,-0x18(%rbp)
movzwl -0x12(%rbp),%eax
sar    $0xf,%eax
cmp    $0x0,%eax
je     1152 <MemFloatArrIO+0x52>
mov    -0x10(%rbp),%rax
movzwl -0x12(%rbp),%ecx
sub    $0x8000,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
jmp    1175 <MemFloatArrIO+0x75>
mov    -0x10(%rbp),%rax
movzwl -0x12(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MemFloatArrIO>:
mov    %esi,%eax
test   %si,%si
js     110d <MemFloatArrIO+0xd>
movss  (%rdi,%rax,4),%xmm0
ret
movss  %xmm0,-0x20000(%rdi,%rax,4)
fe ff
ret

LLVM IR (-O0):
define float @MemFloatArrIO(float* %0, i16 zeroext %1, float %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca i16
%7 = alloca float
%8 = alloca float*
store float* %0, float** %5
store i16 %1, i16* %6
store float %2, float* %7
%9 = load i16, i16* %6
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 15
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %22
13: ; preds = %3
%14 = load float*, float** %5
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = sub nsw i32 %16, 32768
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %14, i64 %18
store float* %19, float** %8
%20 = load float, float* %7
%21 = load float*, float** %8
store float %20, float* %21
br label %30
22: ; preds = %3
%23 = load float*, float** %5
%24 = load i16, i16* %6
%25 = zext i16 %24 to i32
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds float, float* %23, i64 %26
store float* %27, float** %8
%28 = load float*, float** %8
%29 = load float, float* %28
store float %29, float* %4
br label %30
30: ; preds = %22, %13
%31 = load float, float* %4
ret float %31
}

LLVM IR (-O2):
define float @MemFloatArrIO(float* nocapture %0, i16 zeroext %1, float %2) {
%4 = icmp sgt i16 %1, -1
%5 = zext i16 %1 to i64
br i1 %4, label %9, label %6
6: ; preds = %3
%7 = add nsw i64 %5, -32768
%8 = getelementptr inbounds float, float* %0, i64 %7
store float %2, float* %8
br label %12
9: ; preds = %3
%10 = getelementptr inbounds float, float* %0, i64 %5
%11 = load float, float* %10
br label %12
12: ; preds = %6, %9
%13 = phi float [ undef, %6 ], [ %11, %9 ]
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char c1 = 'z';
  char c2 = 'd';
  char c3 = 'r';
  printf("%c%c%c \n", c1, c2, c3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x7a,-0x5(%rbp)
movb   $0x64,-0x6(%rbp)
movb   $0x72,-0x7(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xec8(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x7a,%esi
mov    $0x64,%edx
mov    $0x72,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%c%c%c \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext 122, i8 signext 100, i8 signext 114)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ ttt_1(char *);
int main(int argc, char *argv[]) {
  char *host;
  if (argc < 2) {
    printf("usage: %s server_host\n", argv[0]);
    exit(1);
  }
  host = argv[1];
  ttt_1(host);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116d <main+0x3d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ttt_1@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     114f <main+0x1f>
mov    (%rsi),%rsi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    0x8(%rsi),%rdi
call   1030 <ttt_1@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 2
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
store i8* %18, i8** %6
%19 = load i8*, i8** %6
%20 = call i32 @ttt_1(i8* %19)
%21 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"usage: %s server_host\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @ttt_1(i8* %10)
%12 = tail call i32 @exit(i32 0)
unreachable
}
void UI_new(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_new() {
ret void
}
void mdp4_dma_p_done_mddi(struct mdp_dma_data *dma) {}


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

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

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

LLVM IR (-O2):
%struct.mdp_dma_data = type opaque
define void @mdp4_dma_p_done_mddi(%struct.mdp_dma_data* nocapture %0) {
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, ...);
void pressEnter(char *text) {
  printf("%s\n", text);
  printf("press Enter...\n...");
  while (getchar() >= ' ')
    ;
}


x86 assembly (clang, -O0):
<pressEnter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0x20,%eax
jl     1164 <pressEnter+0x44>
jmp    114c <pressEnter+0x2c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressEnter>:
push   %rax
call   1030 <puts@plt>
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x1f,%al
jg     1150 <pressEnter+0x20>
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [19 x i8] c"press Enter...\0A...\00"
define void @pressEnter(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %10, %1
%7 = call signext i8 (...) @getchar()
%8 = sext i8 %7 to i32
%9 = icmp sge i32 %8, 32
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"press Enter...\0A...\00"
define void @pressEnter(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %4, %1
%5 = tail call signext i8 (...) @getchar()
%6 = icmp sgt i8 %5, 31
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
/* Variables and functions */
int SubEvt_id(void const *);
int SubEvt_dataError(const void *my) {
  return (SubEvt_id(my) & 0x80000000UL) != 0;
}


x86 assembly (clang, -O0):
<SubEvt_dataError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <SubEvt_id@plt>
cltq
movabs $0x80000000,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubEvt_dataError>:
push   %rax
call   1030 <SubEvt_id@plt>
shr    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SubEvt_dataError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @SubEvt_id(i8* %3)
%5 = sext i32 %4 to i64
%6 = and i64 %5, 2147483648
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SubEvt_dataError(i8* %0) {
%2 = tail call i32 @SubEvt_id(i8* %0)
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ outw(unsigned short, int);
int /*<<< orphan*/ slow_down_io();
void outw_p(unsigned short value, int port) {
  outw(value, port);
  slow_down_io();
}


x86 assembly (clang, -O0):
<outw_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x8(%rbp),%esi
movzwl %ax,%edi
call   1030 <outw@plt>
mov    $0x0,%al
call   1040 <slow_down_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outw_p>:
push   %rax
call   1030 <outw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <slow_down_io@plt>

LLVM IR (-O0):
define void @outw_p(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = load i32, i32* %4
%7 = call i32 @outw(i16 zeroext %5, i32 %6)
%8 = call i32 (...) @slow_down_io()
ret void
}

LLVM IR (-O2):
define void @outw_p(i16 zeroext %0, i32 %1) {
%3 = tail call i32 @outw(i16 zeroext %0, i32 %1)
%4 = tail call i32 (...) @slow_down_io()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_free(unsigned char *);
int /*<<< orphan*/ SHA224(unsigned char *, int, unsigned char *);
int i2d_X509(int /*<<< orphan*/ *, unsigned char **);
int PICA_id_from_X509(X509 *x, unsigned char *id) {
  unsigned char *der = NULL;
  int len;
  len = i2d_X509(x, &der);
  if (len <= 0) {
    return 0;
  }
  SHA224(der, len, id);
  OPENSSL_free(der);
  return 1;
}


x86 assembly (clang, -O0):
<PICA_id_from_X509>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <i2d_X509@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jg     116e <PICA_id_from_X509+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    118e <PICA_id_from_X509+0x5e>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1050 <SHA224@plt>
mov    -0x20(%rbp),%rdi
call   1040 <OPENSSL_free@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PICA_id_from_X509>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <i2d_X509@plt>
test   %eax,%eax
jle    116f <PICA_id_from_X509+0x3f>
mov    0x8(%rsp),%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1050 <SHA224@plt>
mov    0x8(%rsp),%rdi
call   1040 <OPENSSL_free@plt>
mov    $0x1,%eax
jmp    1171 <PICA_id_from_X509+0x41>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @PICA_id_from_X509(i32* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* null, i8** %6
%8 = load i32*, i32** %4
%9 = call i32 @i2d_X509(i32* %8, i8** %6)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = icmp sle i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %20
13: ; preds = %2
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load i8*, i8** %5
%17 = call i32 @SHA224(i8* %14, i32 %15, i8* %16)
%18 = load i8*, i8** %6
%19 = call i32 @OPENSSL_free(i8* %18)
store i32 1, i32* %3
br label %20
20: ; preds = %13, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @PICA_id_from_X509(i32* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @i2d_X509(i32* %0, i8** %3)
%6 = icmp slt i32 %5, 1
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @SHA224(i8* %8, i32 %5, i8* %1)
%10 = load i8*, i8** %3
%11 = call i32 @OPENSSL_free(i8* %10)
br label %12
12: ; preds = %2, %7
%13 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %13
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_has_pm(__le16 fc) { return (fc & __cpu_to_le16(0x1000)) != 0; }


x86 assembly (clang, -O0):
<ieee80211_has_pm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x1000,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_has_pm>:
push   %rbx
mov    %edi,%ebx
mov    $0x1000,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
test   %ebx,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee80211_has_pm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 4096)
%5 = and i32 %3, %4
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ieee80211_has_pm(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 4096)
%3 = and i32 %2, %0
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct timeval {
  long long tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long gettimelong() {
  struct timeval start;
  gettimeofday(&start, NULL);
  return ((long long)start.tv_sec * 1000000 + start.tv_usec);
}


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

x86 assembly (clang, -O2):
<gettimelong>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettimelong() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettimelong() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
void copy_int32_le(unsigned char *out, int what) {
  out[0] = what & 0xff;
  out[1] = (what >> 8) & 0xff;
  out[2] = (what >> 16) & 0xff;
  out[3] = (what >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<copy_int32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @copy_int32_le(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = ashr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = ashr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @copy_int32_le(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ huroutine_test();
int main(int argc, char **argv) {
  huroutine_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <huroutine_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @huroutine_test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @huroutine_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sfree(void *);
void guppy_rawnamenode_hook_free(void *hook) {
  if (hook) {
    sfree(hook);
  }
  return;
}


x86 assembly (clang, -O0):
<guppy_rawnamenode_hook_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <guppy_rawnamenode_hook_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <sfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<guppy_rawnamenode_hook_free>:
test   %rdi,%rdi
je     111a <guppy_rawnamenode_hook_free+0xa>
jmp    1030 <sfree@plt>
ret

LLVM IR (-O0):
define void @guppy_rawnamenode_hook_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @sfree(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @guppy_rawnamenode_hook_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sfree(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int tcpsocket_connect_nonblock(char const *, int);
int tcpsocket_connect(const char *host, int port) {
  return tcpsocket_connect_nonblock(host, port);
}


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

x86 assembly (clang, -O2):
<tcpsocket_connect>:
jmp    1030 <tcpsocket_connect_nonblock@plt>

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

LLVM IR (-O2):
define i32 @tcpsocket_connect(i8* %0, i32 %1) {
%3 = tail call i32 @tcpsocket_connect_nonblock(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
__attribute__((weak)) void rgblight_increase_val(void) {}


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

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

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

LLVM IR (-O2):
define weak void @rgblight_increase_val() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
scalar_t__ pthread_self();
int /*<<< orphan*/ stderr;
void thread_deinit() {
  fprintf(stderr, "Running Thread Deinit (T=%lu)\n",
          (unsigned long)pthread_self());
}


x86 assembly (clang, -O0):
<thread_deinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_deinit>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xec8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Running Thread Deinit (T=%lu)\0A\00"
define void @thread_deinit() {
%1 = load i32, i32* @stderr
%2 = call i64 (...) @pthread_self()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Running Thread Deinit (T=%lu)\0A\00"
define void @thread_deinit() {
%1 = load i32, i32* @stderr
%2 = tail call i64 (...) @pthread_self()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
void vde_chain_nm5_decref(void) {}


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

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

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

LLVM IR (-O2):
define void @vde_chain_nm5_decref() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void nullHelp() { printf("empty payload\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"empty payload\00"
define void @nullHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double genrand_int32();
double genrand_float32_full(void) {
  return genrand_int32() * (1.0 / 4294967295.0);
}


x86 assembly (clang, -O0):
<genrand_float32_full>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
movsd  0xedd(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_float32_full>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_int32@plt>
mulsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_float32_full() {
%1 = call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}

LLVM IR (-O2):
define double @genrand_float32_full() {
%1 = tail call double (...) @genrand_int32()
%2 = fmul double %1, 0x3DF0000000100000
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x19() {
  Assert_real((isodigit(25) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              130, ("isodigit should be 0 for 0x19"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x19>:
push   %rax
mov    $0x19,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x82,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x19\00"
define void @t_isodigit_0x19() {
%1 = call i64 @isodigit(i32 25)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 130, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x19\00"
define void @t_isodigit_0x19() {
%1 = tail call i64 @isodigit(i32 25)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 130, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}