xunge/DecIR huggingface dataset:
void clr_bit(char *addr, int bit) {
  *(addr + bit / 8) = *(addr + bit / 8) & (~(1 << (bit % 8)));
}


x86 assembly (clang, -O0):
<clr_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%eax
mov    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    -0x19(%rbp),%dl
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_bit>:
mov    %esi,%ecx
lea    0x7(%rcx),%eax
test   %esi,%esi
cmovns %esi,%eax
sar    $0x3,%eax
cltq
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
not    %dl
and    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @clr_bit(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 = sdiv i32 %6, 8
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i32, i32* %4
%13 = srem i32 %12, 8
%14 = shl i32 1, %13
%15 = xor i32 %14, -1
%16 = and i32 %11, %15
%17 = trunc i32 %16 to i8
%18 = load i8*, i8** %3
%19 = load i32, i32* %4
%20 = sdiv i32 %19, 8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %18, i64 %21
store i8 %17, i8* %22
ret void
}

LLVM IR (-O2):
define void @clr_bit(i8* nocapture %0, i32 %1) {
%3 = sdiv i32 %1, 8
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = and i32 %1, 7
%8 = shl nuw nsw i32 1, %7
%9 = trunc i32 %8 to i8
%10 = xor i8 %9, -1
%11 = and i8 %6, %10
store i8 %11, i8* %5
ret void
}
/* Variables and functions */
int io_con_write(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int io_con_put_str(char const *str) { return io_con_write(str, strlen(str)); }


x86 assembly (clang, -O0):
<io_con_put_str>:
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   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <io_con_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_con_put_str>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <io_con_write@plt>

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

LLVM IR (-O2):
define i32 @io_con_put_str(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @io_con_write(i8* %0, i32 %2)
ret i32 %3
}
void Timer0B_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Timer0B_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Timer0B_Handler+0x9>
jmp    1109 <Timer0B_Handler+0x9>

x86 assembly (clang, -O2):
<Timer0B_Handler>:
jmp    1100 <Timer0B_Handler>

LLVM IR (-O0):
define void @Timer0B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Timer0B_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_compression_mode_pg(struct list_head *, int);
uint8_t set_3592_comp(struct list_head *m, int lvl) {
  ;
  return set_compression_mode_pg(m, lvl);
}


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

x86 assembly (clang, -O2):
<set_3592_comp>:
jmp    1030 <set_compression_mode_pg@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define i32 @set_3592_comp(%struct.list_head* %0, i32 %1) {
%3 = alloca %struct.list_head*
%4 = alloca i32
store %struct.list_head* %0, %struct.list_head** %3
store i32 %1, i32* %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load i32, i32* %4
%7 = call i32 @set_compression_mode_pg(%struct.list_head* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define i32 @set_3592_comp(%struct.list_head* %0, i32 %1) {
%3 = tail call i32 @set_compression_mode_pg(%struct.list_head* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ listanator();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Bem vindo ao programa Listanator L-1000!\nEste programa cria uma "
         "lista de numeros inteiros especialmente para voce, assim\ncomo "
         "permite a insercao ");
  printf("de novos numeros inteiros por voce, a remocao de alguns\nnumeros "
         "indesejados, a busca de um dos numeros e a impressao de todos "
         "eles.\n\n");
  listanator();
  printf("\nObrigado por usar o programa!\n\n");
  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 <printf@plt>
lea    0xf50(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <listanator@plt>
lea    0xfc3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <listanator@plt>
lea    0xfc0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [146 x i8] c"Bem vindo ao programa Listanator L-1000!\0AEste programa cria uma lista de numeros inteiros especialmente para voce, assim\0Acomo permite a insercao \00"
@.str.1 = [134 x i8] c"de novos numeros inteiros por voce, a remocao de alguns\0Anumeros indesejados, a busca de um dos numeros e a impressao de todos eles.\0A\0A\00"
@.str.2 = [33 x i8] c"\0AObrigado por usar o programa!\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @listanator()
%5 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [146 x i8] c"Bem vindo ao programa Listanator L-1000!\0AEste programa cria uma lista de numeros inteiros especialmente para voce, assim\0Acomo permite a insercao \00"
@str = [133 x i8] c"de novos numeros inteiros por voce, a remocao de alguns\0Anumeros indesejados, a busca de um dos numeros e a impressao de todos eles.\0A\00"
@str.3 = [32 x i8] c"\0AObrigado por usar o programa!\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @listanator()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *__wstr_dup(char const *);
void *wtypeStr_fromString(const char *string) { return __wstr_dup(string); }


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

x86 assembly (clang, -O2):
<wtypeStr_fromString>:
jmp    1030 <__wstr_dup@plt>

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

LLVM IR (-O2):
define i8* @wtypeStr_fromString(i8* %0) {
%2 = tail call i8* @__wstr_dup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sig_handle(int sig) { printf("recv signal :%d\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"recv signal :%d\0A\00"
define void @sig_handle(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int is_eol_char(char ch) {
  if (ch == '\r') {
    return 1;
  }
  if (ch == '\n') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_eol_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    1123 <is_eol_char+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1143 <is_eol_char+0x43>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    113c <is_eol_char+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1143 <is_eol_char+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_eol_char>:
cmp    $0xd,%dil
sete   %al
cmp    $0xa,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_eol_char(i8 signext %0) {
%2 = icmp eq i8 %0, 13
%3 = icmp eq i8 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
double lddbl(p)
register char *p;
{
  union {
    double rval;
    char sval[8];
  } x;
  char *q;
  int i;
  q = x.sval;
  p += 8;
  for (i = 0; i < 8; i++)
    *q++ = *--p;
  return (x.rval);
}


x86 assembly (clang, -O0):
<lddbl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x8,-0x1c(%rbp)
jge    115e <lddbl+0x5e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
mov    -0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1123 <lddbl+0x23>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lddbl>:
mov    (%rdi),%rax
bswap  %rax
movq   %rax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @lddbl(i8* %0) {
%2 = alloca i8*
%3 = alloca %union.anon
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %2
%6 = bitcast %union.anon* %3 to [8 x i8]*
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 0
store i8* %7, i8** %4
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 8
store i8* %9, i8** %2
store i32 0, i32* %5
br label %10
10: ; preds = %19, %1
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %22
13: ; preds = %10
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %2
%16 = load i8, i8* %15
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
store i8 %16, i8* %17
br label %19
19: ; preds = %13
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %10
22: ; preds = %10
%23 = bitcast %union.anon* %3 to double*
%24 = load double, double* %23
ret double %24
}

LLVM IR (-O2):
define double @lddbl(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 6
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
%8 = shl nuw nsw i64 %7, 8
%9 = or i64 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 5
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = shl nuw nsw i64 %12, 16
%14 = or i64 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = shl nuw nsw i64 %17, 24
%19 = or i64 %14, %18
%20 = getelementptr inbounds i8, i8* %0, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i64
%23 = shl nuw nsw i64 %22, 32
%24 = getelementptr inbounds i8, i8* %0, i64 2
%25 = load i8, i8* %24
%26 = zext i8 %25 to i64
%27 = shl nuw nsw i64 %26, 40
%28 = or i64 %19, %23
%29 = getelementptr inbounds i8, i8* %0, i64 1
%30 = load i8, i8* %29
%31 = zext i8 %30 to i64
%32 = shl nuw nsw i64 %31, 48
%33 = load i8, i8* %0
%34 = zext i8 %33 to i64
%35 = shl nuw i64 %34, 56
%36 = or i64 %28, %27
%37 = or i64 %36, %32
%38 = or i64 %37, %35
%39 = bitcast i64 %38 to double
ret double %39
}
/* Variables and functions */
int /*<<< orphan*/ free_not_registered_client();
int /*<<< orphan*/ free_registered_client();
void free_irc_server() {
  free_not_registered_client();
  free_registered_client();
}


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

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

LLVM IR (-O0):
define void @free_irc_server() {
%1 = call i32 (...) @free_not_registered_client()
%2 = call i32 (...) @free_registered_client()
ret void
}

LLVM IR (-O2):
define void @free_irc_server() {
%1 = tail call i32 (...) @free_not_registered_client()
%2 = tail call i32 (...) @free_registered_client()
ret void
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ portable_snprintf(char *, size_t, char const *,
                                     char const *);
size_t strlen(char const *);
char *format_single_arg(const char *format, const char *arg) {
  size_t n;
  char *s;
  n = strlen(format) + strlen(arg);
  s = (char *)malloc(n);
  portable_snprintf(s, n, format, arg);
  return s;
}


x86 assembly (clang, -O0):
<format_single_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
call   1040 <portable_snprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_single_arg>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <portable_snprintf@plt>
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @format_single_arg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
%11 = add i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = call i64 @malloc(i64 %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %6
%15 = load i8*, i8** %6
%16 = load i64, i64* %5
%17 = load i8*, i8** %3
%18 = load i8*, i8** %4
%19 = call i32 @portable_snprintf(i8* %15, i64 %16, i8* %17, i8* %18)
%20 = load i8*, i8** %6
ret i8* %20
}

LLVM IR (-O2):
define i8* @format_single_arg(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %4, %3
%6 = tail call i64 @malloc(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @portable_snprintf(i8* %7, i64 %5, i8* %0, i8* %1)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ writechanmsg_at_0();
void winamp_compatibility_measure() { writechanmsg_at_0(); }


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

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

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

LLVM IR (-O2):
define void @winamp_compatibility_measure() {
%1 = tail call i32 (...) @writechanmsg_at_0()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CPROVER_assume(int);
int /*<<< orphan*/ assert(int);
int main() {
  assert(((long long int)(unsigned long long)-1) == -1);
  int a;
  __CPROVER_assume(a == -1);
  unsigned long long x = (unsigned long long)a;
  assert(x == -1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
cmpl   $0xffffffff,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
%4 = call i32 @assert(i32 1)
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @__CPROVER_assume(i32 %7)
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = icmp eq i64 %11, -1
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @__CPROVER_assume(i32 0)
%3 = tail call i32 @assert(i32 0)
ret i32 0
}
void tracer_point_no_add(unsigned char *buffer, int x, int y,
                         unsigned char color) {
  unsigned char *point;
  point = buffer + (-y + 1024 / 2) * 1024 + x + 1024 / 2;
  *point = (int)(color);
}


x86 assembly (clang, -O0):
<tracer_point_no_add>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
add    $0x200,%ecx
shl    $0xa,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x200,%rax
mov    %rax,-0x20(%rbp)
movzbl -0x11(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracer_point_no_add>:
shl    $0xa,%edx
mov    $0x80000,%eax
sub    %edx,%eax
cltq
add    %rdi,%rax
movslq %esi,%rdx
mov    %cl,0x200(%rdx,%rax,1)
ret

LLVM IR (-O0):
define void @tracer_point_no_add(i8* %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %7
%12 = sub nsw i32 0, %11
%13 = add nsw i32 %12, 512
%14 = mul nsw i32 %13, 1024
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %10, i64 %15
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = getelementptr inbounds i8, i8* %19, i64 512
store i8* %20, i8** %9
%21 = load i8, i8* %8
%22 = zext i8 %21 to i32
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %9
store i8 %23, i8* %24
ret void
}

LLVM IR (-O2):
define void @tracer_point_no_add(i8* nocapture writeonly %0, i32 %1, i32 %2, i8 zeroext %3) {
%5 = mul i32 %2, -1024
%6 = add i32 %5, 524288
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 512
store i8 %3, i8* %11
ret void
}
int max(int x, int y) {
  int z;
  if (x > y) {
    z = x;
  } else {
    z = y;
  }
  return z;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ const *EVP_bf_cfb64();
const EVP_CIPHER *EVP_bf_cfb(void) { return EVP_bf_cfb64(); }


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

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

LLVM IR (-O0):
define i32* @EVP_bf_cfb() {
%1 = call i32* (...) @EVP_bf_cfb64()
ret i32* %1
}

LLVM IR (-O2):
define i32* @EVP_bf_cfb() {
%1 = tail call i32* (...) @EVP_bf_cfb64()
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ test_empty();
int /*<<< orphan*/ test_foreach();
int /*<<< orphan*/ test_free();
int /*<<< orphan*/ test_ints();
int /*<<< orphan*/ test_iteration();
int /*<<< orphan*/ test_reduce();
int /*<<< orphan*/ test_reduce_empty();
int /*<<< orphan*/ test_reduce_stop();
int /*<<< orphan*/ test_strings();
int /*<<< orphan*/ test_structs();
int main() {
  test_strings();
  test_ints();
  test_structs();
  test_iteration();
  test_free();
  test_empty();
  test_reduce();
  test_reduce_empty();
  test_reduce_stop();
  test_foreach();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_strings@plt>
mov    $0x0,%al
call   1070 <test_ints@plt>
mov    $0x0,%al
call   1030 <test_structs@plt>
mov    $0x0,%al
call   1090 <test_iteration@plt>
mov    $0x0,%al
call   10c0 <test_free@plt>
mov    $0x0,%al
call   1060 <test_empty@plt>
mov    $0x0,%al
call   1050 <test_reduce@plt>
mov    $0x0,%al
call   10b0 <test_reduce_empty@plt>
mov    $0x0,%al
call   1080 <test_reduce_stop@plt>
mov    $0x0,%al
call   10a0 <test_foreach@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_strings@plt>
xor    %eax,%eax
call   1070 <test_ints@plt>
xor    %eax,%eax
call   1030 <test_structs@plt>
xor    %eax,%eax
call   1090 <test_iteration@plt>
xor    %eax,%eax
call   10c0 <test_free@plt>
xor    %eax,%eax
call   1060 <test_empty@plt>
xor    %eax,%eax
call   1050 <test_reduce@plt>
xor    %eax,%eax
call   10b0 <test_reduce_empty@plt>
xor    %eax,%eax
call   1080 <test_reduce_stop@plt>
xor    %eax,%eax
call   10a0 <test_foreach@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_strings()
%3 = call i32 (...) @test_ints()
%4 = call i32 (...) @test_structs()
%5 = call i32 (...) @test_iteration()
%6 = call i32 (...) @test_free()
%7 = call i32 (...) @test_empty()
%8 = call i32 (...) @test_reduce()
%9 = call i32 (...) @test_reduce_empty()
%10 = call i32 (...) @test_reduce_stop()
%11 = call i32 (...) @test_foreach()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_strings()
%2 = tail call i32 (...) @test_ints()
%3 = tail call i32 (...) @test_structs()
%4 = tail call i32 (...) @test_iteration()
%5 = tail call i32 (...) @test_free()
%6 = tail call i32 (...) @test_empty()
%7 = tail call i32 (...) @test_reduce()
%8 = tail call i32 (...) @test_reduce_empty()
%9 = tail call i32 (...) @test_reduce_stop()
%10 = tail call i32 (...) @test_foreach()
ret i32 0
}
int network_init() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @network_init() {
ret i32 1
}
void ff_hevc_put_hevc_bi_w_epel_hv48_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv48_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, scalar_t__);
void vt100TextDefault() { printf("%c[%i;%im", 0x1B, 7 + 30, 0 + 40); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1b,%esi
mov    $0x25,%edx
mov    $0x28,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rdi
mov    $0x28,%ecx
mov    $0x1b,%esi
mov    $0x25,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c[%i;%im\00"
define void @vt100TextDefault() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 37, i64 40)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[%i;%im\00"
define void @vt100TextDefault() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 37, i64 40)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ JHGPixels_GetWindowSize(int *, int *);
void codename_GetWindowSize(int *width, int *height) {
  JHGPixels_GetWindowSize(width, height);
}


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

x86 assembly (clang, -O2):
<codename_GetWindowSize>:
jmp    1030 <JHGPixels_GetWindowSize@plt>

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

LLVM IR (-O2):
define void @codename_GetWindowSize(i32* %0, i32* %1) {
%3 = tail call i32 @JHGPixels_GetWindowSize(i32* %0, i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int parse_ipaddr(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int parse_val_mask_param(char const *, int /*<<< orphan*/ *,
                         int /*<<< orphan*/ *, int);
scalar_t__ strchr(char const *, char);
int parse_trace_param(const char *s, uint32_t *val, uint32_t *mask) {
  return strchr(s, '.') ? parse_ipaddr(s, val, mask)
                        : parse_val_mask_param(s, val, mask, 0xffffffffU);
}


x86 assembly (clang, -O0):
<parse_trace_param>:
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    $0x2e,%esi
call   1050 <strchr@plt>
cmp    $0x0,%rax
je     1175 <parse_trace_param+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <parse_ipaddr@plt>
mov    %eax,-0x1c(%rbp)
jmp    118e <parse_trace_param+0x5e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1030 <parse_val_mask_param@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_trace_param>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1050 <strchr@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
test   %rax,%rax
je     1160 <parse_trace_param+0x30>
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <parse_ipaddr@plt>
mov    $0xffffffff,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <parse_val_mask_param@plt>

LLVM IR (-O0):
define i32 @parse_trace_param(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = call i64 @strchr(i8* %7, i8 signext 46)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i32*, i32** %5
%13 = load i32*, i32** %6
%14 = call i32 @parse_ipaddr(i8* %11, i32* %12, i32* %13)
br label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i32*, i32** %5
%18 = load i32*, i32** %6
%19 = call i32 @parse_val_mask_param(i8* %16, i32* %17, i32* %18, i32 -1)
br label %20
20: ; preds = %15, %10
%21 = phi i32 [ %14, %10 ], [ %19, %15 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @parse_trace_param(i8* %0, i32* %1, i32* %2) {
%4 = tail call i64 @strchr(i8* %0, i8 signext 46)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @parse_ipaddr(i8* %0, i32* %1, i32* %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @parse_val_mask_param(i8* %0, i32* %1, i32* %2, i32 -1)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %7, %6 ], [ %9, %8 ]
ret i32 %11
}
unsigned gcd(unsigned a, unsigned b) {
  if ((a == 0) || (b == 0))
    return 0;
  if (a % b == 0)
    return b;
  a = a % b;
  return gcd(b, a);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1132 <gcd+0x22>
cmpl   $0x0,-0xc(%rbp)
jne    113e <gcd+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <gcd+0x63>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
cmp    $0x0,%edx
jne    115a <gcd+0x4a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <gcd+0x63>
mov    -0x8(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %eax,%eax
je     1127 <gcd+0x27>
mov    %edx,%ecx
test   %edx,%edx
je     1127 <gcd+0x27>
xor    %edx,%edx
div    %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @gcd(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 eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %26
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = urem i32 %13, %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i32, i32* %5
store i32 %18, i32* %3
br label %26
19: ; preds = %12
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = urem i32 %20, %21
store i32 %22, i32* %4
%23 = load i32, i32* %5
%24 = load i32, i32* %4
%25 = call i32 @gcd(i32 %23, i32 %24)
store i32 %25, i32* %3
br label %26
26: ; preds = %19, %17, %11
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i32 [ %0, %2 ], [ %5, %9 ]
%5 = phi i32 [ %1, %2 ], [ %10, %9 ]
%6 = icmp eq i32 %4, 0
%7 = icmp eq i32 %5, 0
%8 = or i1 %6, %7
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = urem i32 %4, %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %9, %3
%13 = phi i32 [ 0, %3 ], [ %5, %9 ]
ret i32 %13
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_in_wchnstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_in_wchnstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_in_wchnstr+0x2a>
jmp    1170 <cmd_in_wchnstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_in_wchnstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_in_wchnstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_in_wchnstr(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 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_in_wchnstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_character(unsigned char);
void hex_digit(unsigned char digit) {
  if (digit < 10)
    print_character(digit + '0');
  else
    print_character(digit + 'A' - 10);
}


x86 assembly (clang, -O0):
<hex_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jge    113f <hex_digit+0x2f>
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
movzbl %al,%edi
call   1030 <print_character@plt>
jmp    1151 <hex_digit+0x41>
movzbl -0x1(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
movzbl %al,%edi
call   1030 <print_character@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_digit>:
cmp    $0xa,%dil
mov    $0x30,%eax
mov    $0x37,%ecx
cmovb  %eax,%ecx
add    %dil,%cl
movzbl %cl,%edi
jmp    1030 <print_character@plt>

LLVM IR (-O0):
define void @hex_digit(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = add nsw i32 %8, 48
%10 = trunc i32 %9 to i8
%11 = call i32 @print_character(i8 zeroext %10)
br label %19
12: ; preds = %1
%13 = load i8, i8* %2
%14 = zext i8 %13 to i32
%15 = add nsw i32 %14, 65
%16 = sub nsw i32 %15, 10
%17 = trunc i32 %16 to i8
%18 = call i32 @print_character(i8 zeroext %17)
br label %19
19: ; preds = %12, %6
ret void
}

LLVM IR (-O2):
define void @hex_digit(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = select i1 %2, i8 48, i8 55
%4 = add i8 %3, %0
%5 = tail call i32 @print_character(i8 zeroext %4)
ret void
}
int memcmp(const void *s1, const void *s2, unsigned long n) {
  register const unsigned char *r1 = (const unsigned char *)s1;
  register const unsigned char *r2 = (const unsigned char *)s2;
  int r = 0;
  while (n-- && ((r = ((int)(*r1++)) - *r2++) == 0))
    ;
  return r;
}


x86 assembly (clang, -O0):
<memcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x2d(%rbp)
je     1177 <memcmp+0x77>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
mov    -0x28(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
movzbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
test   $0x1,%al
jne    1187 <memcmp+0x87>
jmp    118c <memcmp+0x8c>
jmp    1127 <memcmp+0x27>
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %rcx,%rdx
je     1128 <memcmp+0x28>
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%r8d
add    $0x1,%rcx
sub    %r8d,%eax
je     1110 <memcmp+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @memcmp(i8* nocapture %0, i8* nocapture %1, i64 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i64 [ %2, %3 ], [ %10, %9 ]
%6 = phi i8* [ %0, %3 ], [ %11, %9 ]
%7 = phi i8* [ %1, %3 ], [ %14, %9 ]
%8 = icmp eq i64 %5, 0
br i1 %8, label %19, label %9
9: ; preds = %4
%10 = add i64 %5, -1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = sub nsw i32 %13, %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %4, label %19
19: ; preds = %4, %9
%20 = phi i32 [ %17, %9 ], [ 0, %4 ]
ret i32 %20
}
/* Type definitions */
typedef int __u8;
typedef int const __u32;

/* Variables and functions */
__u32 __get_unaligned_be32(const __u8 *p) {
  return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
}


x86 assembly (clang, -O0):
<__get_unaligned_be32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_unaligned_be32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @__get_unaligned_be32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @__get_unaligned_be32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Type definitions */
struct node {
  int dummy;
};
struct module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_node_deepcopy(struct module *, struct node *,
                                    struct node const *, int /*<<< orphan*/);
void node_deepcopy(struct module *mod, struct node *dst,
                   const struct node *src) {
  do_node_deepcopy(mod, dst, src, 0);
}


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

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

LLVM IR (-O0):
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @node_deepcopy(%struct.module* %0, %struct.node* %1, %struct.node* %2) {
%4 = alloca %struct.module*
%5 = alloca %struct.node*
%6 = alloca %struct.node*
store %struct.module* %0, %struct.module** %4
store %struct.node* %1, %struct.node** %5
store %struct.node* %2, %struct.node** %6
%7 = load %struct.module*, %struct.module** %4
%8 = load %struct.node*, %struct.node** %5
%9 = load %struct.node*, %struct.node** %6
%10 = call i32 @do_node_deepcopy(%struct.module* %7, %struct.node* %8, %struct.node* %9, i32 0)
ret void
}

LLVM IR (-O2):
%struct.module = type { i32 }
%struct.node = type { i32 }
define void @node_deepcopy(%struct.module* %0, %struct.node* %1, %struct.node* %2) {
%4 = tail call i32 @do_node_deepcopy(%struct.module* %0, %struct.node* %1, %struct.node* %2, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m158refreshNT();
int /*<<< orphan*/ rambo1setParams8000(int /*<<< orphan*/, int /*<<< orphan*/);
void m158setParams8000(uint16_t addr, uint8_t val) {
  rambo1setParams8000(addr, val);
  m158refreshNT();
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <rambo1setParams8000@plt>
mov    $0x0,%al
call   1040 <m158refreshNT@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @m158setParams8000(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 @rambo1setParams8000(i32 %5, i32 %6)
%8 = call i32 (...) @m158refreshNT()
ret void
}

LLVM IR (-O2):
define void @m158setParams8000(i32 %0, i32 %1) {
%3 = tail call i32 @rambo1setParams8000(i32 %0, i32 %1)
%4 = tail call i32 (...) @m158refreshNT()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eof_get_configdir(char *, size_t);
int /*<<< orphan*/ memset(char *, char, size_t);
int /*<<< orphan*/ strncat(char *, char *, size_t);
void eof_get_crypto_dir(char buf[], size_t len) {
  memset(buf, '\0', len);
  eof_get_configdir(buf, len);
  strncat(buf,
          "/"
          "crypto",
          len - 1);
}


x86 assembly (clang, -O0):
<eof_get_crypto_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <eof_get_configdir@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
lea    0xe91(%rip),%rsi
call   1040 <strncat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eof_get_crypto_dir>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <eof_get_configdir@plt>
add    $0xffffffffffffffff,%rbx
lea    0xea6(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strncat@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/crypto\00"
define void @eof_get_crypto_dir(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 = load i64, i64* %4
%7 = call i32 @memset(i8* %5, i8 signext 0, i64 %6)
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 @eof_get_configdir(i8* %8, i64 %9)
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = sub i64 %12, 1
%14 = call i32 @strncat(i8* %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %13)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"/crypto\00"
define void @eof_get_crypto_dir(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i8 signext 0, i64 %1)
%4 = tail call i32 @eof_get_configdir(i8* %0, i64 %1)
%5 = add i64 %1, -1
%6 = tail call i32 @strncat(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %5)
ret void
}
int utf32_is_surrogate(unsigned long cp) { return cp > 0xd7ff && cp < 0xe000; }


x86 assembly (clang, -O0):
<utf32_is_surrogate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0xd7ff,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jbe    1129 <utf32_is_surrogate+0x29>
cmpq   $0xe000,-0x8(%rbp)
setb   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf32_is_surrogate>:
and    $0xfffffffffffff800,%rdi
xor    %eax,%eax
cmp    $0xd800,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @utf32_is_surrogate(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 55295
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp ult i64 %6, 57344
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @utf32_is_surrogate(i64 %0) {
%2 = and i64 %0, -2048
%3 = icmp eq i64 %2, 55296
%4 = zext i1 %3 to i32
ret i32 %4
}