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

/* Variables and functions */
int /*<<< orphan*/ i_instr_rm(struct j_state *, int /*<<< orphan*/, int,
                              int /*<<< orphan*/, int, int, int /*<<< orphan*/,
                              int);
void i_call_m(struct j_state *s, int base, int64_t off) {
  i_instr_rm(s, 0, 0xff, 0, 2, base, off, 4);
}


x86 assembly (clang, -O0):
<i_call_m>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%r9d
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
mov    $0xff,%edx
mov    $0x2,%r8d
mov    %ecx,%esi
mov    %eax,(%rsp)
movl   $0x4,0x8(%rsp)
call   1030 <i_instr_rm@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_call_m>:
push   %rax
mov    %edx,%eax
mov    %esi,%r9d
xor    %esi,%esi
mov    $0xff,%edx
xor    %ecx,%ecx
mov    $0x2,%r8d
push   $0x4
push   %rax
call   1030 <i_instr_rm@plt>
add    $0x10,%rsp
pop    %rax
ret

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

LLVM IR (-O2):
%struct.j_state = type { i32 }
define void @i_call_m(%struct.j_state* %0, i32 %1, i32 %2) {
%4 = tail call i32 @i_instr_rm(%struct.j_state* %0, i32 0, i32 255, i32 0, i32 2, i32 %1, i32 %2, i32 4)
ret void
}
/* Variables and functions */
bool bar1() { return true; }


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

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

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

