xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int IOread_from_blue_LED();
int IOread_from_green_LED();
int IOread_from_red_LED();
uint8_t IOread_from_red_green_blue_LED() {
  return IOread_from_red_LED() << 2 | IOread_from_green_LED() << 1 |
         IOread_from_blue_LED();
}


x86 assembly (clang, -O0):
<IOread_from_red_green_blue_LED>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <IOread_from_red_LED@plt>
shl    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <IOread_from_green_LED@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <IOread_from_blue_LED@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IOread_from_red_green_blue_LED>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <IOread_from_red_LED@plt>
mov    %eax,%ebx
shl    $0x2,%ebx
xor    %eax,%eax
call   1030 <IOread_from_green_LED@plt>
mov    %eax,%ebp
add    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1040 <IOread_from_blue_LED@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IOread_from_red_green_blue_LED() {
%1 = call i32 (...) @IOread_from_red_LED()
%2 = shl i32 %1, 2
%3 = call i32 (...) @IOread_from_green_LED()
%4 = shl i32 %3, 1
%5 = or i32 %2, %4
%6 = call i32 (...) @IOread_from_blue_LED()
%7 = or i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @IOread_from_red_green_blue_LED() {
%1 = tail call i32 (...) @IOread_from_red_LED()
%2 = shl i32 %1, 2
%3 = tail call i32 (...) @IOread_from_green_LED()
%4 = shl i32 %3, 1
%5 = or i32 %4, %2
%6 = tail call i32 (...) @IOread_from_blue_LED()
%7 = or i32 %5, %6
ret i32 %7
}
unsigned int pop1(unsigned int x) {
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  x = (x + (x >> 4)) & 0x0F0F0F0F;
  x += x >> 8;
  x += x >> 16;
  return x & 0x0000003F;
}


x86 assembly (clang, -O0):
<pop1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop1>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @pop1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = lshr i32 %4, 1
%6 = and i32 %5, 1431655765
%7 = sub i32 %3, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = and i32 %8, 858993459
%10 = load i32, i32* %2
%11 = lshr i32 %10, 2
%12 = and i32 %11, 858993459
%13 = add i32 %9, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 4
%17 = add i32 %14, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 8
%21 = load i32, i32* %2
%22 = add i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 16
%25 = load i32, i32* %2
%26 = add i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 63
ret i32 %28
}

