xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xf9() {
  Assert_real((isalnum(249) == 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_isalnum.c",
              1250, ("isalnum should be 0 for 0xf9"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xf9>:
push   %rax
mov    $0xf9,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e2,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf9\00"
define void @t_isalnum_0xf9() {
%1 = call i64 @isalnum(i32 249)
%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 1250, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf9\00"
define void @t_isalnum_0xf9() {
%1 = tail call i64 @isalnum(i32 249)
%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 1250, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void func3() {
  int i = 11;
  printf("\t\t\t[in func3] i = %d\n", i);
}


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

x86 assembly (clang, -O2):
<func3>:
lea    0xee9(%rip),%rdi
mov    $0xb,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"\09\09\09[in func3] i = %d\0A\00"
define void @func3() {
%1 = alloca i32
store i32 11, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\09\09\09[in func3] i = %d\0A\00"
define void @func3() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ diminuto_ipc_stream_write(int, void const *, size_t);
ssize_t diminuto_ipcl_stream_write(int fd, const void *buffer, size_t size) {
  return diminuto_ipc_stream_write(fd, buffer, size);
}


x86 assembly (clang, -O0):
<diminuto_ipcl_stream_write>:
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
call   1030 <diminuto_ipc_stream_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipcl_stream_write>:
jmp    1030 <diminuto_ipc_stream_write@plt>

LLVM IR (-O0):
define i32 @diminuto_ipcl_stream_write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @diminuto_ipc_stream_write(i32 %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @diminuto_ipcl_stream_write(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @diminuto_ipc_stream_write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
int test_imm_B7int64_lowword_reg(long long val) {
  return ((val) & (0xB7 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B7int64_lowword_reg>:
test   $0xb7,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B7int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 183
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Label_Printf(char *);
void Dico_String_Start(int nb_consts) { Label_Printf(".rdata"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c".rdata\00"
define void @Dico_String_Start(i32 %0) {
%2 = tail call i32 @Label_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *_(char *);
int /*<<< orphan*/ convert(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    (void)fprintf(stderr, _("Usage: %s <file name>\n"), argv[0]);
    exit(1);
  }
  convert(argv[1]);
  exit(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)
cmpl   $0x2,-0x8(%rbp)
je     1194 <main+0x54>
mov    0x2e79(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
lea    0xe8d(%rip),%rdi
call   1050 <_@plt>
mov    -0x14(%rbp),%edi
mov    %rax,%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <convert@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    115b <main+0x1b>
mov    0x8(%rbx),%rdi
call   1030 <convert@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%ebp
lea    0xe95(%rip),%rdi
call   1050 <_@plt>
mov    (%rbx),%rdx
mov    %ebp,%edi
mov    %rax,%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s <file name>\0A\00"
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 i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i8* @_(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @fprintf(i32 %9, i8* %10, i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @convert(i8* %19)
%21 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"Usage: %s <file name>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i8* @_(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %1
%8 = tail call i32 @fprintf(i32 %5, i8* %6, i8* %7)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @convert(i8* %12)
%14 = tail call i32 @exit(i32 0)
unreachable
}
void ff_hevc_put_hevc_bi_epel_v6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v6_8_sse4() {
ret void
}
void fbsd_look_up_symbols(void) {}


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

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

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

LLVM IR (-O2):
define void @fbsd_look_up_symbols() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
size_t StrGetLength(const char *pcSrc) {
  const char *pcEnd;
  assert(pcSrc);
  pcEnd = pcSrc;
  while (*pcEnd)
    pcEnd++;
  return (size_t)(pcEnd - pcSrc);
}


x86 assembly (clang, -O0):
<StrGetLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <StrGetLength+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112d <StrGetLength+0x1d>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrGetLength>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    $0xffffffffffffffff,%rax
cmpb   $0x0,0x1(%rbx,%rax,1)
lea    0x1(%rax),%rax
jne    1120 <StrGetLength+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i64 @StrGetLength(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @assert(i8* %4)
%6 = load i8*, i8** %2
store i8* %6, i8** %3
br label %7
7: ; preds = %11, %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
br label %7
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = ptrtoint i8* %15 to i64
%18 = ptrtoint i8* %16 to i64
%19 = sub i64 %17, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @StrGetLength(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %0, %1 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = ptrtoint i8* %4 to i64
%10 = ptrtoint i8* %0 to i64
%11 = sub i64 %9, %10
ret i64 %11
}
char *dcngettext(domainname, msgid1, msgid2, n, category) const
    char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
int category;
{ return dcngettext__(domainname, msgid1, msgid2, n, category); }


x86 assembly (clang, -O0):
<dcngettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    $0x0,%al
call   1030 <dcngettext__@plt>
cltq
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = load i32, i32* %10
%16 = call i32 (i8*, i8*, i8*, i64, i32, ...) bitcast (i32 (...)* @dcngettext__ to i32 (i8*, i8*, i8*, i64, i32, ...)*)(i8* %11, i8* %12, i8* %13, i64 %14, i32 %15)
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
ret i8* %18
}

LLVM IR (-O2):
define i8* @dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = tail call i32 (i8*, i8*, i8*, i64, i32, ...) bitcast (i32 (...)* @dcngettext__ to i32 (i8*, i8*, i8*, i64, i32, ...)*)(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_set_fd(void *bus, int input_fd, int output_fd) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_set_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ec9(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_set_fd>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_set_fd(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_set_fd(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
long ffi_test_22(long x, long long y, long long z) { return (long)(x + y / z); }


x86 assembly (clang, -O0):
<ffi_test_22>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cqto
idivq  -0x18(%rbp)
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffi_test_22>:
mov    %rdx,%rcx
mov    %rsi,%rax
mov    %rsi,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     111b <ffi_test_22+0x1b>
cqto
idiv   %rcx
add    %rdi,%rax
ret
xor    %edx,%edx
div    %ecx
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ffi_test_22(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = sdiv i64 %8, %9
%11 = add nsw i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @ffi_test_22(i64 %0, i64 %1, i64 %2) {
%4 = sdiv i64 %1, %2
%5 = add nsw i64 %4, %0
ret i64 %5
}
/* Variables and functions */
char *strpbrk(char const *, char const *);
char *c_strpbrk(const char *arg0, const char *arg1) {
  return strpbrk(arg0, arg1);
}


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

x86 assembly (clang, -O2):
<c_strpbrk>:
jmp    1030 <strpbrk@plt>

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

LLVM IR (-O2):
define i8* @c_strpbrk(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strpbrk(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ do_action(char const *);
void *thread_callback(void *raw_arg) {
  return (void *)(uintptr_t)do_action((const char *)raw_arg);
}


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

x86 assembly (clang, -O2):
<thread_callback>:
jmp    1030 <do_action@plt>

LLVM IR (-O0):
define i8* @thread_callback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @do_action(i8* %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @thread_callback(i8* %0) {
%2 = tail call i64 @do_action(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ bin_append_posn(int const, int, char *, size_t const);
void add_byte_count(char binary[], const size_t byte_count_posn,
                    const int byte_count) {
  bin_append_posn(byte_count - 1, 9, binary, byte_count_posn);
}


x86 assembly (clang, -O0):
<add_byte_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
sub    $0x1,%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x9,%esi
call   1030 <bin_append_posn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_byte_count>:
mov    %rsi,%rcx
mov    %rdi,%rax
lea    -0x1(%rdx),%edi
mov    $0x9,%esi
mov    %rax,%rdx
jmp    1030 <bin_append_posn@plt>

LLVM IR (-O0):
define void @add_byte_count(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = sub nsw i32 %7, 1
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i32 @bin_append_posn(i32 %8, i32 9, i8* %9, i64 %10)
ret void
}

LLVM IR (-O2):
define void @add_byte_count(i8* %0, i64 %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @bin_append_posn(i32 %4, i32 9, i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ resumeparsing_();
void ResumeParsing() { resumeparsing_(); }


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

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

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

LLVM IR (-O2):
define void @ResumeParsing() {
%1 = tail call i32 (...) @resumeparsing_()
ret void
}
/* Variables and functions */
int rj_readbyte(int);
int rj232_getc(void) { return rj_readbyte(0x10); }


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

x86 assembly (clang, -O2):
<rj232_getc>:
mov    $0x10,%edi
jmp    1030 <rj_readbyte@plt>

LLVM IR (-O0):
define i32 @rj232_getc() {
%1 = call i32 @rj_readbyte(i32 16)
ret i32 %1
}

LLVM IR (-O2):
define i32 @rj232_getc() {
%1 = tail call i32 @rj_readbyte(i32 16)
ret i32 %1
}
void call_after_alloca_subr(c, s, i, l, uc, us, ui, ul) char c;
int i;
short s;
long l;
unsigned char uc;
unsigned short us;
unsigned long ul;
unsigned int ui;
{
  c = 'a';
  i = 7;
  s = 8;
  l = 7;
  uc = 44;
  us = 77;
  ul = 43;
  ui = 33;
}


x86 assembly (clang, -O0):
<call_after_alloca_subr>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,%eax
mov    %rcx,-0x20(%rbp)
mov    %edx,%ecx
mov    -0x20(%rbp),%rdx
mov    %ecx,-0x18(%rbp)
mov    %esi,%ecx
mov    -0x18(%rbp),%esi
mov    0x18(%rbp),%r8
mov    0x10(%rbp),%r8d
mov    %dil,%r8b
mov    %cx,%di
mov    %al,%cl
mov    %r9w,%ax
mov    %r8b,-0x1(%rbp)
mov    %di,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %ax,-0x14(%rbp)
movb   $0x61,-0x1(%rbp)
movl   $0x7,-0x8(%rbp)
movw   $0x8,-0x4(%rbp)
movq   $0x7,-0x10(%rbp)
movb   $0x2c,-0x11(%rbp)
movw   $0x4d,-0x14(%rbp)
movq   $0x2b,0x18(%rbp)
movl   $0x21,0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call_after_alloca_subr(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i32 %5, i32 %6, i64 %7) {
%9 = alloca i8
%10 = alloca i16
%11 = alloca i32
%12 = alloca i64
%13 = alloca i8
%14 = alloca i16
%15 = alloca i32
%16 = alloca i64
%17 = trunc i32 %0 to i8
%18 = trunc i32 %1 to i16
%19 = trunc i32 %4 to i8
%20 = trunc i32 %5 to i16
store i8 %17, i8* %9
store i16 %18, i16* %10
store i32 %2, i32* %11
store i64 %3, i64* %12
store i8 %19, i8* %13
store i16 %20, i16* %14
store i32 %6, i32* %15
store i64 %7, i64* %16
store i8 97, i8* %9
store i32 7, i32* %11
store i16 8, i16* %10
store i64 7, i64* %12
store i8 44, i8* %13
store i16 77, i16* %14
store i64 43, i64* %16
store i32 33, i32* %15
ret void
}

LLVM IR (-O2):
define void @call_after_alloca_subr(i32 %0, i32 %1, i32 %2, i64 %3, i32 %4, i32 %5, i32 %6, i64 %7) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Com_Error(int /*<<< orphan*/, char *, char const *);
void CL_CinModule_Error(const char *msg) { Com_Error(0, "%s", msg); }


x86 assembly (clang, -O0):
<CL_CinModule_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xed7(%rip),%rsi
call   1030 <Com_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_CinModule_Error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
xor    %edi,%edi
jmp    1030 <Com_Error@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @CL_CinModule_Error(i8* %0) {
%2 = tail call i32 @Com_Error(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int w;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ WriteByte(int /*<<< orphan*/ *, int);
void WriteWord(FILE *fp, int w) {
  WriteByte(fp, ((w)&0xff));
  WriteByte(fp, (((w)&0xff00) >> 8));
}


x86 assembly (clang, -O0):
<WriteWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
and    $0xff,%esi
call   1030 <WriteByte@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
and    $0xff00,%esi
sar    $0x8,%esi
call   1030 <WriteByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteWord>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %rdi,%rbx
movzbl %al,%esi
mov    %eax,%ebp
call   1030 <WriteByte@plt>
mov    %ebp,%eax
movzbl %ah,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <WriteByte@plt>

LLVM IR (-O0):
define void @WriteWord(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 = and i32 %6, 255
%8 = call i32 @WriteByte(i32* %5, i32 %7)
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = call i32 @WriteByte(i32* %9, i32 %12)
ret void
}

LLVM IR (-O2):
define void @WriteWord(i32* %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i32 @WriteByte(i32* %0, i32 %3)
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = tail call i32 @WriteByte(i32* %0, i32 %6)
ret void
}
void Int_ManTruthFill(unsigned *p, int nWords) {
  int i;
  for (i = nWords - 1; i >= 0; i--)
    p[i] = ~0;
}


x86 assembly (clang, -O0):
<Int_ManTruthFill>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     113b <Int_ManTruthFill+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <Int_ManTruthFill+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_ManTruthFill>:
test   %esi,%esi
jle    1129 <Int_ManTruthFill+0x19>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
mov    $0xff,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @Int_ManTruthFill(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
int k_release_memory_block(void *p_mem_blk) { return 0; }


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

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

LLVM IR (-O0):
define i32 @k_release_memory_block(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @k_release_memory_block(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniPreprocL(const struct feature_pair *pair,
                          const struct CovariateAnalysis *covan, FILE *fp) {}


x86 assembly (clang, -O0):
<_emitJSONUniPreprocL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniPreprocL(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniPreprocL(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
size_t malloc_usable_size(void *);
size_t Pic__msize(void *memblock) { return (malloc_usable_size(memblock)); }


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

x86 assembly (clang, -O2):
<Pic__msize>:
jmp    1030 <malloc_usable_size@plt>

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

LLVM IR (-O2):
define i64 @Pic__msize(i8* %0) {
%2 = tail call i64 @malloc_usable_size(i8* %0)
ret i64 %2
}
void alloc_hash(void (*func)(unsigned char *, void *), void *arg) {
  unsigned char c[20];
  (*func)(c, arg);
}


x86 assembly (clang, -O0):
<alloc_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   *%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_hash>:
sub    $0x18,%rsp
mov    %rdi,%rax
mov    %rsp,%rdi
call   *%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @alloc_hash(void (i8*, i8*)* %0, i8* %1) {
%3 = alloca void (i8*, i8*)*
%4 = alloca i8*
%5 = alloca [20 x i8]
store void (i8*, i8*)* %0, void (i8*, i8*)** %3
store i8* %1, i8** %4
%6 = load void (i8*, i8*)*, void (i8*, i8*)** %3
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
define void @alloc_hash(void (i8*, i8*)* nocapture %0, i8* %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
ret void
}
int max(const int a, const int b) { return (a > b ? a : b); }


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

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

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

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void cce_ccp_ch() { return; }


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

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

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

LLVM IR (-O2):
define void @cce_ccp_ch() {
ret void
}
/* Variables and functions */
int f(int, int /*<<< orphan*/);
int /*<<< orphan*/ g(int);
int main() { return f(2, g(2)); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1040 <g@plt>
mov    $0x2,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <f@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @g(i32 2)
%2 = tail call i32 @f(i32 2, i32 %1)
ret i32 %2
}
/* Variables and functions */
bool space(char c) { return c == ' ' || c == -1; }


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

x86 assembly (clang, -O2):
<space>:
cmp    $0x20,%dil
sete   %al
cmp    $0xff,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, -1
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ console_string(char const *);
void printPgmString(const char *s) { console_string(s); }


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

x86 assembly (clang, -O2):
<printPgmString>:
jmp    1030 <console_string@plt>

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

LLVM IR (-O2):
define void @printPgmString(i8* %0) {
%2 = tail call i32 @console_string(i8* %0)
ret void
}
int msm_bus_axi_portunhalt(int master_port) { return 0; }


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

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

LLVM IR (-O0):
define i32 @msm_bus_axi_portunhalt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @msm_bus_axi_portunhalt(i32 %0) {
ret i32 0
}
int test_imm_DAint8_reg(signed char val) {
  return ((val) & (-0xDA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DAint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff26,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_DAint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -218
%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_DAint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -218
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int count_run(int byte, int start_bit, int desired_val) {
  int count = 0;
  int i;
  for (i = start_bit; i < 8; i++) {
    int bit = (byte >> i) & 1;
    if (bit == desired_val)
      count++;
    else
      break;
  }
  return (count);
}


x86 assembly (clang, -O0):
<count_run>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1164 <count_run+0x64>
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    114c <count_run+0x4c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1151 <count_run+0x51>
jmp    1164 <count_run+0x64>
jmp    1156 <count_run+0x56>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <count_run+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_run>:
xor    %eax,%eax
cmp    $0x7,%esi
jg     1143 <count_run+0x43>
mov    $0x8,%r8d
sub    %esi,%r8d
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rsi,%rax,1),%ecx
mov    %edi,%r9d
shr    %cl,%r9d
and    $0x1,%r9d
cmp    %edx,%r9d
jne    1143 <count_run+0x43>
lea    (%rsi,%rax,1),%ecx
add    $0x1,%ecx
add    $0x1,%eax
cmp    $0x8,%ecx
jne    1120 <count_run+0x20>
mov    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @count_run(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%10 = load i32, i32* %5
store i32 %10, i32* %8
br label %11
11: ; preds = %27, %3
%12 = load i32, i32* %8
%13 = icmp slt i32 %12, 8
br i1 %13, label %14, label %30
14: ; preds = %11
%15 = load i32, i32* %4
%16 = load i32, i32* %8
%17 = ashr i32 %15, %16
%18 = and i32 %17, 1
store i32 %18, i32* %9
%19 = load i32, i32* %9
%20 = load i32, i32* %6
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %14
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %26
25: ; preds = %14
br label %30
26: ; preds = %22
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %11
30: ; preds = %25, %11
%31 = load i32, i32* %7
ret i32 %31
}

LLVM IR (-O2):
define i32 @count_run(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, 8
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = sub i32 8, %1
br label %7
7: ; preds = %5, %13
%8 = phi i32 [ %14, %13 ], [ 0, %5 ]
%9 = phi i32 [ %15, %13 ], [ %1, %5 ]
%10 = lshr i32 %0, %9
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, %2
br i1 %12, label %13, label %17
13: ; preds = %7
%14 = add nuw i32 %8, 1
%15 = add nsw i32 %9, 1
%16 = icmp eq i32 %14, %6
br i1 %16, label %17, label %7
17: ; preds = %13, %7, %3
%18 = phi i32 [ 0, %3 ], [ %8, %7 ], [ %6, %13 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char, int);
char *labname(int id) {
  static char name[100];
  sprintf(name, "%c%d", 'L', id);
  return name;
}


x86 assembly (clang, -O0):
<labname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x4c,%edx
call   1030 <sprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labname>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4c,%edx
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@labname.name = internal global [100 x i8] zeroinitializer
@.str = [5 x i8] c"%c%d\00"
define i8* @labname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @labname.name, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 76, i32 %3)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @labname.name, i64 0, i64 0)
}

LLVM IR (-O2):
@labname.name = internal global [100 x i8] zeroinitializer
@.str = [5 x i8] c"%c%d\00"
define i8* @labname(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @labname.name, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 76, i32 %0)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @labname.name, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ESPIPE;
int /*<<< orphan*/ errno;
int fsetpos(FILE *stream, const fpos_t *pos) {
  errno = ESPIPE;
  return -1;
}


x86 assembly (clang, -O0):
<fsetpos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsetpos>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @fsetpos(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ESPIPE
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ESPIPE = global i32 0
@errno = global i32 0
define i32 @fsetpos(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ESPIPE
store i32 %3, i32* @errno
ret i32 -1
}
int op_xor(int x, int y) { return x ^ y; }


x86 assembly (clang, -O0):
<op_xor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_xor>:
mov    %edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @op_xor(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 = xor i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @op_xor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int xumount(char *spec) {
  printf("umount() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<xumount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xumount>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"umount() not implemented\0A\00"
define i32 @xumount(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [25 x i8] c"umount() not implemented\00"
define i32 @xumount(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int __setxid(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setgid(gid_t gid) { return __setxid(46, gid, 0, 0); }


x86 assembly (clang, -O0):
<setgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2e,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <__setxid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setgid>:
mov    %edi,%esi
mov    $0x2e,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__setxid@plt>

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

LLVM IR (-O2):
define i32 @setgid(i32 %0) {
%2 = tail call i32 @__setxid(i32 46, i32 %0, i32 0, i32 0)
ret i32 %2
}
int fun1051() { return 1051; }


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

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

LLVM IR (-O0):
define i32 @fun1051() {
ret i32 1051
}

LLVM IR (-O2):
define i32 @fun1051() {
ret i32 1051
}
void glClear(int a) {}


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

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

LLVM IR (-O0):
define void @glClear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @glClear(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void progress_bar_stop() { printf("\n"); }


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

x86 assembly (clang, -O2):
<progress_bar_stop>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @progress_bar_stop() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int login() {
  int access = 0xff;
  char password[16];
  puts("Warning: Permanently added 'backend.cia.gov,96.17.215.26' (ECDSA) to "
       "the list of known hosts.");
  printf("root@backend.cia.gov's password: ");
  fgets(password, 17, stdin);
  return access;
}


x86 assembly (clang, -O0):
<login>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xff,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    0x2e86(%rip),%rax
mov    (%rax),%edx
mov    $0x11,%esi
call   1050 <fgets@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<login>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x11,%esi
call   1050 <fgets@plt>
mov    $0xff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [94 x i8] c"Warning: Permanently added 'backend.cia.gov,96.17.215.26' (ECDSA) to the list of known hosts.\00"
@.str.1 = [34 x i8] c"root@backend.cia.gov's password: \00"
@stdin = global i32 0
define i32 @login() {
%1 = alloca i32
%2 = alloca [16 x i8]
store i32 255, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 17, i32 %6)
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [94 x i8] c"Warning: Permanently added 'backend.cia.gov,96.17.215.26' (ECDSA) to the list of known hosts.\00"
@.str.1 = [34 x i8] c"root@backend.cia.gov's password: \00"
@stdin = global i32 0
define i32 @login() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([94 x i8], [94 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %2, i32 17, i32 %5)
ret i32 255
}
void do_data_abort(struct pt_regs *pt_regs) { return; }


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @do_data_abort(%struct.pt_regs* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRE8_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRE8_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRE8_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void ff_hevc_put_hevc_uni_epel_hv24_10_avx2() {}


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

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

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

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