LLVM IR (-O2):
define i32 @bar1() {
ret i32 1
}
/* Variables and functions */
int stat_file(char *);
int is_vzquota_available(void) { return stat_file("/usr/sbin/vzquota"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"/usr/sbin/vzquota\00"
define i32 @is_vzquota_available() {
%1 = call i32 @stat_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [18 x i8] c"/usr/sbin/vzquota\00"
define i32 @is_vzquota_available() {
%1 = tail call i32 @stat_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
float splitPenalty(int pins) {
  if (pins > 1) {
    return 1.0 + 1.0 / (pins - 1);
  }
  return 1.0 + 1.0;
}


x86 assembly (clang, -O0):
<splitPenalty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1141 <splitPenalty+0x41>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xee5(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    114e <splitPenalty+0x4e>
movss  0xeb7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<splitPenalty>:
cmp    $0x2,%edi
jl     1128 <splitPenalty+0x28>
add    $0xffffffff,%edi
cvtsi2sd %edi,%xmm0
movsd  0xef4(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ret
movss  0xed0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @splitPenalty(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
%11 = fadd double 1.000000e+00, %10
%12 = fptrunc double %11 to float
store float %12, float* %2
br label %14
13: ; preds = %1
store float 2.000000e+00, float* %2
br label %14
14: ; preds = %13, %6
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @splitPenalty(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
%7 = fadd double %6, 1.000000e+00
%8 = fptrunc double %7 to float
br label %9
9: ; preds = %1, %3
%10 = phi float [ %8, %3 ], [ 2.000000e+00, %1 ]
ret float %10
}
void putle16(unsigned char *p, unsigned short n) {
  p[0] = n;
  p[1] = n >> 8;
}


x86 assembly (clang, -O0):
<putle16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<putle16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @putle16(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = trunc i16 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @putle16(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = trunc i16 %1 to i8
store i8 %3, i8* %0
%4 = lshr i16 %1, 8
%5 = trunc i16 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tzparse(char *);
void tzreset() { tzparse("UTC0"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"UTC0\00"
define void @tzreset() {
%1 = call i32 @tzparse(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"UTC0\00"
define void @tzreset() {
%1 = tail call i32 @tzparse(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(const char *str) {
  int i = 0;
  while (*str++) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_ada_comments() {
  test_parser_verify_parse(test_parser_sourcefile("ada", " --comment"), "ada",
                           "", "--comment", 0);
}


x86 assembly (clang, -O0):
<test_ada_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebc(%rip),%rdx
lea    0xeb7(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ada_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec5(%rip),%rdx
lea    0xec0(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"ada\00"
@.str.1 = [11 x i8] c" --comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"--comment\00"
define void @test_ada_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"ada\00"
@.str.1 = [11 x i8] c" --comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"--comment\00"
define void @test_ada_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ sendfile(int, int, int /*<<< orphan*/ *, size_t);
void test(int to, int from, off_t offset, size_t ct) {
  sendfile(to, from, &offset, ct);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x18(%rbp),%rcx
lea    -0xc(%rbp),%rdx
call   1030 <sendfile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <sendfile@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i64, i64* %8
%12 = call i32 @sendfile(i32 %9, i32 %10, i32* %7, i64 %11)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0, i32 %1, i32 %2, i64 %3) {
%5 = alloca i32
store i32 %2, i32* %5
%6 = call i32 @sendfile(i32 %0, i32 %1, i32* %5, i64 %3)
ret void
}
double __trunctfdf2(long double a __attribute__((unused))) { return 0.0; }


x86 assembly (clang, -O0):
<__trunctfdf2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__trunctfdf2>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @__trunctfdf2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @__trunctfdf2(x86_fp80 %0) {
ret double 0.000000e+00
}
void test_invalid_clause() {
  int i;
#pragma omp parallel for foo bar
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_invalid_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_invalid_clause+0x28>
jmp    111a <test_invalid_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_invalid_clause+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_invalid_clause() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @test_invalid_clause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex32(unsigned int);
void print_emerg_hex32(unsigned int value) { __console_tx_hex32(value); }


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

x86 assembly (clang, -O2):
<print_emerg_hex32>:
jmp    1030 <__console_tx_hex32@plt>

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

LLVM IR (-O2):
define void @print_emerg_hex32(i32 %0) {
%2 = tail call i32 @__console_tx_hex32(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("Usage: parsr [OPTION] [FILE]\n"
         "Converts a PostgreSQL log FILE to a binary format for Playr\n"
         "\n"
         "  -h, --help                display this help and exit\n"
         "  -p \"FORMAT\"               specify a prefix format to use, "
         "default is \n"
         "  -o [FILE]                 specify what the output file should be\n"
         "                            \"%%m [%%p]: [%%s %%c-%%l] LOG:  "
         "duration: %%D ms  statement: %%S\"\n"
         "\n"
         "Examples:\n"
         "  parsr pgsql.log                     Converts pgsql.log to binary "
         "format using default prefix\n"
         "  parsr -c \"%%m [%%p]\" pgsql.log  Converts pgsql.log to binary "
         "format\n");
}


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

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

LLVM IR (-O0):
@.str = [555 x i8] c"Usage: parsr [OPTION] [FILE]\0AConverts a PostgreSQL log FILE to a binary format for Playr\0A\0A -h, --help display this help and exit\0A -p \22FORMAT\22 specify a prefix format to use, default is \0A -o [FILE] specify what the output file should be\0A \22%%m [%%p]: [%%s %%c-%%l] LOG: duration: %%D ms statement: %%S\22\0A\0AExamples:\0A parsr pgsql.log Converts pgsql.log to binary format using default prefix\0A parsr -c \22%%m [%%p]\22 pgsql.log Converts pgsql.log to binary format\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([555 x i8], [555 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [555 x i8] c"Usage: parsr [OPTION] [FILE]\0AConverts a PostgreSQL log FILE to a binary format for Playr\0A\0A -h, --help display this help and exit\0A -p \22FORMAT\22 specify a prefix format to use, default is \0A -o [FILE] specify what the output file should be\0A \22%%m [%%p]: [%%s %%c-%%l] LOG: duration: %%D ms statement: %%S\22\0A\0AExamples:\0A parsr pgsql.log Converts pgsql.log to binary format using default prefix\0A parsr -c \22%%m [%%p]\22 pgsql.log Converts pgsql.log to binary format\0A\00"
define void @print_help() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([555 x i8], [555 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lirerr(int);
void conditional_insert_dashdot(void) {
  lirerr(8888002);
  return;
}


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

x86 assembly (clang, -O2):
<conditional_insert_dashdot>:
mov    $0x879ec2,%edi
jmp    1030 <lirerr@plt>

LLVM IR (-O0):
define void @conditional_insert_dashdot() {
%1 = call i32 @lirerr(i32 8888002)
ret void
}

LLVM IR (-O2):
define void @conditional_insert_dashdot() {
%1 = tail call i32 @lirerr(i32 8888002)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int a = 0;
  while (a < 100)
    a++;
  printf("Hello World");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1145 <main+0x35>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %10, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
store i32 %12, i32* %6
br label %7
13: ; preds = %7
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x07() {
  Assert_real((isascii(7)),
              "/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_isascii.c",
              40, ("isascii should be 1 for 0x07"));
}


x86 assembly (clang, -O0):
<t_isascii_0x07>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x28,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x07>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x28,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x07\00"
define void @t_isascii_0x07() {
%1 = call i32 @isascii(i32 7)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x07\00"
define void @t_isascii_0x07() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 40, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long double _U_Qfneg(long double a) { return (0.0L - a); }


x86 assembly (clang, -O0):
<_U_Qfneg>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldz
fsubp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfneg>:
fldt   0x8(%rsp)
fldz
fsubp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @_U_Qfneg(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fsub x86_fp80 0xK00000000000000000000, %3
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @_U_Qfneg(x86_fp80 %0) {
%2 = fsub x86_fp80 0xK00000000000000000000, %0
ret x86_fp80 %2
}
float sign(float a) { return a > 0 ? 1.0f : a < 0 ? -1.0f : 0.0f; }


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112c <sign+0x2c>
movss  0xee2(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1152 <sign+0x52>
movss  -0x4(%rbp),%xmm0
movss  0xec7(%rip),%xmm3
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorps  %xmm1,%xmm1
movaps %xmm0,%xmm2
cmpltss %xmm1,%xmm2
movss  0xeed(%rip),%xmm3
andps  %xmm2,%xmm3
cmpltss %xmm0,%xmm1
movss  0xee1(%rip),%xmm0
andps  %xmm1,%xmm0
andnps %xmm3,%xmm1
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sign(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load float, float* %2
%8 = fcmp olt float %7, 0.000000e+00
%9 = zext i1 %8 to i64
%10 = select i1 %8, float -1.000000e+00, float 0.000000e+00
br label %11
11: ; preds = %6, %5
%12 = phi float [ 1.000000e+00, %5 ], [ %10, %6 ]
ret float %12
}

LLVM IR (-O2):
define float @sign(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fcmp olt float %0, 0.000000e+00
%4 = select i1 %3, float -1.000000e+00, float 0.000000e+00
%5 = select i1 %2, float 1.000000e+00, float %4
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int time(int /*<<< orphan*/ *);
int get_current_time() {
  static int now;
  now = time((time_t *)NULL);
  return now;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
mov    %eax,0x2f09(%rip)
mov    0x2f03(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@get_current_time.now = internal global i32 0
define i32 @get_current_time() {
%1 = call i32 @time(i32* null)
store i32 %1, i32* @get_current_time.now
%2 = load i32, i32* @get_current_time.now
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_current_time() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
char *AdmAccept(char *pt) {
  while (*pt && (*pt != ' ' && *pt != '\t')) {
    pt++;
  }
  return pt;
}


x86 assembly (clang, -O0):
<AdmAccept>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <AdmAccept+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0xa(%rbp)
je     1142 <AdmAccept+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
setne  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <AdmAccept+0x58>
jmp    1169 <AdmAccept+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <AdmAccept+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AdmAccept>:
mov    %rdi,%rax
movabs $0x100000201,%rcx
jmp    1114 <AdmAccept+0x14>
nop
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1110 <AdmAccept+0x10>
bt     %rdx,%rcx
jae    1110 <AdmAccept+0x10>
ret

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

LLVM IR (-O2):
define i8* @AdmAccept(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 32, label %7
i8 9, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
ret i8* %3
}
void gtk_entry_layout_index_to_text_index() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_layout_index_to_text_index() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_key_line_number(char *);
int main(int argc, char *argv[]) {
  get_key_line_number(argv[1]);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <get_key_line_number@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @get_key_line_number(i8* %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @get_key_line_number(i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_ext_stream_restore_write() {
  printf("NOT IMPLEMENTED:"
         "pa_ext_stream_restore_write"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_ext_stream_restore_write\0A\00"
define i32 @pa_ext_stream_restore_write() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_ext_stream_restore_write\00"
define i32 @pa_ext_stream_restore_write() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ SEED_KEY_SCHEDULE;

/* Variables and functions */
int /*<<< orphan*/ SEED_decrypt(unsigned char const *, unsigned char *,
                                int /*<<< orphan*/ const *);
int /*<<< orphan*/ SEED_encrypt(unsigned char const *, unsigned char *,
                                int /*<<< orphan*/ const *);
void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out,
                      const SEED_KEY_SCHEDULE *ks, int enc) {
  if (enc)
    SEED_encrypt(in, out, ks);
  else
    SEED_decrypt(in, out, ks);
}


x86 assembly (clang, -O0):
<SEED_ecb_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1157 <SEED_ecb_encrypt+0x37>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <SEED_encrypt@plt>
jmp    1168 <SEED_ecb_encrypt+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <SEED_decrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEED_ecb_encrypt>:
test   %ecx,%ecx
je     1129 <SEED_ecb_encrypt+0x9>
jmp    1030 <SEED_encrypt@plt>
jmp    1040 <SEED_decrypt@plt>

LLVM IR (-O0):
define void @SEED_ecb_encrypt(i8* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i8*, i8** %5
%13 = load i8*, i8** %6
%14 = load i32*, i32** %7
%15 = call i32 @SEED_encrypt(i8* %12, i8* %13, i32* %14)
br label %21
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = load i32*, i32** %7
%20 = call i32 @SEED_decrypt(i8* %17, i8* %18, i32* %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
define void @SEED_ecb_encrypt(i8* %0, i8* %1, i32* %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i32 @SEED_encrypt(i8* %0, i8* %1, i32* %2)
br label %10
8: ; preds = %4
%9 = tail call i32 @SEED_decrypt(i8* %0, i8* %1, i32* %2)
br label %10
10: ; preds = %8, %6
ret void
}
int test_imm_B0uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xB0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B0uint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 176
%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_B0uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 176
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct timespec {
  long tv_sec;
  long tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_BOOTTIME;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
long nanotime() {
  struct timespec ts;
  if (clock_gettime(CLOCK_BOOTTIME, &ts) < 0) {
    perror("nanotime");
    exit(1);
  }
  return (ts.tv_sec * 1000000000L) + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<nanotime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
jge    116a <nanotime+0x3a>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nanotime>:
sub    $0x18,%rsp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <clock_gettime@plt>
test   %rax,%rax
js     115f <nanotime+0x2f>
imul   $0x3b9aca00,0x8(%rsp),%rax
9a 3b
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret
lea    0xe9a(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@CLOCK_BOOTTIME = global i32 0
@.str = [9 x i8] c"nanotime\00"
define i64 @nanotime() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_BOOTTIME
%3 = call i64 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%10 = load i64, i64* %9
%11 = mul nsw i64 %10, 1000000000
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%13 = load i64, i64* %12
%14 = add nsw i64 %11, %13
ret i64 %14
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@CLOCK_BOOTTIME = global i32 0
@.str = [9 x i8] c"nanotime\00"
define i64 @nanotime() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_BOOTTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%11 = load i64, i64* %10
%12 = mul nsw i64 %11, 1000000000
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%14 = load i64, i64* %13
%15 = add nsw i64 %12, %14
ret i64 %15
}
/* Variables and functions */
scalar_t__ ft_isalpha(int);
scalar_t__ ft_isdigit(int);
int ft_isalnum(int c) {
  if (ft_isdigit(c) || ft_isalpha(c))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ft_isdigit@plt>
cmp    $0x0,%rax
jne    114f <ft_isalnum+0x2f>
mov    -0x8(%rbp),%edi
call   1040 <ft_isalpha@plt>
cmp    $0x0,%rax
je     115b <ft_isalnum+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <ft_isalnum+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <ft_isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <ft_isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = tail call i64 @ft_isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ft_isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int show_continuation_parameters(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(194, a, b, c);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @show_continuation_parameters() {
%1 = tail call i32 @_ada_use_c2phc(i32 194, i32* undef, i32* undef, double* undef)
ret i32 %1
}
int clickplc_exe_ConnectUncond_enc(void *obj, unsigned char *stream) {
  int encsize = 4;
  stream[0] = 0x00;
  stream[1] = 0x07;
  stream[2] = 0xff;
  stream[3] = 0xff;
  return (encsize);
}


x86 assembly (clang, -O0):
<clickplc_exe_ConnectUncond_enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x7,0x1(%rax)
mov    -0x10(%rbp),%rax
movb   $0xff,0x2(%rax)
mov    -0x10(%rbp),%rax
movb   $0xff,0x3(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clickplc_exe_ConnectUncond_enc>:
movl   $0xffff0700,(%rsi)
mov    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @clickplc_exe_ConnectUncond_enc(i8* nocapture readnone %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
%3 = getelementptr inbounds i8, i8* %1, i64 1
store i8 7, i8* %3
%4 = getelementptr inbounds i8, i8* %1, i64 2
store i8 -1, i8* %4
%5 = getelementptr inbounds i8, i8* %1, i64 3
store i8 -1, i8* %5
ret i32 4
}
/* Type definitions */
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
struct Cyc_Absyn_Exp *Cyc_Absyn_prim2_exp(unsigned int, struct Cyc_Absyn_Exp *,
                                          struct Cyc_Absyn_Exp *, unsigned int);
struct Cyc_Absyn_Exp *Cyc_Absyn_neq_exp(struct Cyc_Absyn_Exp *e1,
                                        struct Cyc_Absyn_Exp *e2,
                                        unsigned loc) {
  struct Cyc_Absyn_Exp *_T0;
  _T0 = Cyc_Absyn_prim2_exp(6U, e1, e2, loc);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_neq_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x6,%edi
call   1030 <Cyc_Absyn_prim2_exp@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Absyn_neq_exp>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x6,%edi
jmp    1030 <Cyc_Absyn_prim2_exp@plt>

LLVM IR (-O0):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_neq_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca %struct.Cyc_Absyn_Exp*
%6 = alloca i32
%7 = alloca %struct.Cyc_Absyn_Exp*
store %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp** %4
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %5
store i32 %2, i32* %6
%8 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%9 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %5
%10 = load i32, i32* %6
%11 = call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 6, %struct.Cyc_Absyn_Exp* %8, %struct.Cyc_Absyn_Exp* %9, i32 %10)
store %struct.Cyc_Absyn_Exp* %11, %struct.Cyc_Absyn_Exp** %7
%12 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %7
ret %struct.Cyc_Absyn_Exp* %12
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Exp = type { i32 }
define %struct.Cyc_Absyn_Exp* @Cyc_Absyn_neq_exp(%struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2) {
%4 = tail call %struct.Cyc_Absyn_Exp* @Cyc_Absyn_prim2_exp(i32 6, %struct.Cyc_Absyn_Exp* %0, %struct.Cyc_Absyn_Exp* %1, i32 %2)
ret %struct.Cyc_Absyn_Exp* %4
}
/* Variables and functions */
int /*<<< orphan*/ freerange(void *, void *);
void kinit(void *start, void *end) { freerange(start, end); }


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

x86 assembly (clang, -O2):
<kinit>:
jmp    1030 <freerange@plt>

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

LLVM IR (-O2):
define void @kinit(i8* %0, i8* %1) {
%3 = tail call i32 @freerange(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int open(char *, int, int);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int lif_open_img_file(char *filename, int flags, int mode) {
  int iret;
  iret = open(filename, flags, mode);
  if (iret == -1) {
    fprintf(stderr, "%s\n", strerror(errno));
  }
  return (iret);
}


x86 assembly (clang, -O0):
<lif_open_img_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    118a <lif_open_img_file+0x5a>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x18(%rbp),%edi
mov    %rax,%rdx
lea    0xe7b(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lif_open_img_file>:
push   %rbp
push   %rbx
push   %rax
call   1040 <open@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1167 <lif_open_img_file+0x37>
mov    0x2e9a(%rip),%rax
mov    (%rax),%ebp
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea3(%rip),%rsi
mov    %ebp,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@errno = global i32 0
define i32 @lif_open_img_file(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @open(i8* %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %19
14: ; preds = %3
%15 = load i32, i32* @stderr
%16 = load i32, i32* @errno
%17 = call i8* @strerror(i32 %16)
%18 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %19
19: ; preds = %14, %3
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@errno = global i32 0
define i32 @lif_open_img_file(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = load i32, i32* @errno
%9 = tail call i8* @strerror(i32 %8)
%10 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ rule(int /*<<< orphan*/, int, int);
main() { rule(0, 16, 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x10,%esi
mov    $0x4,%edx
call   1030 <rule@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x10,%esi
mov    $0x4,%edx
call   1030 <rule@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @rule(i32 0, i32 16, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rule(i32 0, i32 16, i32 4)
ret i32 0
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] - 51238316UL) - 339126204UL;
    local1 = 0UL;
    while (local1 < 0UL) {
      local1++;
    }
    output[0UL] =
        ((state[0UL] << 1UL) | (state[0UL] >> 63UL)) ^ 105059837885669120UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
sub    $0x30dd5ac,%rax
sub    $0x1436a7bc,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jae    1147 <RandomFunc+0x47>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112b <RandomFunc+0x2b>
mov    -0x18(%rbp),%rcx
shl    $0x1,%rcx
mov    -0x18(%rbp),%rax
shr    $0x3f,%rax
or     %rax,%rcx
movabs $0x1753f5dad55df00,%rax
3f 75 01
xor    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xffffffffe8bb8298,%rax
add    (%rdi),%rax
rol    %rax
movabs $0x1753f5dad55df00,%rcx
3f 75 01
xor    %rax,%rcx
mov    %rcx,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = sub i64 %9, 51238316
%11 = sub i64 %10, 339126204
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = load i64, i64* %6
%18 = add i64 %17, 1
store i64 %18, i64* %6
br label %13
19: ; preds = %13
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%21 = load i64, i64* %20
%22 = shl i64 %21, 1
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = lshr i64 %24, 63
%26 = or i64 %22, %25
%27 = xor i64 %26, 105059837885669120
%28 = load i64*, i64** %4
%29 = getelementptr inbounds i64, i64* %28, i64 0
store i64 %27, i64* %29
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -390364520
%5 = tail call i64 @llvm.fshl.i64(i64 %4, i64 %4, i64 1)
%6 = xor i64 %5, 105059837885669120
store i64 %6, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ p(char *);
main() {
  p("abc");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
define i32 @main() {
%1 = tail call i32 @p(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}