xunge/DecIR huggingface dataset:
void testAssignment() {
  float f = 222222;
  double b = 222222222222L;
  float ff = 222222222222L;
  float ffff = 222222222222UL;
  long l = 222222222222L;
}


x86 assembly (clang, -O0):
<testAssignment>:
push   %rbp
mov    %rsp,%rbp
movss  0xef8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  0xeda(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movabs $0x33bd7a038e,%rax
mov    %rax,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testAssignment() {
%1 = alloca float
%2 = alloca double
%3 = alloca float
%4 = alloca float
%5 = alloca i64
store float 2.222220e+05, float* %1
store double 0x4249DEBD01C70000, double* %2
store float 0x4249DEBD00000000, float* %3
store float 0x4249DEBD00000000, float* %4
store i64 222222222222, i64* %5
ret void
}

LLVM IR (-O2):
define void @testAssignment() {
ret void
}
void CMUTIL_StringBaseClear() {}


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

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

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

LLVM IR (-O2):
define void @CMUTIL_StringBaseClear() {
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzFetchPush_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN(int);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int, int);
void BrzFetchPush_reqdown(struct comp *comp, int port) {
  struct BrzFetchPush_ *c = (struct BrzFetchPush_ *)comp;
  SEND_ACKDOWN(port);
  if (port == 1) {
    SEND_DATAOFF_DELAYED(2, 1);
  }
}


x86 assembly (clang, -O0):
<BrzFetchPush_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <SEND_ACKDOWN@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1158 <BrzFetchPush_reqdown+0x38>
mov    $0x2,%edi
mov    $0x1,%esi
call   1040 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzFetchPush_reqdown>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
call   1030 <SEND_ACKDOWN@plt>
cmp    $0x1,%ebx
jne    113f <BrzFetchPush_reqdown+0x1f>
mov    $0x2,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <SEND_DATAOFF_DELAYED@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzFetchPush_ = type { i32 }
define void @BrzFetchPush_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzFetchPush_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzFetchPush_*
store %struct.BrzFetchPush_* %7, %struct.BrzFetchPush_** %5
%8 = load i32, i32* %4
%9 = call i32 @SEND_ACKDOWN(i32 %8)
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @SEND_DATAOFF_DELAYED(i32 2, i32 1)
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzFetchPush_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN(i32 %1)
%4 = icmp eq i32 %1, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @SEND_DATAOFF_DELAYED(i32 2, i32 1)
br label %7
7: ; preds = %5, %2
ret void
}
adrreg0indreg1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0indreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jg     113a <adrreg0indreg1+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <adrreg0indreg1+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0indreg1>:
mov    0x2625a00(%r8),%ecx
xor    %eax,%eax
cmp    (%r9),%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @adrreg0indreg1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = load i32, i32* %5
%10 = icmp sle i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ pic_disable();
void arch_finish() { pic_disable(); }


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

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

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

LLVM IR (-O2):
define void @arch_finish() {
%1 = tail call i32 (...) @pic_disable()
ret void
}
int mvneta_bm_pool_refill(struct mvneta_bm *priv,
                          struct mvneta_bm_pool *bm_pool) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.mvneta_bm = type opaque
%struct.mvneta_bm_pool = type opaque
define i32 @mvneta_bm_pool_refill(%struct.mvneta_bm* nocapture readnone %0, %struct.mvneta_bm_pool* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello");
  printf(", world");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [8 x i8] c", world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
int gconfig_() {}


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

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

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

LLVM IR (-O2):
define i32 @gconfig_() {
ret i32 undef
}
void rop3_238_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D | S;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_238_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @rop3_238_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = xor i32 %18, -1
%20 = and i32 %16, %19
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = or i32 %20, %26
%28 = trunc i32 %27 to i8
%29 = load i8*, i8** %4
store i8 %28, i8* %29
ret void
}

