xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int recover(int res1, int res2) {
  if (res2 == 0)
    return res1;
  if (res1 == 0)
    return res2;
  fprintf(stderr, "skinny_mutex: got error %d while recovering from %d\n", res2,
          res1);
  abort();
}


x86 assembly (clang, -O0):
<recover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1143 <recover+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <recover+0x5a>
cmpl   $0x0,-0x8(%rbp)
jne    1158 <recover+0x38>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117a <recover+0x5a>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe92(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recover>:
mov    %edi,%eax
test   %esi,%esi
je     112e <recover+0xe>
mov    %esi,%edx
test   %eax,%eax
jne    112f <recover+0xf>
mov    %edx,%eax
ret
push   %rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
lea    0xec0(%rip),%rsi
mov    %eax,%ecx
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"skinny_mutex: got error %d while recovering from %d\0A\00"
define i32 @recover(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %21
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %5
store i32 %14, i32* %3
br label %21
15: ; preds = %10
%16 = load i32, i32* @stderr
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %13, %8
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"skinny_mutex: got error %d while recovering from %d\0A\00"
define i32 @recover(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i32 %0, 0
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %4, %2
%11 = phi i32 [ %0, %2 ], [ %1, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void uDMAChannelRequest(uint32_t ui32ChannelNum) {
  ;
  (*((volatile uint32_t *)(0x400FF014))) = 1 << (ui32ChannelNum & 0x1f);
}


x86 assembly (clang, -O0):
<uDMAChannelRequest>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    $0x400ff014,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelRequest>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,0x400ff014
ret

LLVM IR (-O0):
define void @uDMAChannelRequest(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
%5 = shl i32 1, %4
store volatile i32 %5, i32* inttoptr (i64 1074786324 to i32*)
ret void
}

LLVM IR (-O2):
define void @uDMAChannelRequest(i32 %0) {
%2 = and i32 %0, 31
%3 = shl nuw i32 1, %2
store volatile i32 %3, i32* inttoptr (i64 1074786324 to i32*)
ret void
}
void _Unwind_GetLanguageSpecificData() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
struct timeval get_now() {
  struct timeval t;
  gettimeofday(&t, NULL);
  return t;
}


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

x86 assembly (clang, -O2):
<get_now>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @get_now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @get_now() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ BusyWaitCounterC__0__Counter__overflow();
void Msp430CounterC__1__Counter__overflow(void) {
  BusyWaitCounterC__0__Counter__overflow();
}


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

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

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

LLVM IR (-O2):
define void @Msp430CounterC__1__Counter__overflow() {
%1 = tail call i32 (...) @BusyWaitCounterC__0__Counter__overflow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func3(void) { printf("Hello from func3!\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Hello from func3!\00"
define void @func3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ansimore(char *, int);
int /*<<< orphan*/ clear();
void show_help(char *fname) {
  ansimore(fname, (1));
  clear();
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <ansimore@plt>
mov    $0x0,%al
call   1040 <clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rax
mov    $0x1,%esi
call   1030 <ansimore@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <clear@plt>

LLVM IR (-O0):
define void @show_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ansimore(i8* %3, i32 1)
%5 = call i32 (...) @clear()
ret void
}

LLVM IR (-O2):
define void @show_help(i8* %0) {
%2 = tail call i32 @ansimore(i8* %0, i32 1)
%3 = tail call i32 (...) @clear()
ret void
}
int _dos_setftime(int fd, unsigned date, unsigned time) {
  unsigned int ret, carry;
  asm volatile("int $0x21; sbb %0, %0"
               : "=r"(carry), "=a"(ret)
               : "a"(0x5701), "b"(fd), "c"(time), "d"(date));
  return carry ? ret : 0;
}


x86 assembly (clang, -O0):
<_dos_setftime>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
mov    $0x5701,%eax
int    $0x21
sbb    %ecx,%ecx
mov    %ecx,-0x1c(%rbp)
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     113b <_dos_setftime+0x3b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1145 <_dos_setftime+0x45>
xor    %eax,%eax
mov    %eax,-0x20(%rbp)
jmp    1145 <_dos_setftime+0x45>
mov    -0x20(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dos_setftime>:
push   %rbx
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%ebx
mov    $0x5701,%eax
int    $0x21
sbb    %ecx,%ecx
test   %ecx,%ecx
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_dos_setftime(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %6
%11 = load i32, i32* %5
%12 = call { i32, i32 } asm sideeffect "int $$0x21; sbb $0, $0", "=r,={ax},{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 22273, i32 %9, i32 %10, i32 %11)
%13 = extractvalue { i32, i32 } %12, 0
%14 = extractvalue { i32, i32 } %12, 1
store i32 %13, i32* %8
store i32 %14, i32* %7
%15 = load i32, i32* %8
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %3
%18 = load i32, i32* %7
br label %20
19: ; preds = %3
br label %20
20: ; preds = %19, %17
%21 = phi i32 [ %18, %17 ], [ 0, %19 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @_dos_setftime(i32 %0, i32 %1, i32 %2) {
%4 = tail call { i32, i32 } asm sideeffect "int $$0x21; sbb $0, $0", "=r,={ax},{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 22273, i32 %0, i32 %2, i32 %1)
%5 = extractvalue { i32, i32 } %4, 0
%6 = extractvalue { i32, i32 } %4, 1
%7 = icmp eq i32 %5, 0
%8 = select i1 %7, i32 0, i32 %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, int, int);
void merror(char *filename, int buf_size) {
  printf("%s is too large, %d floats. Max size is %d\n", filename, buf_size,
         262144);
  exit(-1);
}


x86 assembly (clang, -O0):
<merror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rdi
mov    $0x40000,%ecx
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<merror>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
mov    $0x40000,%ecx
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"%s is too large, %d floats. Max size is %d\0A\00"
define void @merror(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6, i32 262144)
%8 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [44 x i8] c"%s is too large, %d floats. Max size is %d\0A\00"
define void @merror(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 262144)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
unsigned long PoolSize(void *);
unsigned long ActualPoolSize(void *theEnv) { return (PoolSize(theEnv)); }


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

x86 assembly (clang, -O2):
<ActualPoolSize>:
jmp    1030 <PoolSize@plt>

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

LLVM IR (-O2):
define i64 @ActualPoolSize(i8* %0) {
%2 = tail call i64 @PoolSize(i8* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void kiss_fft_free(void *mem) { free(mem); }


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

x86 assembly (clang, -O2):
<kiss_fft_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @kiss_fft_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int GetCroppedMapIndex(int width, int height, int x, int y) {
  if (x < 0)
    x = 0;
  else if (x >= width)
    x = width - 1;
  if (y < 0)
    y = 0;
  else if (y >= height)
    y = height - 1;
  return y * width + x;
}


x86 assembly (clang, -O0):
<GetCroppedMapIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1126 <GetCroppedMapIndex+0x26>
movl   $0x0,-0xc(%rbp)
jmp    1140 <GetCroppedMapIndex+0x40>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     113b <GetCroppedMapIndex+0x3b>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1140 <GetCroppedMapIndex+0x40>
cmpl   $0x0,-0x10(%rbp)
jge    1156 <GetCroppedMapIndex+0x56>
movl   $0x0,-0x10(%rbp)
jmp    1170 <GetCroppedMapIndex+0x70>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     116b <GetCroppedMapIndex+0x6b>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1170 <GetCroppedMapIndex+0x70>
mov    -0x10(%rbp),%eax
imul   -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCroppedMapIndex>:
lea    -0x1(%rdi),%r8d
cmp    %edi,%edx
cmovl  %edx,%r8d
xor    %r9d,%r9d
test   %edx,%edx
cmovs  %r9d,%r8d
lea    -0x1(%rsi),%eax
cmp    %esi,%ecx
cmovl  %ecx,%eax
test   %ecx,%ecx
cmovs  %r9d,%eax
imul   %edi,%eax
add    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @GetCroppedMapIndex(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* %7
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %4
store i32 0, i32* %7
br label %20
12: ; preds = %4
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp sge i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %5
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %7
br label %19
19: ; preds = %16, %12
br label %20
20: ; preds = %19, %11
%21 = load i32, i32* %8
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 0, i32* %8
br label %32
24: ; preds = %20
%25 = load i32, i32* %8
%26 = load i32, i32* %6
%27 = icmp sge i32 %25, %26
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = load i32, i32* %6
%30 = sub nsw i32 %29, 1
store i32 %30, i32* %8
br label %31
31: ; preds = %28, %24
br label %32
32: ; preds = %31, %23
%33 = load i32, i32* %8
%34 = load i32, i32* %5
%35 = mul nsw i32 %33, %34
%36 = load i32, i32* %7
%37 = add nsw i32 %35, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @GetCroppedMapIndex(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %2, 0
%6 = icmp slt i32 %2, %0
%7 = add nsw i32 %0, -1
%8 = select i1 %6, i32 %2, i32 %7
%9 = select i1 %5, i32 0, i32 %8
%10 = icmp slt i32 %3, 0
%11 = icmp slt i32 %3, %1
%12 = add nsw i32 %1, -1
%13 = select i1 %11, i32 %3, i32 %12
%14 = select i1 %10, i32 0, i32 %13
%15 = mul nsw i32 %14, %0
%16 = add nsw i32 %15, %9
ret i32 %16
}
/* Variables and functions */
int ashr_i8(int, int);
int fail_real(int /*<<< orphan*/, int);
int test_ashr(void) {
  if (ashr_i8(0xfe, 1) != -1)
    return fail_real(0, 459);
  if (ashr_i8(0x7e, 1) != 0x3f)
    return fail_real(0, 461);
  return 0x10000;
}


x86 assembly (clang, -O0):
<test_ashr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfe,%edi
mov    $0x1,%esi
call   1030 <ashr_i8@plt>
cmp    $0xffffffff,%eax
je     1154 <test_ashr+0x34>
xor    %edi,%edi
mov    $0x1cb,%esi
call   1040 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1187 <test_ashr+0x67>
mov    $0x7e,%edi
mov    $0x1,%esi
call   1030 <ashr_i8@plt>
cmp    $0x3f,%eax
je     1180 <test_ashr+0x60>
xor    %edi,%edi
mov    $0x1cd,%esi
call   1040 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    1187 <test_ashr+0x67>
movl   $0x10000,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ashr>:
push   %rax
mov    $0xfe,%edi
mov    $0x1,%esi
call   1030 <ashr_i8@plt>
mov    $0x1cb,%esi
cmp    $0xffffffff,%eax
jne    115a <test_ashr+0x3a>
mov    $0x7e,%edi
mov    $0x1,%esi
call   1030 <ashr_i8@plt>
mov    $0x1cd,%esi
cmp    $0x3f,%eax
jne    115a <test_ashr+0x3a>
mov    $0x10000,%eax
pop    %rcx
ret
xor    %edi,%edi
pop    %rax
jmp    1040 <fail_real@plt>

LLVM IR (-O0):
define i32 @test_ashr() {
%1 = alloca i32
%2 = call i32 @ashr_i8(i32 254, i32 1)
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fail_real(i32 0, i32 459)
store i32 %5, i32* %1
br label %12
6: ; preds = %0
%7 = call i32 @ashr_i8(i32 126, i32 1)
%8 = icmp ne i32 %7, 63
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @fail_real(i32 0, i32 461)
store i32 %10, i32* %1
br label %12
11: ; preds = %6
store i32 65536, i32* %1
br label %12
12: ; preds = %11, %9, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @test_ashr() {
%1 = tail call i32 @ashr_i8(i32 254, i32 1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @ashr_i8(i32 126, i32 1)
%5 = icmp eq i32 %4, 63
br i1 %5, label %9, label %6
6: ; preds = %3, %0
%7 = phi i32 [ 459, %0 ], [ 461, %3 ]
%8 = tail call i32 @fail_real(i32 0, i32 %7)
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ 65536, %3 ], [ %8, %6 ]
ret i32 %10
}
/* Type definitions */
struct termios {
  int dummy;
};
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
int /*<<< orphan*/ cfsetispeed(struct termios *, int /*<<< orphan*/);
int /*<<< orphan*/ cfsetospeed(struct termios *, int /*<<< orphan*/);
int cfsetspeed(struct termios *tt, speed_t baud) {
  cfsetispeed(tt, baud);
  cfsetospeed(tt, baud);
  return 0;
}


x86 assembly (clang, -O0):
<cfsetspeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <cfsetispeed@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <cfsetospeed@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfsetspeed>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <cfsetispeed@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <cfsetospeed@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @cfsetspeed(%struct.termios* %0, i32 %1) {
%3 = alloca %struct.termios*
%4 = alloca i32
store %struct.termios* %0, %struct.termios** %3
store i32 %1, i32* %4
%5 = load %struct.termios*, %struct.termios** %3
%6 = load i32, i32* %4
%7 = call i32 @cfsetispeed(%struct.termios* %5, i32 %6)
%8 = load %struct.termios*, %struct.termios** %3
%9 = load i32, i32* %4
%10 = call i32 @cfsetospeed(%struct.termios* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @cfsetspeed(%struct.termios* %0, i32 %1) {
%3 = tail call i32 @cfsetispeed(%struct.termios* %0, i32 %1)
%4 = tail call i32 @cfsetospeed(%struct.termios* %0, i32 %1)
ret i32 0
}
const char *skip_spaces(const char *s) {
  if (*s == ' ')
    goto skip_em;
  if (*s == '\t')
    goto skip_em;
  return s;
skip_em:
  do {
    ++s;
  } while (*s == ' ' || *s == '\t');
  return s;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    111d <skip_spaces+0x1d>
jmp    113f <skip_spaces+0x3f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1132 <skip_spaces+0x32>
jmp    113f <skip_spaces+0x3f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <skip_spaces+0x88>
jmp    1144 <skip_spaces+0x44>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1175 <skip_spaces+0x75>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1144 <skip_spaces+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
mov    %rdi,%rax
mov    (%rdi),%cl
jmp    1117 <skip_spaces+0x17>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skip_spaces+0x10>
cmp    $0x9,%cl
je     1110 <skip_spaces+0x10>
ret

LLVM IR (-O0):
define i8* @skip_spaces(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %8, label %9
8: ; preds = %1
br label %17
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 9
br i1 %13, label %14, label %15
14: ; preds = %9
br label %17
15: ; preds = %9
%16 = load i8*, i8** %3
store i8* %16, i8** %2
br label %35
17: ; preds = %14, %8
br label %18
18: ; preds = %31, %17
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %21
21: ; preds = %18
%22 = load i8*, i8** %3
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 32
br i1 %25, label %31, label %26
26: ; preds = %21
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 9
br label %31
31: ; preds = %26, %21
%32 = phi i1 [ true, %21 ], [ %30, %26 ]
br i1 %32, label %18, label %33
33: ; preds = %31
%34 = load i8*, i8** %3
store i8* %34, i8** %2
br label %35
35: ; preds = %33, %15
%36 = load i8*, i8** %2
ret i8* %36
}

LLVM IR (-O2):
define i8* @skip_spaces(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %9 [
i8 32, label %3
i8 9, label %3
]
3: ; preds = %1, %1
br label %4
4: ; preds = %8, %3
%5 = phi i8* [ %0, %3 ], [ %6, %8 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
switch i8 %7, label %9 [
i8 32, label %8
i8 9, label %8
]
8: ; preds = %4, %4
br label %4
9: ; preds = %4, %1
%10 = phi i8* [ %0, %1 ], [ %6, %4 ]
ret i8* %10
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16l4(uint16_t x) { return (x << 4) | (x >> 12); }


x86 assembly (clang, -O0):
<rot16l4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
mov    -0x4(%rbp),%ecx
sar    $0xc,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16l4>:
mov    %edi,%eax
shl    $0x4,%eax
sar    $0xc,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot16l4(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 4
%5 = load i32, i32* %2
%6 = ashr i32 %5, 12
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16l4(i32 %0) {
%2 = shl i32 %0, 4
%3 = ashr i32 %0, 12
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ enable_servos();
int /*<<< orphan*/ set_each_analog_state(int, int, int, int, int /*<<< orphan*/,
                                         int /*<<< orphan*/, int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void wake() {
  set_each_analog_state(1, 1, 1, 1, 0, 0, 0, 0);
  sleep(1);
  enable_servos();
}


x86 assembly (clang, -O0):
<wake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%ecx
xor    %r9d,%r9d
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <set_each_analog_state@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x0,%al
call   1030 <enable_servos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wake>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1040 <set_each_analog_state@plt>
add    $0x10,%rsp
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <enable_servos@plt>

LLVM IR (-O0):
define void @wake() {
%1 = call i32 @set_each_analog_state(i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0)
%2 = call i32 @sleep(i32 1)
%3 = call i32 (...) @enable_servos()
ret void
}

LLVM IR (-O2):
define void @wake() {
%1 = tail call i32 @set_each_analog_state(i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0)
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 (...) @enable_servos()
ret void
}
int fcmp(const void *a, const void *b) {
  if (*(double *)a < *(double *)b)
    return -1;
  else if (*(double *)a > *(double *)b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<fcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1132 <fcmp+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <fcmp+0x60>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1154 <fcmp+0x54>
movl   $0x1,-0x4(%rbp)
jmp    1160 <fcmp+0x60>
jmp    1159 <fcmp+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
%12 = fcmp olt double %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %25
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fcmp ogt double %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %25
23: ; preds = %14
br label %24
24: ; preds = %23
store i32 0, i32* %3
br label %25
25: ; preds = %24, %22, %13
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @fcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void *test_anti_range_56(unsigned long n) {
  extern void *alloc_anti_range_56(unsigned long)
      __attribute__((alloc_size(1)));
  if ((0x7fffffffffffffffL * 2LU + 1) - 1 <= n &&
      n <= (0x7fffffffffffffffL * 2LU + 1) - 1)
    n = (0x7fffffffffffffffL * 2LU + 1) - 1 - 1;
  return alloc_anti_range_56(n);
}


x86 assembly (clang, -O0):
<test_anti_range_56>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xfffffffffffffffe,%rax
cmp    -0x8(%rbp),%rax
ja     1140 <test_anti_range_56+0x30>
cmpq   $0xfffffffffffffffe,-0x8(%rbp)
ja     1140 <test_anti_range_56+0x30>
movq   $0xfffffffffffffffd,-0x8(%rbp)
ff
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_56@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_56>:
cmp    $0xfffffffffffffffe,%rdi
mov    $0xfffffffffffffffd,%rax
cmove  %rax,%rdi
jmp    1030 <alloc_anti_range_56@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_56(i64 %0) {
%2 = icmp eq i64 %0, -2
%3 = select i1 %2, i64 -3, i64 %0
%4 = tail call i8* @alloc_anti_range_56(i64 %3)
ret i8* %4
}
/* Variables and functions */
bool nrf51_errata_71(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_71() {
ret i32 0
}
/* Variables and functions */
float pow(int, int);
float juros_compostos(float valor, int tempo, float taxa) {
  float montante = valor * pow((1 + (taxa / 100)), tempo);
  return montante;
}


x86 assembly (clang, -O0):
<juros_compostos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm1
movss  0xec8(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xeb8(%rip),%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
mov    -0x8(%rbp),%esi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<juros_compostos>:
push   %rax
mov    %edi,%esi
movss  %xmm0,0x4(%rsp)
divss  0xedf(%rip),%xmm1
addss  0xedb(%rip),%xmm1
cvttss2si %xmm1,%edi
call   1030 <pow@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @juros_compostos(float %0, i32 %1, float %2) {
%4 = alloca float
%5 = alloca i32
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store i32 %1, i32* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %6
%10 = fdiv float %9, 1.000000e+02
%11 = fadd float 1.000000e+00, %10
%12 = fptosi float %11 to i32
%13 = load i32, i32* %5
%14 = call float @pow(i32 %12, i32 %13)
%15 = fmul float %8, %14
store float %15, float* %7
%16 = load float, float* %7
ret float %16
}

LLVM IR (-O2):
define float @juros_compostos(float %0, i32 %1, float %2) {
%4 = fdiv float %2, 1.000000e+02
%5 = fadd float %4, 1.000000e+00
%6 = fptosi float %5 to i32
%7 = tail call float @pow(i32 %6, i32 %1)
%8 = fmul float %7, %0
ret float %8
}
/* Type definitions */
typedef unsigned int u_int32_t;

/* Variables and functions */
u_int32_t cshift(u_int32_t x, unsigned int n) {
  return (x << n) | (x >> (32 - n));
}


x86 assembly (clang, -O0):
<cshift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cshift>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @cshift(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = lshr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @cshift(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void mill_panic(const char *text) {
  fprintf(stderr, "panic: %s\n", text);
  fflush(stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<mill_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<mill_panic>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"panic: %s\0A\00"
define void @mill_panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"panic: %s\0A\00"
define void @mill_panic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ nrfx_usbd_errata_type_52840();
bool nrfx_usbd_errata_199(void) { return (1 && nrfx_usbd_errata_type_52840()); }


x86 assembly (clang, -O0):
<nrfx_usbd_errata_199>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_199() {
%1 = call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_199() {
%1 = tail call i64 (...) @nrfx_usbd_errata_type_52840()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int fun1345() { return 1345; }


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

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

LLVM IR (-O0):
define i32 @fun1345() {
ret i32 1345
}

LLVM IR (-O2):
define i32 @fun1345() {
ret i32 1345
}
void RTVfsIoStrmWrite(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmWrite() {
ret void
}
/* Variables and functions */
int mkstemp(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ unlink(char *);
int tempfd(void) {
  static int tmpcount;
  int fd;
  char buf[30];
  snprintf(buf, 30, "./test%d.XXXXXXXX", tmpcount++);
  fd = mkstemp(buf);
  if (fd >= 0)
    unlink(buf);
  return fd;
}


x86 assembly (clang, -O0):
<tempfd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    0x2efa(%rip),%ecx
mov    %ecx,%eax
add    $0x1,%eax
mov    %eax,0x2eef(%rip)
mov    $0x1e,%esi
lea    0xea7(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1050 <mkstemp@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     117d <tempfd+0x4d>
lea    -0x30(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempfd>:
push   %rbx
sub    $0x20,%rsp
mov    0x2f01(%rip),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x2ef8(%rip)
lea    0xeb5(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1050 <mkstemp@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1171 <tempfd+0x41>
mov    %rsp,%rdi
call   1030 <unlink@plt>
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@tempfd.tmpcount = internal global i32 0
@.str = [18 x i8] c"./test%d.XXXXXXXX\00"
define i32 @tempfd() {
%1 = alloca i32
%2 = alloca [30 x i8]
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @tempfd.tmpcount
%5 = add nsw i32 %4, 1
store i32 %5, i32* @tempfd.tmpcount
%6 = call i32 @snprintf(i8* %3, i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%8 = call i32 @mkstemp(i8* %7)
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%13 = call i32 @unlink(i8* %12)
br label %14
14: ; preds = %11, %0
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@tempfd.tmpcount = internal unnamed_addr global i32 0
@.str = [18 x i8] c"./test%d.XXXXXXXX\00"
define i32 @tempfd() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @tempfd.tmpcount
%4 = add nsw i32 %3, 1
store i32 %4, i32* @tempfd.tmpcount
%5 = call i32 @snprintf(i8* %2, i32 30, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = call i32 @mkstemp(i8* %2)
%7 = icmp sgt i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @unlink(i8* %2)
br label %10
10: ; preds = %8, %0
ret i32 %6
}
/* Variables and functions */
int isnan(double);
int math___Float_is_nan___impl(double self) { return isnan(self); }


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

x86 assembly (clang, -O2):
<math___Float_is_nan___impl>:
jmp    1030 <isnan@plt>

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

LLVM IR (-O2):
define i32 @math___Float_is_nan___impl(double %0) {
%2 = tail call i32 @isnan(double %0)
ret i32 %2
}
/* Variables and functions */
char getchar();
int findc(void) {
  char c;
  while ((c = getchar()) == ' ' || c == '\n')
    ;
  return (c);
}


x86 assembly (clang, -O0):
<findc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1140 <findc+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1150 <findc+0x40>
jmp    1155 <findc+0x45>
jmp    1118 <findc+0x8>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findc>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
je     1120 <findc+0x10>
cmp    $0x20,%al
je     1120 <findc+0x10>
movsbl %al,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @findc() {
br label %1
1: ; preds = %3, %0
%2 = tail call signext i8 (...) @getchar()
switch i8 %2, label %4 [
i8 32, label %3
i8 10, label %3
]
3: ; preds = %1, %1
br label %1
4: ; preds = %1
%5 = sext i8 %2 to i32
ret i32 %5
}
const char *Filter_Description(void) {
  return "The `Filter` type can be used to filter the results of some "
         "iterable. "
         "Given a callable object `Filter` iterable returns only those items "
         "in "
         "the original iterable for where calling the function returns a "
         "non-`NULL` value.";
}


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

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

LLVM IR (-O0):
@.str = [221 x i8] c"The `Filter` type can be used to filter the results of some iterable. Given a callable object `Filter` iterable returns only those items in the original iterable for where calling the function returns a non-`NULL` value.\00"
define i8* @Filter_Description() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [221 x i8] c"The `Filter` type can be used to filter the results of some iterable. Given a callable object `Filter` iterable returns only those items in the original iterable for where calling the function returns a non-`NULL` value.\00"
define i8* @Filter_Description() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ seteuid(int /*<<< orphan*/);
void elevate_privileges() { (void)seteuid(0); }


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

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

LLVM IR (-O0):
define void @elevate_privileges() {
%1 = call i32 @seteuid(i32 0)
ret void
}

LLVM IR (-O2):
define void @elevate_privileges() {
%1 = tail call i32 @seteuid(i32 0)
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t GPIO_readMultiDio(uint32_t dioMask) {
  ;
  return ((*((volatile unsigned long *)(0x40022000 + 0x000000C0))) & dioMask);
}


x86 assembly (clang, -O0):
<GPIO_readMultiDio>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x400220c0,%eax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIO_readMultiDio>:
mov    %rdi,-0x8(%rsp)
mov    0x400220c0,%rax
40
and    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @GPIO_readMultiDio(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073881280 to i64*)
%4 = load volatile i64, i64* %2
%5 = and i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @GPIO_readMultiDio(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* inttoptr (i64 1073881280 to i64*)
%4 = load volatile i64, i64* %2
%5 = and i64 %4, %3
ret i64 %5
}
void av_opt_set_from_string() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_set_from_string() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void success(void *value, int size) { printf("Success!\n"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"Success!\0A\00"
define void @success(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"Success!\00"
define void @success(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ S_ISLNK(unsigned int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ munmap(char *, unsigned int);
void do_munmap(char *start, unsigned int size, unsigned int mode) {
  if (S_ISLNK(mode))
    free(start);
  else
    munmap(start, size);
}


x86 assembly (clang, -O0):
<do_munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <S_ISLNK@plt>
cmp    $0x0,%rax
je     1162 <do_munmap+0x32>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
jmp    116e <do_munmap+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <munmap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_munmap>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %edx,%edi
call   1040 <S_ISLNK@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1152 <do_munmap+0x22>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <munmap@plt>

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

LLVM IR (-O2):
define void @do_munmap(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @S_ISLNK(i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(i8* %0)
br label %10
8: ; preds = %3
%9 = tail call i32 @munmap(i8* %0, i32 %1)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Say(char *, int);
void talk(void) { Say("A big sack.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <Say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <Say@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"A big sack.\00"
define void @talk() {
%1 = tail call i32 @Say(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ treset();
void panic(const char *m) {
  treset();
  fprintf(stderr, "Panic: %s\n", m);
  exit(1);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <treset@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <treset@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Panic: %s\0A\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @treset()
%4 = load i32, i32* @stderr
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Panic: %s\0A\00"
define void @panic(i8* %0) {
%2 = tail call i32 (...) @treset()
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}