xunge/DecIR huggingface dataset:
/* Variables and functions */
int beta(int);
int alpha(int x, int y, int z) {
  if (x == 0) {
    return x + beta(z - y);
  } else if (x == 1) {
    return x - beta(z - x);
  }
}


x86 assembly (clang, -O0):
<alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    114b <alpha+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
sub    -0xc(%rbp),%edi
call   1030 <beta@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <alpha+0x6a>
cmpl   $0x1,-0x8(%rbp)
jne    1175 <alpha+0x65>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <beta@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <alpha+0x6a>
jmp    117a <alpha+0x6a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alpha>:
cmp    $0x1,%edi
je     1122 <alpha+0x12>
test   %edi,%edi
jne    113a <alpha+0x2a>
sub    %esi,%edx
mov    %edx,%edi
jmp    1030 <beta@plt>
push   %rax
add    $0xffffffff,%edx
mov    %edx,%edi
call   1030 <beta@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @alpha(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %11 [
i32 0, label %4
i32 1, label %7
]
4: ; preds = %3
%5 = sub nsw i32 %2, %1
%6 = tail call i32 @beta(i32 %5)
br label %11
7: ; preds = %3
%8 = add nsw i32 %2, -1
%9 = tail call i32 @beta(i32 %8)
%10 = sub nsw i32 1, %9
br label %11
11: ; preds = %3, %4, %7
%12 = phi i32 [ %6, %4 ], [ %10, %7 ], [ undef, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ center_print(char *, int);
int /*<<< orphan*/ clear_screen(int);
int /*<<< orphan*/ printInt(int, int);
int /*<<< orphan*/ printf(char *, int);
void bsod(int error) {
  clear_screen(0x1f);
  center_print("***PORTOS ERROR***", 0x1f);
  printf("PortOS Encountered an error and needed to stop your computer.", 0x1f);
  printf("\n\nError Code:", 0x1f);
  printInt(error, 0x1f);
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bsod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1f,%edi
call   1060 <clear_screen@plt>
lea    0xea4(%rip),%rdi
mov    $0x1f,%esi
call   1040 <center_print@plt>
lea    0xea6(%rip),%rdi
mov    $0x1f,%esi
call   1050 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x1f,%esi
call   1050 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x1f,%esi
call   1030 <printInt@plt>
jmp    1195 <bsod+0x55>

x86 assembly (clang, -O2):
<bsod>:
push   %rbx
mov    %edi,%ebx
mov    $0x1f,%edi
call   1060 <clear_screen@plt>
lea    0xeac(%rip),%rdi
mov    $0x1f,%esi
call   1040 <center_print@plt>
lea    0xeae(%rip),%rdi
mov    $0x1f,%esi
call   1050 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x1f,%esi
call   1050 <printf@plt>
mov    %ebx,%edi
mov    $0x1f,%esi
call   1030 <printInt@plt>
nopl   0x0(%rax)
jmp    1190 <bsod+0x50>

LLVM IR (-O0):
@.str = [19 x i8] c"***PORTOS ERROR***\00"
@.str.1 = [62 x i8] c"PortOS Encountered an error and needed to stop your computer.\00"
@.str.2 = [14 x i8] c"\0A\0AError Code:\00"
define void @bsod(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @clear_screen(i32 31)
%4 = call i32 @center_print(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 31)
%5 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i32 31)
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 31)
%7 = load i32, i32* %2
%8 = call i32 @printInt(i32 %7, i32 31)
br label %9
9: ; preds = %9, %1
br label %9
}

LLVM IR (-O2):
@.str = [19 x i8] c"***PORTOS ERROR***\00"
@.str.1 = [62 x i8] c"PortOS Encountered an error and needed to stop your computer.\00"
@.str.2 = [14 x i8] c"\0A\0AError Code:\00"
define void @bsod(i32 %0) {
%2 = tail call i32 @clear_screen(i32 31)
%3 = tail call i32 @center_print(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 31)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0), i32 31)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 31)
%6 = tail call i32 @printInt(i32 %0, i32 31)
br label %7
7: ; preds = %7, %1
br label %7
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;
typedef int crc;

