xunge/DecIR huggingface dataset:
int Bematech_FI_Cancelamentos(Var, Retorno) {
  return Formata("\x1b|35|04|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_Cancelamentos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_Cancelamentos>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|04|\1B\00"
define i32 @Bematech_FI_Cancelamentos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|04|\1B\00"
define i32 @Bematech_FI_Cancelamentos(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int unlink(char *);
int main() {
  int rt = unlink("hello");
  if (rt == 0) {
    printf("succes%d\n", rt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <unlink@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1157 <main+0x37>
mov    -0x8(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <unlink@plt>
test   %eax,%eax
jne    113f <main+0x1f>
lea    0xece(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [10 x i8] c"succes%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @unlink(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [10 x i8] c"succes%d\0A\00"
define i32 @main() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0)
br label %5
5: ; preds = %3, %0
ret i32 0
}
int iscntrl(int c) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMREB_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMREB_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMREB_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
__attribute__((always_)) int test_and_set_bit(int nr,
                                              volatile unsigned long *addr) {
  int oldbit;
  __asm__ __volatile__("lock ; "
                       "btsl %2,%1\n\tsbbl %0,%0"
                       : "=r"(oldbit), "=m"((*(volatile long *)addr))
                       : "Ir"(nr)
                       : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
lock bts %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_set_bit>:
lock bts %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm sideeffect "lock ; btsl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_and_set_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "lock ; btsl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0)
ret i32 %3
}
/* Variables and functions */
int strlen(char const *);
scalar_t__ strncmp(char const *, char *, int);
int socket_is_broadcast_address(char const *ip) {
  return strncmp(ip + strlen(ip) - 3, "255", 3) == 0;
}


x86 assembly (clang, -O0):
<socket_is_broadcast_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
cltq
add    %rax,%rdi
add    $0xfffffffffffffffd,%rdi
lea    0xeaf(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_is_broadcast_address>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
cltq
lea    (%rbx,%rax,1),%rdi
add    $0xfffffffffffffffd,%rdi
lea    0xec6(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"255\00"
define i32 @socket_is_broadcast_address(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
%8 = getelementptr inbounds i8, i8* %7, i64 -3
%9 = call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"255\00"
define i32 @socket_is_broadcast_address(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -3
%6 = tail call i64 @strncmp(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
int Operand_simm12b_encode(unsigned int *valp) {
  unsigned imm12b_0, simm12b_0;
  simm12b_0 = *valp;
  imm12b_0 = (simm12b_0 & 0xfff);
  *valp = imm12b_0;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_simm12b_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0xfff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_simm12b_encode>:
andl   $0xfff,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_simm12b_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 4095
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32*, i32** %2
store i32 %9, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_simm12b_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 4095
store i32 %3, i32* %0
ret i32 0
}
void INT_Excep_PERIB_INTB182(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB182() {
ret void
}
/* Type definitions */
typedef scalar_t__ GLdouble;
typedef scalar_t__ GLbyte;

/* Variables and functions */
void shoveSbyte(GLdouble value, int index, void *data) {
  ((GLbyte *)data)[index] = (GLbyte)value;
}


x86 assembly (clang, -O0):
<shoveSbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<shoveSbyte>:
movslq %esi,%rax
mov    %rdi,(%rdx,%rax,8)
ret

LLVM IR (-O0):
define void @shoveSbyte(i64 %0, i32 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i8*
store i64 %0, i64* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i64, i64* %4
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i64*
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %9, i64 %11
store i64 %7, i64* %12
ret void
}

LLVM IR (-O2):
define void @shoveSbyte(i64 %0, i32 %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i64*
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %0, i64* %6
ret void
}
double sphere_volume(double r) { return 0.75 * 3.1415926 * r * r * r; }


x86 assembly (clang, -O0):
<sphere_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sphere_volume>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sphere_volume(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 0x4002D97C79CE2238, %3
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = load double, double* %2
%8 = fmul double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @sphere_volume(double %0) {
%2 = fmul double %0, 0x4002D97C79CE2238
%3 = fmul double %2, %0
%4 = fmul double %3, %0
ret double %4
}
unsigned short DoS_cksum(unsigned short *data, int length) {
  register int left = length;
  register unsigned short *word = data;
  register int sum = 0;
  unsigned short ret = 0;
  while (left > 1) {
    sum += *word++;
    left -= 2;
  }
}


x86 assembly (clang, -O0):
<DoS_cksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movw   $0x0,-0x26(%rbp)
cmpl   $0x1,-0x18(%rbp)
jle    1156 <DoS_cksum+0x56>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x20(%rbp)
movzwl (%rax),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    1126 <DoS_cksum+0x26>
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @DoS_cksum(i16* %0, i32 %1) {
%3 = alloca i16
%4 = alloca i16*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i16*
%8 = alloca i32
%9 = alloca i16
store i16* %0, i16** %4
store i32 %1, i32* %5
%10 = load i32, i32* %5
store i32 %10, i32* %6
%11 = load i16*, i16** %4
store i16* %11, i16** %7
store i32 0, i32* %8
store i16 0, i16* %9
br label %12
12: ; preds = %15, %2
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 1
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i16*, i16** %7
%17 = getelementptr inbounds i16, i16* %16, i32 1
store i16* %17, i16** %7
%18 = load i16, i16* %16
%19 = zext i16 %18 to i32
%20 = load i32, i32* %8
%21 = add nsw i32 %20, %19
store i32 %21, i32* %8
%22 = load i32, i32* %6
%23 = sub nsw i32 %22, 2
store i32 %23, i32* %6
br label %12
24: ; preds = %12
%25 = load i16, i16* %3
ret i16 %25
}

LLVM IR (-O2):
define zeroext i16 @DoS_cksum(i16* nocapture readnone %0, i32 %1) {
ret i16 undef
}
int test_imm_91uint16_mem(unsigned short *val) {
  return ((*val) & (-0x91 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_91uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -145
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *trim_left(int /*<<< orphan*/);
int /*<<< orphan*/ trim_right(char *);
char *trim(char *source) { return trim_left(trim_right(source)); }


x86 assembly (clang, -O0):
<trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <trim_right@plt>
mov    %eax,%edi
call   1040 <trim_left@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trim>:
push   %rax
call   1030 <trim_right@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <trim_left@plt>

LLVM IR (-O0):
define i8* @trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @trim_right(i8* %3)
%5 = call i8* @trim_left(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @trim(i8* %0) {
%2 = tail call i32 @trim_right(i8* %0)
%3 = tail call i8* @trim_left(i32 %2)
ret i8* %3
}
void test60_Cpu_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test60_Cpu_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\nMy formula for success?\nRise early, work late, strike oil.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [60 x i8] c"\0AMy formula for success?\0ARise early, work late, strike oil.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [60 x i8] c"\0AMy formula for success?\0ARise early, work late, strike oil.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void ERR_remove_state(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_remove_state() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ awrite(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
ssize_t writestr(int f, char *s) { return awrite(f, s, strlen(s)); }


x86 assembly (clang, -O0):
<writestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <awrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestr>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <awrite@plt>

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

LLVM IR (-O2):
define i32 @writestr(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @awrite(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
void ff_hevc_put_hevc_bi_qpel_v32_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v32_8_avx2() {
ret void
}
/* Variables and functions */
size_t HadTu_size(void const *);
size_t SubEvt_hdrSize();
size_t SubEvt_dataSize(const void *my) {
  return HadTu_size(my) - SubEvt_hdrSize();
}


x86 assembly (clang, -O0):
<SubEvt_dataSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <HadTu_size@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <SubEvt_hdrSize@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SubEvt_dataSize>:
push   %rbx
call   1040 <HadTu_size@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <SubEvt_hdrSize@plt>
sub    %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @SubEvt_dataSize(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @HadTu_size(i8* %3)
%5 = call i64 (...) @SubEvt_hdrSize()
%6 = sub i64 %4, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @SubEvt_dataSize(i8* %0) {
%2 = tail call i64 @HadTu_size(i8* %0)
%3 = tail call i64 (...) @SubEvt_hdrSize()
%4 = sub i64 %2, %3
ret i64 %4
}
/* Type definitions */
struct libalias {
  int dummy;
};
struct ip {
  int dummy;
};
struct alias_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AliasHandleDummy(struct libalias *, struct ip *,
                                    struct alias_data *);
int protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
  AliasHandleDummy(la, pip, ah);
  return (0);
}


x86 assembly (clang, -O0):
<protohandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <AliasHandleDummy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protohandler>:
push   %rax
call   1030 <AliasHandleDummy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.libalias = type { i32 }
%struct.ip = type { i32 }
%struct.alias_data = type { i32 }
define i32 @protohandler(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* %2) {
%4 = alloca %struct.libalias*
%5 = alloca %struct.ip*
%6 = alloca %struct.alias_data*
store %struct.libalias* %0, %struct.libalias** %4
store %struct.ip* %1, %struct.ip** %5
store %struct.alias_data* %2, %struct.alias_data** %6
%7 = load %struct.libalias*, %struct.libalias** %4
%8 = load %struct.ip*, %struct.ip** %5
%9 = load %struct.alias_data*, %struct.alias_data** %6
%10 = call i32 @AliasHandleDummy(%struct.libalias* %7, %struct.ip* %8, %struct.alias_data* %9)
ret i32 0
}

LLVM IR (-O2):
%struct.libalias = type { i32 }
%struct.ip = type { i32 }
%struct.alias_data = type { i32 }
define i32 @protohandler(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* %2) {
%4 = tail call i32 @AliasHandleDummy(%struct.libalias* %0, %struct.ip* %1, %struct.alias_data* %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ ehnlc_iscntrl(int);
scalar_t__ ehnlc_isspace(int);
int ehnlc_isgraph(int c) {
  return (c < 0 || ehnlc_isspace(c) || ehnlc_iscntrl(c) || c >= 128) ? 0
                                                                     : 32768;
}


x86 assembly (clang, -O0):
<ehnlc_isgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     117b <ehnlc_isgraph+0x5b>
mov    -0x4(%rbp),%edi
call   1040 <ehnlc_isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    117b <ehnlc_isgraph+0x5b>
mov    -0x4(%rbp),%edi
call   1030 <ehnlc_iscntrl@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    117b <ehnlc_isgraph+0x5b>
cmpl   $0x80,-0x4(%rbp)
setge  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
mov    $0x8000,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehnlc_isgraph>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
test   %edi,%edi
js     114f <ehnlc_isgraph+0x2f>
mov    %edi,%ebp
call   1040 <ehnlc_isspace@plt>
test   %rax,%rax
jne    114f <ehnlc_isgraph+0x2f>
mov    %ebp,%edi
call   1030 <ehnlc_iscntrl@plt>
test   %rax,%rax
jne    114f <ehnlc_isgraph+0x2f>
xor    %ebx,%ebx
cmp    $0x80,%ebp
setb   %bl
shl    $0xf,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ehnlc_isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @ehnlc_isspace(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i64 @ehnlc_iscntrl(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %9
%14 = load i32, i32* %2
%15 = icmp sge i32 %14, 128
br label %16
16: ; preds = %13, %9, %5, %1
%17 = phi i1 [ true, %9 ], [ true, %5 ], [ true, %1 ], [ %15, %13 ]
%18 = zext i1 %17 to i64
%19 = select i1 %17, i32 0, i32 32768
ret i32 %19
}

LLVM IR (-O2):
define i32 @ehnlc_isgraph(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i64 @ehnlc_isspace(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = tail call i64 @ehnlc_iscntrl(i32 %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = icmp ugt i32 %0, 127
%11 = select i1 %10, i32 0, i32 32768
br label %12
12: ; preds = %9, %6, %3, %1
%13 = phi i32 [ 0, %6 ], [ 0, %3 ], [ 0, %1 ], [ %11, %9 ]
ret i32 %13
}
int main(void) {
  char *getenv3(char *);
  printf("%s\n", getenv3("PWD"));
  printf("%d\n", my_sleep(5));
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1040 <getenv3@plt>
mov    %rax,%rsi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x0,%al
call   1060 <my_sleep@plt>
mov    %eax,%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1050 <getenv3@plt>
mov    %rax,%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
xor    %eax,%eax
call   1070 <my_sleep@plt>
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"PWD\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* @getenv3(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (i32, ...) bitcast (i32 (...)* @my_sleep to i32 (i32, ...)*)(i32 5)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %4)
unreachable
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"PWD\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i8* @getenv3(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) %1)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @my_sleep to i32 (i32, ...)*)(i32 5)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %3)
tail call void @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void main() {
  int i;
  printf("size =%d", sizeof(i));
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"size =%d\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
void *alignptr(void *p, int alignment) {
  return (void *)(((unsigned long)p + alignment - 1) & ~(alignment - 1));
}


x86 assembly (clang, -O0):
<alignptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
sub    $0x1,%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alignptr>:
movslq %esi,%rax
lea    (%rdi,%rax,1),%rcx
add    $0xffffffffffffffff,%rcx
neg    %eax
cltq
and    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @alignptr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = add i64 %6, %8
%10 = sub i64 %9, 1
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = xor i32 %12, -1
%14 = sext i32 %13 to i64
%15 = and i64 %10, %14
%16 = inttoptr i64 %15 to i8*
ret i8* %16
}

LLVM IR (-O2):
define i8* @alignptr(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = sext i32 %1 to i64
%5 = add i64 %3, -1
%6 = add i64 %5, %4
%7 = sub i32 0, %1
%8 = sext i32 %7 to i64
%9 = and i64 %6, %8
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}
int klogctl(type, bufp, len)
int type;
char *bufp;
int len;
{
  switch (type) {}
  return 0;
}


x86 assembly (clang, -O0):
<klogctl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @klogctl(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 i32, i32* %4
switch i32 %7, label %8 [
]
8: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @klogctl(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_with_tab(char *);
int /*<<< orphan*/ print_label(int);
void gen_jump(int label) {
  output_with_tab("lbra ");
  print_label(label);
  newline();
}


x86 assembly (clang, -O0):
<gen_jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    -0x4(%rbp),%edi
call   1040 <print_label@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_jump>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1050 <output_with_tab@plt>
mov    %ebx,%edi
call   1040 <print_label@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"lbra \00"
define void @gen_jump(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @print_label(i32 %4)
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"lbra \00"
define void @gen_jump(i32 %0) {
%2 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_label(i32 %0)
%4 = tail call i32 (...) @newline()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_multprec_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(495, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_multprec_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ef,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_multprec_start_solutions>:
mov    $0x1ef,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_multprec_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 495, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_multprec_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 495, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int do_451() { return 451; }


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

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

LLVM IR (-O0):
define i32 @do_451() {
ret i32 451
}

LLVM IR (-O2):
define i32 @do_451() {
ret i32 451
}
float noise(void) {
  static int seed = 1996;
  float rand;
  const int ia = 853, im = 981287;
  seed = (seed * ia) % im;
  rand = ((float)seed) / ((float)(im - 1)) - 0.5;
  return rand;
}


x86 assembly (clang, -O0):
<noise>:
push   %rbp
mov    %rsp,%rbp
movl   $0x355,-0x8(%rbp)
movl   $0xef927,-0xc(%rbp)
imul   $0x355,0x2f04(%rip),%eax
mov    $0xef927,%ecx
cltd
idiv   %ecx
mov    %edx,0x2ef6(%rip)
cvtsi2ssl 0x2eee(%rip),%xmm0
movss  0xece(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb6(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<noise>:
imul   $0x355,0x2f16(%rip),%eax
cltq
imul   $0x2231be4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x31,%rcx
add    %edx,%ecx
imul   $0xef927,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x2ef2(%rip)
cvtsi2ss %eax,%xmm0
divss  0xec6(%rip),%xmm0
addss  0xec2(%rip),%xmm0
ret

LLVM IR (-O0):
@noise.seed = internal global i32 1996
define float @noise() {
%1 = alloca float
%2 = alloca i32
%3 = alloca i32
store i32 853, i32* %2
store i32 981287, i32* %3
%4 = load i32, i32* @noise.seed
%5 = mul nsw i32 %4, 853
%6 = srem i32 %5, 981287
store i32 %6, i32* @noise.seed
%7 = load i32, i32* @noise.seed
%8 = sitofp i32 %7 to float
%9 = fdiv float %8, 9.812860e+05
%10 = fpext float %9 to double
%11 = fsub double %10, 5.000000e-01
%12 = fptrunc double %11 to float
store float %12, float* %1
%13 = load float, float* %1
ret float %13
}

LLVM IR (-O2):
@noise.seed = internal unnamed_addr global i32 1996
define float @noise() {
%1 = load i32, i32* @noise.seed
%2 = mul nsw i32 %1, 853
%3 = srem i32 %2, 981287
store i32 %3, i32* @noise.seed
%4 = sitofp i32 %3 to float
%5 = fdiv float %4, 9.812860e+05
%6 = fadd float %5, -5.000000e-01
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ min_size(size_t, size_t);
size_t strlcpy_srcmax(char *, char const *, size_t, int /*<<< orphan*/);
size_t strlcpy_with_max(char *dest, const char *src, size_t dest_size,
                        size_t src_size, size_t src_max_bytes) {
  return strlcpy_srcmax(dest, src, dest_size,
                        min_size(src_size, src_max_bytes));
}


x86 assembly (clang, -O0):
<strlcpy_with_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <min_size@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    %eax,%ecx
call   1030 <strlcpy_srcmax@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcpy_with_max>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %rcx,%rdi
mov    %r8,%rsi
call   1040 <min_size@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strlcpy_srcmax@plt>

LLVM IR (-O0):
define i64 @strlcpy_with_max(i8* %0, i8* %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i64, i64* %10
%16 = call i32 @min_size(i64 %14, i64 %15)
%17 = call i64 @strlcpy_srcmax(i8* %11, i8* %12, i64 %13, i32 %16)
ret i64 %17
}

LLVM IR (-O2):
define i64 @strlcpy_with_max(i8* %0, i8* %1, i64 %2, i64 %3, i64 %4) {
%6 = tail call i32 @min_size(i64 %3, i64 %4)
%7 = tail call i64 @strlcpy_srcmax(i8* %0, i8* %1, i64 %2, i32 %6)
ret i64 %7
}
/* Variables and functions */
unsigned int from_gps(int);
unsigned int ch_epoch(int ch) { return (from_gps((ch << 3) + 4)); }


x86 assembly (clang, -O0):
<ch_epoch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
add    $0x4,%edi
call   1030 <from_gps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_epoch>:
lea    0x4(,%rdi,8),%edi
jmp    1030 <from_gps@plt>

LLVM IR (-O0):
define i32 @ch_epoch(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 3
%5 = add nsw i32 %4, 4
%6 = call i32 @from_gps(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ch_epoch(i32 %0) {
%2 = shl i32 %0, 3
%3 = or i32 %2, 4
%4 = tail call i32 @from_gps(i32 %3)
ret i32 %4
}
void a_or_l(volatile void *p, long v) {
  __asm__("lock ; orq %1, %0" : "=m"(*(long *)p) : "r"(v) : "memory");
}


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

x86 assembly (clang, -O2):
<a_or_l>:
lock or %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @a_or_l(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %4
ret void
}

LLVM IR (-O2):
define void @a_or_l(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
tail call void asm "lock ; orq $1, $0", "=*m,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i64 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t diminuto_absolute_int16_t_f(int16_t value) {
  return (value < 0) ? -value : value;
}


x86 assembly (clang, -O0):
<diminuto_absolute_int16_t_f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <diminuto_absolute_int16_t_f+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <diminuto_absolute_int16_t_f+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @diminuto_absolute_int16_t_f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = load i32, i32* %2
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ %9, %8 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @diminuto_absolute_int16_t_f(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
int imx_sema4_mutex_destroy(struct imx_sema4_mutex *mutex_ptr) { return 0; }


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

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

LLVM IR (-O0):
%struct.imx_sema4_mutex = type opaque
define i32 @imx_sema4_mutex_destroy(%struct.imx_sema4_mutex* %0) {
%2 = alloca %struct.imx_sema4_mutex*
store %struct.imx_sema4_mutex* %0, %struct.imx_sema4_mutex** %2
ret i32 0
}

LLVM IR (-O2):
%struct.imx_sema4_mutex = type opaque
define i32 @imx_sema4_mutex_destroy(%struct.imx_sema4_mutex* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpys(char *, char *);
main() {
  char *s1 = "hello";
  char s2[50];
  strcpys(s2, s1);
  printf("%s\n", s2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpys@plt>
lea    -0x40(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xed4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpys@plt>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpys(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  scanf("%c", &c);
  c = 'z' - (c - 'a');
  printf("%c\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x5(%rbp)
lea    0xeac(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
mov    %al,0x7(%rsp)
movsbl %al,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 97
%7 = sub nsw i32 122, %6
%8 = trunc i32 %7 to i8
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
store i8 %4, i8* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
int expand_stack(int smax) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @expand_stack(i32 %0) {
ret i32 -1
}
/* Variables and functions */
double cosh(double);
double sinh(double);
double dAUX1bp0a(double x) {
  return (sinh(x) - x * cosh(x)) / (sinh(x) * sinh(x));
}


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

x86 assembly (clang, -O2):
<dAUX1bp0a>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1030 <sinh@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <cosh@plt>
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm2,%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sinh@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @dAUX1bp0a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sinh(double %3)
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @cosh(double %6)
%8 = fneg double %5
%9 = call double @llvm.fmuladd.f64(double %8, double %7, double %4)
%10 = load double, double* %2
%11 = call double @sinh(double %10)
%12 = load double, double* %2
%13 = call double @sinh(double %12)
%14 = fmul double %11, %13
%15 = fdiv double %9, %14
ret double %15
}

LLVM IR (-O2):
define double @dAUX1bp0a(double %0) {
%2 = tail call double @sinh(double %0)
%3 = tail call double @cosh(double %0)
%4 = fneg double %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %3, double %2)
%6 = tail call double @sinh(double %0)
%7 = tail call double @sinh(double %0)
%8 = fmul double %6, %7
%9 = fdiv double %5, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ RFM22BStatusHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void RFM22BStatusRequestUpdate() { UAVObjRequestUpdate(RFM22BStatusHandle()); }


x86 assembly (clang, -O0):
<RFM22BStatusRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RFM22BStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RFM22BStatusRequestUpdate() {
%1 = call i32 (...) @RFM22BStatusHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @RFM22BStatusRequestUpdate() {
%1 = tail call i32 (...) @RFM22BStatusHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bterm();
int /*<<< orphan*/ bterms();
void aterm() {
  bterm();
  bterms();
}


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

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

LLVM IR (-O0):
define void @aterm() {
%1 = call i32 (...) @bterm()
%2 = call i32 (...) @bterms()
ret void
}

LLVM IR (-O2):
define void @aterm() {
%1 = tail call i32 (...) @bterm()
%2 = tail call i32 (...) @bterms()
ret void
}