xunge/DecIR huggingface dataset:
double s2uhf_pure(int Na, int Nb) {
  int Nu = Na - Nb;
  return Nu * 0.5 * (Nu * 0.5 + 1.0);
}


x86 assembly (clang, -O0):
<s2uhf_pure>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xecf(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xecb(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2uhf_pure>:
sub    %esi,%edi
cvtsi2sd %edi,%xmm1
mulsd  0xef2(%rip),%xmm1
movsd  0xef2(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @s2uhf_pure(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 5.000000e-01
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = call double @llvm.fmuladd.f64(double %13, double 5.000000e-01, double 1.000000e+00)
%15 = fmul double %11, %14
ret double %15
}

LLVM IR (-O2):
define double @s2uhf_pure(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 5.000000e-01
%6 = tail call double @llvm.fmuladd.f64(double %4, double 5.000000e-01, double 1.000000e+00)
%7 = fmul double %5, %6
ret double %7
}
void mmc_init() {}


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

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

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

LLVM IR (-O2):
define void @mmc_init() {
ret void
}
void av_parse_time() {}


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

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

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

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

/* Variables and functions */
void bit_set(uint32_t *dword, unsigned int n) { *dword |= (1 << n); }


x86 assembly (clang, -O0):
<bit_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_set>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @bit_set(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 1, %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = or i32 %8, %6
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @bit_set(i32* nocapture %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = load i32, i32* %0
%5 = or i32 %4, %3
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void huey17() { printf("huey17 likes watermelown. INSIDE A WATERMELOWN! \n"); }


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

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

LLVM IR (-O0):
@.str = [50 x i8] c"huey17 likes watermelown. INSIDE A WATERMELOWN! \0A\00"
define void @huey17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [49 x i8] c"huey17 likes watermelown. INSIDE A WATERMELOWN! \00"
define void @huey17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, long);
int /*<<< orphan*/ stderr;
void report_error(long int n) {
  fprintf(stderr, "\nParsing error in line: %ld\n", n + 1);
}


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

x86 assembly (clang, -O2):
<report_error>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
lea    0x1(%rdi),%rdx
lea    0xedc(%rip),%rsi
mov    %eax,%edi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"\0AParsing error in line: %ld\0A\00"
define void @report_error(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i32, i32* @stderr
%4 = load i64, i64* %2
%5 = add nsw i64 %4, 1
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"\0AParsing error in line: %ld\0A\00"
define void @report_error(i64 %0) {
%2 = load i32, i32* @stderr
%3 = add nsw i64 %0, 1
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %3)
ret void
}
void XkbLookupKeySym() {}


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

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

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

LLVM IR (-O2):
define void @XkbLookupKeySym() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ any(int);
int /*<<< orphan*/ any2(int);
int /*<<< orphan*/ one(int, ...);
main() {
  any(5);
  one(1);
  any2(2);
  one(1, 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1050 <any@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <one@plt>
mov    $0x2,%edi
call   1030 <any2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <one@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1050 <any@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <one@plt>
mov    $0x2,%edi
call   1030 <any2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <one@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @any(i32 5)
%2 = call i32 (i32, ...) @one(i32 1)
%3 = call i32 @any2(i32 2)
%4 = call i32 (i32, ...) @one(i32 1, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @any(i32 5)
%2 = tail call i32 (i32, ...) @one(i32 1)
%3 = tail call i32 @any2(i32 2)
%4 = tail call i32 (i32, ...) @one(i32 1, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read(int, char *, int);
size_t strcspn(char *, char *);
void msg_recv(int comm, char *msg, int size) {
  memset(msg, 0, size);
  read(comm, msg, size);
  msg[strcspn(msg, "\r\n")] = '\0';
  printf("recv <- %s", msg);
}


x86 assembly (clang, -O0):
<msg_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1060 <read@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe7e(%rip),%rsi
call   1050 <strcspn@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rsi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_recv>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1060 <read@plt>
lea    0xe96(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
lea    0xe86(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [11 x i8] c"recv <- %s\00"
define void @msg_recv(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @memset(i8* %7, i32 0, i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @read(i32 %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i8*, i8** %5
%16 = call i64 @strcspn(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
%19 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
@.str.1 = [11 x i8] c"recv <- %s\00"
define void @msg_recv(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
%5 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%6 = tail call i64 @strcspn(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds i8, i8* %1, i64 %6
store i8 0, i8* %7
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
void R_DrawNormals(void) {}


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

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

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

LLVM IR (-O2):
define void @R_DrawNormals() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ff_memfree(void *mblock) { free(mblock); }


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

LLVM IR (-O0):
define void @ff_memfree(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 @ff_memfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ probe_address16(unsigned short const *const, unsigned short *);
int romsignature(const unsigned char *rom) {
  const unsigned short *const ptr = (const unsigned short *)rom;
  unsigned short sig = 0;
  return probe_address16(ptr, &sig) == 0 && sig == 0xaa55;
}


x86 assembly (clang, -O0):
<romsignature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movw   $0x0,-0x12(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x12(%rbp),%rsi
call   1030 <probe_address16@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x13(%rbp)
jne    1158 <romsignature+0x48>
movzwl -0x12(%rbp),%eax
cmp    $0xaa55,%eax
sete   %al
mov    %al,-0x13(%rbp)
mov    -0x13(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<romsignature>:
push   %rax
movw   $0x0,0x6(%rsp)
lea    0x6(%rsp),%rsi
call   1030 <probe_address16@plt>
test   %rax,%rax
sete   %al
movzwl 0x6(%rsp),%ecx
cmp    $0xaa55,%ecx
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @romsignature(i8* %0) {
%2 = alloca i8*
%3 = alloca i16*
%4 = alloca i16
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i16*
store i16* %6, i16** %3
store i16 0, i16* %4
%7 = load i16*, i16** %3
%8 = call i64 @probe_address16(i16* %7, i16* %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = icmp eq i32 %12, 43605
br label %14
14: ; preds = %10, %1
%15 = phi i1 [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @romsignature(i8* %0) {
%2 = alloca i16
%3 = bitcast i8* %0 to i16*
%4 = bitcast i16* %2 to i8*
store i16 0, i16* %2
%5 = call i64 @probe_address16(i16* %3, i16* %2)
%6 = icmp eq i64 %5, 0
%7 = load i16, i16* %2
%8 = icmp eq i16 %7, -21931
%9 = select i1 %6, i1 %8, i1 false
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void prng_stdlib_init_seed(void) { srand(time(NULL)); }


x86 assembly (clang, -O0):
<prng_stdlib_init_seed>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<prng_stdlib_init_seed>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @prng_stdlib_init_seed() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
ret void
}

LLVM IR (-O2):
define void @prng_stdlib_init_seed() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x32() {
  Assert_real((isprint(50)),
              "/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_isprint.c",
              255, ("isprint should be 1 for 2"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x32>:
push   %rax
mov    $0x32,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xff,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for 2\00"
define void @t_isprint_0x32() {
%1 = call i32 @isprint(i32 50)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for 2\00"
define void @t_isprint_0x32() {
%1 = tail call i32 @isprint(i32 50)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 255, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int /*<<< orphan*/ rpgp_is_newline(char);
int rpgp_is_space(char c) { return isspace(c) && !rpgp_is_newline(c); }


x86 assembly (clang, -O0):
<rpgp_is_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
je     115d <rpgp_is_space+0x3d>
movsbl -0x1(%rbp),%edi
call   1040 <rpgp_is_newline@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpgp_is_space>:
push   %rbx
mov    %edi,%ebx
call   1030 <isspace@plt>
test   %rax,%rax
je     1140 <rpgp_is_space+0x20>
movsbl %bl,%edi
call   1040 <rpgp_is_newline@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rpgp_is_space(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isspace(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32 @rpgp_is_newline(i8 signext %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @rpgp_is_space(i8 signext %0) {
%2 = tail call i64 @isspace(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @rpgp_is_newline(i8 signext %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void f17(void) {
  ({
    goto a;
    ({ 0; });
  a:
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f17>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f17() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
br label %6
6: ; preds = %0
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
define void @f17() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
void del_msg(void) { refresh(); }


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

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

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

LLVM IR (-O2):
define void @del_msg() {
%1 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
const bool is_alpha(char c) {
  return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <is_alpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <is_alpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <is_alpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_alpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strindex(char *, char *);
int main() {
  char *s = "abcdefg";
  char *t = "edc";
  printf("%d\n", strindex(s, t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strindex@plt>
mov    %eax,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"abcdefg\00"
@.str.1 = [4 x i8] c"edc\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strindex(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
void mempool_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @mempool_placeholder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f7_handler(char **save) {
  write_instr(0x00);
  write_imm(0x40);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<f7_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x40,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x40,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f7_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 64)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f7_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 64)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ perrordie(char *);
scalar_t__ ungetc(int, int /*<<< orphan*/ *);
void safe_ungetc(int c, FILE *f) {
  if (ungetc(c, f) == EOF)
    perrordie("ungetc");
}


x86 assembly (clang, -O0):
<safe_ungetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ungetc@plt>
mov    0x2ea6(%rip),%rcx
cmp    (%rcx),%rax
jne    1157 <safe_ungetc+0x37>
lea    0xeae(%rip),%rdi
call   1040 <perrordie@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_ungetc>:
push   %rax
call   1030 <ungetc@plt>
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%rax
jne    113f <safe_ungetc+0x1f>
lea    0xec7(%rip),%rdi
pop    %rax
jmp    1040 <perrordie@plt>
pop    %rax
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [7 x i8] c"ungetc\00"
define void @safe_ungetc(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = call i64 @ungetc(i32 %5, i32* %6)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @perrordie(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [7 x i8] c"ungetc\00"
define void @safe_ungetc(i32 %0, i32* nocapture %1) {
%3 = tail call i64 @ungetc(i32 %0, i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perrordie(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ y;
};
struct TYPE_4__ {
  TYPE_1__ xmotion;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xmotion_y(void *_p) { return (int)((XEvent *)_p)->xmotion.y; }


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xmotion_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int);
int intlen(int integer) { return (int)floor(log10(integer)) + 1; }


x86 assembly (clang, -O0):
<intlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlen>:
push   %rax
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intlen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log10(i32 %3)
%5 = call i64 @floor(i32 %4)
%6 = trunc i64 %5 to i32
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @intlen(i32 %0) {
%2 = tail call i32 @log10(i32 %0)
%3 = tail call i64 @floor(i32 %2)
%4 = trunc i64 %3 to i32
%5 = add nsw i32 %4, 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ e_accu();
int /*<<< orphan*/ e_asl();
int /*<<< orphan*/ e_writeback();
void e_asl_accu() {
  e_accu();
  e_asl();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_asl_accu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <e_accu@plt>
mov    $0x0,%al
call   1050 <e_asl@plt>
mov    $0x0,%al
call   1040 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_asl_accu>:
push   %rax
xor    %eax,%eax
call   1030 <e_accu@plt>
xor    %eax,%eax
call   1050 <e_asl@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_writeback@plt>

LLVM IR (-O0):
define void @e_asl_accu() {
%1 = call i32 (...) @e_accu()
%2 = call i32 (...) @e_asl()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_asl_accu() {
%1 = tail call i32 (...) @e_accu()
%2 = tail call i32 (...) @e_asl()
%3 = tail call i32 (...) @e_writeback()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_arr(int *, int);
int /*<<< orphan*/ selection_sort(int *, int);
int main() {
  int arr[10] = {8, 44, 6, 99, 0, -11, -15, -7, 10, -3};
  print_arr(arr, 10);
  selection_sort(arr, 10);
  print_arr(arr, 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <print_arr@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <selection_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <print_arr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <print_arr@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <selection_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <print_arr@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [10 x i32] [i32 8, i32 44, i32 6, i32 99, i32 0, i32 -11, i32 -15, i32 -7, i32 10, i32 -3]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_arr(i32* %3, i32 10)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @selection_sort(i32* %5, i32 10)
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = call i32 @print_arr(i32* %7, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [10 x i32] [i32 8, i32 44, i32 6, i32 99, i32 0, i32 -11, i32 -15, i32 -7, i32 10, i32 -3]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @print_arr(i32* %3, i32 10)
%5 = call i32 @selection_sort(i32* %3, i32 10)
%6 = call i32 @print_arr(i32* %3, i32 10)
ret i32 0
}
int get_bit(unsigned val, unsigned idx) {
  unsigned mask = 1 << (idx & 31);
  return (val & mask) != 0;
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_bit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 31
%8 = shl i32 1, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = and i32 %9, %10
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_bit(i32 %0, i32 %1) {
%3 = and i32 %1, 31
%4 = lshr i32 %0, %3
%5 = and i32 %4, 1
ret i32 %5
}
/* Type definitions */
struct sched_param {
  int /*<<< orphan*/ sched_priority;
};
typedef int /*<<< orphan*/ pid_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ SCHED_RR;
int sched_setscheduler(int /*<<< orphan*/, int /*<<< orphan*/,
                       struct sched_param *);
int set_priority(pid_t pid, int32_t priority) {
  struct sched_param sp;
  sp.sched_priority = priority;
  return sched_setscheduler(pid, SCHED_RR, &sp);
}


x86 assembly (clang, -O0):
<set_priority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1030 <sched_setscheduler@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_priority>:
push   %rax
mov    %esi,(%rsp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <sched_setscheduler@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
define i32 @set_priority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sched_param
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %3
%9 = load i32, i32* @SCHED_RR
%10 = call i32 @sched_setscheduler(i32 %8, i32 %9, %struct.sched_param* %5)
ret i32 %10
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@SCHED_RR = global i32 0
define i32 @set_priority(i32 %0, i32 %1) {
%3 = alloca %struct.sched_param
%4 = bitcast %struct.sched_param* %3 to i8*
%5 = getelementptr inbounds %struct.sched_param, %struct.sched_param* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = load i32, i32* @SCHED_RR
%7 = call i32 @sched_setscheduler(i32 %0, i32 %6, %struct.sched_param* %3)
ret i32 %7
}
/* Variables and functions */
double exp(double const);
double pow(double const, double);
double HO_0(const double a, const double x) {
  double retval = pow(a, 0.1e1 / 0.4e1) * exp(-a * x * x / 0.2e1) *
                  pow(0.3141592654e1, -0.1e1 / 0.4e1);
  return retval;
}


x86 assembly (clang, -O0):
<HO_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe67(%rip),%xmm0
movsd  0xe67(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HO_0>:
sub    $0x18,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
movsd  0xec9(%rip),%xmm1
call   1040 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xeab(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0x10(%rsp),%xmm0
mulsd  0xea0(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @HO_0(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @pow(double %6, double 2.500000e-01)
%8 = load double, double* %3
%9 = fneg double %8
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = fdiv double %13, 2.000000e+00
%15 = call double @exp(double %14)
%16 = fmul double %7, %15
%17 = call double @pow(double 0x400921FB54524550, double -2.500000e-01)
%18 = fmul double %16, %17
store double %18, double* %5
%19 = load double, double* %5
ret double %19
}

LLVM IR (-O2):
define double @HO_0(double %0, double %1) {
%3 = tail call double @pow(double %0, double 2.500000e-01)
%4 = fneg double %0
%5 = fmul double %4, %1
%6 = fmul double %5, %1
%7 = fmul double %6, 5.000000e-01
%8 = tail call double @exp(double %7)
%9 = fmul double %3, %8
%10 = fmul double %9, 0x3FE809387011FA5F
ret double %10
}
unsigned short fun_zi16(unsigned short a, unsigned short b) { return a; }


x86 assembly (clang, -O0):
<fun_zi16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_zi16>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @fun_zi16(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @fun_zi16(i16 returned zeroext %0, i16 zeroext %1) {
ret i16 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxints(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x14));
}


x86 assembly (clang, -O0):
<write_pxints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,%eax
mov    $0xb0010000,%esi
add    %rax,%rsi
add    $0x14,%rsi
call   1030 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pxints>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010014,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxints(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 20
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxints(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 20
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ __debugfs_init();
size_t __real_fread(void *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
size_t fread(void *__restrict __ptr, size_t __size, size_t __n,
             FILE *__restrict __stream) {
  printf("calling "
         "fread"
         "\n");
  __debugfs_init();
  return (__real_fread(__ptr, __size, __n, __stream));
}


x86 assembly (clang, -O0):
<fread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <__debugfs_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1050 <__real_fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fread>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <__debugfs_init@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <__real_fread@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"calling fread\0A\00"
define i64 @fread(i8* noalias %0, i64 %1, i64 %2, i32* noalias %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @__debugfs_init()
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = load i32*, i32** %8
%15 = call i64 @__real_fread(i8* %11, i64 %12, i64 %13, i32* %14)
ret i64 %15
}

LLVM IR (-O2):
@str = [14 x i8] c"calling fread\00"
define i64 @fread(i8* noalias %0, i64 %1, i64 %2, i32* noalias %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @__debugfs_init()
%7 = tail call i64 @__real_fread(i8* %0, i64 %1, i64 %2, i32* %3)
ret i64 %7
}
int do_333() { return 333; }


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

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

LLVM IR (-O0):
define i32 @do_333() {
ret i32 333
}

LLVM IR (-O2):
define i32 @do_333() {
ret i32 333
}
int minusOne(void) { return ~0; }


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

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

LLVM IR (-O0):
define i32 @minusOne() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @minusOne() {
ret i32 -1
}
double gsl_pow_8(const double x) {
  double x2 = x * x;
  double x4 = x2 * x2;
  return x4 * x4;
}


x86 assembly (clang, -O0):
<gsl_pow_8>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsl_pow_8>:
mulsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @gsl_pow_8(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fmul double %5, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %3
%10 = fmul double %8, %9
store double %10, double* %4
%11 = load double, double* %4
%12 = load double, double* %4
%13 = fmul double %11, %12
ret double %13
}

LLVM IR (-O2):
define double @gsl_pow_8(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %2
%4 = fmul double %3, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *concatenate(char *c, char *sucks) {
  strcat(c, sucks);
  return c;
}


x86 assembly (clang, -O0):
<concatenate>:
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 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concatenate>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @concatenate(i8* returned %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ test(char *, char *);
void TEST_return_stmt(void) { test("a", "main(){printf(\"a\"); return 0;}"); }


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

x86 assembly (clang, -O2):
<TEST_return_stmt>:
lea    0xee9(%rip),%rdi
lea    0xee4(%rip),%rsi
jmp    1030 <test@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [31 x i8] c"main(){printf(\22a\22); return 0;}\00"
define void @TEST_return_stmt() {
%1 = call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [31 x i8] c"main(){printf(\22a\22); return 0;}\00"
define void @TEST_return_stmt() {
%1 = tail call i32 @test(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ chdir(char const *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ write_error_with_error_number_var(char *, char const *);
unsigned char change_dir(const char *dir_name) {
  if (chdir(dir_name)) {
    write_error_with_error_number_var(
        "Could not change into dir %s. Missing permissions? Exiting.",
        dir_name);
    exit(EXIT_FAILURE);
  }
  return 1;
}


x86 assembly (clang, -O0):
<change_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <chdir@plt>
cmp    $0x0,%rax
je     116d <change_dir+0x3d>
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <write_error_with_error_number_var@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_dir>:
push   %rbx
mov    %rdi,%rbx
call   1040 <chdir@plt>
test   %rax,%rax
jne    1142 <change_dir+0x12>
mov    $0x1,%al
pop    %rbx
ret
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <write_error_with_error_number_var@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Could not change into dir %s. Missing permissions? Exiting.\00"
@EXIT_FAILURE = global i32 0
define zeroext i8 @change_dir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @chdir(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @write_error_with_error_number_var(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
ret i8 1
}

LLVM IR (-O2):
@.str = [60 x i8] c"Could not change into dir %s. Missing permissions? Exiting.\00"
@EXIT_FAILURE = global i32 0
define zeroext i8 @change_dir(i8* %0) {
%2 = tail call i64 @chdir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @write_error_with_error_number_var(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void _Q_itoq(void) {
  printf("Unimplemented %s called, exiting\n", "_Q_itoq");
  exit(-1);
}


x86 assembly (clang, -O0):
<_Q_itoq>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_Q_itoq>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef3(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_itoq\00"
define void @_Q_itoq() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [8 x i8] c"_Q_itoq\00"
define void @_Q_itoq() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ pigpio_command(int, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/, int);
uint32_t read_bank_1(int pi) { return pigpio_command(pi, 10, 0, 0, 1); }


x86 assembly (clang, -O0):
<read_bank_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_bank_1>:
mov    $0xa,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @read_bank_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @pigpio_command(i32 %3, i32 10, i32 0, i32 0, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @read_bank_1(i32 %0) {
%2 = tail call i32 @pigpio_command(i32 %0, i32 10, i32 0, i32 0, i32 1)
ret i32 %2
}