/* Variables and functions */
uint16_t _crc_ccitt_update(uint16_t crc, uint8_t data) {
  data ^= ((crc)&0xff);
  data ^= data << 4;
  return ((((uint16_t)data << 8) | ((crc) >> 8)) ^ (uint8_t)(data >> 4) ^
          ((uint16_t)data << 3));
}


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

x86 assembly (clang, -O2):
<_crc_ccitt_update>:
movzbl %dil,%ecx
xor    %esi,%ecx
mov    %ecx,%eax
shl    $0x4,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shl    $0x8,%ecx
sar    $0x8,%edi
or     %edi,%ecx
mov    %eax,%edx
sar    $0x4,%edx
shl    $0x3,%eax
xor    %edx,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_crc_ccitt_update(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = and i32 %5, 255
%7 = load i32, i32* %4
%8 = xor i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = shl i32 %9, 4
%11 = load i32, i32* %4
%12 = xor i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = shl i32 %13, 8
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = or i32 %14, %16
%18 = load i32, i32* %4
%19 = ashr i32 %18, 4
%20 = xor i32 %17, %19
%21 = load i32, i32* %4
%22 = shl i32 %21, 3
%23 = xor i32 %20, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @_crc_ccitt_update(i32 %0, i32 %1) {
%3 = and i32 %0, 255
%4 = xor i32 %3, %1
%5 = shl i32 %4, 4
%6 = xor i32 %5, %4
%7 = shl i32 %6, 8
%8 = ashr i32 %0, 8
%9 = or i32 %7, %8
%10 = ashr i32 %6, 4
%11 = shl i32 %6, 3
%12 = xor i32 %11, %10
%13 = xor i32 %12, %9
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int);
void mbuf_poolname_build(unsigned int sock_id, char *mp_name, int name_size) {
  snprintf(mp_name, name_size, "mbuf_pool_socket_%u", sock_id);
}


x86 assembly (clang, -O0):
<mbuf_poolname_build>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x4(%rbp),%ecx
lea    0xecd(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbuf_poolname_build>:
mov    %edi,%ecx
lea    0xee7(%rip),%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"mbuf_pool_socket_%u\00"
define void @mbuf_poolname_build(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"mbuf_pool_socket_%u\00"
define void @mbuf_poolname_build(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void glUniform1fv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniform1fv() {
ret void
}
int kcompactd_run(int nid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kcompactd_run(i32 %0) {
ret i32 0
}
int gtty(fildes, argp)
int fildes;
char *argp;
{ return ioctl(fildes, (('t' << 8) | 8), argp); }


x86 assembly (clang, -O0):
<gtty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x7408,%esi
mov    $0x0,%al
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtty>:
mov    %rsi,%rdx
mov    $0x7408,%esi
xor    %eax,%eax
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
define i32 @gtty(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 (i32, i32, i8*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i8*, ...)*)(i32 %5, i32 29704, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @gtty(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @ioctl to i32 (i32, i32, i8*, ...)*)(i32 %0, i32 29704, i8* %1)
ret i32 %3
}
unsigned(wcheck_unsigned)(unsigned to_check) { return to_check; }


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

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

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

LLVM IR (-O2):
define i32 @wcheck_unsigned(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
struct vector_char {
  int dummy;
};

/* Variables and functions */
struct vector_char *vector_char_add(struct vector_char *, char const *, int);
struct vector_char *vector_char_add_one_ptr(struct vector_char *v,
                                            const char *p) {
  return vector_char_add(v, p, 1);
}


x86 assembly (clang, -O0):
<vector_char_add_one_ptr>:
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    $0x1,%edx
call   1030 <vector_char_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_char_add_one_ptr>:
mov    $0x1,%edx
jmp    1030 <vector_char_add@plt>

LLVM IR (-O0):
%struct.vector_char = type { i32 }
define %struct.vector_char* @vector_char_add_one_ptr(%struct.vector_char* %0, i8* %1) {
%3 = alloca %struct.vector_char*
%4 = alloca i8*
store %struct.vector_char* %0, %struct.vector_char** %3
store i8* %1, i8** %4
%5 = load %struct.vector_char*, %struct.vector_char** %3
%6 = load i8*, i8** %4
%7 = call %struct.vector_char* @vector_char_add(%struct.vector_char* %5, i8* %6, i32 1)
ret %struct.vector_char* %7
}

LLVM IR (-O2):
%struct.vector_char = type { i32 }
define %struct.vector_char* @vector_char_add_one_ptr(%struct.vector_char* %0, i8* %1) {
%3 = tail call %struct.vector_char* @vector_char_add(%struct.vector_char* %0, i8* %1, i32 1)
ret %struct.vector_char* %3
}
int isEndOfData(char **p) { return (**p == 0); }


x86 assembly (clang, -O0):
<isEndOfData>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEndOfData>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isEndOfData(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void s3c2416_default_sdhci0(void) {}


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

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

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

LLVM IR (-O2):
define void @s3c2416_default_sdhci0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bzero_test_0(int);
int /*<<< orphan*/ memcpy_test_0(int);
int /*<<< orphan*/ mempcpy_test_0(int);
int /*<<< orphan*/ memset_test_0(int);
void test_stringops_0(int len) {
  bzero_test_0(len);
  memcpy_test_0(len);
  mempcpy_test_0(len);
  memset_test_0(len);
}


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

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

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

LLVM IR (-O2):
define void @test_stringops_0(i32 %0) {
%2 = tail call i32 @bzero_test_0(i32 %0)
%3 = tail call i32 @memcpy_test_0(i32 %0)
%4 = tail call i32 @mempcpy_test_0(i32 %0)
%5 = tail call i32 @memset_test_0(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void null_check(const void *p) {
  printf("have to check for NULL\n");
  if (p == NULL) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<null_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
jne    1151 <null_check+0x31>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_check>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
test   %rbx,%rbx
je     1137 <null_check+0x17>
pop    %rbx
ret
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"have to check for NULL\0A\00"
@EXIT_FAILURE = global i32 0
define void @null_check(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [23 x i8] c"have to check for NULL\00"
define void @null_check(i8* readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
float sq_area_diagonal(float);
float sqrt(float);
float sq_perimeter_diagonal(float diagonal) {
  float area = sq_area_diagonal(diagonal);
  float perimeter = sqrt(area);
  return perimeter;
}


x86 assembly (clang, -O0):
<sq_perimeter_diagonal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sq_area_diagonal@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq_perimeter_diagonal>:
push   %rax
call   1030 <sq_area_diagonal@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1134 <sq_perimeter_diagonal+0x14>
sqrtss %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define float @sq_perimeter_diagonal(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @sq_area_diagonal(float %5)
store float %6, float* %3
%7 = load float, float* %3
%8 = call float @sqrt(float %7)
store float %8, float* %4
%9 = load float, float* %4
ret float %9
}

LLVM IR (-O2):
define float @sq_perimeter_diagonal(float %0) {
%2 = tail call float @sq_area_diagonal(float %0)
%3 = tail call float @sqrt(float %2)
ret float %3
}
float calc_error(const float a, const float b) {
  return 0.5f * (a - b) * (a - b);
}


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

x86 assembly (clang, -O2):
<calc_error>:
subss  %xmm1,%xmm0
movss  0xef4(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calc_error(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fsub float %5, %6
%8 = fmul float 5.000000e-01, %7
%9 = load float, float* %3
%10 = load float, float* %4
%11 = fsub float %9, %10
%12 = fmul float %8, %11
ret float %12
}

LLVM IR (-O2):
define float @calc_error(float %0, float %1) {
%3 = fsub float %0, %1
%4 = fmul float %3, 5.000000e-01
%5 = fmul float %3, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void quit(int n) { exit(n); }


x86 assembly (clang, -O0):
<quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<quit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @quit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ mock_called_with(char const *, int /*<<< orphan*/ *);
void mock_called(const char *fnc) { mock_called_with(fnc, NULL); }


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

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

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

LLVM IR (-O2):
define void @mock_called(i8* %0) {
%2 = tail call i32 @mock_called_with(i8* %0, i32* null)
ret void
}
int msm8976_cpu_ldo_config(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm8976_cpu_ldo_config(i32 %0) {
ret i32 0
}
/* Variables and functions */
char const *weak_n2();
const char *__attribute__((section(".test.b"))) sibcall_weak_n2(void) {
  return weak_n2();
}


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

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

LLVM IR (-O0):
define i8* @sibcall_weak_n2() section ".test.b" {
%1 = call i8* (...) @weak_n2()
ret i8* %1
}

LLVM IR (-O2):
define i8* @sibcall_weak_n2() section ".test.b" {
%1 = tail call i8* (...) @weak_n2()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main() {
  printf("%s\n", "some text");
  printf("strlen: %lu\n", strlen("some text"));
  printf("STRLENOF: %lu\n", (sizeof("some text") - 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x9,%esi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    0xebb(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [10 x i8] c"some text\00"
@.str.2 = [13 x i8] c"strlen: %lu\0A\00"
@.str.3 = [15 x i8] c"STRLENOF: %lu\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i64 9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"some text\00"
@.str.2 = [13 x i8] c"strlen: %lu\0A\00"
@.str.3 = [15 x i8] c"STRLENOF: %lu\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i64 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
void cx_UnsignedLongInt_print(unsigned long int *const value) {
  printf("%luUL", *value);
}


x86 assembly (clang, -O0):
<cx_UnsignedLongInt_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cx_UnsignedLongInt_print>:
mov    (%rdi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%luUL\00"
define void @cx_UnsignedLongInt_print(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%luUL\00"
define void @cx_UnsignedLongInt_print(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
/* Variables and functions */
int dwarf_get_FORM_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_FORM_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_FORM_name(val_in, &v);
  return ellipname(res, val_in, v, "FORM", printonerr);
}


x86 assembly (clang, -O0):
<get_FORM_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1030 <dwarf_get_FORM_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1040 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_FORM_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1030 <dwarf_get_FORM_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1040 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"FORM\00"
define i8* @get_FORM_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_FORM_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"FORM\00"
define i8* @get_FORM_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_FORM_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exitFatal(char *, int);
scalar_t__ inet_aton(char *, struct in_addr *);
int /*<<< orphan*/ readStringExpanded(char *, int, int);
void readIp(struct in_addr *ip) {
  char buffer[1024];
  (void)readStringExpanded(buffer, sizeof buffer, 0x10u);
  ;
  if (inet_aton(buffer, ip) == 0)
    exitFatal("Invalid IP", sizeof("Invalid IP") - 1);
}


x86 assembly (clang, -O0):
<readIp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    $0x400,%esi
mov    $0x10,%edx
call   1050 <readStringExpanded@plt>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <inet_aton@plt>
cmp    $0x0,%rax
jne    1180 <readIp+0x50>
lea    0xe8a(%rip),%rdi
mov    $0xa,%esi
call   1030 <exitFatal@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readIp>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x400,%esi
mov    $0x10,%edx
call   1050 <readStringExpanded@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <inet_aton@plt>
test   %rax,%rax
jne    1173 <readIp+0x43>
lea    0xe97(%rip),%rdi
mov    $0xa,%esi
call   1030 <exitFatal@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [11 x i8] c"Invalid IP\00"
define void @readIp(%struct.in_addr* %0) {
%2 = alloca %struct.in_addr*
%3 = alloca [1024 x i8]
store %struct.in_addr* %0, %struct.in_addr** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @readStringExpanded(i8* %4, i32 1024, i32 16)
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = load %struct.in_addr*, %struct.in_addr** %2
%8 = call i64 @inet_aton(i8* %6, %struct.in_addr* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @exitFatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
br label %12
12: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [11 x i8] c"Invalid IP\00"
define void @readIp(%struct.in_addr* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @readStringExpanded(i8* %3, i32 1024, i32 16)
%5 = call i64 @inet_aton(i8* %3, %struct.in_addr* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @exitFatal(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void ctrl_c_handler(int s) {
  (void)s;
  exit(0);
}


x86 assembly (clang, -O0):
<ctrl_c_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

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

LLVM IR (-O2):
define void @ctrl_c_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
void lidt(const void *idtr) { __asm("lidt (%0)" ::"r"(idtr) : "memory"); }


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

x86 assembly (clang, -O2):
<lidt>:
lidt   (%rdi)
ret

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

LLVM IR (-O2):
define void @lidt(i8* %0) {
tail call void asm sideeffect "lidt ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *,
                           char *);
void show_version(FILE *stream, int exit_code, char *arg0) {
  fprintf(stream, "(%s) %s version %s\n", arg0, "DES O'Dict", "1.0");
  exit(exit_code);
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xebe(%rip),%rsi
lea    0xecb(%rip),%rcx
lea    0xecf(%rip),%r8
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_version>:
push   %rbx
mov    %esi,%ebx
lea    0xed6(%rip),%rsi
lea    0xee3(%rip),%rcx
lea    0xee7(%rip),%r8
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"(%s) %s version %s\0A\00"
@.str.1 = [11 x i8] c"DES O'Dict\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @show_version(i32* %0, i32 %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %6
%9 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* %5
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [20 x i8] c"(%s) %s version %s\0A\00"
@.str.1 = [11 x i8] c"DES O'Dict\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @show_version(i32* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
scalar_t__ isSpecial(char const *);
int checkForDot(int lookupflags, const char *name) {
  return (lookupflags & 0x100) && isSpecial(name);
}


x86 assembly (clang, -O0):
<checkForDot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x100,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1149 <checkForDot+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <isSpecial@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkForDot>:
xor    %eax,%eax
test   $0x100,%edi
je     1132 <checkForDot+0x22>
push   %rax
mov    %rsi,%rdi
call   1030 <isSpecial@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @checkForDot(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 = and i32 %5, 256
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i64 @isSpecial(i8* %9)
%11 = icmp ne i64 %10, 0
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ false, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @checkForDot(i32 %0, i8* %1) {
%3 = and i32 %0, 256
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i64 @isSpecial(i8* %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
int is_graphic_alphanumeric(char *buf) {
  int result = 0;
  if (((unsigned char)*(buf + 2) * 0x100 + (unsigned char)*((buf + 2) + 1)) ==
      2)
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<is_graphic_alphanumeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
add    %ecx,%eax
cmp    $0x2,%eax
jne    1134 <is_graphic_alphanumeric+0x34>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_graphic_alphanumeric>:
movzwl 0x2(%rdi),%ecx
shl    $0x10,%ecx
bswap  %ecx
xor    %eax,%eax
cmp    $0x2,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @is_graphic_alphanumeric(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = mul nsw i32 %7, 256
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = add nsw i32 %8, %13
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %1
store i32 1, i32* %3
br label %17
17: ; preds = %16, %1
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_graphic_alphanumeric(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %5, %8
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void main() {
  printf("Icaro Harry\n");
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
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):
<main>:
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Icaro Harry\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define void @main() {
%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 ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@str = [12 x i8] c"Icaro Harry\00"
define void @main() {
%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 ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int isnum(char *str) {
  char c;
  int i = 0;
  while ((c = str[i++]) != '\0')
    if (!isdigit(c))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     116a <isnum+0x5a>
movsbl -0x11(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1165 <isnum+0x55>
movl   $0x0,-0x4(%rbp)
jmp    1171 <isnum+0x61>
jmp    1123 <isnum+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnum>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     113b <isnum+0x2b>
movsbl %al,%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <isnum+0x10>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isnum(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = add nuw i64 %3, 1
%9 = tail call i32 @isdigit(i8 signext %5)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %7
%12 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %12
}
/* Variables and functions */
int get_size_pre_l2(int);
int get_end_pre_l2(int port) { return get_size_pre_l2(port); }


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

x86 assembly (clang, -O2):
<get_end_pre_l2>:
jmp    1030 <get_size_pre_l2@plt>

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

LLVM IR (-O2):
define i32 @get_end_pre_l2(i32 %0) {
%2 = tail call i32 @get_size_pre_l2(i32 %0)
ret i32 %2
}
void TimPro(void) {}


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

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

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

LLVM IR (-O2):
define void @TimPro() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cross_product(double const *, double const *, double *);
int /*<<< orphan*/ multiply_vectors(double const *, double *, double *);
void scalar_triple_product(const double *u, const double *v, const double *w,
                           double *out) {
  cross_product(v, w, out);
  multiply_vectors(u, out, out);
}


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

x86 assembly (clang, -O2):
<scalar_triple_product>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <cross_product@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <multiply_vectors@plt>

LLVM IR (-O0):
define void @scalar_triple_product(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %6
%10 = load double*, double** %7
%11 = load double*, double** %8
%12 = call i32 @cross_product(double* %9, double* %10, double* %11)
%13 = load double*, double** %5
%14 = load double*, double** %8
%15 = load double*, double** %8
%16 = call i32 @multiply_vectors(double* %13, double* %14, double* %15)
ret void
}

LLVM IR (-O2):
define void @scalar_triple_product(double* %0, double* %1, double* %2, double* %3) {
%5 = tail call i32 @cross_product(double* %1, double* %2, double* %3)
%6 = tail call i32 @multiply_vectors(double* %0, double* %3, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void child_handler(int sig) { printf("I got a SIGCHLD\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"I got a SIGCHLD\0A\00"
define void @child_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"I got a SIGCHLD\00"
define void @child_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XShapeCombineRectangles() {
  printf("XShapeCombineRectangles called\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<XShapeCombineRectangles>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [31 x i8] c"XShapeCombineRectangles called\00"
define i32 @XShapeCombineRectangles() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
long double log10(long double);
long double log10l(long double x) { return log10(x); }


x86 assembly (clang, -O0):
<log10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log10@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10l>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = tail call x86_fp80 @log10(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ IPNumber(char *);
int /*<<< orphan*/ IPv4CIDR(char *);
int /*<<< orphan*/ IPv4Range(char *);
scalar_t__ strchr(char *, char);
char *IPv4All(char *cInput) {
  if (strchr(cInput, '-'))
    IPv4Range(cInput);
  else if (strchr(cInput, '/'))
    IPv4CIDR(cInput);
  else if (1)
    IPNumber(cInput);
  return (cInput);
}


x86 assembly (clang, -O0):
<IPv4All>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2d,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     1172 <IPv4All+0x32>
mov    -0x8(%rbp),%rdi
call   1030 <IPv4Range@plt>
jmp    11a6 <IPv4All+0x66>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     1198 <IPv4All+0x58>
mov    -0x8(%rbp),%rdi
call   1060 <IPv4CIDR@plt>
jmp    11a1 <IPv4All+0x61>
mov    -0x8(%rbp),%rdi
call   1040 <IPNumber@plt>
jmp    11a6 <IPv4All+0x66>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IPv4All>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2d,%esi
call   1050 <strchr@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     115d <IPv4All+0x1d>
call   1030 <IPv4Range@plt>
jmp    117b <IPv4All+0x3b>
mov    $0x2f,%esi
call   1050 <strchr@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1176 <IPv4All+0x36>
call   1060 <IPv4CIDR@plt>
jmp    117b <IPv4All+0x3b>
call   1040 <IPNumber@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @IPv4All(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strchr(i8* %3, i8 signext 45)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @IPv4Range(i8* %7)
br label %20
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i64 @strchr(i8* %10, i8 signext 47)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i8*, i8** %2
%15 = call i32 @IPv4CIDR(i8* %14)
br label %19
16: ; preds = %9
%17 = load i8*, i8** %2
%18 = call i32 @IPNumber(i8* %17)
br label %19
19: ; preds = %16, %13
br label %20
20: ; preds = %19, %6
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @IPv4All(i8* returned %0) {
%2 = tail call i64 @strchr(i8* %0, i8 signext 45)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @IPv4Range(i8* %0)
br label %13
6: ; preds = %1
%7 = tail call i64 @strchr(i8* %0, i8 signext 47)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @IPv4CIDR(i8* %0)
br label %13
11: ; preds = %6
%12 = tail call i32 @IPNumber(i8* %0)
br label %13
13: ; preds = %9, %11, %4
ret i8* %0
}