xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xe5() {
  Assert_real((isdigit(229) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              1150, ("isdigit should be 0 for 0xe5"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xe5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe5,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x47e,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xe5>:
push   %rax
mov    $0xe5,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x47e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe5\00"
define void @t_isdigit_0xe5() {
%1 = call i64 @isdigit(i32 229)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe5\00"
define void @t_isdigit_0xe5() {
%1 = tail call i64 @isdigit(i32 229)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float test_frexpf(float x, int *y) { return __builtin_frexpf(x, y); }


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

x86 assembly (clang, -O2):
<test_frexpf>:
jmp    1030 <frexpf@plt>

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

LLVM IR (-O2):
define float @test_frexpf(float %0, i32* nocapture %1) {
%3 = tail call float @frexpf(float %0, i32* %1)
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ lb;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char const *, char *);
int /*<<< orphan*/ str_fill(char *, char, int);
void console_h(const char *msg) {
  char lb[80];
  str_fill(lb, '=', sizeof(lb));
  printf("%s\n%s\n%s\n", lb, msg, lb);
}


x86 assembly (clang, -O0):
<console_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x3d,%esi
mov    $0x50,%edx
call   1040 <str_fill@plt>
lea    -0x60(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x60(%rbp),%rcx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_h>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%r14
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3d,%esi
mov    $0x50,%edx
call   1040 <str_fill@plt>
lea    0xeba(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1030 <printf@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s\0A%s\0A%s\0A\00"
define void @console_h(i8* %0) {
%2 = alloca i8*
%3 = alloca [80 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 @str_fill(i8* %4, i8 signext 61, i32 80)
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7, i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s\0A%s\0A%s\0A\00"
define void @console_h(i8* %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%4 = call i32 @str_fill(i8* %3, i8 signext 61, i32 80)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0, i8* %3)
ret void
}
/* Variables and functions */
unsigned long GrMapUTF16_Unicode(char const *, unsigned long, unsigned long *,
                                 int /*<<< orphan*/);
unsigned long GrMapUTF16BE_Unicode(const char *pcSrcChar, unsigned long ulCount,
                                   unsigned long *pulSkip) {
  return (GrMapUTF16_Unicode(pcSrcChar, ulCount, pulSkip, 0));
}


x86 assembly (clang, -O0):
<GrMapUTF16BE_Unicode>:
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
xor    %ecx,%ecx
call   1030 <GrMapUTF16_Unicode@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrMapUTF16BE_Unicode>:
xor    %ecx,%ecx
jmp    1030 <GrMapUTF16_Unicode@plt>

LLVM IR (-O0):
define i64 @GrMapUTF16BE_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64*, i64** %6
%10 = call i64 @GrMapUTF16_Unicode(i8* %7, i64 %8, i64* %9, i32 0)
ret i64 %10
}

LLVM IR (-O2):
define i64 @GrMapUTF16BE_Unicode(i8* %0, i64 %1, i64* %2) {
%4 = tail call i64 @GrMapUTF16_Unicode(i8* %0, i64 %1, i64* %2, i32 0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void local_array_bad_FN() {
  char o[10];
  o[0] = 'a';
  char c = o[1];
  free(o);
}


x86 assembly (clang, -O0):
<local_array_bad_FN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0xa(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xb(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_array_bad_FN>:
sub    $0x18,%rsp
movb   $0x61,0xe(%rsp)
lea    0xe(%rsp),%rdi
call   1030 <free@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @local_array_bad_FN() {
%1 = alloca [10 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 97, i8* %3
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 1
%5 = load i8, i8* %4
store i8 %5, i8* %2
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @local_array_bad_FN() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
store i8 97, i8* %2
%3 = call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ write_string(char *);
void tube_Write0(unsigned int *reg) {
  reg[0] = (unsigned int)write_string((char *)reg[0]);
  ;
}


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

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

LLVM IR (-O0):
define void @tube_Write0(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
%8 = call i64 @write_string(i8* %7)
%9 = trunc i64 %8 to i32
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
ret void
}

LLVM IR (-O2):
define void @tube_Write0(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i64 @write_string(i8* %4)
%6 = trunc i64 %5 to i32
store i32 %6, i32* %0
ret void
}
__attribute__((always_)) void might_fault(void) {
  do {
    do {
    } while (0);
  } while (0);
}


x86 assembly (clang, -O0):
<might_fault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <might_fault+0x9>
jmp    110e <might_fault+0xe>
jmp    1113 <might_fault+0x13>
jmp    1118 <might_fault+0x18>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @might_fault() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @might_fault() {
ret void
}
/* Variables and functions */
float tanf(float);
float r_tan(float *x) { return (tanf(*x)); }


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

x86 assembly (clang, -O2):
<r_tan>:
movss  (%rdi),%xmm0
jmp    1030 <tanf@plt>

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

LLVM IR (-O2):
define float @r_tan(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @tanf(float %2)
ret float %3
}
void clear_bit(int nr, volatile unsigned long *addr) {
  ((addr))[(nr) / (sizeof(unsigned long) * 8)] &=
      ~(1UL << ((nr) % (sizeof(unsigned long) * 8)));
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%esi
shl    %cl,%rsi
xor    $0xffffffffffffffff,%rsi
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rdx
and    %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
movslq %edi,%rcx
mov    $0xfffffffffffffffe,%rax
rol    %cl,%rax
shr    $0x6,%rcx
and    %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @clear_bit(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 = sext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = xor i64 %8, -1
%10 = load i64*, i64** %4
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = udiv i64 %12, 64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load volatile i64, i64* %14
%16 = and i64 %15, %9
store volatile i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @clear_bit(i32 %0, i64* %1) {
%3 = sext i32 %0 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = xor i64 %5, -1
%7 = lshr i64 %3, 6
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load volatile i64, i64* %8
%10 = and i64 %9, %6
store volatile i64 %10, i64* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void analyze_pe(FILE *fp) { printf("In PE\n"); }


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"In PE\00"
define void @analyze_pe(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x78() {
  Assert_real((islower(120)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              605, ("islower should be 1 for x"));
}


x86 assembly (clang, -O0):
<t_islower_0x78>:
push   %rbp
mov    %rsp,%rbp
mov    $0x78,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x25d,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x78>:
push   %rax
mov    $0x78,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x25d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for x\00"
define void @t_islower_0x78() {
%1 = call i32 @islower(i32 120)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for x\00"
define void @t_islower_0x78() {
%1 = tail call i32 @islower(i32 120)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct NpTreeMapIterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct NpTreeMapIterator *);
void np_treemap_iterator_free(struct NpTreeMapIterator *iter) { free(iter); }


x86 assembly (clang, -O0):
<np_treemap_iterator_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):
<np_treemap_iterator_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.NpTreeMapIterator = type { i32 }
define void @np_treemap_iterator_free(%struct.NpTreeMapIterator* %0) {
%2 = alloca %struct.NpTreeMapIterator*
store %struct.NpTreeMapIterator* %0, %struct.NpTreeMapIterator** %2
%3 = load %struct.NpTreeMapIterator*, %struct.NpTreeMapIterator** %2
%4 = call i32 @free(%struct.NpTreeMapIterator* %3)
ret void
}

LLVM IR (-O2):
%struct.NpTreeMapIterator = type { i32 }
define void @np_treemap_iterator_free(%struct.NpTreeMapIterator* nocapture %0) {
%2 = tail call i32 @free(%struct.NpTreeMapIterator* %0)
ret void
}
/* Variables and functions */
double M_PI;
double sin(double);
double Q_u_gradp(double L, double a_px, double p_x, double x) {
  return -M_PI * a_px * p_x * sin(M_PI * a_px * x / L) / L;
}


x86 assembly (clang, -O0):
<Q_u_gradp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    0x2eb5(%rip),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e84(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_u_gradp>:
sub    $0x28,%rsp
movapd %xmm0,%xmm4
movsd  %xmm0,0x8(%rsp)
mov    0x2ec3(%rip),%rax
movsd  (%rax),%xmm0
movapd 0xecf(%rip),%xmm5
xorpd  %xmm0,%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm5
movapd %xmm5,0x10(%rsp)
mulsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm4,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @Q_u_gradp(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* @M_PI
%10 = fneg double %9
%11 = load double, double* %6
%12 = fmul double %10, %11
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = load double, double* @M_PI
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %8
%19 = fmul double %17, %18
%20 = load double, double* %5
%21 = fdiv double %19, %20
%22 = call double @sin(double %21)
%23 = fmul double %14, %22
%24 = load double, double* %5
%25 = fdiv double %23, %24
ret double %25
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @Q_u_gradp(double %0, double %1, double %2, double %3) {
%5 = load double, double* @M_PI
%6 = fneg double %5
%7 = fmul double %6, %1
%8 = fmul double %7, %2
%9 = fmul double %5, %1
%10 = fmul double %9, %3
%11 = fdiv double %10, %0
%12 = tail call double @sin(double %11)
%13 = fmul double %12, %8
%14 = fdiv double %13, %0
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int /*<<< orphan*/ encode_u16le(int /*<<< orphan*/ **, scalar_t__);
void encode_s16le(uint8_t **cursor, int16_t val) {
  encode_u16le(cursor, (int16_t)val);
}


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

x86 assembly (clang, -O2):
<encode_s16le>:
jmp    1030 <encode_u16le@plt>

LLVM IR (-O0):
define void @encode_s16le(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 @encode_u16le(i32** %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @encode_s16le(i32** %0, i64 %1) {
%3 = tail call i32 @encode_u16le(i32** %0, i64 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ address;
};
typedef TYPE_1__ XHostAddress;

/* Variables and functions */
void *get_XHostAddress_address(void *_p) {
  return (void *)((XHostAddress *)_p)->address;
}


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

x86 assembly (clang, -O2):
<get_XHostAddress_address>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XHostAddress_address(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XHostAddress_address(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
__float128 from_sign_int(int a) { return (__float128)a; }


x86 assembly (clang, -O0):
<from_sign_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<from_sign_int>:
push   %rax
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_sign_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to fp128
ret fp128 %4
}

LLVM IR (-O2):
define fp128 @from_sign_int(i32 %0) {
%2 = sitofp i32 %0 to fp128
ret fp128 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void debug(int d) { printf("here at %d\n", d); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"here at %d\0A\00"
define void @debug(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find_all_firsts();
int /*<<< orphan*/ find_all_follows();
int /*<<< orphan*/ print_first();
int /*<<< orphan*/ print_follow();
int /*<<< orphan*/ readpro();
void first_follow() {
  readpro();
  find_all_firsts();
  find_all_follows();
  print_first();
  print_follow();
}


x86 assembly (clang, -O0):
<first_follow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <readpro@plt>
mov    $0x0,%al
call   1070 <find_all_firsts@plt>
mov    $0x0,%al
call   1040 <find_all_follows@plt>
mov    $0x0,%al
call   1060 <print_first@plt>
mov    $0x0,%al
call   1030 <print_follow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_follow>:
push   %rax
xor    %eax,%eax
call   1050 <readpro@plt>
xor    %eax,%eax
call   1070 <find_all_firsts@plt>
xor    %eax,%eax
call   1040 <find_all_follows@plt>
xor    %eax,%eax
call   1060 <print_first@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <print_follow@plt>

LLVM IR (-O0):
define void @first_follow() {
%1 = call i32 (...) @readpro()
%2 = call i32 (...) @find_all_firsts()
%3 = call i32 (...) @find_all_follows()
%4 = call i32 (...) @print_first()
%5 = call i32 (...) @print_follow()
ret void
}

LLVM IR (-O2):
define void @first_follow() {
%1 = tail call i32 (...) @readpro()
%2 = tail call i32 (...) @find_all_firsts()
%3 = tail call i32 (...) @find_all_follows()
%4 = tail call i32 (...) @print_first()
%5 = tail call i32 (...) @print_follow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int syscall(int /*<<< orphan*/);
int gimmeThatStuff() { return syscall(SYS_gettid); }


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

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

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @gimmeThatStuff() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @gimmeThatStuff() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int CountOnes(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 0x0A0B0C0D;
  printf("%d has %d 1's\n", i, CountOnes(i));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"%d has %d 1's\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 168496141, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @CountOnes(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%d has %d 1's\0A\00"
define i32 @main() {
%1 = tail call i32 @CountOnes(i32 168496141)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 168496141, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ init_i2c_hw(int);
int /*<<< orphan*/ nvic_enable(int);
int /*<<< orphan*/ show16(char *, int);
void test_i2c(int device) {
  nvic_enable(31);
  nvic_enable(32);
  nvic_enable(33);
  nvic_enable(34);
  show16("Testing i2c: ", device);
  init_i2c_hw(device);
}


x86 assembly (clang, -O0):
<test_i2c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1f,%edi
call   1050 <nvic_enable@plt>
mov    $0x20,%edi
call   1050 <nvic_enable@plt>
mov    $0x21,%edi
call   1050 <nvic_enable@plt>
mov    $0x22,%edi
call   1050 <nvic_enable@plt>
mov    -0x4(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <show16@plt>
mov    -0x4(%rbp),%edi
call   1040 <init_i2c_hw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_i2c>:
push   %rbx
mov    %edi,%ebx
mov    $0x1f,%edi
call   1050 <nvic_enable@plt>
mov    $0x20,%edi
call   1050 <nvic_enable@plt>
mov    $0x21,%edi
call   1050 <nvic_enable@plt>
mov    $0x22,%edi
call   1050 <nvic_enable@plt>
lea    0xe9e(%rip),%rdi
mov    %ebx,%esi
call   1030 <show16@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <init_i2c_hw@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Testing i2c: \00"
define void @test_i2c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @nvic_enable(i32 31)
%4 = call i32 @nvic_enable(i32 32)
%5 = call i32 @nvic_enable(i32 33)
%6 = call i32 @nvic_enable(i32 34)
%7 = load i32, i32* %2
%8 = call i32 @show16(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @init_i2c_hw(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Testing i2c: \00"
define void @test_i2c(i32 %0) {
%2 = tail call i32 @nvic_enable(i32 31)
%3 = tail call i32 @nvic_enable(i32 32)
%4 = tail call i32 @nvic_enable(i32 33)
%5 = tail call i32 @nvic_enable(i32 34)
%6 = tail call i32 @show16(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = tail call i32 @init_i2c_hw(i32 %0)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ cryptoRand(unsigned char *, int);
int cryptoRand64() {
  int64_t n;
  unsigned char *buf = (unsigned char *)&n;
  int len = sizeof(int64_t);
  cryptoRand(buf, len);
  return n;
}


x86 assembly (clang, -O0):
<cryptoRand64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <cryptoRand@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cryptoRand64() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i8* %4, i8** %2
store i32 4, i32* %3
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = call i32 @cryptoRand(i8* %5, i32 %6)
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @cryptoRand64() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @cryptoRand(i8* %2, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ delay_tick(int);
int /*<<< orphan*/ serial_putc(int /*<<< orphan*/);
void v_serial_puts(const char *s) {
  while (*s != '\0') {
    serial_putc(*s++);
  }
  delay_tick(32 * 1000);
}


x86 assembly (clang, -O0):
<v_serial_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1158 <v_serial_puts+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1040 <serial_putc@plt>
jmp    112c <v_serial_puts+0xc>
mov    $0x7d00,%edi
call   1030 <delay_tick@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_serial_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <v_serial_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1040 <serial_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <v_serial_puts+0x10>
mov    $0x7d00,%edi
pop    %rbx
jmp    1030 <delay_tick@plt>

LLVM IR (-O0):
define void @v_serial_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = call i32 @serial_putc(i32 %12)
br label %3
14: ; preds = %3
%15 = call i32 @delay_tick(i32 32000)
ret void
}

LLVM IR (-O2):
define void @v_serial_puts(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 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 @serial_putc(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @delay_tick(i32 32000)
ret void
}
/* Type definitions */
struct connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AddEStr(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void GotNotify(struct connection *c, char *msg) {
  char str[1024];
  snprintf(str, 1024, "[ewrecv] [notify] %s\n", msg);
  AddEStr(str, 0, 0);
}


x86 assembly (clang, -O0):
<GotNotify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x400,%esi
lea    0xeb6(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <AddEStr@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GotNotify>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <AddEStr@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.connection = type { i32 }
@.str = [22 x i8] c"[ewrecv] [notify] %s\0A\00"
define void @GotNotify(%struct.connection* %0, i8* %1) {
%3 = alloca %struct.connection*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store %struct.connection* %0, %struct.connection** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = call i32 @snprintf(i8* %6, i32 1024, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = call i32 @AddEStr(i8* %9, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.connection = type { i32 }
@.str = [22 x i8] c"[ewrecv] [notify] %s\0A\00"
define void @GotNotify(%struct.connection* nocapture readnone %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i32 @AddEStr(i8* %4, i32 0, i32 0)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  int num = 1;
  if (argc >= 2) {
    num = atoi(argv[1]);
  }
  sleep(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jl     1157 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
mov    $0x1,%edi
cmp    $0x2,%eax
jl     1138 <main+0x18>
mov    0x8(%rsi),%rdi
call   1030 <atoi@plt>
mov    %eax,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ %7, %4 ], [ 1, %2 ]
%10 = tail call i32 @sleep(i32 %9)
ret i32 0
}
unsigned short InvertEndian16(unsigned short value) {
  return (((value >> 0) & 0xFF) << 8) | (((value >> 8) & 0xFF) << 0);
}


x86 assembly (clang, -O0):
<InvertEndian16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x0,%eax
and    $0xff,%eax
shl    $0x8,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
shl    $0x0,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InvertEndian16>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @InvertEndian16(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 0
%6 = and i32 %5, 255
%7 = shl i32 %6, 8
%8 = load i16, i16* %2
%9 = zext i16 %8 to i32
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = shl i32 %11, 0
%13 = or i32 %7, %12
%14 = trunc i32 %13 to i16
ret i16 %14
}

LLVM IR (-O2):
define zeroext i16 @InvertEndian16(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
void INT_Excep_PERIA_INTA242(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA242() {
ret void
}
/* Variables and functions */
size_t backend_max_size(void) { return (-1); }


x86 assembly (clang, -O0):
<backend_max_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<backend_max_size>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @backend_max_size() {
ret i64 -1
}

LLVM IR (-O2):
define i64 @backend_max_size() {
ret i64 -1
}
float CG_OpFuncCompareAnd(const float a, const float b) { return (a && b); }


x86 assembly (clang, -O0):
<CG_OpFuncCompareAnd>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jne    112f <CG_OpFuncCompareAnd+0x2f>
jp     112f <CG_OpFuncCompareAnd+0x2f>
jmp    1145 <CG_OpFuncCompareAnd+0x45>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_OpFuncCompareAnd>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
setp   %al
setne  %cl
or     %al,%cl
ucomiss %xmm2,%xmm1
setp   %al
setne  %dl
or     %al,%dl
and    %cl,%dl
movzbl %dl,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
ret

LLVM IR (-O0):
define float @CG_OpFuncCompareAnd(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp une float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %4
%9 = fcmp une float %8, 0.000000e+00
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to float
ret float %13
}

LLVM IR (-O2):
define float @CG_OpFuncCompareAnd(float %0, float %1) {
%3 = fcmp une float %0, 0.000000e+00
%4 = fcmp une float %1, 0.000000e+00
%5 = and i1 %3, %4
%6 = uitofp i1 %5 to float
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rdpmc_cycles(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ u32_to_64(int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((__unused__, __always___)) __attribute__((__artificial__))
uint64_t
rdpmcl_cycles() {
  uint32_t low, high;
  rdpmc_cycles(&low, &high);
  return u32_to_64(low, high);
}


x86 assembly (clang, -O0):
<rdpmcl_cycles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <rdpmc_cycles@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <u32_to_64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdpmcl_cycles>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <rdpmc_cycles@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <u32_to_64@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rdpmcl_cycles() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @rdpmc_cycles(i32* %1, i32* %2)
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = call i32 @u32_to_64(i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @rdpmcl_cycles() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @rdpmc_cycles(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @u32_to_64(i32 %6, i32 %7)
ret i32 %8
}
int isdigit(int c) { return ((c >= '0' && c <= '9')); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
long get_remainder(int prime, int n) {
  if (n % 2 == 0)
    return 2;
  else
    return (2L * n * prime) % ((long)prime * prime);
}


x86 assembly (clang, -O0):
<get_remainder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112b <get_remainder+0x2b>
movq   $0x2,-0x8(%rbp)
jmp    1150 <get_remainder+0x50>
movslq -0x10(%rbp),%rax
shl    $0x1,%rax
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
movslq -0xc(%rbp),%rcx
movslq -0xc(%rbp),%rdx
imul   %rdx,%rcx
cqto
idiv   %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_remainder>:
mov    $0x2,%eax
test   $0x1,%sil
je     1130 <get_remainder+0x30>
movslq %esi,%rax
movslq %edi,%rcx
imul   %rcx,%rax
add    %rax,%rax
imul   %rcx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1131 <get_remainder+0x31>
cqto
idiv   %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @get_remainder(i32 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = srem i32 %6, 2
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i64 2, i64* %3
br label %23
10: ; preds = %2
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = mul nsw i64 2, %12
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = mul nsw i64 %13, %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = mul nsw i64 %18, %20
%22 = srem i64 %16, %21
store i64 %22, i64* %3
br label %23
23: ; preds = %10, %9
%24 = load i64, i64* %3
ret i64 %24
}

LLVM IR (-O2):
define i64 @get_remainder(i32 %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = sext i32 %0 to i64
%8 = shl nsw i64 %7, 1
%9 = mul i64 %8, %6
%10 = mul nsw i64 %7, %7
%11 = srem i64 %9, %10
br label %12
12: ; preds = %2, %5
%13 = phi i64 [ %11, %5 ], [ 2, %2 ]
ret i64 %13
}
void nouveau_unregister_dsm_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @nouveau_unregister_dsm_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ poe_isword(char);
int poe_isnotword(char c) { return !poe_isword(c); }


x86 assembly (clang, -O0):
<poe_isnotword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <poe_isword@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @poe_isnotword(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @poe_isword(i8 signext %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @poe_isnotword(i8 signext %0) {
%2 = tail call i32 @poe_isword(i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main(void) {
  int x, y;
  scanf("%d %d", &x, &y);
  printf("%d\n", gcd(x, y));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <gcd@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <gcd@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @gcd(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}
int test_imm_1Auint16_mem(unsigned short *val) {
  return ((*val) & (-0x1A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Auint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffe6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Auint16_mem>:
movzwl (%rdi),%eax
test   $0xffe6,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Auint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -26
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *dgettext(char const *, char const *);
const char *b_dpgettext2(const char *domain, const char *ctxMsgId,
                         size_t msgIdOffset) {
  const char *const translation = dgettext(domain, ctxMsgId);
  if (translation == ctxMsgId)
    return ctxMsgId + msgIdOffset;
  return translation;
}


x86 assembly (clang, -O0):
<b_dpgettext2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <dgettext@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1154 <b_dpgettext2+0x44>
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115c <b_dpgettext2+0x4c>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_dpgettext2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
call   1030 <dgettext@plt>
add    %rbx,%r14
cmp    %rbx,%rax
cmove  %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @b_dpgettext2(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @dgettext(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i8*, i8** %8
%13 = load i8*, i8** %6
%14 = icmp eq i8* %12, %13
br i1 %14, label %15, label %19
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = load i64, i64* %7
%18 = getelementptr inbounds i8, i8* %16, i64 %17
store i8* %18, i8** %4
br label %21
19: ; preds = %3
%20 = load i8*, i8** %8
store i8* %20, i8** %4
br label %21
21: ; preds = %19, %15
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
define i8* @b_dpgettext2(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @dgettext(i8* %0, i8* %1)
%5 = icmp eq i8* %4, %1
%6 = getelementptr inbounds i8, i8* %1, i64 %2
%7 = select i1 %5, i8* %6, i8* %4
ret i8* %7
}