xunge/DecIR huggingface dataset:
/* Variables and functions */
char *proc_get_driver(unsigned int cpu) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @proc_get_driver(i32 %0) {
ret i8* null
}
_Complex double cplx2(double r) { return r + 2.0i; }


x86 assembly (clang, -O0):
<cplx2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movabs $0x4000000000000000,%rax
mov    %rax,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<cplx2>:
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  0xef0(%rip),%xmm1
ret

LLVM IR (-O0):
define { double, double } @cplx2(double %0) {
%2 = alloca { double, double }
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fadd double %4, 0.000000e+00
%6 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%7 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
store double %5, double* %6
store double 2.000000e+00, double* %7
%8 = load { double, double }, { double, double }* %2
ret { double, double } %8
}

LLVM IR (-O2):
define { double, double } @cplx2(double %0) {
%2 = fadd double %0, 0.000000e+00
%3 = insertvalue { double, double } poison, double %2, 0
%4 = insertvalue { double, double } %3, double 2.000000e+00, 1
ret { double, double } %4
}
int t(int a, int b) { return (a <= b ? 5 : -5); }


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0xfffffffb,%eax
mov    $0x5,%ecx
cmp    %esi,%edx
cmovle %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
cmp    %esi,%edi
mov    $0xfffffffb,%ecx
mov    $0x5,%eax
cmovg  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @t(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 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 5, i32 -5
ret i32 %9
}

LLVM IR (-O2):
define i32 @t(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 -5, i32 5
ret i32 %4
}
int f() {
  int x;
  x = 1;
  {
    int p;
    p = 10;
    x = p + x;
  }
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 10, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %1
%5 = add nsw i32 %3, %4
store i32 %5, i32* %1
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
ret i32 11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int fun_stub_base_11_stub(long long a) {
  printf("fun_stub_base_11_stub:a = %lld \n", a);
  return a;
}


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

x86 assembly (clang, -O2):
<fun_stub_base_11_stub>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"fun_stub_base_11_stub:a = %lld \0A\00"
define i32 @fun_stub_base_11_stub(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %3)
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [33 x i8] c"fun_stub_base_11_stub:a = %lld \0A\00"
define i32 @fun_stub_base_11_stub(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 %0)
%3 = trunc i64 %0 to i32
ret i32 %3
}
int llvm_fcmp_ole(double X, double Y) { return X <= Y; }


