xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DischargeDelay_SaveConfig();
int /*<<< orphan*/ DischargeDelay_Stop();
void DischargeDelay_Sleep(void) {
  DischargeDelay_Stop();
  DischargeDelay_SaveConfig();
}


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

x86 assembly (clang, -O2):
<DischargeDelay_Sleep>:
push   %rax
xor    %eax,%eax
call   1030 <DischargeDelay_Stop@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <DischargeDelay_SaveConfig@plt>

LLVM IR (-O0):
define void @DischargeDelay_Sleep() {
%1 = call i32 (...) @DischargeDelay_Stop()
%2 = call i32 (...) @DischargeDelay_SaveConfig()
ret void
}

LLVM IR (-O2):
define void @DischargeDelay_Sleep() {
%1 = tail call i32 (...) @DischargeDelay_Stop()
%2 = tail call i32 (...) @DischargeDelay_SaveConfig()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
unsigned int get_sector_count(int /*<<< orphan*/ *);
int is_blockaddresed(__u8 *ext_csd) {
  unsigned int sectors = get_sector_count(ext_csd);
  return (sectors > (2u * 1024 * 1024 * 1024) / 512);
}


x86 assembly (clang, -O0):
<is_blockaddresed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_sector_count@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x400000,-0xc(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_blockaddresed>:
push   %rax
call   1030 <get_sector_count@plt>
xor    %ecx,%ecx
cmp    $0x400001,%eax
setae  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_blockaddresed(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @get_sector_count(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ugt i32 %6, 4194304
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_blockaddresed(i32* %0) {
%2 = tail call i32 @get_sector_count(i32* %0)
%3 = icmp ugt i32 %2, 4194304
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ writeCommand(char *);
void controlEnable(void) { writeCommand("CRE"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"CRE\00"
define void @controlEnable() {
%1 = tail call i32 @writeCommand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
extern double putchard(double X) {
  putchar((char)X);
  return 0;
}


x86 assembly (clang, -O0):
<putchard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchard>:
push   %rax
cvttsd2si %xmm0,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
xorpd  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @putchard(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i8
%5 = call i32 @putchar(i8 signext %4)
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @putchard(double %0) {
%2 = fptosi double %0 to i8
%3 = tail call i32 @putchar(i8 signext %2)
ret double 0.000000e+00
}
int test_imm_B6uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xB6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B6uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 182
%5 = icmp ne i64 %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_B6uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 182
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int execute_sigaltstack() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sigaltstack() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *upcase(char *);
int main(void) {
  char str[] = "Nice weather today!";
  printf("str= %s\n", str);
  printf("up = %s\n", upcase(str));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <upcase@plt>
mov    %rax,%rsi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x217961,0x10(%rsp)
lea    0xed5(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <upcase@plt>
lea    0xec4(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [20 x i8] c"Nice weather today!\00"
@.str = [9 x i8] c"str= %s\0A\00"
@.str.1 = [9 x i8] c"up = %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = bitcast [20 x i8]* %1 to i8*
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = call i8* @upcase(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [20 x i8] c"Nice weather today!\00"
@.str = [9 x i8] c"str= %s\0A\00"
@.str.1 = [9 x i8] c"up = %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i8* @upcase(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a_loop(int *, size_t);
void more_than_safety(int *buf, size_t size) {
  a_loop(buf, size);
  buf[size - 1] = 0;
}


x86 assembly (clang, -O0):
<more_than_safety>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <a_loop@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movl   $0x0,(%rax,%rcx,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<more_than_safety>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <a_loop@plt>
movl   $0x0,-0x4(%rbx,%r14,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @more_than_safety(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = call i32 @a_loop(i32* %5, i64 %6)
%8 = load i32*, i32** %3
%9 = load i64, i64* %4
%10 = sub i64 %9, 1
%11 = getelementptr inbounds i32, i32* %8, i64 %10
store i32 0, i32* %11
ret void
}

LLVM IR (-O2):
define void @more_than_safety(i32* %0, i64 %1) {
%3 = tail call i32 @a_loop(i32* %0, i64 %1)
%4 = add i64 %1, -1
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 0, i32* %5
ret void
}
/* Type definitions */
struct tftphdr {
  int dummy;
};

/* Variables and functions */
struct tftphdr *rw_init(int /*<<< orphan*/);
struct tftphdr *w_init() {
  return rw_init(0);
}


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

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

LLVM IR (-O0):
%struct.tftphdr = type { i32 }
define %struct.tftphdr* @w_init() {
%1 = call %struct.tftphdr* @rw_init(i32 0)
ret %struct.tftphdr* %1
}

LLVM IR (-O2):
%struct.tftphdr = type { i32 }
define %struct.tftphdr* @w_init() {
%1 = tail call %struct.tftphdr* @rw_init(i32 0)
ret %struct.tftphdr* %1
}
int compare_rule(const void *a, const void *b) { return *(int *)b - *(int *)a; }


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

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

LLVM IR (-O0):
define i32 @compare_rule(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 i32, i32* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compare_rule(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int test_imm_57uint16_reg(unsigned short val) {
  return ((val) & (0x57 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_57uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x57,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_57uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 87
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned char helper_hash_string(const char *string) {
  unsigned char result;
  for (result = 0; *string; string++)
    result ^= *string;
  return result;
}


x86 assembly (clang, -O0):
<helper_hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <helper_hash_string+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
movzbl -0x9(%rbp),%eax
xor    %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <helper_hash_string+0xc>
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     111e <helper_hash_string+0x1e>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %cl,%al
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <helper_hash_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @helper_hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8 [ %8, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = xor i8 %5, %6
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = phi i8 [ 0, %1 ], [ %8, %4 ]
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ libc_printf(char *, int, unsigned int);
void Assert(unsigned int b, unsigned int line) {
  if (!b) {
    libc_printf((char *)"twoDsim.mod:%d:error assert failed\\n", 36, line);
  }
}


x86 assembly (clang, -O0):
<Assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    113c <Assert+0x2c>
mov    -0x8(%rbp),%edx
lea    0xece(%rip),%rdi
mov    $0x24,%esi
call   1030 <libc_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assert>:
test   %edi,%edi
je     1115 <Assert+0x5>
ret
mov    %esi,%edx
lea    0xee2(%rip),%rdi
mov    $0x24,%esi
jmp    1030 <libc_printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"twoDsim.mod:%d:error assert failed\\n\00"
define void @Assert(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 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @libc_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 36, i32 %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"twoDsim.mod:%d:error assert failed\\n\00"
define void @Assert(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @libc_printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 36, i32 %1)
br label %6
6: ; preds = %4, %2
ret void
}
void g_file_error_quark() {}


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

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

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

LLVM IR (-O2):
define void @g_file_error_quark() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ screen_puts(char *);
int /*<<< orphan*/ timer_sleep(int);
void taskb() {
  while (1) {
    timer_sleep(1100);
    screen_puts("B");
  }
}


x86 assembly (clang, -O0):
<taskb>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <taskb+0x9>
mov    $0x44c,%edi
call   1030 <timer_sleep@plt>
lea    0xec6(%rip),%rdi
call   1040 <screen_puts@plt>
jmp    1129 <taskb+0x9>

x86 assembly (clang, -O2):
<taskb>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x44c,%edi
call   1030 <timer_sleep@plt>
mov    %rbx,%rdi
call   1040 <screen_puts@plt>
jmp    1130 <taskb+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"B\00"
define void @taskb() {
br label %1
1: ; preds = %0, %1
%2 = call i32 @timer_sleep(i32 1100)
%3 = call i32 @screen_puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %1
}

LLVM IR (-O2):
@.str = [2 x i8] c"B\00"
define void @taskb() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @timer_sleep(i32 1100)
%3 = tail call i32 @screen_puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %1
}
__attribute__((no, noclone)) unsigned __int128 t101_3add(unsigned char y) {
  unsigned __int128 r;
  if (__builtin_add_overflow((unsigned char)(5), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t101_3add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
mov    %eax,%ecx
add    $0x5,%rcx
xor    %eax,%eax
mov    %rcx,-0x30(%rbp)
movq   $0x0,-0x28(%rbp)
test   $0x1,%al
jne    1143 <t101_3add+0x33>
jmp    114a <t101_3add+0x3a>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t101_3add>:
mov    %edi,%eax
add    $0x5,%rax
xor    %edx,%edx
ret

LLVM IR (-O0):
define { i64, i64 } @t101_3add(i8 zeroext %0) {
%2 = alloca i128
%3 = alloca i8
%4 = alloca i128
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = zext i8 %5 to i128
%7 = call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 5, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
store i128 %9, i128* %4
br i1 %8, label %10, label %12
10: ; preds = %1
%11 = call i32 (...) @bar()
br label %12
12: ; preds = %10, %1
%13 = load i128, i128* %4
store i128 %13, i128* %2
%14 = bitcast i128* %2 to { i64, i64 }*
%15 = load { i64, i64 }, { i64, i64 }* %14
ret { i64, i64 } %15
}

LLVM IR (-O2):
define { i64, i64 } @t101_3add(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = add nuw nsw i64 %2, 5
%4 = insertvalue { i64, i64 } poison, i64 %3, 0
%5 = insertvalue { i64, i64 } %4, i64 0, 1
ret { i64, i64 } %5
}
void I_ShutdownSound(void) {}


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

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

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

LLVM IR (-O2):
define void @I_ShutdownSound() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ call7f(unsigned char, double, unsigned short, unsigned long,
                          unsigned int, char, int, short, long, float);
void call7e(float f, unsigned char uc, double d, unsigned short us,
            unsigned long ul, unsigned int ui, char c, int i, short s, long l) {
  call7f(uc, d, us, ul, ui, c, i, s, l, f);
}


x86 assembly (clang, -O0):
<call7e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r8b,%al
mov    0x18(%rbp),%r8
mov    0x10(%rbp),%r8w
movss  %xmm0,-0x4(%rbp)
mov    %dil,-0x5(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %si,-0x12(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %al,-0x25(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x5(%rbp),%dil
movsd  -0x10(%rbp),%xmm0
mov    -0x12(%rbp),%si
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x25(%rbp),%r8b
mov    -0x2c(%rbp),%r9d
mov    0x10(%rbp),%r10w
mov    0x18(%rbp),%rax
movss  -0x4(%rbp),%xmm1
movzbl %dil,%edi
movzwl %si,%esi
movsbl %r8b,%r8d
movswl %r10w,%r10d
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <call7f@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call7e>:
movaps %xmm0,%xmm2
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
jmp    1030 <call7f@plt>

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

LLVM IR (-O2):
define void @call7e(float %0, i8 zeroext %1, double %2, i16 zeroext %3, i64 %4, i32 %5, i8 signext %6, i32 %7, i16 signext %8, i64 %9) {
%11 = tail call i32 @call7f(i8 zeroext %1, double %2, i16 zeroext %3, i64 %4, i32 %5, i8 signext %6, i32 %7, i16 signext %8, i64 %9, float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_type(char *);
scalar_t__ strcmp(int /*<<< orphan*/, char *);
int ends_in_cgi(char *f) { return (strcmp(file_type(f), "cgi") == 0); }


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

x86 assembly (clang, -O2):
<ends_in_cgi>:
push   %rax
call   1040 <file_type@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cgi\00"
define i32 @ends_in_cgi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @file_type(i8* %3)
%5 = call i64 @strcmp(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"cgi\00"
define i32 @ends_in_cgi(i8* %0) {
%2 = tail call i32 @file_type(i8* %0)
%3 = tail call i64 @strcmp(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ merge_sort_impl(int *, int *, int, int);
void merge_sort(int *scrambled, int from, int to) {
  int sorter[to - from];
  merge_sort_impl(scrambled, sorter, from, to);
}


x86 assembly (clang, -O0):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    %ecx,%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <merge_sort_impl@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %edx,%ecx
mov    %esi,%edx
mov    %ecx,%eax
sub    %esi,%eax
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rsi
sub    %rax,%rsi
mov    %rsi,%rsp
call   1030 <merge_sort_impl@plt>
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %7
%14 = alloca i32, i64 %12
store i64 %12, i64* %8
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = call i32 @merge_sort_impl(i32* %15, i32* %14, i32 %16, i32 %17)
%19 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @merge_sort(i32* %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = zext i32 %4 to i64
%6 = alloca i32, i64 %5
%7 = call i32 @merge_sort_impl(i32* %0, i32* %6, i32 %1, i32 %2)
ret void
}
/* Type definitions */
struct msqid_ds {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, int, int, struct msqid_ds *);
int msgctl(int q, int cmd, struct msqid_ds *buf) {
  return syscall(117, 14, q, cmd, buf);
}


x86 assembly (clang, -O0):
<msgctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    $0x75,%edi
mov    $0xe,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgctl>:
mov    %rdx,%r8
mov    %esi,%ecx
mov    %edi,%edx
mov    $0x75,%edi
mov    $0xe,%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.msqid_ds = type { i32 }
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.msqid_ds*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.msqid_ds* %2, %struct.msqid_ds** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load %struct.msqid_ds*, %struct.msqid_ds** %6
%10 = call i32 @syscall(i32 117, i32 14, i32 %7, i32 %8, %struct.msqid_ds* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.msqid_ds = type { i32 }
define i32 @msgctl(i32 %0, i32 %1, %struct.msqid_ds* %2) {
%4 = tail call i32 @syscall(i32 117, i32 14, i32 %0, i32 %1, %struct.msqid_ds* %2)
ret i32 %4
}
/* Variables and functions */
bool is_word_aligned(void *p) { return (((uintptr_t)p & 0x03) == 0); }


x86 assembly (clang, -O0):
<is_word_aligned>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_word_aligned>:
xor    %eax,%eax
test   $0x3,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_word_aligned(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, 3
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_word_aligned(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 3
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;
struct hle_t {
  int dummy;
};
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ alist_multQ44(struct hle_t *, int, int, int);
void HILOGAIN(struct hle_t *hle, uint32_t w1, uint32_t w2) {
  int8_t gain = (w1 >> 16);
  uint16_t count = w1 & 0xfff;
  uint16_t dmem = (w2 >> 16);
  alist_multQ44(hle, dmem, count, gain);
}


x86 assembly (clang, -O0):
<HILOGAIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    $0xfff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <alist_multQ44@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HILOGAIN>:
mov    %esi,%eax
mov    %esi,%ecx
sar    $0x10,%ecx
and    $0xfff,%eax
sar    $0x10,%edx
mov    %edx,%esi
mov    %eax,%edx
jmp    1030 <alist_multQ44@plt>

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @HILOGAIN(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store %struct.hle_t* %0, %struct.hle_t** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = ashr i32 %10, 16
store i32 %11, i32* %7
%12 = load i32, i32* %5
%13 = and i32 %12, 4095
store i32 %13, i32* %8
%14 = load i32, i32* %6
%15 = ashr i32 %14, 16
store i32 %15, i32* %9
%16 = load %struct.hle_t*, %struct.hle_t** %4
%17 = load i32, i32* %9
%18 = load i32, i32* %8
%19 = load i32, i32* %7
%20 = call i32 @alist_multQ44(%struct.hle_t* %16, i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @HILOGAIN(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = ashr i32 %1, 16
%5 = and i32 %1, 4095
%6 = ashr i32 %2, 16
%7 = tail call i32 @alist_multQ44(%struct.hle_t* %0, i32 %6, i32 %5, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ sig_block(int /*<<< orphan*/);
void sig_childblock() { sig_block(SIGCHLD); }


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

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

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @sig_childblock() {
%1 = load i32, i32* @SIGCHLD
%2 = call i32 @sig_block(i32 %1)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @sig_childblock() {
%1 = load i32, i32* @SIGCHLD
%2 = tail call i32 @sig_block(i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_ulr(scalar_t__);
uint32_t __stdfix_sadd_ulr(uint32_t x, uint32_t y) {
  return (__stdfix_sat_ulr((uint64_t)x + (uint64_t)y));
}


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

x86 assembly (clang, -O2):
<__stdfix_sadd_ulr>:
add    %rsi,%rdi
jmp    1030 <__stdfix_sat_ulr@plt>

LLVM IR (-O0):
define i64 @__stdfix_sadd_ulr(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = call i64 @__stdfix_sat_ulr(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @__stdfix_sadd_ulr(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call i64 @__stdfix_sat_ulr(i64 %3)
ret i64 %4
}
/* Variables and functions */
double EvalAngCor_alpha0_0plus_0plus_12049_L0(double);
double funcAngCor_alpha0_0plus_0plus_12049_L0(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_alpha0_0plus_0plus_12049_L0(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_alpha0_0plus_0plus_12049_L0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_alpha0_0plus_0plus_12049_L0@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_alpha0_0plus_0plus_12049_L0>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_alpha0_0plus_0plus_12049_L0@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_alpha0_0plus_0plus_12049_L0(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_alpha0_0plus_0plus_12049_L0(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_alpha0_0plus_0plus_12049_L0(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_alpha0_0plus_0plus_12049_L0(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *);
void *WinDivertAlloc(size_t ssize) {
  void *p = malloc(ssize);
  if (p == NULL) {
    printf("WinDivertAlloc() critical error: NO MEMORY!\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<WinDivertAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <WinDivertAlloc+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WinDivertAlloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <WinDivertAlloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"WinDivertAlloc() critical error: NO MEMORY!\0A\00"
define i8* @WinDivertAlloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@str = [44 x i8] c"WinDivertAlloc() critical error: NO MEMORY!\00"
define noalias i8* @WinDivertAlloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
int hvt_dumpcore_supported() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hvt_dumpcore_supported() {
ret i32 0
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *symbol_from_dll(void *dll, const char *symbol) {
  return dlsym(dll, symbol);
}


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

x86 assembly (clang, -O2):
<symbol_from_dll>:
jmp    1030 <dlsym@plt>

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

LLVM IR (-O2):
define i8* @symbol_from_dll(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
void to_uppercase(char *p_src, char *p_dest) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ bitfn_swap32(int /*<<< orphan*/ const);
void store_be32_aligned(uint8_t *dst, const uint32_t v) {
  *((uint32_t *)dst) = bitfn_swap32(v);
}


x86 assembly (clang, -O0):
<store_be32_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <bitfn_swap32@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_be32_aligned>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <bitfn_swap32@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @store_be32_aligned(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @bitfn_swap32(i32 %1)
store i32 %3, i32* %0
ret void
}
void _bfault_default_handler() {
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<_bfault_default_handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <_bfault_default_handler+0x9>
jmp    1109 <_bfault_default_handler+0x9>

x86 assembly (clang, -O2):
<_bfault_default_handler>:
jmp    1100 <_bfault_default_handler>

LLVM IR (-O0):
define void @_bfault_default_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @_bfault_default_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void IO_InitCasablancaSirfY1Y3(void) {}


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

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

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

LLVM IR (-O2):
define void @IO_InitCasablancaSirfY1Y3() {
ret void
}
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
double dist_ps(struct graph const *, long, long);
double sim_dps(const struct graph *g, long x, long y) {
  return (1.0 - dist_ps(g, x, y));
}


x86 assembly (clang, -O0):
<sim_dps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <dist_ps@plt>
movaps %xmm0,%xmm1
movsd  0xec0(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_dps>:
push   %rax
call   1030 <dist_ps@plt>
movsd  0xee2(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.graph = type { i32 }
define double @sim_dps(%struct.graph* %0, i64 %1, i64 %2) {
%4 = alloca %struct.graph*
%5 = alloca i64
%6 = alloca i64
store %struct.graph* %0, %struct.graph** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.graph*, %struct.graph** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call double @dist_ps(%struct.graph* %7, i64 %8, i64 %9)
%11 = fsub double 1.000000e+00, %10
ret double %11
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define double @sim_dps(%struct.graph* %0, i64 %1, i64 %2) {
%4 = tail call double @dist_ps(%struct.graph* %0, i64 %1, i64 %2)
%5 = fsub double 1.000000e+00, %4
ret double %5
}
void CFGMR3QueryUIntDef(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryUIntDef() {
ret void
}
/* Variables and functions */
double floor(double);
double time_convert_minute(double hundredth) {
  double hour;
  double min;
  hour = floor(hundredth);
  min = hundredth - hour;
  min *= 60.0;
  return floor(min);
}


x86 assembly (clang, -O0):
<time_convert_minute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xebd(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_convert_minute>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xed4(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @time_convert_minute(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @llvm.floor.f64(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = load double, double* %3
%9 = fsub double %7, %8
store double %9, double* %4
%10 = load double, double* %4
%11 = fmul double %10, 6.000000e+01
store double %11, double* %4
%12 = load double, double* %4
%13 = call double @llvm.floor.f64(double %12)
ret double %13
}

LLVM IR (-O2):
define double @time_convert_minute(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fsub double %0, %2
%4 = fmul double %3, 6.000000e+01
%5 = tail call double @llvm.floor.f64(double %4)
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_min_pu8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_min_pu8(__m64 a, __m64 b) { return _mm_min_pu8(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_min_pu8>:
jmp    1030 <_mm_min_pu8@plt>

LLVM IR (-O0):
define i32 @test_mm_min_pu8(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 @_mm_min_pu8(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_min_pu8(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_min_pu8(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ checkMath();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int);
int main(int argc, char *argv[]) {
  srand(42);
  for (int i = 1; i < 1000 * 100; i++)
    checkMath();
  printf("Arithmetic okay.\n");
}


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)
mov    $0x2a,%edi
call   1040 <srand@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x186a0,-0x14(%rbp)
jge    1179 <main+0x49>
mov    $0x0,%al
call   1050 <checkMath@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1157 <main+0x27>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2a,%edi
call   1040 <srand@plt>
mov    $0x1869f,%ebx
xor    %eax,%eax
call   1050 <checkMath@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x10>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [17 x i8] c"Arithmetic okay.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @srand(i32 42)
br label %6
4: ; preds = %6
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
6: ; preds = %2, %6
%7 = phi i32 [ 1, %2 ], [ %9, %6 ]
%8 = tail call i32 (...) @checkMath()
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 100000
br i1 %10, label %4, label %6
}
void ff_hevc_put_hevc_bi_epel_v24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_AnimBack(void) { WriteInstruction("call animbk"); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"call animbk\00"
define void @CR_AnimBack() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void sfree(void *ptr) {
  char *original = (char *)ptr - 16;
  size_t size = *(size_t *)original + 16;
  memset(original, 0, size);
  free(original);
}


x86 assembly (clang, -O0):
<sfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfree>:
push   %rbx
mov    %rdi,%rbx
mov    -0x10(%rdi),%rdx
add    $0xfffffffffffffff0,%rbx
add    $0x10,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @sfree(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 -16
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = add i64 %9, 16
store i64 %10, i64* %4
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i32 @memset(i8* %11, i32 0, i64 %12)
%14 = load i8*, i8** %3
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
define void @sfree(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -16
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
%5 = add i64 %4, 16
%6 = tail call i32 @memset(i8* %2, i32 0, i64 %5)
%7 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ sfd_isupper(char const);
char sfd_tolower(const char c) { return (sfd_isupper(c)) ? (c + 32) : c; }


x86 assembly (clang, -O0):
<sfd_tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <sfd_isupper@plt>
cmp    $0x0,%rax
je     1140 <sfd_tolower+0x30>
movsbl -0x1(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <sfd_tolower+0x37>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfd_tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <sfd_isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
movzbl %cl,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @sfd_tolower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @sfd_isupper(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = add nsw i32 %8, 32
br label %13
10: ; preds = %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
%15 = trunc i32 %14 to i8
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @sfd_tolower(i8 signext %0) {
%2 = tail call i64 @sfd_isupper(i8 signext %0)
%3 = icmp eq i64 %2, 0
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %0, i8 %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ setupTimer1RX();
void initializeReceiver() { setupTimer1RX(); }


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

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

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

LLVM IR (-O2):
define void @initializeReceiver() {
%1 = tail call i32 (...) @setupTimer1RX()
ret void
}