xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void paddingMessage(uint32_t *message, uint32_t remainingLength) {
  int last = remainingLength / 32;
  message[last] |= 0x00000001U << (31 - (remainingLength % 32));
}


x86 assembly (clang, -O0):
<paddingMessage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    $0x1f,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<paddingMessage>:
mov    %esi,%ecx
lea    0x1f(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x5,%eax
mov    $0x80000000,%edx
shr    %cl,%edx
cltq
or     %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @paddingMessage(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 32
store i32 %7, i32* %5
%8 = load i32, i32* %4
%9 = srem i32 %8, 32
%10 = sub nsw i32 31, %9
%11 = shl i32 1, %10
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = or i32 %16, %11
store i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @paddingMessage(i32* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 32
%4 = and i32 %1, 31
%5 = lshr i32 -2147483648, %4
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %5
store i32 %9, i32* %7
ret void
}
void delayacct_clear_flag(int flag) {}


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

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

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

LLVM IR (-O2):
define void @delayacct_clear_flag(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Lcd_Out(int, int, char *);
void LCD_inputs_reset() {
  Lcd_Out(1, 4, "     ");
  Lcd_Out(2, 4, "     ");
}


x86 assembly (clang, -O0):
<LCD_inputs_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x4,%esi
lea    0xedb(%rip),%rdx
call   1030 <Lcd_Out@plt>
mov    $0x2,%edi
mov    $0x4,%esi
lea    0xec5(%rip),%rdx
call   1030 <Lcd_Out@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_inputs_reset>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0x1,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <Lcd_Out@plt>
mov    $0x2,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <Lcd_Out@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" \00"
define void @LCD_inputs_reset() {
%1 = call i32 @Lcd_Out(i32 1, i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Lcd_Out(i32 2, i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" \00"
define void @LCD_inputs_reset() {
%1 = tail call i32 @Lcd_Out(i32 1, i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Lcd_Out(i32 2, i32 4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct writer {
  int dummy;
};

/* Variables and functions */
scalar_t__ strlen(char const *);
int /*<<< orphan*/ writer_append_data(struct writer *, char const *,
                                      scalar_t__);
void writer_append_str(struct writer *w, const char *str) {
  writer_append_data(w, str, strlen(str) + 1);
}


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

x86 assembly (clang, -O2):
<writer_append_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <writer_append_data@plt>

LLVM IR (-O0):
%struct.writer = type { i32 }
define void @writer_append_str(%struct.writer* %0, i8* %1) {
%3 = alloca %struct.writer*
%4 = alloca i8*
store %struct.writer* %0, %struct.writer** %3
store i8* %1, i8** %4
%5 = load %struct.writer*, %struct.writer** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @writer_append_data(%struct.writer* %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
%struct.writer = type { i32 }
define void @writer_append_str(%struct.writer* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @writer_append_data(%struct.writer* %0, i8* %1, i64 %4)
ret void
}
/* Variables and functions */
int GetValueFromASM();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("Assembly function returned %u\n", GetValueFromASM());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <GetValueFromASM@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Assembly function returned %u\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @GetValueFromASM()
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Assembly function returned %u\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @GetValueFromASM()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int CHECK_PREFIX(unsigned char v) {
  return (v & 0xe7) == 0x26 || (v & 0xfc) == 0x64 || (v & 0xfe) == 0xf2 ||
         v == 0xf0;
}


x86 assembly (clang, -O0):
<CHECK_PREFIX>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
and    $0xe7,%ecx
mov    $0x1,%al
cmp    $0x26,%ecx
mov    %al,-0x2(%rbp)
je     1164 <CHECK_PREFIX+0x64>
movzbl -0x1(%rbp),%ecx
and    $0xfc,%ecx
mov    $0x1,%al
cmp    $0x64,%ecx
mov    %al,-0x2(%rbp)
je     1164 <CHECK_PREFIX+0x64>
movzbl -0x1(%rbp),%ecx
and    $0xfe,%ecx
mov    $0x1,%al
cmp    $0xf2,%ecx
mov    %al,-0x2(%rbp)
je     1164 <CHECK_PREFIX+0x64>
movzbl -0x1(%rbp),%eax
cmp    $0xf0,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CHECK_PREFIX>:
mov    %edi,%eax
and    $0xffffffe7,%eax
cmp    $0x26,%eax
sete   %al
mov    %edi,%ecx
and    $0xfffffffc,%ecx
cmp    $0x64,%ecx
sete   %cl
or     %al,%cl
mov    %edi,%eax
and    $0xfffffffe,%eax
cmp    $0xf2,%eax
sete   %al
cmp    $0xf0,%dil
sete   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @CHECK_PREFIX(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 231
%6 = icmp eq i32 %5, 38
br i1 %6, label %21, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = and i32 %9, 252
%11 = icmp eq i32 %10, 100
br i1 %11, label %21, label %12
12: ; preds = %7
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = and i32 %14, 254
%16 = icmp eq i32 %15, 242
br i1 %16, label %21, label %17
17: ; preds = %12
%18 = load i8, i8* %2
%19 = zext i8 %18 to i32
%20 = icmp eq i32 %19, 240
br label %21
21: ; preds = %17, %12, %7, %1
%22 = phi i1 [ true, %12 ], [ true, %7 ], [ true, %1 ], [ %20, %17 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @CHECK_PREFIX(i8 zeroext %0) {
%2 = zext i8 %0 to i32
%3 = and i32 %2, 231
%4 = icmp eq i32 %3, 38
%5 = and i32 %2, 252
%6 = icmp eq i32 %5, 100
%7 = or i1 %4, %6
%8 = and i32 %2, 254
%9 = icmp eq i32 %8, 242
%10 = or i1 %9, %7
%11 = icmp eq i8 %0, -16
%12 = or i1 %11, %10
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ r_name_validate_char(char const);
const char *findBreakChar(const char *s) {
  while (*s) {
    if (!r_name_validate_char(*s))
      break;
    s++;
  }
  return s;
}


x86 assembly (clang, -O0):
<findBreakChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1154 <findBreakChar+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <r_name_validate_char@plt>
cmp    $0x0,%eax
jne    1143 <findBreakChar+0x33>
jmp    1154 <findBreakChar+0x44>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <findBreakChar+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findBreakChar>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1138 <findBreakChar+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <r_name_validate_char@plt>
test   %eax,%eax
je     1138 <findBreakChar+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <findBreakChar+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @findBreakChar(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @r_name_validate_char(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %9, %4, %1
%14 = phi i8* [ %0, %1 ], [ %6, %4 ], [ %10, %9 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int, int);
void error_number_vertices(int error_number, char *program, int NUM_VERTEX) {
  printf("%s> Error: Too many vertices; max is %d. Increase NUM_VERTEX [e.c. "
         "%d]\n",
         program, NUM_VERTEX, error_number);
  exit(error_number);
}


x86 assembly (clang, -O0):
<error_number_vertices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x4(%rbp),%ecx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_number_vertices>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%ecx
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [72 x i8] c"%s> Error: Too many vertices; max is %d. Increase NUM_VERTEX [e.c. %d]\0A\00"
define void @error_number_vertices(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [72 x i8] c"%s> Error: Too many vertices; max is %d. Increase NUM_VERTEX [e.c. %d]\0A\00"
define void @error_number_vertices(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i32 %0)
%5 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
double sqrt(double);
unsigned long star_gethablow(unsigned int lumval) {
  return sqrt((double)lumval / 100.0) * 0.95 * 150;
}


x86 assembly (clang, -O0):
<star_gethablow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xeb5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<star_gethablow>:
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
divsd  0xee0(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1130 <star_gethablow+0x20>
sqrtsd %xmm0,%xmm0
jmp    1135 <star_gethablow+0x25>
call   1030 <sqrt@plt>
mulsd  0xecb(%rip),%xmm0
mulsd  0xecb(%rip),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xebf(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @star_gethablow(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = uitofp i32 %3 to double
%5 = fdiv double %4, 1.000000e+02
%6 = call double @sqrt(double %5)
%7 = fmul double %6, 0x3FEE666666666666
%8 = fmul double %7, 1.500000e+02
%9 = fptoui double %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @star_gethablow(i32 %0) {
%2 = uitofp i32 %0 to double
%3 = fdiv double %2, 1.000000e+02
%4 = tail call double @sqrt(double %3)
%5 = fmul double %4, 0x3FEE666666666666
%6 = fmul double %5, 1.500000e+02
%7 = fptoui double %6 to i64
ret i64 %7
}
/* Variables and functions */
int abs(int);
void joystickMoved(unsigned int buttonMask, int x, int y, int z) {
  if (abs(x) > 150) {
  }
  if (abs(y) > 150) {
  }
}


x86 assembly (clang, -O0):
<joystickMoved>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
cmp    $0x96,%eax
jle    113c <joystickMoved+0x2c>
jmp    113c <joystickMoved+0x2c>
mov    -0xc(%rbp),%edi
call   1030 <abs@plt>
cmp    $0x96,%eax
jle    1154 <joystickMoved+0x44>
jmp    1154 <joystickMoved+0x44>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @joystickMoved(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = call i32 @abs(i32 %9)
%11 = icmp sgt i32 %10, 150
br i1 %11, label %12, label %13
12: ; preds = %4
br label %13
13: ; preds = %12, %4
%14 = load i32, i32* %7
%15 = call i32 @abs(i32 %14)
%16 = icmp sgt i32 %15, 150
br i1 %16, label %17, label %18
17: ; preds = %13
br label %18
18: ; preds = %17, %13
ret void
}

LLVM IR (-O2):
define void @joystickMoved(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
double fmax(double, double);
void test_fmax(double *__restrict__ r, double *__restrict__ a,
               double *__restrict__ b) {
  int i;
  for (i = 0; i < (16 / sizeof(double)); i++)
    r[i] = fmax(a[i], b[i]);
}


x86 assembly (clang, -O0):
<test_fmax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    $0x2,%rax
jae    1178 <test_fmax+0x78>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
maxsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_fmax+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fmax>:
movupd (%rsi),%xmm0
movupd (%rdx),%xmm1
movapd %xmm1,%xmm2
maxpd  %xmm0,%xmm2
cmpunordpd %xmm0,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movupd %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @test_fmax(double* noalias %0, double* noalias %1, double* noalias %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
store i32 0, i32* %7
br label %8
8: ; preds = %28, %3
%9 = load i32, i32* %7
%10 = sext i32 %9 to i64
%11 = icmp ult i64 %10, 2
br i1 %11, label %12, label %31
12: ; preds = %8
%13 = load double*, double** %5
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %13, i64 %15
%17 = load double, double* %16
%18 = load double*, double** %6
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double, double* %18, i64 %20
%22 = load double, double* %21
%23 = call double @llvm.maxnum.f64(double %17, double %22)
%24 = load double*, double** %4
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double, double* %24, i64 %26
store double %23, double* %27
br label %28
28: ; preds = %12
%29 = load i32, i32* %7
%30 = add nsw i32 %29, 1
store i32 %30, i32* %7
br label %8
31: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @test_fmax(double* noalias nocapture writeonly %0, double* noalias nocapture %1, double* noalias nocapture %2) {
%4 = bitcast double* %1 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = bitcast double* %2 to <2 x double>*
%7 = load <2 x double>, <2 x double>* %6
%8 = call <2 x double> @llvm.maxnum.v2f64(<2 x double> %5, <2 x double> %7)
%9 = bitcast double* %0 to <2 x double>*
store <2 x double> %8, <2 x double>* %9
ret void
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _getopt_(int, char *const *, char const *, struct option const *, int *);
int getopt_long(int argc, char *const argv[], const char *optstring,
                const struct option *longopts, int *longindex) {
  return _getopt_(argc, argv, optstring, longopts, longindex);
}


x86 assembly (clang, -O0):
<getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <_getopt_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long>:
jmp    1030 <_getopt_@plt>

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_getopt_(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Absyn_attribute_cmp(void *, void *);
int Cyc_Absyn_equal_att(void *a1, void *a2) {
  return ({ Cyc_Absyn_attribute_cmp(a1, a2); }) == 0;
}


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

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

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

LLVM IR (-O2):
define i32 @Cyc_Absyn_equal_att(i8* %0, i8* %1) {
%3 = tail call i32 @Cyc_Absyn_attribute_cmp(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ diff(int *, int *, int *, size_t);
void sub(int arr1[], int arr2[], int res[], size_t sz) {
  diff(arr1, arr2, res, sz);
}


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

x86 assembly (clang, -O2):
<sub>:
jmp    1030 <diff@plt>

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

LLVM IR (-O2):
define void @sub(i32* %0, i32* %1, i32* %2, i64 %3) {
%5 = tail call i32 @diff(i32* %0, i32* %1, i32* %2, i64 %3)
ret void
}
char *foo(void) { return "From foo with love"; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"From foo with love\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [19 x i8] c"From foo with love\00"
define i8* @foo() {
ret i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0)
}
int ispath(file) const char *file;
{
  for (; *file; file++) {
    switch (*file) {
    case '.':
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<ispath>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <ispath+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
sub    $0x2e,%al
jne    1134 <ispath+0x34>
jmp    1128 <ispath+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1151 <ispath+0x51>
jmp    1139 <ispath+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <ispath+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispath>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <ispath+0x11>
cmp    $0x2e,%al
je     1114 <ispath+0x14>
add    $0x1,%rdi
jmp    1100 <ispath>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ispath(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 46, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
int nfsd4_is_junction(struct dentry *dentry) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dentry = type opaque
define i32 @nfsd4_is_junction(%struct.dentry* nocapture readnone %0) {
ret i32 0
}
extern __attribute__((gnu_)) int isblank(int __c) {
  return (__c == '\t') || (__c == ' ');
}


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isblank+0x20>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x9,%edi
sete   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void f4(void) {
  char buf[4096 + 512];
  asm volatile("" : : "g"(&buf) : "memory");
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1190,%rsp
lea    -0x1200(%rbp),%rax
mov    %rax,-0x1208(%rbp)
add    $0x1190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
sub    $0x1198,%rsp
lea    -0x70(%rsp),%rax
mov    %rax,-0x78(%rsp)
add    $0x1198,%rsp
ret

LLVM IR (-O0):
define void @f4() {
%1 = alloca [4608 x i8]
ret void
}

LLVM IR (-O2):
define void @f4() {
%1 = alloca [4608 x i8]
%2 = getelementptr inbounds [4608 x i8], [4608 x i8]* %1, i64 0, i64 0
ret void
}
void OCSP_SINGLERESP_free(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_SINGLERESP_free() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int millis();
int /*<<< orphan*/ sendDataHead(int);
int /*<<< orphan*/ serialize16(int);
void sendTime(void) {
  uint32_t seconds = millis() / 1000;
  uint8_t minutes = (seconds / 60) % 60;
  sendDataHead(0x17);
  serialize16(minutes << 8);
  sendDataHead(0x18);
  serialize16(seconds % 60);
}


x86 assembly (clang, -O0):
<sendTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <millis@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    $0x17,%edi
call   1050 <sendDataHead@plt>
mov    -0x8(%rbp),%edi
shl    $0x8,%edi
call   1030 <serialize16@plt>
mov    $0x18,%edi
call   1050 <sendDataHead@plt>
mov    -0x4(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1030 <serialize16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendTime>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <millis@plt>
cltq
imul   $0x10624dd3,%rax,%r14
mov    %r14,%rcx
shr    $0x3f,%rcx
shr    $0x20,%r14
sar    $0x6,%r14d
add    %ecx,%r14d
imul   $0x45e7b273,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0xe,%eax
add    %ecx,%eax
movslq %eax,%rbx
imul   $0xffffffff88888889,%rbx,%rax
shr    $0x20,%rax
add    %ebx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%ebx
mov    $0x17,%edi
call   1050 <sendDataHead@plt>
shl    $0x8,%ebx
mov    %ebx,%edi
call   1030 <serialize16@plt>
mov    $0x18,%edi
call   1050 <sendDataHead@plt>
movslq %r14d,%rdi
imul   $0xffffffff88888889,%rdi,%rax
shr    $0x20,%rax
add    %edi,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <serialize16@plt>

LLVM IR (-O0):
define void @sendTime() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @millis()
%4 = sdiv i32 %3, 1000
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 60
%7 = srem i32 %6, 60
store i32 %7, i32* %2
%8 = call i32 @sendDataHead(i32 23)
%9 = load i32, i32* %2
%10 = shl i32 %9, 8
%11 = call i32 @serialize16(i32 %10)
%12 = call i32 @sendDataHead(i32 24)
%13 = load i32, i32* %1
%14 = srem i32 %13, 60
%15 = call i32 @serialize16(i32 %14)
ret void
}

LLVM IR (-O2):
define void @sendTime() {
%1 = tail call i32 (...) @millis()
%2 = sdiv i32 %1, 1000
%3 = sdiv i32 %1, 60000
%4 = srem i32 %3, 60
%5 = tail call i32 @sendDataHead(i32 23)
%6 = shl nsw i32 %4, 8
%7 = tail call i32 @serialize16(i32 %6)
%8 = tail call i32 @sendDataHead(i32 24)
%9 = srem i32 %2, 60
%10 = tail call i32 @serialize16(i32 %9)
ret void
}
/* Variables and functions */
long shim_enosys(int /*<<< orphan*/, int, unsigned long, unsigned long const *,
                 unsigned long const *);
long shim_migrate_pages(int pid, unsigned long maxnode,
                        const unsigned long *old_nodes,
                        const unsigned long *new_nodes) {
  return shim_enosys(0, pid, maxnode, old_nodes, new_nodes);
}


x86 assembly (clang, -O0):
<shim_migrate_pages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_migrate_pages>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i64 @shim_migrate_pages(i32 %0, i64 %1, i64* %2, i64* %3) {
%5 = alloca i32
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
store i32 %0, i32* %5
store i64 %1, i64* %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = load i32, i32* %5
%10 = load i64, i64* %6
%11 = load i64*, i64** %7
%12 = load i64*, i64** %8
%13 = call i64 @shim_enosys(i32 0, i32 %9, i64 %10, i64* %11, i64* %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @shim_migrate_pages(i32 %0, i64 %1, i64* %2, i64* %3) {
%5 = tail call i64 @shim_enosys(i32 0, i32 %0, i64 %1, i64* %2, i64* %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ delay_us(unsigned long);
void delay_ms(unsigned long mdelay) { delay_us(mdelay * 1000); }


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

x86 assembly (clang, -O2):
<delay_ms>:
imul   $0x3e8,%rdi,%rdi
jmp    1030 <delay_us@plt>

LLVM IR (-O0):
define void @delay_ms(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1000
%5 = call i32 @delay_us(i64 %4)
ret void
}

LLVM IR (-O2):
define void @delay_ms(i64 %0) {
%2 = mul i64 %0, 1000
%3 = tail call i32 @delay_us(i64 %2)
ret void
}
int config_WITH_COOLAPI(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_WITH_COOLAPI() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int triple(int);
int main() {
  int y = triple(3);
  printf("Result of triple(3) is %d\n", y);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1040 <triple@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"Result of triple(3) is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @triple(i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
float __nv_logbf(float);
float logbf(float __a) { return __nv_logbf(__a); }


x86 assembly (clang, -O0):
<logbf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_logbf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbf>:
jmp    1030 <__nv_logbf@plt>

LLVM IR (-O0):
define float @logbf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__nv_logbf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @logbf(float %0) {
%2 = tail call float @__nv_logbf(float %0)
ret float %2
}
int aocHtoi(int c) {
  if (c >= '0' && c <= '9')
    return c - 48;
  if (c >= 'a' && c <= 'f')
    return c - 87;
  if (c >= 'A' && c <= 'F')
    return c - 55;
  return 0;
}


x86 assembly (clang, -O0):
<aocHtoi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <aocHtoi+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <aocHtoi+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <aocHtoi+0x74>
cmpl   $0x61,-0x8(%rbp)
jl     114b <aocHtoi+0x4b>
cmpl   $0x66,-0x8(%rbp)
jg     114b <aocHtoi+0x4b>
mov    -0x8(%rbp),%eax
sub    $0x57,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <aocHtoi+0x74>
cmpl   $0x41,-0x8(%rbp)
jl     116d <aocHtoi+0x6d>
cmpl   $0x46,-0x8(%rbp)
jg     116d <aocHtoi+0x6d>
mov    -0x8(%rbp),%eax
sub    $0x37,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <aocHtoi+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aocHtoi>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1124 <aocHtoi+0x24>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <aocHtoi+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%ecx
add    $0xffffffc9,%edi
xor    %eax,%eax
cmp    $0x6,%ecx
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @aocHtoi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %31
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 87
store i32 %20, i32* %2
br label %31
21: ; preds = %15, %12
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 65
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sle i32 %25, 70
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %3
%29 = sub nsw i32 %28, 55
store i32 %29, i32* %2
br label %31
30: ; preds = %24, %21
store i32 0, i32* %2
br label %31
31: ; preds = %30, %27, %18, %9
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @aocHtoi(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 0
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("./../../../../../Files/55.sh");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"./../../../../../Files/55.sh\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"./../../../../../Files/55.sh\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ parse_command(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strchomp(char *);
scalar_t__ strlen(char *);
void get_command(void) {
  size_t len;
  char *comm = NULL;
  getline(&comm, &len, stdin);
  strchomp(comm);
  if (strlen(comm) > 0)
    parse_command(comm);
  free(comm);
}


x86 assembly (clang, -O0):
<get_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1070 <getline@plt>
mov    -0x10(%rbp),%rdi
call   1040 <strchomp@plt>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jle    119b <get_command+0x4b>
mov    -0x10(%rbp),%rdi
call   1060 <parse_command@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_command>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,(%rsp)
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
call   1070 <getline@plt>
mov    (%rsp),%rdi
call   1040 <strchomp@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
test   %rax,%rax
jle    1199 <get_command+0x49>
mov    %rbx,%rdi
call   1060 <parse_command@plt>
mov    (%rsp),%rbx
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @get_command() {
%1 = alloca i64
%2 = alloca i8*
store i8* null, i8** %2
%3 = load i32, i32* @stdin
%4 = call i32 @getline(i8** %2, i64* %1, i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @strchomp(i8* %5)
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i8*, i8** %2
%12 = call i32 @parse_command(i8* %11)
br label %13
13: ; preds = %10, %0
%14 = load i8*, i8** %2
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @get_command() {
%1 = alloca i64
%2 = alloca i8*
%3 = bitcast i64* %1 to i8*
%4 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%5 = load i32, i32* @stdin
%6 = call i32 @getline(i8** %2, i64* %1, i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @strchomp(i8* %7)
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* dereferenceable(1) %9)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = call i32 @parse_command(i8* %9)
%14 = load i8*, i8** %2
br label %15
15: ; preds = %12, %0
%16 = phi i8* [ %14, %12 ], [ %9, %0 ]
%17 = call i32 @free(i8* %16)
ret void
}
/* Type definitions */
struct utmp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct utmp *getutent(void) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<getutent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getutent>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.utmp = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.utmp* @getutent() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret %struct.utmp* null
}

LLVM IR (-O2):
%struct.utmp = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.utmp* @getutent() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret %struct.utmp* null
}
/* Variables and functions */
int /*<<< orphan*/ printDirInfo(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char *base = ".";
  if (argc >= 2) {
    base = argv[1];
  }
  printf("Directory index from %s\n", base);
  printDirInfo(base);
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printDirInfo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jl     112c <main+0xc>
mov    0x8(%rsi),%rbx
jmp    1133 <main+0x13>
lea    0xecd(%rip),%rbx
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <printDirInfo@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
@.str.1 = [25 x i8] c"Directory index from %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %6
br label %13
13: ; preds = %9, %2
%14 = load i8*, i8** %6
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %6
%17 = call i32 @printDirInfo(i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
@.str.1 = [25 x i8] c"Directory index from %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %2
%8 = phi i8* [ %6, %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %2 ]
%9 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = tail call i32 @printDirInfo(i8* %8)
ret i32 0
}
int test_imm_2Fuint32_reg(unsigned int val) {
  return ((val) & (0x2F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Fuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Fuint32_reg>:
test   $0x2f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Fuint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 47
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_2Fuint32_reg(i32 %0) {
%2 = and i32 %0, 47
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *get_system_family() { return ("linux" == NULL) ? "" : "linux"; }


x86 assembly (clang, -O0):
<get_system_family>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_system_family>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"linux\00"
define i8* @get_system_family() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"linux\00"
define i8* @get_system_family() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ mbrlen(char const *, size_t, int /*<<< orphan*/ *);
void uninitvar_mbrlen(const char *p, size_t m, mbstate_t *s) {
  char *pmb;
  size_t max1, max2;
  mbstate_t *ps1, *ps2;
  (void)mbrlen(pmb, max1, ps1);
  (void)mbrlen(pmb, m, s);
  (void)mbrlen(p, max2, s);
  (void)mbrlen(p, m, ps2);
  (void)mbrlen(p, m, s);
}


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

x86 assembly (clang, -O2):
<uninitvar_mbrlen>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <mbrlen@plt>
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <mbrlen@plt>

LLVM IR (-O0):
define void @uninitvar_mbrlen(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32*
%11 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i32*, i32** %10
%15 = call i32 @mbrlen(i8* %12, i64 %13, i32* %14)
%16 = load i8*, i8** %7
%17 = load i64, i64* %5
%18 = load i32*, i32** %6
%19 = call i32 @mbrlen(i8* %16, i64 %17, i32* %18)
%20 = load i8*, i8** %4
%21 = load i64, i64* %9
%22 = load i32*, i32** %6
%23 = call i32 @mbrlen(i8* %20, i64 %21, i32* %22)
%24 = load i8*, i8** %4
%25 = load i64, i64* %5
%26 = load i32*, i32** %11
%27 = call i32 @mbrlen(i8* %24, i64 %25, i32* %26)
%28 = load i8*, i8** %4
%29 = load i64, i64* %5
%30 = load i32*, i32** %6
%31 = call i32 @mbrlen(i8* %28, i64 %29, i32* %30)
ret void
}

LLVM IR (-O2):
define void @uninitvar_mbrlen(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @mbrlen(i8* undef, i64 undef, i32* undef)
%5 = tail call i32 @mbrlen(i8* undef, i64 %1, i32* %2)
%6 = tail call i32 @mbrlen(i8* %0, i64 undef, i32* %2)
%7 = tail call i32 @mbrlen(i8* %0, i64 %1, i32* undef)
%8 = tail call i32 @mbrlen(i8* %0, i64 %1, i32* %2)
ret void
}