x86 assembly (clang, -O0):
<llvm_fcmp_ole>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llvm_fcmp_ole>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @llvm_fcmp_ole(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @llvm_fcmp_ole(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int chiedi_secondo_fattore() {
  int y;
  printf("Inserisci il secondo fattore\n> ");
  scanf("%d", &y);
  return y;
}


x86 assembly (clang, -O0):
<chiedi_secondo_fattore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chiedi_secondo_fattore>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Inserisci il secondo fattore\0A> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @chiedi_secondo_fattore() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [32 x i8] c"Inserisci il secondo fattore\0A> \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @chiedi_secondo_fattore() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ CMS_ContentInfo;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ CMS_F_CMS_COMPRESS;
int /*<<< orphan*/ CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM;
int /*<<< orphan*/ CMSerr(int /*<<< orphan*/, int /*<<< orphan*/);
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags) {
  CMSerr(CMS_F_CMS_COMPRESS, CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM);
  return NULL;
}


x86 assembly (clang, -O0):
<CMS_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
call   1030 <CMSerr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMS_compress>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
call   1030 <CMSerr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@CMS_F_CMS_COMPRESS = global i32 0
@CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM = global i32 0
define i32* @CMS_compress(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* @CMS_F_CMS_COMPRESS
%8 = load i32, i32* @CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM
%9 = call i32 @CMSerr(i32 %7, i32 %8)
ret i32* null
}

LLVM IR (-O2):
@CMS_F_CMS_COMPRESS = global i32 0
@CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM = global i32 0
define noalias i32* @CMS_compress(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @CMS_F_CMS_COMPRESS
%5 = load i32, i32* @CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM
%6 = tail call i32 @CMSerr(i32 %4, i32 %5)
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: domainname [ypdomain]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"usage: domainname [ypdomain]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"usage: domainname [ypdomain]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void XCopyArea() {}


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

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

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

LLVM IR (-O2):
define void @XCopyArea() {
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int select(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, struct timeval *);
int sleep_us(int us) {
  struct timeval val;
  val.tv_sec = us / 1000000;
  val.tv_usec = us % 1000000;
  return select(0, NULL, NULL, NULL, &val);
}


x86 assembly (clang, -O0):
<sleep_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x10(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep_us>:
push   %rax
movslq %edi,%rax
imul   $0x431bde83,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0xf4240,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @sleep_us(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timeval
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
store i32 %8, i32* %9
%10 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @sleep_us(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = sdiv i32 %0, 1000000
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i32 %6, i32* %7
%8 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret i32 %8
}
int test_imm_F8uint16_mem(unsigned short *val) {
  return ((*val) & (0xF8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F8uint16_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, 248
%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_F8uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 248
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DST(int);
int /*<<< orphan*/ MIRROR_SQUARE(int /*<<< orphan*/);
int MOVE(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SRC(int);
int MIRROR_MOVE(int mv) {
  return MOVE(MIRROR_SQUARE(SRC(mv)), MIRROR_SQUARE(DST(mv)));
}


x86 assembly (clang, -O0):
<MIRROR_MOVE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <SRC@plt>
mov    %eax,%edi
call   1030 <MIRROR_SQUARE@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <DST@plt>
mov    %eax,%edi
call   1030 <MIRROR_SQUARE@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1060 <MOVE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIRROR_MOVE>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <SRC@plt>
mov    %eax,%edi
call   1030 <MIRROR_SQUARE@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <DST@plt>
mov    %eax,%edi
call   1030 <MIRROR_SQUARE@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <MOVE@plt>

LLVM IR (-O0):
define i32 @MIRROR_MOVE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @SRC(i32 %3)
%5 = call i32 @MIRROR_SQUARE(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @DST(i32 %6)
%8 = call i32 @MIRROR_SQUARE(i32 %7)
%9 = call i32 @MOVE(i32 %5, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @MIRROR_MOVE(i32 %0) {
%2 = tail call i32 @SRC(i32 %0)
%3 = tail call i32 @MIRROR_SQUARE(i32 %2)
%4 = tail call i32 @DST(i32 %0)
%5 = tail call i32 @MIRROR_SQUARE(i32 %4)
%6 = tail call i32 @MOVE(i32 %3, i32 %5)
ret i32 %6
}
/* Type definitions */
struct kimage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ remove_ima_buffer(void *, int);
int setup_ima_buffer(const struct kimage *image, void *fdt, int chosen_node) {
  remove_ima_buffer(fdt, chosen_node);
  return 0;
}


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

x86 assembly (clang, -O2):
<setup_ima_buffer>:
push   %rax
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <remove_ima_buffer@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.kimage = type { i32 }
define i32 @setup_ima_buffer(%struct.kimage* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @remove_ima_buffer(i8* %1, i32 %2)
ret i32 0
}
/* Variables and functions */
unsigned char i2c_ReadStatREG(int);
unsigned char i2c1_ReadStatREG(void) { return i2c_ReadStatREG(1); }


x86 assembly (clang, -O0):
<i2c1_ReadStatREG>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <i2c_ReadStatREG@plt>
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1_ReadStatREG>:
mov    $0x1,%edi
jmp    1030 <i2c_ReadStatREG@plt>

LLVM IR (-O0):
define zeroext i8 @i2c1_ReadStatREG() {
%1 = call zeroext i8 @i2c_ReadStatREG(i32 1)
ret i8 %1
}

LLVM IR (-O2):
define zeroext i8 @i2c1_ReadStatREG() {
%1 = tail call zeroext i8 @i2c_ReadStatREG(i32 1)
ret i8 %1
}
void av_frame_new_side_data_from_buf() {}


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

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

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

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

/* Variables and functions */
int EOF;
int fwrite(int *, int, int, int /*<<< orphan*/ *);
int fputc(int c, FILE *stream) {
  return (fwrite(&c, 1, 1, stream) == 1) ? c : EOF;
}


x86 assembly (clang, -O0):
<fputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x4(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
cmp    $0x1,%eax
jne    1147 <fputc+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <fputc+0x43>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputc>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rcx
mov    %edi,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
cmp    $0x1,%eax
je     113f <fputc+0x2f>
mov    0x2ea9(%rip),%rbx
mov    (%rbx),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fputc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = call i32 @fwrite(i32* %3, i32 1, i32 1, i32* %5)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* @EOF
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fputc(i32 %0, i32* nocapture %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 1, i32 1, i32* %1)
%5 = icmp eq i32 %4, 1
%6 = load i32, i32* %3
%7 = load i32, i32* @EOF
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, square, cube;
  scanf("%d", &n);
  square = n * n;
  cube = square * n;
  printf("%d\n%d\n", square, cube);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%d\0A%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = mul nsw i32 %5, %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Variables and functions */
char *get_tty(char *);
char *is_a_device(char *);
char *get_terminal(char *s) {
  char *devname;
  if (devname = is_a_device(s)) {
    return devname;
  }
  devname = get_tty(s);
  return devname;
}


x86 assembly (clang, -O0):
<get_terminal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <is_a_device@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1150 <get_terminal+0x30>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1165 <get_terminal+0x45>
mov    -0x10(%rbp),%rdi
call   1030 <get_tty@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_terminal>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_a_device@plt>
test   %rax,%rax
je     1130 <get_terminal+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <get_tty@plt>

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

LLVM IR (-O2):
define i8* @get_terminal(i8* %0) {
%2 = tail call i8* @is_a_device(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @get_tty(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
ret i8* %7
}
void REMR3StateUpdate(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3StateUpdate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(int *, int *, int /*<<< orphan*/);
void memmove_good2() {
  int arr1[10];
  int arr2[20];
  memmove(arr2, arr1, 0);
}


x86 assembly (clang, -O0):
<memmove_good2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x80(%rbp),%rdi
lea    -0x30(%rbp),%rsi
xor    %edx,%edx
call   1030 <memmove@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove_good2>:
sub    $0x88,%rsp
lea    0x30(%rsp),%rdi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <memmove@plt>
add    $0x88,%rsp
ret

LLVM IR (-O0):
define void @memmove_good2() {
%1 = alloca [10 x i32]
%2 = alloca [20 x i32]
%3 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @memmove(i32* %3, i32* %4, i32 0)
ret void
}

LLVM IR (-O2):
define void @memmove_good2() {
%1 = alloca [10 x i32]
%2 = alloca [20 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [20 x i32]* %2 to i8*
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = call i32 @memmove(i32* %5, i32* %6, i32 0)
ret void
}
void set_pcie_reset(void) {}


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

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

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

LLVM IR (-O2):
define void @set_pcie_reset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void error(char *msj) {
  perror(msj);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <perror@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int override_redirect;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
void set_XConfigureEvent_override_redirect(void *_p, int _v) {
  ((XConfigureEvent *)_p)->override_redirect = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XConfigureEvent_override_redirect>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XConfigureEvent_override_redirect(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %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 i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XConfigureEvent_override_redirect(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ asm_powoff();
void shutdown() { asm_powoff(); }


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

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

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

LLVM IR (-O2):
define void @shutdown() {
%1 = tail call i32 (...) @asm_powoff()
ret void
}
/* Variables and functions */
short printNumber(unsigned long, int);
scalar_t__ println();
short printNumber_UL_ln(unsigned long num, int base) {
  short n = 0;
  n = printNumber(num, base);
  n += println();
  return (n);
}


x86 assembly (clang, -O0):
<printNumber_UL_ln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movw   $0x0,-0xe(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <printNumber@plt>
mov    %ax,-0xe(%rbp)
mov    $0x0,%al
call   1030 <println@plt>
mov    %rax,%rcx
movswq -0xe(%rbp),%rax
add    %rcx,%rax
mov    %ax,-0xe(%rbp)
movswl -0xe(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printNumber_UL_ln>:
push   %rbx
call   1040 <printNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <println@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @printNumber_UL_ln(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i16
store i64 %0, i64* %3
store i32 %1, i32* %4
store i16 0, i16* %5
%6 = load i64, i64* %3
%7 = load i32, i32* %4
%8 = call signext i16 @printNumber(i64 %6, i32 %7)
store i16 %8, i16* %5
%9 = call i64 (...) @println()
%10 = load i16, i16* %5
%11 = sext i16 %10 to i64
%12 = add nsw i64 %11, %9
%13 = trunc i64 %12 to i16
store i16 %13, i16* %5
%14 = load i16, i16* %5
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @printNumber_UL_ln(i64 %0, i32 %1) {
%3 = tail call signext i16 @printNumber(i64 %0, i32 %1)
%4 = tail call i64 (...) @println()
%5 = trunc i64 %4 to i16
%6 = add i16 %3, %5
ret i16 %6
}
int test_imm_94int16_mem(short *val) {
  return ((*val) & (-0x94 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_94int16_mem>:
movzwl (%rdi),%eax
test   $0xff6c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_94int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -148
%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_94int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -148
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ endline();
void endline_() { endline(); }


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

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

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

LLVM IR (-O2):
define void @endline_() {
%1 = tail call i32 (...) @endline()
ret void
}
int check() {
  union UN {
    char c;
    int i;
  } un;
  un.i = 1;
  return un.c;
}


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

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

LLVM IR (-O0):
%union.UN = type { i32 }
define i32 @check() {
%1 = alloca %union.UN
%2 = bitcast %union.UN* %1 to i32*
store i32 1, i32* %2
%3 = bitcast %union.UN* %1 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @check() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char const *);
int strinlist(char *str, const char *list[]) {
  while (*list) {
    if (!strcmp(str, *list)) {
      return 1;
    }
    ++list;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strinlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1164 <strinlist+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1153 <strinlist+0x43>
movl   $0x1,-0x4(%rbp)
jmp    116b <strinlist+0x5b>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1120 <strinlist+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strinlist>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rsi
xor    %r14d,%r14d
test   %rsi,%rsi
je     1150 <strinlist+0x40>
mov    %rdi,%rbp
add    $0x8,%rbx
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     114a <strinlist+0x3a>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <strinlist+0x20>
jmp    1150 <strinlist+0x40>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strinlist(i8* nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8*, i8** %13
%7 = icmp eq i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8* [ %6, %5 ], [ %3, %2 ]
%10 = phi i8** [ %13, %5 ], [ %1, %2 ]
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* %9)
%12 = icmp eq i32 %11, 0
%13 = getelementptr inbounds i8*, i8** %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigchld_handler(int arg) { printf("child terminate\n"); }


x86 assembly (clang, -O0):
<sigchld_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"child terminate\0A\00"
define void @sigchld_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"child terminate\00"
define void @sigchld_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ foo(unsigned char);
int main(void) {
  if (foo((unsigned char)~0))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xff,%edi
call   1040 <foo@plt>
cmp    $0x0,%rax
je     115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xff,%edi
call   1040 <foo@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @foo(i8 zeroext -1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i8 zeroext -1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exp(double);
int /*<<< orphan*/ printf(char *, double, int /*<<< orphan*/);
void calculate_exp(double num) { printf("exp of %lf is %lf\n", num, exp(num)); }


x86 assembly (clang, -O0):
<calculate_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x10(%rbp),%xmm0
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_exp>:
push   %rax
movsd  %xmm0,(%rsp)
call   1040 <exp@plt>
lea    0xece(%rip),%rdi
movsd  (%rsp),%xmm0
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"exp of %lf is %lf\0A\00"
define void @calculate_exp(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call i32 @exp(double %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"exp of %lf is %lf\0A\00"
define void @calculate_exp(double %0) {
%2 = tail call i32 @exp(double %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), double %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
int main(void) {
  yyparse();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int mbtowc(wchar_t *__restrict pwc, const char *__restrict s, size_t n) {
  return -1;
}


x86 assembly (clang, -O0):
<mbtowc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mbtowc(i32* noalias nocapture readnone %0, i8* noalias nocapture readnone %1, i64 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
int scaner();
void mustbe(int what, int e) {
  if (scaner() != what)
    error(e);
}


x86 assembly (clang, -O0):
<mustbe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <scaner@plt>
cmp    -0x4(%rbp),%eax
je     1146 <mustbe+0x26>
mov    -0x8(%rbp),%edi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mustbe>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <scaner@plt>
cmp    %ebp,%eax
jne    1139 <mustbe+0x19>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <error@plt>

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

LLVM IR (-O2):
define void @mustbe(i32 %0, i32 %1) {
%3 = tail call i32 (...) @scaner()
%4 = icmp eq i32 %3, %0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @error(i32 %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Usage(void) {
  fprintf(stderr, "USAGE: %s <decimal netmask> <decimal IP address>\n",
          "ipmask");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"USAGE: %s <decimal netmask> <decimal IP address>\0A\00"
@.str.1 = [7 x i8] c"ipmask\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"USAGE: %s <decimal netmask> <decimal IP address>\0A\00"
@.str.1 = [7 x i8] c"ipmask\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void zeroit(char *s, size_t len) {
  for (; len > 0; len--)
    *s++ = 0;
}


x86 assembly (clang, -O0):
<zeroit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    113a <zeroit+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <zeroit+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zeroit>:
test   %rsi,%rsi
je     1124 <zeroit+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @zeroit(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
const char *XMLParserSeq_getNextParamValue(const char *pBuff, int *paramLen) {
  const char *origPtr = (++pBuff);
  while ((*pBuff != ' ') && (*pBuff != '>'))
    pBuff++;
  *paramLen = (int)(pBuff - origPtr);
  return origPtr;
}


x86 assembly (clang, -O0):
<XMLParserSeq_getNextParamValue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x19(%rbp)
je     1141 <XMLParserSeq_getNextParamValue+0x41>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3e,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1151 <XMLParserSeq_getNextParamValue+0x51>
jmp    1162 <XMLParserSeq_getNextParamValue+0x62>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <XMLParserSeq_getNextParamValue+0x1c>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XMLParserSeq_getNextParamValue>:
mov    %rdi,%rax
add    $0x1,%rax
xor    %ecx,%ecx
nopl   0x0(%rax)
movzbl (%rax,%rcx,1),%edx
cmp    $0x20,%dl
je     1124 <XMLParserSeq_getNextParamValue+0x24>
cmp    $0x3e,%dl
je     1124 <XMLParserSeq_getNextParamValue+0x24>
add    $0x1,%rcx
jmp    1110 <XMLParserSeq_getNextParamValue+0x10>
mov    %ecx,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @XMLParserSeq_getNextParamValue(i8* %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
br label %4
4: ; preds = %7, %2
%5 = phi i8* [ %3, %2 ], [ %8, %7 ]
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 32, label %9
i8 62, label %9
]
7: ; preds = %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
br label %4
9: ; preds = %4, %4
%10 = ptrtoint i8* %5 to i64
%11 = ptrtoint i8* %3 to i64
%12 = sub i64 %10, %11
%13 = trunc i64 %12 to i32
store i32 %13, i32* %1
ret i8* %3
}
void NV21ToYUV24Row_NEON() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToYUV24Row_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write4ToEco(unsigned char *, unsigned int);
void conv4FromNativeToEco(unsigned char *p) {
  unsigned int data;
  data = *(unsigned int *)p;
  write4ToEco(p, data);
}


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

x86 assembly (clang, -O2):
<conv4FromNativeToEco>:
mov    (%rdi),%esi
jmp    1030 <write4ToEco@plt>

LLVM IR (-O0):
define void @conv4FromNativeToEco(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = load i32, i32* %3
%9 = call i32 @write4ToEco(i8* %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @conv4FromNativeToEco(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @write4ToEco(i8* %0, i32 %3)
ret void
}
void __attribute__((__warning__(
    "curl_easy_setopt expects a curl_off_t argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_curl_off_t(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_curl_off_t() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
__attribute__((weak)) void PIOA_IrqHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<PIOA_IrqHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <PIOA_IrqHandler+0x9>
jmp    1109 <PIOA_IrqHandler+0x9>

x86 assembly (clang, -O2):
<PIOA_IrqHandler>:
jmp    1100 <PIOA_IrqHandler>

LLVM IR (-O0):
define weak void @PIOA_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @PIOA_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}