xunge/DecIR huggingface dataset:
/* Variables and functions */
int ZLIBH_inflate(unsigned char *, unsigned char const *);
int ZLIBH_decompress(char *dest, const char *compressed) {
  const unsigned char *ip = (const unsigned char *)compressed;
  unsigned char *op = (unsigned char *)dest;
  return ZLIBH_inflate(op, ip);
}


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

x86 assembly (clang, -O2):
<ZLIBH_decompress>:
jmp    1030 <ZLIBH_inflate@plt>

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

LLVM IR (-O2):
define i32 @ZLIBH_decompress(i8* %0, i8* %1) {
%3 = tail call i32 @ZLIBH_inflate(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printRegexFlags();
void processListRegexFlagsOptions(const char *const option
                                  __attribute__((unused)),
                                  const char *const parameter
                                  __attribute__((unused))) {
  printRegexFlags();
  exit(0);
}


x86 assembly (clang, -O0):
<processListRegexFlagsOptions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <printRegexFlags@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<processListRegexFlagsOptions>:
push   %rax
xor    %eax,%eax
call   1030 <printRegexFlags@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @processListRegexFlagsOptions(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @printRegexFlags()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @processListRegexFlagsOptions(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @printRegexFlags()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int __api(int, int /*<<< orphan*/);
int rt_wait_for_period(void) { return (__api(4, 0) == 3) ? 0 : 1; }


x86 assembly (clang, -O0):
<rt_wait_for_period>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <__api@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x3,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_wait_for_period>:
push   %rax
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <__api@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rt_wait_for_period() {
%1 = call i32 @__api(i32 4, i32 0)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 0, i32 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @rt_wait_for_period() {
%1 = tail call i32 @__api(i32 4, i32 0)
%2 = icmp ne i32 %1, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char const *, int /*<<< orphan*/);
int exists(const char *fname) {
  if (access(fname, F_OK) != -1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <exists+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <exists+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @F_OK
%6 = call i32 @access(i8* %4, i32 %5)
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_qos_segmented_neg();
void test_qos() { test_qos_segmented_neg(); }


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

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

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

LLVM IR (-O2):
define void @test_qos() {
%1 = tail call i32 (...) @test_qos_segmented_neg()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char letra_maiusc;
  printf("Digite uma letra maiuscula: ");
  scanf("%c", &letra_maiusc);
  printf("Minuscula: %c", letra_maiusc + 32);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
add    $0x20,%esi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%esi
add    $0x20,%esi
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Digite uma letra maiuscula: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [14 x i8] c"Minuscula: %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, 32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Digite uma letra maiuscula: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [14 x i8] c"Minuscula: %c\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = add nsw i32 %5, 32
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_and_null(void *p) {
  free(p);
  p = NULL;
}


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

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

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

LLVM IR (-O2):
define void @free_and_null(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void Cyc_dump_middle(void) {
  puts("\\end{tabbing}\n%%HEVEA "
       "\\begin{latexonly}\n\\end{minipage}}\\\\\\strut\n%%HEVEA "
       "\\end{latexonly}\n%%HEVEA "
       "\\begin{rawhtml}</td></tr></table><dd>\\end{rawhtml}");
}


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

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

LLVM IR (-O0):
@.str = [147 x i8] c"\\end{tabbing}\0A%%HEVEA \\begin{latexonly}\0A\\end{minipage}}\\\\\\strut\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}</td></tr></table><dd>\\end{rawhtml}\00"
define void @Cyc_dump_middle() {
%1 = call i32 @puts(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [147 x i8] c"\\end{tabbing}\0A%%HEVEA \\begin{latexonly}\0A\\end{minipage}}\\\\\\strut\0A%%HEVEA \\end{latexonly}\0A%%HEVEA \\begin{rawhtml}</td></tr></table><dd>\\end{rawhtml}\00"
define void @Cyc_dump_middle() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_sign(int x) {
  if (!x)
    return 0;
  return (x < 0) ? -1 : 1;
}


x86 assembly (clang, -O0):
<test_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <test_sign+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1133 <test_sign+0x33>
mov    -0x8(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sign>:
mov    %edi,%eax
sar    $0x1f,%eax
or     $0x1,%eax
test   %edi,%edi
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_sign(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = icmp sgt i32 %0, -1
%4 = select i1 %3, i32 1, i32 -1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("\nUsage: htsend [options].\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"\0AUsage: htsend [options].\0A\00"
@EXIT_SUCCESS = global i32 0
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [26 x i8] c"\0AUsage: htsend [options].\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_buf(char *data, void *hint) { free(data); }


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

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

LLVM IR (-O0):
define void @free_buf(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 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @free_buf(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void mysmpte(hr, mn, se, fr, ff) int hr, mn, se, fr, ff;
{
  prtime();
  printf("SMPTE %d %d %d %d %d\n", hr, mn, se, fr, ff);
}


x86 assembly (clang, -O0):
<mysmpte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysmpte>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xebd(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"SMPTE %d %d %d %d %d\0A\00"
define void @mysmpte(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 (...) @prtime()
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"SMPTE %d %d %d %d %d\0A\00"
define void @mysmpte(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (...) @prtime()
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Type definitions */
struct avl_tree_node {
  int dummy;
};

/* Variables and functions */
struct avl_tree_node *
avl_tree_first_or_last_in_order(struct avl_tree_node const *, int);
struct avl_tree_node *
avl_tree_first_in_order(const struct avl_tree_node *root) {
  return avl_tree_first_or_last_in_order(root, -1);
}


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

x86 assembly (clang, -O2):
<avl_tree_first_in_order>:
mov    $0xffffffff,%esi
jmp    1030 <avl_tree_first_or_last_in_order@plt>

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

LLVM IR (-O2):
%struct.avl_tree_node = type { i32 }
define %struct.avl_tree_node* @avl_tree_first_in_order(%struct.avl_tree_node* %0) {
%2 = tail call %struct.avl_tree_node* @avl_tree_first_or_last_in_order(%struct.avl_tree_node* %0, i32 -1)
ret %struct.avl_tree_node* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void go_shim(uint64_t *p1, int argc, char **argv) {
  void (*go)(int argc, char **argv);
  go = (void *)(p1);
  go(argc, argv);
}


x86 assembly (clang, -O0):
<go_shim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_shim>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %rdx,%rsi
jmp    *%rax

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

LLVM IR (-O2):
define void @go_shim(i32* nocapture %0, i32 %1, i8** %2) {
%4 = bitcast i32* %0 to void (i32, i8**)*
tail call void %4(i32 %1, i8** %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArr(int arr[], int m) {
  for (int i = 0; i < m; i++) {
    printf("%d ", arr[i]);
  }
}


x86 assembly (clang, -O0):
<printArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArr+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArr+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
void Suff_End(void) {}


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

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

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

LLVM IR (-O2):
define void @Suff_End() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void disable_pin(int pn) {
  FILE *outf = fopen("/sys/class/gpio/unexport", "wb");
  fprintf(outf, "%d", pn);
  fclose(outf);
}


x86 assembly (clang, -O0):
<disable_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xebc(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_pin>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeca(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"%d\00"
define void @disable_pin(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i32, i32* %2
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"/sys/class/gpio/unexport\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [3 x i8] c"%d\00"
define void @disable_pin(i32 %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
/* Type definitions */
struct binaryTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ getArithmeticMeanOptimizedRecurs(struct binaryTree *,
                                                    double *, double *);
double getArithmeticMeanOptimized(struct binaryTree *tree) {
  double sum = 0.0, count = 0.0;
  getArithmeticMeanOptimizedRecurs(tree, &sum, &count);
  return sum / count;
}


x86 assembly (clang, -O0):
<getArithmeticMeanOptimized>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <getArithmeticMeanOptimizedRecurs@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getArithmeticMeanOptimized>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <getArithmeticMeanOptimizedRecurs@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.binaryTree = type { i32 }
define double @getArithmeticMeanOptimized(%struct.binaryTree* %0) {
%2 = alloca %struct.binaryTree*
%3 = alloca double
%4 = alloca double
store %struct.binaryTree* %0, %struct.binaryTree** %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
%5 = load %struct.binaryTree*, %struct.binaryTree** %2
%6 = call i32 @getArithmeticMeanOptimizedRecurs(%struct.binaryTree* %5, double* %3, double* %4)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
%struct.binaryTree = type { i32 }
define double @getArithmeticMeanOptimized(%struct.binaryTree* %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
store double 0.000000e+00, double* %2
%5 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%6 = call i32 @getArithmeticMeanOptimizedRecurs(%struct.binaryTree* %0, double* %2, double* %3)
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fdiv double %7, %8
ret double %9
}
/* Variables and functions */
int sscanf(char const *, char *, char *, char *);
int pick_words(const char *arg, char *first, char *second) {
  second[0] = 0;
  return (sscanf(arg, "%s %s", first, second));
}


x86 assembly (clang, -O0):
<pick_words>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec2(%rip),%rsi
call   1030 <sscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pick_words>:
mov    %rdx,%rcx
mov    %rsi,%rdx
movb   $0x0,(%rcx)
lea    0xee0(%rip),%rsi
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
define i32 @pick_words(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** %6
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 0, i8* %8
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32 @sscanf(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
define i32 @pick_words(i8* nocapture %0, i8* %1, i8* %2) {
store i8 0, i8* %2
%4 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
ret i32 %4
}
void X509_NAME_get_entry(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_get_entry() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printPrivate(char *);
void isAlreadyLocked(void) { printPrivate("That is already locked.\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"That is already locked.\0A\00"
define void @isAlreadyLocked() {
%1 = call i32 @printPrivate(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"That is already locked.\0A\00"
define void @isAlreadyLocked() {
%1 = tail call i32 @printPrivate(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
int main() {
  int x;
  int y;
  x = 3;
  y = x++ + 2;
  return x + y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Here's one way to print a");
  printf("long string.\n");
  printf("Here's another way to print a long string.\n");
  printf("Here's the newest way to print a "
         "long string.\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
lea    0xeff(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Here's one way to print a\00"
@.str.1 = [14 x i8] c"long string.\0A\00"
@.str.2 = [44 x i8] c"Here's another way to print a long string.\0A\00"
@.str.3 = [47 x i8] c"Here's the newest way to print a long string.\0A\00"
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 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Here's one way to print a\00"
@str = [13 x i8] c"long string.\00"
@str.4 = [43 x i8] c"Here's another way to print a long string.\00"
@str.5 = [46 x i8] c"Here's the newest way to print a long string.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t endiannessSwapper(uint16_t bananas) {
  return ((bananas & 0xff00) >> 8) | ((bananas & 0x00ff) << 8);
}


x86 assembly (clang, -O0):
<endiannessSwapper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<endiannessSwapper>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @endiannessSwapper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @endiannessSwapper(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_PRINTABLE_it;
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_PRINTABLE_it);
}


x86 assembly (clang, -O0):
<i2d_ASN1_PRINTABLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rdx
call   1030 <ASN1_item_i2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2d_ASN1_PRINTABLE>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@ASN1_PRINTABLE_it = global i32 0
define i32 @i2d_ASN1_PRINTABLE(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @ASN1_PRINTABLE_it)
ret i32 %3
}
int azt_bcd2bin(unsigned char bcd) {
  { return (((int)bcd >> 4) * 10 + ((int)bcd & 15)); }
}


x86 assembly (clang, -O0):
<azt_bcd2bin>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
imul   $0xa,%eax,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<azt_bcd2bin>:
mov    %edi,%eax
shr    $0x4,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @azt_bcd2bin(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 4
%6 = mul nsw i32 %5, 10
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = and i32 %8, 15
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @azt_bcd2bin(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 4
%4 = mul nuw nsw i32 %3, 10
%5 = and i32 %2, 15
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ mpz_t;

/* Variables and functions */
int /*<<< orphan*/ mpz_out_str(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdout;
void i_prt(const char *str, mpz_t val) {
  printf("%s", str);
  mpz_out_str(stdout, 10, val);
}


x86 assembly (clang, -O0):
<i_prt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    $0xa,%esi
call   1040 <mpz_out_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_prt>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    $0xa,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <mpz_out_str@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @i_prt(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 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @stdout
%8 = load i32, i32* %4
%9 = call i32 @mpz_out_str(i32 %7, i32 10, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@stdout = global i32 0
define void @i_prt(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 @mpz_out_str(i32 %4, i32 10, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FORBLOCK(int);
void FOR(int start, int end, int inc) {
  int x;
  for (x = start; x < end; x = x + inc) {
    FORBLOCK(x);
  }
}


x86 assembly (clang, -O0):
<FOR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1149 <FOR+0x39>
mov    -0x10(%rbp),%edi
call   1030 <FORBLOCK@plt>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <FOR+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FOR>:
push   %rbp
push   %r14
push   %rbx
cmp    %esi,%edi
jge    112e <FOR+0x1e>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
nop
mov    %ebx,%edi
call   1030 <FORBLOCK@plt>
add    %r14d,%ebx
cmp    %ebp,%ebx
jl     1120 <FOR+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @FOR(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
br i1 %4, label %5, label %10
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ %0, %3 ]
%7 = tail call i32 @FORBLOCK(i32 %6)
%8 = add nsw i32 %6, %2
%9 = icmp slt i32 %8, %1
br i1 %9, label %5, label %10
10: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fd_lis3dh_wake();
void fd_hal_accelerometer_wake(void) { fd_lis3dh_wake(); }


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

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

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

LLVM IR (-O2):
define void @fd_hal_accelerometer_wake() {
%1 = tail call i32 (...) @fd_lis3dh_wake()
ret void
}
void msock_print_ipaddr(void *res) { ; }


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

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

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

LLVM IR (-O2):
define void @msock_print_ipaddr(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_invalid(void) { printf("\nERROR: invalid input\n\n"); }


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"\0AERROR: invalid input\0A\00"
define void @print_invalid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
f() {
y:;
}


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

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void yahoo_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @yahoo_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x75() {
  Assert_real((isgraph(117)),
              "/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_isgraph.c",
              590, ("isgraph should be 1 for u"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x75>:
push   %rax
mov    $0x75,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x24e,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for u\00"
define void @t_isgraph_0x75() {
%1 = call i32 @isgraph(i32 117)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for u\00"
define void @t_isgraph_0x75() {
%1 = tail call i32 @isgraph(i32 117)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void __attribute__((always_))
setup_vdso(struct link_map *main_map __attribute__((unused)),
           struct link_map ***first_preload __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%struct.link_map = type opaque
define void @setup_vdso(%struct.link_map* %0, %struct.link_map*** %1) {
%3 = alloca %struct.link_map*
%4 = alloca %struct.link_map***
store %struct.link_map* %0, %struct.link_map** %3
store %struct.link_map*** %1, %struct.link_map**** %4
ret void
}

LLVM IR (-O2):
%struct.link_map = type opaque
define void @setup_vdso(%struct.link_map* nocapture %0, %struct.link_map*** nocapture %1) {
ret void
}
int from_31_num(int a) { return a >> 1; }


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

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

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

LLVM IR (-O2):
define i32 @from_31_num(i32 %0) {
%2 = ashr i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int auditwarnlog(char **);
int audit_warn_postsigterm(void) {
  char *args[2];
  args[0] = "postsigterm";
  args[1] = NULL;
  return (auditwarnlog(args));
}


x86 assembly (clang, -O0):
<audit_warn_postsigterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <auditwarnlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<audit_warn_postsigterm>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rax
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%rdi
call   1030 <auditwarnlog@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"postsigterm\00"
define i32 @audit_warn_postsigterm() {
%1 = alloca [2 x i8*]
%2 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%5 = call i32 @auditwarnlog(i8** %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"postsigterm\00"
define i32 @audit_warn_postsigterm() {
%1 = alloca [2 x i8*]
%2 = bitcast [2 x i8*]* %1 to i8*
%3 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* null, i8** %4
%5 = call i32 @auditwarnlog(i8** %3)
ret i32 %5
}
double Sleef_atanh_u10(double x) { return __builtin_atanh(x); }


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

x86 assembly (clang, -O2):
<Sleef_atanh_u10>:
jmp    1030 <atanh@plt>

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

LLVM IR (-O2):
define double @Sleef_atanh_u10(double %0) {
%2 = tail call double @atanh(double %0)
ret double %2
}
int pthread_setspecific() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_setspecific() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_module_if_get_mconf_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_module_if@%p::get_mconf (rtpp_module_if_get_mconf) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


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

x86 assembly (clang, -O2):
<rtpp_module_if_get_mconf_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_module_if@%p::get_mconf (rtpp_module_if_get_mconf) is invoked after destruction\0A\00"
define void @rtpp_module_if_get_mconf_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_module_if@%p::get_mconf (rtpp_module_if_get_mconf) is invoked after destruction\0A\00"
define void @rtpp_module_if_get_mconf_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}