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

/* Variables and functions */
int /*<<< orphan*/ edge_oPrev(struct Edge *);
struct Edge *edge_sym(struct Edge *);
int /*<<< orphan*/ quadEdge_splice(struct Edge *, int /*<<< orphan*/);
void quadEdge_deleteEdge(struct Edge *edge) {
  quadEdge_splice(edge, edge_oPrev(edge));
  quadEdge_splice(edge_sym(edge), edge_oPrev(edge_sym(edge)));
}


x86 assembly (clang, -O0):
<quadEdge_deleteEdge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <edge_oPrev@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1050 <quadEdge_splice@plt>
mov    -0x8(%rbp),%rdi
call   1040 <edge_sym@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <edge_sym@plt>
mov    %rax,%rdi
call   1030 <edge_oPrev@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1050 <quadEdge_splice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadEdge_deleteEdge>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <edge_oPrev@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <quadEdge_splice@plt>
mov    %rbx,%rdi
call   1040 <edge_sym@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <edge_sym@plt>
mov    %rax,%rdi
call   1030 <edge_oPrev@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <quadEdge_splice@plt>

LLVM IR (-O0):
%struct.Edge = type { i32 }
define void @quadEdge_deleteEdge(%struct.Edge* %0) {
%2 = alloca %struct.Edge*
store %struct.Edge* %0, %struct.Edge** %2
%3 = load %struct.Edge*, %struct.Edge** %2
%4 = load %struct.Edge*, %struct.Edge** %2
%5 = call i32 @edge_oPrev(%struct.Edge* %4)
%6 = call i32 @quadEdge_splice(%struct.Edge* %3, i32 %5)
%7 = load %struct.Edge*, %struct.Edge** %2
%8 = call %struct.Edge* @edge_sym(%struct.Edge* %7)
%9 = load %struct.Edge*, %struct.Edge** %2
%10 = call %struct.Edge* @edge_sym(%struct.Edge* %9)
%11 = call i32 @edge_oPrev(%struct.Edge* %10)
%12 = call i32 @quadEdge_splice(%struct.Edge* %8, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.Edge = type { i32 }
define void @quadEdge_deleteEdge(%struct.Edge* %0) {
%2 = tail call i32 @edge_oPrev(%struct.Edge* %0)
%3 = tail call i32 @quadEdge_splice(%struct.Edge* %0, i32 %2)
%4 = tail call %struct.Edge* @edge_sym(%struct.Edge* %0)
%5 = tail call %struct.Edge* @edge_sym(%struct.Edge* %0)
%6 = tail call i32 @edge_oPrev(%struct.Edge* %5)
%7 = tail call i32 @quadEdge_splice(%struct.Edge* %4, i32 %6)
ret void
}
void funcC(int a) {
  int b;
  while (a < b) {
    b++;
  }
  do {
    b++;
  } while (a <= b);
}


x86 assembly (clang, -O0):
<funcC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <funcC+0x21>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1107 <funcC+0x7>
jmp    1126 <funcC+0x26>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1126 <funcC+0x26>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @funcC(i32 %0) {
ret void
}
int is_in_bound(int *arr, int size, int *ptr) {
  int i = 0;
  for (i = 0; i < size; i++) {
    if (&arr[i] == ptr)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_in_bound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1161 <is_in_bound+0x61>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
cmp    -0x20(%rbp),%rax
jne    114e <is_in_bound+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1168 <is_in_bound+0x68>
jmp    1153 <is_in_bound+0x53>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111d <is_in_bound+0x1d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_in_bound>:
xor    %eax,%eax
test   %esi,%esi
jle    111f <is_in_bound+0x1f>
mov    %esi,%ecx
add    $0xfffffffffffffffc,%rdi
nopl   0x0(%rax)
add    $0x4,%rdi
cmp    %rdx,%rdi
je     1120 <is_in_bound+0x20>
add    $0xffffffffffffffff,%rcx
jne    1110 <is_in_bound+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_in_bound(i32* readnone %0, i32 %1, i32* readnone %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %13, %6
br i1 %8, label %14, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %13, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = icmp eq i32* %11, %2
%13 = add nuw nsw i64 %10, 1
br i1 %12, label %14, label %7
14: ; preds = %9, %7, %3
%15 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %15
}
int isLessOrEqual(int x, int y) {
  int res = y + (~x + 1);
  int res_sign = !(res >> 31);
  int x_sign = (x >> 31) & 1;
  int y_sign = (y >> 31) & 1;
  int case1 = (x_sign ^ y_sign) & x_sign;
  int case2 = (!(x_sign ^ y_sign)) & res_sign;
  return case1 + case2;
}


x86 assembly (clang, -O0):
<isLessOrEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
add    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1f,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
xor    -0x18(%rbp),%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
xor    -0x18(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLessOrEqual>:
mov    %esi,%eax
not    %eax
add    %edi,%eax
shr    $0x1f,%eax
shr    $0x1f,%edi
shr    $0x1f,%esi
xor    %edi,%esi
xor    %eax,%edi
and    %esi,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @isLessOrEqual(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = xor i32 %12, -1
%14 = add nsw i32 %13, 1
%15 = add nsw i32 %11, %14
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = ashr i32 %16, 31
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
store i32 %20, i32* %6
%21 = load i32, i32* %3
%22 = ashr i32 %21, 31
%23 = and i32 %22, 1
store i32 %23, i32* %7
%24 = load i32, i32* %4
%25 = ashr i32 %24, 31
%26 = and i32 %25, 1
store i32 %26, i32* %8
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = xor i32 %27, %28
%30 = load i32, i32* %7
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %7
%33 = load i32, i32* %8
%34 = xor i32 %32, %33
%35 = icmp ne i32 %34, 0
%36 = xor i1 %35, true
%37 = zext i1 %36 to i32
%38 = load i32, i32* %6
%39 = and i32 %37, %38
store i32 %39, i32* %10
%40 = load i32, i32* %9
%41 = load i32, i32* %10
%42 = add nsw i32 %40, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @isLessOrEqual(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = add i32 %3, %0
%5 = lshr i32 %4, 31
%6 = lshr i32 %0, 31
%7 = lshr i32 %1, 31
%8 = xor i32 %7, %6
%9 = and i32 %8, %6
%10 = xor i32 %8, -1
%11 = and i32 %5, %10
%12 = or i32 %9, %11
ret i32 %12
}
void swap(char *c1, char *c2) {
  char t = *c1;
  *c1 = *c2;
  *c2 = t;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int ivory_serialize_unpack_prim_4_le(int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(int *, int *, int);
void ivory_serialize_unpack_uint32_le(const uint8_t *src, uint32_t offs,
                                      uint32_t *dst) {
  uint32_t tmp = ivory_serialize_unpack_prim_4_le(src + offs);
  memcpy(dst, &tmp, sizeof(*dst));
}


x86 assembly (clang, -O0):
<ivory_serialize_unpack_uint32_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <ivory_serialize_unpack_prim_4_le@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_unpack_uint32_le>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
call   1030 <ivory_serialize_unpack_prim_4_le@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @ivory_serialize_unpack_uint32_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = call i32 @ivory_serialize_unpack_prim_4_le(i32* %11)
store i32 %12, i32* %7
%13 = load i32*, i32** %6
%14 = call i32 @memcpy(i32* %13, i32* %7, i32 4)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_unpack_uint32_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = tail call i32 @ivory_serialize_unpack_prim_4_le(i32* %7)
store i32 %8, i32* %4
%9 = call i32 @memcpy(i32* %2, i32* %4, i32 4)
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv16_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv16_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ validercase(int *, int *);
int /*<<< orphan*/ validercolonne(int *, int *);
int /*<<< orphan*/ validerligne(int *, int *);
bool valider(int sudoku[]) {
  bool valide = true;
  validerligne(sudoku, &valide);
  validercolonne(sudoku, &valide);
  validercase(sudoku, &valide);
  return valide;
}


x86 assembly (clang, -O0):
<valider>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <validerligne@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <validercolonne@plt>
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <validercase@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valider>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%r14
mov    %r14,%rsi
call   1050 <validerligne@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <validercolonne@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <validercase@plt>
mov    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @valider(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
%4 = load i32*, i32** %2
%5 = call i32 @validerligne(i32* %4, i32* %3)
%6 = load i32*, i32** %2
%7 = call i32 @validercolonne(i32* %6, i32* %3)
%8 = load i32*, i32** %2
%9 = call i32 @validercase(i32* %8, i32* %3)
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @valider(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @validerligne(i32* %0, i32* %2)
%5 = call i32 @validercolonne(i32* %0, i32* %2)
%6 = call i32 @validercase(i32* %0, i32* %2)
%7 = load i32, i32* %2
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct TYPE_3__ {
  int /*<<< orphan*/ member_0;
};
typedef TYPE_1__ mbstate_t;

/* Variables and functions */
size_t mbrtowc(int /*<<< orphan*/ *, char const *, size_t, TYPE_1__ *);
int mbtowc(wchar_t *wc, const char *s, size_t n) {
  mbstate_t st = {0};
  n = mbrtowc(wc, s, n, &st);
  return n + 2 ? n : -1;
}


x86 assembly (clang, -O0):
<mbtowc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <mbrtowc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
cmp    $0x0,%rax
je     117c <mbtowc+0x5c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    118c <mbtowc+0x6c>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x28(%rbp)
jmp    118c <mbtowc+0x6c>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbtowc>:
push   %rax
movl   $0x0,(%rsp)
mov    %rsp,%rcx
call   1030 <mbrtowc@plt>
cmp    $0xfffffffffffffffe,%rax
mov    $0xffffffff,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
define i32 @mbtowc(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca %struct.TYPE_3__
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = bitcast %struct.TYPE_3__* %7 to i8*
%9 = load i32*, i32** %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = call i64 @mbrtowc(i32* %9, i8* %10, i64 %11, %struct.TYPE_3__* %7)
store i64 %12, i64* %6
%13 = load i64, i64* %6
%14 = add i64 %13, 2
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = load i64, i64* %6
br label %19
18: ; preds = %3
br label %19
19: ; preds = %18, %16
%20 = phi i64 [ %17, %16 ], [ -1, %18 ]
%21 = trunc i64 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
define i32 @mbtowc(i32* %0, i8* %1, i64 %2) {
%4 = alloca %struct.TYPE_3__
%5 = bitcast %struct.TYPE_3__* %4 to i8*
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %4, i64 0, i32 0
store i32 0, i32* %6
%7 = call i64 @mbrtowc(i32* %0, i8* %1, i64 %2, %struct.TYPE_3__* %4)
%8 = icmp eq i64 %7, -2
%9 = trunc i64 %7 to i32
%10 = select i1 %8, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
int write_data(unsigned int i, unsigned int p) { printf("%u %u\n", i, p); }


x86 assembly (clang, -O0):
<write_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_data>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%u %u\0A\00"
define i32 @write_data(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 undef
}
void gtk_tree_selection_set_select_function() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_selection_set_select_function() {
ret void
}
void xmlvm_init_native_java_lang_String() {}


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

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

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

LLVM IR (-O2):
define void @xmlvm_init_native_java_lang_String() {
ret void
}
int do_717() { return 717; }


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

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

LLVM IR (-O0):
define i32 @do_717() {
ret i32 717
}

LLVM IR (-O2):
define i32 @do_717() {
ret i32 717
}
/* Variables and functions */
int /*<<< orphan*/ tst_tmpdir();
void setup() { tst_tmpdir(); }


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

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

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

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 (...) @tst_tmpdir()
ret void
}
int cgcd(int x, int y) {
  int g = y;
  while (x > 0) {
    g = x;
    x = y % x;
    y = g;
  }
  return g;
}


x86 assembly (clang, -O0):
<cgcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1135 <cgcd+0x35>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1110 <cgcd+0x10>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgcd>:
mov    %esi,%eax
test   %edi,%edi
jle    111d <cgcd+0x1d>
mov    %edi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jg     1110 <cgcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cgcd(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = phi i32 [ %7, %4 ], [ %0, %2 ]
%7 = srem i32 %5, %6
%8 = icmp sgt i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %2
%10 = phi i32 [ %1, %2 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_mov_to_Rn(char *str, unsigned char n) {
  sprintf(str, "MOV   R%X, A                     ", n);
}


x86 assembly (clang, -O0):
<sprint_mov_to_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_mov_to_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOV R%X, A \00"
define void @sprint_mov_to_Rn(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV R%X, A \00"
define void @sprint_mov_to_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int;
typedef int /*<<< orphan*/ u_char;
typedef int /*<<< orphan*/ RSA;

/* Variables and functions */
int /*<<< orphan*/ NID_sha1;
int RSA_verify(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ SHA_DIGEST_LENGTH;
int /*<<< orphan*/ hash_sha1(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int verify_sign(u_char *msg, u_int m_len, u_char *signature, u_int siglen,
                RSA *pub) {
  return RSA_verify(NID_sha1, hash_sha1(msg, m_len, 0), SHA_DIGEST_LENGTH,
                    signature, siglen, pub);
}


x86 assembly (clang, -O0):
<verify_sign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1030 <hash_sha1@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
mov    0x2e88(%rip),%rax
mov    (%rax),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x28(%rbp),%r9
call   1040 <RSA_verify@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_sign>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %ecx,%r15d
mov    %rdx,%rbx
mov    0x2ea1(%rip),%rax
mov    (%rax),%ebp
xor    %edx,%edx
call   1030 <hash_sha1@plt>
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%edx
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rcx
mov    %r15d,%r8d
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <RSA_verify@plt>

LLVM IR (-O0):
@NID_sha1 = global i32 0
@SHA_DIGEST_LENGTH = global i32 0
define i32 @verify_sign(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%11 = load i32, i32* @NID_sha1
%12 = load i32*, i32** %6
%13 = load i32, i32* %7
%14 = call i32 @hash_sha1(i32* %12, i32 %13, i32 0)
%15 = load i32, i32* @SHA_DIGEST_LENGTH
%16 = load i32*, i32** %8
%17 = load i32, i32* %9
%18 = load i32*, i32** %10
%19 = call i32 @RSA_verify(i32 %11, i32 %14, i32 %15, i32* %16, i32 %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
@NID_sha1 = global i32 0
@SHA_DIGEST_LENGTH = global i32 0
define i32 @verify_sign(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4) {
%6 = load i32, i32* @NID_sha1
%7 = tail call i32 @hash_sha1(i32* %0, i32 %1, i32 0)
%8 = load i32, i32* @SHA_DIGEST_LENGTH
%9 = tail call i32 @RSA_verify(i32 %6, i32 %7, i32 %8, i32* %2, i32 %3, i32* %4)
ret i32 %9
}
void free_received_list(char **list) {
  int i;
  for (i = 0; list[i]; i++)
    free(list[i]);
  free(list);
}


x86 assembly (clang, -O0):
<free_received_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1155 <free_received_list+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <free_received_list+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_received_list>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_received_list+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_received_list+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_received_list(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}
unsigned char str2int(char c) {
  switch (c) {
  case 'A':
  case '0':
    return 0;
  case 'C':
  case '1':
    return 1;
  case 'G':
  case '2':
    return 2;
  case 'T':
  case '3':
    return 3;
  }
  return 4;
}


x86 assembly (clang, -O0):
<str2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x24,%eax
ja     1158 <str2int+0x58>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x0,-0x1(%rbp)
jmp    115c <str2int+0x5c>
movb   $0x1,-0x1(%rbp)
jmp    115c <str2int+0x5c>
movb   $0x2,-0x1(%rbp)
jmp    115c <str2int+0x5c>
movb   $0x3,-0x1(%rbp)
jmp    115c <str2int+0x5c>
movb   $0x4,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2int>:
add    $0xffffffd0,%edi
cmp    $0x24,%edi
ja     1123 <str2int+0x23>
xor    %eax,%eax
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%al
ret
mov    $0x2,%al
ret
mov    $0x3,%al
ret
mov    $0x4,%al
ret

LLVM IR (-O0):
define zeroext i8 @str2int(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 65, label %6
i32 48, label %6
i32 67, label %7
i32 49, label %7
i32 71, label %8
i32 50, label %8
i32 84, label %9
i32 51, label %9
]
6: ; preds = %1, %1
store i8 0, i8* %2
br label %11
7: ; preds = %1, %1
store i8 1, i8* %2
br label %11
8: ; preds = %1, %1
store i8 2, i8* %2
br label %11
9: ; preds = %1, %1
store i8 3, i8* %2
br label %11
10: ; preds = %1
store i8 4, i8* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @str2int(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %6 [
i32 65, label %7
i32 48, label %7
i32 67, label %3
i32 49, label %3
i32 71, label %4
i32 50, label %4
i32 84, label %5
i32 51, label %5
]
3: ; preds = %1, %1
br label %7
4: ; preds = %1, %1
br label %7
5: ; preds = %1, %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %1, %6, %5, %4, %3
%8 = phi i8 [ 4, %6 ], [ 3, %5 ], [ 2, %4 ], [ 1, %3 ], [ 0, %1 ], [ 0, %1 ]
ret i8 %8
}
void swap(char *s, char *t) {
  char c = *s;
  *s = *t;
  *t = c;
  return;
}


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

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

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Error(char *);
int /*<<< orphan*/ getcwd(char *, int);
int /*<<< orphan*/ strcat(char *, char *);
void Q_getwd(char *out) {
  if (!getcwd(out, 256))
    Error("getcwd failed");
  strcat(out, "/");
}


x86 assembly (clang, -O0):
<Q_getwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%eax
jne    115f <Q_getwd+0x2f>
lea    0xea6(%rip),%rdi
call   1030 <Error@plt>
mov    -0x8(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1050 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_getwd>:
push   %rbx
mov    %rdi,%rbx
mov    $0x100,%esi
call   1040 <getcwd@plt>
test   %eax,%eax
jne    114e <Q_getwd+0x1e>
lea    0xeb7(%rip),%rdi
call   1030 <Error@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <strcat@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"getcwd failed\00"
@.str.1 = [2 x i8] c"/\00"
define void @Q_getwd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @getcwd(i8* %3, i32 256)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @Error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"getcwd failed\00"
@.str.1 = [2 x i8] c"/\00"
define void @Q_getwd(i8* %0) {
%2 = tail call i32 @getcwd(i8* %0, i32 256)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_simd_cpu(void) {
  int sse2;
  __asm__ __volatile__("movl  $0, %%eax\n\t"
                       "cpuid\n\t"
                       "cmp   $1, %%eax\n\t"
                       "jb    no\n\t"
                       "movl  $1, %%eax\n\t"
                       "cpuid \n\t"
                       "testl $0x04000000, %%edx\n\t"
                       "jnz   yes\n\t"
                       "movl  $0, %0\n\t"
                       "jmp   no\n\t"
                       "yes:\n\t"
                       "movl  $1, %0\n\t"
                       "no:\n\t"
                       : "=m"(sse2)
                       :
                       : "%eax", "%ebx", "%ecx", "%edx");
  return sse2;
}


x86 assembly (clang, -O0):
<is_simd_cpu>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x0,%eax
cpuid
cmp    $0x1,%eax
jb     113b <no>
mov    $0x1,%eax
cpuid
test   $0x4000000,%edx
jne    1134 <yes>
movl   $0x0,-0xc(%rbp)
jmp    113b <no>

x86 assembly (clang, -O2):
<is_simd_cpu>:
push   %rbx
mov    $0x0,%eax
cpuid
cmp    $0x1,%eax
jb     112e <no>
mov    $0x1,%eax
cpuid
test   $0x4000000,%edx
jne    1126 <yes>
movl   $0x0,-0x4(%rsp)
jmp    112e <no>

LLVM IR (-O0):
define i32 @is_simd_cpu() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @is_simd_cpu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
ret i32 %3
}
/* Variables and functions */
scalar_t__ cstring_at_black(char *);
char *cstring_skip_black(char *str) {
  while (cstring_at_black(str)) {
    ++str;
  }
  return (char *)str;
}


x86 assembly (clang, -O0):
<cstring_skip_black>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cstring_at_black@plt>
cmp    $0x0,%rax
je     1140 <cstring_skip_black+0x30>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <cstring_skip_black+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cstring_skip_black>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <cstring_at_black@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <cstring_skip_black+0x10>
add    $0xffffffffffffffff,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @cstring_skip_black(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @cstring_at_black(i8* %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ MAIN__();
int zblat2_() {
  MAIN__();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @zblat2_() {
%1 = tail call i32 (...) @MAIN__()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void ModelicaError(const char *string) {
  fprintf(stderr, "%s", string);
  exit(1);
}


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

x86 assembly (clang, -O2):
<ModelicaError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @ModelicaError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @ModelicaError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  if (a >= 5)
    printf("%d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jl     1158 <main+0x38>
mov    -0x8(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
cmp    $0x5,%esi
jl     1147 <main+0x27>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %8
8: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
unsigned int _blsi_u32(unsigned int);
unsigned int test_blsi_u32(unsigned int __X) { return _blsi_u32(__X); }


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

x86 assembly (clang, -O2):
<test_blsi_u32>:
jmp    1030 <_blsi_u32@plt>

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

LLVM IR (-O2):
define i32 @test_blsi_u32(i32 %0) {
%2 = tail call i32 @_blsi_u32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct timespec {
  long long tv_sec;
  scalar_t__ tv_nsec;
};
typedef scalar_t__ int64_t;

/* Variables and functions */
int64_t timespec_to_ns64(struct timespec *ts) {
  return ts->tv_sec * 1000000000LL + ts->tv_nsec;
}


x86 assembly (clang, -O0):
<timespec_to_ns64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3b9aca00,(%rax),%rax
mov    -0x8(%rbp),%rcx
add    0x8(%rcx),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_to_ns64>:
imul   $0x3b9aca00,(%rdi),%rax
add    0x8(%rdi),%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define i64 @timespec_to_ns64(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load %struct.timespec*, %struct.timespec** %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000000
%7 = load %struct.timespec*, %struct.timespec** %2
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
define i64 @timespec_to_ns64(%struct.timespec* nocapture %0) {
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = mul nsw i64 %3, 1000000000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
%6 = load i64, i64* %5
%7 = add nsw i64 %4, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 5)
ret i32 0
}
Error(x) char *x;
{
  endwin();
  printf("%s\n", x);
  KeyRestore();
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <endwin@plt>
mov    -0x8(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <KeyRestore@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <endwin@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <KeyRestore@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
define i32 @Error(i8* nocapture %0) {
%2 = tail call i32 (...) @endwin()
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 (...) @KeyRestore()
tail call void @exit(i32 1)
unreachable
}
void RTThreadSelf(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadSelf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alien_offset(int /*<<< orphan*/);
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
int /*<<< orphan*/ from_char_string(int /*<<< orphan*/);
int /*<<< orphan*/ tag_object(int /*<<< orphan*/);
void primitive_alien_to_char_string_impl(void) {
  drepl(tag_object(from_char_string(alien_offset(dpeek()))));
}


x86 assembly (clang, -O0):
<primitive_alien_to_char_string_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1070 <alien_offset@plt>
mov    %eax,%edi
call   1050 <from_char_string@plt>
mov    %eax,%edi
call   1040 <tag_object@plt>
mov    %eax,%edi
call   1060 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_alien_to_char_string_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1070 <alien_offset@plt>
mov    %eax,%edi
call   1050 <from_char_string@plt>
mov    %eax,%edi
call   1040 <tag_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <drepl@plt>

LLVM IR (-O0):
define void @primitive_alien_to_char_string_impl() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @alien_offset(i32 %1)
%3 = call i32 @from_char_string(i32 %2)
%4 = call i32 @tag_object(i32 %3)
%5 = call i32 @drepl(i32 %4)
ret void
}

LLVM IR (-O2):
define void @primitive_alien_to_char_string_impl() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @alien_offset(i32 %1)
%3 = tail call i32 @from_char_string(i32 %2)
%4 = tail call i32 @tag_object(i32 %3)
%5 = tail call i32 @drepl(i32 %4)
ret void
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned long mtime() {
  struct timespec ts;
  clock_gettime(CLOCK_REALTIME, &ts);
  return (unsigned long)ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}


x86 assembly (clang, -O0):
<mtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mtime>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,0x10(%rsp),%rcx
movslq 0x8(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @mtime() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000000
%10 = sext i32 %9 to i64
%11 = add i64 %6, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @mtime() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000000
%11 = sext i32 %10 to i64
%12 = add i64 %7, %11
ret i64 %12
}
int test_imm_FCint8_mem(signed char *val) {
  return ((*val) & (-0xFC << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FCint8_mem>:
movsbl (%rdi),%eax
test   $0xffffff04,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_FCint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -252
%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_FCint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -252
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}