xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *parser_get_next_quoted_str2(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((unused)) char *parser_get_next_quoted_str(FILE *fp) {
  return (parser_get_next_quoted_str2(fp, NULL));
}


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

x86 assembly (clang, -O2):
<parser_get_next_quoted_str>:
xor    %esi,%esi
jmp    1030 <parser_get_next_quoted_str2@plt>

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

LLVM IR (-O2):
define i8* @parser_get_next_quoted_str(i32* %0) {
%2 = tail call i8* @parser_get_next_quoted_str2(i32* %0, i32* null)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("Computes the sha256 hash for files and caches it in an extended "
         "attribute.\n"
         "Advanced options (defaults: -scu):\n"
         "\t-i\tcheck integrity\n"
         "\t-c\tcompute hash if not cached\n"
         "\t-r\talway recompute hash\n"
         "\t-s\tshow hash if available (states: n|ew, c|ached, s|tale,\n"
         "\t\t  r|efreshed, u|pdated, v|erified, !=unexpected mismatch)\n"
         "\t-d\tdelete cached hash\n"
         "\t-u\tupdate cached hash\n"
         "\t-q\tquiet\n"
         "\t-h\tprint this help\n");
}


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

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

LLVM IR (-O0):
@.str = [382 x i8] c"Computes the sha256 hash for files and caches it in an extended attribute.\0AAdvanced options (defaults: -scu):\0A\09-i\09check integrity\0A\09-c\09compute hash if not cached\0A\09-r\09alway recompute hash\0A\09-s\09show hash if available (states: n|ew, c|ached, s|tale,\0A\09\09 r|efreshed, u|pdated, v|erified, !=unexpected mismatch)\0A\09-d\09delete cached hash\0A\09-u\09update cached hash\0A\09-q\09quiet\0A\09-h\09print this help\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([382 x i8], [382 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [381 x i8] c"Computes the sha256 hash for files and caches it in an extended attribute.\0AAdvanced options (defaults: -scu):\0A\09-i\09check integrity\0A\09-c\09compute hash if not cached\0A\09-r\09alway recompute hash\0A\09-s\09show hash if available (states: n|ew, c|ached, s|tale,\0A\09\09 r|efreshed, u|pdated, v|erified, !=unexpected mismatch)\0A\09-d\09delete cached hash\0A\09-u\09update cached hash\0A\09-q\09quiet\0A\09-h\09print this help\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([381 x i8], [381 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int __builtin_clzll(unsigned long long);
uint64_t chpl_bitops_clz_64(unsigned long long x) {
  return x ? __builtin_clzll(x) : 64;
}


x86 assembly (clang, -O0):
<chpl_bitops_clz_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1127 <chpl_bitops_clz_64+0x27>
mov    -0x8(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,-0xc(%rbp)
jmp    1134 <chpl_bitops_clz_64+0x34>
mov    $0x40,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <chpl_bitops_clz_64+0x34>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_clz_64>:
test   %rdi,%rdi
je     110e <chpl_bitops_clz_64+0xe>
bsr    %rdi,%rax
xor    $0x3f,%rax
ret
mov    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @chpl_bitops_clz_64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i64 @llvm.ctlz.i64(i64 %6, i1 true)
%8 = trunc i64 %7 to i32
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 64, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @chpl_bitops_clz_64(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 false)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
void sprint_inc_DPTR(char *str) {
  sprintf(str, "INC   DPTR                      ");
}


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

x86 assembly (clang, -O2):
<sprint_inc_DPTR>:
movups 0xf09(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdi)
movb   $0x0,0x20(%rdi)
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"INC DPTR \00"
define void @sprint_inc_DPTR(i8* nocapture writeonly %0) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(33) %0, i8* align 1 dereferenceable(33) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 33, i1 false)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void nvfree(void *s) {
  if (s)
    free(s);
}


x86 assembly (clang, -O0):
<nvfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <nvfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvfree>:
test   %rdi,%rdi
je     111a <nvfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @nvfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @nvfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ test_sat_parser_should_fail(char *);
int test20(void) {
  return test_sat_parser_should_fail("(a or -") ||
         test_sat_parser_should_fail("(-a  or -   ");
}


x86 assembly (clang, -O0):
<test20>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    114c <test20+0x3c>
lea    0xecb(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test20>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112c <test20+0x1c>
pop    %rcx
ret
lea    0xed5(%rip),%rdi
call   1030 <test_sat_parser_should_fail@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"(a or -\00"
@.str.1 = [13 x i8] c"(-a or - \00"
define i32 @test20() {
%1 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ true, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [8 x i8] c"(a or -\00"
@.str.1 = [13 x i8] c"(-a or - \00"
define i32 @test20() {
%1 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @test_sat_parser_should_fail(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ japi_setunitinc(int, int);
void j_setunitinc(int arg0, int arg1) { japi_setunitinc(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setunitinc>:
jmp    1030 <japi_setunitinc@plt>

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

LLVM IR (-O2):
define void @j_setunitinc(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setunitinc(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WINS_ErrorMessage(int /*<<< orphan*/);
int /*<<< orphan*/ WSAGetLastError();
int /*<<< orphan*/ WinPrint(char *, int /*<<< orphan*/);
int close(int);
int WINS_CloseSocket(int socket) {
  if (close(socket) == -1) {
    WinPrint("WINS_CloseSocket: %s\n", WINS_ErrorMessage(WSAGetLastError()));
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<WINS_CloseSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <close@plt>
cmp    $0xffffffff,%eax
jne    1184 <WINS_CloseSocket+0x44>
mov    $0x0,%al
call   1060 <WSAGetLastError@plt>
mov    %eax,%edi
call   1030 <WINS_ErrorMessage@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1040 <WinPrint@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    118b <WINS_CloseSocket+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WINS_CloseSocket>:
push   %rax
call   1050 <close@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1151 <WINS_CloseSocket+0x11>
pop    %rcx
ret
xor    %eax,%eax
call   1060 <WSAGetLastError@plt>
mov    %eax,%edi
call   1030 <WINS_ErrorMessage@plt>
lea    0xe9a(%rip),%rdi
mov    %eax,%esi
call   1040 <WinPrint@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"WINS_CloseSocket: %s\0A\00"
define i32 @WINS_CloseSocket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @close(i32 %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = call i32 (...) @WSAGetLastError()
%9 = call i32 @WINS_ErrorMessage(i32 %8)
%10 = call i32 @WinPrint(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %9)
store i32 -1, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@.str = [22 x i8] c"WINS_CloseSocket: %s\0A\00"
define i32 @WINS_CloseSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 (...) @WSAGetLastError()
%6 = tail call i32 @WINS_ErrorMessage(i32 %5)
%7 = tail call i32 @WinPrint(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %9
}
int test_imm_3Cint16_reg(short val) {
  return ((val) & (-0x3C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Cint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffc4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Cint16_reg(i16 signext %0) {
%2 = and i16 %0, -60
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void answer_black(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_black() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putc_i(char);
void putc_s(char *s_) {
  for (int i = 0; s_[i] != 0; i++)
    putc_i(s_[i]);
}


x86 assembly (clang, -O0):
<putc_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <putc_s+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putc_i@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <putc_s+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc_s>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <putc_s+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putc_i@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <putc_s+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @putc_s(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %9, %5 ], [ 0, %1 ]
%7 = phi i8 [ %11, %5 ], [ %2, %1 ]
%8 = tail call i32 @putc_i(i8 signext %7)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %4, label %5
}
/* Variables and functions */
int rpathx_value();
int rpathy_value() { return 10 * rpathx_value() + 7; }


x86 assembly (clang, -O0):
<rpathy_value>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rpathx_value@plt>
imul   $0xa,%eax,%eax
add    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpathy_value>:
push   %rax
xor    %eax,%eax
call   1030 <rpathx_value@plt>
lea    (%rax,%rax,4),%eax
add    %eax,%eax
add    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rpathy_value() {
%1 = call i32 (...) @rpathx_value()
%2 = mul nsw i32 10, %1
%3 = add nsw i32 %2, 7
ret i32 %3
}

LLVM IR (-O2):
define i32 @rpathy_value() {
%1 = tail call i32 (...) @rpathx_value()
%2 = mul nsw i32 %1, 10
%3 = add nsw i32 %2, 7
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int number;
  char str[1000];
  number = -2147483648;
  printf("Integer %d printed as\n String:", number);
  itoa(number, str);
  printf("%s", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x3f0(%rbp),%rsi
call   1040 <itoa@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
lea    0xed1(%rip),%rdi
mov    $0x80000000,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    $0x80000000,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Integer %d printed as\0A String:\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
store i32 -2147483648, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%8 = call i32 @itoa(i32 %6, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Integer %d printed as\0A String:\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 -2147483648)
%4 = call i32 @itoa(i32 -2147483648, i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t lrotate(uint8_t op1, uint8_t op2) {
  return (op1 << op2) | (op1 >> (8 - op2));
}


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

x86 assembly (clang, -O2):
<lrotate>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
sar    %cl,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @lrotate(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 8, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void setCopyright(unsigned char *mp3header) {
  mp3header[3] |= 0x08;
  mp3header[3] |= 0x04;
}


x86 assembly (clang, -O0):
<setCopyright>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%ecx
or     $0x8,%ecx
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%ecx
or     $0x4,%ecx
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setCopyright>:
orb    $0xc,0x3(%rdi)
ret

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

LLVM IR (-O2):
define void @setCopyright(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = or i8 %3, 12
store i8 %4, i8* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
int /*<<< orphan*/ _iconv_open(char const *, char const *,
                               int /*<<< orphan*/ *);
iconv_t libiconv_open(const char *out, const char *in) {
  return (_iconv_open(out, in, NULL));
}


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

x86 assembly (clang, -O2):
<libiconv_open>:
xor    %edx,%edx
jmp    1030 <_iconv_open@plt>

LLVM IR (-O0):
define i32 @libiconv_open(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 @_iconv_open(i8* %5, i8* %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @libiconv_open(i8* %0, i8* %1) {
%3 = tail call i32 @_iconv_open(i8* %0, i8* %1, i32* null)
ret i32 %3
}
int nan_ne_jump(double x) {
  volatile double y = x;
  volatile double z = y;
  if (y != z) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<nan_ne_jump>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jne    113c <nan_ne_jump+0x3c>
jp     113c <nan_ne_jump+0x3c>
jmp    1148 <nan_ne_jump+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <nan_ne_jump+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nan_ne_jump>:
movsd  %xmm0,-0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
movsd  %xmm0,-0x8(%rsp)
movsd  -0x10(%rsp),%xmm0
cmpneqsd -0x8(%rsp),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nan_ne_jump(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
%6 = load double, double* %3
store volatile double %6, double* %4
%7 = load volatile double, double* %4
store volatile double %7, double* %5
%8 = load volatile double, double* %4
%9 = load volatile double, double* %5
%10 = fcmp une double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
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 @nan_ne_jump(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%5 = bitcast double* %3 to i8*
%6 = load volatile double, double* %2
store volatile double %6, double* %3
%7 = load volatile double, double* %2
%8 = load volatile double, double* %3
%9 = fcmp une double %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ disable_cache_as_ram();
int /*<<< orphan*/ stop_this_cpu();
void STOP_CAR_AND_CPU(void) {
  disable_cache_as_ram();
  stop_this_cpu();
}


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

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

LLVM IR (-O0):
define void @STOP_CAR_AND_CPU() {
%1 = call i32 (...) @disable_cache_as_ram()
%2 = call i32 (...) @stop_this_cpu()
ret void
}

LLVM IR (-O2):
define void @STOP_CAR_AND_CPU() {
%1 = tail call i32 (...) @disable_cache_as_ram()
%2 = tail call i32 (...) @stop_this_cpu()
ret void
}
void v() {}


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

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

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

LLVM IR (-O2):
define void @v() {
ret void
}
float nvLerpf(float a, float b, float t) { return a * (1.0f - t) + b * t; }


x86 assembly (clang, -O0):
<nvLerpf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm2
subss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvLerpf>:
movss  0xef8(%rip),%xmm3
subss  %xmm2,%xmm3
mulss  %xmm2,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @nvLerpf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fsub float 1.000000e+00, %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = call float @llvm.fmuladd.f32(float %7, float %9, float %12)
ret float %13
}

LLVM IR (-O2):
define float @nvLerpf(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %2
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %5)
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ get_port(int /*<<< orphan*/, int, int);
uint8_t io_read_port(uint8_t port) { return get_port(port, 0x12, 0x13); }


x86 assembly (clang, -O0):
<io_read_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
mov    $0x13,%edx
call   1030 <get_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_read_port>:
mov    $0x12,%esi
mov    $0x13,%edx
jmp    1030 <get_port@plt>

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

LLVM IR (-O2):
define i32 @io_read_port(i32 %0) {
%2 = tail call i32 @get_port(i32 %0, i32 18, i32 19)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int *);
main() {
  int tab[2];
  tab[0] = tab[1] = 0;
  f(tab);
  if (tab[0] != 2 || tab[1] != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <f@plt>
cmpl   $0x2,-0xc(%rbp)
jne    116a <main+0x3a>
cmpl   $0x1,-0x8(%rbp)
je     1171 <main+0x41>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdi
call   1040 <f@plt>
cmpl   $0x2,(%rsp)
jne    1155 <main+0x25>
cmpl   $0x1,0x4(%rsp)
jne    1155 <main+0x25>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 0, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 0, i32* %4
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = call i32 @f(i32* %5)
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
%9 = icmp ne i32 %8, 2
br i1 %9, label %14, label %10
10: ; preds = %0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%12 = load i32, i32* %11
%13 = icmp ne i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %10, %0
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %10
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 1
store i32 0, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
store i32 0, i32* %4
%5 = call i32 @f(i32* %4)
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 1
%10 = select i1 %7, i1 true, i1 %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %0
%14 = call i32 @exit(i32 0)
unreachable
}
int devm_thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.thermal_zone_device = type opaque
define i32 @devm_thermal_add_hwmon_sysfs(%struct.thermal_zone_device* nocapture readnone %0) {
ret i32 0
}
int test_imm_4Auint16_mem(unsigned short *val) {
  return ((*val) & (0x4A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Auint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 74
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _bad_return_address(int);
void bad_return_l1_non_existant(void) { _bad_return_address(0xFFAFFFFC); }


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

x86 assembly (clang, -O2):
<bad_return_l1_non_existant>:
mov    $0xffaffffc,%edi
jmp    1030 <_bad_return_address@plt>

LLVM IR (-O0):
define void @bad_return_l1_non_existant() {
%1 = call i32 @_bad_return_address(i32 -5242884)
ret void
}

LLVM IR (-O2):
define void @bad_return_l1_non_existant() {
%1 = tail call i32 @_bad_return_address(i32 -5242884)
ret void
}
/* Variables and functions */
scalar_t__ isprime(int);
int /*<<< orphan*/ make();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, n;
  make();
  for (n = 0, i = 0; i <= 10000000; i++)
    if (isprime(i))
      n++;
  printf("The number of primes below 10^7 is %d.\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <make@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jg     118f <main+0x5f>
mov    -0x8(%rbp),%edi
call   1040 <isprime@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1181 <main+0x51>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x24>
mov    -0xc(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <make@plt>
xor    %ebp,%ebp
xchg   %ax,%ax
mov    %ebp,%edi
call   1040 <isprime@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebx
add    $0x1,%ebp
cmp    $0x989681,%ebp
jne    1140 <main+0x10>
lea    0xea0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"The number of primes below 10^7 is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @make()
store i32 0, i32* %3
store i32 0, i32* %2
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 10000000
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i64 @isprime(i32 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %5
19: ; preds = %5
%20 = load i32, i32* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"The number of primes below 10^7 is %d.\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @make()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %8, %2 ]
%4 = phi i32 [ 0, %0 ], [ %9, %2 ]
%5 = tail call i64 @isprime(i32 %4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = add nuw nsw i32 %3, %7
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 10000001
br i1 %10, label %11, label %2
11: ; preds = %2
%12 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xb4() {
  Assert_real((ispunct(180) == 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_ispunct.c",
              905, ("ispunct should be 0 for 0xb4"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xb4>:
push   %rax
mov    $0xb4,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x389,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb4\00"
define void @t_ispunct_0xb4() {
%1 = call i64 @ispunct(i32 180)
%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 905, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xb4\00"
define void @t_ispunct_0xb4() {
%1 = tail call i64 @ispunct(i32 180)
%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 905, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_utf16_le(const unsigned char *data) {
  return data[0] == 0xFE && data[1] == 0xFF;
}


x86 assembly (clang, -O0):
<is_utf16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %eax,%eax
cmp    $0xfe,%ecx
mov    %al,-0x9(%rbp)
jne    1133 <is_utf16_le+0x33>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xff,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_utf16_le>:
xor    %eax,%eax
cmpb   $0xfe,(%rdi)
jne    1110 <is_utf16_le+0x10>
xor    %eax,%eax
cmpb   $0xff,0x1(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_utf16_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 254
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 255
br label %14
14: ; preds = %8, %1
%15 = phi i1 [ false, %1 ], [ %13, %8 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_utf16_le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, -2
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, -1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
void bar() { foo(1, 2); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <foo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 @foo(i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 @foo(i32 1, i32 2)
ret void
}
/* Variables and functions */
int is_del(char c, char *del) {
  int i;
  i = -1;
  if (del == NULL)
    return (0);
  while (del[++i] != '\0') {
    if (c == del[i])
      return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<is_del>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    112c <is_del+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    117e <is_del+0x7e>
jmp    1131 <is_del+0x31>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1177 <is_del+0x77>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1172 <is_del+0x72>
movl   $0x1,-0x4(%rbp)
jmp    117e <is_del+0x7e>
jmp    1131 <is_del+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_del>:
xor    %eax,%eax
test   %rsi,%rsi
je     1125 <is_del+0x25>
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
test   %cl,%cl
je     1125 <is_del+0x25>
add    $0x1,%rsi
cmp    %dil,%cl
jne    1110 <is_del+0x10>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_del(i8 signext %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %12, label %4
4: ; preds = %2, %10
%5 = phi i64 [ %6, %10 ], [ -1, %2 ]
%6 = add nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %1, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = icmp eq i8 %8, %0
br i1 %11, label %12, label %4
12: ; preds = %4, %10, %2
%13 = phi i32 [ 0, %2 ], [ 0, %4 ], [ 1, %10 ]
ret i32 %13
}
int int_eq(int x, int y) { return x == y; }


x86 assembly (clang, -O0):
<int_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_eq>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @int_eq(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @int_eq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct RNAplfold_args_info {
  int dummy;
};

/* Variables and functions */
int RNAplfold_cmdline_parser2(int, char **, struct RNAplfold_args_info *,
                              int /*<<< orphan*/, int, int);
int RNAplfold_cmdline_parser(int argc, char **argv,
                             struct RNAplfold_args_info *args_info) {
  return RNAplfold_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<RNAplfold_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <RNAplfold_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAplfold_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAplfold_cmdline_parser2@plt>

LLVM IR (-O0):
%struct.RNAplfold_args_info = type { i32 }
define i32 @RNAplfold_cmdline_parser(i32 %0, i8** %1, %struct.RNAplfold_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.RNAplfold_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.RNAplfold_args_info* %2, %struct.RNAplfold_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.RNAplfold_args_info*, %struct.RNAplfold_args_info** %6
%10 = call i32 @RNAplfold_cmdline_parser2(i32 %7, i8** %8, %struct.RNAplfold_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.RNAplfold_args_info = type { i32 }
define i32 @RNAplfold_cmdline_parser(i32 %0, i8** %1, %struct.RNAplfold_args_info* %2) {
%4 = tail call i32 @RNAplfold_cmdline_parser2(i32 %0, i8** %1, %struct.RNAplfold_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
int arch_ffz(int);
int /*<<< orphan*/ assert(int);
int find_next_zero(int word, int start) {
  assert(word != -1U);
  word >>= (start + 1);
  return arch_ffz(word) + start + 1;
}


x86 assembly (clang, -O0):
<find_next_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <arch_ffz@plt>
add    -0x8(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_next_zero>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0xffffffff,%ebp
setne  %dil
call   1040 <assert@plt>
lea    0x1(%rbx),%ecx
sar    %cl,%ebp
mov    %ebp,%edi
call   1030 <arch_ffz@plt>
add    %ebx,%eax
add    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @find_next_zero(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 = icmp ne i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = load i32, i32* %3
%12 = ashr i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @arch_ffz(i32 %13)
%15 = load i32, i32* %4
%16 = add nsw i32 %14, %15
%17 = add nsw i32 %16, 1
ret i32 %17
}

LLVM IR (-O2):
define i32 @find_next_zero(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, -1
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = add i32 %1, 1
%7 = ashr i32 %0, %6
%8 = tail call i32 @arch_ffz(i32 %7)
%9 = add i32 %6, %8
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
time_t Time(time_t *t) {
  time_t ret;
  ret = Time(t);
  if (ret == (time_t)-1) {
    Sys_failure("time");
  }
  return ret;
}


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

x86 assembly (clang, -O2):
<Time>:
push   %rax
call   1030 <Time@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1040 <Sys_failure@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"time\00"
define i64 @Time(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = call i64 @Time(i64* %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"time\00"
define i64 @Time(i64* nocapture readnone %0) {
%2 = tail call i64 @Time(i64* %0)
%3 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ handle_XCPU(int /*<<< orphan*/);
int gen_XCPU(void) {
  handle_XCPU(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_XCPU>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_XCPU@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gen_XCPU() {
%1 = call i32 @handle_XCPU(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_XCPU() {
%1 = tail call i32 @handle_XCPU(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M801_f(char *s) {
  debug("M801_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M801_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M801_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M801_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M801_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M801_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M801_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}