xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outportb(int, int);
void remap_irq() {
  outportb(0x20, 0x11);
  outportb(0xA0, 0x11);
  outportb(0x21, 0x20);
  outportb(0xA1, 0x28);
  outportb(0x21, 0x04);
  outportb(0xA1, 0x02);
  outportb(0x21, 0x01);
  outportb(0xA1, 0x01);
  outportb(0x21, 0x0);
  outportb(0xA1, 0x0);
}


x86 assembly (clang, -O0):
<remap_irq>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outportb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<remap_irq>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outportb@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outportb@plt>
mov    $0x21,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0xa1,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @remap_irq() {
%1 = call i32 @outportb(i32 32, i32 17)
%2 = call i32 @outportb(i32 160, i32 17)
%3 = call i32 @outportb(i32 33, i32 32)
%4 = call i32 @outportb(i32 161, i32 40)
%5 = call i32 @outportb(i32 33, i32 4)
%6 = call i32 @outportb(i32 161, i32 2)
%7 = call i32 @outportb(i32 33, i32 1)
%8 = call i32 @outportb(i32 161, i32 1)
%9 = call i32 @outportb(i32 33, i32 0)
%10 = call i32 @outportb(i32 161, i32 0)
ret void
}

LLVM IR (-O2):
define void @remap_irq() {
%1 = tail call i32 @outportb(i32 32, i32 17)
%2 = tail call i32 @outportb(i32 160, i32 17)
%3 = tail call i32 @outportb(i32 33, i32 32)
%4 = tail call i32 @outportb(i32 161, i32 40)
%5 = tail call i32 @outportb(i32 33, i32 4)
%6 = tail call i32 @outportb(i32 161, i32 2)
%7 = tail call i32 @outportb(i32 33, i32 1)
%8 = tail call i32 @outportb(i32 161, i32 1)
%9 = tail call i32 @outportb(i32 33, i32 0)
%10 = tail call i32 @outportb(i32 161, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(int *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int putchar(int c) {
  fwrite(&c, 1, sizeof(char), stdout);
  return c;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%ecx
lea    -0x4(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%ecx
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fwrite(i32* %2, i32 1, i32 1, i32 %3)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fwrite(i32* %2, i32 1, i32 1, i32 %3)
%5 = load i32, i32* %2
ret i32 %5
}
int main(argc, argv)
int argc;
char *argv[];
{
  printf("succeeded\n");
  exit(0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"succeeded\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@str = [10 x i8] c"succeeded\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 0)
unreachable
}
/* Type definitions */
struct in_addr {
  int dummy;
};
struct dns_rr_a4 {
  int dummy;
};
struct dns_ctx {
  int dummy;
};

/* Variables and functions */
scalar_t__ dns_resolve(struct dns_ctx *, int /*<<< orphan*/);
int /*<<< orphan*/ dns_submit_a4dnsbl(struct dns_ctx *, struct in_addr const *,
                                      char const *, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
struct dns_rr_a4 *dns_resolve_a4dnsbl(struct dns_ctx *ctx,
                                      const struct in_addr *addr,
                                      const char *dnsbl) {
  return (struct dns_rr_a4 *)dns_resolve(
      ctx, dns_submit_a4dnsbl(ctx, addr, dnsbl, 0, 0));
}


x86 assembly (clang, -O0):
<dns_resolve_a4dnsbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1040 <dns_submit_a4dnsbl@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1030 <dns_resolve@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dns_resolve_a4dnsbl>:
push   %rbx
mov    %rdi,%rbx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1040 <dns_submit_a4dnsbl@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <dns_resolve@plt>

LLVM IR (-O0):
%struct.dns_rr_a4 = type { i32 }
%struct.dns_ctx = type { i32 }
%struct.in_addr = type { i32 }
define %struct.dns_rr_a4* @dns_resolve_a4dnsbl(%struct.dns_ctx* %0, %struct.in_addr* %1, i8* %2) {
%4 = alloca %struct.dns_ctx*
%5 = alloca %struct.in_addr*
%6 = alloca i8*
store %struct.dns_ctx* %0, %struct.dns_ctx** %4
store %struct.in_addr* %1, %struct.in_addr** %5
store i8* %2, i8** %6
%7 = load %struct.dns_ctx*, %struct.dns_ctx** %4
%8 = load %struct.dns_ctx*, %struct.dns_ctx** %4
%9 = load %struct.in_addr*, %struct.in_addr** %5
%10 = load i8*, i8** %6
%11 = call i32 @dns_submit_a4dnsbl(%struct.dns_ctx* %8, %struct.in_addr* %9, i8* %10, i32 0, i32 0)
%12 = call i64 @dns_resolve(%struct.dns_ctx* %7, i32 %11)
%13 = inttoptr i64 %12 to %struct.dns_rr_a4*
ret %struct.dns_rr_a4* %13
}

LLVM IR (-O2):
%struct.dns_rr_a4 = type { i32 }
%struct.dns_ctx = type { i32 }
%struct.in_addr = type { i32 }
define %struct.dns_rr_a4* @dns_resolve_a4dnsbl(%struct.dns_ctx* %0, %struct.in_addr* %1, i8* %2) {
%4 = tail call i32 @dns_submit_a4dnsbl(%struct.dns_ctx* %0, %struct.in_addr* %1, i8* %2, i32 0, i32 0)
%5 = tail call i64 @dns_resolve(%struct.dns_ctx* %0, i32 %4)
%6 = inttoptr i64 %5 to %struct.dns_rr_a4*
ret %struct.dns_rr_a4* %6
}
void c2i_ASN1_BIT_STRING(void) {}


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

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

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

LLVM IR (-O2):
define void @c2i_ASN1_BIT_STRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsageError() {
  printf("Usage: a.out [options] lightcurve_directory output_file\n"
         "options:\n"
         "--numsignals  or -m  (def: All)\n"
         "--peakdir     or -p  (def: None)\n"
         "--threshold   or -h  (def: 2)\n"
         "--maxzero            (def: 4)\n"
         "--minlength   or -l  (def: 12)\n"
         "--padratio    or -r  (def: 0.5)\n"
         "--dwtdir      or -d  (def: None)\n"
         "--dwtminlen          (def: 16)\n"
         "--dwtmaxlen          (def: 512)\n"
         "--trasform    or -t  (def: haar) : Transform choice \"haar\", "
         "\"D4\", \"D6\", \"D8\"\n"
         "--append             (FLAG)      : Append to output_file rather than "
         "overwrite\n"
         "--numfeatures or -n  (def: 7)    : Number of features to include in "
         "output_file\n");
}


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

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

LLVM IR (-O0):
@.str = [586 x i8] c"Usage: a.out [options] lightcurve_directory output_file\0Aoptions:\0A--numsignals or -m (def: All)\0A--peakdir or -p (def: None)\0A--threshold or -h (def: 2)\0A--maxzero (def: 4)\0A--minlength or -l (def: 12)\0A--padratio or -r (def: 0.5)\0A--dwtdir or -d (def: None)\0A--dwtminlen (def: 16)\0A--dwtmaxlen (def: 512)\0A--trasform or -t (def: haar) : Transform choice \22haar\22, \22D4\22, \22D6\22, \22D8\22\0A--append (FLAG) : Append to output_file rather than overwrite\0A--numfeatures or -n (def: 7) : Number of features to include in output_file\0A\00"
define void @printUsageError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([586 x i8], [586 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [585 x i8] c"Usage: a.out [options] lightcurve_directory output_file\0Aoptions:\0A--numsignals or -m (def: All)\0A--peakdir or -p (def: None)\0A--threshold or -h (def: 2)\0A--maxzero (def: 4)\0A--minlength or -l (def: 12)\0A--padratio or -r (def: 0.5)\0A--dwtdir or -d (def: None)\0A--dwtminlen (def: 16)\0A--dwtmaxlen (def: 512)\0A--trasform or -t (def: haar) : Transform choice \22haar\22, \22D4\22, \22D6\22, \22D8\22\0A--append (FLAG) : Append to output_file rather than overwrite\0A--numfeatures or -n (def: 7) : Number of features to include in output_file\00"
define void @printUsageError() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([585 x i8], [585 x i8]* @str, i64 0, i64 0))
ret void
}
int muspcm_getwavelen(int slot) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @muspcm_getwavelen(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
void main() {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 2) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    115e <main+0x2e>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0x2,%eax
jne    114c <main+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @id(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret void
}
double oct(double v) {
  return (quad(v)) * (quad(v));
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<oct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <quad@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
call   1030 <quad@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%al
call   1030 <quad@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <quad@plt>
imul   %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @oct(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, ...) bitcast (i32 (...)* @quad to i32 (double, ...)*)(double %3)
%5 = load double, double* %2
%6 = call i32 (double, ...) bitcast (i32 (...)* @quad to i32 (double, ...)*)(double %5)
%7 = mul nsw i32 %4, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @oct(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @quad to i32 (double, ...)*)(double %0)
%3 = tail call i32 (double, ...) bitcast (i32 (...)* @quad to i32 (double, ...)*)(double %0)
%4 = mul nsw i32 %3, %2
%5 = sitofp i32 %4 to double
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int read_i2c_reg(int, int, int /*<<< orphan*/ *);
int piups_get_vrailconv(int file_i2c, uint16_t *vrailconv) {
  return read_i2c_reg(file_i2c, 0x52, vrailconv);
}


x86 assembly (clang, -O0):
<piups_get_vrailconv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x52,%esi
call   1030 <read_i2c_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piups_get_vrailconv>:
mov    %rsi,%rdx
mov    $0x52,%esi
jmp    1030 <read_i2c_reg@plt>

LLVM IR (-O0):
define i32 @piups_get_vrailconv(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 @read_i2c_reg(i32 %5, i32 82, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @piups_get_vrailconv(i32 %0, i32* %1) {
%3 = tail call i32 @read_i2c_reg(i32 %0, i32 82, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ core3_swap(char *, int);
void U_EMRSETTEXTALIGN_swap(char *record, int torev) {
  core3_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRSETTEXTALIGN_swap>:
jmp    1030 <core3_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSETTEXTALIGN_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *XXH_memcpy(void *dest, const void *src, size_t size) {
  return memcpy(dest, src, size);
}


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

x86 assembly (clang, -O2):
<XXH_memcpy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define i8* @XXH_memcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @XXH_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
int cmp_unsigned_integers(const void *e1, const void *e2) {
  unsigned int *n1, *n2;
  n1 = (unsigned int *)e1;
  n2 = (unsigned int *)e2;
  if (*n1 > *n2)
    return 1;
  if (*n1 < *n2)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_unsigned_integers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jbe    113a <cmp_unsigned_integers+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115f <cmp_unsigned_integers+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jae    1158 <cmp_unsigned_integers+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <cmp_unsigned_integers+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_unsigned_integers>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
cmp    %ecx,%eax
sbb    %edx,%edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_unsigned_integers(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp ugt i32 %5, %6
%8 = icmp ult i32 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
int get_unaligned_int(const void *p) {
  const struct { int d; } __attribute__((packed)) *pp = p;
  return pp->d;
}


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

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

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

LLVM IR (-O2):
define i32 @get_unaligned_int(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef size_t uint8_t;

/* Variables and functions */
size_t reversebytes(size_t);
void reverse_arraybytes(uint8_t *arr, size_t len) {
  uint8_t i;
  for (i = 0; i < len; i++) {
    arr[i] = reversebytes(arr[i]);
  }
}


x86 assembly (clang, -O0):
<reverse_arraybytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1167 <reverse_arraybytes+0x57>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <reversebytes@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <reverse_arraybytes+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_arraybytes>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1146 <reverse_arraybytes+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <reversebytes@plt>
mov    %rax,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <reverse_arraybytes+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @reverse_arraybytes(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %19, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %6
%11 = load i64*, i64** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i64, i64* %11, i64 %12
%14 = load i64, i64* %13
%15 = call i64 @reversebytes(i64 %14)
%16 = load i64*, i64** %3
%17 = load i64, i64* %5
%18 = getelementptr inbounds i64, i64* %16, i64 %17
store i64 %15, i64* %18
br label %19
19: ; preds = %10
%20 = load i64, i64* %5
%21 = add i64 %20, 1
store i64 %21, i64* %5
br label %6
22: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reverse_arraybytes(i64* 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 i64, i64* %0, i64 %5
%7 = load i64, i64* %6
%8 = tail call i64 @reversebytes(i64 %7)
store i64 %8, i64* %6
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret void
}
void tegra_serial_debug_init(unsigned int base, int irq, struct clk *clk,
                             int signal_irq, int wakeup_irq) {}


x86 assembly (clang, -O0):
<tegra_serial_debug_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.clk = type opaque
define void @tegra_serial_debug_init(i32 %0, i32 %1, %struct.clk* %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.clk*
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store %struct.clk* %2, %struct.clk** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.clk = type opaque
define void @tegra_serial_debug_init(i32 %0, i32 %1, %struct.clk* nocapture %2, i32 %3, i32 %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
const char *derp_version_short() {
  static char str[128];
  sprintf(str, "%d.%d.%d", 1, 2, 56);
  return str;
}


x86 assembly (clang, -O0):
<derp_version_short>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x38,%r8d
call   1030 <sprintf@plt>
lea    0x2f02(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<derp_version_short>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x38,%r8d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@derp_version_short.str = internal global [128 x i8] zeroinitializer
@.str = [9 x i8] c"%d.%d.%d\00"
define i8* @derp_version_short() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @derp_version_short.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 56)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @derp_version_short.str, i64 0, i64 0)
}

LLVM IR (-O2):
@derp_version_short.str = internal global [128 x i8] zeroinitializer
@.str = [9 x i8] c"%d.%d.%d\00"
define i8* @derp_version_short() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @derp_version_short.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 56)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @derp_version_short.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ckfread(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
void leggiStringa(char *buffer, FILE *stream) {
  int stringLength = 0;
  fread(&stringLength, sizeof(unsigned short), 1, stream);
  ckfread(buffer, sizeof(char) * stringLength, stream);
}


x86 assembly (clang, -O0):
<leggiStringa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1040 <ckfread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leggiStringa>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
mov    0x4(%rsp),%esi
mov    %r14,%rdi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ckfread@plt>

LLVM IR (-O0):
define void @leggiStringa(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %5
%6 = load i32*, i32** %4
%7 = call i32 @fread(i32* %5, i32 2, i32 1, i32* %6)
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = mul i64 1, %10
%12 = trunc i64 %11 to i32
%13 = load i32*, i32** %4
%14 = call i32 @ckfread(i8* %8, i32 %12, i32* %13)
ret void
}

LLVM IR (-O2):
define void @leggiStringa(i8* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i32 @fread(i32* %3, i32 2, i32 1, i32* %1)
%6 = load i32, i32* %3
%7 = tail call i32 @ckfread(i8* %0, i32 %6, i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printch(char);
int /*<<< orphan*/ printi(int);
int /*<<< orphan*/ prints(char *);
plural(int num, char *string) {
  printi(num);
  prints(string);
  if (num != 1)
    printch('s');
}


x86 assembly (clang, -O0):
<plural>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <printi@plt>
mov    -0x10(%rbp),%rdi
call   1040 <prints@plt>
cmpl   $0x1,-0x8(%rbp)
je     1164 <plural+0x34>
mov    $0x73,%edi
call   1050 <printch@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plural>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <printi@plt>
mov    %rbx,%rdi
call   1040 <prints@plt>
cmp    $0x1,%ebp
je     1154 <plural+0x24>
mov    $0x73,%edi
call   1050 <printch@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @plural(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = call i32 @printi(i32 %6)
%8 = load i8*, i8** %5
%9 = call i32 @prints(i8* %8)
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @printch(i8 signext 115)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @plural(i32 %0, i8* %1) {
%3 = tail call i32 @printi(i32 %0)
%4 = tail call i32 @prints(i8* %1)
%5 = icmp eq i32 %0, 1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @printch(i8 signext 115)
br label %8
8: ; preds = %6, %2
ret i32 undef
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, world\n");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [13 x i8] c"Hello, world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long atom;
};
typedef TYPE_1__ XPropertyEvent;

/* Variables and functions */
void set_XPropertyEvent_atom(void *_p, unsigned long _v) {
  ((XPropertyEvent *)_p)->atom = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XPropertyEvent_atom>:
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_XPropertyEvent_atom>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XPropertyEvent_atom(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_XPropertyEvent_atom(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int __get_array_size(char const *);
int __infer_nondet_int();
int utimes(const char *path, const struct timeval times[2]) {
  int size1;
  int success = __infer_nondet_int();
  size1 = __get_array_size(path);
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<utimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__get_array_size@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utimes>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <__get_array_size@plt>
xor    %eax,%eax
test   %ebp,%ebp
setle  %al
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i8*
%4 = alloca %struct.timeval*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store %struct.timeval* %1, %struct.timeval** %4
%7 = call i32 (...) @__infer_nondet_int()
store i32 %7, i32* %6
%8 = load i8*, i8** %3
%9 = call i32 @__get_array_size(i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %6
%11 = icmp sgt i32 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 0, i32 -1
ret i32 %13
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @utimes(i8* %0, %struct.timeval* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = tail call i32 @__get_array_size(i8* %0)
%5 = icmp slt i32 %3, 1
%6 = sext i1 %5 to i32
ret i32 %6
}
void undefinestring(str) char *str;
{ defineorundefinestring(str, 0); }


x86 assembly (clang, -O0):
<undefinestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <defineorundefinestring@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undefinestring>:
xor    %esi,%esi
xor    %eax,%eax
jmp    1030 <defineorundefinestring@plt>

LLVM IR (-O0):
define void @undefinestring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @defineorundefinestring to i32 (i8*, i32, ...)*)(i8* %3, i32 0)
ret void
}

LLVM IR (-O2):
define void @undefinestring(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @defineorundefinestring to i32 (i8*, i32, ...)*)(i8* %0, i32 0)
ret void
}
int cg_calculate_offset_stmt(struct NStmt *stmt) {
  static float sf4;
  static int s4;
  static unsigned int u4;
  static short int s2;
  static unsigned short int u2;
  static unsigned char u1;
}


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

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

LLVM IR (-O0):
%struct.NStmt = type opaque
@cg_calculate_offset_stmt.sf4 = internal global float 0.000000e+00
@cg_calculate_offset_stmt.s4 = internal global i32 0
@cg_calculate_offset_stmt.u4 = internal global i32 0
@cg_calculate_offset_stmt.s2 = internal global i16 0
@cg_calculate_offset_stmt.u2 = internal global i16 0
@cg_calculate_offset_stmt.u1 = internal global i8 0
define i32 @cg_calculate_offset_stmt(%struct.NStmt* %0) {
%2 = alloca i32
%3 = alloca %struct.NStmt*
store %struct.NStmt* %0, %struct.NStmt** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.NStmt = type opaque
define i32 @cg_calculate_offset_stmt(%struct.NStmt* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
bool audio_frame(int16_t *UNUSED_buffer __attribute__((__unused__))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @audio_frame(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct t_infolist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ infolist_reset_item_cursor(struct t_infolist *);
scalar_t__ infolist_valid(struct t_infolist *);
void plugin_api_infolist_reset_item_cursor(struct t_infolist *infolist) {
  if (infolist && infolist_valid(infolist)) {
    infolist_reset_item_cursor(infolist);
  }
}


x86 assembly (clang, -O0):
<plugin_api_infolist_reset_item_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1153 <plugin_api_infolist_reset_item_cursor+0x33>
mov    -0x8(%rbp),%rdi
call   1030 <infolist_valid@plt>
cmp    $0x0,%rax
je     1153 <plugin_api_infolist_reset_item_cursor+0x33>
mov    -0x8(%rbp),%rdi
call   1040 <infolist_reset_item_cursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_infolist_reset_item_cursor>:
push   %rbx
test   %rdi,%rdi
je     113c <plugin_api_infolist_reset_item_cursor+0x1c>
mov    %rdi,%rbx
call   1030 <infolist_valid@plt>
test   %rax,%rax
je     113c <plugin_api_infolist_reset_item_cursor+0x1c>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <infolist_reset_item_cursor@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.t_infolist = type { i32 }
define void @plugin_api_infolist_reset_item_cursor(%struct.t_infolist* %0) {
%2 = alloca %struct.t_infolist*
store %struct.t_infolist* %0, %struct.t_infolist** %2
%3 = load %struct.t_infolist*, %struct.t_infolist** %2
%4 = icmp ne %struct.t_infolist* %3, null
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load %struct.t_infolist*, %struct.t_infolist** %2
%7 = call i64 @infolist_valid(%struct.t_infolist* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load %struct.t_infolist*, %struct.t_infolist** %2
%11 = call i32 @infolist_reset_item_cursor(%struct.t_infolist* %10)
br label %12
12: ; preds = %9, %5, %1
ret void
}

LLVM IR (-O2):
%struct.t_infolist = type { i32 }
define void @plugin_api_infolist_reset_item_cursor(%struct.t_infolist* %0) {
%2 = icmp eq %struct.t_infolist* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @infolist_valid(%struct.t_infolist* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @infolist_reset_item_cursor(%struct.t_infolist* %0)
br label %8
8: ; preds = %6, %3, %1
ret void
}
void test_105(unsigned short *x, unsigned int *y) { y[0] = x[1] >> 6; }


x86 assembly (clang, -O0):
<test_105>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%ecx
sar    $0x6,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_105>:
movzwl 0x2(%rdi),%eax
shr    $0x6,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @test_105(i16* %0, i32* %1) {
%3 = alloca i16*
%4 = alloca i32*
store i16* %0, i16** %3
store i32* %1, i32** %4
%5 = load i16*, i16** %3
%6 = getelementptr inbounds i16, i16* %5, i64 1
%7 = load i16, i16* %6
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 6
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @test_105(i16* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i16, i16* %0, i64 1
%4 = load i16, i16* %3
%5 = lshr i16 %4, 6
%6 = zext i16 %5 to i32
store i32 %6, i32* %1
ret void
}
/* Variables and functions */
int pop();
int /*<<< orphan*/ push(int);
void mul() { push(pop() * pop()); }


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

x86 assembly (clang, -O2):
<mul>:
push   %rbx
xor    %eax,%eax
call   1030 <pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <pop@plt>
imul   %eax,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @mul() {
%1 = call i32 (...) @pop()
%2 = call i32 (...) @pop()
%3 = mul nsw i32 %1, %2
%4 = call i32 @push(i32 %3)
ret void
}

LLVM IR (-O2):
define void @mul() {
%1 = tail call i32 (...) @pop()
%2 = tail call i32 (...) @pop()
%3 = mul nsw i32 %2, %1
%4 = tail call i32 @push(i32 %3)
ret void
}
void fillBufferFromWidechar(unsigned short *inputBuffer, char *outputText) {
  unsigned short *input = inputBuffer;
  char *output = outputText;
  while (*input)
    *output++ = *input++;
  *output = '\0';
}


x86 assembly (clang, -O0):
<fillBufferFromWidechar>:
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    -0x18(%rbp),%rax
cmpw   $0x0,(%rax)
je     1154 <fillBufferFromWidechar+0x54>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%ax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
jmp    111c <fillBufferFromWidechar+0x1c>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillBufferFromWidechar>:
movzwl (%rdi),%eax
test   %ax,%ax
je     1122 <fillBufferFromWidechar+0x22>
add    $0x2,%rdi
nopl   0x0(%rax)
mov    %al,(%rsi)
add    $0x1,%rsi
movzwl (%rdi),%eax
add    $0x2,%rdi
test   %ax,%ax
jne    1110 <fillBufferFromWidechar+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @fillBufferFromWidechar(i16* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = icmp eq i16 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i16 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %1, %2 ]
%8 = phi i16* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i16, i16* %8, i64 1
%10 = trunc i16 %6 to i8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%12 = load i16, i16* %9
%13 = icmp eq i16 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i8* [ %1, %2 ], [ %11, %5 ]
store i8 0, i8* %15
ret void
}
int MQTTPacket_encode(unsigned char *buf, int length) {
  int rc = 0;
  ;
  do {
    char d = length % 128;
    length /= 128;
    if (length > 0)
      d |= 0x80;
    buf[rc++] = d;
  } while (length > 0);
  ;
  return rc;
}


x86 assembly (clang, -O0):
<MQTTPacket_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x11(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1146 <MQTTPacket_encode+0x46>
movsbl -0x11(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x10(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
cmpl   $0x0,-0xc(%rbp)
jg     1112 <MQTTPacket_encode+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MQTTPacket_encode>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x7f(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
mov    %ecx,%edx
and    $0xffffff80,%edx
mov    %esi,%r8d
sub    %edx,%r8d
sar    $0x7,%ecx
mov    %r8d,%edx
or     $0x80,%dl
movzbl %dl,%edx
cmp    $0x7f,%esi
cmovle %r8d,%edx
mov    %dl,(%rdi,%rax,1)
lea    0x1(%rax),%rax
mov    %ecx,%esi
jg     1110 <MQTTPacket_encode+0x10>
ret

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

LLVM IR (-O2):
define i32 @MQTTPacket_encode(i8* nocapture writeonly %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %12, %3 ], [ 0, %2 ]
%5 = phi i32 [ %8, %3 ], [ %1, %2 ]
%6 = srem i32 %5, 128
%7 = trunc i32 %6 to i8
%8 = sdiv i32 %5, 128
%9 = icmp sgt i32 %5, 127
%10 = or i8 %7, -128
%11 = select i1 %9, i8 %10, i8 %7
%12 = add nuw i64 %4, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %11, i8* %13
br i1 %9, label %3, label %14
14: ; preds = %3
%15 = trunc i64 %12 to i32
ret i32 %15
}
/* Type definitions */
struct psauxDevice {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int compareDevice(struct device *, struct device *);
int psauxCompareDevice(struct psauxDevice *dev1, struct psauxDevice *dev2) {
  return compareDevice((struct device *)dev1, (struct device *)dev2);
}


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

x86 assembly (clang, -O2):
<psauxCompareDevice>:
jmp    1030 <compareDevice@plt>

LLVM IR (-O0):
%struct.psauxDevice = type { i32 }
%struct.device = type { i32 }
define i32 @psauxCompareDevice(%struct.psauxDevice* %0, %struct.psauxDevice* %1) {
%3 = alloca %struct.psauxDevice*
%4 = alloca %struct.psauxDevice*
store %struct.psauxDevice* %0, %struct.psauxDevice** %3
store %struct.psauxDevice* %1, %struct.psauxDevice** %4
%5 = load %struct.psauxDevice*, %struct.psauxDevice** %3
%6 = bitcast %struct.psauxDevice* %5 to %struct.device*
%7 = load %struct.psauxDevice*, %struct.psauxDevice** %4
%8 = bitcast %struct.psauxDevice* %7 to %struct.device*
%9 = call i32 @compareDevice(%struct.device* %6, %struct.device* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.psauxDevice = type { i32 }
%struct.device = type { i32 }
define i32 @psauxCompareDevice(%struct.psauxDevice* %0, %struct.psauxDevice* %1) {
%3 = bitcast %struct.psauxDevice* %0 to %struct.device*
%4 = bitcast %struct.psauxDevice* %1 to %struct.device*
%5 = tail call i32 @compareDevice(%struct.device* %3, %struct.device* %4)
ret i32 %5
}
int region_destroy() { return 0; }


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

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

LLVM IR (-O0):
define i32 @region_destroy() {
ret i32 0
}

LLVM IR (-O2):
define i32 @region_destroy() {
ret i32 0
}
int detect_xenomai() { return 0; }


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

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

LLVM IR (-O0):
define i32 @detect_xenomai() {
ret i32 0
}

LLVM IR (-O2):
define i32 @detect_xenomai() {
ret i32 0
}