xunge/DecIR huggingface dataset:
unsigned long hash_key(char *key) {
  unsigned long hash = 5381;
  int c;
  while ((c = *key++) != 0) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash % 101;
}


x86 assembly (clang, -O0):
<hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash_key+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_key+0x10>
mov    -0x10(%rbp),%rax
mov    $0x65,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_key>:
mov    (%rdi),%al
test   %al,%al
je     1157 <hash_key+0x57>
add    $0x1,%rdi
mov    $0x1505,%ecx
nop
mov    %rcx,%rdx
shl    $0x5,%rdx
add    %rcx,%rdx
movsbq %al,%rcx
add    %rdx,%rcx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash_key+0x10>
movabs $0x446f86562d9faee5,%rdx
86 6f 44
mov    %rcx,%rax
mul    %rdx
mov    %rcx,%rax
sub    %rdx,%rax
shr    %rax
add    %rdx,%rax
shr    $0x6,%rax
imul   $0x65,%rax,%rax
sub    %rax,%rcx
mov    %rcx,%rax
ret
mov    $0x1c,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_key(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i64 %11, 101
br label %16
16: ; preds = %14, %1
%17 = phi i64 [ 28, %1 ], [ %15, %14 ]
ret i64 %17
}
/* Variables and functions */
scalar_t__ rand();
int main() {
  volatile float a = (float)rand();
  float x = a * 0.5;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x4(%rsp),%xmm0
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = call i64 (...) @rand()
%4 = sitofp i64 %3 to float
store volatile float %4, float* %1
%5 = load volatile float, float* %1
%6 = fpext float %5 to double
%7 = fmul double %6, 5.000000e-01
%8 = fptrunc double %7 to float
store float %8, float* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
store volatile float %4, float* %1
%5 = load volatile float, float* %1
ret i32 0
}
/* Type definitions */
struct xp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ xpError(struct xp *, char *);
void xpUnexpectedEof(struct xp *xp) { xpError(xp, "Unexpected end of file."); }


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

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

