xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void deleteIntArray(int *A) {
  if (A)
    free(A);
}


x86 assembly (clang, -O0):
<deleteIntArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <deleteIntArray+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteIntArray>:
test   %rdi,%rdi
je     111a <deleteIntArray+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @deleteIntArray(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @free(i32* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @deleteIntArray(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void audio(audiofile) char *audiofile;
{}


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

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

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

LLVM IR (-O2):
define void @audio(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateIntClear(unsigned long ulIntFlags) {

  ;
  (*((volatile unsigned long *)(0x400FC020))) |= ulIntFlags;
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400fc020,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fc020,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntClear>:
or     %rdi,0x400fc020
40
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateIntClear(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074774048 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074774048 to i64*)
%6 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateIntClear(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074774048 to i64*)
%3 = or i64 %2, %0
store volatile i64 %3, i64* inttoptr (i64 1074774048 to i64*)
%4 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
int test_00(int a, int b) {
  int r = a != b;
  return r << 31;
}


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

x86 assembly (clang, -O2):
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
shl    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @test_00(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 = icmp ne i32 %6, %7
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = shl i32 %10, 31
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_00(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 0, i32 -2147483648
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ zen_prompt(int, char **);
int main(int argc, char *argv[]) {
  zen_prompt(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <zen_prompt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <zen_prompt@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**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @zen_prompt(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @zen_prompt(i32 %0, i8** %1)
ret i32 0
}
char *corta_string(char *apuntador) {
  int i;
  i = 0;
  while (apuntador[i] != 0)
    i++;
  if (i > 1) {
    apuntador = apuntador + 1;
    return apuntador;
  } else
    return "La cadena es de longitud 1 \n";
}


x86 assembly (clang, -O0):
<corta_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <corta_string+0x32>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <corta_string+0xf>
cmpl   $0x1,-0x14(%rbp)
jle    1155 <corta_string+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <corta_string+0x60>
lea    0xea4(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corta_string>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <corta_string+0x10>
add    $0x1,%rdi
test   $0xfffffffe,%eax
lea    0xed5(%rip),%rax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
@.str = [29 x i8] c"La cadena es de longitud 1 \0A\00"
define i8* @corta_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %5
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %5
16: ; preds = %5
%17 = load i32, i32* %4
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %23
19: ; preds = %16
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 1
store i8* %21, i8** %3
%22 = load i8*, i8** %3
store i8* %22, i8** %2
br label %24
23: ; preds = %16
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8** %2
br label %24
24: ; preds = %23, %19
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
@.str = [29 x i8] c"La cadena es de longitud 1 \0A\00"
define i8* @corta_string(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = and i64 %3, 4294967294
%10 = icmp eq i64 %9, 0
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = select i1 %10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %11
ret i8* %12
}
/* Variables and functions */
size_t _pu_pathname_dim(void) {
  int maxlen;
  maxlen = 1024;
  return maxlen + 1;
}


x86 assembly (clang, -O0):
<_pu_pathname_dim>:
push   %rbp
mov    %rsp,%rbp
movl   $0x400,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @_pu_pathname_dim() {
%1 = alloca i32
store i32 1024, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @_pu_pathname_dim() {
ret i64 1025
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_235() {
  Assert_real((isqrt(235) == 15),
              "/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/stdlib/isqrt.c",
              1180, ("Integer square root of 235 should be 15"));
}


x86 assembly (clang, -O0):
<t_sqrt_235>:
push   %rbp
mov    %rsp,%rbp
mov    $0xeb,%edi
call   1030 <isqrt@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x49c,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_235>:
push   %rax
mov    $0xeb,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x49c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 235 should be 15\00"
define void @t_sqrt_235() {
%1 = call i32 @isqrt(i32 235)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 235 should be 15\00"
define void @t_sqrt_235() {
%1 = tail call i32 @isqrt(i32 235)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1180, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_assign(float *, float *);
__attribute__((always_)) struct vec3 *psvec3_assign(struct vec3 *result,
                                                    struct vec3 *a) {
  vec3_assign((float *)result, (float *)a);
  return result;
}


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

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

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_assign(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call i32 @vec3_assign(float* %6, float* %8)
%10 = load %struct.vec3*, %struct.vec3** %3
ret %struct.vec3* %10
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_assign(%struct.vec3* returned %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call i32 @vec3_assign(float* %3, float* %4)
ret %struct.vec3* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void fopJMP(unsigned char *p) { printf("$%04X", ((*p << 3) & 0x700) | p[1]); }


x86 assembly (clang, -O0):
<fopJMP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x3,%eax
and    $0x700,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
lea    0xec4(%rip),%rdi
movzbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopJMP>:
movzbl 0x1(%rdi),%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"$%04X\00"
define void @fopJMP(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = shl i32 %5, 3
%7 = and i32 %6, 1792
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %7, %11
%13 = trunc i32 %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %13)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"$%04X\00"
define void @fopJMP(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
ret void
}
unsigned long _read_cr4(void) {
  unsigned long _cr4;
  asm volatile("mov %%cr4, %0" : "=r"(_cr4));
  return _cr4;
}


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

x86 assembly (clang, -O2):
<_read_cr4>:
mov    %cr4,%rax
ret

LLVM IR (-O0):
define i64 @_read_cr4() {
%1 = alloca i64
%2 = call i64 asm sideeffect "mov %cr4, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @_read_cr4() {
%1 = tail call i64 asm sideeffect "mov %cr4, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
int do_math(int arg1, int arg2) { return arg2 / arg1; }


x86 assembly (clang, -O0):
<do_math>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_math>:
mov    %esi,%eax
cltd
idiv   %edi
ret

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

LLVM IR (-O2):
define i32 @do_math(i32 %0, i32 %1) {
%3 = sdiv i32 %1, %0
ret i32 %3
}
void g_log_set_default_handler() {}


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

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

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

LLVM IR (-O2):
define void @g_log_set_default_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: extract_pkey <gpg_pub_key>\n");
  printf("You can export a key with gpg --export > gpg_pub_key\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Usage: extract_pkey <gpg_pub_key>\0A\00"
@.str.1 = [54 x i8] c"You can export a key with gpg --export > gpg_pub_key\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Usage: extract_pkey <gpg_pub_key>\00"
@str.2 = [53 x i8] c"You can export a key with gpg --export > gpg_pub_key\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.2, i64 0, i64 0))
ret void
}
int pgwrite_big_endian(unsigned char *page, struct index_packet *source) {
  return -1;
}


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

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

LLVM IR (-O0):
%struct.index_packet = type opaque
define i32 @pgwrite_big_endian(i8* %0, %struct.index_packet* %1) {
%3 = alloca i8*
%4 = alloca %struct.index_packet*
store i8* %0, i8** %3
store %struct.index_packet* %1, %struct.index_packet** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.index_packet = type opaque
define i32 @pgwrite_big_endian(i8* nocapture readnone %0, %struct.index_packet* nocapture readnone %1) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ set;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
scalar_t__ sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
void bind_to_cpu(int cpu) {
  cpu_set_t set;
  CPU_ZERO(&set);
  CPU_SET(cpu, &set);
  if (sched_setaffinity(0, sizeof(set), &set) < 0)
    err(EXIT_FAILURE, "Unable to set CPU affinity");
}


x86 assembly (clang, -O0):
<bind_to_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1060 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
cmp    $0x0,%rax
jge    118f <bind_to_cpu+0x4f>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xe76(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_to_cpu>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1060 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
test   %rax,%rax
jns    1186 <bind_to_cpu+0x46>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
call   1040 <err@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [27 x i8] c"Unable to set CPU affinity\00"
define void @bind_to_cpu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @err(i32 %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [27 x i8] c"Unable to set CPU affinity\00"
define void @bind_to_cpu(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i64 @sched_setaffinity(i32 0, i32 4, i32* %2)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @err(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %1
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
double rad_to_deg(double);
void radians_to_degrees(double out_YawPitchRoll_deg[3],
                        double in_YawPitchRoll_rad[3]) {
  for (uint8_t i = 0; i < 3; i++) {
    out_YawPitchRoll_deg[i] = rad_to_deg(in_YawPitchRoll_rad[i]);
  }
}


x86 assembly (clang, -O0):
<radians_to_degrees>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    115e <radians_to_degrees+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <rad_to_deg@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <radians_to_degrees+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radians_to_degrees>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  (%rsi),%xmm0
call   1030 <rad_to_deg@plt>
movsd  %xmm0,(%r14)
movsd  0x8(%rbx),%xmm0
call   1030 <rad_to_deg@plt>
movsd  %xmm0,0x8(%r14)
movsd  0x10(%rbx),%xmm0
call   1030 <rad_to_deg@plt>
movsd  %xmm0,0x10(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @radians_to_degrees(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store i32 0, i32* %5
br label %6
6: ; preds = %20, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load double*, double** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %10, i64 %12
%14 = load double, double* %13
%15 = call double @rad_to_deg(double %14)
%16 = load double*, double** %3
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
store double %15, double* %19
br label %20
20: ; preds = %9
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @radians_to_degrees(double* nocapture writeonly %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = tail call double @rad_to_deg(double %3)
store double %4, double* %0
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = tail call double @rad_to_deg(double %6)
%8 = getelementptr inbounds double, double* %0, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = tail call double @rad_to_deg(double %10)
%12 = getelementptr inbounds double, double* %0, i64 2
store double %11, double* %12
ret void
}
int lnch_main(int const argc, char const *const *const argv) {
  struct lnch_ctxt *const p_ctxt = lnch_body_init(argc, argv);
  if (p_ctxt) {
    lnch_body_run(p_ctxt);
    lnch_body_cleanup(p_ctxt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<lnch_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <lnch_body_init@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1174 <lnch_main+0x44>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <lnch_body_run@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <lnch_body_cleanup@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnch_main>:
push   %rbx
xor    %eax,%eax
call   1050 <lnch_body_init@plt>
test   %eax,%eax
je     1153 <lnch_main+0x23>
movslq %eax,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <lnch_body_run@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <lnch_body_cleanup@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.lnch_ctxt = type opaque
define i32 @lnch_main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.lnch_ctxt*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = load i8**, i8*** %4
%8 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @lnch_body_init to i32 (i32, i8**, ...)*)(i32 %6, i8** %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to %struct.lnch_ctxt*
store %struct.lnch_ctxt* %10, %struct.lnch_ctxt** %5
%11 = load %struct.lnch_ctxt*, %struct.lnch_ctxt** %5
%12 = icmp ne %struct.lnch_ctxt* %11, null
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load %struct.lnch_ctxt*, %struct.lnch_ctxt** %5
%15 = call i32 (%struct.lnch_ctxt*, ...) bitcast (i32 (...)* @lnch_body_run to i32 (%struct.lnch_ctxt*, ...)*)(%struct.lnch_ctxt* %14)
%16 = load %struct.lnch_ctxt*, %struct.lnch_ctxt** %5
%17 = call i32 (%struct.lnch_ctxt*, ...) bitcast (i32 (...)* @lnch_body_cleanup to i32 (%struct.lnch_ctxt*, ...)*)(%struct.lnch_ctxt* %16)
br label %18
18: ; preds = %13, %2
ret i32 0
}

LLVM IR (-O2):
%struct.lnch_ctxt = type opaque
define i32 @lnch_main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @lnch_body_init to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.lnch_ctxt*
%6 = icmp eq i32 %3, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 (%struct.lnch_ctxt*, ...) bitcast (i32 (...)* @lnch_body_run to i32 (%struct.lnch_ctxt*, ...)*)(%struct.lnch_ctxt* %5)
%9 = tail call i32 (%struct.lnch_ctxt*, ...) bitcast (i32 (...)* @lnch_body_cleanup to i32 (%struct.lnch_ctxt*, ...)*)(%struct.lnch_ctxt* %5)
br label %10
10: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_gppc_func_text(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_gppc_func_text() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_gppc_func_text() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
int event_pending(const struct event *x, short y, struct timeval *tv) {
  (void)x;
  (void)y;
  (void)tv;
  return 0;
}


x86 assembly (clang, -O0):
<event_pending>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.event = type opaque
%struct.timeval = type opaque
define i32 @event_pending(%struct.event* %0, i16 signext %1, %struct.timeval* %2) {
%4 = alloca %struct.event*
%5 = alloca i16
%6 = alloca %struct.timeval*
store %struct.event* %0, %struct.event** %4
store i16 %1, i16* %5
store %struct.timeval* %2, %struct.timeval** %6
%7 = load %struct.event*, %struct.event** %4
%8 = load i16, i16* %5
%9 = load %struct.timeval*, %struct.timeval** %6
ret i32 0
}

LLVM IR (-O2):
%struct.event = type opaque
%struct.timeval = type opaque
define i32 @event_pending(%struct.event* nocapture readnone %0, i16 signext %1, %struct.timeval* nocapture readnone %2) {
ret i32 0
}
void *_sl4_hash_key_copy_int(const void *key) {
  int *ret;
  ret = (int *)malloc(sizeof(int));
  if (ret)
    *ret = *(int *)key;
  return ret;
}


x86 assembly (clang, -O0):
<_sl4_hash_key_copy_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <_sl4_hash_key_copy_int+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sl4_hash_key_copy_int>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1127 <_sl4_hash_key_copy_int+0x17>
mov    (%rbx),%ecx
mov    %ecx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_sl4_hash_key_copy_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i8* @malloc(i64 4)
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
store i32 %11, i32* %12
br label %13
13: ; preds = %8, %1
%14 = load i32*, i32** %3
%15 = bitcast i32* %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @_sl4_hash_key_copy_int(i8* nocapture %0) {
%2 = tail call dereferenceable_or_null(4) i8* @malloc(i64 4)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = bitcast i8* %2 to i32*
%6 = bitcast i8* %0 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %5
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int setevent(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int event_disable(char *event) {
  char path[256];
  sprintf(path, "events/%s/enable", event);
  return setevent(path, "0");
}


x86 assembly (clang, -O0):
<event_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <setevent@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_disable>:
push   %rbx
sub    $0x100,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <setevent@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"events/%s/enable\00"
@.str.1 = [2 x i8] c"0\00"
define i32 @event_disable(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i32 @setevent(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %8
}

LLVM IR (-O2):
@.str = [17 x i8] c"events/%s/enable\00"
@.str.1 = [2 x i8] c"0\00"
define i32 @event_disable(i8* %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @setevent(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closetcp(int fd[2]) {
  close(fd[0]);
  fd[0] = -1;
  close(fd[1]);
  fd[1] = -1;
}


x86 assembly (clang, -O0):
<closetcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%rax
movl   $0xffffffff,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closetcp>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <close@plt>
movl   $0xffffffff,(%rbx)
mov    0x4(%rbx),%edi
call   1030 <close@plt>
movl   $0xffffffff,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @closetcp(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 = call i32 @close(i32 %5)
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 -1, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = call i32 @close(i32 %11)
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 -1, i32* %14
ret void
}

LLVM IR (-O2):
define void @closetcp(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @close(i32 %2)
store i32 -1, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @close(i32 %5)
store i32 -1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mtspr(int, unsigned int);
void cpu_perf_set(unsigned int counterId, unsigned int value) {
  mtspr(((7 << (11)) + (counterId)), value);
}


x86 assembly (clang, -O0):
<cpu_perf_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    $0x3800,%edi
mov    -0x8(%rbp),%esi
call   1030 <mtspr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_perf_set>:
add    $0x3800,%edi
jmp    1030 <mtspr@plt>

LLVM IR (-O0):
define void @cpu_perf_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* %3
%6 = add i32 14336, %5
%7 = load i32, i32* %4
%8 = call i32 @mtspr(i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @cpu_perf_set(i32 %0, i32 %1) {
%3 = add i32 %0, 14336
%4 = tail call i32 @mtspr(i32 %3, i32 %1)
ret void
}
/* Type definitions */
typedef union hash_state {
  int dummy;
} hash_state;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccakf(int /*<<< orphan*/ *, int);
void hash_permutation(union hash_state *state) {
  keccakf((uint64_t *)state, 24);
}


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

x86 assembly (clang, -O2):
<hash_permutation>:
mov    $0x18,%esi
jmp    1030 <keccakf@plt>

LLVM IR (-O0):
%union.hash_state = type { i32 }
define void @hash_permutation(%union.hash_state* %0) {
%2 = alloca %union.hash_state*
store %union.hash_state* %0, %union.hash_state** %2
%3 = load %union.hash_state*, %union.hash_state** %2
%4 = bitcast %union.hash_state* %3 to i32*
%5 = call i32 @keccakf(i32* %4, i32 24)
ret void
}

LLVM IR (-O2):
%union.hash_state = type { i32 }
define void @hash_permutation(%union.hash_state* %0) {
%2 = getelementptr %union.hash_state, %union.hash_state* %0, i64 0, i32 0
%3 = tail call i32 @keccakf(i32* %2, i32 24)
ret void
}
void gtk_image_new_from_icon_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_new_from_icon_name() {
ret void
}
int macro_char_valid(int c) { return 'a' <= c && c <= 'z'; }


x86 assembly (clang, -O0):
<macro_char_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x61,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <macro_char_valid+0x24>
cmpl   $0x7a,-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):
<macro_char_valid>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @macro_char_valid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 97, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
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 @macro_char_valid(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int intcmp(int, int);
int intcmp_wrapper(const void *val_1, const void *val_2) {
  return intcmp(*(int *)val_1, *(int *)val_2);
}


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

x86 assembly (clang, -O2):
<intcmp_wrapper>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <intcmp@plt>

LLVM IR (-O0):
define i32 @intcmp_wrapper(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = call i32 @intcmp(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @intcmp_wrapper(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @intcmp(i32 %4, i32 %6)
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime(struct tm *);
int /*<<< orphan*/ clrscr();
int /*<<< orphan*/ lineBreak();
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void currentTime(void) {
  clrscr();
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  printf("Current local time and date:\n%s", asctime(timeinfo));
  lineBreak();
}


x86 assembly (clang, -O0):
<currentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <clrscr@plt>
lea    -0x4(%rbp),%rdi
call   1080 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <asctime@plt>
mov    %rax,%rsi
lea    0xe68(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1070 <lineBreak@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<currentTime>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <clrscr@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1050 <asctime@plt>
lea    0xe70(%rip),%rdi
mov    %rax,%rsi
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <lineBreak@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [32 x i8] c"Current local time and date:\0A%s\00"
define void @currentTime() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 (...) @clrscr()
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %5, %struct.tm** %2
%6 = load %struct.tm*, %struct.tm** %2
%7 = call i8* @asctime(%struct.tm* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 (...) @lineBreak()
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [32 x i8] c"Current local time and date:\0A%s\00"
define void @currentTime() {
%1 = alloca i32
%2 = tail call i32 (...) @clrscr()
%3 = bitcast i32* %1 to i8*
%4 = call i32 @time(i32* %1)
%5 = call %struct.tm* @localtime(i32* %1)
%6 = call i8* @asctime(%struct.tm* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (...) @lineBreak()
ret void
}
void ff_get_cpu_flags_ppc() {}


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

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

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

LLVM IR (-O2):
define void @ff_get_cpu_flags_ppc() {
ret void
}
/* Variables and functions */
int rbuDeltaGetInt(char const **, int *);
int rbuDeltaOutputSize(const char *zDelta, int lenDelta) {
  int size;
  size = rbuDeltaGetInt(&zDelta, &lenDelta);
  if (*zDelta != '\n') {
    return -1;
  }
  return size;
}


x86 assembly (clang, -O0):
<rbuDeltaOutputSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <rbuDeltaGetInt@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     114b <rbuDeltaOutputSize+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1151 <rbuDeltaOutputSize+0x41>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rbuDeltaOutputSize>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %esi,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1030 <rbuDeltaGetInt@plt>
mov    0x10(%rsp),%rcx
cmpb   $0xa,(%rcx)
mov    $0xffffffff,%ecx
cmovne %ecx,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @rbuDeltaOutputSize(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @rbuDeltaGetInt(i8** %3, i32* %4)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
%9 = select i1 %8, i32 %5, i32 -1
ret i32 %9
}
/* Variables and functions */
size_t UINT32_C(int);
size_t UINT64_C(int);
size_t fnv_1a_prime(void) {
  return (sizeof(size_t) >= 8) ? UINT64_C(1099511628211) : UINT32_C(16777619);
}


x86 assembly (clang, -O0):
<fnv_1a_prime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b3,%edi
call   1030 <UINT64_C@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnv_1a_prime>:
mov    $0x1b3,%edi
jmp    1030 <UINT64_C@plt>

LLVM IR (-O0):
define i64 @fnv_1a_prime() {
%1 = call i64 @UINT64_C(i32 435)
ret i64 %1
}

LLVM IR (-O2):
define i64 @fnv_1a_prime() {
%1 = tail call i64 @UINT64_C(i32 435)
ret i64 %1
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int fstatx(int, struct stat *, int, int);
int __fxstat(int ver, int fd, struct stat *st) {
  assert(ver == 0);
  return fstatx(fd, st, sizeof(*st), 0x00);
}


x86 assembly (clang, -O0):
<__fxstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
call   1030 <fstatx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fxstat>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
call   1040 <assert@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fstatx@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__fxstat(i32 %0, i32 %1, %struct.stat* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.stat*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.stat* %2, %struct.stat** %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %5
%12 = load %struct.stat*, %struct.stat** %6
%13 = call i32 @fstatx(i32 %11, %struct.stat* %12, i32 4, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__fxstat(i32 %0, i32 %1, %struct.stat* %2) {
%4 = icmp eq i32 %0, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @fstatx(i32 %1, %struct.stat* %2, i32 4, i32 0)
ret i32 %7
}
/* Type definitions */
struct tms {
  scalar_t__ tms_cstime;
  scalar_t__ tms_cutime;
  scalar_t__ tms_utime;
};
typedef scalar_t__ clock_t;

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
clock_t mclock_(void) {
  struct tms buf;
  times(&buf);
  return (buf.tms_utime + buf.tms_cutime + buf.tms_cstime);
}


x86 assembly (clang, -O0):
<mclock_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
call   1030 <times@plt>
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mclock_>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <times@plt>
mov    0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    (%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.tms = type { i64, i64, i64 }
define i64 @mclock_() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
%3 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 2
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = add nsw i64 %4, %6
%8 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.tms = type { i64, i64, i64 }
define i64 @mclock_() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 2
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = add nsw i64 %7, %5
%9 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = add nsw i64 %8, %10
ret i64 %11
}
long double test_expm1l(long double x) { return __builtin_expm1l(x); }


x86 assembly (clang, -O0):
<test_expm1l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expm1l@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_expm1l>:
jmp    1030 <expm1l@plt>

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

LLVM IR (-O2):
define x86_fp80 @test_expm1l(x86_fp80 %0) {
%2 = tail call x86_fp80 @expm1l(x86_fp80 %0)
ret x86_fp80 %2
}
int fun538() { return 538; }


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

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

LLVM IR (-O0):
define i32 @fun538() {
ret i32 538
}

LLVM IR (-O2):
define i32 @fun538() {
ret i32 538
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ferror(FILE *stream __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ferror(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "link", message); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [5 x i8] c"link\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ tempnam(char const *, char const *);
char *unique_filename(const char *path, const char *prefix) {
  return ((char *)tempnam(path, prefix));
}


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

x86 assembly (clang, -O2):
<unique_filename>:
jmp    1030 <tempnam@plt>

LLVM IR (-O0):
define i8* @unique_filename(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 i64 @tempnam(i8* %5, i8* %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @unique_filename(i8* %0, i8* %1) {
%3 = tail call i64 @tempnam(i8* %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}