xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ puts(char *);
void error(char *msg) {
  puts(msg);
  abort();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @puts(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 (...) @abort()
unreachable
}
unsigned int ALIGN_POWER2(unsigned int u) {
  return 1 << ((sizeof(u) * 8) - __builtin_clz(u - 1));
}


x86 assembly (clang, -O0):
<ALIGN_POWER2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
bsr    %eax,%eax
xor    $0x1f,%eax
movslq %eax,%rcx
mov    $0x20,%eax
sub    %rcx,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ALIGN_POWER2>:
add    $0xffffffff,%edi
bsr    %edi,%ecx
xor    $0x1f,%ecx
neg    %cl
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @ALIGN_POWER2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 1
%5 = call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%6 = sext i32 %5 to i64
%7 = sub i64 32, %6
%8 = trunc i64 %7 to i32
%9 = shl i32 1, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ALIGN_POWER2(i32 %0) {
%2 = add i32 %0, -1
%3 = tail call i32 @llvm.ctlz.i32(i32 %2, i1 true)
%4 = sub nuw nsw i32 32, %3
%5 = shl nuw i32 1, %4
ret i32 %5
}
int test_imm_89int16_mem(short *val) {
  return ((*val) & (-0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffff77,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89int16_mem>:
movzwl (%rdi),%eax
test   $0xff77,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_89int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -137
%7 = icmp ne i32 %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_89int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -137
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ newblock(double, double);
void vskip(double gap) { newblock(gap, 0.0); }


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

x86 assembly (clang, -O2):
<vskip>:
xorps  %xmm1,%xmm1
jmp    1030 <newblock@plt>

LLVM IR (-O0):
define void @vskip(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @newblock(double %3, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @vskip(double %0) {
%2 = tail call i32 @newblock(double %0, double 0.000000e+00)
ret void
}
/* Type definitions */
struct vec4i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec4i_divide(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                int /*<<< orphan*/ *);
__attribute__((always_)) struct vec4i *
psvec4i_divide(struct vec4i *result, struct vec4i *a, struct vec4i *b) {
  vec4i_divide((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

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

LLVM IR (-O0):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_divide(%struct.vec4i* %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = alloca %struct.vec4i*
%5 = alloca %struct.vec4i*
%6 = alloca %struct.vec4i*
store %struct.vec4i* %0, %struct.vec4i** %4
store %struct.vec4i* %1, %struct.vec4i** %5
store %struct.vec4i* %2, %struct.vec4i** %6
%7 = load %struct.vec4i*, %struct.vec4i** %4
%8 = bitcast %struct.vec4i* %7 to i32*
%9 = load %struct.vec4i*, %struct.vec4i** %5
%10 = bitcast %struct.vec4i* %9 to i32*
%11 = load %struct.vec4i*, %struct.vec4i** %6
%12 = bitcast %struct.vec4i* %11 to i32*
%13 = call i32 @vec4i_divide(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec4i*, %struct.vec4i** %4
ret %struct.vec4i* %14
}

LLVM IR (-O2):
%struct.vec4i = type { i32 }
define %struct.vec4i* @psvec4i_divide(%struct.vec4i* returned %0, %struct.vec4i* %1, %struct.vec4i* %2) {
%4 = getelementptr %struct.vec4i, %struct.vec4i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec4i, %struct.vec4i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec4i, %struct.vec4i* %2, i64 0, i32 0
%7 = tail call i32 @vec4i_divide(i32* %4, i32* %5, i32* %6)
ret %struct.vec4i* %0
}
void skip_whitespace(const char **document) {
  while (**document == ' ' || **document == '\t')
    (*document)++;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1133 <skip_whitespace+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <skip_whitespace+0x43>
jmp    1156 <skip_whitespace+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <skip_whitespace+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
mov    (%rdi),%rax
jmp    1113 <skip_whitespace+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_whitespace+0x10>
cmp    $0x9,%cl
je     1110 <skip_whitespace+0x10>
ret

LLVM IR (-O0):
define void @skip_whitespace(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
br label %3
3: ; preds = %17, %1
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 32
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 9
br label %15
15: ; preds = %9, %3
%16 = phi i1 [ true, %3 ], [ %14, %9 ]
br i1 %16, label %17, label %21
17: ; preds = %15
%18 = load i8**, i8*** %2
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
br label %3
21: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
/* Variables and functions */
char const *jsonq_internal(char const *, char const *, char *, int, int,
                           int /*<<< orphan*/ *, int /*<<< orphan*/);
const char *jsonq(const char *s, const char *name, char *dstbuf, int dstlen) {
  return jsonq_internal(s, name, dstbuf, dstlen, -1, NULL, 0);
}


x86 assembly (clang, -O0):
<jsonq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0xffffffff,%r8d
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <jsonq_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonq>:
push   %rax
movl   $0x0,(%rsp)
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1030 <jsonq_internal@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @jsonq(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i8* @jsonq_internal(i8* %0, i8* %1, i8* %2, i32 %3, i32 -1, i32* null, i32 0)
ret i8* %5
}
/* Variables and functions */
int rand();
int getRand(int width) { return rand() % width; }


x86 assembly (clang, -O0):
<getRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRand>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getRand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @getRand(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
int main(void) {
  short int x = 128;
  x = x >> 1;
  printf("after one shift operation: %d\n", x);
  x = x >> 3;
  printf("after two shift operation: %d", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x80,-0x6(%rbp)
movswl -0x6(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0x6(%rbp)
lea    0xec9(%rip),%rdi
movswl -0x6(%rbp),%esi
call   1030 <printf@plt>
movswl -0x6(%rbp),%eax
sar    $0x3,%eax
mov    %ax,-0x6(%rbp)
lea    0xecd(%rip),%rdi
movswl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"after one shift operation: %d\0A\00"
@.str.1 = [30 x i8] c"after two shift operation: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 128, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = ashr i32 %4, 1
%6 = trunc i32 %5 to i16
store i16 %6, i16* %2
%7 = load i16, i16* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 signext %7)
%9 = load i16, i16* %2
%10 = sext i16 %9 to i32
%11 = ashr i32 %10, 3
%12 = trunc i32 %11 to i16
store i16 %12, i16* %2
%13 = load i16, i16* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i16 signext %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"after one shift operation: %d\0A\00"
@.str.1 = [30 x i8] c"after two shift operation: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i16 signext 64)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i16 signext 8)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
uint8_t update_9840_encryption_mode(struct list_head *m, void *p, int value) {
  ;
  return 0x00;
}


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

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

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @update_9840_encryption_mode(%struct.list_head* %0, i8* %1, i32 %2) {
%4 = alloca %struct.list_head*
%5 = alloca i8*
%6 = alloca i32
store %struct.list_head* %0, %struct.list_head** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @update_9840_encryption_mode(%struct.list_head* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
int test_imm_0Bint16_mem(short *val) {
  return ((*val) & (0x0B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_0Bint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_0Bint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 11
%7 = icmp ne i32 %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_0Bint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 11
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void setbkcolor(int i) {}


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

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

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

LLVM IR (-O2):
define void @setbkcolor(i32 %0) {
ret void
}
void uint2bytes(unsigned int number, char *bytes) {
  bytes[0] = (number >> 24) & 0xFF;
  bytes[1] = (number >> 16) & 0xFF;
  bytes[2] = (number >> 8) & 0xFF;
  bytes[3] = number & 0xFF;
}


x86 assembly (clang, -O0):
<uint2bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint2bytes>:
bswap  %edi
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @uint2bytes(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %0, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %0 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
char *langRomTypeAscii16Sram() { return "ASCII 16 (SRAM)"; }


x86 assembly (clang, -O0):
<langRomTypeAscii16Sram>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<langRomTypeAscii16Sram>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"ASCII 16 (SRAM)\00"
define i8* @langRomTypeAscii16Sram() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"ASCII 16 (SRAM)\00"
define i8* @langRomTypeAscii16Sram() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
void swap(char *tab, int a, int b) {
  char tmp;
  tmp = tab[a];
  tab[a] = tab[b];
  tab[b] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
void swap(char a[], int i, int j) {
  char temp = a[i];
  a[i] = a[j];
  a[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
int a_twist_b_on_eloc(eloc)
int eloc;
{
  int temp_arr[12];
  a_eloc_unpack(eloc, temp_arr);
  four_cycle(temp_arr, 10, 6, 11, 2);
  return a_eloc_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_b_on_eloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1040 <a_eloc_unpack@plt>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
mov    $0x0,%al
call   1030 <four_cycle@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1050 <a_eloc_pack@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_b_on_eloc>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <a_eloc_unpack@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0xb,%ecx
mov    $0x2,%r8d
xor    %eax,%eax
call   1030 <four_cycle@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <a_eloc_pack@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_b_on_eloc(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 10, i32 6, i32 11, i32 2)
%9 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @a_twist_b_on_eloc(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eloc_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 10, i32 6, i32 11, i32 2)
%7 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eloc_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int Error() {
  fprintf(stderr, "pdmc PDMFileName\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"pdmc PDMFileName\0A\00"
define i32 @Error() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"pdmc PDMFileName\0A\00"
define i32 @Error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ call(char *);
ne() { call("ccne"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"ccne\00"
define i32 @ne() {
%1 = tail call i32 @call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ time_test01();
int main(int argc, char **argv) {
  puts("\n\n*** TIME TEST ***");
  time_test01();
  puts("*** END OF TIME TEST ***");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"\0A\0A*** TIME TEST ***\00"
@.str.1 = [25 x i8] c"*** END OF TIME TEST ***\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @time_test01()
%8 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0A\0A*** TIME TEST ***\00"
@.str.1 = [25 x i8] c"*** END OF TIME TEST ***\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @time_test01()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int abs(int x) {
  if (x < 0) {
    return -1 * x;
  }
  return x;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1120 <abs+0x20>
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <abs+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int params__is_white_char(char c) {
  int ret = 0;
  ret |= (c == ' ');
  ret |= (c == '\t');
  return ret;
}


x86 assembly (clang, -O0):
<params__is_white_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<params__is_white_char>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @params__is_white_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
%7 = zext i1 %6 to i32
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
%13 = zext i1 %12 to i32
%14 = load i32, i32* %3
%15 = or i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @params__is_white_char(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void kasan_unpoison_stack_above_sp_to(const void *watermark) {}


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

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

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

LLVM IR (-O2):
define void @kasan_unpoison_stack_above_sp_to(i8* nocapture %0) {
ret void
}
void test12_HelloWorld_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test12_HelloWorld_targetInit__I() {
ret void
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ printf(char *, char const *, char *, int);
char *strerror(int);
void printerror(const char *s) {
  printf("ERROR %s: %s (errno=%d)\n", s, strerror(errno), errno);
}


x86 assembly (clang, -O0):
<printerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
mov    0x2e90(%rip),%rax
mov    (%rax),%ecx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
call   1040 <strerror@plt>
mov    (%r14),%ecx
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"ERROR %s: %s (errno=%d)\0A\00"
@errno = global i32 0
define void @printerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @errno
%5 = call i8* @strerror(i32 %4)
%6 = load i32, i32* @errno
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"ERROR %s: %s (errno=%d)\0A\00"
@errno = global i32 0
define void @printerror(i8* %0) {
%2 = load i32, i32* @errno
%3 = tail call i8* @strerror(i32 %2)
%4 = load i32, i32* @errno
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InlineWords(int, int, int);
void DoTwoDrop(void) { InlineWords(2, 20, 20); }


x86 assembly (clang, -O0):
<DoTwoDrop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x14,%edx
mov    %edx,%esi
call   1030 <InlineWords@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoTwoDrop>:
mov    $0x2,%edi
mov    $0x14,%esi
mov    $0x14,%edx
jmp    1030 <InlineWords@plt>

LLVM IR (-O0):
define void @DoTwoDrop() {
%1 = call i32 @InlineWords(i32 2, i32 20, i32 20)
ret void
}

LLVM IR (-O2):
define void @DoTwoDrop() {
%1 = tail call i32 @InlineWords(i32 2, i32 20, i32 20)
ret void
}
double min(int a, int b) { return a > b ? b : a; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
cmp    %esi,%edi
cmovg  %esi,%edi
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @min(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 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
%14 = sitofp i32 %13 to double
ret double %14
}

LLVM IR (-O2):
define double @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ err1Flush(int, int *, int *);
void msgFlusherr(int *status) {
  int errbel = 0;
  err1Flush(1, &errbel, status);
}


x86 assembly (clang, -O0):
<msgFlusherr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    -0xc(%rbp),%rsi
call   1030 <err1Flush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgFlusherr>:
push   %rax
mov    %rdi,%rdx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
call   1030 <err1Flush@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @msgFlusherr(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
%4 = load i32*, i32** %2
%5 = call i32 @err1Flush(i32 1, i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @msgFlusherr(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @err1Flush(i32 1, i32* %2, i32* %0)
ret void
}
int proxstream2_sbc_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @proxstream2_sbc_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
int /*<<< orphan*/ sprintf(char *, char *, long, long);
double *new_doubleFss(int n) {
  static char s[170];
  double *p = (double *)calloc((unsigned)n, sizeof(double));
  if (p == NULL) {
    sprintf(s, "new_double(): calloc(%ld,%ld) failed", (long)n,
            (long)sizeof(double));
  }
  return p;
}


x86 assembly (clang, -O0):
<new_doubleFss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1163 <new_doubleFss+0x43>
movslq -0x4(%rbp),%rdx
lea    0x2eee(%rip),%rdi
lea    0xea7(%rip),%rsi
mov    $0x8,%ecx
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_doubleFss>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1152 <new_doubleFss+0x32>
movslq %ebp,%rdx
lea    0x2eff(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x8,%ecx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@new_doubleFss.s = internal global [170 x i8] zeroinitializer
@.str = [37 x i8] c"new_double(): calloc(%ld,%ld) failed\00"
define double* @new_doubleFss(i32 %0) {
%2 = alloca i32
%3 = alloca double*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @calloc(i32 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
%8 = icmp eq double* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = call i32 @sprintf(i8* getelementptr inbounds ([170 x i8], [170 x i8]* @new_doubleFss.s, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %11, i64 8)
br label %13
13: ; preds = %9, %1
%14 = load double*, double** %3
ret double* %14
}

LLVM IR (-O2):
@new_doubleFss.s = internal global [170 x i8] zeroinitializer
@.str = [37 x i8] c"new_double(): calloc(%ld,%ld) failed\00"
define double* @new_doubleFss(i32 %0) {
%2 = tail call i64 @calloc(i32 %0, i32 8)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = sext i32 %0 to i64
%6 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([170 x i8], [170 x i8]* @new_doubleFss.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i64 %5, i64 8)
br label %7
7: ; preds = %4, %1
%8 = inttoptr i64 %2 to double*
ret double* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
void mutex_unlock(void *mutex) {
  pthread_mutex_unlock((pthread_mutex_t *)mutex);
}


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

x86 assembly (clang, -O2):
<mutex_unlock>:
jmp    1030 <pthread_mutex_unlock@plt>

LLVM IR (-O0):
define void @mutex_unlock(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @pthread_mutex_unlock(i32* %4)
ret void
}

LLVM IR (-O2):
define void @mutex_unlock(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @pthread_mutex_unlock(i32* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_peer_get_owner_uid(int fd,
                                                                 uid_t *uid) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_peer_get_owner_uid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_peer_get_owner_uid>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_peer_get_owner_uid(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_peer_get_owner_uid(i32 %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void FromFileInit(char *file_name, unsigned char mode, unsigned long buf_len,
                  unsigned char ch, unsigned char type) {}


x86 assembly (clang, -O0):
<FromFileInit>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    %rdi,-0x8(%rbp)
mov    %sil,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %cl,-0x19(%rbp)
mov    %al,-0x1a(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @FromFileInit(i8* %0, i8 zeroext %1, i64 %2, i8 zeroext %3, i8 zeroext %4) {
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i64
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %6
store i8 %1, i8* %7
store i64 %2, i64* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
ret void
}

LLVM IR (-O2):
define void @FromFileInit(i8* nocapture %0, i8 zeroext %1, i64 %2, i8 zeroext %3, i8 zeroext %4) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setstack(int /*<<< orphan*/ *, void *, size_t);
int my_pthread_attr_setstack(pthread_attr_t *__attr, void *stack_base,
                             size_t stack_size) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_setstack(realattr, stack_base, stack_size);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_setstack>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_setstack@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_setstack(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %7
%12 = load i32*, i32** %7
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = call i32 @pthread_attr_setstack(i32* %12, i8* %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @my_pthread_attr_setstack(i32* nocapture %0, i8* %1, i64 %2) {
%4 = load i32, i32* %0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @pthread_attr_setstack(i32* %6, i8* %1, i64 %2)
ret i32 %7
}
float interpolate_linear_f(const float xa, const float ya, const float xb,
                           const float yb, const float x) {
  const float interval = xb - xa;
  const float dx = (interval == 0) ? 0 : (x - xa) / interval;
  return ya + (yb - ya) * dx;
}


x86 assembly (clang, -O0):
<interpolate_linear_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1150 <interpolate_linear_f+0x50>
jp     1150 <interpolate_linear_f+0x50>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1164 <interpolate_linear_f+0x64>
movss  -0x14(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolate_linear_f>:
subss  %xmm0,%xmm2
xorps  %xmm5,%xmm5
ucomiss %xmm5,%xmm2
jne    110e <interpolate_linear_f+0xe>
jnp    1119 <interpolate_linear_f+0x19>
subss  %xmm0,%xmm4
divss  %xmm2,%xmm4
movaps %xmm4,%xmm5
subss  %xmm1,%xmm3
mulss  %xmm5,%xmm3
addss  %xmm1,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @interpolate_linear_f(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%13 = load float, float* %8
%14 = load float, float* %6
%15 = fsub float %13, %14
store float %15, float* %11
%16 = load float, float* %11
%17 = fcmp oeq float %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %5
br label %25
19: ; preds = %5
%20 = load float, float* %10
%21 = load float, float* %6
%22 = fsub float %20, %21
%23 = load float, float* %11
%24 = fdiv float %22, %23
br label %25
25: ; preds = %19, %18
%26 = phi float [ 0.000000e+00, %18 ], [ %24, %19 ]
store float %26, float* %12
%27 = load float, float* %7
%28 = load float, float* %9
%29 = load float, float* %7
%30 = fsub float %28, %29
%31 = load float, float* %12
%32 = call float @llvm.fmuladd.f32(float %30, float %31, float %27)
ret float %32
}

LLVM IR (-O2):
define float @interpolate_linear_f(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %2, %0
%7 = fcmp oeq float %6, 0.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = fsub float %4, %0
%10 = fdiv float %9, %6
br label %11
11: ; preds = %5, %8
%12 = phi float [ %10, %8 ], [ 0.000000e+00, %5 ]
%13 = fsub float %3, %1
%14 = tail call float @llvm.fmuladd.f32(float %13, float %12, float %1)
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ test_init(int, char **);
int /*<<< orphan*/ test_msg(char *, char *, int);
int main(int argc, char *argv[]) {
  test_init(argc, argv);
  test_msg("SKIP: %s:%d: "
           "Unsupported arch"
           "\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/AuthenticEshkinKot/criu/refs/heads/"
           "master/test/zdtm/live/static/vsx.c",
           16);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <test_init@plt>
lea    0xeb7(%rip),%rdi
lea    0xecf(%rip),%rsi
mov    $0x10,%edx
call   1040 <test_msg@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <test_init@plt>
lea    0xed3(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0x10,%edx
call   1040 <test_msg@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"SKIP: %s:%d: Unsupported arch\0A\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AuthenticEshkinKot/criu/refs/heads/master/test/zdtm/live/static/vsx.c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @test_init(i32 %6, i8** %7)
%9 = call i32 @test_msg(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 16)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"SKIP: %s:%d: Unsupported arch\0A\00"
@.str.1 = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AuthenticEshkinKot/criu/refs/heads/master/test/zdtm/live/static/vsx.c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @test_init(i32 %0, i8** %1)
%4 = tail call i32 @test_msg(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i32 16)
ret i32 0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRCREATEBITMAP_get(void) {
  return U_WMRCORENONE_get("U_WMRCREATEBITMAP");
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"U_WMRCREATEBITMAP\00"
define i32 @U_WMRCREATEBITMAP_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"U_WMRCREATEBITMAP\00"
define i32 @U_WMRCREATEBITMAP_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}