LLVM IR (-O0):
%struct.xp = type { i32 }
@.str = [24 x i8] c"Unexpected end of file.\00"
define void @xpUnexpectedEof(%struct.xp* %0) {
%2 = alloca %struct.xp*
store %struct.xp* %0, %struct.xp** %2
%3 = load %struct.xp*, %struct.xp** %2
%4 = call i32 @xpError(%struct.xp* %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.xp = type { i32 }
@.str = [24 x i8] c"Unexpected end of file.\00"
define void @xpUnexpectedEof(%struct.xp* %0) {
%2 = tail call i32 @xpError(%struct.xp* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_stub_without_call_stub();
int test_stub_without_call() {
  int iloop;
  for (iloop = 0; iloop < 5; iloop++) {
    test_stub_without_call_stub();
  }
  return 0;
}


x86 assembly (clang, -O0):
<test_stub_without_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    113e <test_stub_without_call+0x2e>
mov    $0x0,%al
call   1030 <test_stub_without_call_stub@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <test_stub_without_call+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_stub_without_call() {
%1 = tail call i32 (...) @test_stub_without_call_stub()
%2 = tail call i32 (...) @test_stub_without_call_stub()
%3 = tail call i32 (...) @test_stub_without_call_stub()
%4 = tail call i32 (...) @test_stub_without_call_stub()
%5 = tail call i32 (...) @test_stub_without_call_stub()
ret i32 0
}
void scale2x_tiles8(void *dst, const void *src, int w8, int h) {}


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

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

LLVM IR (-O0):
define void @scale2x_tiles8(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @scale2x_tiles8(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pac_nacepin(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Vavedi broi bidoni c nacepin :\n");
  scanf(" %d", &n);
  pac_nacepin(n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <pac_nacepin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Vavedi broi bidoni c nacepin :\0A\00"
@.str.1 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @pac_nacepin(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c" %d\00"
@str = [31 x i8] c"Vavedi broi bidoni c nacepin :\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @pac_nacepin(i32 %5)
ret i32 0
}
int csum(double *a, double *b, double *c) {
  *c = *a + *b;
  return 0;
}


x86 assembly (clang, -O0):
<csum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @csum(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = load double*, double** %5
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = load double*, double** %6
store double %11, double* %12
ret i32 0
}

LLVM IR (-O2):
define i32 @csum(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fadd double %4, %5
store double %6, double* %2
ret i32 0
}
void tamanho(int b, float *kb, float *mb) {
  *kb = b / 1024.0;
  *mb = *kb / 1024;
}


x86 assembly (clang, -O0):
<tamanho>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  0xec4(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tamanho>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rsi)
mulss  0xeec(%rip),%xmm0
movss  %xmm0,(%rdx)
ret

LLVM IR (-O0):
define void @tamanho(i32 %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
store i32 %0, i32* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 1.024000e+03
%10 = fptrunc double %9 to float
%11 = load float*, float** %5
store float %10, float* %11
%12 = load float*, float** %5
%13 = load float, float* %12
%14 = fdiv float %13, 1.024000e+03
%15 = load float*, float** %6
store float %14, float* %15
ret void
}

LLVM IR (-O2):
define void @tamanho(i32 %0, float* nocapture writeonly %1, float* nocapture writeonly %2) {
%4 = sitofp i32 %0 to double
%5 = fmul double %4, 0x3F50000000000000
%6 = fptrunc double %5 to float
store float %6, float* %1
%7 = fmul float %6, 0x3F50000000000000
store float %7, float* %2
ret void
}
int zfile_is_compressed(struct file *file) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define i32 @zfile_is_compressed(%struct.file* nocapture readnone %0) {
ret i32 0
}
float G1(float ndw, float k) { return 1.0 / (ndw * (1.0 - k) + k); }


x86 assembly (clang, -O0):
<G1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed8(%rip),%xmm2
subsd  %xmm0,%xmm2
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xebb(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<G1>:
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
movsd  0xef0(%rip),%xmm2
movapd %xmm2,%xmm3
subsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @G1(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 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = fsub double 1.000000e+00, %8
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double %6, double %9, double %11)
%13 = fdiv double 1.000000e+00, %12
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @G1(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = fsub double 1.000000e+00, %4
%6 = tail call double @llvm.fmuladd.f64(double %3, double %5, double %4)
%7 = fdiv double 1.000000e+00, %6
%8 = fptrunc double %7 to float
ret float %8
}
/* Type definitions */
struct in6_addr {
  int dummy;
};
struct in6_pktinfo {
  int ipi6_ifindex;
  struct in6_addr ipi6_addr;
};

/* Variables and functions */
void ptm_util_extract_ipv6_pkt_info(void *data, int *ifindex,
                                    struct in6_addr *ip6_addr) {
  struct in6_pktinfo *pi6 = (struct in6_pktinfo *)data;
  *ip6_addr = pi6->ipi6_addr;
  *ifindex = pi6->ipi6_ifindex;
}


x86 assembly (clang, -O0):
<ptm_util_extract_ipv6_pkt_info>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    0x4(%rcx),%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptm_util_extract_ipv6_pkt_info>:
mov    0x4(%rdi),%eax
mov    %eax,(%rdx)
mov    (%rdi),%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
%struct.in6_pktinfo = type { i32, %struct.in6_addr }
define void @ptm_util_extract_ipv6_pkt_info(i8* %0, i32* %1, %struct.in6_addr* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca %struct.in6_addr*
%7 = alloca %struct.in6_pktinfo*
store i8* %0, i8** %4
store i32* %1, i32** %5
store %struct.in6_addr* %2, %struct.in6_addr** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to %struct.in6_pktinfo*
store %struct.in6_pktinfo* %9, %struct.in6_pktinfo** %7
%10 = load %struct.in6_addr*, %struct.in6_addr** %6
%11 = load %struct.in6_pktinfo*, %struct.in6_pktinfo** %7
%12 = getelementptr inbounds %struct.in6_pktinfo, %struct.in6_pktinfo* %11, i32 0, i32 1
%13 = bitcast %struct.in6_addr* %10 to i8*
%14 = bitcast %struct.in6_addr* %12 to i8*
%15 = load %struct.in6_pktinfo*, %struct.in6_pktinfo** %7
%16 = getelementptr inbounds %struct.in6_pktinfo, %struct.in6_pktinfo* %15, i32 0, i32 0
%17 = load i32, i32* %16
%18 = load i32*, i32** %5
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
define void @ptm_util_extract_ipv6_pkt_info(i8* nocapture %0, i32* nocapture writeonly %1, %struct.in6_addr* nocapture writeonly %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = bitcast i8* %4 to i32*
%6 = getelementptr %struct.in6_addr, %struct.in6_addr* %2, i64 0, i32 0
%7 = load i32, i32* %5
store i32 %7, i32* %6
%8 = bitcast i8* %0 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %1
ret void
}
/* Variables and functions */
scalar_t__ errno;
char const *strerror(scalar_t__);
const char *forth_strerror(void) {
  static const char *unknown = "unknown reason";
  const char *r = errno ? strerror(errno) : unknown;
  if (!r)
    r = unknown;
  return r;
}


x86 assembly (clang, -O0):
<forth_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
cmpq   $0x0,(%rax)
je     1141 <forth_strerror+0x31>
mov    0x2eb0(%rip),%rax
mov    (%rax),%rdi
call   1030 <strerror@plt>
mov    %rax,-0x10(%rbp)
jmp    114c <forth_strerror+0x3c>
mov    0x2ee0(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    116a <forth_strerror+0x5a>
mov    0x2ec2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<forth_strerror>:
push   %rbx
mov    0x2ec8(%rip),%rax
mov    (%rax),%rdi
lea    0xede(%rip),%rbx
mov    %rbx,%rax
test   %rdi,%rdi
je     112f <forth_strerror+0x1f>
call   1030 <strerror@plt>
test   %rax,%rax
cmovne %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@forth_strerror.unknown = internal global i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0)
@.str = [15 x i8] c"unknown reason\00"
@errno = global i64 0
define i8* @forth_strerror() {
%1 = alloca i8*
%2 = load i64, i64* @errno
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i64, i64* @errno
%6 = call i8* @strerror(i64 %5)
br label %9
7: ; preds = %0
%8 = load i8*, i8** @forth_strerror.unknown
br label %9
9: ; preds = %7, %4
%10 = phi i8* [ %6, %4 ], [ %8, %7 ]
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = icmp ne i8* %11, null
br i1 %12, label %15, label %13
13: ; preds = %9
%14 = load i8*, i8** @forth_strerror.unknown
store i8* %14, i8** %1
br label %15
15: ; preds = %13, %9
%16 = load i8*, i8** %1
ret i8* %16
}

LLVM IR (-O2):
@.str = [15 x i8] c"unknown reason\00"
@errno = global i64 0
define i8* @forth_strerror() {
%1 = load i64, i64* @errno
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* @strerror(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), %0 ]
%7 = icmp eq i8* %6, null
%8 = select i1 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6
ret i8* %8
}
__attribute__((always_)) char *strcpy(char *dest, const char *src) {
  int d0, d1, d2;
  __asm__ __volatile__("1:\tlodsb\n\t"
                       "stosb\n\t"
                       "testb %%al,%%al\n\t"
                       "jne 1b"
                       : "=&S"(d0), "=&D"(d1), "=&a"(d2)
                       : "0"(src), "1"(dest)
                       : "memory");
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1114 <strcpy+0x14>
mov    %esi,%ecx
mov    %ecx,-0x14(%rbp)
mov    %edi,%ecx
mov    %ecx,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rcx
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1103 <strcpy+0x3>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %8, i8* %9)
%11 = extractvalue { i8*, i8*, i32 } %10, 0
%12 = extractvalue { i8*, i8*, i32 } %10, 1
%13 = extractvalue { i8*, i8*, i32 } %10, 2
%14 = ptrtoint i8* %11 to i64
%15 = trunc i64 %14 to i32
store i32 %15, i32* %5
%16 = ptrtoint i8* %12 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
store i32 %13, i32* %7
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned %0, i8* %1) {
%3 = tail call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ gc1(char *);
int /*<<< orphan*/ gc2(char *);
void gc_() {
  gc1("user requested");
  gc2("user requested");
}


x86 assembly (clang, -O0):
<gc_>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <gc1@plt>
lea    0xec9(%rip),%rdi
call   1040 <gc2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <gc1@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <gc2@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"user requested\00"
define void @gc_() {
%1 = call i32 @gc1(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gc2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"user requested\00"
define void @gc_() {
%1 = tail call i32 @gc1(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gc2(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_95() {
  Assert_real((isqrt(95) == 9),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              480, ("Integer square root of 95 should be 9"));
}


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

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

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

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 95 should be 9\00"
define void @t_sqrt_95() {
%1 = tail call i32 @isqrt(i32 95)
%2 = icmp eq i32 %1, 9
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ domain_name_cache_lookup(char const *, char *);
scalar_t__ domain_name_cache_lookup_reverse(char *, char *);
int domain_name_cache_canonical(const char *name_or_addr, char *cname) {
  char addr[256];
  return domain_name_cache_lookup(name_or_addr, addr) &&
         domain_name_cache_lookup_reverse(addr, cname);
}


x86 assembly (clang, -O0):
<domain_name_cache_canonical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1030 <domain_name_cache_lookup@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x111(%rbp)
je     1175 <domain_name_cache_canonical+0x55>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <domain_name_cache_lookup_reverse@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x111(%rbp)
mov    -0x111(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<domain_name_cache_canonical>:
push   %rbx
sub    $0x100,%rsp
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <domain_name_cache_lookup@plt>
test   %rax,%rax
je     1150 <domain_name_cache_canonical+0x30>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <domain_name_cache_lookup_reverse@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1152 <domain_name_cache_canonical+0x32>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @domain_name_cache_canonical(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [256 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%8 = call i64 @domain_name_cache_lookup(i8* %6, i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %4
%13 = call i64 @domain_name_cache_lookup_reverse(i8* %11, i8* %12)
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %10, %2
%16 = phi i1 [ false, %2 ], [ %14, %10 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @domain_name_cache_canonical(i8* %0, i8* %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i64 @domain_name_cache_lookup(i8* %0, i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = call i64 @domain_name_cache_lookup_reverse(i8* %4, i8* %1)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %2
%12 = phi i32 [ 0, %2 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcasecmp(char *, char *);
void strcasecmp_1() {
  char *x = "Bcd";
  char *y = "abc";
  clang_analyzer_eval(strcasecmp(x, y) == 1);
}


x86 assembly (clang, -O0):
<strcasecmp_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcasecmp_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"Bcd\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strcasecmp_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcasecmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"Bcd\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strcasecmp_1() {
%1 = tail call i32 @strcasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("set    3rd bit of 0x0FF0 : %x\n", ((0x0FF0) | (0x1 << (3))));
  printf("clear  8th bit of 0x0FF0 : %x\n", ((0x0FF0) & (~(0x1 << (8)))));
  printf("toggle 8th bit of 0x0FF0 : %x\n", ((0x0FF0) ^ (0x1 << (8))));
  printf("toggle 3rd bit of 0x0FF0 : %x\n", ((0x0FF0) ^ (0x1 << (3))));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xff8,%esi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0xef0,%esi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    $0xef0,%esi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0xff8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"set 3rd bit of 0x0FF0 : %x\0A\00"
@.str.1 = [31 x i8] c"clear 8th bit of 0x0FF0 : %x\0A\00"
@.str.2 = [31 x i8] c"toggle 8th bit of 0x0FF0 : %x\0A\00"
@.str.3 = [31 x i8] c"toggle 3rd bit of 0x0FF0 : %x\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 4088)
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 3824)
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 3824)
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 4088)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"set 3rd bit of 0x0FF0 : %x\0A\00"
@.str.1 = [31 x i8] c"clear 8th bit of 0x0FF0 : %x\0A\00"
@.str.2 = [31 x i8] c"toggle 8th bit of 0x0FF0 : %x\0A\00"
@.str.3 = [31 x i8] c"toggle 3rd bit of 0x0FF0 : %x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 4088)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 3824)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 3824)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i32 4088)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello, World!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @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"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = 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 */
unsigned int f01(unsigned int);
unsigned int f02(unsigned int a) { return f01(f01(a)); }


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

x86 assembly (clang, -O2):
<f02>:
push   %rax
call   1030 <f01@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f01@plt>

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

LLVM IR (-O2):
define i32 @f02(i32 %0) {
%2 = tail call i32 @f01(i32 %0)
%3 = tail call i32 @f01(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int version_string(int *, char *);
int greetings(void) {
  int fail, n;
  char s[40];
  fail = version_string(&n, s);
  if (fail == 0)
    printf("Testing the scaling in %s ...\n", s);
  return fail;
}


x86 assembly (clang, -O0):
<greetings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rsi
lea    -0x8(%rbp),%rdi
call   1040 <version_string@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1152 <greetings+0x32>
lea    -0x30(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greetings>:
push   %rbx
sub    $0x40,%rsp
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <version_string@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    114b <greetings+0x2b>
lea    0xebf(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Testing the scaling in %s ...\0A\00"
define i32 @greetings() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [40 x i8]
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%5 = call i32 @version_string(i32* %2, i8* %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %0
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [31 x i8] c"Testing the scaling in %s ...\0A\00"
define i32 @greetings() {
%1 = alloca i32
%2 = alloca [40 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%5 = call i32 @version_string(i32* %1, i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %9
9: ; preds = %7, %0
ret i32 %5
}
int f_digs(int n, int *f) {
  int s = 0;
  while (n > 0) {
    s += f[n % 10];
    n /= 10;
  }
  return s;
}


x86 assembly (clang, -O0):
<f_digs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1152 <f_digs+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    1112 <f_digs+0x12>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_digs>:
xor    %eax,%eax
test   %edi,%edi
jle    1130 <f_digs+0x30>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%r9d
mov    %edi,%ecx
sub    %r9d,%ecx
add    (%rsi,%rcx,4),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <f_digs+0x10>
ret

LLVM IR (-O0):
define i32 @f_digs(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 0, i32* %5
br label %6
6: ; preds = %9, %2
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = load i32*, i32** %4
%11 = load i32, i32* %3
%12 = srem i32 %11, 10
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %10, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = add nsw i32 %16, %15
store i32 %17, i32* %5
%18 = load i32, i32* %3
%19 = sdiv i32 %18, 10
store i32 %19, i32* %3
br label %6
20: ; preds = %6
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @f_digs(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 0, %2 ]
%6 = phi i32 [ %12, %4 ], [ %0, %2 ]
%7 = urem i32 %6, 10
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = add nsw i32 %10, %5
%12 = udiv i32 %6, 10
%13 = icmp ult i32 %6, 10
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ activity_guide_call_get_context();
int /*<<< orphan*/ activity_manager_start_activity(int /*<<< orphan*/);
void start_this_activity() {
  activity_manager_start_activity(activity_guide_call_get_context());
}


x86 assembly (clang, -O0):
<start_this_activity>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <activity_guide_call_get_context@plt>
mov    %eax,%edi
call   1030 <activity_manager_start_activity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_this_activity>:
push   %rax
xor    %eax,%eax
call   1040 <activity_guide_call_get_context@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <activity_manager_start_activity@plt>

LLVM IR (-O0):
define void @start_this_activity() {
%1 = call i32 (...) @activity_guide_call_get_context()
%2 = call i32 @activity_manager_start_activity(i32 %1)
ret void
}

LLVM IR (-O2):
define void @start_this_activity() {
%1 = tail call i32 (...) @activity_guide_call_get_context()
%2 = tail call i32 @activity_manager_start_activity(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fwarning(char *, char const *);
void warning_feature_disabled(const char *feature) {
  fwarning("%s feature is disabled in Firejail configuration file\n", feature);
}


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

x86 assembly (clang, -O2):
<warning_feature_disabled>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <fwarning@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"%s feature is disabled in Firejail configuration file\0A\00"
define void @warning_feature_disabled(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fwarning(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [55 x i8] c"%s feature is disabled in Firejail configuration file\0A\00"
define void @warning_feature_disabled(i8* %0) {
%2 = tail call i32 @fwarning(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime(scalar_t__ *);
int /*<<< orphan*/ strftime(char *, int, char const *, struct tm *);
scalar_t__ time(int /*<<< orphan*/ *);
char *qtime_gmt_strf(char *buf, int size, time_t utctime, const char *format) {
  if (utctime == 0)
    utctime = time(NULL);
  struct tm *gmtm = gmtime(&utctime);
  strftime(buf, size, format, gmtm);
  return buf;
}


x86 assembly (clang, -O0):
<qtime_gmt_strf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <qtime_gmt_strf+0x2f>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1050 <gmtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qtime_gmt_strf>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rdx,0x8(%rsp)
test   %rdx,%rdx
jne    1156 <qtime_gmt_strf+0x26>
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1050 <gmtime@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1040 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @qtime_gmt_strf(i8* %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca %struct.tm*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%10 = load i64, i64* %7
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = call i64 @time(i32* null)
store i64 %13, i64* %7
br label %14
14: ; preds = %12, %4
%15 = call %struct.tm* @gmtime(i64* %7)
store %struct.tm* %15, %struct.tm** %9
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = load i8*, i8** %8
%19 = load %struct.tm*, %struct.tm** %9
%20 = call i32 @strftime(i8* %16, i32 %17, i8* %18, %struct.tm* %19)
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @qtime_gmt_strf(i8* returned %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca i64
store i64 %2, i64* %5
%6 = icmp eq i64 %2, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i64 @time(i32* null)
store i64 %8, i64* %5
br label %9
9: ; preds = %7, %4
%10 = call %struct.tm* @gmtime(i64* %5)
%11 = call i32 @strftime(i8* %0, i32 %1, i8* %3, %struct.tm* %10)
ret i8* %0
}
void GPS_UART_ScbEnableIntr(void) {}


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

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

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

LLVM IR (-O2):
define void @GPS_UART_ScbEnableIntr() {
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
extern char *file_type(char *f) {
  char *cp;
  if ((cp = strrchr(f, '.')) != NULL)
    return cp + 1;
  return "";
}


x86 assembly (clang, -O0):
<file_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1149 <file_type+0x39>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <file_type+0x44>
lea    0xeb0(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_type>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
lea    0xed7(%rip),%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @file_type(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8* %10, i8** %2
br label %12
11: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %8
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @file_type(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world !\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello world !\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = 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"Hello world !\00"
define i32 @main() {
%1 = 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*/ __NR_unshare;
scalar_t__ syscall(int /*<<< orphan*/, int);
int xunshare(int flags) {
  int ret = (int)syscall(__NR_unshare, flags);
  if (ret == -1) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xunshare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    113e <xunshare+0x2e>
jmp    113e <xunshare+0x2e>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xunshare>:
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_unshare = global i32 0
define i32 @xunshare(i32 %0) {
%2 = load i32, i32* @__NR_unshare
%3 = tail call i64 @syscall(i32 %2, i32 %0)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void print_help(const char *program_name) {
  printf("DLN (DeltaFS) "
         "0.1.0"
         "\n"
         "by Patrick Stetter <chipmaster32@gmail.com>\n"
         "Corey McClymonds <galeru@gmail.com>\n"
         "\n"
         "Usage %s [options] SrcFile InFile\n"
         "\n"
         "general options:\n"
         "    -h   --help            print help\n"
         "    -V   --version         print version\n"
         "\n"
         "DLN options:\n"
         "    -v   --verbose         verbose mode\n"
         "    -s   --silent          silent mode\n"
         "    -S   --safe            safe mode\n"
         "    -o   --output          specify a different output file\n"
         "    -a   --windowabs       specify a delta window absolute size\n"
         "    -r   --windowrel       specify a delta window relative size\n",
         program_name);
}


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

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [550 x i8] c"DLN (DeltaFS) 0.1.0\0Aby Patrick Stetter <chipmaster32@gmail.com>\0ACorey McClymonds <galeru@gmail.com>\0A\0AUsage %s [options] SrcFile InFile\0A\0Ageneral options:\0A -h --help print help\0A -V --version print version\0A\0ADLN options:\0A -v --verbose verbose mode\0A -s --silent silent mode\0A -S --safe safe mode\0A -o --output specify a different output file\0A -a --windowabs specify a delta window absolute size\0A -r --windowrel specify a delta window relative size\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([550 x i8], [550 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [550 x i8] c"DLN (DeltaFS) 0.1.0\0Aby Patrick Stetter <chipmaster32@gmail.com>\0ACorey McClymonds <galeru@gmail.com>\0A\0AUsage %s [options] SrcFile InFile\0A\0Ageneral options:\0A -h --help print help\0A -V --version print version\0A\0ADLN options:\0A -v --verbose verbose mode\0A -s --silent silent mode\0A -S --safe safe mode\0A -o --output specify a different output file\0A -a --windowabs specify a delta window absolute size\0A -r --windowrel specify a delta window relative size\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([550 x i8], [550 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}