LLVM IR (-O2):
define i32 @pop1(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub i32 %0, %3
%5 = and i32 %4, 858993459
%6 = lshr i32 %4, 2
%7 = and i32 %6, 858993459
%8 = add nuw nsw i32 %7, %5
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
void do_write_u(const unsigned char *buf, unsigned char *ptr, int i, int j) {
  *ptr = buf[i + 128 + j];
}


x86 assembly (clang, -O0):
<do_write_u>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x80,%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_write_u>:
lea    (%rdx,%rcx,1),%eax
add    $0x80,%eax
cltq
mov    (%rdi,%rax,1),%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @do_write_u(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
%9 = load i8*, i8** %5
%10 = load i32, i32* %7
%11 = add nsw i32 %10, 128
%12 = load i32, i32* %8
%13 = add nsw i32 %11, %12
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %9, i64 %14
%16 = load i8, i8* %15
%17 = load i8*, i8** %6
store i8 %16, i8* %17
ret void
}

LLVM IR (-O2):
define void @do_write_u(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = add nsw i32 %2, 128
%6 = add nsw i32 %5, %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %1
ret void
}
int ufshcd_hba_init_crypto_capabilities(struct ufs_hba *hba) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ufs_hba = type opaque
define i32 @ufshcd_hba_init_crypto_capabilities(%struct.ufs_hba* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float mp_bswap_float(float);
char *mp_encode_float(char *data, float num) {
  *data = 0xca;
  data++;
  *(float *)data = mp_bswap_float(num);
  return data + sizeof(float);
}


x86 assembly (clang, -O0):
<mp_encode_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0xca,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <mp_bswap_float@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_encode_float>:
push   %rbx
mov    %rdi,%rbx
movb   $0xca,(%rdi)
call   1030 <mp_bswap_float@plt>
movss  %xmm0,0x1(%rbx)
add    $0x5,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mp_encode_float(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
store i8 -54, i8* %5
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load float, float* %4
%9 = call float @mp_bswap_float(float %8)
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to float*
store float %9, float* %11
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 4
ret i8* %13
}

LLVM IR (-O2):
define i8* @mp_encode_float(i8* writeonly %0, float %1) {
store i8 -54, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call float @mp_bswap_float(float %1)
%5 = bitcast i8* %3 to float*
store float %4, float* %5
%6 = getelementptr inbounds i8, i8* %0, i64 5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void the_symbol(void) { fprintf(stderr, "HELLO WORLD\n"); }


x86 assembly (clang, -O0):
<the_symbol>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<the_symbol>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [13 x i8] c"HELLO WORLD\0A\00"
define void @the_symbol() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"HELLO WORLD\0A\00"
define void @the_symbol() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int strhash(const char *s) {
  unsigned int h;
  for (h = 0; *s != '\0'; s += 1)
    h = *s + 31 * h;
  return h;
}


x86 assembly (clang, -O0):
<strhash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <strhash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <strhash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strhash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <strhash+0x28>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movsbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <strhash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strhash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %15
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
void ref_mul_int8_t(int8_t arg1, int8_t arg2, int8_t *result) {
  *result = arg1 * arg2;
}


x86 assembly (clang, -O0):
<ref_mul_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
imul   -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_mul_int8_t>:
imul   %esi,%edi
mov    %edi,(%rdx)
ret

LLVM IR (-O0):
define void @ref_mul_int8_t(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* %5
%9 = mul nsw i32 %7, %8
%10 = load i32*, i32** %6
store i32 %9, i32* %10
ret void
}

LLVM IR (-O2):
define void @ref_mul_int8_t(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = mul nsw i32 %1, %0
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
scalar_t__ UnmapViewOfFile(void *);
int munmap(void *addr, size_t length) {
  (void)length;
  return UnmapViewOfFile(addr) ? 0 : -1;
}


x86 assembly (clang, -O0):
<munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <UnmapViewOfFile@plt>
mov    %rax,%rdx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munmap>:
push   %rax
call   1030 <UnmapViewOfFile@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @munmap(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 = call i64 @UnmapViewOfFile(i8* %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @munmap(i8* %0, i64 %1) {
%3 = tail call i64 @UnmapViewOfFile(i8* %0)
%4 = icmp eq i64 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
int tegra_enable_dvfs_on_clk(struct clk *c, struct dvfs *d) { return 0; }


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

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

LLVM IR (-O0):
%struct.clk = type opaque
%struct.dvfs = type opaque
define i32 @tegra_enable_dvfs_on_clk(%struct.clk* %0, %struct.dvfs* %1) {
%3 = alloca %struct.clk*
%4 = alloca %struct.dvfs*
store %struct.clk* %0, %struct.clk** %3
store %struct.dvfs* %1, %struct.dvfs** %4
ret i32 0
}

LLVM IR (-O2):
%struct.clk = type opaque
%struct.dvfs = type opaque
define i32 @tegra_enable_dvfs_on_clk(%struct.clk* nocapture readnone %0, %struct.dvfs* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
size_t mystrlen(const char *s) {
  size_t i = 0;
  while (*s++)
    i++;
  return i;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <mystrlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <mystrlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
cmpb   $0x0,(%rdi)
je     111f <mystrlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <mystrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @mystrlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
int udfexample_ver() { return 6; }


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

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

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

LLVM IR (-O2):
define i32 @udfexample_ver() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponseGeneric(void const *, char *, char *, char *);
void UpnpResponse_MediaRenderer_AVTransport_Play(const void *UPnPToken) {
  UpnpResponseGeneric(UPnPToken, "urn:schemas-upnp-org:service:AVTransport:1",
                      "Play", "");
}


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

x86 assembly (clang, -O2):
<UpnpResponse_MediaRenderer_AVTransport_Play>:
lea    0xee9(%rip),%rsi
lea    0xf0d(%rip),%rdx
lea    0xf05(%rip),%rcx
jmp    1030 <UpnpResponseGeneric@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [5 x i8] c"Play\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_Play(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @UpnpResponseGeneric(i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [5 x i8] c"Play\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_Play(i8* %0) {
%2 = tail call i32 @UpnpResponseGeneric(i8* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _digest_cmp(unsigned char *, unsigned char *, int);
extern int sha1cmp(unsigned char *digest1, unsigned char *digest2) {
  return (_digest_cmp(digest1, digest2, 20));
}


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

x86 assembly (clang, -O2):
<sha1cmp>:
mov    $0x14,%edx
jmp    1030 <_digest_cmp@plt>

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

LLVM IR (-O2):
define i32 @sha1cmp(i8* %0, i8* %1) {
%3 = tail call i32 @_digest_cmp(i8* %0, i8* %1, i32 20)
ret i32 %3
}
int vde_chain_nm6_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 4;
  if (sz_res)
    *sz_res = 3;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 70;
  return 0;
}


x86 assembly (clang, -O0):
<vde_chain_nm6_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <vde_chain_nm6_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x4,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <vde_chain_nm6_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <vde_chain_nm6_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <vde_chain_nm6_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x46,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm6_work>:
test   %rdi,%rdi
je     110b <vde_chain_nm6_work+0xb>
movl   $0x4,(%rdi)
test   %rsi,%rsi
je     1116 <vde_chain_nm6_work+0x16>
movl   $0x3,(%rsi)
test   %rdx,%rdx
je     1121 <vde_chain_nm6_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <vde_chain_nm6_work+0x2c>
movl   $0x46,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @vde_chain_nm6_work(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 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i32*, i32** %5
store i32 4, i32* %12
br label %13
13: ; preds = %11, %4
%14 = load i32*, i32** %6
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = load i32*, i32** %6
store i32 3, i32* %17
br label %18
18: ; preds = %16, %13
%19 = load i32*, i32** %7
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = load i32*, i32** %7
store i32 0, i32* %22
br label %23
23: ; preds = %21, %18
%24 = load i32*, i32** %8
%25 = icmp ne i32* %24, null
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i32*, i32** %8
store i32 70, i32* %27
br label %28
28: ; preds = %26, %23
ret i32 0
}

LLVM IR (-O2):
define i32 @vde_chain_nm6_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 4, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 3, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 70, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
char *strncpy(char *, char const *, int);
char *strcpy(char *dest, const char *src) {
  return strncpy(dest, src, 0xFFFFFFFF);
}


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

x86 assembly (clang, -O2):
<strcpy>:
mov    $0xffffffff,%edx
jmp    1030 <strncpy@plt>

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

LLVM IR (-O2):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = tail call i8* @strncpy(i8* %0, i8* %1, i32 -1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x11_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x11_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x11_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x11_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x11_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf(
      "kcpuid [-abdfhr] [-l leaf] [-s subleaf]\n"
      "\t-a|--all             Show both bit flags and complex bit fields info\n"
      "\t-b|--bitflags        Show boolean flags only\n"
      "\t-d|--detail          Show details of the flag/fields (default)\n"
      "\t-f|--flags           Specify the cpuid csv file\n"
      "\t-h|--help            Show usage info\n"
      "\t-l|--leaf=index      Specify the leaf you want to check\n"
      "\t-r|--raw             Show raw cpuid data\n"
      "\t-s|--subleaf=sub     Specify the subleaf you want to check\n");
}


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

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

LLVM IR (-O0):
@.str = [467 x i8] c"kcpuid [-abdfhr] [-l leaf] [-s subleaf]\0A\09-a|--all Show both bit flags and complex bit fields info\0A\09-b|--bitflags Show boolean flags only\0A\09-d|--detail Show details of the flag/fields (default)\0A\09-f|--flags Specify the cpuid csv file\0A\09-h|--help Show usage info\0A\09-l|--leaf=index Specify the leaf you want to check\0A\09-r|--raw Show raw cpuid data\0A\09-s|--subleaf=sub Specify the subleaf you want to check\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([467 x i8], [467 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [466 x i8] c"kcpuid [-abdfhr] [-l leaf] [-s subleaf]\0A\09-a|--all Show both bit flags and complex bit fields info\0A\09-b|--bitflags Show boolean flags only\0A\09-d|--detail Show details of the flag/fields (default)\0A\09-f|--flags Specify the cpuid csv file\0A\09-h|--help Show usage info\0A\09-l|--leaf=index Specify the leaf you want to check\0A\09-r|--raw Show raw cpuid data\0A\09-s|--subleaf=sub Specify the subleaf you want to check\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([466 x i8], [466 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leDeposito();
int /*<<< orphan*/ mostraDeposito(int /*<<< orphan*/);
main() {
  mostraDeposito(leDeposito());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <leDeposito@plt>
mov    %eax,%edi
call   1030 <mostraDeposito@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <leDeposito@plt>
mov    %eax,%edi
call   1030 <mostraDeposito@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @leDeposito()
%3 = call i32 @mostraDeposito(i32 %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @leDeposito()
%2 = tail call i32 @mostraDeposito(i32 %1)
ret i32 0
}
int test_imm_33uint16_mem(unsigned short *val) {
  return ((*val) & (0x33 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_33uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x33,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_33uint16_mem>:
testb  $0x33,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_33uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 51
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_84uint8_reg(unsigned char val) {
  return ((val) & (-0x84 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_84uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 124
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IFLNK;
int /*<<< orphan*/ stat_make_file(struct stat *);
void stat_make_symlink(struct stat *st) {
  stat_make_file(st);
  st->st_mode = S_IFLNK | 0644;
}


x86 assembly (clang, -O0):
<stat_make_symlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <stat_make_file@plt>
mov    0x2ebc(%rip),%rax
mov    (%rax),%ecx
or     $0x1a4,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_make_symlink>:
push   %rbx
mov    %rdi,%rbx
call   1030 <stat_make_file@plt>
mov    0x2ec8(%rip),%rax
mov    $0x1a4,%ecx
or     (%rax),%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFLNK = global i32 0
define void @stat_make_symlink(%struct.stat* %0) {
%2 = alloca %struct.stat*
store %struct.stat* %0, %struct.stat** %2
%3 = load %struct.stat*, %struct.stat** %2
%4 = call i32 @stat_make_file(%struct.stat* %3)
%5 = load i32, i32* @S_IFLNK
%6 = or i32 %5, 420
%7 = load %struct.stat*, %struct.stat** %2
%8 = getelementptr inbounds %struct.stat, %struct.stat* %7, i32 0, i32 0
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFLNK = global i32 0
define void @stat_make_symlink(%struct.stat* %0) {
%2 = tail call i32 @stat_make_file(%struct.stat* %0)
%3 = load i32, i32* @S_IFLNK
%4 = or i32 %3, 420
%5 = getelementptr inbounds %struct.stat, %struct.stat* %0, i64 0, i32 0
store i32 %4, i32* %5
ret void
}
void wg_cleanup_handle_logdata(void *db) {}


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

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

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

LLVM IR (-O2):
define void @wg_cleanup_handle_logdata(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ memcmp;

/* Variables and functions */
size_t strlen(char const *);
char *(strends)(const char *string, const char *desired) {
  size_t n = strlen(string);
  size_t m = strlen(desired);
  if (n < m)
    return NULL;
  return (memcmp)(string + (n - m), desired, m) ? NULL : (string + n);
}


x86 assembly (clang, -O0):
<strends>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1155 <strends+0x45>
movq   $0x0,-0x8(%rbp)
jmp    117f <strends+0x6f>
cmpq   $0x0,-0x28(%rbp)
je     116b <strends+0x5b>
xor    %eax,%eax
mov    %rax,-0x30(%rbp)
jmp    1177 <strends+0x67>
mov    -0x10(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strends>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmovne %rcx,%rbx
cmp    %rax,%r15
cmovb  %rcx,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strends(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %6
%10 = load i8*, i8** %5
%11 = call i64 @strlen(i8* %10)
store i64 %11, i64* %7
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = icmp ult i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i8* null, i8** %3
br label %32
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = sub i64 %18, %19
%21 = getelementptr inbounds i8, i8* %17, i64 %20
%22 = load i8*, i8** %5
%23 = load i64, i64* %7
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %16
br label %30
26: ; preds = %16
%27 = load i8*, i8** %4
%28 = load i64, i64* %6
%29 = getelementptr inbounds i8, i8* %27, i64 %28
br label %30
30: ; preds = %26, %25
%31 = phi i8* [ null, %25 ], [ %29, %26 ]
store i8* %31, i8** %3
br label %32
32: ; preds = %30, %15
%33 = load i8*, i8** %3
ret i8* %33
}

LLVM IR (-O2):
define i8* @strends(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %3, %4
%6 = icmp eq i64 %4, 0
%7 = getelementptr inbounds i8, i8* %0, i64 %3
%8 = select i1 %6, i8* %7, i8* null
%9 = select i1 %5, i8* null, i8* %8
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void h_table_end(void) { fputs("</table>\n", stdout); }


x86 assembly (clang, -O0):
<h_table_end>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_table_end>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"</table>\0A\00"
@stdout = global i32 0
define void @h_table_end() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"</table>\0A\00"
@stdout = global i32 0
define void @h_table_end() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void nrerror(char error_text[]) {
  void exit();
  fprintf(stderr, "Numerical Recipes run-time error...\n");
  fprintf(stderr, "%s\n", error_text);
  fprintf(stderr, "...now exiting to system...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<nrerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<nrerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xedc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Numerical Recipes run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @nrerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Numerical Recipes run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @nrerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void startgroup(void) { printf("<g>\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"<g>\00"
define void @startgroup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
int *FunctionWithPointerValue(int n) {
  int a = n * n;
  return &a;
}


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

x86 assembly (clang, -O2):
<FunctionWithPointerValue>:
lea    -0x4(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i32* @FunctionWithPointerValue(i32 %0) {
%2 = alloca i32
ret i32* %2
}
unsigned long addBoolToHash(unsigned long hash, const char *key, int val) {
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @addBoolToHash(i64 %0, i8* %1, i32 %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i64 0
}

LLVM IR (-O2):
define i64 @addBoolToHash(i64 %0, i8* nocapture readnone %1, i32 %2) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  sleep(60);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3c,%edi
call   1030 <sleep@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sleep(i32 60)
ret i32 1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sleep(i32 60)
ret i32 1
}
/* Variables and functions */
int japi_getscreenheight();
int j_getscreenheight() { return (japi_getscreenheight()); }


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

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

LLVM IR (-O0):
define i32 @j_getscreenheight() {
%1 = call i32 (...) @japi_getscreenheight()
ret i32 %1
}

LLVM IR (-O2):
define i32 @j_getscreenheight() {
%1 = tail call i32 (...) @japi_getscreenheight()
ret i32 %1
}
/* Variables and functions */
int len_str(char *);
scalar_t__ malloc(int);
char *strdup(char *str) {
  char *ret, *d;
  ret = (char *)malloc(sizeof(char) * (len_str(str) + 1));
  for (d = ret; *d = *str; d++, str++) {
  }
  return (ret);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <len_str@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1187 <strdup+0x67>
jmp    116a <strdup+0x4a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <strdup+0x31>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <len_str@plt>
lea    0x1(%rax),%edi
call   1040 <malloc@plt>
mov    (%rbx),%cl
mov    %cl,(%rax)
test   %cl,%cl
je     114f <strdup+0x2f>
mov    $0x1,%ecx
xchg   %ax,%ax
movzbl (%rbx,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1140 <strdup+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @len_str(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = load i8, i8* %0
store i8 %6, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %1, %8
%9 = phi i8* [ %11, %8 ], [ %5, %1 ]
%10 = phi i8* [ %12, %8 ], [ %0, %1 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = getelementptr inbounds i8, i8* %10, i64 1
%13 = load i8, i8* %12
store i8 %13, i8* %11
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %1
ret i8* %5
}
/* Variables and functions */
char *intern_n(char *, size_t);
size_t strlen(char *);
char *intern(char *str) {
  size_t len = strlen(str);
  return intern_n(str, len);
}


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

x86 assembly (clang, -O2):
<intern>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <intern_n@plt>

LLVM IR (-O0):
define i8* @intern(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
store i64 %5, i64* %3
%6 = load i8*, i8** %2
%7 = load i64, i64* %3
%8 = call i8* @intern_n(i8* %6, i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @intern(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i8* @intern_n(i8* %0, i64 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ENOTTY;
int /*<<< orphan*/ errno;
char *ttyname(int fd) {
  errno = ENOTTY;
  return "";
}


x86 assembly (clang, -O0):
<ttyname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
lea    0xee0(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttyname>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
lea    0xee7(%rip),%rax
ret

LLVM IR (-O0):
@ENOTTY = global i32 0
@errno = global i32 0
@.str = [1 x i8] zeroinitializer
define i8* @ttyname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOTTY
store i32 %3, i32* @errno
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@ENOTTY = global i32 0
@errno = global i32 0
@.str = [1 x i8] zeroinitializer
define i8* @ttyname(i32 %0) {
%2 = load i32, i32* @ENOTTY
store i32 %2, i32* @errno
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ inc_hl();
void opcode_34() { inc_hl(); }


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

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

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

LLVM IR (-O2):
define void @opcode_34() {
%1 = tail call i32 (...) @inc_hl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xf2() {
  Assert_real((ispunct(242) == 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_ispunct.c",
              1215, ("ispunct should be 0 for 0xf2"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xf2>:
push   %rax
mov    $0xf2,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4bf,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xf2\00"
define void @t_ispunct_0xf2() {
%1 = call i64 @ispunct(i32 242)
%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 1215, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xf2\00"
define void @t_ispunct_0xf2() {
%1 = tail call i64 @ispunct(i32 242)
%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 1215, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}