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

/* Variables and functions */
int /*<<< orphan*/ epoll33(struct __test_metadata *);
void wrapper_epoll33(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll33(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll33>:
jmp    1030 <epoll33@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll33(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll33(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll33(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll33(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_1802(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_1802() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int rte_get_gcd(int, int);
uint32_t rte_get_lcd(uint32_t a, uint32_t b) {
  return (a * b) / rte_get_gcd(a, b);
}


x86 assembly (clang, -O0):
<rte_get_lcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <rte_get_gcd@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rte_get_lcd>:
push   %rbx
mov    %esi,%ebx
imul   %edi,%ebx
call   1030 <rte_get_gcd@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rte_get_lcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @rte_get_gcd(i32 %8, i32 %9)
%11 = sdiv i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @rte_get_lcd(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i32 @rte_get_gcd(i32 %0, i32 %1)
%5 = sdiv i32 %3, %4
ret i32 %5
}
int strlen(s)
register char *s;
{
  register char *s0 = s + 1;
  while (*s++ != '\0')
    ;
  return (s - s0);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1134 <strlen+0x34>
jmp    1114 <strlen+0x14>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %9, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
float fast_acos(float x) {
  return (-0.69813170079773212 * x * x - 0.87266462599716477) * x +
         1.5707963267948966;
}


x86 assembly (clang, -O0):
<fast_acos>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xef6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_acos>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @fast_acos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double 0xBFE657184AE7448A, %4
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = call double @llvm.fmuladd.f64(double %5, double %7, double 0xBFEBECDE5DA115A9)
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double %8, double %10, double 0x3FF921FB54442D18)
%12 = fptrunc double %11 to float
ret float %12
}

LLVM IR (-O2):
define float @fast_acos(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0xBFE657184AE7448A
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 0xBFEBECDE5DA115A9)
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double 0x3FF921FB54442D18)
%6 = fptrunc double %5 to float
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_div_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_div_sd(__m128d A, __m128d B) { return _mm_div_sd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_div_sd>:
jmp    1030 <_mm_div_sd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_div_sd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_div_sd(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, void *, size_t);
ssize_t internal_random_read(void *data, void *buffer, size_t nbytes) {
  int fd = (int)data;
  return read(fd, buffer, nbytes);
}


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

x86 assembly (clang, -O2):
<internal_random_read>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @internal_random_read(i8* %0, i8* nocapture %1, i64 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @read(i32 %5, i8* %1, i64 %2)
ret i32 %6
}
int test_imm_9Euint8_reg(unsigned char val) {
  return ((val) & (0x9E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_9Euint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 158
%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_9Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -98
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ client();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ server();
int /*<<< orphan*/ sleep(int);
int main() {
  pid_t pid;
  if ((pid = fork()) > 0) {
    server();
  } else if (pid == 0) {
    sleep(1);
    client();
  } else {
    printf("fork error\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <fork@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jle    1190 <main+0x30>
mov    $0x0,%al
call   1040 <server@plt>
jmp    11c2 <main+0x62>
cmpq   $0x0,-0x10(%rbp)
jne    11b1 <main+0x51>
mov    $0x1,%edi
call   1070 <sleep@plt>
mov    $0x0,%al
call   1050 <client@plt>
jmp    11bd <main+0x5d>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    11c2 <main+0x62>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <fork@plt>
test   %rax,%rax
jle    117b <main+0x1b>
xor    %eax,%eax
call   1040 <server@plt>
xor    %edi,%edi
call   1060 <exit@plt>
jne    1195 <main+0x35>
mov    $0x1,%edi
call   1070 <sleep@plt>
xor    %eax,%eax
call   1050 <client@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe64(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@str = [11 x i8] c"fork error\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @server()
br label %12
5: ; preds = %0
%6 = icmp eq i64 %1, 0
br i1 %6, label %7, label %10
7: ; preds = %5
%8 = tail call i32 @sleep(i32 1)
%9 = tail call i32 (...) @client()
br label %12
10: ; preds = %5
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %12
12: ; preds = %7, %10, %3
%13 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int isinf(double);
int igraph_is_posinf(double x) { return isinf(x) == 1; }


x86 assembly (clang, -O0):
<igraph_is_posinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <isinf@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<igraph_is_posinf>:
push   %rax
call   1030 <isinf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @igraph_is_posinf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @isinf(double %3)
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @igraph_is_posinf(double %0) {
%2 = tail call i32 @isinf(double %0)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
int libiconv_close(int /*<<< orphan*/);
int iconv_close(iconv_t cd) { return libiconv_close(cd); }


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

x86 assembly (clang, -O2):
<iconv_close>:
jmp    1030 <libiconv_close@plt>

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

LLVM IR (-O2):
define i32 @iconv_close(i32 %0) {
%2 = tail call i32 @libiconv_close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *getsmallvalue(char *p, char *buf) {
  int len = *p++;
  memcpy(buf, p, len);
  buf[len] = '\0';
  return p + len;
}


x86 assembly (clang, -O0):
<getsmallvalue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsmallvalue>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rdi),%rsi
movsbq (%rdi),%rbx
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%r14,%rbx,1)
lea    (%r15,%rbx,1),%rax
add    $0x1,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @getsmallvalue(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
ret i8* %21
}

LLVM IR (-O2):
define i8* @getsmallvalue(i8* %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %0
%5 = sext i8 %4 to i32
%6 = tail call i32 @memcpy(i8* %1, i8* %3, i32 %5)
%7 = sext i8 %4 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 0, i8* %8
%9 = getelementptr inbounds i8, i8* %3, i64 %7
ret i8* %9
}
void RTHandleTableFree(void) {}


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

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

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

LLVM IR (-O2):
define void @RTHandleTableFree() {
ret void
}
void g_source_set_can_recurse() {}


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

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

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

LLVM IR (-O2):
define void @g_source_set_can_recurse() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fxtract() {
  db(0xD9);
  db(0xF4);
}


x86 assembly (clang, -O0):
<fxtract>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf4,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxtract>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf4,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fxtract() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 244)
ret void
}

LLVM IR (-O2):
define void @fxtract() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 244)
ret void
}
/* Variables and functions */
int syscall(int, int, char const *, int, char const *);
int renameat(int oldfd, const char *old, int newfd, const char *new) {
  return syscall(329, oldfd, old, newfd, new);
}


x86 assembly (clang, -O0):
<renameat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    $0x149,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renameat>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x149,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @renameat(i32 %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @syscall(i32 329, i32 %0, i8* %1, i32 %2, i8* %3)
ret i32 %5
}
int test01(unsigned char *a, unsigned char *b, int c, int d) {
  if (*a & *b)
    return c;
  return d;
}


x86 assembly (clang, -O0):
<test01>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1136 <test01+0x36>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <test01+0x3c>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test01>:
mov    %edx,%eax
mov    (%rsi),%dl
test   %dl,(%rdi)
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test01(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = load i8, i8* %0
%6 = load i8, i8* %1
%7 = and i8 %6, %5
%8 = icmp eq i8 %7, 0
%9 = select i1 %8, i32 %3, i32 %2
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ bitmap_bit_order;
};
typedef TYPE_1__ XImage;

/* Variables and functions */
int get_XImage_bitmap_bit_order(void *_p) {
  return (int)((XImage *)_p)->bitmap_bit_order;
}


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

x86 assembly (clang, -O2):
<get_XImage_bitmap_bit_order>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XImage_bitmap_bit_order(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XImage_bitmap_bit_order(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void BootIRQ_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @BootIRQ_Interrupt() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("hello"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define void @hello() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void read_flashram_statusd() { printf("read_flashram_statusd\n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"read_flashram_statusd\00"
define void @read_flashram_statusd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned xrop3_83_1_1(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;
  unsigned stk3;
  stk3 = D ^ S;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_83_1_1>:
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
xor    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -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    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_83_1_1>:
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,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_83_1_1(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
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %7
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %6
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = xor i32 %32, -1
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %7
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
%45 = load i32, i32* %5
%46 = load i32, i32* %7
%47 = and i32 %45, %46
%48 = or i32 %44, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @xrop3_83_1_1(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 i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
int arrayContains(int *array, int length, int element) {
  for (int i = 0; i < length; i++) {
    if (array[i] == element)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<arrayContains>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <arrayContains+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <arrayContains+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <arrayContains+0x5b>
jmp    1146 <arrayContains+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <arrayContains+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayContains>:
test   %esi,%esi
jle    113a <arrayContains+0x3a>
mov    $0x1,%eax
cmp    %edx,(%rdi)
je     1139 <arrayContains+0x39>
mov    %esi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rsi
cmp    %rax,%rcx
je     1131 <arrayContains+0x31>
lea    0x1(%rsi),%rax
cmp    %edx,(%rdi,%rsi,4)
jne    1120 <arrayContains+0x20>
xor    %eax,%eax
cmp    %rcx,%rsi
setb   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @arrayContains(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
br label %9
9: ; preds = %23, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %26
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* %17
%19 = load i32, i32* %7
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %22
21: ; preds = %13
store i32 1, i32* %4
br label %27
22: ; preds = %13
br label %23
23: ; preds = %22
%24 = load i32, i32* %8
%25 = add nsw i32 %24, 1
store i32 %25, i32* %8
br label %9
26: ; preds = %9
store i32 0, i32* %4
br label %27
27: ; preds = %26, %21
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @arrayContains(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = zext i32 %1 to i64
%8 = load i32, i32* %0
%9 = icmp eq i32 %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp ult i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %20, %18 ]
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ companies_add_single(int);
int /*<<< orphan*/ companies_sort();
void companies_init(void) {
  int i;
  for (i = 0; i < 200; i++) {
    companies_add_single(i);
  }
  companies_sort();
}


x86 assembly (clang, -O0):
<companies_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xc8,-0x4(%rbp)
jge    1152 <companies_init+0x32>
mov    -0x4(%rbp),%edi
call   1040 <companies_add_single@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <companies_init+0xf>
mov    $0x0,%al
call   1030 <companies_sort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<companies_init>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1040 <companies_add_single@plt>
add    $0x1,%ebx
cmp    $0xc8,%ebx
jne    1130 <companies_init+0x10>
xor    %eax,%eax
pop    %rbx
jmp    1030 <companies_sort@plt>

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

LLVM IR (-O2):
define void @companies_init() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @companies_add_single(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 200
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 (...) @companies_sort()
ret void
}
float moyennetab2(float somme, int N) {
  float moyenne;
  moyenne = ((somme) / (float)N);
  return (moyenne);
}


x86 assembly (clang, -O0):
<moyennetab2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<moyennetab2>:
cvtsi2ss %edi,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @moyennetab2(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
%6 = load float, float* %3
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to float
%9 = fdiv float %6, %8
store float %9, float* %5
%10 = load float, float* %5
ret float %10
}

LLVM IR (-O2):
define float @moyennetab2(float %0, i32 %1) {
%3 = sitofp i32 %1 to float
%4 = fdiv float %0, %3
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
unsigned long read32(int /*<<< orphan*/ *);
int /*<<< orphan*/ readData(unsigned long, int /*<<< orphan*/ *);
int blockhunk(FILE *fp) {
  unsigned long size = read32(fp);
  printf("Size in long words = %lu\n", size);
  readData(size * 4, fp);
  return 0;
}


x86 assembly (clang, -O0):
<blockhunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <read32@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
shl    $0x2,%rdi
mov    -0x8(%rbp),%rsi
call   1040 <readData@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockhunk>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <read32@plt>
mov    %rax,%rbx
lea    0xeba(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
shl    $0x2,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <readData@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Size in long words = %lu\0A\00"
define i32 @blockhunk(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i64 @read32(i32* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %6)
%8 = load i64, i64* %3
%9 = mul i64 %8, 4
%10 = load i32*, i32** %2
%11 = call i32 @readData(i64 %9, i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Size in long words = %lu\0A\00"
define i32 @blockhunk(i32* %0) {
%2 = tail call i64 @read32(i32* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %2)
%4 = shl i64 %2, 2
%5 = tail call i32 @readData(i64 %4, i32* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void adrs(int b) {
  printf("%d.%d.%d.%d ", b & 0xFF, b >> 8 & 0xFF, b >> 16 & 0xFF,
         b >> 24 & 0xFF);
}


x86 assembly (clang, -O0):
<adrs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xff,%esi
mov    -0x4(%rbp),%edx
sar    $0x8,%edx
and    $0xff,%edx
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x4(%rbp),%r8d
sar    $0x18,%r8d
and    $0xff,%r8d
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrs>:
mov    %edi,%eax
movzbl %al,%esi
movzbl %ah,%edx
mov    %edi,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
shr    $0x18,%eax
lea    0xed6(%rip),%rdi
mov    %eax,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%d.%d.%d.%d \00"
define void @adrs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = load i32, i32* %2
%9 = ashr i32 %8, 16
%10 = and i32 %9, 255
%11 = load i32, i32* %2
%12 = ashr i32 %11, 24
%13 = and i32 %12, 255
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7, i32 %10, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d.%d.%d.%d \00"
define void @adrs(i32 %0) {
%2 = and i32 %0, 255
%3 = lshr i32 %0, 8
%4 = and i32 %3, 255
%5 = lshr i32 %0, 16
%6 = and i32 %5, 255
%7 = lshr i32 %0, 24
%8 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %7)
ret void
}
void pcp_def_net_eip6_metrics(void) {}


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

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

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

LLVM IR (-O2):
define void @pcp_def_net_eip6_metrics() {
ret void
}
int ipow(int base, int exp) {
  int value = 1;
  while (exp) {
    if (exp & 1) {
      value *= base;
    }
    exp >>= 1;
    base *= base;
  }
  return value;
}


x86 assembly (clang, -O0):
<ipow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <ipow+0x4c>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <ipow+0x34>
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <ipow+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow>:
test   %esi,%esi
je     113a <ipow+0x3a>
mov    $0x1,%r8d
mov    $0x1,%eax
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   $0x1,%sil
mov    %edi,%ecx
cmove  %r8d,%ecx
imul   %ecx,%eax
sar    %edx
imul   %edi,%edi
cmp    $0x1,%esi
mov    %edx,%esi
ja     1120 <ipow+0x20>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ipow(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 1, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = phi i32 [ %13, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 1, i32 %7
%11 = mul nsw i32 %10, %5
%12 = ashr i32 %6, 1
%13 = mul nsw i32 %7, %7
%14 = icmp ult i32 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i32 [ 1, %2 ], [ %11, %4 ]
ret i32 %16
}
unsigned char __mp_logtwo(unsigned long n) {
  unsigned char l;
  for (l = 0; n > 0; l++, n >>= 1)
    ;
  return (unsigned char)((l == 0) ? 0 : l - 1);
}


x86 assembly (clang, -O0):
<__mp_logtwo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    1135 <__mp_logtwo+0x35>
jmp    111c <__mp_logtwo+0x1c>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <__mp_logtwo+0xc>
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    114c <__mp_logtwo+0x4c>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <__mp_logtwo+0x56>
movzbl -0x9(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mp_logtwo>:
test   %rdi,%rdi
je     111f <__mp_logtwo+0x1f>
mov    $0xff,%al
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%al
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <__mp_logtwo+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i8 @__mp_logtwo(i64 %0) {
%2 = alloca i64
%3 = alloca i8
store i64 %0, i64* %2
store i8 0, i8* %3
br label %4
4: ; preds = %8, %1
%5 = load i64, i64* %2
%6 = icmp ugt i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
br label %8
8: ; preds = %7
%9 = load i8, i8* %3
%10 = add i8 %9, 1
store i8 %10, i8* %3
%11 = load i64, i64* %2
%12 = lshr i64 %11, 1
store i64 %12, i64* %2
br label %4
13: ; preds = %4
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
br label %22
18: ; preds = %13
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = sub nsw i32 %20, 1
br label %22
22: ; preds = %18, %17
%23 = phi i32 [ 0, %17 ], [ %21, %18 ]
%24 = trunc i32 %23 to i8
ret i8 %24
}

LLVM IR (-O2):
define zeroext i8 @__mp_logtwo(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i8 %4, 1
%7 = lshr i64 %5, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8 [ 0, %1 ], [ %4, %3 ]
ret i8 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
void border_clr_mask(volatile uint32_t reg, uint32_t mask) {
  *(&reg) &= ~mask;
  *(&reg) &= ~mask;
}


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

x86 assembly (clang, -O2):
<border_clr_mask>:
mov    %edi,-0x4(%rsp)
mov    %esi,-0x8(%rsp)
mov    -0x8(%rsp),%eax
not    %eax
and    %eax,-0x4(%rsp)
mov    -0x8(%rsp),%eax
not    %eax
and    %eax,-0x4(%rsp)
ret

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

LLVM IR (-O2):
define void @border_clr_mask(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %0, i32* %3
store volatile i32 %1, i32* %4
%5 = load volatile i32, i32* %4
%6 = xor i32 %5, -1
%7 = load volatile i32, i32* %3
%8 = and i32 %7, %6
store volatile i32 %8, i32* %3
%9 = load volatile i32, i32* %4
%10 = xor i32 %9, -1
%11 = load volatile i32, i32* %3
%12 = and i32 %11, %10
store volatile i32 %12, i32* %3
ret void
}
int rearValue(int Q[], int *front, int *rear) {
  if (*rear != -1)
    return Q[*rear];
  else
    return -9999999;
}


x86 assembly (clang, -O0):
<rearValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     1133 <rearValue+0x33>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    113a <rearValue+0x3a>
movl   $0xff676981,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rearValue>:
movslq (%rdx),%rax
cmp    $0xffffffffffffffff,%rax
je     110d <rearValue+0xd>
mov    (%rdi,%rax,4),%eax
ret
mov    $0xff676981,%eax
ret

LLVM IR (-O0):
define i32 @rearValue(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** %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, -1
br i1 %10, label %11, label %18
11: ; preds = %3
%12 = load i32*, i32** %5
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %4
br label %19
18: ; preds = %3
store i32 -9999999, i32* %4
br label %19
19: ; preds = %18, %11
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @rearValue(i32* nocapture %0, i32* nocapture readnone %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, -1
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %3, %6
%11 = phi i32 [ %9, %6 ], [ -9999999, %3 ]
ret i32 %11
}
void ntt_cleanup(struct ntt_node **node) { ; }


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

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

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

LLVM IR (-O2):
%struct.ntt_node = type opaque
define void @ntt_cleanup(%struct.ntt_node** nocapture %0) {
ret void
}
int sq(int n) { return n * n; }


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

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

LLVM IR (-O0):
define i32 @sq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @sq(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t readl(unsigned long addr) { return *(volatile uint32_t *)addr; }


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

x86 assembly (clang, -O2):
<readl>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @readl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @readl(i64 %0) {
%2 = inttoptr i64 %0 to i32*
%3 = load volatile i32, i32* %2
ret i32 %3
}
int ft_isalpha(int c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
}


x86 assembly (clang, -O0):
<ft_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <ft_isalpha+0x20>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <ft_isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <ft_isalpha+0x39>
cmpl   $0x7a,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 122
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
int int_compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }


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

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

LLVM IR (-O0):
define i32 @int_compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @int_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}