xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ safepath;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ simple_command(struct chirp_client *, int /*<<< orphan*/,
                                  char *, char *);
int /*<<< orphan*/ url_encode(char const *, char *, int);
int64_t chirp_client_rmdir(struct chirp_client *c, char const *path,
                           time_t stoptime) {
  char safepath[1024];
  url_encode(path, safepath, sizeof(safepath));
  return simple_command(c, stoptime, "rmdir %s\n", safepath);
}


x86 assembly (clang, -O0):
<chirp_client_rmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
mov    $0x400,%edx
call   1040 <url_encode@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x420(%rbp),%rcx
lea    0xea0(%rip),%rdx
call   1030 <simple_command@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_rmdir>:
push   %rbp
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %rsi,%rdi
mov    %r14,%rsi
mov    $0x400,%edx
call   1040 <url_encode@plt>
lea    0xeb6(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rcx
call   1030 <simple_command@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [10 x i8] c"rmdir %s\0A\00"
define i32 @chirp_client_rmdir(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = alloca %struct.chirp_client*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [1024 x i8]
store %struct.chirp_client* %0, %struct.chirp_client** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%10 = call i32 @url_encode(i8* %8, i8* %9, i32 1024)
%11 = load %struct.chirp_client*, %struct.chirp_client** %4
%12 = load i32, i32* %6
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = call i32 @simple_command(%struct.chirp_client* %11, i32 %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [10 x i8] c"rmdir %s\0A\00"
define i32 @chirp_client_rmdir(%struct.chirp_client* %0, i8* %1, i32 %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = call i32 @url_encode(i8* %1, i8* %5, i32 1024)
%7 = call i32 @simple_command(%struct.chirp_client* %0, i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ arm_asr(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_rdn3_op();
void t16_asr_rdn3() { arm_asr(t16_data_rdn3_op()); }


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

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

LLVM IR (-O0):
define void @t16_asr_rdn3() {
%1 = call i32 (...) @t16_data_rdn3_op()
%2 = call i32 @arm_asr(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_asr_rdn3() {
%1 = tail call i32 (...) @t16_data_rdn3_op()
%2 = tail call i32 @arm_asr(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_abort(char *);
scalar_t__ get_address();
void command_go(void) {
  *((unsigned *)0xe000ed08) = (unsigned)get_address();
  command_abort("Go");
}


x86 assembly (clang, -O0):
<command_go>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <get_address@plt>
mov    %eax,%ecx
mov    $0xe000ed08,%eax
mov    %ecx,(%rax)
lea    0xec5(%rip),%rdi
call   1040 <command_abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_go>:
push   %rax
xor    %eax,%eax
call   1030 <get_address@plt>
mov    $0xe000ed08,%ecx
mov    %eax,(%rcx)
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1040 <command_abort@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"Go\00"
define void @command_go() {
%1 = call i64 (...) @get_address()
%2 = trunc i64 %1 to i32
store i32 %2, i32* inttoptr (i64 3758157064 to i32*)
%3 = call i32 @command_abort(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"Go\00"
define void @command_go() {
%1 = tail call i64 (...) @get_address()
%2 = trunc i64 %1 to i32
store i32 %2, i32* inttoptr (i64 3758157064 to i32*)
%3 = tail call i32 @command_abort(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
void round_robin_giveup() {}


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

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

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

LLVM IR (-O2):
define void @round_robin_giveup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *commande) {
  fprintf(stderr, "Usage :\n");
  fprintf(stderr,
          "%s --nsize number [ --parallelism number ] [ --verbose] "
          "[ --rusage ] "
          "[ --seed number ]"
          "[ --help ]\n\n",
          commande);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec0(%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 = [9 x i8] c"Usage :\0A\00"
@.str.1 = [99 x i8] c"%s --nsize number [ --parallelism number ] [ --verbose] [ --rusage ] [ --seed number ][ --help ]\0A\0A\00"
define void @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 ([9 x i8], [9 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 ([99 x i8], [99 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 = [9 x i8] c"Usage :\0A\00"
@.str.1 = [99 x i8] c"%s --nsize number [ --parallelism number ] [ --verbose] [ --rusage ] [ --seed number ][ --help ]\0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int f228(int *);
int f229(int *p) { return f228(p); }


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

x86 assembly (clang, -O2):
<f229>:
jmp    1030 <f228@plt>

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

LLVM IR (-O2):
define i32 @f229(i32* %0) {
%2 = tail call i32 @f228(i32* %0)
ret i32 %2
}
/* Type definitions */
struct dentry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __fist_print_generic_dentry(char const *, char *,
                                               struct dentry const *, int);
void fist_print_generic_dentry(const char *str, const struct dentry *dentry) {
  __fist_print_generic_dentry(str, "", dentry, 1);
}


x86 assembly (clang, -O0):
<fist_print_generic_dentry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x1,%ecx
call   1030 <__fist_print_generic_dentry@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fist_print_generic_dentry>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%ecx
jmp    1030 <__fist_print_generic_dentry@plt>

LLVM IR (-O0):
%struct.dentry = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fist_print_generic_dentry(i8* %0, %struct.dentry* %1) {
%3 = alloca i8*
%4 = alloca %struct.dentry*
store i8* %0, i8** %3
store %struct.dentry* %1, %struct.dentry** %4
%5 = load i8*, i8** %3
%6 = load %struct.dentry*, %struct.dentry** %4
%7 = call i32 @__fist_print_generic_dentry(i8* %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.dentry* %6, i32 1)
ret void
}

LLVM IR (-O2):
%struct.dentry = type { i32 }
@.str = [1 x i8] zeroinitializer
define void @fist_print_generic_dentry(i8* %0, %struct.dentry* %1) {
%3 = tail call i32 @__fist_print_generic_dentry(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %struct.dentry* %1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int32_t unserial_int32(uint8_t **const ptr) {
  int32_t vo;
  memcpy(&vo, *ptr, sizeof vo);
  *ptr += sizeof vo;
  return ntohl(vo);
}


x86 assembly (clang, -O0):
<unserial_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x10,%rcx
mov    %rcx,(%rax)
mov    -0xc(%rbp),%edi
call   1040 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @unserial_int32(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = load i32*, i32** %4
%6 = call i32 @memcpy(i32* %3, i32* %5, i32 4)
%7 = load i32**, i32*** %2
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 4
store i32* %9, i32** %7
%10 = load i32, i32* %3
%11 = call i32 @ntohl(i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @unserial_int32(i32** nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32*, i32** %0
%5 = call i32 @memcpy(i32* %2, i32* %4, i32 4)
%6 = load i32*, i32** %0
%7 = getelementptr inbounds i32, i32* %6, i64 4
store i32* %7, i32** %0
%8 = load i32, i32* %2
%9 = call i32 @ntohl(i32 %8)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_23() {
  Assert_real((isqrt(23) == 4),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              120, ("Integer square root of 23 should be 4"));
}


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

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

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 23 should be 4\00"
define void @t_sqrt_23() {
%1 = call i32 @isqrt(i32 23)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 120, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 23 should be 4\00"
define void @t_sqrt_23() {
%1 = tail call i32 @isqrt(i32 23)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 120, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
void nil_ivec(int n, int *p) { memset(p, 0, sizeof(int) * n); }


x86 assembly (clang, -O0):
<nil_ivec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nil_ivec>:
lea    0x0(,%rdi,4),%edx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @nil_ivec(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i32 @memset(i32* %5, i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @nil_ivec(i32 %0, i32* %1) {
%3 = shl i32 %0, 2
%4 = tail call i32 @memset(i32* %1, i32 0, i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord2f(int /*<<< orphan*/, int /*<<< orphan*/);
void TexCoord2f(GLfloat s, GLfloat t) { glTexCoord2f(s, t); }


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

x86 assembly (clang, -O2):
<TexCoord2f>:
jmp    1030 <glTexCoord2f@plt>

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

LLVM IR (-O2):
define void @TexCoord2f(i32 %0, i32 %1) {
%3 = tail call i32 @glTexCoord2f(i32 %0, i32 %1)
ret void
}
double lon2x_d(double lon) { return lon; }


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

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

LLVM IR (-O0):
define double @lon2x_d(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
define double @lon2x_d(double returned %0) {
ret double %0
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t rotr32(const uint32_t w, const unsigned c) {
  return (w >> c) | (w << (32 - c));
}


x86 assembly (clang, -O0):
<rotr32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotr32>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rotr32(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 = lshr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotr32(i32 %0, i32 %1) {
%3 = lshr i32 %0, %1
%4 = sub i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void ETH_WKUP_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @ETH_WKUP_IRQHandler() {
ret void
}
f() {
  int x[2];
  if (_Generic(x, int * : 1, int[2] : 3) != 3)
    abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<f>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @f() {
%1 = alloca [2 x i32]
unreachable
}

LLVM IR (-O2):
define i32 @f() {
tail call void @abort()
unreachable
}
int isNullVector(double *vector, unsigned size) {
  unsigned i;
  int zero = 1;
  for (i = 0; i < size; i++) {
    if (vector[i] == 1) {
      zero = 0;
      break;
    }
  }
  return zero;
}


x86 assembly (clang, -O0):
<isNullVector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1168 <isNullVector+0x68>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xec7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1155 <isNullVector+0x55>
jp     1155 <isNullVector+0x55>
movl   $0x0,-0x14(%rbp)
jmp    1168 <isNullVector+0x68>
jmp    115a <isNullVector+0x5a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <isNullVector+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNullVector>:
mov    $0x1,%eax
test   %esi,%esi
je     1136 <isNullVector+0x36>
mov    %esi,%ecx
xor    %edx,%edx
movsd  0xeeb(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdi,%rdx,8),%xmm1
ucomisd %xmm0,%xmm1
jne    112d <isNullVector+0x2d>
jnp    1137 <isNullVector+0x37>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1120 <isNullVector+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isNullVector(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 1, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load double*, double** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds double, double* %12, i64 %14
%16 = load double, double* %15
%17 = fcmp oeq double %16, 1.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %11
store i32 0, i32* %6
br label %23
19: ; preds = %11
br label %20
20: ; preds = %19
%21 = load i32, i32* %5
%22 = add i32 %21, 1
store i32 %22, i32* %5
br label %7
23: ; preds = %18, %7
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @isNullVector(double* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = fcmp oeq double %11, 1.000000e+00
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %6, %8, %2
%15 = phi i32 [ 1, %2 ], [ 0, %8 ], [ 1, %6 ]
ret i32 %15
}
void SobelToPlaneRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @SobelToPlaneRow_NEON() {
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int strcoll(const char *s1, const char *s2) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @strcoll(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @__infer_nondet_int()
ret i32 %5
}

LLVM IR (-O2):
define i32 @strcoll(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Variables and functions */
int init_simulator(int /*<<< orphan*/);
int si_init(int argc, char *argv[]) { return init_simulator(0); }


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

x86 assembly (clang, -O2):
<si_init>:
xor    %edi,%edi
jmp    1030 <init_simulator@plt>

LLVM IR (-O0):
define i32 @si_init(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @init_simulator(i32 0)
ret i32 %5
}

LLVM IR (-O2):
define i32 @si_init(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @init_simulator(i32 0)
ret i32 %3
}
void BIO_new(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ dumpio_syscheck();
void dumpio_syscheck_(void) {
  int32_t ierr;
  ierr = dumpio_syscheck();
}


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

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

LLVM IR (-O0):
define void @dumpio_syscheck_() {
%1 = alloca i32
%2 = call i32 (...) @dumpio_syscheck()
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
define void @dumpio_syscheck_() {
%1 = tail call i32 (...) @dumpio_syscheck()
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int powercap_sysfs_control_type_get_enabled(char *, scalar_t__ *);
int powercap_rapl_control_is_enabled(void) {
  uint32_t enabled;
  int ret = powercap_sysfs_control_type_get_enabled("intel-rapl", &enabled);
  return ret ? ret : (enabled ? 1 : 0);
}


x86 assembly (clang, -O0):
<powercap_rapl_control_is_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <powercap_sysfs_control_type_get_enabled@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1140 <powercap_rapl_control_is_enabled+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <powercap_rapl_control_is_enabled+0x45>
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powercap_rapl_control_is_enabled>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <powercap_sysfs_control_type_get_enabled@plt>
xor    %ecx,%ecx
cmpq   $0x0,(%rsp)
setne  %cl
test   %eax,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @powercap_rapl_control_is_enabled() {
%1 = alloca i64
%2 = alloca i32
%3 = call i32 @powercap_sysfs_control_type_get_enabled(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64* %1)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
br label %13
8: ; preds = %0
%9 = load i64, i64* %1
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 1, i32 0
br label %13
13: ; preds = %8, %6
%14 = phi i32 [ %7, %6 ], [ %12, %8 ]
ret i32 %14
}

LLVM IR (-O2):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @powercap_rapl_control_is_enabled() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @powercap_sysfs_control_type_get_enabled(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = icmp eq i32 %3, 0
%5 = load i64, i64* %1
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = select i1 %4, i32 %7, i32 %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ decode_instruction();
int /*<<< orphan*/ execute_instruction();
int /*<<< orphan*/ fetch_instruction();
void process_instruction() {
  fetch_instruction();
  decode_instruction();
  execute_instruction();
}


x86 assembly (clang, -O0):
<process_instruction>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <fetch_instruction@plt>
mov    $0x0,%al
call   1050 <decode_instruction@plt>
mov    $0x0,%al
call   1040 <execute_instruction@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_instruction>:
push   %rax
xor    %eax,%eax
call   1030 <fetch_instruction@plt>
xor    %eax,%eax
call   1050 <decode_instruction@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <execute_instruction@plt>

LLVM IR (-O0):
define void @process_instruction() {
%1 = call i32 (...) @fetch_instruction()
%2 = call i32 (...) @decode_instruction()
%3 = call i32 (...) @execute_instruction()
ret void
}

LLVM IR (-O2):
define void @process_instruction() {
%1 = tail call i32 (...) @fetch_instruction()
%2 = tail call i32 (...) @decode_instruction()
%3 = tail call i32 (...) @execute_instruction()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xc4() {
  Assert_real((iscntrl(196) == 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_iscntrl.c",
              985, ("iscntrl should be 0 for 0xc4"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xc4>:
push   %rax
mov    $0xc4,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3d9,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc4\00"
define void @t_iscntrl_0xc4() {
%1 = call i64 @iscntrl(i32 196)
%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 985, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc4\00"
define void @t_iscntrl_0xc4() {
%1 = tail call i64 @iscntrl(i32 196)
%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 985, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *intword(const int number) { return ""; }


x86 assembly (clang, -O0):
<intword>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @intword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @intword(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
unsigned int xatoull_range_sfx(char const *, unsigned int, unsigned int,
                               struct suffix_mult const *);
unsigned int xatou_range_sfx(const char *str, unsigned int l, unsigned int u,
                             const struct suffix_mult *sfx) {
  return xatoull_range_sfx(str, l, u, sfx);
}


x86 assembly (clang, -O0):
<xatou_range_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <xatoull_range_sfx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatou_range_sfx>:
jmp    1030 <xatoull_range_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xatou_range_sfx(i8* %0, i32 %1, i32 %2, %struct.suffix_mult* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.suffix_mult*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.suffix_mult* %3, %struct.suffix_mult** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load %struct.suffix_mult*, %struct.suffix_mult** %8
%13 = call i32 @xatoull_range_sfx(i8* %9, i32 %10, i32 %11, %struct.suffix_mult* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xatou_range_sfx(i8* %0, i32 %1, i32 %2, %struct.suffix_mult* %3) {
%5 = tail call i32 @xatoull_range_sfx(i8* %0, i32 %1, i32 %2, %struct.suffix_mult* %3)
ret i32 %5
}
int fork() { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @fork() {
ret i32 -1
}
/* Variables and functions */
int __C_isblank(int);
int isblank(int c) { return __C_isblank(c); }


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

x86 assembly (clang, -O2):
<isblank>:
jmp    1030 <__C_isblank@plt>

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

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = tail call i32 @__C_isblank(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, ...);
int main() {
  short a[10];
  short *b;
  printf("%d %d %d\n", sizeof(a), sizeof(*a), sizeof(a[0]));
  printf("%d %d\n", sizeof(b), sizeof(*b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xee1(%rip),%rdi
mov    $0x14,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%ecx
mov    $0x14,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x8,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca [10 x i16]
%2 = alloca i16*
%3 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 20, i32 2, i64 2)
%4 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 20, i32 2, i64 2)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 8, i32 2)
ret i32 0
}
int uffs_GetMainVersion(int ver) { return (ver & 0xff000000) >> 24; }


x86 assembly (clang, -O0):
<uffs_GetMainVersion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uffs_GetMainVersion>:
mov    %edi,%eax
shr    $0x18,%eax
ret

LLVM IR (-O0):
define i32 @uffs_GetMainVersion(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @uffs_GetMainVersion(i32 %0) {
%2 = lshr i32 %0, 24
ret i32 %2
}
/* Variables and functions */
bool __is_delimiter(char c) { return c == '\\' || c == '/'; }


x86 assembly (clang, -O0):
<__is_delimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5c,%ecx
mov    %al,-0x2(%rbp)
je     1129 <__is_delimiter+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__is_delimiter>:
cmp    $0x5c,%dil
sete   %al
cmp    $0x2f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @__is_delimiter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 92
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 47
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @__is_delimiter(i8 signext %0) {
%2 = icmp eq i8 %0, 92
%3 = icmp eq i8 %0, 47
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_8Auint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x8A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Auint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x8a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Auint64_midword_reg>:
test   $0x8a0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Auint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 138
%6 = icmp ne i64 %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_8Auint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9043968
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int errno;
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, size_t);
ssize_t reain(char *buffer, size_t nbytes) {
  int saved_errno = errno;
  ssize_t bytes_read = read(STDIN_FILENO, buffer, nbytes);
  errno = saved_errno;
  return bytes_read;
}


x86 assembly (clang, -O0):
<reain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e91(%rip),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reain>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec0(%rip),%rbx
mov    (%rbx),%ebp
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1030 <read@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
@STDIN_FILENO = global i32 0
define i32 @reain(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i32, i32* @errno
store i32 %7, i32* %5
%8 = load i32, i32* @STDIN_FILENO
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @read(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %6
%12 = load i32, i32* %5
store i32 %12, i32* @errno
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@errno = global i32 0
@STDIN_FILENO = global i32 0
define i32 @reain(i8* nocapture %0, i64 %1) {
%3 = load i32, i32* @errno
%4 = load i32, i32* @STDIN_FILENO
%5 = tail call i32 @read(i32 %4, i8* %0, i64 %1)
store i32 %3, i32* @errno
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ BEH_INIT_SCD_VECTORS();
void beh_init() { BEH_INIT_SCD_VECTORS(); }


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

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

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

LLVM IR (-O2):
define void @beh_init() {
%1 = tail call i32 (...) @BEH_INIT_SCD_VECTORS()
ret void
}
/* Type definitions */
typedef unsigned long long uint64_t;
typedef int /*<<< orphan*/ uint32_t;
struct timespec {
  scalar_t__ tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
uint32_t get_cpu_cycles(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return (uint32_t)((uint64_t)ts.tv_sec * 1000000000ULL + ts.tv_nsec);
}


x86 assembly (clang, -O0):
<get_cpu_cycles>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,-0x8(%rbp),%rax
3b
add    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cpu_cycles>:
sub    $0x18,%rsp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,0x10(%rsp),%eax
3b
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @get_cpu_cycles() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = add i64 %6, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_MONOTONIC = global i32 0
define i32 @get_cpu_cycles() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%6 = load i64, i64* %5
%7 = mul i64 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = add i64 %7, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
double OP_GreaterThan(double op1, double op2) { return op1 > op2; }


x86 assembly (clang, -O0):
<OP_GreaterThan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP_GreaterThan>:
cmpltsd %xmm0,%xmm1
movsd  0xef3(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @OP_GreaterThan(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
%9 = sitofp i32 %8 to double
ret double %9
}

LLVM IR (-O2):
define double @OP_GreaterThan(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ LOG_CRIT;
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char const *);
void iv_fatal_default_handler(const char *msg) { syslog(LOG_CRIT, "%s", msg); }


x86 assembly (clang, -O0):
<iv_fatal_default_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <syslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iv_fatal_default_handler>:
mov    %rdi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <syslog@plt>

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

LLVM IR (-O2):
@LOG_CRIT = global i32 0
@.str = [3 x i8] c"%s\00"
define void @iv_fatal_default_handler(i8* %0) {
%2 = load i32, i32* @LOG_CRIT
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int rand();
int nopStat1(void *a) { return rand(); }


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

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

LLVM IR (-O0):
define i32 @nopStat1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @rand()
ret i32 %3
}

LLVM IR (-O2):
define i32 @nopStat1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @rand()
ret i32 %2
}
int do_394() { return 394; }


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

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

LLVM IR (-O0):
define i32 @do_394() {
ret i32 394
}

LLVM IR (-O2):
define i32 @do_394() {
ret i32 394
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ FD_SETSIZE;
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void Timer(int sec, long usec) {
  struct timeval tvSelect;
  tvSelect.tv_sec = sec;
  tvSelect.tv_usec = usec;
  select(FD_SETSIZE, NULL, NULL, NULL, &tvSelect);
}


x86 assembly (clang, -O0):
<Timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x20(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer>:
sub    $0x18,%rsp
mov    %edi,0x8(%rsp)
mov    %rsi,0x10(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%r8
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
@FD_SETSIZE = global i32 0
define void @Timer(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca %struct.timeval
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i64, i64* %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i64 %8, i64* %9
%10 = load i32, i32* @FD_SETSIZE
%11 = call i32 @select(i32 %10, i32* null, i32* null, i32* null, %struct.timeval* %5)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
@FD_SETSIZE = global i32 0
define void @Timer(i32 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
store i64 %1, i64* %6
%7 = load i32, i32* @FD_SETSIZE
%8 = call i32 @select(i32 %7, i32* null, i32* null, i32* null, %struct.timeval* %3)
ret void
}
void InitClock() {}


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

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

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

LLVM IR (-O2):
define void @InitClock() {
ret void
}
void __attribute__((
    __warning__("curl_easy_setopt expects a long argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_long(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_long() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}