xunge/DecIR huggingface dataset:
void EC_POINT_is_at_infinity(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_POINT_is_at_infinity() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int read(int, char *, int);
void testRead() {
  char buf[21];
  int received = 0;
  received = read(1, buf, 20);
  buf[received] = '\0';
  puts(buf);
}


x86 assembly (clang, -O0):
<testRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x24(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x1,%edi
mov    $0x14,%edx
call   1040 <read@plt>
mov    %eax,-0x24(%rbp)
movslq -0x24(%rbp),%rax
movb   $0x0,-0x20(%rbp,%rax,1)
lea    -0x20(%rbp),%rdi
call   1030 <puts@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testRead>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x14,%edx
call   1040 <read@plt>
cltq
movb   $0x0,(%rsp,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @testRead() {
%1 = alloca [21 x i8]
%2 = alloca i32
store i32 0, i32* %2
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%4 = call i32 @read(i32 1, i8* %3, i32 20)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 %6
store i8 0, i8* %7
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret void
}

LLVM IR (-O2):
define void @testRead() {
%1 = alloca [21 x i8]
%2 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 1, i8* %2, i32 20)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 %4
store i8 0, i8* %5
%6 = call i32 @puts(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Q_vb();
void R_vb(void) { Q_vb(); }


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

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

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

LLVM IR (-O2):
define void @R_vb() {
%1 = tail call i32 (...) @Q_vb()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t __bswap_32(uint32_t x) {
  return (((x & 0xff000000) >> 24) | ((x & 0x00ff0000) >> 8) |
          ((x & 0x0000ff00) << 8) | ((x & 0x000000ff) << 24));
}


x86 assembly (clang, -O0):
<__bswap_32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bswap_32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @__bswap_32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 16711680
%8 = ashr i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = shl i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, 255
%16 = shl i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

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

/* Variables and functions */
int wcscmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int compar_wcstr(const void *a, const void *b, void *param) {
  return wcscmp((*(const wchar_t **)(a)), (*(const wchar_t **)(b)));
}


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

x86 assembly (clang, -O2):
<compar_wcstr>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <wcscmp@plt>

LLVM IR (-O0):
define i32 @compar_wcstr(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32**
%9 = load i32*, i32** %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i32**
%12 = load i32*, i32** %11
%13 = call i32 @wcscmp(i32* %9, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @compar_wcstr(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i32**
%5 = load i32*, i32** %4
%6 = bitcast i8* %1 to i32**
%7 = load i32*, i32** %6
%8 = tail call i32 @wcscmp(i32* %5, i32* %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ switch_off_bits(unsigned char *, int);
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSC_BITSET_BW100(unsigned char *data) {
  switch_on_bits(data, (0x80 | 0x40));
  switch_off_bits(data, (0x20));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xc0,%esi
call   1030 <switch_on_bits@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1040 <switch_off_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
mov    %rdi,%rbx
mov    $0xc0,%esi
call   1030 <switch_on_bits@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
pop    %rbx
jmp    1040 <switch_off_bits@plt>

LLVM IR (-O0):
define void @CTRL_REGSC_BITSET_BW100(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @switch_on_bits(i8* %3, i32 192)
%5 = load i8*, i8** %2
%6 = call i32 @switch_off_bits(i8* %5, i32 32)
ret void
}

LLVM IR (-O2):
define void @CTRL_REGSC_BITSET_BW100(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 192)
%3 = tail call i32 @switch_off_bits(i8* %0, i32 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ inb(int);
int /*<<< orphan*/ outb(int, int);
uint8_t pmh7_register_read(uint16_t reg) {
  outb(reg & 0xff, (0x15e0 + 0x0c));
  outb((reg & 0xff00) >> 8, (0x15e0 + 0x0d));
  return inb((0x15e0 + 0x0e));
}


x86 assembly (clang, -O0):
<pmh7_register_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
mov    $0x15ec,%esi
call   1030 <outb@plt>
mov    -0x4(%rbp),%edi
and    $0xff00,%edi
sar    $0x8,%edi
mov    $0x15ed,%esi
call   1030 <outb@plt>
mov    $0x15ee,%edi
call   1040 <inb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmh7_register_read>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
mov    $0x15ec,%esi
call   1030 <outb@plt>
movzbl %bh,%edi
mov    $0x15ed,%esi
call   1030 <outb@plt>
mov    $0x15ee,%edi
pop    %rbx
jmp    1040 <inb@plt>

LLVM IR (-O0):
define i32 @pmh7_register_read(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = call i32 @outb(i32 %4, i32 5612)
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = ashr i32 %7, 8
%9 = call i32 @outb(i32 %8, i32 5613)
%10 = call i32 @inb(i32 5614)
ret i32 %10
}

LLVM IR (-O2):
define i32 @pmh7_register_read(i32 %0) {
%2 = and i32 %0, 255
%3 = tail call i32 @outb(i32 %2, i32 5612)
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = tail call i32 @outb(i32 %5, i32 5613)
%7 = tail call i32 @inb(i32 5614)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ is_hidden();
int /*<<< orphan*/ not_hidden();
int main() {
  not_hidden();
  is_hidden();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @not_hidden()
%2 = tail call i32 (...) @is_hidden()
ret i32 0
}
char *taConfigSeekToEndOfBlockComment(char *configString) {
  while (*configString != '\0') {
    if (configString[0] == '*' && configString[1] == '/') {
      configString += 2;
      break;
    }
    configString += 1;
  }
  return configString;
}


x86 assembly (clang, -O0):
<taConfigSeekToEndOfBlockComment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115b <taConfigSeekToEndOfBlockComment+0x5b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    114a <taConfigSeekToEndOfBlockComment+0x4a>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2f,%eax
jne    114a <taConfigSeekToEndOfBlockComment+0x4a>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    115b <taConfigSeekToEndOfBlockComment+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <taConfigSeekToEndOfBlockComment+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<taConfigSeekToEndOfBlockComment>:
mov    %rdi,%rax
jmp    111a <taConfigSeekToEndOfBlockComment+0x1a>
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x2f,0x1(%rax)
je     1127 <taConfigSeekToEndOfBlockComment+0x27>
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x2a,%cl
je     1110 <taConfigSeekToEndOfBlockComment+0x10>
test   %cl,%cl
jne    1116 <taConfigSeekToEndOfBlockComment+0x16>
ret
add    $0x2,%rax
ret

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

LLVM IR (-O2):
define i8* @taConfigSeekToEndOfBlockComment(i8* %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %12, %11 ]
%4 = load i8, i8* %3
switch i8 %4, label %11 [
i8 0, label %13
i8 42, label %5
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 47
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %3, i64 2
br label %13
11: ; preds = %2, %5
%12 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
13: ; preds = %2, %9
%14 = phi i8* [ %10, %9 ], [ %3, %2 ]
ret i8* %14
}
_Bool SignalingLessEqual(float f1, float f2) { return f1 <= f2; }


x86 assembly (clang, -O0):
<SignalingLessEqual>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SignalingLessEqual>:
ucomiss %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define zeroext i1 @SignalingLessEqual(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 = fcmp ole float %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @SignalingLessEqual(float %0, float %1) {
%3 = fcmp ole float %0, %1
ret i1 %3
}
void outb(unsigned short port, unsigned char value) {
  __asm__ __volatile__("outb %b0,%w1" : : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int main(void) {
  unsigned int ui = 3;
  int i1 = -10;
  int i2 = 10;
  unsigned int ui2;
  ui2 = i1;
  printf("%u\n", i1 + ui);
  printf("%u\n", -9);
  printf("%u\n", ui2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0xfffffff6,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%esi
add    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xead(%rip),%rdi
mov    $0xfffffff7,%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfffffff9,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffffff6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -9)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 -10)
ret i32 0
}
int add10(int param1) { return param1 + 10; }


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

x86 assembly (clang, -O2):
<add10>:
lea    0xa(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @add10(i32 %0) {
%2 = add nsw i32 %0, 10
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ ltr_int_log_message(char *, int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *ltr_int_my_malloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL) {
    ltr_int_log_message("Can't malloc memory! %s\n", strerror(errno));
    assert(0);
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<ltr_int_my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11a1 <ltr_int_my_malloc+0x51>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1070 <strerror@plt>
mov    %eax,%esi
lea    0xe75(%rip),%rdi
call   1030 <ltr_int_log_message@plt>
xor    %edi,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltr_int_my_malloc>:
push   %rax
call   1050 <malloc@plt>
test   %rax,%rax
je     115d <ltr_int_my_malloc+0xd>
pop    %rcx
ret
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1070 <strerror@plt>
lea    0xe8e(%rip),%rdi
mov    %eax,%esi
call   1030 <ltr_int_log_message@plt>
xor    %edi,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Can't malloc memory! %s\0A\00"
@errno = global i32 0
define i8* @ltr_int_my_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @ltr_int_log_message(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @assert(i32 0)
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [25 x i8] c"Can't malloc memory! %s\0A\00"
@errno = global i32 0
define noalias i8* @ltr_int_my_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @strerror(i32 %5)
%7 = tail call i32 @ltr_int_log_message(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @assert(i32 0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int VMCISock_GetAFValueFd(int /*<<< orphan*/ *);
int VMCISock_GetAFValue(void) { return VMCISock_GetAFValueFd(NULL); }


x86 assembly (clang, -O0):
<VMCISock_GetAFValue>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <VMCISock_GetAFValueFd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMCISock_GetAFValue>:
xor    %edi,%edi
jmp    1030 <VMCISock_GetAFValueFd@plt>

LLVM IR (-O0):
define i32 @VMCISock_GetAFValue() {
%1 = call i32 @VMCISock_GetAFValueFd(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @VMCISock_GetAFValue() {
%1 = tail call i32 @VMCISock_GetAFValueFd(i32* null)
ret i32 %1
}
void cmd_snoop(char *arg) {
  if (!*arg) {
    status(1), printf("#snoop: which connection?\n");
  } else
    tcp_togglesnoop(arg);
}


x86 assembly (clang, -O0):
<cmd_snoop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1168 <cmd_snoop+0x38>
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <status@plt>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1173 <cmd_snoop+0x43>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1050 <tcp_togglesnoop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_snoop>:
push   %rax
cmpb   $0x0,(%rdi)
je     113e <cmd_snoop+0xe>
xor    %eax,%eax
pop    %rcx
jmp    1050 <tcp_togglesnoop@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <status@plt>
lea    0xeaf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"#snoop: which connection?\0A\00"
define void @cmd_snoop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = call i32 (i32, ...) bitcast (i32 (...)* @status to i32 (i32, ...)*)(i32 1)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 (i8*, ...) bitcast (i32 (...)* @tcp_togglesnoop to i32 (i8*, ...)*)(i8* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"#snoop: which connection?\00"
define void @cmd_snoop(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @status to i32 (i32, ...)*)(i32 1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tcp_togglesnoop to i32 (i8*, ...)*)(i8* %0)
br label %9
9: ; preds = %7, %4
ret void
}
void StartCfgTool(char *pCmdLine) {}


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

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

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

LLVM IR (-O2):
define void @StartCfgTool(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int rmdir(char *);
int fs_rmdir(char *path) { return rmdir(path); }


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

x86 assembly (clang, -O2):
<fs_rmdir>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define i32 @fs_rmdir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret i32 %2
}
/* Variables and functions */
int __gen_tempname(char *, int /*<<< orphan*/);
int rpl_mkstemp(char *template) { return __gen_tempname(template, 0); }


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

x86 assembly (clang, -O2):
<rpl_mkstemp>:
xor    %esi,%esi
jmp    1030 <__gen_tempname@plt>

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

LLVM IR (-O2):
define i32 @rpl_mkstemp(i8* %0) {
%2 = tail call i32 @__gen_tempname(i8* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct bladerf {
  int dummy;
};

/* Variables and functions */
int nios_legacy_pio_read(struct bladerf *, int /*<<< orphan*/,
                         int /*<<< orphan*/ *);
int nios_legacy_config_read(struct bladerf *dev, uint32_t *val) {
  int status;
  status = nios_legacy_pio_read(dev, 0, val);
  if (status == 0) {
    do {
      do {
      } while (0);
    } while (0);
  }
  return status;
}


x86 assembly (clang, -O0):
<nios_legacy_config_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <nios_legacy_pio_read@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1155 <nios_legacy_config_read+0x45>
jmp    1141 <nios_legacy_config_read+0x31>
jmp    1146 <nios_legacy_config_read+0x36>
jmp    114b <nios_legacy_config_read+0x3b>
jmp    1150 <nios_legacy_config_read+0x40>
jmp    1155 <nios_legacy_config_read+0x45>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nios_legacy_config_read>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <nios_legacy_pio_read@plt>

LLVM IR (-O0):
%struct.bladerf = type { i32 }
define i32 @nios_legacy_config_read(%struct.bladerf* %0, i32* %1) {
%3 = alloca %struct.bladerf*
%4 = alloca i32*
%5 = alloca i32
store %struct.bladerf* %0, %struct.bladerf** %3
store i32* %1, i32** %4
%6 = load %struct.bladerf*, %struct.bladerf** %3
%7 = load i32*, i32** %4
%8 = call i32 @nios_legacy_pio_read(%struct.bladerf* %6, i32 0, i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14
br label %16
16: ; preds = %15, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
%struct.bladerf = type { i32 }
define i32 @nios_legacy_config_read(%struct.bladerf* %0, i32* %1) {
%3 = tail call i32 @nios_legacy_pio_read(%struct.bladerf* %0, i32 0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void utilReady(void) { printf("\nready\n"); }


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"\0Aready\00"
define void @utilReady() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int BMAsearch(char *, char *);
int ialSearch(char *string, char *pattern) {
  return BMAsearch(string, pattern);
}


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

x86 assembly (clang, -O2):
<ialSearch>:
jmp    1030 <BMAsearch@plt>

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

LLVM IR (-O2):
define i32 @ialSearch(i8* %0, i8* %1) {
%3 = tail call i32 @BMAsearch(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int ts_packet_get_scrambled(uint8_t *ts_packet) { return ts_packet[3] >> 6; }


x86 assembly (clang, -O0):
<ts_packet_get_scrambled>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
sar    $0x6,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_packet_get_scrambled>:
mov    0xc(%rdi),%eax
sar    $0x6,%eax
ret

LLVM IR (-O0):
define i32 @ts_packet_get_scrambled(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
%6 = ashr i32 %5, 6
ret i32 %6
}

LLVM IR (-O2):
define i32 @ts_packet_get_scrambled(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = ashr i32 %3, 6
ret i32 %4
}
void call_func(void (*f)(int)) {
  int i;
  for (i = 0; i < 3; i++) {
    f(i);
  }
}


x86 assembly (clang, -O0):
<call_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1134 <call_func+0x34>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%edi
call   *%rax
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <call_func+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_func>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   *%rbx
mov    $0x1,%edi
call   *%rbx
mov    $0x2,%edi
mov    %rbx,%rax
pop    %rbx
jmp    *%rax

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

LLVM IR (-O2):
define void @call_func(void (i32)* nocapture %0) {
tail call void %0(i32 0)
tail call void %0(i32 1)
tail call void %0(i32 2)
ret void
}
void int_array3D_delete(int ***p) {
  if (p) {
    free(p[0][0]);
    free(p[0]);
    free(p);
  }
}


x86 assembly (clang, -O0):
<int_array3D_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114b <int_array3D_delete+0x3b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_array3D_delete>:
test   %rdi,%rdi
je     1135 <int_array3D_delete+0x25>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @int_array3D_delete(i32*** %0) {
%2 = icmp eq i32*** %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = bitcast i32*** %0 to i8***
%5 = load i8**, i8*** %4
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = bitcast i32*** %0 to i8**
%8 = load i8*, i8** %7
tail call void @free(i8* %8)
%9 = bitcast i32*** %0 to i8*
tail call void @free(i8* %9)
br label %10
10: ; preds = %3, %1
ret void
}
/* Variables and functions */
int mysnprintf(char *, size_t, char *, unsigned long);
int unsignedlong2str(unsigned long value, char *buf, size_t len) {
  return mysnprintf(buf, len, "%lu", value);
}


x86 assembly (clang, -O0):
<unsignedlong2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rcx
lea    0xec9(%rip),%rdx
call   1030 <mysnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedlong2str>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <mysnprintf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
define i32 @unsignedlong2str(i64 %0, i8* %1, i64 %2) {
%4 = tail call i32 @mysnprintf(i8* %1, i64 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 %4
}
void PBISTStop(void) {
  (*((volatile unsigned long *)(0x400FB000 + 0x0000016C))) = 0x4;
  (*((volatile unsigned long *)(0x400FB000 + 0x00000164))) = 0x218;
}


x86 assembly (clang, -O0):
<PBISTStop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fb16c,%eax
movq   $0x4,(%rax)
mov    $0x400fb164,%eax
movq   $0x218,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PBISTStop>:
movq   $0x4,0x400fb16c
movq   $0x218,0x400fb164
ret

LLVM IR (-O0):
define void @PBISTStop() {
store volatile i64 4, i64* inttoptr (i64 1074770284 to i64*)
store volatile i64 536, i64* inttoptr (i64 1074770276 to i64*)
ret void
}

LLVM IR (-O2):
define void @PBISTStop() {
store volatile i64 4, i64* inttoptr (i64 1074770284 to i64*)
store volatile i64 536, i64* inttoptr (i64 1074770276 to i64*)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XButtonReleasedEvent;

/* Variables and functions */
void set_XButtonReleasedEvent_serial(void *_p, unsigned long _v) {
  ((XButtonReleasedEvent *)_p)->serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XButtonReleasedEvent_serial>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XButtonReleasedEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_constant_and_var_0() {
  char *x = "abc";
  clang_analyzer_eval(strncasecmp(x, "Abc", 3) == 0);
}


x86 assembly (clang, -O0):
<strncasecmp_constant_and_var_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_constant_and_var_0>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Abc\00"
define void @strncasecmp_constant_and_var_0() {
%1 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i64 @strncasecmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Abc\00"
define void @strncasecmp_constant_and_var_0() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
void gtk_widget_get_style() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_get_style() {
ret void
}
int mean(int a, int b) { return (a + b) / 2; }


x86 assembly (clang, -O0):
<mean>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mean>:
lea    (%rdi,%rsi,1),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @mean(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 = add nsw i32 %5, %6
%8 = sdiv i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
define i32 @mean(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
void CRYPTO_num_locks(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_num_locks() {
ret void
}
printf(format) char *format;
{
  int putchar();
  return _spr(&format, &putchar);
}


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

x86 assembly (clang, -O2):
<printf>:
push   %rax
mov    %rdi,(%rsp)
mov    0x2ebc(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <_spr@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8**, i32 (...)*, ...) bitcast (i32 (...)* @_spr to i32 (i8**, i32 (...)*, ...)*)(i8** %2, i32 (...)* @putchar)
ret i32 %3
}

LLVM IR (-O2):
define i32 @printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8**, i32 (...)*, ...) bitcast (i32 (...)* @_spr to i32 (i8**, i32 (...)*, ...)*)(i8** %2, i32 (...)* @putchar)
ret i32 %3
}
/* Variables and functions */
void *calloc(size_t, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
int /*<<< orphan*/ stderr;
void *emalloc(size_t size) {
  void *ptr;
  if ((ptr = calloc(size, 1)) == NULL) {
    fprintf(stderr, "emalloc: no memory for %u bytes", size);
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    117b <emalloc+0x4b>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <calloc@plt>
test   %rax,%rax
je     1145 <emalloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"emalloc: no memory for %u bytes\00"
define i8* @emalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i64 %4, i32 1)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i64, i64* %2
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"emalloc: no memory for %u bytes\00"
define i8* @emalloc(i64 %0) {
%2 = tail call i8* @calloc(i64 %0, i32 1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void star(void) {
  int i;
  for (i = 0; i < 10; i++) {
    printf("* ", i);
  }
}


x86 assembly (clang, -O0):
<star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1146 <star+0x36>
mov    -0x4(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <star+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<star>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"* \00"
define void @star() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"* \00"
define void @star() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ i2c_rd(int, int /*<<< orphan*/, int /*<<< orphan*/ *, int);
uint8_t i2c_rd8(int fd, uint16_t reg) {
  uint8_t val;
  i2c_rd(fd, reg, &val, 1);
  return val;
}


x86 assembly (clang, -O0):
<i2c_rd8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0xc(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <i2c_rd@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_rd8>:
push   %rax
lea    0x4(%rsp),%rdx
mov    $0x1,%ecx
call   1030 <i2c_rd@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @i2c_rd8(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @i2c_rd(i32 %0, i32 %1, i32* %3, i32 1)
%6 = load i32, i32* %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ CRL_DIST_POINTS;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ CRL_DIST_POINTS_it;
CRL_DIST_POINTS *CRL_DIST_POINTS_new(void) {
  return (CRL_DIST_POINTS *)ASN1_item_new(&CRL_DIST_POINTS_it);
}


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

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

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

LLVM IR (-O2):
@CRL_DIST_POINTS_it = global i32 0
define i32* @CRL_DIST_POINTS_new() {
%1 = tail call i64 @ASN1_item_new(i32* @CRL_DIST_POINTS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
int XInitThreads() {}


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

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

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

LLVM IR (-O2):
define i32 @XInitThreads() {
ret i32 undef
}
__attribute__((always_)) const int xisinf(double x) {
  return x == __builtin_inf() || x == -__builtin_inf();
}


x86 assembly (clang, -O0):
<xisinf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%al
movsd  0xee8(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    1130 <xisinf+0x30>
jp     1130 <xisinf+0x30>
jmp    114c <xisinf+0x4c>
movsd  -0x8(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisinf>:
ucomisd 0xef8(%rip),%xmm0
setae  %al
movsd  0xef5(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @xisinf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0x7FF0000000000000
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp oeq double %6, 0xFFF0000000000000
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xisinf(double %0) {
%2 = fcmp oeq double %0, 0x7FF0000000000000
%3 = fcmp oeq double %0, 0xFFF0000000000000
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
double long_long_to_double(int);
double qNaN(long long payload) {
  return long_long_to_double(0x7ff8000000000000 | payload);
}


x86 assembly (clang, -O0):
<qNaN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x7ff8000000000000,%rax
or     -0x8(%rbp),%rax
mov    %eax,%edi
call   1030 <long_long_to_double@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qNaN>:
jmp    1030 <long_long_to_double@plt>

LLVM IR (-O0):
define double @qNaN(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 9221120237041090560, %3
%5 = trunc i64 %4 to i32
%6 = call double @long_long_to_double(i32 %5)
ret double %6
}

LLVM IR (-O2):
define double @qNaN(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call double @long_long_to_double(i32 %2)
ret double %3
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
void smash_stack(void) {
  static uint32_t junk = 0xdeadbeef;
  uint32_t buf[512];
  int i;
  for (i = 0; i < sizeof(buf) / sizeof(buf[0]); i++)
    buf[i] = junk;
}


x86 assembly (clang, -O0):
<smash_stack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x790,%rsp
movl   $0x0,-0x804(%rbp)
movslq -0x804(%rbp),%rax
cmp    $0x200,%rax
jae    1150 <smash_stack+0x50>
mov    0x2ef2(%rip),%ecx
movslq -0x804(%rbp),%rax
mov    %ecx,-0x800(%rbp,%rax,4)
mov    -0x804(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x804(%rbp)
jmp    1115 <smash_stack+0x15>
add    $0x790,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@smash_stack.junk = internal global i32 -559038737
define void @smash_stack() {
%1 = alloca [512 x i32]
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = icmp ult i64 %5, 512
br i1 %6, label %7, label %15
7: ; preds = %3
%8 = load i32, i32* @smash_stack.junk
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [512 x i32], [512 x i32]* %1, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
ret void
}

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