xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow(double const, double const);
double _power(const int numInputs, const double *inputs,
              const double *connectionWeights) {
  return pow(inputs[0], inputs[1]);
}


x86 assembly (clang, -O0):
<_power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_power>:
movsd  (%rsi),%xmm0
movsd  0x8(%rsi),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @_power(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = call double @pow(double %9, double %12)
ret double %13
}

LLVM IR (-O2):
define double @_power(i32 %0, double* nocapture %1, double* nocapture readnone %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @pow(double %4, double %6)
ret double %7
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ bn;
  struct TYPE_4__ *b64_bn;
};
typedef TYPE_1__ SRP_gN_cache;

/* Variables and functions */
int /*<<< orphan*/ BN_free(int /*<<< orphan*/);
int /*<<< orphan*/ free(TYPE_1__ *);
void SRP_gN_free(SRP_gN_cache *gN_cache) {
  if (gN_cache == NULL)
    return;
  free(gN_cache->b64_bn);
  BN_free(gN_cache->bn);
  free(gN_cache);
}


x86 assembly (clang, -O0):
<SRP_gN_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <SRP_gN_free+0x1c>
jmp    115d <SRP_gN_free+0x3d>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <BN_free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SRP_gN_free>:
test   %rdi,%rdi
je     1142 <SRP_gN_free+0x22>
push   %rbx
mov    %rdi,%rbx
mov    0x8(%rdi),%rdi
call   1030 <free@plt>
mov    (%rbx),%edi
call   1040 <BN_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32, %struct.TYPE_4__* }
define void @SRP_gN_free(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%4 = icmp eq %struct.TYPE_4__* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %17
6: ; preds = %1
%7 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 1
%9 = load %struct.TYPE_4__*, %struct.TYPE_4__** %8
%10 = call i32 @free(%struct.TYPE_4__* %9)
%11 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i32 @BN_free(i32 %13)
%15 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%16 = call i32 @free(%struct.TYPE_4__* %15)
br label %17
17: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, %struct.TYPE_4__* }
define void @SRP_gN_free(%struct.TYPE_4__* %0) {
%2 = icmp eq %struct.TYPE_4__* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%6 = tail call i32 @free(%struct.TYPE_4__* %5)
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @BN_free(i32 %8)
%10 = tail call i32 @free(%struct.TYPE_4__* %0)
br label %11
11: ; preds = %1, %3
ret void
}
void UNDEF_Routine() {}


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

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

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

LLVM IR (-O2):
define void @UNDEF_Routine() {
ret void
}
/* Variables and functions */
int irq_lock();
int /*<<< orphan*/ irq_unlock(int);
void stub1(unsigned int *, unsigned int *);
int iap_cmd(unsigned int cmd[5]) {
  int key;
  int status[5];
  key = irq_lock();
  ((void (*)(unsigned int[], unsigned int[]))0X1FFF1FF1)(cmd, status);
  irq_unlock(key);
  return status[0];
}


