xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lineprint2(char *, long, unsigned char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, unsigned char);
void ind_zpix(char *outf, long ctr, unsigned char *op, char *str) {
  char buf[256];
  sprintf(buf, "%-4s ($%02X,X)", str, *(op + 1));
  lineprint2(outf, ctr, op, buf);
}


x86 assembly (clang, -O0):
<ind_zpix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rax
lea    0xeaf(%rip),%rsi
movzbl 0x1(%rax),%ecx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x120(%rbp),%rcx
call   1030 <lineprint2@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ind_zpix>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
movzbl 0x1(%rdx),%eax
lea    0xebe(%rip),%rsi
mov    %rsp,%r12
mov    %r12,%rdi
mov    %rcx,%rdx
mov    %eax,%ecx
call   1040 <sprintf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r12,%rcx
call   1030 <lineprint2@plt>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%-4s ($%02X,X)\00"
define void @ind_zpix(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %11, i8 zeroext %14)
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = load i8*, i8** %7
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%20 = call i32 @lineprint2(i8* %16, i64 %17, i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%-4s ($%02X,X)\00"
define void @ind_zpix(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = getelementptr inbounds i8, i8* %2, i64 1
%8 = load i8, i8* %7
%9 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3, i8 zeroext %8)
%10 = call i32 @lineprint2(i8* %0, i64 %1, i8* %2, i8* %6)
ret void
}
int test_imm_67int8_mem(signed char *val) {
  return ((*val) & (-0x67 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_67int8_mem>:
testb  $0x99,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_67int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -103
%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_67int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -103
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int addr_to_chunks_offset(void *addr, void *base) {
  return (((unsigned int *)addr - (unsigned int *)base) % (32 * (1 << 4))) /
         (1 << 4);
}


x86 assembly (clang, -O0):
<addr_to_chunks_offset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    $0x200,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    $0x10,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_to_chunks_offset>:
sub    %rsi,%rdi
sar    $0x2,%rdi
lea    0x1ff(%rdi),%eax
test   %rdi,%rdi
cmovns %edi,%eax
and    $0xfe00,%eax
mov    %edi,%ecx
sub    %eax,%ecx
neg    %eax
add    %edi,%eax
add    $0xf,%eax
test   %cx,%cx
cmovns %ecx,%eax
cwtl
sar    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @addr_to_chunks_offset(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 i8*, i8** %4
%8 = bitcast i8* %7 to i32*
%9 = ptrtoint i32* %6 to i64
%10 = ptrtoint i32* %8 to i64
%11 = sub i64 %9, %10
%12 = sdiv exact i64 %11, 4
%13 = srem i64 %12, 512
%14 = sdiv i64 %13, 16
%15 = trunc i64 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @addr_to_chunks_offset(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = ashr exact i64 %5, 2
%7 = srem i64 %6, 512
%8 = trunc i64 %7 to i16
%9 = sdiv i16 %8, 16
%10 = sext i16 %9 to i32
ret i32 %10
}
unsigned short uchar2ushort(unsigned char c) {
  return (unsigned short)c * 0xFF;
}


x86 assembly (clang, -O0):
<uchar2ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movzwl %ax,%eax
imul   $0xff,%eax,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uchar2ushort>:
mov    %edi,%eax
shl    $0x8,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @uchar2ushort(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = zext i16 %4 to i32
%6 = mul nsw i32 %5, 255
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @uchar2ushort(i8 zeroext %0) {
%2 = zext i8 %0 to i16
%3 = mul nuw i16 %2, 255
ret i16 %3
}
int foo(_Bool x) { return (x ^ 1); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
xor    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    $0x1,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @foo(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = zext i1 %5 to i32
%7 = xor i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i1 zeroext %0) {
%2 = xor i1 %0, true
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char *string_copy(char *);
int /*<<< orphan*/ string_free2(char *);
void string_free3(char *s) {
  char *t = string_copy(s);
  string_free2(s);
  *t = 'a';
}


x86 assembly (clang, -O0):
<string_free3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <string_copy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <string_free2@plt>
mov    -0x10(%rbp),%rax
movb   $0x61,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_free3>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <string_copy@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <string_free2@plt>
movb   $0x61,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @string_free3(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @string_copy(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @string_free2(i8* %6)
%8 = load i8*, i8** %3
store i8 97, i8* %8
ret void
}

LLVM IR (-O2):
define void @string_free3(i8* %0) {
%2 = tail call i8* @string_copy(i8* %0)
%3 = tail call i32 @string_free2(i8* %0)
store i8 97, i8* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrf_set_config(int);
void __attribute__((unused)) nrf_prx_wakeup(void) {
  nrf_set_config(0x08 | 0x02 | 0x01);
}


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

x86 assembly (clang, -O2):
<nrf_prx_wakeup>:
mov    $0xb,%edi
jmp    1030 <nrf_set_config@plt>

LLVM IR (-O0):
define void @nrf_prx_wakeup() {
%1 = call i32 @nrf_set_config(i32 11)
ret void
}

LLVM IR (-O2):
define void @nrf_prx_wakeup() {
%1 = tail call i32 @nrf_set_config(i32 11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_error_code_print(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_error_code_to_string(uint16_t type, uint16_t code) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_error_code_print(stream, type, code);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_error_code_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1050 <ofl_error_code_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_error_code_to_string>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <ofl_error_code_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    (%rsp),%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_error_code_to_string(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = call i32* @open_memstream(i8** %5, i64* %6)
store i32* %8, i32** %7
%9 = load i32*, i32** %7
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @ofl_error_code_print(i32* %9, i32 %10, i32 %11)
%13 = load i32*, i32** %7
%14 = call i32 @fclose(i32* %13)
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @ofl_error_code_to_string(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast i8** %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i32* @open_memstream(i8** %3, i64* %4)
%8 = call i32 @ofl_error_code_print(i32* %7, i32 %0, i32 %1)
%9 = call i32 @fclose(i32* %7)
%10 = load i8*, i8** %3
ret i8* %10
}
void unlock(int i) {}


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

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

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

LLVM IR (-O2):
define void @unlock(i32 %0) {
ret void
}
void sysfs_filename(char *filename, int len, int pin, const char *function) {
  snprintf(filename, len, "%s/pio%c%d/%s", "/sys/class/gpio", 'A' + pin / 32,
           pin % 32, function);
}


x86 assembly (clang, -O0):
<sysfs_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rsi
mov    -0x10(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%r8d
add    $0x41,%r8d
mov    -0x10(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%r9d
mov    -0x18(%rbp),%rax
lea    0xea7(%rip),%rdx
lea    0xeae(%rip),%rcx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs_filename>:
push   %rax
mov    %edx,%r9d
movslq %esi,%rsi
lea    0x1f(%r9),%eax
test   %edx,%edx
cmovns %edx,%eax
mov    %eax,%r8d
sar    $0x5,%r8d
add    $0x41,%r8d
and    $0xffffffe0,%eax
sub    %eax,%r9d
mov    %rcx,(%rsp)
lea    0xec4(%rip),%rdx
lea    0xecb(%rip),%rcx
xor    %eax,%eax
call   1030 <snprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s/pio%c%d/%s\00"
@.str.1 = [16 x i8] c"/sys/class/gpio\00"
define void @sysfs_filename(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = load i32, i32* %7
%13 = sdiv i32 %12, 32
%14 = add nsw i32 65, %13
%15 = load i32, i32* %7
%16 = srem i32 %15, 32
%17 = load i8*, i8** %8
%18 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %9, i64 %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %16, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s/pio%c%d/%s\00"
@.str.1 = [16 x i8] c"/sys/class/gpio\00"
define void @sysfs_filename(i8* nocapture writeonly %0, i32 %1, i32 %2, i8* %3) {
%5 = sext i32 %1 to i64
%6 = sdiv i32 %2, 32
%7 = add nsw i32 %6, 65
%8 = srem i32 %2, 32
%9 = tail call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i8* %3)
ret void
}
/* Variables and functions */
double exp(double);
double funkcja(double x) { return exp(x) + exp(-x); }


x86 assembly (clang, -O0):
<funkcja>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funkcja>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xece(%rip),%xmm0
call   1030 <exp@plt>
addsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @funkcja(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
%5 = load double, double* %2
%6 = fneg double %5
%7 = call double @exp(double %6)
%8 = fadd double %4, %7
ret double %8
}

LLVM IR (-O2):
define double @funkcja(double %0) {
%2 = tail call double @exp(double %0)
%3 = fneg double %0
%4 = tail call double @exp(double %3)
%5 = fadd double %2, %4
ret double %5
}
int inArray(char ch, char str[], int size) {
  int i, j = -1;
  for (i = 0; i < size; i++) {
    if (ch == str[i]) {
      j = i;
      break;
    }
  }
  return j;
}


x86 assembly (clang, -O0):
<inArray>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1161 <inArray+0x61>
movsbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    114e <inArray+0x4e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1161 <inArray+0x61>
jmp    1153 <inArray+0x53>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111f <inArray+0x1f>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inArray>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111f <inArray+0x1f>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %dil,(%rsi,%rcx,1)
je     1120 <inArray+0x20>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <inArray+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @inArray(i8 signext %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 -1, i32* %8
store i32 0, i32* %7
br label %9
9: ; preds = %26, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %29
13: ; preds = %9
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = load i8*, i8** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %15, %21
br i1 %22, label %23, label %25
23: ; preds = %13
%24 = load i32, i32* %7
store i32 %24, i32* %8
br label %29
25: ; preds = %13
br label %26
26: ; preds = %25
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %9
29: ; preds = %23, %9
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @inArray(i8 signext %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
double inv_q16_to_double(long q16) { return (double)q16 / (1L << 16); }


x86 assembly (clang, -O0):
<inv_q16_to_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_q16_to_double>:
cvtsi2sd %rdi,%xmm0
mulsd  0xef3(%rip),%xmm0
ret

LLVM IR (-O0):
define double @inv_q16_to_double(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to double
%5 = fdiv double %4, 6.553600e+04
ret double %5
}

LLVM IR (-O2):
define double @inv_q16_to_double(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = fmul double %2, 0x3EF0000000000000
ret double %3
}
/* Variables and functions */
int LengthLimitedCodeLengths(size_t const *, size_t, int, unsigned int *);
int /*<<< orphan*/ assert(int);
void CalculateBitLengths(const size_t *count, size_t n, int maxbits,
                         unsigned *bitlengths) {
  int error = LengthLimitedCodeLengths(count, n, maxbits, bitlengths);
  (void)error;
  assert(!error);
}


x86 assembly (clang, -O0):
<CalculateBitLengths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <LengthLimitedCodeLengths@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalculateBitLengths>:
push   %rax
call   1030 <LengthLimitedCodeLengths@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @CalculateBitLengths(i64* %0, i64 %1, i32 %2, i32* %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i64* %0, i64** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = load i64*, i64** %5
%11 = load i64, i64* %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = call i32 @LengthLimitedCodeLengths(i64* %10, i64 %11, i32 %12, i32* %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = load i32, i32* %9
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret void
}

LLVM IR (-O2):
define void @CalculateBitLengths(i64* %0, i64 %1, i32 %2, i32* %3) {
%5 = tail call i32 @LengthLimitedCodeLengths(i64* %0, i64 %1, i32 %2, i32* %3)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ f_indirect();
main() {
  f_indirect();
  return f(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f_indirect@plt>
mov    $0x1,%edi
call   1040 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f_indirect@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <f@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f_indirect()
%3 = call i32 @f(i32 1)
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f_indirect()
%2 = tail call i32 @f(i32 1)
ret i32 %2
}
void protocol_smtp_endclient(struct client *c) {}


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

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

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

LLVM IR (-O2):
%struct.client = type opaque
define void @protocol_smtp_endclient(%struct.client* nocapture %0) {
ret void
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
long long get_time() {
  struct timespec time;
  clock_gettime(CLOCK_REALTIME, &time);
  return (long long)time.tv_sec * 1000000 + time.tv_nsec / 1000;
}


x86 assembly (clang, -O0):
<get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time>:
sub    $0x18,%rsp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0xf4240,0x10(%rsp),%rcx
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @get_time() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = add nsw i64 %6, %10
ret i64 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@CLOCK_REALTIME = global i32 0
define i64 @get_time() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = mul nsw i64 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = sext i32 %10 to i64
%12 = add nsw i64 %7, %11
ret i64 %12
}
main() {
  int true = 1;
#pragma omp parallel for
  do {
    true = 0;
  } while (true);
  printf("err_parallel_for 003 : FAILED, can not compile this program.\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1126 <main+0x16>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [62 x i8] c"err_parallel_for 003 : FAILED, can not compile this program.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %4, %0
store i32 0, i32* %2
br label %4
4: ; preds = %3
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [61 x i8] c"err_parallel_for 003 : FAILED, can not compile this program.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void execShellcodeHelp() { printf("executes provided linux command\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"executes provided linux command\0A\00"
define void @execShellcodeHelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [32 x i8] c"executes provided linux command\00"
define void @execShellcodeHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_ONEREQ;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_ONEREQ_it;
void OCSP_ONEREQ_free(OCSP_ONEREQ *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_ONEREQ_it);
}


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

x86 assembly (clang, -O2):
<OCSP_ONEREQ_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@OCSP_ONEREQ_it = global i32 0
define void @OCSP_ONEREQ_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @OCSP_ONEREQ_it)
ret void
}

LLVM IR (-O2):
@OCSP_ONEREQ_it = global i32 0
define void @OCSP_ONEREQ_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_ONEREQ_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void seventeen(const int d) {
  printf("The radius of the circle is: %f.\n", d / 2);
}


x86 assembly (clang, -O0):
<seventeen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seventeen>:
mov    %edi,%esi
shr    $0x1f,%esi
add    %edi,%esi
sar    %esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"The radius of the circle is: %f.\0A\00"
define void @seventeen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 2
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"The radius of the circle is: %f.\0A\00"
define void @seventeen(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_be32(int /*<<< orphan*/, void *);
void put_unaligned_be32(u_int32_t val, void *p) {
  __put_unaligned_be32(val, p);
}


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

x86 assembly (clang, -O2):
<put_unaligned_be32>:
jmp    1030 <__put_unaligned_be32@plt>

LLVM IR (-O0):
define void @put_unaligned_be32(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 = call i32 @__put_unaligned_be32(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_be32(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_be32(i32 %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *wrongargs(char *name, char *what) {
  static char buf[100];
  sprintf(buf, "%s: too %s arguments", name, what);
  return buf;
}


x86 assembly (clang, -O0):
<wrongargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0x2f11(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2efe(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrongargs>:
push   %rbx
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0x2f22(%rip),%rbx
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@wrongargs.buf = internal global [100 x i8] zeroinitializer
@.str = [21 x i8] c"%s: too %s arguments\00"
define i8* @wrongargs(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @wrongargs.buf, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @wrongargs.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@wrongargs.buf = internal global [100 x i8] zeroinitializer
@.str = [21 x i8] c"%s: too %s arguments\00"
define i8* @wrongargs(i8* %0, i8* %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @wrongargs.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @wrongargs.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int yyerror(const char *s) {
  fprintf(stderr, "EEK, parse error!  Message: [%s]\n", s);
  { fprintf(stderr, "Line %3d of File %s \n", 572, "snazzle.y"); };
  return -1;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
mov    $0x23c,%edx
lea    0xee5(%rip),%rcx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeee(%rip),%rsi
lea    0xefd(%rip),%rcx
mov    $0x23c,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"EEK, parse error! Message: [%s]\0A\00"
@.str.1 = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.2 = [10 x i8] c"snazzle.y\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 572, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"EEK, parse error! Message: [%s]\0A\00"
@.str.1 = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.2 = [10 x i8] c"snazzle.y\00"
define i32 @yyerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 572, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_calling_line_indetification_notification_get_type(
    const uint8_t *event) {
  return event[3];
}


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

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

LLVM IR (-O0):
define i32 @hfp_subevent_calling_line_indetification_notification_get_type(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @hfp_subevent_calling_line_indetification_notification_get_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
ret i32 %3
}
int _cups_isspace(int ch) {
  return (ch == ' ' || ch == '\f' || ch == '\n' || ch == '\r' || ch == '\t' ||
          ch == '\v');
}


x86 assembly (clang, -O0):
<_cups_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_cups_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_cups_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_cups_isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_cups_isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <_cups_isspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_cups_isspace>:
cmp    $0x20,%edi
ja     111d <_cups_isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <_cups_isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @_cups_isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 12
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 13
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @_cups_isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int ndgt(int x) {
  int c = 0;
  while (x > 0) {
    x /= 10;
    c++;
  }
  return c;
}


x86 assembly (clang, -O0):
<ndgt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1134 <ndgt+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ndgt+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndgt>:
xor    %eax,%eax
test   %edi,%edi
jle    1124 <ndgt+0x24>
mov    $0xcccccccd,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <ndgt+0x10>
ret

LLVM IR (-O0):
define i32 @ndgt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @ndgt(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ chDbgCheckClassS();
scalar_t__ chSchCanYieldS();
int /*<<< orphan*/ chSchDoRescheduleBehind();
void chSchDoYieldS(void) {
  chDbgCheckClassS();
  if (chSchCanYieldS()) {
    chSchDoRescheduleBehind();
  }
}


x86 assembly (clang, -O0):
<chSchDoYieldS>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <chDbgCheckClassS@plt>
mov    $0x0,%al
call   1040 <chSchCanYieldS@plt>
cmp    $0x0,%rax
je     1153 <chSchDoYieldS+0x23>
mov    $0x0,%al
call   1050 <chSchDoRescheduleBehind@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chSchDoYieldS>:
push   %rax
xor    %eax,%eax
call   1030 <chDbgCheckClassS@plt>
xor    %eax,%eax
call   1040 <chSchCanYieldS@plt>
test   %rax,%rax
je     114c <chSchDoYieldS+0x1c>
xor    %eax,%eax
pop    %rcx
jmp    1050 <chSchDoRescheduleBehind@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @chSchDoYieldS() {
%1 = call i32 (...) @chDbgCheckClassS()
%2 = call i64 (...) @chSchCanYieldS()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @chSchDoRescheduleBehind()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @chSchDoYieldS() {
%1 = tail call i32 (...) @chDbgCheckClassS()
%2 = tail call i64 (...) @chSchCanYieldS()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 (...) @chSchDoRescheduleBehind()
br label %6
6: ; preds = %4, %0
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int UArray_OSPathSeparatorIsUnixSeparator(void) {
  return strcmp("/", "/") == 0;
}


x86 assembly (clang, -O0):
<UArray_OSPathSeparatorIsUnixSeparator>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rsi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UArray_OSPathSeparatorIsUnixSeparator>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i32 @UArray_OSPathSeparatorIsUnixSeparator() {
%1 = call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i32 @UArray_OSPathSeparatorIsUnixSeparator() {
%1 = tail call i64 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void error_callback(const char *msg, void *client_data) {
  FILE *stream = (FILE *)client_data;
  fprintf(stream, "[ERROR] %s", msg);
}


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

x86 assembly (clang, -O2):
<error_callback>:
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"[ERROR] %s\00"
define void @error_callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %3
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"[ERROR] %s\00"
define void @error_callback(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void log_add_entry(char *file, char *msg) {
  FILE *fp;
  fp = fopen(file, "a");
  fprintf(fp, msg);
  fclose(fp);
}


x86 assembly (clang, -O0):
<log_add_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_add_entry>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define void @log_add_entry(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* %9)
%11 = load i32*, i32** %5
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define void @log_add_entry(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32* %3, i8* %1)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ missingArgs();
int /*<<< orphan*/ syntaxError();
int checkValidSize(int size, int stage) {
  if (size <= 0 && stage > 0) {
    missingArgs();
    return 1;
  } else if (size > 0 && stage == 0) {
    syntaxError();
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkValidSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1155 <checkValidSize+0x35>
cmpl   $0x0,-0xc(%rbp)
jle    1155 <checkValidSize+0x35>
mov    $0x0,%al
call   1030 <missingArgs@plt>
movl   $0x1,-0x4(%rbp)
jmp    1188 <checkValidSize+0x68>
cmpl   $0x0,-0x8(%rbp)
jle    117c <checkValidSize+0x5c>
cmpl   $0x0,-0xc(%rbp)
jne    117c <checkValidSize+0x5c>
mov    $0x0,%al
call   1040 <syntaxError@plt>
movl   $0x2,-0x4(%rbp)
jmp    1188 <checkValidSize+0x68>
jmp    1181 <checkValidSize+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkValidSize>:
push   %rax
test   %edi,%edi
jg     1137 <checkValidSize+0x17>
test   %esi,%esi
jle    1137 <checkValidSize+0x17>
xor    %eax,%eax
call   1030 <missingArgs@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
test   %edi,%edi
jle    114d <checkValidSize+0x2d>
test   %esi,%esi
jne    114d <checkValidSize+0x2d>
xor    %eax,%eax
call   1040 <syntaxError@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @checkValidSize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @missingArgs()
store i32 1, i32* %3
br label %23
13: ; preds = %8, %2
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %5
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @syntaxError()
store i32 2, i32* %3
br label %23
21: ; preds = %16, %13
br label %22
22: ; preds = %21
store i32 0, i32* %3
br label %23
23: ; preds = %22, %19, %11
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @checkValidSize(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
%4 = icmp sgt i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @missingArgs()
br label %14
8: ; preds = %2
%9 = icmp sgt i32 %0, 0
%10 = icmp eq i32 %1, 0
%11 = and i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 (...) @syntaxError()
br label %14
14: ; preds = %8, %12, %6
%15 = phi i32 [ 1, %6 ], [ 2, %12 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ Exception(int);
void m68k_setstopped(void) { Exception(4); }


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

x86 assembly (clang, -O2):
<m68k_setstopped>:
mov    $0x4,%edi
jmp    1030 <Exception@plt>

LLVM IR (-O0):
define void @m68k_setstopped() {
%1 = call i32 @Exception(i32 4)
ret void
}

LLVM IR (-O2):
define void @m68k_setstopped() {
%1 = tail call i32 @Exception(i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_SEQUENCE_ANY;

/* Variables and functions */
int /*<<< orphan*/ ASN1_SEQUENCE_ANY_it;
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int i2d_ASN1_SEQUENCE_ANY(const ASN1_SEQUENCE_ANY *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_SEQUENCE_ANY_it);
}


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

x86 assembly (clang, -O2):
<i2d_ASN1_SEQUENCE_ANY>:
mov    0x2ee1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@ASN1_SEQUENCE_ANY_it = global i32 0
define i32 @i2d_ASN1_SEQUENCE_ANY(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 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @ASN1_SEQUENCE_ANY_it)
ret i32 %7
}

LLVM IR (-O2):
@ASN1_SEQUENCE_ANY_it = global i32 0
define i32 @i2d_ASN1_SEQUENCE_ANY(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @ASN1_SEQUENCE_ANY_it)
ret i32 %3
}