xunge/DecIR huggingface dataset:
AR0A1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (p0[10000000]) = (*((short *)11111111)); }


x86 assembly (clang, -O0):
<AR0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%cx
mov    -0x18(%rbp),%rax
mov    %cx,0x1312d00(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0A1>:
movzwl 0xa98ac7,%eax
mov    %ax,0x1312d00(%r8)
01
ret

LLVM IR (-O0):
define i32 @AR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* inttoptr (i64 11111111 to i16*)
%17 = load i16*, i16** %12
%18 = getelementptr inbounds i16, i16* %17, i64 10000000
store i16 %16, i16* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @AR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture writeonly %4, i16* nocapture readnone %5) {
%7 = load i16, i16* inttoptr (i64 11111111 to i16*)
%8 = getelementptr inbounds i16, i16* %4, i64 10000000
store i16 %7, i16* %8
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
void EMACVLANTxConfigSet(uint32_t ui32Base, uint16_t ui16Tag,
                         uint32_t ui32Config) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000584))) =
      ui32Config | ((uint32_t)ui16Tag << 0);
}


x86 assembly (clang, -O0):
<EMACVLANTxConfigSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
shl    $0x0,%eax
or     %eax,%ecx
mov    -0x4(%rbp),%eax
add    $0x584,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EMACVLANTxConfigSet>:
or     %edx,%esi
movslq %edi,%rax
mov    %esi,0x584(%rax)
ret

LLVM IR (-O0):
define void @EMACVLANTxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i64, i64* %5
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 0
%11 = or i32 %7, %10
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1412
%14 = sext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
store volatile i32 %11, i32* %15
ret void
}

