xunge/DecIR huggingface dataset:
void *f() {
  char *p = __builtin_malloc(42);
  __builtin_memset(p, 0, 42);
  __builtin_memset(p, 0, 42);
  return p;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2a,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2a,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x2a,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x1,%edi
mov    $0x2a,%esi
call   1030 <calloc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @f() {
%1 = call dereferenceable_or_null(42) i8* @calloc(i64 1, i64 42)
ret i8* %1
}
void os_init_robin(void) { ; }


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

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

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

LLVM IR (-O2):
define void @os_init_robin() {
ret void
}
/* Variables and functions */
int zmDebugTerminate();
int zmDbgTerm() { return (zmDebugTerminate()); }


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

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

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

LLVM IR (-O2):
define i32 @zmDbgTerm() {
%1 = tail call i32 (...) @zmDebugTerminate()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int, int);
int main(void) {
  int x = 1;
  int y = 2;
  swap(x, y);
  printf("x=%d\ny=%d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <swap@plt>
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"x=%d\0Ay=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @swap(i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
ret i32 0
}
void bgscan_deinit(struct wpa_supplicant *wpa_s) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @bgscan_deinit(%struct.wpa_supplicant* nocapture %0) {
ret void
}
void f2() { int index = 1; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f2() {
ret void
}
/* Variables and functions */
int EOF;
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("EOF = %d\n", EOF);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"EOF = %d\0A\00"
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @EOF
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@.str = [10 x i8] c"EOF = %d\0A\00"
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @EOF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hci_subevent_le_connection_complete_get_master_clock_accuracy(
    const uint8_t *event) {
  return event[20];
}


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

x86 assembly (clang, -O2):
<hci_subevent_le_connection_complete_get_master_clock_accuracy>:
mov    0x50(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hci_subevent_le_connection_complete_get_master_clock_accuracy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 20
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hci_subevent_le_connection_complete_get_master_clock_accuracy(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 20
%3 = load i32, i32* %2
ret i32 %3
}
int isAlphaNum(char c) {
  if ((c >= '!') && (c <= '~'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isAlphaNum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jl     1130 <isAlphaNum+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jg     1130 <isAlphaNum+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isAlphaNum+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAlphaNum>:
add    $0xdf,%dil
xor    %eax,%eax
cmp    $0x5e,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isAlphaNum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 33
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 126
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
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 @isAlphaNum(i8 signext %0) {
%2 = add i8 %0, -33
%3 = icmp ult i8 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
char *getLongString();
void testLongLine(FILE *f) { fprintf(f, getLongString()); }


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

x86 assembly (clang, -O2):
<testLongLine>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <getLongString@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
define void @testLongLine(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i8* (...) @getLongString()
%5 = call i32 @fprintf(i32* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @testLongLine(i32* nocapture %0) {
%2 = tail call i8* (...) @getLongString()
%3 = tail call i32 @fprintf(i32* %0, i8* %2)
ret void
}
unsigned float_neg(unsigned uf) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @float_neg(i32 %0) {
ret i32 2
}
int do_384() { return 384; }


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

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

LLVM IR (-O0):
define i32 @do_384() {
ret i32 384
}

LLVM IR (-O2):
define i32 @do_384() {
ret i32 384
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void shell() {
  printf("You did it.\n");
  system("/bin/sh");
}


x86 assembly (clang, -O0):
<shell>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<shell>:
push   %rax
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"You did it.\0A\00"
@.str.1 = [8 x i8] c"/bin/sh\00"
define void @shell() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"/bin/sh\00"
@str = [12 x i8] c"You did it.\00"
define void @shell() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "\nUsage: \n"
                  "\t gpio init pin direction\n"
                  "\t gpio get pin\n"
                  "\t gpio set pin data\n"
                  "\t gpio blink pin speed\n\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [95 x i8] c"\0AUsage: \0A\09 gpio init pin direction\0A\09 gpio get pin\0A\09 gpio set pin data\0A\09 gpio blink pin speed\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [95 x i8] c"\0AUsage: \0A\09 gpio init pin direction\0A\09 gpio get pin\0A\09 gpio set pin data\0A\09 gpio blink pin speed\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
unsigned xrop3_192_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = T & S;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_192_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_192_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %esi,%eax
and    %ecx,%eax
xor    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_192_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = and i32 %6, %4
%8 = xor i32 %4, -1
%9 = and i32 %8, %5
%10 = or i32 %7, %9
ret i32 %10
}
int fib(int n) {
  if (n <= 1)
    return 1;
  return fib(n - 1) + fib(n - 2);
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1131 <fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fib+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <fib+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fib@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1130 <fib+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
char *jfes_integer_to_string_r(int, char *, int);
char *jfes_integer_to_string(int value) {
  static char buf[64 + 1];
  return jfes_integer_to_string_r(value, &buf[0], 64);
}


x86 assembly (clang, -O0):
<jfes_integer_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f1b(%rip),%rsi
mov    $0x40,%edx
call   1030 <jfes_integer_to_string_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jfes_integer_to_string>:
lea    0x2f29(%rip),%rsi
mov    $0x40,%edx
jmp    1030 <jfes_integer_to_string_r@plt>

LLVM IR (-O0):
@jfes_integer_to_string.buf = internal global [65 x i8] zeroinitializer
define i8* @jfes_integer_to_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @jfes_integer_to_string_r(i32 %3, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @jfes_integer_to_string.buf, i64 0, i64 0), i32 64)
ret i8* %4
}

LLVM IR (-O2):
@jfes_integer_to_string.buf = internal global [65 x i8] zeroinitializer
define i8* @jfes_integer_to_string(i32 %0) {
%2 = tail call i8* @jfes_integer_to_string_r(i32 %0, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @jfes_integer_to_string.buf, i64 0, i64 0), i32 64)
ret i8* %2
}
void bzero(to, count) char *to;
int count;
{
  while (count-- > 0) {
    *to++ = 0;
  }
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1136 <bzero+0x36>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
jmp    110b <bzero+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
jle    1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @bzero(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
%8 = icmp sgt i32 %6, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
store i8 0, i8* %10
br label %5
12: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %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 %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ runSignatureTests1();
int /*<<< orphan*/ runSignatureTests2();
void runSignatureTests(void) {
  runSignatureTests1();
  runSignatureTests2();
}


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

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

LLVM IR (-O0):
define void @runSignatureTests() {
%1 = call i32 (...) @runSignatureTests1()
%2 = call i32 (...) @runSignatureTests2()
ret void
}

LLVM IR (-O2):
define void @runSignatureTests() {
%1 = tail call i32 (...) @runSignatureTests1()
%2 = tail call i32 (...) @runSignatureTests2()
ret void
}
int double_compare(const void *lv, const void *rv) {
  double l = *(double *)lv;
  double r = *(double *)rv;
  if (l < r)
    return -1;
  if (l > r)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<double_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <double_compare+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <double_compare+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <double_compare+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <double_compare+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_compare>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @double_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
double genrand_int32();
double genrand_real2(void) {
  return (genrand_int32() * (1.0 / 2147483648.0)) - 1.0;
}


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

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

LLVM IR (-O0):
define double @genrand_real2() {
%1 = call double (...) @genrand_int32()
%2 = call double @llvm.fmuladd.f64(double %1, double 0x3E00000000000000, double -1.000000e+00)
ret double %2
}

LLVM IR (-O2):
define double @genrand_real2() {
%1 = tail call double (...) @genrand_int32()
%2 = tail call double @llvm.fmuladd.f64(double %1, double 0x3E00000000000000, double -1.000000e+00)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ usage(char const *);
void usageAndQuit(const char *pname) {
  usage(pname);
  exit(1);
}


x86 assembly (clang, -O0):
<usageAndQuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <usage@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usageAndQuit>:
push   %rax
call   1030 <usage@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @usageAndQuit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @usage(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @usageAndQuit(i8* %0) {
%2 = tail call i32 @usage(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ code;

/* Variables and functions */
int /*<<< orphan*/ __console_write(char const *, int);
void console_darkred() {
  static const char code[] = {0x1b, '[', '3', '1', ';', '0', '6', 'm'};
  __console_write(code, sizeof(code));
}


x86 assembly (clang, -O0):
<console_darkred>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <__console_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_darkred>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <__console_write@plt>

LLVM IR (-O0):
@console_darkred.code = internal constant [8 x i8] c"\1B[31;06m"
define void @console_darkred() {
%1 = call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_darkred.code, i64 0, i64 0), i32 8)
ret void
}

LLVM IR (-O2):
@console_darkred.code = internal constant [8 x i8] c"\1B[31;06m"
define void @console_darkred() {
%1 = tail call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_darkred.code, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
scalar_t__ config_WITH_CARDREADER();
int config_READER_CONAX(void) { return config_WITH_CARDREADER() ? 1 : 0; }


x86 assembly (clang, -O0):
<config_READER_CONAX>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <config_WITH_CARDREADER@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_READER_CONAX>:
push   %rax
xor    %eax,%eax
call   1030 <config_WITH_CARDREADER@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @config_READER_CONAX() {
%1 = tail call i64 (...) @config_WITH_CARDREADER()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int anetTcpGenericConnect(char *, char *, int, char *, int);
int anetTcpNonBlockBindConnect(char *err, char *addr, int port,
                               char *source_addr) {
  return anetTcpGenericConnect(err, addr, port, source_addr, 1);
}


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

x86 assembly (clang, -O2):
<anetTcpNonBlockBindConnect>:
mov    $0x1,%r8d
jmp    1030 <anetTcpGenericConnect@plt>

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

LLVM IR (-O2):
define i32 @anetTcpNonBlockBindConnect(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i8* %3, i32 1)
ret i32 %5
}
void _infix_operator_plus_u64_u64(unsigned long long lhs,
                                  unsigned long long rhs,
                                  unsigned long long *__rval_1) {
  *__rval_1 = lhs + rhs;
}


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

x86 assembly (clang, -O2):
<_infix_operator_plus_u64_u64>:
add    %rsi,%rdi
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_plus_u64_u64(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = add i64 %7, %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @_infix_operator_plus_u64_u64(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = add i64 %1, %0
store i64 %4, i64* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void block_sigterm(sigset_t *oldset) {
  sigset_t sigset;
  sigemptyset(&sigset);
  sigaddset(&sigset, SIGTERM);
  sigprocmask(SIG_BLOCK, &sigset, oldset);
}


x86 assembly (clang, -O0):
<block_sigterm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rsi
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_sigterm>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIGTERM = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigterm(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIGTERM
%6 = call i32 @sigaddset(i32* %3, i32 %5)
%7 = load i32, i32* @SIG_BLOCK
%8 = load i32*, i32** %2
%9 = call i32 @sigprocmask(i32 %7, i32* %3, i32* %8)
ret void
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@SIG_BLOCK = global i32 0
define void @block_sigterm(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = load i32, i32* @SIGTERM
%6 = call i32 @sigaddset(i32* %2, i32 %5)
%7 = load i32, i32* @SIG_BLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %2, i32* %0)
ret void
}
float sim_calc_render_offset(float zoom, float delta, float pos, float center) {
  return ((1 - zoom) * center) + (pos + delta) * zoom;
}


x86 assembly (clang, -O0):
<sim_calc_render_offset>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  0xee0(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
addss  -0x8(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_calc_render_offset>:
movss  0xef8(%rip),%xmm4
subss  %xmm0,%xmm4
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
mulss  %xmm3,%xmm4
addss  %xmm4,%xmm0
ret

LLVM IR (-O0):
define float @sim_calc_render_offset(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = fsub float 1.000000e+00, %9
%11 = load float, float* %8
%12 = load float, float* %7
%13 = load float, float* %6
%14 = fadd float %12, %13
%15 = load float, float* %5
%16 = fmul float %14, %15
%17 = call float @llvm.fmuladd.f32(float %10, float %11, float %16)
ret float %17
}

LLVM IR (-O2):
define float @sim_calc_render_offset(float %0, float %1, float %2, float %3) {
%5 = fsub float 1.000000e+00, %0
%6 = fadd float %1, %2
%7 = fmul float %6, %0
%8 = tail call float @llvm.fmuladd.f32(float %5, float %3, float %7)
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ serial_init(int);
int main(void) {
  serial_init(1);
  puts("Hello World!\n");
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <serial_init@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
jmp    1145 <main+0x25>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <serial_init@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
nopw   0x0(%rax,%rax,1)
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @serial_init(i32 1)
%3 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main() {
%1 = tail call i32 @serial_init(i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %0, %3
br label %3
}
void gtk_combo_box_popdown() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_popdown() {
ret void
}
/* Variables and functions */
bool nrf52_errata_174(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_174() {
ret i32 0
}
void sighand(int no) {
  printf("\n %s: \n", __func__);
  printf(" I am in sighandler %d \n", no);
}


x86 assembly (clang, -O0):
<sighand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
lea    0xedf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighand>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.sighand = [8 x i8] c"sighand\00"
@.str.1 = [25 x i8] c" I am in sighandler %d \0A\00"
define void @sighand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sighand, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.sighand = [8 x i8] c"sighand\00"
@.str.1 = [25 x i8] c" I am in sighandler %d \0A\00"
define void @sighand(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.sighand, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int my_getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[10000];
  while ((len = my_getline(line, 10000)) > 0)
    if (len > 80)
      printf("%s", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2720,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x2720(%rbp),%rdi
mov    $0x2710,%esi
call   1040 <my_getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x50,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x2720(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x2718,%rsp
mov    %rsp,%rdi
mov    $0x2710,%esi
call   1040 <my_getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x2710,%esi
call   1040 <my_getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x2718,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%6 = call i32 @my_getline(i8* %5, i32 10000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = getelementptr inbounds [10000 x i8], [10000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [10000 x i8]
%2 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_getline(i8* %2, i32 10000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @my_getline(i8* %2, i32 10000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void movsx_reg32_8preg32pimm32(int reg1, int reg2, unsigned long imm32) {
  put8(0x0F);
  put8(0xBE);
  put8((reg1 << 3) | reg2 | 0x80);
  put32(imm32);
}


x86 assembly (clang, -O0):
<movsx_reg32_8preg32pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0xbe,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     -0x8(%rbp),%edi
or     $0x80,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<movsx_reg32_8preg32pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0xbe,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @movsx_reg32_8preg32pimm32(i32 %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = call i32 @put8(i32 15)
%8 = call i32 @put8(i32 190)
%9 = load i32, i32* %4
%10 = shl i32 %9, 3
%11 = load i32, i32* %5
%12 = or i32 %10, %11
%13 = or i32 %12, 128
%14 = call i32 @put8(i32 %13)
%15 = load i64, i64* %6
%16 = call i32 @put32(i64 %15)
ret void
}

LLVM IR (-O2):
define void @movsx_reg32_8preg32pimm32(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 @put8(i32 15)
%5 = tail call i32 @put8(i32 190)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 128
%9 = tail call i32 @put8(i32 %8)
%10 = tail call i32 @put32(i64 %2)
ret void
}
/* Type definitions */
struct src_iter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gt_skip_rest_of_line(struct src_iter *);
void _skip_comment(struct src_iter *it) { gt_skip_rest_of_line(it); }


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

x86 assembly (clang, -O2):
<_skip_comment>:
jmp    1030 <gt_skip_rest_of_line@plt>

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

LLVM IR (-O2):
%struct.src_iter = type { i32 }
define void @_skip_comment(%struct.src_iter* %0) {
%2 = tail call i32 @gt_skip_rest_of_line(%struct.src_iter* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void exitOnMemoryError(void) {
  fprintf(stderr, "Memory alloc error\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Memory alloc error\0A\00"
@EXIT_FAILURE = global i32 0
define void @exitOnMemoryError() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Memory alloc error\0A\00"
@EXIT_FAILURE = global i32 0
define void @exitOnMemoryError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_add(uintptr_t, uintptr_t, uintptr_t);
void fiat_p224_add(uint64_t out1[4], const uint64_t arg1[4],
                   const uint64_t arg2[4]) {
  internal_fiat_p224_add((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
}


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

x86 assembly (clang, -O2):
<fiat_p224_add>:
jmp    1030 <internal_fiat_p224_add@plt>

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

LLVM IR (-O2):
define void @fiat_p224_add(i32* %0, i32* %1, i32* %2) {
%4 = ptrtoint i32* %0 to i64
%5 = ptrtoint i32* %1 to i64
%6 = ptrtoint i32* %2 to i64
%7 = tail call i32 @internal_fiat_p224_add(i64 %4, i64 %5, i64 %6)
ret void
}
int test_imm_D3uint16_reg(unsigned short val) {
  return ((val) & (0xD3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D3uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xd3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D3uint16_reg>:
test   $0xd3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D3uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 211
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_D3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 211
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t malloc_usable_size(void *allocation) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @malloc_usable_size(i8* nocapture readnone %0) {
ret i64 0
}
/* Type definitions */
struct util_dirp {
  int dummy;
};
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
struct dirent *readdir(int /*<<< orphan*/ *);
struct dirent *do_readdir(struct util_dirp *dp) {
  DIR *rdp = (DIR *)dp;
  return readdir(rdp);
}


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

x86 assembly (clang, -O2):
<do_readdir>:
jmp    1030 <readdir@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
%struct.util_dirp = type { i32 }
define %struct.dirent* @do_readdir(%struct.util_dirp* %0) {
%2 = alloca %struct.util_dirp*
%3 = alloca i32*
store %struct.util_dirp* %0, %struct.util_dirp** %2
%4 = load %struct.util_dirp*, %struct.util_dirp** %2
%5 = bitcast %struct.util_dirp* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call %struct.dirent* @readdir(i32* %6)
ret %struct.dirent* %7
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
%struct.util_dirp = type { i32 }
define %struct.dirent* @do_readdir(%struct.util_dirp* %0) {
%2 = getelementptr %struct.util_dirp, %struct.util_dirp* %0, i64 0, i32 0
%3 = tail call %struct.dirent* @readdir(i32* %2)
ret %struct.dirent* %3
}
void thread_func(void) {}


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

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

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

LLVM IR (-O2):
define void @thread_func() {
ret void
}
int init_shm_mallocs(int force_alloc) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_shm_mallocs(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printnum(int);
void main() { printnum(-105146561); }


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

x86 assembly (clang, -O2):
<main>:
mov    $0xf9bb973f,%edi
jmp    1030 <printnum@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @printnum(i32 -105146561)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @printnum(i32 -105146561)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strtoull(char *, int /*<<< orphan*/ *, int);
int main(void) {
  strtoull("10", NULL, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoull@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"10\00"
define i32 @main() {
%1 = tail call i32 @strtoull(i8* nocapture getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
ret i32 0
}