LLVM IR (-O2):
define void @rop3_238_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
ret void
}
int gcd(int y1, int y2) {
  while (y1 != y2) {
    if (y1 > y2) {
      y1 = y1 - y2;
    } else {
      y2 = y2 - y1;
    }
  }
  return y1;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     113e <gcd+0x3e>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1130 <gcd+0x30>
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <gcd+0x39>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
cmp    %esi,%edi
je     1127 <gcd+0x27>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %eax,%esi
mov    $0x0,%edx
cmovl  %esi,%edx
mov    %eax,%edi
cmovl  %ecx,%edi
sub    %edx,%eax
sub    %edi,%esi
cmp    %esi,%eax
jne    1110 <gcd+0x10>
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = icmp slt i32 %5, %6
%8 = select i1 %7, i32 %5, i32 0
%9 = sub nsw i32 %6, %8
%10 = select i1 %7, i32 0, i32 %6
%11 = sub nsw i32 %5, %10
%12 = icmp eq i32 %9, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i32 [ %0, %2 ], [ %9, %4 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ des_block;
typedef int /*<<< orphan*/ caddr_t;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ xdr_opaque(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
bool_t xdr_des_block(XDR *xdrs, des_block *blkp) {
  assert(xdrs != NULL);
  assert(blkp != NULL);
  return (xdr_opaque(xdrs, (caddr_t)(void *)blkp, sizeof(des_block)));
}


x86 assembly (clang, -O0):
<xdr_des_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    $0x4,%edx
call   1040 <xdr_opaque@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_des_block>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
mov    $0x4,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xdr_opaque@plt>

LLVM IR (-O0):
define i32 @xdr_des_block(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 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32*, i32** %4
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32*, i32** %3
%14 = load i32*, i32** %4
%15 = bitcast i32* %14 to i8*
%16 = ptrtoint i8* %15 to i32
%17 = call i32 @xdr_opaque(i32* %13, i32 %16, i32 4)
ret i32 %17
}

LLVM IR (-O2):
define i32 @xdr_des_block(i32* %0, i32* %1) {
%3 = icmp ne i32* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i32* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = ptrtoint i32* %1 to i64
%10 = trunc i64 %9 to i32
%11 = tail call i32 @xdr_opaque(i32* %0, i32 %10, i32 4)
ret i32 %11
}
void pc_canopen_init(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ pci_dummy_read(int /*<<< orphan*/, void *);
uint16_t pci_dummy_readw(uint16_t Port, void *p) {
  return pci_dummy_read(Port, p);
}


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

x86 assembly (clang, -O2):
<pci_dummy_readw>:
jmp    1030 <pci_dummy_read@plt>

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

LLVM IR (-O2):
define i32 @pci_dummy_readw(i32 %0, i8* %1) {
%3 = tail call i32 @pci_dummy_read(i32 %0, i8* %1)
ret i32 %3
}
unsigned xrop3_64_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_64_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_64_0_0>:
mov    %edi,%eax
and    %esi,%eax
shl    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_64_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_64_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = and i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ ftok(char *, int /*<<< orphan*/);
int init_one_key(key_t *k, char *name) {
  FILE *fp = fopen(name, "w");
  fclose(fp);
  *k = ftok(name, 0);
  return 0;
}


x86 assembly (clang, -O0):
<init_one_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <ftok@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_one_key>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
call   1040 <fopen@plt>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <ftok@plt>
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define i32 @init_one_key(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i32*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @fclose(i32* %8)
%10 = load i8*, i8** %4
%11 = call i32 @ftok(i8* %10, i32 0)
%12 = load i32*, i32** %3
store i32 %11, i32* %12
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define i32 @init_one_key(i32* nocapture writeonly %0, i8* %1) {
%3 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fclose(i32* %3)
%5 = tail call i32 @ftok(i8* %1, i32 0)
store i32 %5, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 0;
  assert(x++ == 0);
  assert(x == 1);
  assert(++x == 2);
  assert(x == 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = icmp eq i32 %3, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = icmp eq i32 %13, 2
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 2
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
struct auditsec_info {
  int dummy;
};

/* Variables and functions */
long syscall(int, struct auditsec_info *);
long int auditsec_question(struct auditsec_info *user_as_i) {
  return syscall(300, user_as_i);
}


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

x86 assembly (clang, -O2):
<auditsec_question>:
mov    %rdi,%rsi
mov    $0x12c,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.auditsec_info = type { i32 }
define i64 @auditsec_question(%struct.auditsec_info* %0) {
%2 = alloca %struct.auditsec_info*
store %struct.auditsec_info* %0, %struct.auditsec_info** %2
%3 = load %struct.auditsec_info*, %struct.auditsec_info** %2
%4 = call i64 @syscall(i32 300, %struct.auditsec_info* %3)
ret i64 %4
}

LLVM IR (-O2):
%struct.auditsec_info = type { i32 }
define i64 @auditsec_question(%struct.auditsec_info* %0) {
%2 = tail call i64 @syscall(i32 300, %struct.auditsec_info* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_bst();
int main(void) {
  test_bst();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_bst()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(int);
void ft_putnbr(int nb) {
  if (nb < 0) {
    ft_putchar('-');
    nb = -nb;
  }
  if (nb > 9) {
    ft_putnbr(nb / 10);
    ft_putnbr(nb % 10);
  } else
    ft_putchar(nb + '0');
}


x86 assembly (clang, -O0):
<ft_putnbr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <ft_putnbr+0x27>
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    117a <ft_putnbr+0x5a>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <ft_putnbr@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1040 <ft_putnbr@plt>
jmp    1185 <ft_putnbr+0x65>
mov    -0x4(%rbp),%edi
add    $0x30,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbr>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebp
mov    $0xcccccccd,%r14d
test   %ebp,%ebp
jns    113c <ft_putnbr+0x1c>
mov    $0x2d,%edi
call   1030 <ft_putchar@plt>
neg    %ebp
cmp    $0xa,%ebp
jb     115f <ft_putnbr+0x3f>
mov    %ebp,%ebx
imul   %r14,%rbx
shr    $0x23,%rbx
mov    %ebx,%edi
call   1040 <ft_putnbr@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%eax
sub    %eax,%ebp
test   %ebp,%ebp
jns    113c <ft_putnbr+0x1c>
jmp    1130 <ft_putnbr+0x10>
add    $0x30,%ebp
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putnbr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @ft_putchar(i32 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 9
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 10
%15 = load i32, i32* %2
%16 = srem i32 %15, 10
br label %21
17: ; preds = %9
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 48
%20 = call i32 @ft_putchar(i32 %19)
br label %21
21: ; preds = %17, %12
ret void
}

LLVM IR (-O2):
define void @ft_putnbr(i32 %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i32 [ %0, %1 ], [ %13, %11 ]
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @ft_putchar(i32 45)
%7 = sub nsw i32 0, %3
br label %8
8: ; preds = %5, %2
%9 = phi i32 [ %7, %5 ], [ %3, %2 ]
%10 = icmp ugt i32 %9, 9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = udiv i32 %9, 10
tail call void @ft_putnbr(i32 %12)
%13 = urem i32 %9, 10
br label %2
14: ; preds = %8
%15 = add nuw nsw i32 %9, 48
%16 = tail call i32 @ft_putchar(i32 %15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sigsegv_handler(int signum __attribute__((unused))) {
  printf("Got SIGSEGV\n");
  printf("Test PASSED\n");
  exit(0);
}


x86 assembly (clang, -O0):
<sigsegv_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [13 x i8] c"Got SIGSEGV\0A\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define void @sigsegv_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [12 x i8] c"Got SIGSEGV\00"
@str.2 = [12 x i8] c"Test PASSED\00"
define void @sigsegv_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ gln_styled_char(int /*<<< orphan*/, char);
void gln_normal_char(char c) { gln_styled_char((0), c); }


x86 assembly (clang, -O0):
<gln_normal_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
movsbl -0x1(%rbp),%esi
call   1030 <gln_styled_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gln_normal_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @gln_styled_char(i32 0, i8 signext %3)
ret void
}

LLVM IR (-O2):
define void @gln_normal_char(i8 signext %0) {
%2 = tail call i32 @gln_styled_char(i32 0, i8 signext %0)
ret void
}
char *fgaj_cyan(int c) { return c ? "[0;36m" : ""; }


x86 assembly (clang, -O0):
<fgaj_cyan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef6(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgaj_cyan>:
test   %edi,%edi
lea    0xefe(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[0;36m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fgaj_cyan(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[0;36m\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @fgaj_cyan(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ srand(long long);
void srand48(long long seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<srand48>:
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @srand48(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @srand(i64 %3)
ret void
}

LLVM IR (-O2):
define void @srand48(i64 %0) {
%2 = tail call i32 @srand(i64 %0)
ret void
}
void nfs_fscache_unregister(void) {}


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

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

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

LLVM IR (-O2):
define void @nfs_fscache_unregister() {
ret void
}
/* Variables and functions */
int PROT_READ;
int PROT_WRITE;
int flags_prot_readwrite(void) { return (PROT_READ | PROT_WRITE); }


x86 assembly (clang, -O0):
<flags_prot_readwrite>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eed(%rip),%rax
mov    (%rax),%eax
mov    0x2ec4(%rip),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flags_prot_readwrite>:
mov    0x2ef1(%rip),%rcx
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
ret

LLVM IR (-O0):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define i32 @flags_prot_readwrite() {
%1 = load i32, i32* @PROT_READ
%2 = load i32, i32* @PROT_WRITE
%3 = or i32 %1, %2
ret i32 %3
}

LLVM IR (-O2):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
define i32 @flags_prot_readwrite() {
%1 = load i32, i32* @PROT_READ
%2 = load i32, i32* @PROT_WRITE
%3 = or i32 %2, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gmx_sas(int, char **);
int main(int argc, char *argv[]) {
  gmx_sas(argc, argv);
  return 0;
}


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

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

LLVM IR (-O0):
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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @gmx_sas(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_sas(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void fistp_m64(unsigned long long *m64) {
  put8(0xDF);
  put8(0x3D);
  put32((unsigned int)(m64));
}


x86 assembly (clang, -O0):
<fistp_m64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xdf,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fistp_m64>:
push   %rbx
mov    %rdi,%rbx
mov    $0xdf,%edi
call   1030 <put8@plt>
mov    $0x3d,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @fistp_m64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i32 @put8(i32 223)
%4 = call i32 @put8(i32 61)
%5 = load i64*, i64** %2
%6 = ptrtoint i64* %5 to i32
%7 = call i32 @put32(i32 %6)
ret void
}

LLVM IR (-O2):
define void @fistp_m64(i64* %0) {
%2 = tail call i32 @put8(i32 223)
%3 = tail call i32 @put8(i32 61)
%4 = ptrtoint i64* %0 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @put32(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *hoic_get_param(int, int, char *);
int /*<<< orphan*/ printf(char *, char *);
int hdoip_cli_get(int fd, int fdr, char **argv, int argc) {
  char *s = hoic_get_param(fd, fdr, argv[0]);
  printf("return: \"%s\"\n", s);
  free(s);
  return 0;
}


x86 assembly (clang, -O0):
<hdoip_cli_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
call   1050 <hoic_get_param@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdoip_cli_get>:
push   %rbx
mov    (%rdx),%rdx
call   1050 <hoic_get_param@plt>
mov    %rax,%rbx
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"return: \22%s\22\0A\00"
define i32 @hdoip_cli_get(i32 %0, i32 %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i8* @hoic_get_param(i32 %10, i32 %11, i8* %14)
store i8* %15, i8** %9
%16 = load i8*, i8** %9
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %9
%19 = call i32 @free(i8* %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"return: \22%s\22\0A\00"
define i32 @hdoip_cli_get(i32 %0, i32 %1, i8** nocapture %2, i32 %3) {
%5 = load i8*, i8** %2
%6 = tail call i8* @hoic_get_param(i32 %0, i32 %1, i8* %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @free(i8* %6)
ret i32 0
}
/* Variables and functions */
double __ocml_fma_rtn_f64(double, double, double);
double __fma_ru(double x, double y, double z) {
  return __ocml_fma_rtn_f64(x, y, z);
}


x86 assembly (clang, -O0):
<__fma_ru>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <__ocml_fma_rtn_f64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fma_ru>:
jmp    1030 <__ocml_fma_rtn_f64@plt>

LLVM IR (-O0):
define double @__fma_ru(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = load double, double* %6
%10 = call double @__ocml_fma_rtn_f64(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @__fma_ru(double %0, double %1, double %2) {
%4 = tail call double @__ocml_fma_rtn_f64(double %0, double %1, double %2)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ putenv(char const *);
void xine_private_unsetenv(const char *name) { putenv(name); }


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

x86 assembly (clang, -O2):
<xine_private_unsetenv>:
jmp    1030 <putenv@plt>

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

LLVM IR (-O2):
define void @xine_private_unsetenv(i8* %0) {
%2 = tail call i32 @putenv(i8* %0)
ret void
}
void got_tok_objNoRem(const char *yytext) {
  FUNC_STATFN_PRN(__PRETTY_FUNCTION__, " (%s)", yytext);
}


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

x86 assembly (clang, -O2):
<got_tok_objNoRem>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xf03(%rip),%rsi
xor    %eax,%eax
jmp    1030 <FUNC_STATFN_PRN@plt>

LLVM IR (-O0):
@__PRETTY_FUNCTION__.got_tok_objNoRem = [36 x i8] c"void got_tok_objNoRem(const char *)\00"
@.str = [6 x i8] c" (%s)\00"
define void @got_tok_objNoRem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @FUNC_STATFN_PRN to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__PRETTY_FUNCTION__.got_tok_objNoRem, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@__PRETTY_FUNCTION__.got_tok_objNoRem = [36 x i8] c"void got_tok_objNoRem(const char *)\00"
@.str = [6 x i8] c" (%s)\00"
define void @got_tok_objNoRem(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @FUNC_STATFN_PRN to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__PRETTY_FUNCTION__.got_tok_objNoRem, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
unsigned int O_NONBLOCK;
unsigned int fcntl(int, int /*<<< orphan*/, unsigned int);
void set_nonblocking(int fd) {
  unsigned v;
  v = fcntl(fd, F_GETFL, 0);
  fcntl(fd, F_SETFL, v | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblocking>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb5(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 @fcntl(i32 %4, i32 %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* @F_SETFL
%9 = load i32, i32* %3
%10 = load i32, i32* @O_NONBLOCK
%11 = or i32 %9, %10
%12 = call i32 @fcntl(i32 %7, i32 %8, i32 %11)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %3
%7 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %6)
ret void
}
void gtk_image_new_from_animation() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_new_from_animation() {
ret void
}
void update_idle_rq_clock_pelt(struct rq *rq) {}


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

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

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

LLVM IR (-O2):
%struct.rq = type opaque
define void @update_idle_rq_clock_pelt(%struct.rq* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  struct date {
    int month;
    int day;
    int year;
  };
  struct date today, *datePtr;
  datePtr = &today;
  datePtr->month = 3;
  datePtr->day = 30;
  datePtr->year = 2016;
  printf("Today's date is %i/%i/%.2i.\n", datePtr->month, datePtr->day,
         datePtr->year % 100);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1e,0x4(%rax)
mov    -0x18(%rbp),%rax
movl   $0x7e0,0x8(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x1c(%rbp),%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
mov    $0x1e,%edx
mov    $0x10,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.date = type { i32, i32, i32 }
@.str = [29 x i8] c"Today's date is %i/%i/%.2i.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.date
%3 = alloca %struct.date*
store i32 0, i32* %1
store %struct.date* %2, %struct.date** %3
%4 = load %struct.date*, %struct.date** %3
%5 = getelementptr inbounds %struct.date, %struct.date* %4, i32 0, i32 0
store i32 3, i32* %5
%6 = load %struct.date*, %struct.date** %3
%7 = getelementptr inbounds %struct.date, %struct.date* %6, i32 0, i32 1
store i32 30, i32* %7
%8 = load %struct.date*, %struct.date** %3
%9 = getelementptr inbounds %struct.date, %struct.date* %8, i32 0, i32 2
store i32 2016, i32* %9
%10 = load %struct.date*, %struct.date** %3
%11 = getelementptr inbounds %struct.date, %struct.date* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = load %struct.date*, %struct.date** %3
%14 = getelementptr inbounds %struct.date, %struct.date* %13, i32 0, i32 1
%15 = load i32, i32* %14
%16 = load %struct.date*, %struct.date** %3
%17 = getelementptr inbounds %struct.date, %struct.date* %16, i32 0, i32 2
%18 = load i32, i32* %17
%19 = srem i32 %18, 100
%20 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %15, i32 %19)
ret i32 0
}

LLVM IR (-O2):
%struct.date = type { i32, i32, i32 }
@.str = [29 x i8] c"Today's date is %i/%i/%.2i.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 3, i32 30, i32 16)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ initialiseEpoch();
int setup();
int wiringPiSetup() {
  initialiseEpoch();
  return setup();
}


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

x86 assembly (clang, -O2):
<wiringPiSetup>:
push   %rax
xor    %eax,%eax
call   1030 <initialiseEpoch@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <setup@plt>

LLVM IR (-O0):
define i32 @wiringPiSetup() {
%1 = call i32 (...) @initialiseEpoch()
%2 = call i32 (...) @setup()
ret i32 %2
}

LLVM IR (-O2):
define i32 @wiringPiSetup() {
%1 = tail call i32 (...) @initialiseEpoch()
%2 = tail call i32 (...) @setup()
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ UINT32_C(int);
int /*<<< orphan*/ UINT64_C(int);
void fiat_p224_divstep_precomp(uint64_t out1[4]) {
  out1[0] = UINT64_C(0x7ffffffe800001);
  out1[1] = UINT64_C(0xff7fffff00800000);
  out1[2] = UINT32_C(0xffffff);
  out1[3] = UINT32_C(0xff800000);
}


x86 assembly (clang, -O0):
<fiat_p224_divstep_precomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xfe800001,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x800000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    $0xffffff,%edi
call   1040 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    $0xff800000,%edi
call   1040 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p224_divstep_precomp>:
push   %rbx
mov    %rdi,%rbx
mov    $0xfe800001,%edi
call   1030 <UINT64_C@plt>
mov    %eax,(%rbx)
mov    $0x800000,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x4(%rbx)
mov    $0xffffff,%edi
call   1040 <UINT32_C@plt>
mov    %eax,0x8(%rbx)
mov    $0xff800000,%edi
call   1040 <UINT32_C@plt>
mov    %eax,0xc(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fiat_p224_divstep_precomp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @UINT64_C(i32 -25165823)
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
store i32 %3, i32* %5
%6 = call i32 @UINT64_C(i32 8388608)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
store i32 %6, i32* %8
%9 = call i32 @UINT32_C(i32 16777215)
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 2
store i32 %9, i32* %11
%12 = call i32 @UINT32_C(i32 -8388608)
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 3
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @fiat_p224_divstep_precomp(i32* nocapture writeonly %0) {
%2 = tail call i32 @UINT64_C(i32 -25165823)
store i32 %2, i32* %0
%3 = tail call i32 @UINT64_C(i32 8388608)
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %3, i32* %4
%5 = tail call i32 @UINT32_C(i32 16777215)
%6 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %5, i32* %6
%7 = tail call i32 @UINT32_C(i32 -8388608)
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %7, i32* %8
ret void
}