x86 assembly (clang, -O0):
<iap_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <irq_lock@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x1fff1ff1,%eax
call   *%rax
mov    -0xc(%rbp),%edi
call   1030 <irq_unlock@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iap_cmd>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <irq_lock@plt>
mov    %eax,%ebp
mov    %rsp,%rsi
mov    $0x1fff1ff1,%eax
mov    %rbx,%rdi
call   *%rax
mov    %ebp,%edi
call   1030 <irq_unlock@plt>
mov    (%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @iap_cmd(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca [5 x i32]
store i32* %0, i32** %2
%5 = call i32 (...) @irq_lock()
store i32 %5, i32* %3
%6 = load i32*, i32** %2
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @irq_unlock(i32 %8)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @iap_cmd(i32* %0) {
%2 = alloca [5 x i32]
%3 = bitcast [5 x i32]* %2 to i8*
%4 = tail call i32 (...) @irq_lock()
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call i32 @irq_unlock(i32 %4)
%7 = load i32, i32* %5
ret i32 %7
}
/* Type definitions */
struct arrayStack {
  int dummy;
};

/* Variables and functions */
int Pop(struct arrayStack *);
int /*<<< orphan*/ Push(struct arrayStack *, int);
struct arrayStack *createStack(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  struct arrayStack *S = createStack(100);
  Push(S, 5);
  Push(S, 10);
  int x = Pop(S);
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1060 <createStack@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1050 <Push@plt>
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1050 <Push@plt>
mov    -0x10(%rbp),%rdi
call   1040 <Pop@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1060 <createStack@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x5,%esi
call   1050 <Push@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <Push@plt>
mov    %rbx,%rdi
call   1040 <Pop@plt>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.arrayStack = type { i32 }
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call %struct.arrayStack* @createStack(i32 100)
%2 = tail call i32 @Push(%struct.arrayStack* %1, i32 5)
%3 = tail call i32 @Push(%struct.arrayStack* %1, i32 10)
%4 = tail call i32 @Pop(%struct.arrayStack* %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int u_int32_t;

/* Variables and functions */
u_int32_t pow2(u_int32_t v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v++;
  return v;
}


x86 assembly (clang, -O0):
<pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @pow2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @pow2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
%13 = add nsw i32 %12, 1
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t
hci_event_master_link_key_complete_get_connection_handle(const uint8_t *event) {
  return little_endian_read_16(event, 3);
}


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

x86 assembly (clang, -O2):
<hci_event_master_link_key_complete_get_connection_handle>:
mov    $0x3,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @hci_event_master_link_key_complete_get_connection_handle(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 3)
ret i32 %2
}
int line_contains_semicolon(const char *z, int N) {
  int i;
  for (i = 0; i < N; i++) {
    if (z[i] == ';')
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<line_contains_semicolon>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1152 <line_contains_semicolon+0x52>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3b,%eax
jne    113f <line_contains_semicolon+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1159 <line_contains_semicolon+0x59>
jmp    1144 <line_contains_semicolon+0x44>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <line_contains_semicolon+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_contains_semicolon>:
test   %esi,%esi
jle    111f <line_contains_semicolon+0x1f>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpb   $0x3b,(%rdi,%rcx,1)
je     1122 <line_contains_semicolon+0x22>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <line_contains_semicolon+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @line_contains_semicolon(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 59
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %8, %6, %2
%15 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ res;

/* Variables and functions */
scalar_t__ get_bytes(char **, char *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int xdr_get_u32(u_int32_t **ptr, const u_int32_t *end, u_int32_t *res) {
  if (get_bytes((char **)ptr, (char *)end, res, sizeof(res)))
    return -1;
  *res = ntohl(*res);
  return 0;
}


x86 assembly (clang, -O0):
<xdr_get_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    $0x8,%ecx
call   1030 <get_bytes@plt>
cmp    $0x0,%rax
je     1160 <xdr_get_u32+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <xdr_get_u32+0x5a>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
call   1040 <ntohl@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_get_u32>:
push   %rbx
mov    %rdx,%rbx
mov    $0x8,%ecx
call   1030 <get_bytes@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     113d <xdr_get_u32+0x1d>
pop    %rbx
ret
mov    (%rbx),%edi
call   1040 <ntohl@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xdr_get_u32(i32** %0, i32* %1, i32* %2) {
%4 = bitcast i32** %0 to i8**
%5 = bitcast i32* %1 to i8*
%6 = tail call i64 @get_bytes(i8** %4, i8* %5, i32* %2, i32 8)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i32, i32* %2
%10 = tail call i32 @ntohl(i32 %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %3, %8
%12 = phi i32 [ 0, %8 ], [ -1, %3 ]
ret i32 %12
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_length_of_supports(int *r, int *length) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(85, r, length, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_length_of_supports>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x55,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_length_of_supports>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x55,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_length_of_supports(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc(i32 85, i32* %7, i32* %8, double* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @celcon_length_of_supports(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc(i32 85, i32* %0, i32* %1, double* undef)
ret i32 %3
}
/* Variables and functions */
int strlen(char const *);
char *strstr(char const *, char const *);
int countToStr(const char *pRead, const char *sToFind) {
  const char *pFind = strstr(pRead, sToFind);
  if (!pFind) {
    return strlen(pRead);
  }
  return pFind - pRead;
}


x86 assembly (clang, -O0):
<countToStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115d <countToStr+0x3d>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <countToStr+0x4b>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countToStr>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strstr@plt>
test   %rax,%rax
je     1132 <countToStr+0x12>
sub    %ebx,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @countToStr(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i8* @strstr(i8* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %15, label %12
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %3
br label %22
15: ; preds = %2
%16 = load i8*, i8** %6
%17 = load i8*, i8** %4
%18 = ptrtoint i8* %16 to i64
%19 = ptrtoint i8* %17 to i64
%20 = sub i64 %18, %19
%21 = trunc i64 %20 to i32
store i32 %21, i32* %3
br label %22
22: ; preds = %15, %12
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @countToStr(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
br label %12
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %7, %5
%13 = phi i32 [ %11, %7 ], [ %6, %5 ]
ret i32 %13
}
void handle_49(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_49(i32 %0) {
ret void
}
/* Type definitions */
struct _mgmt_updateuser_rsp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _mgmt_updateuser_rsp *);
void mgmt_updateuser_rsp_free(struct _mgmt_updateuser_rsp *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<mgmt_updateuser_rsp_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._mgmt_updateuser_rsp = type { i32 }
define void @mgmt_updateuser_rsp_free(%struct._mgmt_updateuser_rsp* nocapture %0) {
%2 = tail call i32 @free(%struct._mgmt_updateuser_rsp* %0)
ret void
}
unsigned xrop3_143_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_143_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ setfsgid(int /*<<< orphan*/);
int /*<<< orphan*/ setfsuid(int /*<<< orphan*/);
scalar_t__ setgid(int /*<<< orphan*/);
scalar_t__ setuid(int /*<<< orphan*/);
int setid_userns_root(void) {
  if (setuid(0))
    return -1;
  if (setgid(0))
    return -1;
  setfsuid(0);
  setfsgid(0);
  return 0;
}


x86 assembly (clang, -O0):
<setid_userns_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1060 <setuid@plt>
cmp    $0x0,%rax
je     1165 <setid_userns_root+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1197 <setid_userns_root+0x57>
xor    %edi,%edi
call   1040 <setgid@plt>
cmp    $0x0,%rax
je     1182 <setid_userns_root+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1197 <setid_userns_root+0x57>
xor    %edi,%edi
call   1030 <setfsuid@plt>
xor    %edi,%edi
call   1050 <setfsgid@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setid_userns_root>:
push   %rbx
xor    %edi,%edi
call   1060 <setuid@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    116e <setid_userns_root+0x2e>
xor    %edi,%edi
call   1040 <setgid@plt>
test   %rax,%rax
jne    116e <setid_userns_root+0x2e>
xor    %edi,%edi
call   1030 <setfsuid@plt>
xor    %edi,%edi
call   1050 <setfsgid@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @setid_userns_root() {
%1 = alloca i32
%2 = call i64 @setuid(i32 0)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %12
5: ; preds = %0
%6 = call i64 @setgid(i32 0)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 -1, i32* %1
br label %12
9: ; preds = %5
%10 = call i32 @setfsuid(i32 0)
%11 = call i32 @setfsgid(i32 0)
store i32 0, i32* %1
br label %12
12: ; preds = %9, %8, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @setid_userns_root() {
%1 = tail call i64 @setuid(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = tail call i64 @setgid(i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @setfsuid(i32 0)
%8 = tail call i32 @setfsgid(i32 0)
br label %9
9: ; preds = %3, %0, %6
%10 = phi i32 [ 0, %6 ], [ -1, %0 ], [ -1, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_text_size() { exit(1); }


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

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

LLVM IR (-O0):
define void @caml_gr_text_size() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_text_size() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sla_addet_(double *, double *, double *, double *, double *);
void slaAddet(double rm, double dm, double eq, double *rc, double *dc) {
  sla_addet_(&rm, &dm, &eq, rc, dc);
}


x86 assembly (clang, -O0):
<slaAddet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <sla_addet_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaAddet>:
sub    $0x18,%rsp
mov    %rsi,%r8
mov    %rdi,%rcx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sla_addet_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @slaAddet(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load double*, double** %9
%12 = load double*, double** %10
%13 = call i32 @sla_addet_(double* %6, double* %7, double* %8, double* %11, double* %12)
ret void
}

LLVM IR (-O2):
define void @slaAddet(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
%9 = call i32 @sla_addet_(double* %6, double* %7, double* %8, double* %3, double* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
int access(char const *, int /*<<< orphan*/);
int strfile_executable(const char *str) { return access(str, X_OK); }


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

x86 assembly (clang, -O2):
<strfile_executable>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <access@plt>

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @strfile_executable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @X_OK
%5 = call i32 @access(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @strfile_executable(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ pigpio_command(int, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int);
uint32_t get_pigpio_version(int pi) { return pigpio_command(pi, 26, 0, 0, 1); }


x86 assembly (clang, -O0):
<get_pigpio_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1a,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pigpio_version>:
mov    $0x1a,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

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

LLVM IR (-O2):
define i32 @get_pigpio_version(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 26, i32 0, i32 0, i32 1)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned char fgetc(int /*<<< orphan*/ *);
long read4(FILE *f) {
  unsigned char b0, b1, b2, b3;
  b0 = fgetc(f);
  b1 = fgetc(f);
  b2 = fgetc(f);
  b3 = fgetc(f);
  return (b0 + (b1 << 8) + (b2 << 16) + (b3 << 24));
}


x86 assembly (clang, -O0):
<read4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movzbl -0xb(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
movzbl -0xc(%rbp),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read4>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1030 <fgetc@plt>
movzbl %bpl,%ecx
movzbl %r14b,%edx
shl    $0x8,%edx
or     %ecx,%edx
movzbl %r15b,%ecx
shl    $0x10,%ecx
or     %edx,%ecx
movzbl %al,%eax
shl    $0x18,%eax
or     %ecx,%eax
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @read4(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = call zeroext i8 @fgetc(i32* %7)
store i8 %8, i8* %3
%9 = load i32*, i32** %2
%10 = call zeroext i8 @fgetc(i32* %9)
store i8 %10, i8* %4
%11 = load i32*, i32** %2
%12 = call zeroext i8 @fgetc(i32* %11)
store i8 %12, i8* %5
%13 = load i32*, i32** %2
%14 = call zeroext i8 @fgetc(i32* %13)
store i8 %14, i8* %6
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = add nsw i32 %16, %19
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 16
%24 = add nsw i32 %20, %23
%25 = load i8, i8* %6
%26 = zext i8 %25 to i32
%27 = shl i32 %26, 24
%28 = add nsw i32 %24, %27
%29 = sext i32 %28 to i64
ret i64 %29
}

LLVM IR (-O2):
define i64 @read4(i32* nocapture %0) {
%2 = tail call zeroext i8 @fgetc(i32* %0)
%3 = tail call zeroext i8 @fgetc(i32* %0)
%4 = tail call zeroext i8 @fgetc(i32* %0)
%5 = tail call zeroext i8 @fgetc(i32* %0)
%6 = zext i8 %2 to i32
%7 = zext i8 %3 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %6
%10 = zext i8 %4 to i32
%11 = shl nuw nsw i32 %10, 16
%12 = or i32 %9, %11
%13 = zext i8 %5 to i32
%14 = shl nuw i32 %13, 24
%15 = or i32 %12, %14
%16 = sext i32 %15 to i64
ret i64 %16
}
/* Variables and functions */
int Cdnan(double *);
extern int fttdnn_(double *A1) {
  int A0;
  A0 = Cdnan(A1);
  return ((A0) ? 1 : 0);
}


x86 assembly (clang, -O0):
<fttdnn_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Cdnan@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fttdnn_(double* %0) {
%2 = alloca double*
%3 = alloca i32
store double* %0, double** %2
%4 = load double*, double** %2
%5 = call i32 @Cdnan(double* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @fttdnn_(double* %0) {
%2 = tail call i32 @Cdnan(double* %0)
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int m = 5, n = 10;
  if (m > n)
    ++m;
  ++n;
  printf("m = %d, n = %d\n", m, n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1142 <main+0x32>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea8(%rip),%rdi
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    $0x5,%esi
mov    $0xb,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"m = %d, n = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 5, i32 11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("Single Page Web Server\n"
         "Options:\n"
         "   -p <port>: TCP port number, which will be listened to. Defaults "
         "to port 80.\n"
         "   -f <path>: Path to file, which will be served. Required.\n"
         "   -6:        Use only IPv6 sockets. By default both IPv4 and IPv6 "
         "sockets are used.\n"
         "   -d:        Enable debug logging.\n"
         "   -h:        Display help.\n");
}


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

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

LLVM IR (-O0):
@.str = [321 x i8] c"Single Page Web Server\0AOptions:\0A -p <port>: TCP port number, which will be listened to. Defaults to port 80.\0A -f <path>: Path to file, which will be served. Required.\0A -6: Use only IPv6 sockets. By default both IPv4 and IPv6 sockets are used.\0A -d: Enable debug logging.\0A -h: Display help.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([321 x i8], [321 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [320 x i8] c"Single Page Web Server\0AOptions:\0A -p <port>: TCP port number, which will be listened to. Defaults to port 80.\0A -f <path>: Path to file, which will be served. Required.\0A -6: Use only IPv6 sockets. By default both IPv4 and IPv6 sockets are used.\0A -d: Enable debug logging.\0A -h: Display help.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([320 x i8], [320 x i8]* @str, i64 0, i64 0))
ret void
}
int bar(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 -1
}
int aliascheck_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @aliascheck_shutdown() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
void closeLogFile(void **fid) {
  FILE *fptr = (FILE *)*fid;
  if (fptr == NULL) {
    printf("Cannot close the file 'sldemo_lct_fault.log'\n");
    return;
  }
  fclose(fptr);
}


x86 assembly (clang, -O0):
<closeLogFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <closeLogFile+0x33>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
jmp    115c <closeLogFile+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeLogFile>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <closeLogFile+0xd>
jmp    1040 <fclose@plt>
lea    0xecc(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Cannot close the file 'sldemo_lct_fault.log'\0A\00"
define void @closeLogFile(i8** %0) {
%2 = alloca i8**
%3 = alloca i32*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %14
11: ; preds = %1
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
br label %14
14: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"Cannot close the file 'sldemo_lct_fault.log'\00"
define void @closeLogFile(i8** nocapture %0) {
%2 = bitcast i8** %0 to i32**
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = tail call i32 @fclose(i32* %3)
br label %9
9: ; preds = %7, %5
ret void
}
int test_imm_4Aint8_reg(signed char val) {
  return ((val) & (-0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Aint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffb6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_4Aint8_reg(i8 signext %0) {
%2 = and i8 %0, -74
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int imx_ddrc_get_ddr_type(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @imx_ddrc_get_ddr_type() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, size_t, char *, char const *, char const *);
void join_path(const char *path1, const char *path2, char *output,
               size_t size) {
  snprintf(output, size, "%s/%s", path1, path2);
}


x86 assembly (clang, -O0):
<join_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec1(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_path>:
mov    %rdx,%rax
mov    %rsi,%r8
mov    %rdi,%r9
lea    0xee0(%rip),%rdx
mov    %rax,%rdi
mov    %rcx,%rsi
mov    %r9,%rcx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s/%s\00"
define void @join_path(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %7
%10 = load i64, i64* %8
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @snprintf(i8* %9, i64 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s/%s\00"
define void @join_path(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @snprintf(i8* %2, i64 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
int ata_acpi_on_devcfg(struct ata_device *adev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ata_device = type opaque
define i32 @ata_acpi_on_devcfg(%struct.ata_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_38() {
  Assert_real((isqrt(38) == 6),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              195, ("Integer square root of 38 should be 6"));
}


x86 assembly (clang, -O0):
<t_sqrt_38>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26,%edi
call   1030 <isqrt@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0xc3,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_38>:
push   %rax
mov    $0x26,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0xc3,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 38 should be 6\00"
define void @t_sqrt_38() {
%1 = call i32 @isqrt(i32 38)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 195, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 38 should be 6\00"
define void @t_sqrt_38() {
%1 = tail call i32 @isqrt(i32 38)
%2 = icmp eq i32 %1, 6
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 195, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int liczba;
  scanf("%d", &liczba);
  return liczba % 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%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 = srem i32 %4, 3
ret i32 %5
}

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 = srem i32 %4, 3
ret i32 %5
}