xunge/DecIR huggingface dataset:
/* Type definitions */
struct mat3 {
  int dummy;
};
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat3_assign_mat2(float *, float *);
__attribute__((always_)) struct mat3 *psmat3_assign_mat2(struct mat3 *result,
                                                         struct mat2 *m) {
  mat3_assign_mat2((float *)result, (float *)m);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat3_assign_mat2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat3_assign_mat2@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat3 = type { i32 }
%struct.mat2 = type { i32 }
define %struct.mat3* @psmat3_assign_mat2(%struct.mat3* %0, %struct.mat2* %1) {
%3 = alloca %struct.mat3*
%4 = alloca %struct.mat2*
store %struct.mat3* %0, %struct.mat3** %3
store %struct.mat2* %1, %struct.mat2** %4
%5 = load %struct.mat3*, %struct.mat3** %3
%6 = bitcast %struct.mat3* %5 to float*
%7 = load %struct.mat2*, %struct.mat2** %4
%8 = bitcast %struct.mat2* %7 to float*
%9 = call i32 @mat3_assign_mat2(float* %6, float* %8)
%10 = load %struct.mat3*, %struct.mat3** %3
ret %struct.mat3* %10
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
%struct.mat2 = type { i32 }
define %struct.mat3* @psmat3_assign_mat2(%struct.mat3* returned %0, %struct.mat2* %1) {
%3 = bitcast %struct.mat3* %0 to float*
%4 = bitcast %struct.mat2* %1 to float*
%5 = tail call i32 @mat3_assign_mat2(float* %3, float* %4)
ret %struct.mat3* %0
}
/* Variables and functions */
size_t oui_append_2o(unsigned char *cp, const unsigned short data) {
  *cp = (data >> 8) & 0xff;
  *(cp + 1) = data & 0xff;
  return 2;
}


x86 assembly (clang, -O0):
<oui_append_2o>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<oui_append_2o>:
rol    $0x8,%si
mov    %si,(%rdi)
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i64 @oui_append_2o(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret i64 2
}

LLVM IR (-O2):
define i64 @oui_append_2o(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret i64 2
}
/* Variables and functions */
int evaluateArray(char, int, int);
int /*<<< orphan*/ initializeOperationsArray();
int /*<<< orphan*/ printf(char *, int);
int main() {
  initializeOperationsArray();
  printf("%d\n", evaluateArray('+', 5, 6));
  printf("%d\n", evaluateArray('-', 5, 6));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initializeOperationsArray@plt>
mov    $0x2b,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1050 <evaluateArray@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2d,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1050 <evaluateArray@plt>
mov    %eax,%esi
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <initializeOperationsArray@plt>
mov    $0x2b,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1050 <evaluateArray@plt>
lea    0xead(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x2d,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1050 <evaluateArray@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initializeOperationsArray()
%3 = call i32 @evaluateArray(i8 signext 43, i32 5, i32 6)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @evaluateArray(i8 signext 45, i32 5, i32 6)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @initializeOperationsArray()
%2 = tail call i32 @evaluateArray(i8 signext 43, i32 5, i32 6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @evaluateArray(i8 signext 45, i32 5, i32 6)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ftello(int /*<<< orphan*/ *);
uint64_t file_get_pos(FILE *stream) { return ftello(stream); }


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

x86 assembly (clang, -O2):
<file_get_pos>:
jmp    1030 <ftello@plt>

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

LLVM IR (-O2):
define i32 @file_get_pos(i32* nocapture %0) {
%2 = tail call i32 @ftello(i32* %0)
ret i32 %2
}
/* Variables and functions */
bool read_hex_iso88591(char const **const src, char **const dst) {
  return false;
}


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

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

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

LLVM IR (-O2):
define i32 @read_hex_iso88591(i8** nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char toupper(char);
char cMay(char letra) {
  letra = toupper(letra);
  return letra;
}


x86 assembly (clang, -O0):
<cMay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cMay>:
jmp    1030 <toupper@plt>

LLVM IR (-O0):
define signext i8 @cMay(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call signext i8 @toupper(i8 signext %3)
store i8 %4, i8* %2
%5 = load i8, i8* %2
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @cMay(i8 signext %0) {
%2 = tail call signext i8 @toupper(i8 signext %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() { f(4294967295); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @f(i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 -1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t decode_opcode(uint32_t instruction) { return instruction >> 26; }


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

x86 assembly (clang, -O2):
<decode_opcode>:
mov    %edi,%eax
sar    $0x1a,%eax
ret

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

LLVM IR (-O2):
define i32 @decode_opcode(i32 %0) {
%2 = ashr i32 %0, 26
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hline() {
  printf("------------------------------------------------------- --- -> >\n");
}


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

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

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

LLVM IR (-O2):
@str = [65 x i8] c"------------------------------------------------------- --- -> >\00"
define void @hline() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
ret void
}
__attribute__((always_)) struct mempolicy *
mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.mempolicy = type opaque
%struct.shared_policy = type opaque
define %struct.mempolicy* @mpol_shared_policy_lookup(%struct.shared_policy* %0, i64 %1) {
%3 = alloca %struct.shared_policy*
%4 = alloca i64
store %struct.shared_policy* %0, %struct.shared_policy** %3
store i64 %1, i64* %4
ret %struct.mempolicy* null
}

LLVM IR (-O2):
%struct.mempolicy = type opaque
%struct.shared_policy = type opaque
define noalias %struct.mempolicy* @mpol_shared_policy_lookup(%struct.shared_policy* nocapture readnone %0, i64 %1) {
ret %struct.mempolicy* null
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t lp_read_u32_be(void *p) {
  uint8_t *s = (uint8_t *)p;
  uint32_t v = s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3];
  return v;
}


x86 assembly (clang, -O0):
<lp_read_u32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     0xc(%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lp_read_u32_be>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @lp_read_u32_be(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 12
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ find(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char haystack[400];
  char needle;
  scanf("%[^\n]s", haystack);
  scanf("\n %c", &needle);
  find(haystack, needle);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
lea    -0x190(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
lea    -0x191(%rbp),%rsi
call   1040 <scanf@plt>
lea    -0x190(%rbp),%rdi
movsbl -0x191(%rbp),%esi
call   1030 <find@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1a0,%rsp
lea    0xed1(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
call   1030 <find@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [5 x i8] c"\0A %c\00"
define i32 @main() {
%1 = alloca [400 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [400 x i8], [400 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = load i8, i8* %2
%7 = call i32 @find(i8* %3, i8 signext %6)
ret i32 0
}
/* Variables and functions */
double exp(double);
double genann_act_sigmoid(double a) {
  if (a < -45.0)
    return 0.0;
  if (a > 45.0)
    return 1.0;
  return 1.0 / (1.0 + exp(-a));
}


x86 assembly (clang, -O0):
<genann_act_sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <genann_act_sigmoid+0x2d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a4 <genann_act_sigmoid+0x94>
movsd  -0x10(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1166 <genann_act_sigmoid+0x56>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a4 <genann_act_sigmoid+0x94>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  0xe81(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe75(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genann_act_sigmoid>:
push   %rax
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
movsd  0xedf(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     1160 <genann_act_sigmoid+0x50>
ucomisd 0xee1(%rip),%xmm1
jbe    113b <genann_act_sigmoid+0x2b>
movsd  0xecf(%rip),%xmm0
pop    %rax
ret
xorpd  0xedd(%rip),%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm1
movsd  0xeb0(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genann_act_sigmoid(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, -4.500000e+01
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %17
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp ogt double %8, 4.500000e+01
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e+00, double* %2
br label %17
11: ; preds = %7
%12 = load double, double* %3
%13 = fneg double %12
%14 = call double @exp(double %13)
%15 = fadd double 1.000000e+00, %14
%16 = fdiv double 1.000000e+00, %15
store double %16, double* %2
br label %17
17: ; preds = %11, %10, %6
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @genann_act_sigmoid(double %0) {
%2 = fcmp olt double %0, -4.500000e+01
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = fcmp ogt double %0, 4.500000e+01
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = fneg double %0
%7 = tail call double @exp(double %6)
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double 1.000000e+00, %8
br label %10
10: ; preds = %3, %1, %5
%11 = phi double [ %9, %5 ], [ 0.000000e+00, %1 ], [ 1.000000e+00, %3 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int, size_t);
__attribute__((weak)) void __aeabi_memset(void *dest, size_t count, int value) {
  memset(dest, value, count);
}


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

x86 assembly (clang, -O2):
<__aeabi_memset>:
mov    %rsi,%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define weak void @__aeabi_memset(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 %2, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pal_col(int, int);
void dungeon_red() { pal_col(1, 0x16); }


x86 assembly (clang, -O0):
<dungeon_red>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x16,%esi
call   1030 <pal_col@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dungeon_red>:
mov    $0x1,%edi
mov    $0x16,%esi
jmp    1030 <pal_col@plt>

LLVM IR (-O0):
define void @dungeon_red() {
%1 = call i32 @pal_col(i32 1, i32 22)
ret void
}

LLVM IR (-O2):
define void @dungeon_red() {
%1 = tail call i32 @pal_col(i32 1, i32 22)
ret void
}
int fn4(int x, int y) {
  int tem1 = y | x;
  int tem2 = y ^ ~x;
  return tem1 & tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = xor i32 %11, -1
%13 = xor i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ sys_errmsg_die(char *);
__attribute__((unused)) void *xcalloc(size_t nmemb, size_t size) {
  void *ptr = calloc(nmemb, size);
  if (ptr == NULL && nmemb != 0 && size != 0)
    sys_errmsg_die("out of memory");
  return ptr;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116e <xcalloc+0x4e>
cmpq   $0x0,-0x8(%rbp)
je     116e <xcalloc+0x4e>
cmpq   $0x0,-0x10(%rbp)
je     116e <xcalloc+0x4e>
lea    0xe97(%rip),%rdi
call   1040 <sys_errmsg_die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     114e <xcalloc+0x2e>
test   %r15,%r15
je     114e <xcalloc+0x2e>
test   %r14,%r14
jne    114e <xcalloc+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <sys_errmsg_die@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i64, i64* %3
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i64, i64* %4
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @sys_errmsg_die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %14, %11, %2
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %0, 0
%6 = and i1 %5, %4
%7 = icmp ne i64 %1, 0
%8 = and i1 %7, %6
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @sys_errmsg_die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
ret i8* %3
}
int execute_sync() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sync() {
ret i32 0
}
long add_long(long arg1, long arg2) { return arg1 + arg2; }


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

x86 assembly (clang, -O2):
<add_long>:
lea    (%rdi,%rsi,1),%rax
ret

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

LLVM IR (-O2):
define i64 @add_long(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}
char inc(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<inc>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @inc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = trunc i32 %4 to i8
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @inc(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = add i8 %2, 1
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ MAIN__();
int dblat3_() {
  MAIN__();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @dblat3_() {
%1 = call i32 (...) @MAIN__()
ret i32 0
}

LLVM IR (-O2):
define i32 @dblat3_() {
%1 = tail call i32 (...) @MAIN__()
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int f();
int /*<<< orphan*/ puts(char *);
int do_test(void) {
  int lose;
  lose = f();
  if (lose)
    puts("Test FAILED!");
  else
    puts("Test succeeded!");
  return lose ? EXIT_FAILURE : EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<do_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114d <do_test+0x2d>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
jmp    1159 <do_test+0x39>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0x4(%rbp)
je     1174 <do_test+0x54>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
jmp    1180 <do_test+0x60>
mov    0x2e5d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test>:
push   %rbx
xor    %eax,%eax
call   1040 <f@plt>
test   %eax,%eax
lea    0xedc(%rip),%rax
lea    0xec8(%rip),%rdi
cmove  %rax,%rdi
mov    0x2e9d(%rip),%rbx
cmove  0x2e8d(%rip),%rbx
call   1030 <puts@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Test FAILED!\00"
@.str.1 = [16 x i8] c"Test succeeded!\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @do_test() {
%1 = alloca i32
%2 = call i32 (...) @f()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* @EXIT_FAILURE
br label %16
14: ; preds = %9
%15 = load i32, i32* @EXIT_SUCCESS
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
ret i32 %17
}

LLVM IR (-O2):
@.str = [13 x i8] c"Test FAILED!\00"
@.str.1 = [16 x i8] c"Test succeeded!\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @do_test() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @EXIT_SUCCESS
%7 = select i1 %2, i32 %6, i32 %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void indent(int n) {
  while (n-- > 0) {
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    1140 <indent+0x30>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    111b <indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent>:
push   %rbx
test   %edi,%edi
jle    1132 <indent+0x22>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <indent+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @indent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @indent(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i32 32)
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
void x400pconf_cfg(int argc, char *argv[]) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @x400pconf_cfg(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int matedialogPresent() {
  static int lMatedialogPresent = -1;
  if (lMatedialogPresent < 0) {
    lMatedialogPresent = detectPresence("matedialog");
  }
  return lMatedialogPresent && graphicMode();
}


x86 assembly (clang, -O0):
<matedialogPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <matedialogPresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <matedialogPresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matedialogPresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <matedialogPresent+0x23>
test   %eax,%eax
je     1159 <matedialogPresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <matedialogPresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@matedialogPresent.lMatedialogPresent = internal global i32 -1
@.str = [11 x i8] c"matedialog\00"
define i32 @matedialogPresent() {
%1 = load i32, i32* @matedialogPresent.lMatedialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @matedialogPresent.lMatedialogPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @matedialogPresent.lMatedialogPresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@matedialogPresent.lMatedialogPresent = internal unnamed_addr global i32 -1
@.str = [11 x i8] c"matedialog\00"
define i32 @matedialogPresent() {
%1 = load i32, i32* @matedialogPresent.lMatedialogPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @matedialogPresent.lMatedialogPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
void hlt() { __asm__ __volatile__("hlt"); }


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

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

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

LLVM IR (-O2):
define void @hlt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned long SysCtlLDOGet(void) {
  return ((*((volatile unsigned long *)(0x400FE034))));
}


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

x86 assembly (clang, -O2):
<SysCtlLDOGet>:
mov    0x400fe034,%rax
40
ret

LLVM IR (-O0):
define i64 @SysCtlLDOGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782260 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @SysCtlLDOGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782260 to i64*)
ret i64 %1
}
void acpi_dock_add(struct acpi_device *adev) {}


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

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

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

LLVM IR (-O2):
%struct.acpi_device = type opaque
define void @acpi_dock_add(%struct.acpi_device* nocapture %0) {
ret void
}
long grib_op_neg(long a) { return -a; }


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

x86 assembly (clang, -O2):
<grib_op_neg>:
mov    %rdi,%rax
neg    %rax
ret

LLVM IR (-O0):
define i64 @grib_op_neg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @grib_op_neg(i64 %0) {
%2 = sub nsw i64 0, %0
ret i64 %2
}
void NullTextC(struct ADrawTag *ctx __attribute__((unused)),
               unsigned int x __attribute__((unused)),
               unsigned int y __attribute__((unused)),
               const char *string __attribute__((unused)),
               const char *url __attribute__((unused))) {}


x86 assembly (clang, -O0):
<NullTextC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ADrawTag = type opaque
define void @NullTextC(%struct.ADrawTag* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca %struct.ADrawTag*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store %struct.ADrawTag* %0, %struct.ADrawTag** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type opaque
define void @NullTextC(%struct.ADrawTag* nocapture %0, i32 %1, i32 %2, i8* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exfun_frame();
int /*<<< orphan*/ new_prof_frame(int);
void exfun_frame_sp(void) {
  exfun_frame();
  new_prof_frame(1);
}


x86 assembly (clang, -O0):
<exfun_frame_sp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <exfun_frame@plt>
mov    $0x1,%edi
call   1030 <new_prof_frame@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exfun_frame_sp>:
push   %rax
xor    %eax,%eax
call   1040 <exfun_frame@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <new_prof_frame@plt>

LLVM IR (-O0):
define void @exfun_frame_sp() {
%1 = call i32 (...) @exfun_frame()
%2 = call i32 @new_prof_frame(i32 1)
ret void
}

LLVM IR (-O2):
define void @exfun_frame_sp() {
%1 = tail call i32 (...) @exfun_frame()
%2 = tail call i32 @new_prof_frame(i32 1)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long time;
};
struct TYPE_4__ {
  TYPE_1__ xkey;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xkey_time(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xkey.time = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xkey_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xkey_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void network_suspend(void) {}


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

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

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

LLVM IR (-O2):
define void @network_suspend() {
ret void
}
void __exit(code) int code;
{ _exit(code); }


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

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

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

LLVM IR (-O2):
define void @__exit(i32 %0) {
tail call void @_exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t tp_to_pcap_tsource(uint32_t status) {
  if (status & (1 << 31))
    return 3;
  else if (status & (1 << 30))
    return 2;
  else if (status & (1 << 29))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<tp_to_pcap_tsource>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     1124 <tp_to_pcap_tsource+0x24>
movl   $0x3,-0x4(%rbp)
jmp    1165 <tp_to_pcap_tsource+0x65>
mov    -0x8(%rbp),%eax
and    $0x40000000,%eax
cmp    $0x0,%eax
je     1141 <tp_to_pcap_tsource+0x41>
movl   $0x2,-0x4(%rbp)
jmp    1165 <tp_to_pcap_tsource+0x65>
mov    -0x8(%rbp),%eax
and    $0x20000000,%eax
cmp    $0x0,%eax
je     115e <tp_to_pcap_tsource+0x5e>
movl   $0x1,-0x4(%rbp)
jmp    1165 <tp_to_pcap_tsource+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp_to_pcap_tsource>:
test   %edi,%edi
js     111a <tp_to_pcap_tsource+0x1a>
mov    $0x2,%eax
test   $0x40000000,%edi
jne    1119 <tp_to_pcap_tsource+0x19>
shr    $0x1d,%edi
and    $0x1,%edi
mov    %edi,%eax
ret
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @tp_to_pcap_tsource(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, -2147483648
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 3, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 1073741824
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %2
br label %19
13: ; preds = %8
%14 = load i32, i32* %3
%15 = and i32 %14, 536870912
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @tp_to_pcap_tsource(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = and i32 %0, 1073741824
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = lshr i32 %0, 29
%8 = and i32 %7, 1
br label %9
9: ; preds = %6, %3, %1
%10 = phi i32 [ 3, %1 ], [ 2, %3 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ putc(char);
void puts(char *s) {
  char c;
  while ((c = *(s++))) {
    putc(c);
  }
  return;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
cmp    $0x0,%al
je     1146 <puts+0x36>
movsbl -0x9(%rbp),%edi
call   1030 <putc@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @putc(i8 signext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int test_imm_CEuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xCE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CEuint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xce,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CEuint64_midword_mem>:
testb  $0xce,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CEuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 13500416
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long BlDepth(long col) {
  long current, depth;
  extern long *T;
  depth = 0;
  current = col;
  while (T[current] != current) {
    current = T[current];
    depth++;
  }
  return (depth);
}


x86 assembly (clang, -O0):
<BlDepth>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmp    -0x10(%rbp),%rax
je     115b <BlDepth+0x5b>
mov    0x2ea5(%rip),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <BlDepth+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BlDepth>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rcx
mov    $0xffffffffffffffff,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rcx,%rdi,8),%rdx
add    $0x1,%rax
cmp    %rdi,%rdx
mov    %rdx,%rdi
jne    1120 <BlDepth+0x20>
ret

LLVM IR (-O0):
@T = external global i64*
define i64 @BlDepth(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %4
%5 = load i64, i64* %2
store i64 %5, i64* %3
br label %6
6: ; preds = %13, %1
%7 = load i64*, i64** @T
%8 = load i64, i64* %3
%9 = getelementptr inbounds i64, i64* %7, i64 %8
%10 = load i64, i64* %9
%11 = load i64, i64* %3
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %20
13: ; preds = %6
%14 = load i64*, i64** @T
%15 = load i64, i64* %3
%16 = getelementptr inbounds i64, i64* %14, i64 %15
%17 = load i64, i64* %16
store i64 %17, i64* %3
%18 = load i64, i64* %4
%19 = add nsw i64 %18, 1
store i64 %19, i64* %4
br label %6
20: ; preds = %6
%21 = load i64, i64* %4
ret i64 %21
}

LLVM IR (-O2):
@T = external global i64*
define i64 @BlDepth(i64 %0) {
%2 = load i64*, i64** @T
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %0, %1 ], [ %7, %3 ]
%5 = phi i64 [ 0, %1 ], [ %9, %3 ]
%6 = getelementptr inbounds i64, i64* %2, i64 %4
%7 = load i64, i64* %6
%8 = icmp eq i64 %7, %4
%9 = add nuw nsw i64 %5, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i64 %5
}
/* Variables and functions */
void *pattern_search(void const *, int, int, int, int);
void *ldr_search_up(const void *start_addr, int len) {
  return pattern_search(start_addr, len, 0x00004800, 0x0000F800, -1);
}


x86 assembly (clang, -O0):
<ldr_search_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x4800,%edx
mov    $0xf800,%ecx
mov    $0xffffffff,%r8d
call   1030 <pattern_search@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldr_search_up>:
mov    $0x4800,%edx
mov    $0xf800,%ecx
mov    $0xffffffff,%r8d
jmp    1030 <pattern_search@plt>

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

LLVM IR (-O2):
define i8* @ldr_search_up(i8* %0, i32 %1) {
%3 = tail call i8* @pattern_search(i8* %0, i32 %1, i32 18432, i32 63488, i32 -1)
ret i8* %3
}
/* Type definitions */
struct event_loop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void beat3000(struct event_loop *loop, int id, void *data) {
  printf("heartbeat every 3s\n");
}


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

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

LLVM IR (-O0):
%struct.event_loop = type { i32 }
@.str = [20 x i8] c"heartbeat every 3s\0A\00"
define void @beat3000(%struct.event_loop* %0, i32 %1, i8* %2) {
%4 = alloca %struct.event_loop*
%5 = alloca i32
%6 = alloca i8*
store %struct.event_loop* %0, %struct.event_loop** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.event_loop = type { i32 }
@str = [19 x i8] c"heartbeat every 3s\00"
define void @beat3000(%struct.event_loop* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printIncSeq(int, int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, m;
  scanf("%d"
        "%d",
        &n, &m);
  int b[50];
  printIncSeq(n, m, 0, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
lea    -0xe0(%rbp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xd8,%rsp
lea    0xed2(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rcx
xor    %edx,%edx
call   1040 <printIncSeq@plt>
xor    %eax,%eax
add    $0xd8,%rsp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [50 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%7 = bitcast [50 x i32]* %3 to i8*
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%11 = call i32 @printIncSeq(i32 %8, i32 %9, i32 0, i32* %10)
ret i32 0
}