xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void skipline(int n) {
  char line[1000];
  while (n) {
    fgets(line, 1000, stdin);
    n--;
  }
}


x86 assembly (clang, -O0):
<skipline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1150 <skipline+0x40>
lea    -0x3f0(%rbp),%rdi
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1030 <fgets@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    111e <skipline+0xe>
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipline>:
push   %r15
push   %r14
push   %rbx
sub    $0x3f0,%rsp
test   %edi,%edi
je     1145 <skipline+0x35>
mov    %edi,%ebx
mov    0x2ebf(%rip),%r15
mov    %rsp,%r14
nopl   0x0(%rax)
mov    (%r15),%edx
mov    %r14,%rdi
mov    $0x3e8,%esi
call   1030 <fgets@plt>
add    $0xffffffff,%ebx
jne    1130 <skipline+0x20>
add    $0x3f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @skipline(i32 %0) {
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 %0, i32* %2
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 1000, i32 %9)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, -1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @skipline(i32 %0) {
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ %0, %1 ]
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %3, i32 1000, i32 %7)
%9 = add nsw i32 %6, -1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ printf(char *);
void verificationOuvertureFichier(FILE *fichierMotCache, char motCache[]) {
  if (fichierMotCache != NULL) {
    fprintf(fichierMotCache, "%s", motCache);
    fclose(fichierMotCache);
  } else {
    printf("Impossible d'ouvrir le fichier motCache.txt");
  }
}


