xunge/DecIR huggingface dataset:
void bitmap_set(unsigned char *map, int n, int size) {
  if (n >= size)
    return;
  int s = 0x80;
  map[n / 8] |= s >> (n % 8);
}


x86 assembly (clang, -O0):
<bitmap_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     111f <bitmap_set+0x1f>
jmp    115d <bitmap_set+0x5d>
movl   $0x80,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
sar    %cl,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_set>:
cmp    %edx,%esi
jge    1121 <bitmap_set+0x21>
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x80,%eax
shr    %cl,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
or     %al,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define void @bitmap_set(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %26
12: ; preds = %3
store i32 128, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = srem i32 %14, 8
%16 = ashr i32 %13, %15
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = sdiv i32 %18, 8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %23, %16
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
br label %26
26: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @bitmap_set(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = and i32 %1, 7
%7 = lshr i32 128, %6
%8 = sdiv i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = trunc i32 %7 to i8
%13 = or i8 %11, %12
store i8 %13, i8* %10
br label %14
14: ; preds = %3, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ leds_ON(unsigned short);
void leds_ON_all(void) {
  unsigned short number = 1;
  for (number = 1; number <= 4; number++) {
    leds_ON(number);
  }
}


x86 assembly (clang, -O0):
<leds_ON_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x1,-0x2(%rbp)
movw   $0x1,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x4,%eax
jg     114b <leds_ON_all+0x3b>
movzwl -0x2(%rbp),%edi
call   1030 <leds_ON@plt>
mov    -0x2(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2(%rbp)
jmp    1124 <leds_ON_all+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leds_ON_all>:
push   %rax
mov    $0x1,%edi
call   1030 <leds_ON@plt>
mov    $0x2,%edi
call   1030 <leds_ON@plt>
mov    $0x3,%edi
call   1030 <leds_ON@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <leds_ON@plt>

LLVM IR (-O0):
define void @leds_ON_all() {
%1 = alloca i16
store i16 1, i16* %1
store i16 1, i16* %1
br label %2
2: ; preds = %9, %0
%3 = load i16, i16* %1
%4 = zext i16 %3 to i32
%5 = icmp sle i32 %4, 4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = load i16, i16* %1
%8 = call i32 @leds_ON(i16 zeroext %7)
br label %9
9: ; preds = %6
%10 = load i16, i16* %1
%11 = add i16 %10, 1
store i16 %11, i16* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @leds_ON_all() {
%1 = tail call i32 @leds_ON(i16 zeroext 1)
%2 = tail call i32 @leds_ON(i16 zeroext 2)
%3 = tail call i32 @leds_ON(i16 zeroext 3)
%4 = tail call i32 @leds_ON(i16 zeroext 4)
ret void
}
void LCD_HAL_E_Pulse(void) {
  LCD_HAL_E_High();
  asm(" nop");
  asm(" nop");
  asm(" nop");
  asm(" nop");
  LCD_HAL_E_Low();
}


x86 assembly (clang, -O0):
<LCD_HAL_E_Pulse>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <LCD_HAL_E_High@plt>
nop
nop
nop
nop
mov    $0x0,%al
call   1030 <LCD_HAL_E_Low@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_HAL_E_Pulse>:
push   %rax
xor    %eax,%eax
call   1040 <LCD_HAL_E_High@plt>
nop
nop
nop
nop
xor    %eax,%eax
pop    %rcx
jmp    1030 <LCD_HAL_E_Low@plt>

LLVM IR (-O0):
define void @LCD_HAL_E_Pulse() {
%1 = call i32 (...) @LCD_HAL_E_High()
%2 = call i32 (...) @LCD_HAL_E_Low()
ret void
}

LLVM IR (-O2):
define void @LCD_HAL_E_Pulse() {
%1 = tail call i32 (...) @LCD_HAL_E_High()
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect " nop", "~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 (...) @LCD_HAL_E_Low()
ret void
}
/* Type definitions */
struct noacq_workspace {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct noacq_workspace *);
int /*<<< orphan*/ printf(char *);
int deinit_acq(struct noacq_workspace *ws) {
  free(ws);
  printf("noacq server acquisition deinitialized\n");
  return 1;
}


x86 assembly (clang, -O0):
<deinit_acq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deinit_acq>:
push   %rax
call   1030 <free@plt>
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.noacq_workspace = type { i32 }
@.str = [40 x i8] c"noacq server acquisition deinitialized\0A\00"
define i32 @deinit_acq(%struct.noacq_workspace* %0) {
%2 = alloca %struct.noacq_workspace*
store %struct.noacq_workspace* %0, %struct.noacq_workspace** %2
%3 = load %struct.noacq_workspace*, %struct.noacq_workspace** %2
%4 = call i32 @free(%struct.noacq_workspace* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
%struct.noacq_workspace = type { i32 }
@str = [39 x i8] c"noacq server acquisition deinitialized\00"
define i32 @deinit_acq(%struct.noacq_workspace* nocapture %0) {
%2 = tail call i32 @free(%struct.noacq_workspace* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 1
}
void OptickAPI_StartCapture() {}


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

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

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

LLVM IR (-O2):
define void @OptickAPI_StartCapture() {
ret void
}
int d_bun_mr1(double *a1, double a2) {
  return (__builtin_isunordered(*a1, a2));
}


x86 assembly (clang, -O0):
<d_bun_mr1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd -0x10(%rbp),%xmm0
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bun_mr1>:
xor    %eax,%eax
ucomisd (%rdi),%xmm0
setp   %al
ret

LLVM IR (-O0):
define i32 @d_bun_mr1(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double, double* %4
%8 = fcmp uno double %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_bun_mr1(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp uno double %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
scalar_t__ malloc(size_t);
double *vector(long nl, long nh) {
  double *v = (double *)malloc((size_t)((nh - nl + 2) * sizeof(double)));
  if (v == NULL)
    error("allocation failure in vector()");
  return (v - nl + 1);
}


x86 assembly (clang, -O0):
<vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x2,%rdi
shl    $0x3,%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1160 <vector+0x40>
lea    0xea5(%rip),%rdi
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
add    $0x8,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x10(,%rsi,8),%rdi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <vector+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <error@plt>
shl    $0x3,%r14
sub    %r14,%rbx
add    $0x8,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca double*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 2
%10 = mul i64 %9, 8
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to double*
store double* %12, double** %5
%13 = load double*, double** %5
%14 = icmp eq double* %13, null
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %2
%18 = load double*, double** %5
%19 = load i64, i64* %3
%20 = sub i64 0, %19
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = getelementptr inbounds double, double* %21, i64 1
ret double* %22
}

LLVM IR (-O2):
@.str = [31 x i8] c"allocation failure in vector()\00"
define double* @vector(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
%4 = shl i64 %3, 3
%5 = add i64 %4, 16
%6 = tail call i64 @malloc(i64 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to double*
%12 = sub i64 0, %0
%13 = getelementptr inbounds double, double* %11, i64 %12
%14 = getelementptr inbounds double, double* %13, i64 1
ret double* %14
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ hello_world();
int /*<<< orphan*/ printf(char *);
int32_t main() {
  printf("This is the main test frame for the extlibc.\n");
  hello_world();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <hello_world@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"This is the main test frame for the extlibc.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @hello_world()
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [45 x i8] c"This is the main test frame for the extlibc.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @hello_world()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ alarm(unsigned int);
int read(int, char *, int);
int read_socket(int sock, char *buf, int size, unsigned int timeout) {
  int bytes_read = 0;
  alarm(timeout);
  bytes_read = read(sock, buf, size);
  alarm(0);
  if (bytes_read <= 0)
    return (-1);
  return (bytes_read);
}


x86 assembly (clang, -O0):
<read_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <alarm@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x1c(%rbp)
xor    %edi,%edi
call   1030 <alarm@plt>
cmpl   $0x0,-0x1c(%rbp)
jg     1173 <read_socket+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <read_socket+0x59>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_socket>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %ecx,%edi
call   1030 <alarm@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <read@plt>
mov    %eax,%ebx
xor    %edi,%edi
call   1030 <alarm@plt>
test   %ebx,%ebx
mov    $0xffffffff,%eax
cmovg  %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @read_socket(i32 %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = tail call i32 @alarm(i32 %3)
%6 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%7 = tail call i32 @alarm(i32 0)
%8 = icmp slt i32 %6, 1
%9 = select i1 %8, i32 -1, i32 %6
ret i32 %9
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_new_method_errno(void *call, void **m, int error,
                                const void *e) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_message_new_method_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
mov    0x2ec4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_message_new_method_errno>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_new_method_errno(i8* %0, i8** %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @EINVAL
%10 = sub nsw i32 0, %9
ret i32 %10
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_new_method_errno(i8* nocapture readnone %0, i8** nocapture readnone %1, i32 %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}
void MergeUVRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @MergeUVRow_Any_NEON() {
ret void
}
void PDC_set_title(title) char *title;
{
  XCurses_set_title(title);
  return;
}


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

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

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

LLVM IR (-O2):
define void @PDC_set_title(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @XCurses_set_title to i32 (i8*, ...)*)(i8* %0)
ret void
}
int isMachineLittleEndian() {
  union {
    int i;
    char c;
  } u;
  u.i = 1;
  if (u.c)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isMachineLittleEndian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
cmpb   $0x0,-0x8(%rbp)
je     1121 <isMachineLittleEndian+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1128 <isMachineLittleEndian+0x28>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i32 }
define i32 @isMachineLittleEndian() {
%1 = alloca i32
%2 = alloca %union.anon
%3 = bitcast %union.anon* %2 to i32*
store i32 1, i32* %3
%4 = bitcast %union.anon* %2 to i8*
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @isMachineLittleEndian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void imprimeIN(int e) { printf("%d\n", e); }


x86 assembly (clang, -O0):
<imprimeIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeIN>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @imprimeIN(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void shellcodeCreator_linux64() { printf("Not yet implemented.\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"Not yet implemented.\00"
define void @shellcodeCreator_linux64() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PUNPCKLWD(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x61);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_PUNPCKLWD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x61,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PUNPCKLWD>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x61,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PUNPCKLWD(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 97)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PUNPCKLWD(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 97)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
void glTexParameterx(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glTexParameterx() {
ret void
}
/* Variables and functions */
scalar_t__ getpid();
int sprintf(char *, char *, int);
int writeToFile(char const *, char *, int);
int write_to_pid_file(const char *pidFilename) {
  char buff[32];
  int len;
  len = sprintf(buff, "%d", (int)getpid());
  return writeToFile(pidFilename, buff, len);
}


x86 assembly (clang, -O0):
<write_to_pid_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
lea    0xea8(%rip),%rsi
call   1050 <sprintf@plt>
mov    %eax,-0x34(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    -0x34(%rbp),%edx
call   1040 <writeToFile@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_pid_file>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeb8(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %eax,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <writeToFile@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @write_to_pid_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [32 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%6 = call i64 (...) @getpid()
%7 = trunc i64 %6 to i32
%8 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
store i32 %8, i32* %4
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %4
%12 = call i32 @writeToFile(i8* %9, i8* %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @write_to_pid_file(i8* %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = tail call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @writeToFile(i8* %0, i8* %3, i32 %6)
ret i32 %7
}
int nisplusdomain_del(const char *ifname, int ifindex, const char *domain) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @nisplusdomain_del(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
void __attribute__((unused)) bootblock_cpu_init(void) {}


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

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

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

LLVM IR (-O2):
define void @bootblock_cpu_init() {
ret void
}
/* Variables and functions */
nan() {}


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

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

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

LLVM IR (-O2):
define i32 @nan() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int xerror(char *message) {
  fprintf(stderr, "%s\n", message);
  return 0;
}


x86 assembly (clang, -O0):
<xerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xerror>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @xerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ menu_cleanup();
int /*<<< orphan*/ menu_second();
main() {
  menu_second();
  menu_cleanup();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <menu_second@plt>
mov    $0x0,%al
call   1030 <menu_cleanup@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @menu_second()
%2 = call i32 (...) @menu_cleanup()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @menu_second()
%2 = tail call i32 (...) @menu_cleanup()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ABMON_7;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_abmon_7() { return nl_langinfo(ABMON_7); }


x86 assembly (clang, -O0):
<langinfo_abmon_7>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_abmon_7>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@ABMON_7 = global i32 0
define i8* @langinfo_abmon_7() {
%1 = load i32, i32* @ABMON_7
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@ABMON_7 = global i32 0
define i8* @langinfo_abmon_7() {
%1 = load i32, i32* @ABMON_7
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xselectionrequest_display(void *_p, void *_v) {
  ((XEvent *)_p)->xselectionrequest.display = (Display *)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xselectionrequest_display>:
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_XEvent_xselectionrequest_display>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xselectionrequest_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
void *alloc_iter_state(const void *array) {
  (void)(array);
  int *st = (int *)malloc(sizeof(int));
  *st = 0;
  return st;
}


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

x86 assembly (clang, -O2):
<alloc_iter_state>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x0,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @alloc_iter_state(i8* nocapture readnone %0) {
%2 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%3 = bitcast i8* %2 to i32*
store i32 0, i32* %3
ret i8* %2
}
void gtk_widget_set_composite_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_composite_name() {
ret void
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, result;
  scanf("%d", &n);
  printf("%d! = %d\n", n, factorial(n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <factorial@plt>
lea    0xeab(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"%d! = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @factorial(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}
/* Variables and functions */
double sqrt(double);
void sqrt_d(double *source, double *target) { *target = sqrt(*source); }


x86 assembly (clang, -O0):
<sqrt_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <sqrt@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1128 <sqrt_d+0x18>
sqrtsd %xmm0,%xmm0
jmp    112d <sqrt_d+0x1d>
call   1030 <sqrt@plt>
movsd  %xmm0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sqrt_d(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call double @sqrt(double %3)
store double %4, double* %1
ret void
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct array *);
int /*<<< orphan*/ free(struct array *);
int array_destroy(struct array *arr) {
  assert(arr);
  free(arr);
  return 1;
}


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

x86 assembly (clang, -O2):
<array_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.array = type { i32 }
define i32 @array_destroy(%struct.array* %0) {
%2 = alloca %struct.array*
store %struct.array* %0, %struct.array** %2
%3 = load %struct.array*, %struct.array** %2
%4 = call i32 @assert(%struct.array* %3)
%5 = load %struct.array*, %struct.array** %2
%6 = call i32 @free(%struct.array* %5)
ret i32 1
}

LLVM IR (-O2):
%struct.array = type { i32 }
define i32 @array_destroy(%struct.array* %0) {
%2 = tail call i32 @assert(%struct.array* %0)
%3 = tail call i32 @free(%struct.array* %0)
ret i32 1
}
void fatal(message) char *message;
{
  writesn(message);
  killtemps();
  exit(1);
}


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

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

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

LLVM IR (-O2):
define void @fatal(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @writesn to i32 (i8*, ...)*)(i8* %0)
%3 = tail call i32 (...) @killtemps()
tail call void @exit(i32 1)
unreachable
}
void idr_pre_get(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<idr_pre_get>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<idr_pre_get>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.idr_pre_get = [12 x i8] c"idr_pre_get\00"
define void @idr_pre_get() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.idr_pre_get, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.idr_pre_get = [12 x i8] c"idr_pre_get\00"
define void @idr_pre_get() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.idr_pre_get, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void err_handler(const char *msg) { fprintf(stderr, "Error : %s\n", msg); }


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

x86 assembly (clang, -O2):
<err_handler>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"Error : %s\0A\00"
define void @err_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"Error : %s\0A\00"
define void @err_handler(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
unsigned int multiple(unsigned int, unsigned int);
unsigned int ceiling(unsigned int x, unsigned int f) {
  return multiple(x, f) * f;
}


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

x86 assembly (clang, -O2):
<ceiling>:
push   %rbx
mov    %esi,%ebx
call   1030 <multiple@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ceiling(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 = call i32 @multiple(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = mul i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ceiling(i32 %0, i32 %1) {
%3 = tail call i32 @multiple(i32 %0, i32 %1)
%4 = mul i32 %3, %1
ret i32 %4
}
void gf8mul_01011001(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm7, %xmm3\n"
                       "\tpxor    %xmm6, %xmm3\n"
                       "\tpxor    %xmm6, %xmm2\n"
                       "\tpxor    %xmm5, %xmm2\n"
                       "\tpxor    %xmm5, %xmm1\n"
                       "\tpxor    %xmm4, %xmm7\n"
                       "\tpxor    %xmm4, %xmm2\n"
                       "\tpxor    %xmm7, %xmm4\n"
                       "\tpxor    %xmm3, %xmm6\n"
                       "\tpxor    %xmm3, %xmm1\n"
                       "\tpxor    %xmm6, %xmm3\n"
                       "\tpxor    %xmm2, %xmm5\n"
                       "\tpxor    %xmm2, %xmm0\n"
                       "\tpxor    %xmm5, %xmm2\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm4\n"
                       "\tpxor    %xmm0, %xmm3\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm3
pxor   %xmm6,%xmm3
pxor   %xmm6,%xmm2
pxor   %xmm5,%xmm2
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm2
pxor   %xmm7,%xmm4
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm1
pxor   %xmm6,%xmm3
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm0
pxor   %xmm5,%xmm2
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm4
pxor   %xmm7,%xmm3
pxor   %xmm6,%xmm3
pxor   %xmm6,%xmm2
pxor   %xmm5,%xmm2
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm2
pxor   %xmm7,%xmm4
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm1
pxor   %xmm6,%xmm3
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm0
pxor   %xmm5,%xmm2
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
ret

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

LLVM IR (-O2):
define void @gf8mul_01011001() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm4\0A\09pxor %xmm7, %xmm3\0A\09pxor %xmm6, %xmm3\0A\09pxor %xmm6, %xmm2\0A\09pxor %xmm5, %xmm2\0A\09pxor %xmm5, %xmm1\0A\09pxor %xmm4, %xmm7\0A\09pxor %xmm4, %xmm2\0A\09pxor %xmm7, %xmm4\0A\09pxor %xmm3, %xmm6\0A\09pxor %xmm3, %xmm1\0A\09pxor %xmm6, %xmm3\0A\09pxor %xmm2, %xmm5\0A\09pxor %xmm2, %xmm0\0A\09pxor %xmm5, %xmm2\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm4\0A\09pxor %xmm0, %xmm3\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_signals_feel();
int /*<<< orphan*/ start_daemon();
int /*<<< orphan*/ start_server();
int main() {
  set_signals_feel();
  start_daemon();
  start_server();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @set_signals_feel()
%2 = tail call i32 (...) @start_daemon()
%3 = tail call i32 (...) @start_server()
ret i32 0
}
void SNDWavUnMuteAudio() {}


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

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

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

LLVM IR (-O2):
define void @SNDWavUnMuteAudio() {
ret void
}
long long summation(long long to) { return to * (to + 1) / 2; }


x86 assembly (clang, -O0):
<summation>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<summation>:
lea    0x1(%rdi),%rcx
imul   %rdi,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
add    %rcx,%rax
sar    %rax
ret

LLVM IR (-O0):
define i64 @summation(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = add nsw i64 %4, 1
%6 = mul nsw i64 %3, %5
%7 = sdiv i64 %6, 2
ret i64 %7
}

LLVM IR (-O2):
define i64 @summation(i64 %0) {
%2 = add nsw i64 %0, 1
%3 = mul nsw i64 %2, %0
%4 = sdiv i64 %3, 2
ret i64 %4
}
void dialog_unset() {}


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

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

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

LLVM IR (-O2):
define void @dialog_unset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ceilf(int);
int logf(float);
scalar_t__ powf(float, int /*<<< orphan*/);
unsigned int mlNextTwoPower(float x) {
  return (unsigned int)powf(2.0f, ceilf(logf(x) / logf(2.0f)));
}


x86 assembly (clang, -O0):
<mlNextTwoPower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <logf@plt>
mov    %eax,-0x8(%rbp)
movss  0xeae(%rip),%xmm0
call   1030 <logf@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <ceilf@plt>
mov    %eax,%edi
movss  0xe90(%rip),%xmm0
call   1040 <powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlNextTwoPower>:
push   %rbx
call   1030 <logf@plt>
mov    %eax,%ebx
movss  0xec0(%rip),%xmm0
call   1030 <logf@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1050 <ceilf@plt>
movss  0xea5(%rip),%xmm0
mov    %eax,%edi
pop    %rbx
jmp    1040 <powf@plt>

LLVM IR (-O0):
define i32 @mlNextTwoPower(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @logf(float %3)
%5 = call i32 @logf(float 2.000000e+00)
%6 = sdiv i32 %4, %5
%7 = call i32 @ceilf(i32 %6)
%8 = call i64 @powf(float 2.000000e+00, i32 %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @mlNextTwoPower(float %0) {
%2 = tail call i32 @logf(float %0)
%3 = tail call i32 @logf(float 2.000000e+00)
%4 = sdiv i32 %2, %3
%5 = tail call i32 @ceilf(i32 %4)
%6 = tail call i64 @powf(float 2.000000e+00, i32 %5)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int LOG_DAEMON;
int LOG_ERR;
int /*<<< orphan*/ open_log_file();
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ syslog(int, char *, char const *);
void log_error(const char *msg) {
  open_log_file();
  perror(msg);
  syslog(LOG_DAEMON | LOG_ERR, "%s : %m", msg);
}


x86 assembly (clang, -O0):
<log_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <open_log_file@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
mov    0x2e74(%rip),%rax
or     (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe97(%rip),%rsi
call   1030 <syslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <open_log_file@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e9e(%rip),%rax
mov    0x2e7f(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <syslog@plt>

LLVM IR (-O0):
@LOG_DAEMON = global i32 0
@LOG_ERR = global i32 0
@.str = [8 x i8] c"%s : %m\00"
define void @log_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @open_log_file()
%4 = load i8*, i8** %2
%5 = call i32 @perror(i8* %4)
%6 = load i32, i32* @LOG_DAEMON
%7 = load i32, i32* @LOG_ERR
%8 = or i32 %6, %7
%9 = load i8*, i8** %2
%10 = call i32 @syslog(i32 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@LOG_DAEMON = global i32 0
@LOG_ERR = global i32 0
@.str = [8 x i8] c"%s : %m\00"
define void @log_error(i8* %0) {
%2 = tail call i32 (...) @open_log_file()
%3 = tail call i32 @perror(i8* %0)
%4 = load i32, i32* @LOG_DAEMON
%5 = load i32, i32* @LOG_ERR
%6 = or i32 %5, %4
%7 = tail call i32 @syslog(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mcfioC_InfoEventInt(int, int, int *);
void mcfio_infoeventint_(int *Event, int *key, int *values) {
  mcfioC_InfoEventInt(*Event, *key, values);
}


x86 assembly (clang, -O0):
<mcfio_infoeventint_>:
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),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
call   1030 <mcfioC_InfoEventInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcfio_infoeventint_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <mcfioC_InfoEventInt@plt>

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

LLVM IR (-O2):
define void @mcfio_infoeventint_(i32* nocapture %0, i32* nocapture %1, i32* %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @mcfioC_InfoEventInt(i32 %4, i32 %5, i32* %2)
ret void
}