xunge/DecIR huggingface dataset:
char *stpcpy(char *restrict s1, const char *restrict s2) {
  char *restrict dst = s1;
  const char *restrict src = s2;
  do {
    *dst++ = *src++;
  } while (*src != '\0');
  return dst - 1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    111c <stpcpy+0x1c>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
add    $0xffffffffffffffff,%rax
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,0x1(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* noalias writeonly %0, i8* noalias nocapture %1) {
%3 = load i8, i8* %1
br label %4
4: ; preds = %4, %2
%5 = phi i8 [ %3, %2 ], [ %10, %4 ]
%6 = phi i8* [ %0, %2 ], [ %9, %4 ]
%7 = phi i8* [ %1, %2 ], [ %8, %4 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
store i8 %5, i8* %6
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4
ret i8* %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XCirculateRequestEvent;

/* Variables and functions */
void set_XCirculateRequestEvent_window(void *_p, unsigned long _v) {
  ((XCirculateRequestEvent *)_p)->window = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XCirculateRequestEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aes_decrypt(unsigned char const *, int const,
                               unsigned char *, void *, unsigned char const *,
                               int);
void aes_256_decrypt(const unsigned char *ciphertext, const int ciphertext_len,
                     unsigned char plaintext[], void *iv,
                     const unsigned char *key) {
  aes_decrypt(ciphertext, ciphertext_len, plaintext, iv, key, 32);
}


x86 assembly (clang, -O0):
<aes_256_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x20,%r9d
call   1030 <aes_decrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_256_decrypt>:
mov    $0x20,%r9d
jmp    1030 <aes_decrypt@plt>

LLVM IR (-O0):
define void @aes_256_decrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @aes_decrypt(i8* %11, i32 %12, i8* %13, i8* %14, i8* %15, i32 32)
ret void
}

LLVM IR (-O2):
define void @aes_256_decrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @aes_decrypt(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 32)
ret void
}
int minorVersion(void) { return 6; }


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

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

LLVM IR (-O0):
define i32 @minorVersion() {
ret i32 6
}

LLVM IR (-O2):
define i32 @minorVersion() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_5037() {
  Assert_real((isqrt(5037) == 70),
              "/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",
              1375, ("Integer square root of 5037 should be 70"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_5037>:
push   %rax
mov    $0x13ad,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x46,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x55f,%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 = [41 x i8] c"Integer square root of 5037 should be 70\00"
define void @t_sqrt_5037() {
%1 = call i32 @isqrt(i32 5037)
%2 = icmp eq i32 %1, 70
%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 1375, i8* getelementptr inbounds ([41 x i8], [41 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 = [41 x i8] c"Integer square root of 5037 should be 70\00"
define void @t_sqrt_5037() {
%1 = tail call i32 @isqrt(i32 5037)
%2 = icmp eq i32 %1, 70
%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 1375, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float remainerf(float x, float y) {
  float result;
  return result;
}


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

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

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

LLVM IR (-O2):
define float @remainerf(float %0, float %1) {
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void output(int *array, size_t len) {
  int i = 0;
  for (i = 0; i < len; i++) {
    printf("%2i ", array[i]);
  }
  puts("");
  return;
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1171 <output+0x51>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113e <output+0x1e>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1155 <output+0x35>
mov    %rsi,%r12
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0xec4(%rip),%r15
nopl   0x0(%rax)
mov    (%r14,%rbx,4),%esi
mov    %r15,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <output+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%2i \00"
@.str.1 = [1 x i8] zeroinitializer
define void @output(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%2i \00"
define void @output(i32* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int frag_ripple(int, int, int /*<<< orphan*/);
int frag_ripple_interference(int x, int y, int foo) {
  return frag_ripple(x - (foo - 512), y, 0) ^
         frag_ripple(x + (foo - 512), y, 0);
}


x86 assembly (clang, -O0):
<frag_ripple_interference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%eax
sub    $0x200,%eax
sub    %eax,%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <frag_ripple@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%eax
sub    $0x200,%eax
add    %eax,%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <frag_ripple@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frag_ripple_interference>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
lea    -0x200(%rbx),%eax
sub    %eax,%edi
xor    %edx,%edx
call   1030 <frag_ripple@plt>
mov    %eax,%r15d
lea    (%rbx,%rbp,1),%edi
add    $0xfffffe00,%edi
mov    %r14d,%esi
xor    %edx,%edx
call   1030 <frag_ripple@plt>
xor    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @frag_ripple_interference(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = sub nsw i32 %8, 512
%10 = sub nsw i32 %7, %9
%11 = load i32, i32* %5
%12 = call i32 @frag_ripple(i32 %10, i32 %11, i32 0)
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = sub nsw i32 %14, 512
%16 = add nsw i32 %13, %15
%17 = load i32, i32* %5
%18 = call i32 @frag_ripple(i32 %16, i32 %17, i32 0)
%19 = xor i32 %12, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @frag_ripple_interference(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, -512
%5 = sub nsw i32 %0, %4
%6 = tail call i32 @frag_ripple(i32 %5, i32 %1, i32 0)
%7 = add nsw i32 %4, %0
%8 = tail call i32 @frag_ripple(i32 %7, i32 %1, i32 0)
%9 = xor i32 %8, %6
ret i32 %9
}
int *f3(int x, int *y) {
  int w = 0;
  if (x)
    y = &w;
  return y;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1124 <f3+0x24>
lea    -0x14(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
test   %edi,%edi
lea    -0x4(%rsp),%rax
cmove  %rsi,%rax
ret

LLVM IR (-O0):
define i32* @f3(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
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32* %5, i32** %4
br label %9
9: ; preds = %8, %2
%10 = load i32*, i32** %4
ret i32* %10
}

LLVM IR (-O2):
define i32* @f3(i32 %0, i32* readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = icmp eq i32 %0, 0
%6 = select i1 %5, i32* %1, i32* %3
ret i32* %6
}
char ft_checkchar(int n) {
  if (n == 10)
    return ('A');
  else if (n == 11)
    return ('B');
  else if (n == 12)
    return ('C');
  else if (n == 13)
    return ('D');
  else if (n == 14)
    return ('E');
  else if (n == 15)
    return ('F');
  else
    return (n + '0');
}


x86 assembly (clang, -O0):
<ft_checkchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    111a <ft_checkchar+0x1a>
movb   $0x41,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
cmpl   $0xb,-0x8(%rbp)
jne    112d <ft_checkchar+0x2d>
movb   $0x42,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
cmpl   $0xc,-0x8(%rbp)
jne    1140 <ft_checkchar+0x40>
movb   $0x43,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
cmpl   $0xd,-0x8(%rbp)
jne    1153 <ft_checkchar+0x53>
movb   $0x44,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
cmpl   $0xe,-0x8(%rbp)
jne    1166 <ft_checkchar+0x66>
movb   $0x45,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
cmpl   $0xf,-0x8(%rbp)
jne    1179 <ft_checkchar+0x79>
movb   $0x46,-0x1(%rbp)
jmp    1182 <ft_checkchar+0x82>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_checkchar>:
lea    -0xa(%rdi),%eax
cmp    $0x6,%eax
mov    $0x41,%ecx
mov    $0x30,%edx
cmovb  %ecx,%edx
cmovae %edi,%eax
add    %dl,%al
ret

LLVM IR (-O0):
define signext i8 @ft_checkchar(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 65, i8* %2
br label %31
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 11
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 66, i8* %2
br label %31
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 12
br i1 %13, label %14, label %15
14: ; preds = %11
store i8 67, i8* %2
br label %31
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 13
br i1 %17, label %18, label %19
18: ; preds = %15
store i8 68, i8* %2
br label %31
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 14
br i1 %21, label %22, label %23
22: ; preds = %19
store i8 69, i8* %2
br label %31
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 15
br i1 %25, label %26, label %27
26: ; preds = %23
store i8 70, i8* %2
br label %31
27: ; preds = %23
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 48
%30 = trunc i32 %29 to i8
store i8 %30, i8* %2
br label %31
31: ; preds = %27, %26, %22, %18, %14, %10, %6
%32 = load i8, i8* %2
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @ft_checkchar(i32 %0) {
%2 = add i32 %0, -10
%3 = icmp ult i32 %2, 6
%4 = select i1 %3, i32 %2, i32 %0
%5 = select i1 %3, i8 65, i8 48
%6 = trunc i32 %4 to i8
%7 = add i8 %5, %6
ret i8 %7
}
int min(int i, int j) {
  if (i > j)
    return j;
  return i;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <min+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
char *strlwr(char *text) {
  char *origtext = text;
  while (*text != '\0') {
    if ((*text > 64) && (*text < 91))
      *text += 32;
    text++;
  }
  return (origtext);
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115d <strlwr+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jle    114c <strlwr+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jge    114c <strlwr+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <strlwr+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <strlwr+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <strlwr+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <strlwr+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <strlwr+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <strlwr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
int getPot(int potentiometer) { return potentiometer; }


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

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

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

LLVM IR (-O2):
define i32 @getPot(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
double f();
int /*<<< orphan*/ printf(char *, double);
main() { printf("%f\n", f()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <f@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double (...) @f()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hda_codec = type opaque
define i32 @snd_hda_codec_proc_new(%struct.hda_codec* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compute(int);
int example_event(int *array, int array_size) {
  compute(10);
  return 0;
}


x86 assembly (clang, -O0):
<example_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xa,%edi
call   1030 <compute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @example_event(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = call i32 @compute(i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @example_event(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @compute(i32 10)
ret i32 0
}
void dummy_proc_0() { return; }


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

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

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

LLVM IR (-O2):
define void @dummy_proc_0() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
uint32_t peri_read_nb(volatile uint32_t *paddr) { return *paddr; }


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

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

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

LLVM IR (-O2):
define i32 @peri_read_nb(i32* %0) {
%2 = load volatile i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int putchar(int);
__attribute__((__weak__, __always___)) int softboundmpx_putchar(int c) {
  return putchar(c);
}


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

x86 assembly (clang, -O2):
<softboundmpx_putchar>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_putchar(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret i32 %2
}
void xg_deinit() {}


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

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

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

LLVM IR (-O2):
define void @xg_deinit() {
ret void
}
void kvmppc_uvmem_drop_pages(const struct kvm_memory_slot *free,
                             struct kvm *kvm) {}


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

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

LLVM IR (-O0):
%struct.kvm_memory_slot = type opaque
%struct.kvm = type opaque
define void @kvmppc_uvmem_drop_pages(%struct.kvm_memory_slot* %0, %struct.kvm* %1) {
%3 = alloca %struct.kvm_memory_slot*
%4 = alloca %struct.kvm*
store %struct.kvm_memory_slot* %0, %struct.kvm_memory_slot** %3
store %struct.kvm* %1, %struct.kvm** %4
ret void
}

LLVM IR (-O2):
%struct.kvm_memory_slot = type opaque
%struct.kvm = type opaque
define void @kvmppc_uvmem_drop_pages(%struct.kvm_memory_slot* nocapture %0, %struct.kvm* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void foo4(int n, int m, int r, int a[n][m][r]) { assert(a[3][3][2] == 42); }


x86 assembly (clang, -O0):
<foo4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%edx
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
imul   %rcx,%rdx
imul   $0x3,%rdx,%rdx
shl    $0x2,%rdx
add    %rdx,%rax
imul   $0x3,%rcx,%rcx
cmpl   $0x2a,0x8(%rax,%rcx,4)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo4>:
mov    %esi,%eax
mov    %edx,%edx
lea    (%rdx,%rdx,2),%rdx
imul   %rdx,%rax
lea    (%rcx,%rax,4),%rax
xor    %edi,%edi
cmpl   $0x2a,0x8(%rax,%rdx,4)
sete   %dil
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @foo4(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = zext i32 %9 to i64
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = load i32, i32* %7
%14 = zext i32 %13 to i64
%15 = load i32*, i32** %8
%16 = mul nuw i64 %12, %14
%17 = mul nsw i64 3, %16
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = mul nsw i64 3, %14
%20 = getelementptr inbounds i32, i32* %18, i64 %19
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 42
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
ret void
}

LLVM IR (-O2):
define void @foo4(i32 %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = zext i32 %1 to i64
%6 = zext i32 %2 to i64
%7 = mul nuw nsw i64 %6, 3
%8 = mul i64 %7, %5
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = getelementptr inbounds i32, i32* %9, i64 %7
%11 = getelementptr inbounds i32, i32* %10, i64 2
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 42
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ssd1306_sendByte(int);
int /*<<< orphan*/ ssd1306_startTransmission();
void ssd1306_i2cDataStart() {
  ssd1306_startTransmission();
  ssd1306_sendByte(0x40);
}


x86 assembly (clang, -O0):
<ssd1306_i2cDataStart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ssd1306_startTransmission@plt>
mov    $0x40,%edi
call   1040 <ssd1306_sendByte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd1306_i2cDataStart>:
push   %rax
xor    %eax,%eax
call   1030 <ssd1306_startTransmission@plt>
mov    $0x40,%edi
pop    %rax
jmp    1040 <ssd1306_sendByte@plt>

LLVM IR (-O0):
define void @ssd1306_i2cDataStart() {
%1 = call i32 (...) @ssd1306_startTransmission()
%2 = call i32 @ssd1306_sendByte(i32 64)
ret void
}

LLVM IR (-O2):
define void @ssd1306_i2cDataStart() {
%1 = tail call i32 (...) @ssd1306_startTransmission()
%2 = tail call i32 @ssd1306_sendByte(i32 64)
ret void
}
int enddata(char *buff, int p) {
  int pageaddr, offset;
  offset = p & 63;
  pageaddr = p - offset;
  if (offset == 0)
    return p;
  buff[pageaddr] = 0xC0 + offset - 1;
  p = pageaddr + 64;
  return p;
}


x86 assembly (clang, -O0):
<enddata>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1132 <enddata+0x32>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <enddata+0x59>
mov    -0x1c(%rbp),%eax
add    $0xc0,%eax
sub    $0x1,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<enddata>:
mov    %esi,%eax
mov    %esi,%ecx
and    $0x3f,%ecx
je     1118 <enddata+0x18>
cltq
and    $0xffffffffffffffc0,%rax
add    $0xbf,%cl
mov    %cl,(%rdi,%rax,1)
add    $0x40,%eax
ret

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

LLVM IR (-O2):
define i32 @enddata(i8* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 63
%4 = and i32 %1, -64
%5 = icmp eq i32 %3, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = trunc i32 %3 to i8
%8 = add nuw nsw i8 %7, -65
%9 = sext i32 %4 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 %8, i8* %10
%11 = add nsw i32 %4, 64
br label %12
12: ; preds = %2, %6
%13 = phi i32 [ %11, %6 ], [ %1, %2 ]
ret i32 %13
}
/* Variables and functions */
int mockup_4(void *user_data) {
  if (user_data != NULL) {
    *((int *)user_data) = 4;
  }
  return 4;
}


x86 assembly (clang, -O0):
<mockup_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111d <mockup_4+0x1d>
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mockup_4>:
test   %rdi,%rdi
je     110b <mockup_4+0xb>
movl   $0x4,(%rdi)
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @mockup_4(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
store i32 4, i32* %7
br label %8
8: ; preds = %5, %1
ret i32 4
}

LLVM IR (-O2):
define i32 @mockup_4(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
store i32 4, i32* %4
br label %5
5: ; preds = %3, %1
ret i32 4
}
void i2d_X509_CRL_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_CRL_bio() {
ret void
}
const char *hxd_help(struct hexdump *X) { return "helps"; }


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

x86 assembly (clang, -O2):
<hxd_help>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.hexdump = type opaque
@.str = [6 x i8] c"helps\00"
define i8* @hxd_help(%struct.hexdump* %0) {
%2 = alloca %struct.hexdump*
store %struct.hexdump* %0, %struct.hexdump** %2
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.hexdump = type opaque
@.str = [6 x i8] c"helps\00"
define i8* @hxd_help(%struct.hexdump* nocapture readnone %0) {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
unsigned int RTP_get_framenum(unsigned char *p) {
  return (((unsigned int)p[16]) << 8) + (unsigned int)p[17];
}


x86 assembly (clang, -O0):
<RTP_get_framenum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x10(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x11(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTP_get_framenum>:
movzwl 0x10(%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @RTP_get_framenum(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 16
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 8
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 17
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @RTP_get_framenum(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 16
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 17
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %5, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xb6() {
  Assert_real((isalnum(182) == 0),
              "/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/ctype/test_isalnum.c",
              915, ("isalnum should be 0 for 0xb6"));
}


x86 assembly (clang, -O0):
<t_isalnum_0xb6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb6,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x393,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0xb6>:
push   %rax
mov    $0xb6,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x393,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb6\00"
define void @t_isalnum_0xb6() {
%1 = call i64 @isalnum(i32 182)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xb6\00"
define void @t_isalnum_0xb6() {
%1 = tail call i64 @isalnum(i32 182)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 915, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
OP(dd, e4) { op_e4(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_e4@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_e4()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ HomeLocationHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void HomeLocationUpdated() { UAVObjUpdated(HomeLocationHandle()); }


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

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

LLVM IR (-O0):
define void @HomeLocationUpdated() {
%1 = call i32 (...) @HomeLocationHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HomeLocationUpdated() {
%1 = tail call i32 (...) @HomeLocationHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _cc3_set_register_state();
void cc3_camera_set_power_state(bool state) {
  if (state) {
    (*(volatile unsigned long *)((0xE002800C))) = 0x200000;
  } else {
    (*(volatile unsigned long *)((0xE0028004))) = 0x200000;
  }
  _cc3_set_register_state();
}


x86 assembly (clang, -O0):
<cc3_camera_set_power_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <cc3_camera_set_power_state+0x26>
mov    $0xe002800c,%eax
movq   $0x200000,(%rax)
jmp    1142 <cc3_camera_set_power_state+0x32>
mov    $0xe0028004,%eax
movq   $0x200000,(%rax)
mov    $0x0,%al
call   1030 <_cc3_set_register_state@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc3_camera_set_power_state>:
mov    $0xe0028004,%eax
lea    0x8(%rax),%rcx
test   %edi,%edi
cmove  %rax,%rcx
movq   $0x200000,(%rcx)
xor    %eax,%eax
jmp    1030 <_cc3_set_register_state@plt>

LLVM IR (-O0):
define void @cc3_camera_set_power_state(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store volatile i64 2097152, i64* inttoptr (i64 3758260236 to i64*)
br label %7
6: ; preds = %1
store volatile i64 2097152, i64* inttoptr (i64 3758260228 to i64*)
br label %7
7: ; preds = %6, %5
%8 = call i32 (...) @_cc3_set_register_state()
ret void
}

LLVM IR (-O2):
define void @cc3_camera_set_power_state(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i64* inttoptr (i64 3758260228 to i64*), i64* inttoptr (i64 3758260236 to i64*)
store volatile i64 2097152, i64* %3
%4 = tail call i32 (...) @_cc3_set_register_state()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ xembed_message_send(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       int, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int /*<<< orphan*/);
void xembed_focus_out(xcb_connection_t *c, xcb_window_t client) {
  xembed_message_send(c, client, 5, 0, 0, 0);
}


x86 assembly (clang, -O0):
<xembed_focus_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x5,%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <xembed_message_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xembed_focus_out>:
mov    $0x5,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <xembed_message_send@plt>

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

LLVM IR (-O2):
define void @xembed_focus_out(i32* %0, i32 %1) {
%3 = tail call i32 @xembed_message_send(i32* %0, i32 %1, i32 5, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int pigpio_command(int, int, int, int /*<<< orphan*/, int);
int wave_get_max_pulses(int pi) { return pigpio_command(pi, 35, 2, 0, 1); }


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

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

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

LLVM IR (-O2):
define i32 @wave_get_max_pulses(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 35, i32 2, i32 0, i32 1)
ret i32 %2
}
float lerp(float a, float s, float b) { return a * (1 - s) + (b * s); }


x86 assembly (clang, -O0):
<lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm2
subss  -0x8(%rbp),%xmm2
movss  -0xc(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerp>:
movss  0xef8(%rip),%xmm3
subss  %xmm1,%xmm3
mulss  %xmm1,%xmm2
mulss  %xmm3,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fsub float 1.000000e+00, %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fmul float %10, %11
%13 = call float @llvm.fmuladd.f32(float %7, float %9, float %12)
ret float %13
}

LLVM IR (-O2):
define float @lerp(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %1
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %5)
ret float %6
}
/* Variables and functions */
char *_expr_log(int /*<<< orphan*/ *, int);
char *expr_log_cmnd(int cmnd) { return _expr_log(NULL, cmnd); }


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

x86 assembly (clang, -O2):
<expr_log_cmnd>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <_expr_log@plt>

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

LLVM IR (-O2):
define i8* @expr_log_cmnd(i32 %0) {
%2 = tail call i8* @_expr_log(i32* null, i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sapi_get_max_conn();
int get_so_max_conn() {
  int maxconn = sapi_get_max_conn();
  if (maxconn > 0) {
    printf("maxconn %d\n", maxconn);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<get_so_max_conn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <sapi_get_max_conn@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1157 <get_so_max_conn+0x37>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    115e <get_so_max_conn+0x3e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_so_max_conn>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <sapi_get_max_conn@plt>
test   %eax,%eax
jle    113e <get_so_max_conn+0x1e>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
jmp    1143 <get_so_max_conn+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"maxconn %d\0A\00"
define i32 @get_so_max_conn() {
%1 = tail call i32 (...) @sapi_get_max_conn()
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 0, %3 ], [ -1, %0 ]
ret i32 %6
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c, n1;
  n1 = 0;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      ++n1;
  printf("%d\n", n1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}