LLVM IR (-O2):
define void @EMACVLANTxConfigSet(i32 %0, i64 %1, i32 %2) {
%4 = trunc i64 %1 to i32
%5 = or i32 %4, %2
%6 = add nsw i32 %0, 1412
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store volatile i32 %5, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float, int);
int /*<<< orphan*/ scanf(char *, int *, float *);
int main() {
  int a;
  float b;
  float sum = a + b;
  scanf("%d %f", &a, &b);
  printf("%d + %.2f = %.2f\n", a, b, a + b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
addss  -0xc(%rbp),%xmm1
cvttss2si %xmm1,%edx
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
cvtsi2ss %esi,%xmm1
movss  (%rsp),%xmm0
addss  %xmm0,%xmm1
cvttss2si %xmm1,%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %f\00"
@.str.1 = [18 x i8] c"%d + %.2f = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%6 = load i32, i32* %1
%7 = load float, float* %2
%8 = sitofp i32 %6 to float
%9 = fadd float %7, %8
%10 = fptosi float %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6, float %7, i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void bmbeep() { putchar(7); }


x86 assembly (clang, -O0):
<bmbeep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmbeep>:
mov    $0x7,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @bmbeep() {
%1 = call i32 @putchar(i32 7)
ret void
}

LLVM IR (-O2):
define void @bmbeep() {
%1 = tail call i32 @putchar(i32 7)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ window;
};
typedef TYPE_1__ XUnmapEvent;

/* Variables and functions */
unsigned long get_XUnmapEvent_window(void *_p) {
  return (unsigned long)((XUnmapEvent *)_p)->window;
}


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

x86 assembly (clang, -O2):
<get_XUnmapEvent_window>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XUnmapEvent_window(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void exitGracefully() {
  printf("Thanks for using P2PFrame!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitGracefully>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [28 x i8] c"Thanks for using P2PFrame!\0A\00"
define void @exitGracefully() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"Thanks for using P2PFrame!\00"
define void @exitGracefully() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef size_t uint16_t;

/* Variables and functions */
uint16_t match_length(const uint16_t *p1, const uint16_t *p2,
                      uint16_t max_len) {
  uint16_t len = 0;
  while (len < max_len && p1[len] == p2[len])
    len++;
  return len;
}


x86 assembly (clang, -O0):
<match_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x21(%rbp)
jae    1149 <match_length+0x49>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,8),%rax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1159 <match_length+0x59>
jmp    116a <match_length+0x6a>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <match_length+0x18>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_length>:
xor    %eax,%eax
test   %rdx,%rdx
je     1126 <match_length+0x26>
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rax,8),%rcx
cmp    (%rsi,%rax,8),%rcx
jne    1126 <match_length+0x26>
add    $0x1,%rax
cmp    %rax,%rdx
jne    1110 <match_length+0x10>
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @match_length(i64* %0, i64* %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %4
store i64* %1, i64** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %24, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i64*, i64** %4
%14 = load i64, i64* %7
%15 = getelementptr inbounds i64, i64* %13, i64 %14
%16 = load i64, i64* %15
%17 = load i64*, i64** %5
%18 = load i64, i64* %7
%19 = getelementptr inbounds i64, i64* %17, i64 %18
%20 = load i64, i64* %19
%21 = icmp eq i64 %16, %20
br label %22
22: ; preds = %12, %8
%23 = phi i1 [ false, %8 ], [ %21, %12 ]
br i1 %23, label %24, label %27
24: ; preds = %22
%25 = load i64, i64* %7
%26 = add i64 %25, 1
store i64 %26, i64* %7
br label %8
27: ; preds = %22
%28 = load i64, i64* %7
ret i64 %28
}

LLVM IR (-O2):
define i64 @match_length(i64* nocapture %0, i64* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %12
%6 = phi i64 [ %13, %12 ], [ 0, %3 ]
%7 = getelementptr inbounds i64, i64* %0, i64 %6
%8 = load i64, i64* %7
%9 = getelementptr inbounds i64, i64* %1, i64 %6
%10 = load i64, i64* %9
%11 = icmp eq i64 %8, %10
br i1 %11, label %12, label %15
12: ; preds = %5
%13 = add nuw i64 %6, 1
%14 = icmp eq i64 %13, %2
br i1 %14, label %15, label %5
15: ; preds = %5, %12, %3
%16 = phi i64 [ 0, %3 ], [ %2, %12 ], [ %6, %5 ]
ret i64 %16
}
unsigned short readw(const volatile void *addr) {
  return *(volatile unsigned short *)addr;
}


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

x86 assembly (clang, -O2):
<readw>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @readw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i16*
%5 = load volatile i16, i16* %4
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @readw(i8* %0) {
%2 = bitcast i8* %0 to i16*
%3 = load volatile i16, i16* %2
ret i16 %3
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int eq(const char *s1, const char *s2) { return (strcmp(s1, s2) == 0); }


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @eq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() { printf("usage: evkey -s|-u|-d -t timeout eventdevice\n"); }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"usage: evkey -s|-u|-d -t timeout eventdevice\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"usage: evkey -s|-u|-d -t timeout eventdevice\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void statusFailed(const char *string) {
  printf("[\033[31mfail\033[0m] %s\n", string);
}


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

x86 assembly (clang, -O2):
<statusFailed>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"[\1B[31mfail\1B[0m] %s\0A\00"
define void @statusFailed(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"[\1B[31mfail\1B[0m] %s\0A\00"
define void @statusFailed(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void signals_ignore_tstp(void) {}


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

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

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

LLVM IR (-O2):
define void @signals_ignore_tstp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void version() { puts("getopt, version 1.0"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"getopt, version 1.0\00"
define void @version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"getopt, version 1.0\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct work_queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct work_queue *);
void work_queue_free(struct work_queue *queue) { free(queue); }


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

x86 assembly (clang, -O2):
<work_queue_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.work_queue = type { i32 }
define void @work_queue_free(%struct.work_queue* %0) {
%2 = alloca %struct.work_queue*
store %struct.work_queue* %0, %struct.work_queue** %2
%3 = load %struct.work_queue*, %struct.work_queue** %2
%4 = call i32 @free(%struct.work_queue* %3)
ret void
}

LLVM IR (-O2):
%struct.work_queue = type { i32 }
define void @work_queue_free(%struct.work_queue* nocapture %0) {
%2 = tail call i32 @free(%struct.work_queue* %0)
ret void
}
double fun_double(void) { return 2.5; }


x86 assembly (clang, -O0):
<fun_double>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_double>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @fun_double() {
ret double 2.500000e+00
}

LLVM IR (-O2):
define double @fun_double() {
ret double 2.500000e+00
}
void dl_G_SETZIMG() {}


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

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

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

LLVM IR (-O2):
define void @dl_G_SETZIMG() {
ret void
}
void RTNetIPv4PseudoChecksum(void) {}


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

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

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

LLVM IR (-O2):
define void @RTNetIPv4PseudoChecksum() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
int isstrspace(const char *s) {
  for (; *s != '\0'; s++) {
    if (isspace((unsigned char)*s) == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<isstrspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <isstrspace+0x54>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
jne    114e <isstrspace+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    116b <isstrspace+0x5b>
jmp    1153 <isstrspace+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <isstrspace+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isstrspace>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114c <isstrspace+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     114a <isstrspace+0x3a>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <isstrspace+0x20>
jmp    114c <isstrspace+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isstrspace(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i64 @isspace(i8 zeroext %8)
%11 = icmp eq i64 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
unsigned int csum_fold(unsigned long sum) {
  unsigned int result;
  result = sum + ((sum >> 16) & 0x0000FFFF) + ((sum << 16) & 0xFFFF0000);
  return (~result) >> 16;
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
and    $0xffff,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x10,%rcx
movabs $0xffff0000,%rdx
and    %rdx,%rcx
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
mov    %edi,%eax
shl    $0x10,%eax
add    %edi,%eax
mov    %edi,%ecx
shr    $0x10,%ecx
add    %ecx,%eax
not    %eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @csum_fold(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 16
%7 = and i64 %6, 65535
%8 = add i64 %4, %7
%9 = load i64, i64* %2
%10 = shl i64 %9, 16
%11 = and i64 %10, 4294901760
%12 = add i64 %8, %11
%13 = trunc i64 %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = xor i32 %14, -1
%16 = lshr i32 %15, 16
ret i32 %16
}

LLVM IR (-O2):
define i32 @csum_fold(i64 %0) {
%2 = lshr i64 %0, 16
%3 = and i64 %2, 65535
%4 = mul i64 %0, 65537
%5 = add i64 %4, %3
%6 = trunc i64 %5 to i32
%7 = xor i32 %6, -1
%8 = lshr i32 %7, 16
ret i32 %8
}
int stack_array_full(struct Stack *s) {}


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

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

LLVM IR (-O0):
%struct.Stack = type opaque
define i32 @stack_array_full(%struct.Stack* %0) {
%2 = alloca i32
%3 = alloca %struct.Stack*
store %struct.Stack* %0, %struct.Stack** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.Stack = type opaque
define i32 @stack_array_full(%struct.Stack* nocapture readnone %0) {
ret i32 undef
}
void clean_array(int array[]) {
  short int i = 0;
  short int len = 0;
  len = sizeof array;
  for (i = 0; i < len; ++i) {
    array[i] = 0;
  };
}


x86 assembly (clang, -O0):
<clean_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movw   $0x0,-0xc(%rbp)
movw   $0x8,-0xc(%rbp)
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
movswl -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1151 <clean_array+0x51>
mov    -0x8(%rbp),%rax
movswq -0xa(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    1120 <clean_array+0x20>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_array>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @clean_array(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ keyboard(unsigned char, int /*<<< orphan*/,
                            int /*<<< orphan*/);
void menu(int item) { keyboard((unsigned char)item, 0, 0); }


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
movzbl %al,%edi
mov    %edx,%esi
call   1030 <keyboard@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
movzbl %dil,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <keyboard@plt>

LLVM IR (-O0):
define void @menu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @keyboard(i8 zeroext %4, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @menu(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @keyboard(i8 zeroext %2, i32 0, i32 0)
ret void
}
int mvpmod_start_audit(unsigned long interval_ms) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mvpmod_start_audit(i64 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENC3_DriverIRQHandler();
__attribute__((weak)) void ENC3_IRQHandler(void) { ENC3_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @ENC3_IRQHandler() {
%1 = call i32 (...) @ENC3_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ENC3_IRQHandler() {
%1 = tail call i32 (...) @ENC3_DriverIRQHandler()
ret void
}
int security_task_setnice(struct task_struct *p, int nice) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define i32 @security_task_setnice(%struct.task_struct* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_break();
void k_send_break() { send_break(); }


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

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

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

LLVM IR (-O2):
define void @k_send_break() {
%1 = tail call i32 (...) @send_break()
ret void
}
void swap_ptr(void *x, void *y) {
  void *tmpx = x;
  x = y;
  y = tmpx;
}


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

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

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

LLVM IR (-O2):
define void @swap_ptr(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void test_RETURN() {}


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

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

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

LLVM IR (-O2):
define void @test_RETURN() {
ret void
}
/* Variables and functions */
scalar_t__ nrfx_usbd_errata_type_52840();
int /*<<< orphan*/ nrfx_usbd_errata_type_52840_eng_b_or_later();
bool nrfx_usbd_errata_154(void) {
  return (1 && (nrfx_usbd_errata_type_52840() &&
                !nrfx_usbd_errata_type_52840_eng_b_or_later()));
}


x86 assembly (clang, -O0):
<nrfx_usbd_errata_154>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <nrfx_usbd_errata_type_52840@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1153 <nrfx_usbd_errata_154+0x33>
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_b_or_later@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrfx_usbd_errata_154>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <nrfx_usbd_errata_type_52840@plt>
test   %rax,%rax
je     113d <nrfx_usbd_errata_154+0x1d>
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_b_or_later@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_154() {
%1 = call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = call i32 (...) @nrfx_usbd_errata_type_52840_eng_b_or_later()
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br label %7
7: ; preds = %3, %0
%8 = phi i1 [ false, %0 ], [ %6, %3 ]
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_154() {
%1 = tail call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @nrfx_usbd_errata_type_52840_eng_b_or_later()
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_WaitKey(void) { WriteInstruction("call prskey"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"call prskey\00"
define void @CR_WaitKey() {
%1 = call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"call prskey\00"
define void @CR_WaitKey() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ ssdp_notify();
void *ssdp_thread_notify(void *arg) {
  int period = 90;
  if (arg) {
    period = *((int *)arg);
  }
  while (1) {
    ssdp_notify();
    sleep(period);
  }
}


x86 assembly (clang, -O0):
<ssdp_thread_notify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x5a,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <ssdp_thread_notify+0x27>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    114c <ssdp_thread_notify+0x2c>
mov    $0x0,%al
call   1030 <ssdp_notify@plt>
mov    -0xc(%rbp),%edi
call   1040 <sleep@plt>
jmp    114c <ssdp_thread_notify+0x2c>

x86 assembly (clang, -O2):
<ssdp_thread_notify>:
push   %rbx
test   %rdi,%rdi
je     112a <ssdp_thread_notify+0xa>
mov    (%rdi),%ebx
jmp    1130 <ssdp_thread_notify+0x10>
mov    $0x5a,%ebx
nop
xor    %eax,%eax
call   1030 <ssdp_notify@plt>
mov    %ebx,%edi
call   1040 <sleep@plt>
jmp    1130 <ssdp_thread_notify+0x10>

LLVM IR (-O0):
define i8* @ssdp_thread_notify(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 90, i32* %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
store i32 %9, i32* %3
br label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %10, %11
%12 = call i32 (...) @ssdp_notify()
%13 = load i32, i32* %3
%14 = call i32 @sleep(i32 %13)
br label %11
}

LLVM IR (-O2):
define noalias i8* @ssdp_thread_notify(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ 90, %1 ]
br label %8
8: ; preds = %8, %6
%9 = tail call i32 (...) @ssdp_notify()
%10 = tail call i32 @sleep(i32 %7)
br label %8
}
/* Variables and functions */
int /*<<< orphan*/ check_vect();
int /*<<< orphan*/ main1();
int main(void) {
  check_vect();
  main1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_vect()
%2 = tail call i32 (...) @main1()
ret i32 0
}
int test_imm_D2int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xD2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_D2int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 210
%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_D2int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 901943132160
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void uart3_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @uart3_iomux_config() {
ret void
}
void gtk_path_priority_type_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_path_priority_type_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void dc_dmp(char *bf, int sz) {
  if (0) {
    int i, j;
    printf("\n");
    if (sz > 32)
      sz = 32;
    for (i = 0; i < sz;) {
      for (j = 0; j < 16 && i < sz; j++, i++) {
        printf("%02X ", (char)bf[i], (char)bf[i]);
      }
      printf(" : ");
      for (; j > 0; j--) {
        char c = (char)bf[i - j];
        if (c > 30)
          printf("%c", c);
        else
          printf(" ");
      }
      printf("\n");
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @dc_dmp(i8* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void rtcp_xr_dlrr_get_ssrc_receiver(const uint8_t *p_rtcp_xr_dlrr,
                                    uint8_t pi_ssrc[4]) {
  pi_ssrc[0] = p_rtcp_xr_dlrr[4];
  pi_ssrc[1] = p_rtcp_xr_dlrr[5];
  pi_ssrc[2] = p_rtcp_xr_dlrr[6];
  pi_ssrc[3] = p_rtcp_xr_dlrr[7];
}


x86 assembly (clang, -O0):
<rtcp_xr_dlrr_get_ssrc_receiver>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtcp_xr_dlrr_get_ssrc_receiver>:
mov    0x10(%rdi),%eax
mov    %eax,(%rsi)
mov    0x14(%rdi),%eax
mov    %eax,0x4(%rsi)
mov    0x18(%rdi),%eax
mov    %eax,0x8(%rsi)
mov    0x1c(%rdi),%eax
mov    %eax,0xc(%rsi)
ret

LLVM IR (-O0):
define void @rtcp_xr_dlrr_get_ssrc_receiver(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 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 5
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 6
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 7
%22 = load i32, i32* %21
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 3
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @rtcp_xr_dlrr_get_ssrc_receiver(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
store i32 %4, i32* %1
%5 = getelementptr inbounds i32, i32* %0, i64 5
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %6, i32* %7
%8 = getelementptr inbounds i32, i32* %0, i64 6
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %9, i32* %10
%11 = getelementptr inbounds i32, i32* %0, i64 7
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %12, i32* %13
ret void
}
/* Variables and functions */
int interact_with_port(char *, char, int /*<<< orphan*/);
int get_balance(char *balance_port_id) {
  return interact_with_port(balance_port_id, 'B', 0);
}


x86 assembly (clang, -O0):
<get_balance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x42,%esi
xor    %edx,%edx
call   1030 <interact_with_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_balance>:
mov    $0x42,%esi
xor    %edx,%edx
jmp    1030 <interact_with_port@plt>

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

LLVM IR (-O2):
define i32 @get_balance(i8* %0) {
%2 = tail call i32 @interact_with_port(i8* %0, i8 signext 66, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int pthread_attr_init(int /*<<< orphan*/ *);
int my_pthread_attr_init(pthread_attr_t *__attr) {
  pthread_attr_t *realattr;
  realattr = malloc(sizeof(pthread_attr_t));
  *((unsigned int *)__attr) = (unsigned int)realattr;
  return pthread_attr_init(realattr);
}


x86 assembly (clang, -O0):
<my_pthread_attr_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_attr_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pthread_attr_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %eax,(%rbx)
mov    %rax,%rdi
pop    %rbx
jmp    1030 <pthread_attr_init@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_init(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = call i32* @malloc(i32 4)
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i32
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %3
%9 = call i32 @pthread_attr_init(i32* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @my_pthread_attr_init(i32* nocapture writeonly %0) {
%2 = tail call i32* @malloc(i32 4)
%3 = ptrtoint i32* %2 to i64
%4 = trunc i64 %3 to i32
store i32 %4, i32* %0
%5 = tail call i32 @pthread_attr_init(i32* %2)
ret i32 %5
}
void endgrent(void) {}


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

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

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

LLVM IR (-O2):
define void @endgrent() {
ret void
}
void Write16(unsigned char *pByte, unsigned short value) {
  pByte[0] = (unsigned char)value;
  pByte[1] = (unsigned char)(value >> 8);
}


x86 assembly (clang, -O0):
<Write16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @Write16(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
store i8 %3, i8* %0
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
void Exit() {
  volatile unsigned int *exit = 0;
  *exit = 1;
}


x86 assembly (clang, -O0):
<Exit>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Exit>:
movl   $0x1,0x0
ret

LLVM IR (-O0):
define void @Exit() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
store volatile i32 1, i32* %2
ret void
}

LLVM IR (-O2):
define void @Exit() {
store volatile i32 1, i32* null
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cPrintf(char *);
void help04(void) {
  cPrintf("  b                 reset break\n");
  cPrintf("  b  <addr>         set break at <addr>\n");
}


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

x86 assembly (clang, -O2):
<help04>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <cPrintf@plt>
lea    0xefd(%rip),%rdi
pop    %rax
jmp    1030 <cPrintf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c" b reset break\0A\00"
@.str.1 = [41 x i8] c" b <addr> set break at <addr>\0A\00"
define void @help04() {
%1 = call i32 @cPrintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @cPrintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c" b reset break\0A\00"
@.str.1 = [41 x i8] c" b <addr> set break at <addr>\0A\00"
define void @help04() {
%1 = tail call i32 @cPrintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @cPrintf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double fabs(double);
double errA(double val1, double val2) {
  double absoluto;
  absoluto = fabs(val1 - val2);
  return absoluto;
}


x86 assembly (clang, -O0):
<errA>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xee1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<errA>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @errA(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fsub double %6, %7
%9 = call double @llvm.fabs.f64(double %8)
store double %9, double* %5
%10 = load double, double* %5
ret double %10
}

LLVM IR (-O2):
define double @errA(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
ret double %4
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
double C(int32_t xi) {
  if (xi == 0) {
    return 0.70710678118;
  } else {
    return 1.;
  }
}


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1125 <C+0x25>
movsd  0xeed(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1132 <C+0x32>
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<C>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
lea    0xef1(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @C(i64 %0) {
%2 = alloca double
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0x3FE6A09E667E556E, double* %2
br label %8
7: ; preds = %1
store double 1.000000e+00, double* %2
br label %8
8: ; preds = %7, %6
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @C(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, double 0x3FE6A09E667E556E, double 1.000000e+00
ret double %3
}
int Xokay(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Xokay() {
ret i32 0
}
int ncmp_cbyc(unsigned char dst[], unsigned char src[], int size) {
  int i, flag = 0;
  for (i = 0; i < size; i++) {
    if (dst[i] != src[i]) {
      flag = 1;
      break;
    }
  }
  return flag;
}


x86 assembly (clang, -O0):
<ncmp_cbyc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1168 <ncmp_cbyc+0x68>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1155 <ncmp_cbyc+0x55>
movl   $0x1,-0x1c(%rbp)
jmp    1168 <ncmp_cbyc+0x68>
jmp    115a <ncmp_cbyc+0x5a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111d <ncmp_cbyc+0x1d>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ncmp_cbyc>:
test   %edx,%edx
jle    1122 <ncmp_cbyc+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1125 <ncmp_cbyc+0x25>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <ncmp_cbyc+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ncmp_cbyc(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %7, %9, %3
%18 = phi i32 [ 0, %3 ], [ 1, %9 ], [ 0, %7 ]
ret i32 %18
}