x86 assembly (clang, -O0):
<verificationOuvertureFichier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116d <verificationOuvertureFichier+0x3d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea6(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
jmp    1179 <verificationOuvertureFichier+0x49>
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verificationOuvertureFichier>:
test   %rdi,%rdi
je     114d <verificationOuvertureFichier+0x1d>
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
lea    0xeac(%rip),%rdi
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [44 x i8] c"Impossible d'ouvrir le fichier motCache.txt\00"
define void @verificationOuvertureFichier(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %3
%12 = call i32 @fclose(i32* %11)
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
@.str.1 = [44 x i8] c"Impossible d'ouvrir le fichier motCache.txt\00"
define void @verificationOuvertureFichier(i32* %0, i8* nocapture %1) {
%3 = icmp eq i32* %0, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @fputs(i8* %1, i32* %0)
%6 = tail call i32 @fclose(i32* %0)
br label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
int Conf1quita_espacios_finales(char *, int);
int Conf1quita_espacios_iniciales(char *, int);
Conf1LimpiaBuffer(char *buf, int len) {
  int lenp, ret;
  lenp = Conf1quita_espacios_iniciales(buf, len);
  ret = Conf1quita_espacios_finales(buf, lenp);
  return (ret);
}


x86 assembly (clang, -O0):
<Conf1LimpiaBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <Conf1quita_espacios_iniciales@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <Conf1quita_espacios_finales@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Conf1LimpiaBuffer>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Conf1quita_espacios_iniciales@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <Conf1quita_espacios_finales@plt>

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

LLVM IR (-O2):
define i32 @Conf1LimpiaBuffer(i8* %0, i32 %1) {
%3 = tail call i32 @Conf1quita_espacios_iniciales(i8* %0, i32 %1)
%4 = tail call i32 @Conf1quita_espacios_finales(i8* %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ is_prime(int);
int next_prime(int n) {
  while (is_prime(n) == 0)
    n++;
  return n;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_prime@plt>
cmp    $0x0,%rax
jne    113b <next_prime+0x2b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <next_prime+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <is_prime@plt>
add    $0x1,%ebx
test   %rax,%rax
je     1120 <next_prime+0x10>
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @next_prime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = call i64 @is_prime(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @next_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @is_prime(i32 %3)
%5 = icmp eq i64 %4, 0
%6 = add nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ my_f(int, int);
int main() { my_f(1, 2); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @my_f(i32 1, i32 2)
ret i32 0
}
zcall(sname) char *sname;
{
  ot("call ");
  outname(sname);
  nl();
}


x86 assembly (clang, -O0):
<zcall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1050 <ot@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <outname@plt>
mov    $0x0,%al
call   1030 <nl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zcall>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1050 <ot@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <outname@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <nl@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"call \00"
define i32 @zcall(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @outname to i32 (i8*, ...)*)(i8* %5)
%7 = call i32 (...) @nl()
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"call \00"
define i32 @zcall(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @ot to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outname to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (...) @nl()
ret i32 undef
}
void _Block_object_dispose() {}


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

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

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

LLVM IR (-O2):
define void @_Block_object_dispose(i8* nocapture %0, i32 %1) {
ret void
}
int expr_wrap() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @expr_wrap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_jump(short);
scalar_t__ m68ki_read_imm_16();
void m68k_op_jmp_32_aw(void) {
  m68ki_jump((signed short)(m68ki_read_imm_16()));
}


x86 assembly (clang, -O0):
<m68k_op_jmp_32_aw>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <m68ki_read_imm_16@plt>
movswl %ax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_aw>:
push   %rax
xor    %eax,%eax
call   1040 <m68ki_read_imm_16@plt>
movswl %ax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_aw() {
%1 = call i64 (...) @m68ki_read_imm_16()
%2 = trunc i64 %1 to i16
%3 = call i32 @m68ki_jump(i16 signext %2)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_aw() {
%1 = tail call i64 (...) @m68ki_read_imm_16()
%2 = trunc i64 %1 to i16
%3 = tail call i32 @m68ki_jump(i16 signext %2)
ret void
}
double geom_cross2d(const double a[2], const double b[2]) {
  return a[0] * b[1] - a[1] * b[0];
}


x86 assembly (clang, -O0):
<geom_cross2d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_cross2d>:
movsd  (%rsi),%xmm1
mulsd  0x8(%rdi),%xmm1
movsd  (%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @geom_cross2d(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double %7, double %10, double %18)
ret double %19
}

LLVM IR (-O2):
define double @geom_cross2d(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = load double, double* %1
%9 = fneg double %7
%10 = fmul double %8, %9
%11 = tail call double @llvm.fmuladd.f64(double %3, double %5, double %10)
ret double %11
}
/* Type definitions */
struct iovec {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ vectorio(int, struct iovec const *, int, int);
ssize_t writev(int fildes, const struct iovec *iov, int iovcnt) {
  return vectorio(fildes, iov, iovcnt, 2);
}


x86 assembly (clang, -O0):
<writev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x2,%ecx
call   1030 <vectorio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writev>:
mov    $0x2,%ecx
jmp    1030 <vectorio@plt>

LLVM IR (-O0):
%struct.iovec = type { i32 }
define i32 @writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.iovec*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.iovec* %1, %struct.iovec** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.iovec*, %struct.iovec** %5
%9 = load i32, i32* %6
%10 = call i32 @vectorio(i32 %7, %struct.iovec* %8, i32 %9, i32 2)
ret i32 %10
}

LLVM IR (-O2):
%struct.iovec = type { i32 }
define i32 @writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = tail call i32 @vectorio(i32 %0, %struct.iovec* %1, i32 %2, i32 2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
char **char_alloc2p(int n) {
  char **v;
  if ((v = (char **)malloc(n * sizeof(char *))) == NULL) {
    fprintf(stderr, "FATAL ERROR: Out of memory\n");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<char_alloc2p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <char_alloc2p+0x47>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_alloc2p>:
push   %rax
shl    $0x3,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <char_alloc2p+0x10>
pop    %rcx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i8** @char_alloc2p(i32 %0) {
%2 = alloca i32
%3 = alloca i8**
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 8
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8**
store i8** %9, i8*** %3
%10 = icmp eq i8** %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load i8**, i8*** %3
ret i8** %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define i8** @char_alloc2p(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %3 to i8**
ret i8** %10
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_flash_get_block_size(void *area) {
  return cfg_processor_get_hex_int_attr(area, "blocksize");
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"blocksize\00"
define i32 @cfg_flash_get_block_size(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @cfg_processor_get_hex_int_attr(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [10 x i8] c"blocksize\00"
define i32 @cfg_flash_get_block_size(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ draw_pixel(int, int);
void coordinates() {
  int x = (1024 / 2) - 1;
  int y = (768 / 2) - 1;
  for (int j = 0; j < 768; j++) {
    draw_pixel(x, j);
  }
  for (int i = 0; i < 1024; i++) {
    draw_pixel(i, y);
  }
}


x86 assembly (clang, -O0):
<coordinates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1ff,-0x4(%rbp)
movl   $0x17f,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x300,-0xc(%rbp)
jge    1153 <coordinates+0x43>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <draw_pixel@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112d <coordinates+0x1d>
movl   $0x0,-0x10(%rbp)
cmpl   $0x400,-0x10(%rbp)
jge    1180 <coordinates+0x70>
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <draw_pixel@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115a <coordinates+0x4a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coordinates>:
push   %rbx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1ff,%edi
mov    %ebx,%esi
call   1030 <draw_pixel@plt>
add    $0x1,%ebx
cmp    $0x300,%ebx
jne    1120 <coordinates+0x10>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    %ebx,%edi
mov    $0x17f,%esi
call   1030 <draw_pixel@plt>
add    $0x1,%ebx
cmp    $0x400,%ebx
jne    1140 <coordinates+0x30>
pop    %rbx
ret

LLVM IR (-O0):
define void @coordinates() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 511, i32* %1
store i32 383, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %12, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 768
br i1 %7, label %8, label %15
8: ; preds = %5
%9 = load i32, i32* %1
%10 = load i32, i32* %3
%11 = call i32 @draw_pixel(i32 %9, i32 %10)
br label %12
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
store i32 0, i32* %4
br label %16
16: ; preds = %23, %15
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 1024
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i32, i32* %4
%21 = load i32, i32* %2
%22 = call i32 @draw_pixel(i32 %20, i32 %21)
br label %23
23: ; preds = %19
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %16
26: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @coordinates() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @draw_pixel(i32 511, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 768
br i1 %5, label %7, label %1
6: ; preds = %7
ret void
7: ; preds = %1, %7
%8 = phi i32 [ %10, %7 ], [ 0, %1 ]
%9 = tail call i32 @draw_pixel(i32 %8, i32 383)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, 1024
br i1 %11, label %6, label %7
}
/* Variables and functions */
int ejtag_switch(int, int);
int mips_ejtag_read_w(unsigned int addr) {
  int data;
  addr &= 0x1fffffff;
  data = ejtag_switch(0x2001, (int)&addr);
  return data;
}


x86 assembly (clang, -O0):
<mips_ejtag_read_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1fffffff,%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %eax,%esi
mov    $0x2001,%edi
call   1030 <ejtag_switch@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mips_ejtag_read_w>:
push   %rax
and    $0x1fffffff,%edi
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2001,%edi
call   1030 <ejtag_switch@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mips_ejtag_read_w(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 536870911
store i32 %5, i32* %2
%6 = ptrtoint i32* %2 to i32
%7 = call i32 @ejtag_switch(i32 8193, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @mips_ejtag_read_w(i32 %0) {
%2 = alloca i32
%3 = and i32 %0, 536870911
store i32 %3, i32* %2
%4 = ptrtoint i32* %2 to i64
%5 = trunc i64 %4 to i32
%6 = call i32 @ejtag_switch(i32 8193, i32 %5)
ret i32 %6
}
void EVP_PKEY_get1_DH(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_get1_DH() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv, char **envp) {
  printf("\n\n\nCześć!\n\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"\0A\0A\0ACze\C5\9B\C4\87!\0A\0A\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"\0A\0A\0ACze\C5\9B\C4\87!\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_error_msg(char *);
void print_miss_br() { print_error_msg("missing closing bracket!"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"missing closing bracket!\00"
define void @print_miss_br() {
%1 = call i32 @print_error_msg(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"missing closing bracket!\00"
define void @print_miss_br() {
%1 = tail call i32 @print_error_msg(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
void free_table(char **board) {
  int i;
  i = 0;
  if (board) {
    while (board[i])
      xfree(board[i++]);
    xfree(board);
  }
}


x86 assembly (clang, -O0):
<free_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1173 <free_table+0x63>
jmp    1133 <free_table+0x23>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1168 <free_table+0x58>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <xfree@plt>
jmp    1133 <free_table+0x23>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <xfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_table>:
test   %rdi,%rdi
je     1154 <free_table+0x44>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1143 <free_table+0x33>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <xfree@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_table+0x20>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <xfree@plt>
ret

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

LLVM IR (-O2):
define void @free_table(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i64 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %12, %6 ], [ %4, %3 ]
%9 = add nuw i64 %7, 1
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @xfree to i32 (i8*, ...)*)(i8* %8)
%11 = getelementptr inbounds i8*, i8** %0, i64 %9
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %6
14: ; preds = %6, %3
%15 = tail call i32 (i8**, ...) bitcast (i32 (...)* @xfree to i32 (i8**, ...)*)(i8** %0)
br label %16
16: ; preds = %14, %1
ret void
}
void adis16300_uninitialize_ring(struct iio_ring_buffer *ring) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.iio_ring_buffer = type opaque
define void @adis16300_uninitialize_ring(%struct.iio_ring_buffer* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getsyx(int, int);
void wrap_getsyx(int *y, int *x) { getsyx(*y, *x); }


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

x86 assembly (clang, -O2):
<wrap_getsyx>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <getsyx@plt>

LLVM IR (-O0):
define void @wrap_getsyx(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @getsyx(i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @wrap_getsyx(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @getsyx(i32 %3, i32 %4)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t pki_expiration_delay(uint8_t years) {
  if (years > 68)
    years = 68;
  return years * 365 * 24 * 60 * 60;
}


x86 assembly (clang, -O0):
<pki_expiration_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x44,-0x4(%rbp)
jle    1118 <pki_expiration_delay+0x18>
movl   $0x44,-0x4(%rbp)
imul   $0x16d,-0x4(%rbp),%eax
imul   $0x18,%eax,%eax
imul   $0x3c,%eax,%eax
imul   $0x3c,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pki_expiration_delay>:
cmp    $0x44,%edi
mov    $0x44,%eax
cmovl  %edi,%eax
imul   $0x1e13380,%eax,%eax
ret

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

LLVM IR (-O2):
define i32 @pki_expiration_delay(i32 %0) {
%2 = icmp slt i32 %0, 68
%3 = select i1 %2, i32 %0, i32 68
%4 = mul i32 %3, 31536000
ret i32 %4
}
void av_get_planar_sample_fmt() {}


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

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

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

LLVM IR (-O2):
define void @av_get_planar_sample_fmt() {
ret void
}
float glmComputeVectorLength2fPow2(const float v[2]) {
  return v[0] * v[0] + v[1] * v[1];
}


x86 assembly (clang, -O0):
<glmComputeVectorLength2fPow2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorLength2fPow2>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @glmComputeVectorLength2fPow2(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
ret float %16
}

LLVM IR (-O2):
define float @glmComputeVectorLength2fPow2(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
ret float %6
}
float gem_log2(float number) { return __builtin_log2(number); }


x86 assembly (clang, -O0):
<gem_log2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <log2@plt>
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gem_log2>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <log2@plt>
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gem_log2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call double @log2(double %4)
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @gem_log2(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @log2(double %2)
%4 = fptrunc double %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
scalar_t__ SIG_ERR;
int /*<<< orphan*/ SIG_IGN;
scalar_t__ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int lw_sock_init() {
  int result = 1;
  if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<lw_sock_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
jne    114d <lw_sock_init+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lw_sock_init>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2ea9(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
@SIG_ERR = global i64 0
define i32 @lw_sock_init() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* @SIGPIPE
%3 = load i32, i32* @SIG_IGN
%4 = call i64 @signal(i32 %2, i32 %3)
%5 = load i64, i64* @SIG_ERR
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIG_IGN = global i32 0
@SIG_ERR = global i64 0
define i32 @lw_sock_init() {
%1 = load i32, i32* @SIGPIPE
%2 = load i32, i32* @SIG_IGN
%3 = tail call i64 @signal(i32 %1, i32 %2)
%4 = load i64, i64* @SIG_ERR
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct vector_char {
  int dummy;
};

/* Variables and functions */
struct vector_char *vector_char_add(struct vector_char *, char const *, int);
struct vector_char *vector_char_add_one(struct vector_char *v, const char p) {
  return vector_char_add(v, &p, 1);
}


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

x86 assembly (clang, -O2):
<vector_char_add_one>:
push   %rax
mov    %sil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <vector_char_add@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.vector_char = type { i32 }
define %struct.vector_char* @vector_char_add_one(%struct.vector_char* %0, i8 signext %1) {
%3 = alloca %struct.vector_char*
%4 = alloca i8
store %struct.vector_char* %0, %struct.vector_char** %3
store i8 %1, i8* %4
%5 = load %struct.vector_char*, %struct.vector_char** %3
%6 = call %struct.vector_char* @vector_char_add(%struct.vector_char* %5, i8* %4, i32 1)
ret %struct.vector_char* %6
}

LLVM IR (-O2):
%struct.vector_char = type { i32 }
define %struct.vector_char* @vector_char_add_one(%struct.vector_char* %0, i8 signext %1) {
%3 = alloca i8
store i8 %1, i8* %3
%4 = call %struct.vector_char* @vector_char_add(%struct.vector_char* %0, i8* %3, i32 1)
ret %struct.vector_char* %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv, char **envp) {
  char **env;
  for (env = envp; *env != 0; env++) {
    printf("%s\n", *env);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     1164 <main+0x54>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
jmp    1132 <main+0x22>
mov    0x2e75(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    (%rdx),%rsi
test   %rsi,%rsi
je     1144 <main+0x34>
mov    %rdx,%rbx
add    $0x8,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <main+0x20>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture %2) {
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %11, %6 ], [ %4, %3 ]
%8 = phi i8** [ %10, %6 ], [ %2, %3 ]
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %6
13: ; preds = %6, %3
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}
int rnd(range)
int range;
{ return random() % range; }


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

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

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

LLVM IR (-O2):
define i32 @rnd(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Type definitions */
struct comp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CloseBreezeSimulation(int);
int /*<<< orphan*/ printf(char *);
void BrzSlice_ackup(struct comp *comp, int port) {
  printf("BrzSlice_ackup: This code should never be reached\n");
  CloseBreezeSimulation(2);
}


x86 assembly (clang, -O0):
<BrzSlice_ackup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <CloseBreezeSimulation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzSlice_ackup>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
pop    %rax
jmp    1040 <CloseBreezeSimulation@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
@.str = [51 x i8] c"BrzSlice_ackup: This code should never be reached\0A\00"
define void @BrzSlice_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @CloseBreezeSimulation(i32 2)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
@str = [50 x i8] c"BrzSlice_ackup: This code should never be reached\00"
define void @BrzSlice_ackup(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @CloseBreezeSimulation(i32 2)
ret void
}
double omp_get_wtick(void) { return 0; }


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

x86 assembly (clang, -O2):
<omp_get_wtick>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @omp_get_wtick() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @omp_get_wtick() {
ret double 0.000000e+00
}
/* Variables and functions */
float __ocml_atan2_f32(float, float);
float atan2f(float x, float y) { return __ocml_atan2_f32(x, y); }


x86 assembly (clang, -O0):
<atan2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <__ocml_atan2_f32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2f>:
jmp    1030 <__ocml_atan2_f32@plt>

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

LLVM IR (-O2):
define float @atan2f(float %0, float %1) {
%3 = tail call float @__ocml_atan2_f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *noargs[]) {
  int c, n;
  scanf("%d %d", &c, &n);
  printf("%d\n", c % n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %edx,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cltd
idivl  (%rsp)
lea    0xec2(%rip),%rdi
mov    %edx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int my_access(char *str) {
  if ((access(str, X_OK) == 0)) {
    return (2);
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_access>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
jne    1144 <my_access+0x34>
movl   $0x2,-0x4(%rbp)
jmp    114b <my_access+0x3b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_access>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
add    %ecx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @my_access(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 2, i32 0
ret i32 %5
}
void gtk_handle_box_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_handle_box_new() {
ret void
}
void fmResetCard(void) {}


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

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

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

LLVM IR (-O2):
define void @fmResetCard() {
ret void
}
/* Type definitions */
struct Area {
  int dummy;
};

/* Variables and functions */
struct Area *display_X11_select_window();
struct Area *display_select_window(void) {
  return display_X11_select_window();
}


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

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

LLVM IR (-O0):
%struct.Area = type { i32 }
define %struct.Area* @display_select_window() {
%1 = call %struct.Area* (...) @display_X11_select_window()
ret %struct.Area* %1
}

LLVM IR (-O2):
%struct.Area = type { i32 }
define %struct.Area* @display_select_window() {
%1 = tail call %struct.Area* (...) @display_X11_select_window()
ret %struct.Area* %1
}
/* Variables and functions */
int /*<<< orphan*/ DI();
int /*<<< orphan*/ R_Systeminit();
void hdwinit(void) {
  DI();
  R_Systeminit();
}


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

x86 assembly (clang, -O2):
<hdwinit>:
push   %rax
xor    %eax,%eax
call   1040 <DI@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <R_Systeminit@plt>

LLVM IR (-O0):
define void @hdwinit() {
%1 = call i32 (...) @DI()
%2 = call i32 (...) @R_Systeminit()
ret void
}

LLVM IR (-O2):
define void @hdwinit() {
%1 = tail call i32 (...) @DI()
%2 = tail call i32 (...) @R_Systeminit()
ret void
}
int log_print(const char *string) {
  ((string) = (string));
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @log_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @log_print(i8* nocapture readnone %0) {
ret i32 0
}