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

/* Variables and functions */
int /*<<< orphan*/ mem_write(int, int /*<<< orphan*/);
void mem_write16(uint16_t address, uint16_t value) {
  mem_write(address, (uint8_t)(value & 0xFF));
  mem_write(address + 1, (uint8_t)(value >> 8));
}


x86 assembly (clang, -O0):
<mem_write16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0xff,%esi
call   1030 <mem_write@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
call   1030 <mem_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_write16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movzbl %bl,%esi
call   1030 <mem_write@plt>
add    $0x1,%ebp
sar    $0x8,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <mem_write@plt>

LLVM IR (-O0):
define void @mem_write16(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 = and i32 %6, 255
%8 = call i32 @mem_write(i32 %5, i32 %7)
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %4
%12 = ashr i32 %11, 8
%13 = call i32 @mem_write(i32 %10, i32 %12)
ret void
}

LLVM IR (-O2):
define void @mem_write16(i32 %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @mem_write(i32 %0, i32 %3)
%5 = add nsw i32 %0, 1
%6 = ashr i32 %1, 8
%7 = tail call i32 @mem_write(i32 %5, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main() {
  char buffer[64];
  printf("Your name: ");
  fgets(buffer, 64, stdin);
  printf("Hello, %s\n", buffer);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    $0x40,%esi
call   1040 <fgets@plt>
lea    -0x50(%rbp),%rsi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1040 <fgets@plt>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Your name: \00"
@stdin = global i32 0
@.str.1 = [11 x i8] c"Hello, %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 64, i32 %5)
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Your name: \00"
@stdin = global i32 0
@.str.1 = [11 x i8] c"Hello, %s\0A\00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 64, i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
void run_vid_rnn(int argc, char **argv) {}


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

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

LLVM IR (-O0):
define void @run_vid_rnn(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret void
}

LLVM IR (-O2):
define void @run_vid_rnn(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ save_rumoured_servers();
void kill_servers() { save_rumoured_servers(); }


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

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

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

LLVM IR (-O2):
define void @kill_servers() {
%1 = tail call i32 (...) @save_rumoured_servers()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_ONEREQ;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_ONEREQ_it;
OCSP_ONEREQ *OCSP_ONEREQ_new(void) {
  return (OCSP_ONEREQ *)ASN1_item_new(&OCSP_ONEREQ_it);
}


x86 assembly (clang, -O0):
<OCSP_ONEREQ_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OCSP_ONEREQ_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@OCSP_ONEREQ_it = global i32 0
define i32* @OCSP_ONEREQ_new() {
%1 = call i64 @ASN1_item_new(i32* @OCSP_ONEREQ_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@OCSP_ONEREQ_it = global i32 0
define i32* @OCSP_ONEREQ_new() {
%1 = tail call i64 @ASN1_item_new(i32* @OCSP_ONEREQ_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
void RSA_get_default_method(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_get_default_method() {
ret void
}
/* Variables and functions */
double floor(double);
double solve_quadratic(double, double, int);
int is_triangular(int t) {
  double n = solve_quadratic(0.5, 0.5, -t);
  return (n == floor(n));
}


x86 assembly (clang, -O0):
<is_triangular>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
sub    -0x4(%rbp),%edi
movsd  0xec8(%rip),%xmm1
movaps %xmm1,%xmm0
call   1030 <solve_quadratic@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_triangular>:
push   %rax
neg    %edi
movsd  0xed5(%rip),%xmm0
movapd %xmm0,%xmm1
call   1030 <solve_quadratic@plt>
movsd  %xmm0,(%rsp)
call   1040 <floor@plt>
cmpeqsd (%rsp),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_triangular(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 0, %4
%6 = call double @solve_quadratic(double 5.000000e-01, double 5.000000e-01, i32 %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = load double, double* %3
%9 = call double @llvm.floor.f64(double %8)
%10 = fcmp oeq double %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @is_triangular(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call double @solve_quadratic(double 5.000000e-01, double 5.000000e-01, i32 %2)
%4 = tail call double @llvm.floor.f64(double %3)
%5 = fcmp oeq double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t TimerADCEventGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000070))));
}


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

x86 assembly (clang, -O2):
<TimerADCEventGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x70(%rax),%rax
ret

LLVM IR (-O0):
define i64 @TimerADCEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 112
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @TimerADCEventGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 112
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Type definitions */
struct Node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ computeMaximalMean(struct Node *);
int /*<<< orphan*/ computeSolution(double *, struct Node *);
int /*<<< orphan*/ deleteTree(struct Node *);
int /*<<< orphan*/ initializeRootDepth1(struct Node **, double *, int);
void orderTreeDepth1(double *x, double *u, int n) {
  struct Node *root;
  initializeRootDepth1(&root, u, n);
  computeMaximalMean(root);
  computeSolution(x, root);
  deleteTree(root);
}


x86 assembly (clang, -O0):
<orderTreeDepth1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rdi
call   1040 <initializeRootDepth1@plt>
mov    -0x20(%rbp),%rdi
call   1050 <computeMaximalMean@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1060 <computeSolution@plt>
mov    -0x20(%rbp),%rdi
call   1030 <deleteTree@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orderTreeDepth1>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
call   1040 <initializeRootDepth1@plt>
mov    0x8(%rsp),%rdi
call   1050 <computeMaximalMean@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <computeSolution@plt>
mov    0x8(%rsp),%rdi
call   1030 <deleteTree@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
define void @orderTreeDepth1(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca %struct.Node*
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%8 = load double*, double** %5
%9 = load i32, i32* %6
%10 = call i32 @initializeRootDepth1(%struct.Node** %7, double* %8, i32 %9)
%11 = load %struct.Node*, %struct.Node** %7
%12 = call i32 @computeMaximalMean(%struct.Node* %11)
%13 = load double*, double** %4
%14 = load %struct.Node*, %struct.Node** %7
%15 = call i32 @computeSolution(double* %13, %struct.Node* %14)
%16 = load %struct.Node*, %struct.Node** %7
%17 = call i32 @deleteTree(%struct.Node* %16)
ret void
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @orderTreeDepth1(double* %0, double* %1, i32 %2) {
%4 = alloca %struct.Node*
%5 = bitcast %struct.Node** %4 to i8*
%6 = call i32 @initializeRootDepth1(%struct.Node** %4, double* %1, i32 %2)
%7 = load %struct.Node*, %struct.Node** %4
%8 = call i32 @computeMaximalMean(%struct.Node* %7)
%9 = load %struct.Node*, %struct.Node** %4
%10 = call i32 @computeSolution(double* %0, %struct.Node* %9)
%11 = load %struct.Node*, %struct.Node** %4
%12 = call i32 @deleteTree(%struct.Node* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AUDIO_SET_BYPASS_MODE;
int ioctl(int, int /*<<< orphan*/, int);
int dvbaudio_set_bypass(int fd, int bypass) {
  return ioctl(fd, AUDIO_SET_BYPASS_MODE, bypass);
}


x86 assembly (clang, -O0):
<dvbaudio_set_bypass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvbaudio_set_bypass>:
mov    %esi,%edx
mov    0x2ecf(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

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

LLVM IR (-O2):
@AUDIO_SET_BYPASS_MODE = global i32 0
define i32 @dvbaudio_set_bypass(i32 %0, i32 %1) {
%3 = load i32, i32* @AUDIO_SET_BYPASS_MODE
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
float beef_float(float x, float y) { return x * y; }


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

x86 assembly (clang, -O2):
<beef_float>:
mulss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @beef_float(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
void Msp430TimerCapComP__4__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__4__Compare__default__fired() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ s2_1();
int /*<<< orphan*/ s2_2();
int /*<<< orphan*/ s2_3();
int /*<<< orphan*/ s2_4();
int /*<<< orphan*/ s2_5();
void test_s2() {
  s2_1();
  s2_2();
  s2_3();
  s2_4();
  s2_5();
}


x86 assembly (clang, -O0):
<test_s2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <s2_1@plt>
mov    $0x0,%al
call   1040 <s2_2@plt>
mov    $0x0,%al
call   1070 <s2_3@plt>
mov    $0x0,%al
call   1030 <s2_4@plt>
mov    $0x0,%al
call   1060 <s2_5@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_s2>:
push   %rax
xor    %eax,%eax
call   1050 <s2_1@plt>
xor    %eax,%eax
call   1040 <s2_2@plt>
xor    %eax,%eax
call   1070 <s2_3@plt>
xor    %eax,%eax
call   1030 <s2_4@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <s2_5@plt>

LLVM IR (-O0):
define void @test_s2() {
%1 = call i32 (...) @s2_1()
%2 = call i32 (...) @s2_2()
%3 = call i32 (...) @s2_3()
%4 = call i32 (...) @s2_4()
%5 = call i32 (...) @s2_5()
ret void
}

LLVM IR (-O2):
define void @test_s2() {
%1 = tail call i32 (...) @s2_1()
%2 = tail call i32 (...) @s2_2()
%3 = tail call i32 (...) @s2_3()
%4 = tail call i32 (...) @s2_4()
%5 = tail call i32 (...) @s2_5()
ret void
}
/* Variables and functions */
int __syscall1(int, unsigned long);
int _syscall1(int nr, unsigned long a) { return __syscall1(nr, a); }


x86 assembly (clang, -O0):
<_syscall1>:
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 <__syscall1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall1>:
jmp    1030 <__syscall1@plt>

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

LLVM IR (-O2):
define i32 @_syscall1(i32 %0, i64 %1) {
%3 = tail call i32 @__syscall1(i32 %0, i64 %1)
ret i32 %3
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ sendto(int, void const *, size_t, int,
                          struct sockaddr const *, int /*<<< orphan*/);
ssize_t sendto_or_schedule(int sockfd, const void *buf, size_t len, int flags,
                           const struct sockaddr *dest_addr,
                           socklen_t addrlen) {
  return sendto(sockfd, buf, len, flags, dest_addr, addrlen);
}


x86 assembly (clang, -O0):
<sendto_or_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <sendto@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendto_or_schedule>:
jmp    1030 <sendto@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @sendto_or_schedule(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = load i32, i32* %12
%19 = call i32 @sendto(i32 %13, i8* %14, i64 %15, i32 %16, %struct.sockaddr* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @sendto_or_schedule(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32 %5) {
%7 = tail call i32 @sendto(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32 %5)
ret i32 %7
}
void strcat(d, s) char *d, *s;
{
  while (*d)
    d++;
  strcpy(d, s);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <strcat+0x2e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <strcat+0x10>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <strcat+0x10>
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @strcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = tail call i8* @strcpy(i8* %4, i8* dereferenceable(1) %1)
ret void
}
int test_imm_F9uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xF9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F9uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xf9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_F9uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 249
%7 = icmp ne i64 %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_F9uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1069446856704
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned int arc4random_uniform(unsigned int);
unsigned int get_random_value(unsigned int min, unsigned int max) {
  return arc4random_uniform(max - min) + min;
}


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

x86 assembly (clang, -O2):
<get_random_value>:
push   %rbx
mov    %edi,%ebx
sub    %edi,%esi
mov    %esi,%edi
call   1030 <arc4random_uniform@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_random_value(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 = load i32, i32* %3
%7 = sub i32 %5, %6
%8 = call i32 @arc4random_uniform(i32 %7)
%9 = load i32, i32* %3
%10 = add i32 %8, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_random_value(i32 %0, i32 %1) {
%3 = sub i32 %1, %0
%4 = tail call i32 @arc4random_uniform(i32 %3)
%5 = add i32 %4, %0
ret i32 %5
}
void event_microtone(int dir, int a, int b) {}


x86 assembly (clang, -O0):
<event_microtone>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @event_microtone(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
ret void
}

LLVM IR (-O2):
define void @event_microtone(i32 %0, i32 %1, i32 %2) {
ret void
}
long double longdouble_ignoring_signedint(long double x, signed int y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_signedint>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<longdouble_ignoring_signedint>:
fldt   0x8(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_signedint(x86_fp80 returned %0, i32 %1) {
ret x86_fp80 %0
}
void parse_aim_data(struct TCP_STREAM *stream, struct NetFrame *frame,
                    const unsigned char *px, unsigned length) {
  stream = (stream);
  frame = (frame);
  px = (px);
  length = (length);
}


x86 assembly (clang, -O0):
<parse_aim_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.TCP_STREAM = type opaque
%struct.NetFrame = type opaque
define void @parse_aim_data(%struct.TCP_STREAM* %0, %struct.NetFrame* %1, i8* %2, i32 %3) {
%5 = alloca %struct.TCP_STREAM*
%6 = alloca %struct.NetFrame*
%7 = alloca i8*
%8 = alloca i32
store %struct.TCP_STREAM* %0, %struct.TCP_STREAM** %5
store %struct.NetFrame* %1, %struct.NetFrame** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.TCP_STREAM*, %struct.TCP_STREAM** %5
store %struct.TCP_STREAM* %9, %struct.TCP_STREAM** %5
%10 = load %struct.NetFrame*, %struct.NetFrame** %6
store %struct.NetFrame* %10, %struct.NetFrame** %6
%11 = load i8*, i8** %7
store i8* %11, i8** %7
%12 = load i32, i32* %8
store i32 %12, i32* %8
ret void
}

LLVM IR (-O2):
%struct.TCP_STREAM = type opaque
%struct.NetFrame = type opaque
define void @parse_aim_data(%struct.TCP_STREAM* nocapture %0, %struct.NetFrame* nocapture %1, i8* nocapture %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int foo();
int main(void) {
  if (foo() != 95)
    abort();
  exit(0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
cmp    $0x5f,%eax
jne    1144 <main+0x14>
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 i32 (...) @foo()
%3 = icmp ne i32 %2, 95
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 i32 (...) @foo()
%2 = icmp eq i32 %1, 95
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
}
main(argc, argv) int argc;
char **argv;
{ return f(2, -1 - 1); }


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    $0x2,%edi
mov    $0xfffffffe,%esi
mov    $0x0,%al
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%edi
mov    $0xfffffffe,%esi
xor    %eax,%eax
jmp    1030 <f@plt>

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 = call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 2, i32 -2)
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 2, i32 -2)
ret i32 %3
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void exactsleep(double length) {
  struct timespec requested_time, remaining;
  requested_time.tv_sec = (int)length;
  requested_time.tv_nsec = (int)((length - (int)length) * 1e9);
  nanosleep(&requested_time, &remaining);
}


x86 assembly (clang, -O0):
<exactsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exactsleep>:
sub    $0x18,%rsp
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  0xed4(%rip),%xmm0
mov    %eax,0x8(%rsp)
cvttsd2si %xmm0,%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @exactsleep(double %0) {
%2 = alloca double
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i32
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = load double, double* %2
%9 = load double, double* %2
%10 = fptosi double %9 to i32
%11 = sitofp i32 %10 to double
%12 = fsub double %8, %11
%13 = fmul double %12, 1.000000e+09
%14 = fptosi double %13 to i32
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %14, i32* %15
%16 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @exactsleep(double %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = fptosi double %0 to i32
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %6, i32* %7
%8 = sitofp i32 %6 to double
%9 = fsub double %0, %8
%10 = fmul double %9, 1.000000e+09
%11 = fptosi double %10 to i32
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %11, i32* %12
%13 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret void
}
void dotVec3f(float *a, float *b, float *out) {
  *out = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}


x86 assembly (clang, -O0):
<dotVec3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotVec3f>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  0x4(%rsi),%xmm1
mulss  (%rsi),%xmm0
addss  %xmm1,%xmm0
movss  0x8(%rdi),%xmm1
mulss  0x8(%rsi),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rdx)
ret

LLVM IR (-O0):
define void @dotVec3f(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = load float*, float** %4
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 1
%18 = load float, float* %17
%19 = fmul float %15, %18
%20 = call float @llvm.fmuladd.f32(float %9, float %12, float %19)
%21 = load float*, float** %4
%22 = getelementptr inbounds float, float* %21, i64 2
%23 = load float, float* %22
%24 = load float*, float** %5
%25 = getelementptr inbounds float, float* %24, i64 2
%26 = load float, float* %25
%27 = call float @llvm.fmuladd.f32(float %23, float %26, float %20)
%28 = load float*, float** %6
store float %27, float* %28
ret void
}

LLVM IR (-O2):
define void @dotVec3f(float* nocapture %0, float* nocapture %1, float* nocapture writeonly %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fmul float %7, %9
%11 = tail call float @llvm.fmuladd.f32(float %4, float %5, float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
%13 = load float, float* %12
%14 = getelementptr inbounds float, float* %1, i64 2
%15 = load float, float* %14
%16 = tail call float @llvm.fmuladd.f32(float %13, float %15, float %11)
store float %16, float* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int nondet();
int main() {
  int b = nondet(), c;
  if (b != 0)
    b = 1;
  if (b == 0)
    c = 0;
  else
    c = 1;
  assert(b == c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114a <main+0x2a>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1160 <main+0x40>
movl   $0x0,-0xc(%rbp)
jmp    1167 <main+0x47>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet()
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
void OOC_SortC_open(void) {}


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

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

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

LLVM IR (-O2):
define void @OOC_SortC_open() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delChars(char *);
int main(void) {
  char s[] =
      "a jamon y queso, o pan y   manteca a cualquiera gustan. a s s ss s";
  delChars(s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x43,%edx
call   1030 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <delChars@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x732073,0x3f(%rsp)
mov    %rsp,%rdi
call   1030 <delChars@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.s = [67 x i8] c"a jamon y queso, o pan y manteca a cualquiera gustan. a s s ss s\00"
define i32 @main() {
%1 = alloca [67 x i8]
%2 = bitcast [67 x i8]* %1 to i8*
%3 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%4 = call i32 @delChars(i8* %3)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [67 x i8] c"a jamon y queso, o pan y manteca a cualquiera gustan. a s s ss s\00"
define i32 @main() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i32 @delChars(i8* %2)
ret i32 0
}
int cmp(const void *a, const void *b) { return 0; }


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

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

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int test10(int a, int b, int c, int d) {
  int x = a != b;
  int y = c == d;
  return x != y;
}


x86 assembly (clang, -O0):
<test10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test10>:
cmp    %esi,%edi
setne  %al
cmp    %ecx,%edx
sete   %cl
xor    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @test10(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ne i32 %0, %1
%6 = icmp eq i32 %2, %3
%7 = xor i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  short x1;
};
typedef TYPE_1__ XSegment;

/* Variables and functions */
void set_XSegment_x1(void *_p, short _v) { ((XSegment *)_p)->x1 = (short)_v; }


x86 assembly (clang, -O0):
<set_XSegment_x1>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSegment_x1>:
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XSegment_x1(i8* nocapture writeonly %0, i16 signext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
int string_ends_with(int /*<<< orphan*/, char *);
int frag(const struct dirent *x) {
  return string_ends_with(x->d_name, ".frag");
}


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

x86 assembly (clang, -O2):
<frag>:
mov    (%rdi),%edi
lea    0xee7(%rip),%rsi
jmp    1030 <string_ends_with@plt>

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [6 x i8] c".frag\00"
define i32 @frag(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i32 @string_ends_with(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [6 x i8] c".frag\00"
define i32 @frag(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i32 @string_ends_with(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ InitBitMasks();
int /*<<< orphan*/ InitEvalMasks();
int /*<<< orphan*/ InitFilesRanksBrd();
int /*<<< orphan*/ InitHashKeys();
int /*<<< orphan*/ InitMvvLva();
int /*<<< orphan*/ InitPolyBook();
int /*<<< orphan*/ InitSq120To64();
int /*<<< orphan*/ ProcessArgs(int, char **);
void AllInit(int argc, char **argv) {
  ProcessArgs(argc, argv);
  InitSq120To64();
  InitBitMasks();
  InitHashKeys();
  InitFilesRanksBrd();
  InitEvalMasks();
  InitMvvLva();
  InitPolyBook();
}


x86 assembly (clang, -O0):
<AllInit>:
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   1060 <ProcessArgs@plt>
mov    $0x0,%al
call   1090 <InitSq120To64@plt>
mov    $0x0,%al
call   1040 <InitBitMasks@plt>
mov    $0x0,%al
call   10a0 <InitHashKeys@plt>
mov    $0x0,%al
call   1030 <InitFilesRanksBrd@plt>
mov    $0x0,%al
call   1070 <InitEvalMasks@plt>
mov    $0x0,%al
call   1050 <InitMvvLva@plt>
mov    $0x0,%al
call   1080 <InitPolyBook@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AllInit>:
push   %rax
call   1060 <ProcessArgs@plt>
xor    %eax,%eax
call   1090 <InitSq120To64@plt>
xor    %eax,%eax
call   1040 <InitBitMasks@plt>
xor    %eax,%eax
call   10a0 <InitHashKeys@plt>
xor    %eax,%eax
call   1030 <InitFilesRanksBrd@plt>
xor    %eax,%eax
call   1070 <InitEvalMasks@plt>
xor    %eax,%eax
call   1050 <InitMvvLva@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <InitPolyBook@plt>

LLVM IR (-O0):
define void @AllInit(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 @ProcessArgs(i32 %5, i8** %6)
%8 = call i32 (...) @InitSq120To64()
%9 = call i32 (...) @InitBitMasks()
%10 = call i32 (...) @InitHashKeys()
%11 = call i32 (...) @InitFilesRanksBrd()
%12 = call i32 (...) @InitEvalMasks()
%13 = call i32 (...) @InitMvvLva()
%14 = call i32 (...) @InitPolyBook()
ret void
}

LLVM IR (-O2):
define void @AllInit(i32 %0, i8** %1) {
%3 = tail call i32 @ProcessArgs(i32 %0, i8** %1)
%4 = tail call i32 (...) @InitSq120To64()
%5 = tail call i32 (...) @InitBitMasks()
%6 = tail call i32 (...) @InitHashKeys()
%7 = tail call i32 (...) @InitFilesRanksBrd()
%8 = tail call i32 (...) @InitEvalMasks()
%9 = tail call i32 (...) @InitMvvLva()
%10 = tail call i32 (...) @InitPolyBook()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_anl_Rn(char *str, unsigned char n) {
  sprintf(str, "ANL   A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<sprint_anl_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_anl_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"ANL A, R%X \00"
define void @sprint_anl_Rn(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"ANL A, R%X \00"
define void @sprint_anl_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void double_println(double val) { printf("%lf\n", val); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define void @double_println(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
int test() {
  int offset, len;
  register char *mid;
  register char *midend;
  register char *bigend;
  long unsigned int curlen;
  if (offset + len > curlen) {
    while (midend > mid)
      *--bigend = *--midend;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cltq
cmp    -0x30(%rbp),%rax
jbe    1157 <test+0x57>
jmp    111b <test+0x1b>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1152 <test+0x52>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
mov    -0x1(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,-0x1(%rax)
jmp    111b <test+0x1b>
jmp    1157 <test+0x57>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test() {
ret i32 undef
}
int osal_free_msg(int type, void *addr) { return -1; }


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

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

LLVM IR (-O0):
define i32 @osal_free_msg(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @osal_free_msg(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int ph_http_post_handle_packet(void *handler, const char *packet, size_t len) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ph_http_post_handle_packet(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("It's a CMake world\n"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"It's a CMake world\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"It's a CMake world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void ble_rsp_flash_ps_load(const struct ble_msg_flash_ps_load_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_flash_ps_load_rsp_t = type opaque
define void @ble_rsp_flash_ps_load(%struct.ble_msg_flash_ps_load_rsp_t* nocapture %0) {
ret void
}