xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
unsigned long LPCChannelDMAConfigGet(unsigned long ulBase) {
  DEBUG_ASSERT(ulBase == 0x40080000);
  return ((*((volatile unsigned long *)(ulBase + 0x00000120))) & 0x000000FF);
}


x86 assembly (clang, -O0):
<LPCChannelDMAConfigGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x40080000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
mov    0x120(%rax),%rax
and    $0xff,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelDMAConfigGet>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40080000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    0x120(%rbx),%rax
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @LPCChannelDMAConfigGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1074266112
%5 = zext i1 %4 to i32
%6 = call i32 @DEBUG_ASSERT(i32 %5)
%7 = load i64, i64* %2
%8 = add i64 %7, 288
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, 255
ret i64 %11
}

LLVM IR (-O2):
define i64 @LPCChannelDMAConfigGet(i64 %0) {
%2 = icmp eq i64 %0, 1074266112
%3 = zext i1 %2 to i32
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 288
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = and i64 %7, 255
ret i64 %8
}
void gtk_range_get_adjustment() {}


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

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

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

LLVM IR (-O2):
define void @gtk_range_get_adjustment() {
ret void
}
float __fmaf(float x, float y, float z) { return (x * y) + z; }


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

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

LLVM IR (-O0):
define float @__fmaf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @llvm.fmuladd.f32(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @__fmaf(float %0, float %1, float %2) {
%4 = tail call float @llvm.fmuladd.f32(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_batch_context_recv_initial_metadata() {
  fprintf(stderr, "Should never reach here");
  abort();
}


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

x86 assembly (clang, -O2):
<grpcsharp_batch_context_recv_initial_metadata>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_initial_metadata() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_batch_context_recv_initial_metadata() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  for (int i = 0; i < 5; i++) {
    puts("Hello world.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1151 <main+0x41>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
int /*<<< orphan*/ eeread(int, int, int *);
int read_int(int address) {
  int value;
  eeread(address, sizeof(value), &value);
  return value;
}


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

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

LLVM IR (-O0):
define i32 @read_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @eeread(i32 %4, i32 4, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @read_int(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @eeread(i32 %0, i32 4, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
int pldummy_tcpip() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pldummy_tcpip() {
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int is_weak_symbol(const uint16_t n_desc) {
  const uint16_t mask = (0x0080 | 0x0040);
  return (n_desc & mask);
}


x86 assembly (clang, -O0):
<is_weak_symbol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xc0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xc0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_weak_symbol>:
mov    %edi,%eax
and    $0xc0,%eax
ret

LLVM IR (-O0):
define i32 @is_weak_symbol(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 192, i32* %3
%4 = load i32, i32* %2
%5 = and i32 %4, 192
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_weak_symbol(i32 %0) {
%2 = and i32 %0, 192
ret i32 %2
}
int cmodel_has_alpha(int colormodel) {
  switch (colormodel) {
  case 14:
  case 10:
  case 30:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cmodel_has_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xa,%eax
je     113d <cmodel_has_alpha+0x3d>
jmp    111b <cmodel_has_alpha+0x1b>
mov    -0xc(%rbp),%eax
sub    $0xe,%eax
je     113d <cmodel_has_alpha+0x3d>
jmp    112c <cmodel_has_alpha+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x1e,%eax
jne    1149 <cmodel_has_alpha+0x49>
jmp    113d <cmodel_has_alpha+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1150 <cmodel_has_alpha+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmodel_has_alpha>:
cmp    $0x1e,%edi
ja     1115 <cmodel_has_alpha+0x15>
mov    $0x1,%eax
mov    $0x40004400,%ecx
bt     %edi,%ecx
jae    1115 <cmodel_has_alpha+0x15>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @cmodel_has_alpha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 14, label %5
i32 10, label %5
i32 30, label %5
]
5: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmodel_has_alpha(i32 %0) {
switch i32 %0, label %2 [
i32 14, label %3
i32 10, label %3
i32 30, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ENDIAN_REVERSE_32(int /*<<< orphan*/);
uint32_t __GET_UINT32_WITH_REVERSE(uint32_t *addr) {
  return ENDIAN_REVERSE_32((*(uint32_t *)(((uint8_t *)(addr)) + (0))));
}


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

x86 assembly (clang, -O2):
<__GET_UINT32_WITH_REVERSE>:
mov    (%rdi),%edi
jmp    1030 <ENDIAN_REVERSE_32@plt>

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

LLVM IR (-O2):
define i32 @__GET_UINT32_WITH_REVERSE(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @ENDIAN_REVERSE_32(i32 %2)
ret i32 %3
}
int getByteorder(int byteswap) {
  static union {
    unsigned long l;
    unsigned char c[sizeof(long)];
  } u_byteorder = {1};
  int byteorder = -1;
  if ((u_byteorder.c[sizeof(long) - 1])) {
    if (byteswap)
      byteorder = 1;
    else
      byteorder = 0;
  } else {
    if (byteswap)
      byteorder = 0;
    else
      byteorder = 1;
  }
  return (byteorder);
}


x86 assembly (clang, -O0):
<getByteorder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpb   $0x0,0x2f12(%rip)
je     113d <getByteorder+0x3d>
cmpl   $0x0,-0x4(%rbp)
je     1131 <getByteorder+0x31>
movl   $0x1,-0x8(%rbp)
jmp    1138 <getByteorder+0x38>
movl   $0x0,-0x8(%rbp)
jmp    115f <getByteorder+0x5f>
cmpl   $0x0,-0x4(%rbp)
je     1153 <getByteorder+0x53>
movl   $0x0,-0x8(%rbp)
jmp    115a <getByteorder+0x5a>
movl   $0x1,-0x8(%rbp)
jmp    115f <getByteorder+0x5f>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getByteorder>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
%union.anon = type { i64 }
@getByteorder.u_byteorder = internal global %union.anon { i64 1 }
define i32 @getByteorder(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* bitcast (%union.anon* @getByteorder.u_byteorder to [8 x i8]*), i64 0, i64 7)
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %3
br label %11
10: ; preds = %6
store i32 0, i32* %3
br label %11
11: ; preds = %10, %9
br label %18
12: ; preds = %1
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %3
br label %17
16: ; preds = %12
store i32 1, i32* %3
br label %17
17: ; preds = %16, %15
br label %18
18: ; preds = %17, %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @getByteorder(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int HelpItem130(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem130() {
ret i32 0
}
void saveaddr(char c, void *p) {
  if (c != '\n') {
    char **cp = (char **)p;
    *(*cp)++ = c;
  }
}


x86 assembly (clang, -O0):
<saveaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     1139 <saveaddr+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x18(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<saveaddr>:
cmp    $0xa,%dil
je     1113 <saveaddr+0x13>
mov    (%rsi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rsi)
mov    %dil,(%rax)
ret

LLVM IR (-O0):
define void @saveaddr(i8 signext %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
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 10
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
store i8** %11, i8*** %5
%12 = load i8, i8* %3
%13 = load i8**, i8*** %5
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %13
store i8 %12, i8* %14
br label %16
16: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @saveaddr(i8 signext %0, i8* nocapture %1) {
%3 = icmp eq i8 %0, 10
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 1
store i8* %7, i8** %5
store i8 %0, i8* %6
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int removeElement(int *, int, int);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  int nums[] = {3, 2, 2, 3};
  int len = removeElement(nums, 4, 3);
  printf("删除后的长度:%d\n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0xee5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
call   1030 <removeElement@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
call   1040 <removeElement@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@__const.main.nums = [4 x i32] [i32 3, i32 2, i32 2, i32 3]
@.str.1 = [23 x i8] c"\E5\88\A0\E9\99\A4\E5\90\8E\E7\9A\84\E9\95\BF\E5\BA\A6:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = bitcast [4 x i32]* %6 to i8*
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%11 = call i32 @removeElement(i32* %10, i32 4, i32 3)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [4 x i32] [i32 3, i32 2, i32 2, i32 3]
@.str.1 = [23 x i8] c"\E5\88\A0\E9\99\A4\E5\90\8E\E7\9A\84\E9\95\BF\E5\BA\A6:%d\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = bitcast [4 x i32]* %3 to i8*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%7 = call i32 @removeElement(i32* %6, i32 4, i32 3)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ number_value;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ print_cpuinfo(char *, int /*<<< orphan*/ *, size_t *);
void cpuinfo_by_sysctl() {
  int64_t number_value;
  size_t size_int64_t = sizeof(number_value);
  print_cpuinfo("hw.cpufrequency", &number_value, &size_int64_t);
  print_cpuinfo("hw.cpufrequency_max", &number_value, &size_int64_t);
  print_cpuinfo("hw.cpufrequency_min", &number_value, &size_int64_t);
}


x86 assembly (clang, -O0):
<cpuinfo_by_sysctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x4,-0x10(%rbp)
lea    0xed9(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <print_cpuinfo@plt>
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <print_cpuinfo@plt>
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <print_cpuinfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuinfo_by_sysctl>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movq   $0x4,0x8(%rsp)
lea    0xed9(%rip),%rdi
lea    0x14(%rsp),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <print_cpuinfo@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <print_cpuinfo@plt>
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <print_cpuinfo@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"hw.cpufrequency\00"
@.str.1 = [20 x i8] c"hw.cpufrequency_max\00"
@.str.2 = [20 x i8] c"hw.cpufrequency_min\00"
define void @cpuinfo_by_sysctl() {
%1 = alloca i32
%2 = alloca i64
store i64 4, i64* %2
%3 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32* %1, i64* %2)
%4 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32* %1, i64* %2)
%5 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32* %1, i64* %2)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"hw.cpufrequency\00"
@.str.1 = [20 x i8] c"hw.cpufrequency_max\00"
@.str.2 = [20 x i8] c"hw.cpufrequency_min\00"
define void @cpuinfo_by_sysctl() {
%1 = alloca i32
%2 = alloca i64
%3 = bitcast i32* %1 to i8*
%4 = bitcast i64* %2 to i8*
store i64 4, i64* %2
%5 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32* %1, i64* %2)
%6 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32* %1, i64* %2)
%7 = call i32 @print_cpuinfo(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32* %1, i64* %2)
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) void *
sd_bus_slot_get_current_message(void *slot) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_bus_slot_get_current_message(i8* nocapture readnone %0) {
ret i8* null
}
void tegra_dvfs_rail_disable(struct dvfs_rail *rail) { return; }


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

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

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

LLVM IR (-O2):
%struct.dvfs_rail = type opaque
define void @tegra_dvfs_rail_disable(%struct.dvfs_rail* nocapture %0) {
ret void
}
void *ctx_function_at(void *ip) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @ctx_function_at(i8* nocapture readnone %0) {
ret i8* null
}
unsigned int hash(const void *_str) {
  const char *str = _str;
  unsigned int hash = 5381;
  char c;
  while ((c = *str++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1505,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x15(%rbp)
cmp    $0x0,%al
je     114a <hash+0x4a>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x14(%rbp),%eax
movsbl -0x15(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <hash+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <hash+0x28>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %eax,%edx
shl    $0x5,%edx
add    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i32 %7, 33
%10 = sext i8 %5 to i32
%11 = add i32 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void handle(int signum) { exit(EXIT_SUCCESS); }


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handle>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @handle(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double wallTime(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  return t.tv_sec + 1e-6 * t.tv_usec;
}


x86 assembly (clang, -O0):
<wallTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wallTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @wallTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %7, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @wallTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
void PopMatrix(void) { glPopMatrix(); }


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

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

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

LLVM IR (-O2):
define void @PopMatrix() {
%1 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long get_time(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  return (long)((t.tv_sec * 1000) + (t.tv_sec / 1000));
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0x3e8,%eax,%ecx
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i64 @get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = sdiv i32 %5, 1000
%8 = add nsw i32 %6, %7
%9 = sext i32 %8 to i64
ret i64 %9
}
/* Variables and functions */
int execute_using_pipe(char **, int);
int exec_pipe_raw(char **command, int sleeptime) {
  return execute_using_pipe(command, sleeptime);
}


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

x86 assembly (clang, -O2):
<exec_pipe_raw>:
jmp    1030 <execute_using_pipe@plt>

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

LLVM IR (-O2):
define i32 @exec_pipe_raw(i8** %0, i32 %1) {
%3 = tail call i32 @execute_using_pipe(i8** %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
bool chars_is_digit(char c) { return '0' <= c && c <= '9'; }


x86 assembly (clang, -O0):
<chars_is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <chars_is_digit+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chars_is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @chars_is_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @chars_is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
void comparec(_Complex double a, double r, double i) {
  compare(__real__ a, r);
  compare(__imag__ a, i);
}


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

x86 assembly (clang, -O2):
<comparec>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movaps %xmm2,%xmm1
mov    $0x2,%al
call   1030 <compare@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    $0x2,%al
add    $0x18,%rsp
jmp    1030 <compare@plt>

LLVM IR (-O0):
define void @comparec(double %0, double %1, double %2, double %3) {
%5 = alloca { double, double }
%6 = alloca double
%7 = alloca double
%8 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
store double %0, double* %8
%9 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %1, double* %9
store double %2, double* %6
store double %3, double* %7
%10 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%11 = load double, double* %10
%12 = load double, double* %6
%13 = call i32 (double, double, ...) bitcast (i32 (...)* @compare to i32 (double, double, ...)*)(double %11, double %12)
%14 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%15 = load double, double* %14
%16 = load double, double* %7
%17 = call i32 (double, double, ...) bitcast (i32 (...)* @compare to i32 (double, double, ...)*)(double %15, double %16)
ret void
}

LLVM IR (-O2):
define void @comparec(double %0, double %1, double %2, double %3) {
%5 = tail call i32 (double, double, ...) bitcast (i32 (...)* @compare to i32 (double, double, ...)*)(double %0, double %2)
%6 = tail call i32 (double, double, ...) bitcast (i32 (...)* @compare to i32 (double, double, ...)*)(double %1, double %3)
ret void
}
int mandel(double _Complex C) {
  int py;
  C = (__extension__ 1.0iF) * (double)py;
  return cabs(C);
}


x86 assembly (clang, -O0):
<mandel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm2
xorps  %xmm1,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xeca(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <cabs@plt>
cvttsd2si %xmm0,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mandel>:
push   %rax
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <cabs@plt>
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mandel(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca i32
%5 = alloca { double, double }
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %7
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fmul double 0.000000e+00, %9
%11 = fmul double 1.000000e+00, %9
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %10, double* %12
store double %11, double* %13
%14 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%17 = load double, double* %16
%18 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%19 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %15, double* %18
store double %17, double* %19
%20 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%21 = load double, double* %20
%22 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%23 = load double, double* %22
%24 = call double @cabs(double %21, double %23)
%25 = fptosi double %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @mandel(double %0, double %1) {
%3 = tail call double @cabs(double 0.000000e+00, double 0.000000e+00)
%4 = fptosi double %3 to i32
ret i32 %4
}
void meal() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @Letext() {
ret void
}
void perror_exit(text) char *text;
{
  perror(text);
  exit(1);
}


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

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

LLVM IR (-O0):
define void @perror_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %3)
unreachable
}

LLVM IR (-O2):
define void @perror_exit(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @perror to i32 (i8*, ...)*)(i8* %0)
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
char *abstract_text___Int_strerror_ext___impl(long);
char *core__abstract_text___Int___strerror_ext(long self) {
  char *var;
  char *var1;
  var1 = abstract_text___Int_strerror_ext___impl(self);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

x86 assembly (clang, -O2):
<core__abstract_text___Int___strerror_ext>:
jmp    1030 <abstract_text___Int_strerror_ext___impl@plt>

LLVM IR (-O0):
define i8* @core__abstract_text___Int___strerror_ext(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i8*
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = call i8* @abstract_text___Int_strerror_ext___impl(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
store i8* %7, i8** %3
br label %8
8: ; preds = %1
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @core__abstract_text___Int___strerror_ext(i64 %0) {
%2 = tail call i8* @abstract_text___Int_strerror_ext___impl(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_uart4() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 10); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_uart4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0xa,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_uart4>:
mov    $0xb0000028,%edi
mov    $0xa,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_uart4() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 10)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_uart4() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 10)
ret void
}
int myfunction(int aa) {
  int i;
  i = aa + 42;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @myfunction(i32 %0) {
%2 = add nsw i32 %0, 42
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ stderr;
float *float_alloc(int n) {
  float *v;
  if ((v = (float *)malloc(n * sizeof(float))) == NULL) {
    fprintf(stderr, "FATAL ERROR: Out of memory\n");
    exit(1);
  }
  return v;
}


x86 assembly (clang, -O0):
<float_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1177 <float_alloc+0x47>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_alloc>:
push   %rax
shl    $0x2,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <float_alloc+0x10>
pop    %rcx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define float* @float_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca float*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to float*
store float* %9, float** %3
%10 = icmp eq float* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = load float*, float** %3
ret float* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"FATAL ERROR: Out of memory\0A\00"
define float* @float_alloc(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
%10 = inttoptr i64 %3 to float*
ret float* %10
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ TtlGetFlags(int *, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int);
uint32_t HandlerGetFlags(void) {
  uint8_t disabled;
  uint8_t deactivated;
  uint8_t nvlocked;
  uint32_t result = TtlGetFlags(&disabled, &deactivated, &nvlocked);
  if (result == 0) {
    printf("disabled: %d\ndeactivated: %d\nnvlocked: %d\n", disabled,
           deactivated, nvlocked);
  }
  return result;
}


x86 assembly (clang, -O0):
<HandlerGetFlags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <TtlGetFlags@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115d <HandlerGetFlags+0x3d>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandlerGetFlags>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1030 <TtlGetFlags@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1159 <HandlerGetFlags+0x39>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"disabled: %d\0Adeactivated: %d\0Anvlocked: %d\0A\00"
define i64 @HandlerGetFlags() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = call i64 @TtlGetFlags(i32* %1, i32* %2, i32* %3)
store i64 %5, i64* %4
%6 = load i64, i64* %4
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
br label %13
13: ; preds = %8, %0
%14 = load i64, i64* %4
ret i64 %14
}

LLVM IR (-O2):
@.str = [43 x i8] c"disabled: %d\0Adeactivated: %d\0Anvlocked: %d\0A\00"
define i64 @HandlerGetFlags() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i64 @TtlGetFlags(i32* %1, i32* %2, i32* %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
br label %14
14: ; preds = %9, %0
ret i64 %7
}
/* Type definitions */
struct ibv_qp_attr {
  int dummy;
};
struct ibv_qp {
  int dummy;
};

/* Variables and functions */
int _modify_qp(struct ibv_qp *, struct ibv_qp_attr *, int);
int /*<<< orphan*/ dmtcp_plugin_disable_ckpt();
int /*<<< orphan*/ dmtcp_plugin_enable_ckpt();
int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, int attr_mask) {
  dmtcp_plugin_disable_ckpt();
  int rslt = _modify_qp(qp, attr, attr_mask);
  dmtcp_plugin_enable_ckpt();
  return rslt;
}


x86 assembly (clang, -O0):
<ibv_modify_qp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <_modify_qp@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibv_modify_qp>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1040 <dmtcp_plugin_disable_ckpt@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <_modify_qp@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <dmtcp_plugin_enable_ckpt@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.ibv_qp = type { i32 }
%struct.ibv_qp_attr = type { i32 }
define i32 @ibv_modify_qp(%struct.ibv_qp* %0, %struct.ibv_qp_attr* %1, i32 %2) {
%4 = alloca %struct.ibv_qp*
%5 = alloca %struct.ibv_qp_attr*
%6 = alloca i32
%7 = alloca i32
store %struct.ibv_qp* %0, %struct.ibv_qp** %4
store %struct.ibv_qp_attr* %1, %struct.ibv_qp_attr** %5
store i32 %2, i32* %6
%8 = call i32 (...) @dmtcp_plugin_disable_ckpt()
%9 = load %struct.ibv_qp*, %struct.ibv_qp** %4
%10 = load %struct.ibv_qp_attr*, %struct.ibv_qp_attr** %5
%11 = load i32, i32* %6
%12 = call i32 @_modify_qp(%struct.ibv_qp* %9, %struct.ibv_qp_attr* %10, i32 %11)
store i32 %12, i32* %7
%13 = call i32 (...) @dmtcp_plugin_enable_ckpt()
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
%struct.ibv_qp = type { i32 }
%struct.ibv_qp_attr = type { i32 }
define i32 @ibv_modify_qp(%struct.ibv_qp* %0, %struct.ibv_qp_attr* %1, i32 %2) {
%4 = tail call i32 (...) @dmtcp_plugin_disable_ckpt()
%5 = tail call i32 @_modify_qp(%struct.ibv_qp* %0, %struct.ibv_qp_attr* %1, i32 %2)
%6 = tail call i32 (...) @dmtcp_plugin_enable_ckpt()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ srgb_trans(double *);
void linear_to_srgb(double *r, double *g, double *b) {
  srgb_trans(r);
  srgb_trans(g);
  srgb_trans(b);
  return;
}


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

x86 assembly (clang, -O2):
<linear_to_srgb>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <srgb_trans@plt>
mov    %rbx,%rdi
call   1030 <srgb_trans@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <srgb_trans@plt>

LLVM IR (-O0):
define void @linear_to_srgb(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = call i32 @srgb_trans(double* %7)
%9 = load double*, double** %5
%10 = call i32 @srgb_trans(double* %9)
%11 = load double*, double** %6
%12 = call i32 @srgb_trans(double* %11)
ret void
}

LLVM IR (-O2):
define void @linear_to_srgb(double* %0, double* %1, double* %2) {
%4 = tail call i32 @srgb_trans(double* %0)
%5 = tail call i32 @srgb_trans(double* %1)
%6 = tail call i32 @srgb_trans(double* %2)
ret void
}