xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
void handler() {
  printf("SIGINT received\n");
  signal(SIGINT, handler);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rsi
call   1040 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2ea3(%rip),%rsi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"SIGINT received\0A\00"
@SIGINT = global i32 0
define void @handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIGINT
%3 = call i32 @signal(i32 %2, void (...)* bitcast (void ()* @handler to void (...)*))
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [16 x i8] c"SIGINT received\00"
define void @handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @signal(i32 %2, void (...)* bitcast (void ()* @handler to void (...)*))
ret void
}
void serial_clear_FIFO_(volatile unsigned char *UART) { UART[0x08] = 0x07; }


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

x86 assembly (clang, -O2):
<serial_clear_FIFO_>:
movb   $0x7,0x8(%rdi)
ret

LLVM IR (-O0):
define void @serial_clear_FIFO_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
store volatile i8 7, i8* %4
ret void
}

LLVM IR (-O2):
define void @serial_clear_FIFO_(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
store volatile i8 7, i8* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit_program(int);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ perror(char *);
FILE *open_file(const char *filename, char *spec) {
  FILE *fp = fopen(filename, spec);
  if (!fp) {
    perror("fopen");
    exit_program(1);
  }
  return fp;
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1172 <open_file+0x42>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1030 <exit_program@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
push   %rbx
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1143 <open_file+0x13>
mov    %rbx,%rax
pop    %rbx
ret
lea    0xeb6(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1030 <exit_program@plt>
jmp    113e <open_file+0xe>

LLVM IR (-O0):
@.str = [6 x i8] c"fopen\00"
define i32* @open_file(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 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @exit_program(i32 1)
br label %14
14: ; preds = %11, %2
%15 = load i32*, i32** %5
ret i32* %15
}

LLVM IR (-O2):
@.str = [6 x i8] c"fopen\00"
define noalias i32* @open_file(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit_program(i32 1)
br label %8
8: ; preds = %5, %2
ret i32* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(char *, int /*<<< orphan*/ *, int);
void write_u32_to_buffer(uint32_t h_u32, char *write) {
  uint32_t n_u32 = htonl(h_u32);
  memcpy(write, &n_u32, sizeof(uint32_t));
}


x86 assembly (clang, -O0):
<write_u32_to_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_u32_to_buffer>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <htonl@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @write_u32_to_buffer(i32 %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @htonl(i32 %0)
store i32 %5, i32* %3
%6 = call i32 @memcpy(i8* %1, i32* %3, i32 4)
ret void
}
void EVP_PKEY_cmp_parameters(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_PKEY_cmp_parameters() {
ret void
}
void XwcDrawImageString() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *open_file(char const *, char *, char *);
FILE *open_binary_file_for_writing(const char *file) {
  return open_file(file, "wb", "writing");
}


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

x86 assembly (clang, -O2):
<open_binary_file_for_writing>:
lea    0xee9(%rip),%rsi
lea    0xee5(%rip),%rdx
jmp    1030 <open_file@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
@.str.1 = [8 x i8] c"writing\00"
define i32* @open_binary_file_for_writing(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @open_file(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32* %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
@.str.1 = [8 x i8] c"writing\00"
define i32* @open_binary_file_for_writing(i8* %0) {
%2 = tail call i32* @open_file(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int main() {
  __VERIFIER_error();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_error()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_test_call_start_unary_echo() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_test_call_start_unary_echo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_test_call_start_unary_echo>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_test_call_start_unary_echo() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_test_call_start_unary_echo() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_int;

/* Variables and functions */
int /*<<< orphan*/ *calloc(size_t, int);
cl_int *create_table_cl_int(size_t height, size_t width) {
  return calloc(width * height, sizeof(cl_int));
}


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

x86 assembly (clang, -O2):
<create_table_cl_int>:
imul   %rsi,%rdi
mov    $0x4,%esi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define i32* @create_table_cl_int(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i32* @calloc(i64 %3, i32 4)
ret i32* %4
}
int KlelGetVersionAge(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @KlelGetVersionAge() {
ret i32 1
}
int test_imm_4Eint32_mem(int *val) {
  return ((*val) & (0x4E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Eint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 78
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/tamediadigital/h2o/refs/"
               "heads/master/include/h2o/h2o/memory.h"
               ":"
               "312"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tamediadigital/h2o/refs/heads/master/include/h2o/h2o/memory.h:312:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [166 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tamediadigital/h2o/refs/heads/master/include/h2o/h2o/memory.h:312:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([166 x i8], [166 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void func_hide(int a, int b, int c, int d, int e, int f) {}


x86 assembly (clang, -O0):
<func_hide>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @func_hide(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
ret void
}

LLVM IR (-O2):
define void @func_hide(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
int save_compiled_database(char const *);
char const *smaunch_smack_has_database();
int smaunch_smack_save_database_compiled(const char *path) {
  assert(path);
  assert(smaunch_smack_has_database());
  return save_compiled_database(path);
}


x86 assembly (clang, -O0):
<smaunch_smack_save_database_compiled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert@plt>
mov    $0x0,%al
call   1040 <smaunch_smack_has_database@plt>
mov    %rax,%rdi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <save_compiled_database@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smaunch_smack_save_database_compiled>:
push   %rbx
mov    %rdi,%rbx
call   1050 <assert@plt>
xor    %eax,%eax
call   1040 <smaunch_smack_has_database@plt>
mov    %rax,%rdi
call   1050 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <save_compiled_database@plt>

LLVM IR (-O0):
define i32 @smaunch_smack_save_database_compiled(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = call i8* (...) @smaunch_smack_has_database()
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @save_compiled_database(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @smaunch_smack_save_database_compiled(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i8* (...) @smaunch_smack_has_database()
%4 = tail call i32 @assert(i8* %3)
%5 = tail call i32 @save_compiled_database(i8* %0)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xc5() {
  Assert_real((isdigit(197) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              990, ("isdigit should be 0 for 0xc5"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xc5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc5,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3de,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xc5\00"
define void @t_isdigit_0xc5() {
%1 = call i64 @isdigit(i32 197)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xc5\00"
define void @t_isdigit_0xc5() {
%1 = tail call i64 @isdigit(i32 197)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xe9() {
  Assert_real((isbdigit(233) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1170, ("isbdigit should be 0 for 0xe9"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0xe9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe9,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x492,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0xe9>:
push   %rax
mov    $0xe9,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x492,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xe9\00"
define void @t_isbdigit_0xe9() {
%1 = call i64 @isbdigit(i32 233)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xe9\00"
define void @t_isbdigit_0xe9() {
%1 = tail call i64 @isbdigit(i32 233)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1170, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void count_tz_v2si(unsigned *__restrict a, int *__restrict b) {
  int i;
  for (i = 0; i < 2; i++)
    b[i] = __builtin_ctz(a[i]);
}


x86 assembly (clang, -O0):
<count_tz_v2si>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1144 <count_tz_v2si+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
bsf    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <count_tz_v2si+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_tz_v2si>:
bsf    (%rdi),%eax
mov    %eax,(%rsi)
bsf    0x4(%rdi),%eax
mov    %eax,0x4(%rsi)
ret

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

LLVM IR (-O2):
define void @count_tz_v2si(i32* noalias nocapture %0, i32* noalias nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @llvm.cttz.i32(i32 %3, i1 true)
store i32 %4, i32* %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @llvm.cttz.i32(i32 %6, i1 true)
%8 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %7, i32* %8
ret void
}
int ft_toupper(int c) {
  if (c >= 'a' && c <= 'z') {
    return (c - 'a' + 'A');
  }
  return (c);
}


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     112c <ft_toupper+0x2c>
cmpl   $0x7a,-0x8(%rbp)
jg     112c <ft_toupper+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <ft_toupper+0x32>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 97
%12 = add nsw i32 %11, 65
store i32 %12, i32* %2
br label %15
13: ; preds = %6, %1
%14 = load i32, i32* %3
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int FUNC1(int);
int main() {
  int a;
  a = FUNC1(1);
  return a;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
jmp    1030 <FUNC1@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @FUNC1(i32 1)
ret i32 %1
}
/* Variables and functions */
scalar_t__ exists(char *);
const char *scan_battery() {
  if (exists("/sys/class/power_supply/battery"))
    return "/sys/class/power_supply/battery";
  if (exists("/sys/class/power_supply/bat"))
    return "/sys/class/power_supply/bat";
  return NULL;
}


x86 assembly (clang, -O0):
<scan_battery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     113e <scan_battery+0x2e>
lea    0xecb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <scan_battery+0x5c>
lea    0xedb(%rip),%rdi
call   1030 <exists@plt>
cmp    $0x0,%rax
je     1164 <scan_battery+0x54>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <scan_battery+0x5c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_battery>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <exists@plt>
test   %rax,%rax
jne    113b <scan_battery+0x2b>
lea    0xef4(%rip),%rbx
mov    %rbx,%rdi
call   1030 <exists@plt>
test   %rax,%rax
cmove  %rax,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"/sys/class/power_supply/battery\00"
@.str.1 = [28 x i8] c"/sys/class/power_supply/bat\00"
define i8* @scan_battery() {
%1 = alloca i8*
%2 = call i64 @exists(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %1
br label %10
5: ; preds = %0
%6 = call i64 @exists(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %10
9: ; preds = %5
store i8* null, i8** %1
br label %10
10: ; preds = %9, %8, %4
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [32 x i8] c"/sys/class/power_supply/battery\00"
@.str.1 = [28 x i8] c"/sys/class/power_supply/bat\00"
define i8* @scan_battery() {
%1 = tail call i64 @exists(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @exists(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* null, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0)
br label %7
7: ; preds = %3, %0
%8 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), %0 ], [ %6, %3 ]
ret i8* %8
}
void INT_Excep_PERIB_INTB146(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB146() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CLRW();
int /*<<< orphan*/ save_state();
int /*<<< orphan*/ test_CLRW_accumulator_is_cleared();
int /*<<< orphan*/ test_CLRW_not_our_mem_was_untouched();
int /*<<< orphan*/ test_PC_was_increased();
int /*<<< orphan*/ test_zero_flag_set();
void test_CLRW() {
  save_state();
  CLRW();
  test_CLRW_accumulator_is_cleared();
  test_zero_flag_set();
  test_CLRW_not_our_mem_was_untouched();
  test_PC_was_increased();
}


x86 assembly (clang, -O0):
<test_CLRW>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <save_state@plt>
mov    $0x0,%al
call   1070 <CLRW@plt>
mov    $0x0,%al
call   1060 <test_CLRW_accumulator_is_cleared@plt>
mov    $0x0,%al
call   1030 <test_zero_flag_set@plt>
mov    $0x0,%al
call   1050 <test_CLRW_not_our_mem_was_untouched@plt>
mov    $0x0,%al
call   1080 <test_PC_was_increased@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_CLRW>:
push   %rax
xor    %eax,%eax
call   1040 <save_state@plt>
xor    %eax,%eax
call   1070 <CLRW@plt>
xor    %eax,%eax
call   1060 <test_CLRW_accumulator_is_cleared@plt>
xor    %eax,%eax
call   1030 <test_zero_flag_set@plt>
xor    %eax,%eax
call   1050 <test_CLRW_not_our_mem_was_untouched@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <test_PC_was_increased@plt>

LLVM IR (-O0):
define void @test_CLRW() {
%1 = call i32 (...) @save_state()
%2 = call i32 (...) @CLRW()
%3 = call i32 (...) @test_CLRW_accumulator_is_cleared()
%4 = call i32 (...) @test_zero_flag_set()
%5 = call i32 (...) @test_CLRW_not_our_mem_was_untouched()
%6 = call i32 (...) @test_PC_was_increased()
ret void
}

LLVM IR (-O2):
define void @test_CLRW() {
%1 = tail call i32 (...) @save_state()
%2 = tail call i32 (...) @CLRW()
%3 = tail call i32 (...) @test_CLRW_accumulator_is_cleared()
%4 = tail call i32 (...) @test_zero_flag_set()
%5 = tail call i32 (...) @test_CLRW_not_our_mem_was_untouched()
%6 = tail call i32 (...) @test_PC_was_increased()
ret void
}
void RTLockValidatorRecExclUnwind(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclUnwind() {
ret void
}
/* Variables and functions */
int syscall(int, int *, int);
int uv__pipe2(int pipefd[2], int flags) {
  int result;
  result = syscall(293, pipefd, flags);
  return result;
}


x86 assembly (clang, -O0):
<uv__pipe2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x125,%edi
call   1030 <syscall@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__pipe2>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0x125,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @uv__pipe2(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 = call i32 @syscall(i32 293, i32* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @uv__pipe2(i32* %0, i32 %1) {
%3 = tail call i32 @syscall(i32 293, i32* %0, i32 %1)
ret i32 %3
}
void ECDSA_get_default_method(void) {}


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

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

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

LLVM IR (-O2):
define void @ECDSA_get_default_method() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void warnMsg(char *str) { printf("WARNING: %s\n", str); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"WARNING: %s\0A\00"
define void @warnMsg(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct pipeline_scheduler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct pipeline_scheduler *);
int /*<<< orphan*/
pipeline_scheduler_free_internal(struct pipeline_scheduler *);
void pipeline_scheduler_free(struct pipeline_scheduler *sched) {
  pipeline_scheduler_free_internal(sched);
  free(sched);
}


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

x86 assembly (clang, -O2):
<pipeline_scheduler_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <pipeline_scheduler_free_internal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.pipeline_scheduler = type { i32 }
define void @pipeline_scheduler_free(%struct.pipeline_scheduler* %0) {
%2 = alloca %struct.pipeline_scheduler*
store %struct.pipeline_scheduler* %0, %struct.pipeline_scheduler** %2
%3 = load %struct.pipeline_scheduler*, %struct.pipeline_scheduler** %2
%4 = call i32 @pipeline_scheduler_free_internal(%struct.pipeline_scheduler* %3)
%5 = load %struct.pipeline_scheduler*, %struct.pipeline_scheduler** %2
%6 = call i32 @free(%struct.pipeline_scheduler* %5)
ret void
}

LLVM IR (-O2):
%struct.pipeline_scheduler = type { i32 }
define void @pipeline_scheduler_free(%struct.pipeline_scheduler* %0) {
%2 = tail call i32 @pipeline_scheduler_free_internal(%struct.pipeline_scheduler* %0)
%3 = tail call i32 @free(%struct.pipeline_scheduler* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void yield_setup(int cpu1, int cpu2) {
  if (cpu1 != cpu2) {
    fprintf(stderr, "Both threads must be on the same CPU for yield test\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<yield_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1159 <yield_setup+0x39>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yield_setup>:
cmp    %esi,%edi
jne    1125 <yield_setup+0x5>
ret
push   %rax
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"Both threads must be on the same CPU for yield test\0A\00"
define void @yield_setup(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 = icmp ne i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"Both threads must be on the same CPU for yield test\0A\00"
define void @yield_setup(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core4_swap(char *, int);
void U_EMRSCALEVIEWPORTEXTEX_swap(char *record, int torev) {
  core4_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRSCALEVIEWPORTEXTEX_swap>:
jmp    1030 <core4_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSCALEVIEWPORTEXTEX_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core4_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
char *strdup(char *);
char *QPokeLangIdFromName(char name[]) {
  char buf[1024], *query = NULL;
  sprintf(buf, "%s%s%s",
          "SELECT id "
          "FROM languages "
          "WHERE identifier = '",
          name, "';");
  query = strdup(buf);
  return query;
}


x86 assembly (clang, -O0):
<QPokeLangIdFromName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
lea    0xeb4(%rip),%rsi
lea    0xeb4(%rip),%rdx
lea    0xedb(%rip),%r8
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x418(%rbp)
mov    -0x418(%rbp),%rax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QPokeLangIdFromName>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xef5(%rip),%r8
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [46 x i8] c"SELECT id FROM languages WHERE identifier = '\00"
@.str.2 = [3 x i8] c"';\00"
define i8* @QPokeLangIdFromName(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
%4 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %4
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i8* @strdup(i8* %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
ret i8* %10
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [46 x i8] c"SELECT id FROM languages WHERE identifier = '\00"
@.str.2 = [3 x i8] c"';\00"
define noalias i8* @QPokeLangIdFromName(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%5 = call i8* @strdup(i8* %3)
ret i8* %5
}
/* Variables and functions */
scalar_t__ mkstemp;
int main(int argc, char **argv) {
  void *p;
  (void)argc;
  (void)argv;
  p = (void *)(mkstemp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@mkstemp = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* @mkstemp
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %6
ret i32 0
}

LLVM IR (-O2):
@mkstemp = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
const char *_Locale_true(struct _Locale_numeric *lnum) { return "true"; }


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

x86 assembly (clang, -O2):
<_Locale_true>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct._Locale_numeric = type { i32 }
@.str = [5 x i8] c"true\00"
define i8* @_Locale_true(%struct._Locale_numeric* %0) {
%2 = alloca %struct._Locale_numeric*
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %2
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
@.str = [5 x i8] c"true\00"
define i8* @_Locale_true(%struct._Locale_numeric* nocapture readnone %0) {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
void _xprobes_noop() {}


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

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

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

LLVM IR (-O2):
define void @_xprobes_noop() {
ret void
}
void fc0(int n) {
  goto a;
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  };
  typedef int(*e)[n];
  0;
};
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
ret void
}

LLVM IR (-O2):
define void @fc0(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bputc(int);
int /*<<< orphan*/ swbytealign();
void WriteEoi() {
  static char RoutineName[] = "WriteEoi";
  swbytealign();
  bputc(0xff);
  bputc(0xd9);
}


x86 assembly (clang, -O0):
<WriteEoi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <swbytealign@plt>
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd9,%edi
call   1030 <bputc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteEoi>:
push   %rax
xor    %eax,%eax
call   1040 <swbytealign@plt>
mov    $0xff,%edi
call   1030 <bputc@plt>
mov    $0xd9,%edi
pop    %rax
jmp    1030 <bputc@plt>

LLVM IR (-O0):
@WriteEoi.RoutineName = internal global [9 x i8] c"WriteEoi\00"
define void @WriteEoi() {
%1 = call i32 (...) @swbytealign()
%2 = call i32 @bputc(i32 255)
%3 = call i32 @bputc(i32 217)
ret void
}

LLVM IR (-O2):
define void @WriteEoi() {
%1 = tail call i32 (...) @swbytealign()
%2 = tail call i32 @bputc(i32 255)
%3 = tail call i32 @bputc(i32 217)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vt100_EscSeq(int, unsigned char *, long long);
void vt100_ED(int n) { vt100_EscSeq(n, (unsigned char *)"J", (long long)2); }


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

x86 assembly (clang, -O2):
lea    0xee9(%rip),%rsi
mov    $0x2,%edx
jmp    1030 <vt100_EscSeq@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"J\00"
define void @vt100_ED(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @vt100_EscSeq(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"J\00"
define void @vt100_ED(i32 %0) {
%2 = tail call i32 @vt100_EscSeq(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i64 2)
ret void
}
extern int f4(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @f4() {
ret i32 0
}

LLVM IR (-O2):
define i32 @f4() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void display_usage(char *sExecutableFile) {
  fprintf(stderr, "\n");
  fprintf(stderr, "Usage: %s [input file name] [output file name]\n\n",
          sExecutableFile);
  exit(1);
}


x86 assembly (clang, -O0):
<display_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xef3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<display_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeb7(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [49 x i8] c"Usage: %s [input file name] [output file name]\0A\0A\00"
define void @display_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [49 x i8] c"Usage: %s [input file name] [output file name]\0A\0A\00"
define void @display_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
int dev_punchrd_write(struct dev_punchrd *punchrd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.dev_punchrd = type opaque
define i32 @dev_punchrd_write(%struct.dev_punchrd* nocapture readnone %0) {
ret i32 0
}