xunge/DecIR huggingface dataset:
int __spawnv(mode, cmdname, argv)
int mode;
const char *cmdname;
char **argv;
{ _spawnv(mode, cmdname, fix_argv(argv)); }


x86 assembly (clang, -O0):
<__spawnv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <fix_argv@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    $0x0,%al
call   1030 <_spawnv@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__spawnv>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rdx,%rdi
xor    %eax,%eax
call   1040 <fix_argv@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_spawnv@plt>

LLVM IR (-O0):
define i32 @__spawnv(i32 %0, i8* %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8**
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i8**, i8*** %7
%11 = call i32 (i8**, ...) bitcast (i32 (...)* @fix_argv to i32 (i8**, ...)*)(i8** %10)
%12 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @_spawnv to i32 (i32, i8*, i32, ...)*)(i32 %8, i8* %9, i32 %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @__spawnv(i32 %0, i8* %1, i8** %2) {
%4 = tail call i32 (i8**, ...) bitcast (i32 (...)* @fix_argv to i32 (i8**, ...)*)(i8** %2)
%5 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @_spawnv to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %1, i32 %4)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ mbstowcs(int /*<<< orphan*/ *, char const *, int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
wchar_t *mbstr2wstr(const char *multibyte_string) {
  static wchar_t retstr[1024];
  setlocale(LC_ALL, "en_US.UTF-8");
  mbstowcs(retstr, multibyte_string, 1024);
  return retstr;
}


x86 assembly (clang, -O0):
<mbstr2wstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%rsi
lea    0x2ef4(%rip),%rdi
mov    $0x400,%edx
call   1030 <mbstowcs@plt>
lea    0x2ee3(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbstr2wstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1040 <setlocale@plt>
lea    0x2efd(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1030 <mbstowcs@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@mbstr2wstr.retstr = internal global [1024 x i32] zeroinitializer
@LC_ALL = global i32 0
@.str = [12 x i8] c"en_US.UTF-8\00"
define i32* @mbstr2wstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LC_ALL
%4 = call i32 @setlocale(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @mbstowcs(i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @mbstr2wstr.retstr, i64 0, i64 0), i8* %5, i32 1024)
ret i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @mbstr2wstr.retstr, i64 0, i64 0)
}

LLVM IR (-O2):
@mbstr2wstr.retstr = internal global [1024 x i32] zeroinitializer
@LC_ALL = global i32 0
@.str = [12 x i8] c"en_US.UTF-8\00"
define i32* @mbstr2wstr(i8* %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mbstowcs(i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @mbstr2wstr.retstr, i64 0, i64 0), i8* %0, i32 1024)
ret i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @mbstr2wstr.retstr, i64 0, i64 0)
}
/* Variables and functions */
int send(int, char *, int, int /*<<< orphan*/);
int strlen(char *);
bool httpResponse(int fd, char *response) {
  return send(fd, response, strlen(response) * sizeof(char), 0);
}


x86 assembly (clang, -O0):
<httpResponse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
cltq
shl    $0x0,%rax
mov    %eax,%edx
xor    %ecx,%ecx
call   1040 <send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<httpResponse>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %ecx,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <send@plt>

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

LLVM IR (-O2):
define i32 @httpResponse(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @send(i32 %0, i8* %1, i32 %3, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: diop [-b blksize] [-s start] [-S range] [-d "
                  "duration] [-w] [-i] [-r] [-p nproc] nIter Dev\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [98 x i8] c"Usage: diop [-b blksize] [-s start] [-S range] [-d duration] [-w] [-i] [-r] [-p nproc] nIter Dev\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [98 x i8] c"Usage: diop [-b blksize] [-s start] [-S range] [-d duration] [-w] [-i] [-r] [-p nproc] nIter Dev\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int __isupper_ascii(int ch) { return (unsigned int)(ch - 'A') < 26u; }


x86 assembly (clang, -O0):
<__isupper_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x41,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__isupper_ascii>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @__isupper_ascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 65
%5 = icmp ult i32 %4, 26
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @__isupper_ascii(i32 %0) {
%2 = add nsw i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() {
  char word[200] = {0};
  fgets(word, 201, stdin);
  printf("%ld", hash(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
lea    -0xd0(%rbp),%rdi
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
mov    $0xc9,%esi
call   1060 <fgets@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %eax,%esi
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0xc0(%rsp)
mov    0x2e53(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc9,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xe4a(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = bitcast [200 x i8]* %2 to i8*
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 201, i32 %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%8 = call i32 @hash(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 201, i32 %3)
%5 = call i32 @hash(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts0(char *);
void test91(void) { puts0("test of int 91\r\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"test of int 91\0D\0A\00"
define void @test91() {
%1 = call i32 @puts0(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"test of int 91\0D\0A\00"
define void @test91() {
%1 = tail call i32 @puts0(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char tolower(char);
void lower(char *word) {
  for (; *word; ++word)
    *word = tolower(*word);
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <lower+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <lower+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
int _isatty(int file) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_isatty(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ handle_error_code(char *, int /*<<< orphan*/);
void handle_error(char *msg) { handle_error_code(msg, 0); }


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

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

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

LLVM IR (-O2):
define void @handle_error(i8* %0) {
%2 = tail call i32 @handle_error_code(i8* %0, i32 0)
ret void
}
signed long long f23(signed long long v_foo) {
  signed long long v_shr = ((unsigned long long)v_foo) >> 2;
  signed long long v_and = v_shr & 255;
  return v_and;
}


x86 assembly (clang, -O0):
<f23>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f23>:
shr    $0x2,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @f23(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = lshr i64 %5, 2
store i64 %6, i64* %3
%7 = load i64, i64* %3
%8 = and i64 %7, 255
store i64 %8, i64* %4
%9 = load i64, i64* %4
ret i64 %9
}

LLVM IR (-O2):
define i64 @f23(i64 %0) {
%2 = lshr i64 %0, 2
%3 = and i64 %2, 255
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t sk_atomic_conditional_inc(int32_t *addr) {
  int32_t value = *addr;
  if (value != 0)
    ++*addr;
  return value;
}


x86 assembly (clang, -O0):
<sk_atomic_conditional_inc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     112c <sk_atomic_conditional_inc+0x2c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_atomic_conditional_inc>:
mov    (%rdi),%rax
test   %rax,%rax
je     110f <sk_atomic_conditional_inc+0xf>
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define i64 @sk_atomic_conditional_inc(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i64 %2, 1
store i64 %5, i64* %0
br label %6
6: ; preds = %4, %1
ret i64 %2
}
/* Variables and functions */
unsigned short VIM_JPEG_GetHbanlk(unsigned char);
unsigned char VIM_JPEG_GetPixRate();
int /*<<< orphan*/ VIM_JPEG_SetLineBlank(unsigned short);
int /*<<< orphan*/ VIM_JPEG_SetPixelRate(unsigned char);
void VIM_JPEG_AdjustClkBlank(void) {
  unsigned char pixelrate;
  unsigned short blank;
  pixelrate = VIM_JPEG_GetPixRate();
  VIM_JPEG_SetPixelRate(pixelrate);
  blank = VIM_JPEG_GetHbanlk(pixelrate);
  VIM_JPEG_SetLineBlank(blank);
}


x86 assembly (clang, -O0):
<VIM_JPEG_AdjustClkBlank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <VIM_JPEG_GetPixRate@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1050 <VIM_JPEG_SetPixelRate@plt>
movzbl -0x1(%rbp),%edi
call   1030 <VIM_JPEG_GetHbanlk@plt>
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%edi
call   1040 <VIM_JPEG_SetLineBlank@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_AdjustClkBlank>:
push   %rbx
xor    %eax,%eax
call   1060 <VIM_JPEG_GetPixRate@plt>
movzbl %al,%ebx
mov    %ebx,%edi
call   1050 <VIM_JPEG_SetPixelRate@plt>
mov    %ebx,%edi
call   1030 <VIM_JPEG_GetHbanlk@plt>
movzwl %ax,%edi
pop    %rbx
jmp    1040 <VIM_JPEG_SetLineBlank@plt>

LLVM IR (-O0):
define void @VIM_JPEG_AdjustClkBlank() {
%1 = alloca i8
%2 = alloca i16
%3 = call zeroext i8 (...) @VIM_JPEG_GetPixRate()
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = call i32 @VIM_JPEG_SetPixelRate(i8 zeroext %4)
%6 = load i8, i8* %1
%7 = call zeroext i16 @VIM_JPEG_GetHbanlk(i8 zeroext %6)
store i16 %7, i16* %2
%8 = load i16, i16* %2
%9 = call i32 @VIM_JPEG_SetLineBlank(i16 zeroext %8)
ret void
}

LLVM IR (-O2):
define void @VIM_JPEG_AdjustClkBlank() {
%1 = tail call zeroext i8 (...) @VIM_JPEG_GetPixRate()
%2 = tail call i32 @VIM_JPEG_SetPixelRate(i8 zeroext %1)
%3 = tail call zeroext i16 @VIM_JPEG_GetHbanlk(i8 zeroext %1)
%4 = tail call i32 @VIM_JPEG_SetLineBlank(i16 zeroext %3)
ret void
}
void gtk_icon_theme_list_icons() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_theme_list_icons() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ printw(char *, char *);
void clearbottom() {
  move(20, 0);
  printw("%76s\n", "");
  printw("%76s\n", "");
  printw("%76s", "");
}


x86 assembly (clang, -O0):
<clearbottom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
xor    %esi,%esi
call   1040 <move@plt>
lea    0xec9(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1030 <printw@plt>
lea    0xeb6(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <printw@plt>
lea    0xea9(%rip),%rdi
lea    0xea1(%rip),%rsi
call   1030 <printw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearbottom>:
push   %r14
push   %rbx
push   %rax
mov    $0x14,%edi
xor    %esi,%esi
call   1040 <move@plt>
lea    0xec9(%rip),%r14
lea    0xec7(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printw@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printw@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printw@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%76s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"%76s\00"
define void @clearbottom() {
%1 = call i32 @move(i32 20, i32 0)
%2 = call i32 @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printw(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%76s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c"%76s\00"
define void @clearbottom() {
%1 = tail call i32 @move(i32 20, i32 0)
%2 = tail call i32 @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printw(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear();
int /*<<< orphan*/ draw_borders();
int /*<<< orphan*/ draw_grid();
int /*<<< orphan*/ draw_logo();
int /*<<< orphan*/ draw_numbers();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ show_cursor();
void redraw_all(void) {
  endwin();
  refresh();
  clear();
  draw_borders();
  draw_grid();
  draw_logo();
  draw_numbers();
  show_cursor();
}


x86 assembly (clang, -O0):
<redraw_all>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <endwin@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1090 <clear@plt>
mov    $0x0,%al
call   1050 <draw_borders@plt>
mov    $0x0,%al
call   1080 <draw_grid@plt>
mov    $0x0,%al
call   1040 <draw_logo@plt>
mov    $0x0,%al
call   1030 <draw_numbers@plt>
mov    $0x0,%al
call   10a0 <show_cursor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<redraw_all>:
push   %rax
xor    %eax,%eax
call   1070 <endwin@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
call   1090 <clear@plt>
xor    %eax,%eax
call   1050 <draw_borders@plt>
xor    %eax,%eax
call   1080 <draw_grid@plt>
xor    %eax,%eax
call   1040 <draw_logo@plt>
xor    %eax,%eax
call   1030 <draw_numbers@plt>
xor    %eax,%eax
pop    %rcx
jmp    10a0 <show_cursor@plt>

LLVM IR (-O0):
define void @redraw_all() {
%1 = call i32 (...) @endwin()
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @clear()
%4 = call i32 (...) @draw_borders()
%5 = call i32 (...) @draw_grid()
%6 = call i32 (...) @draw_logo()
%7 = call i32 (...) @draw_numbers()
%8 = call i32 (...) @show_cursor()
ret void
}

LLVM IR (-O2):
define void @redraw_all() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @clear()
%4 = tail call i32 (...) @draw_borders()
%5 = tail call i32 (...) @draw_grid()
%6 = tail call i32 (...) @draw_logo()
%7 = tail call i32 (...) @draw_numbers()
%8 = tail call i32 (...) @show_cursor()
ret void
}
/* Variables and functions */
double Melder_roundDown(double);
double Melder_roundUp(double);
double Melder_roundAwayFromZero(double x) {
  return x >= 0.0 ? Melder_roundUp(x) : Melder_roundDown(x);
}


x86 assembly (clang, -O0):
<Melder_roundAwayFromZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <Melder_roundAwayFromZero+0x33>
movsd  -0x8(%rbp),%xmm0
call   1040 <Melder_roundUp@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1162 <Melder_roundAwayFromZero+0x42>
movsd  -0x8(%rbp),%xmm0
call   1030 <Melder_roundDown@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Melder_roundAwayFromZero>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    112f <Melder_roundAwayFromZero+0xf>
jmp    1030 <Melder_roundDown@plt>
jmp    1040 <Melder_roundUp@plt>

LLVM IR (-O0):
define double @Melder_roundAwayFromZero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @Melder_roundUp(double %6)
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @Melder_roundDown(double %9)
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
ret double %12
}

LLVM IR (-O2):
define double @Melder_roundAwayFromZero(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @Melder_roundUp(double %0)
br label %7
5: ; preds = %1
%6 = tail call double @Melder_roundDown(double %0)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
void GLUE_PUSH_VAL_AT_PX_TO_FPSTACK(void *b, int wv) {
  static const unsigned int tab[3] = {
      0xC8230000,
      0xC82E0000,
      0xC82F0000,
  };
  *(unsigned int *)b = tab[wv];
}


x86 assembly (clang, -O0):
<GLUE_PUSH_VAL_AT_PX_TO_FPSTACK>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    0xeea(%rip),%rax
mov    (%rax,%rcx,4),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_PUSH_VAL_AT_PX_TO_FPSTACK>:
movslq %esi,%rax
lea    0xef6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
@GLUE_PUSH_VAL_AT_PX_TO_FPSTACK.tab = internal constant [3 x i32] [i32 -937230336, i32 -936509440, i32 -936443904]
define void @GLUE_PUSH_VAL_AT_PX_TO_FPSTACK(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_PUSH_VAL_AT_PX_TO_FPSTACK.tab, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
ret void
}

LLVM IR (-O2):
@GLUE_PUSH_VAL_AT_PX_TO_FPSTACK.tab = internal unnamed_addr constant [3 x i32] [i32 -937230336, i32 -936509440, i32 -936443904]
define void @GLUE_PUSH_VAL_AT_PX_TO_FPSTACK(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [3 x i32], [3 x i32]* @GLUE_PUSH_VAL_AT_PX_TO_FPSTACK.tab, i64 0, i64 %3
%5 = load i32, i32* %4
%6 = bitcast i8* %0 to i32*
store i32 %5, i32* %6
ret void
}
void tolow(char *chr_ptr) {
  const unsigned char lowcas_diff = ('A' - 'a');
  if ((*chr_ptr >= 'A') && (*chr_ptr <= 'Z')) {
    *chr_ptr -= lowcas_diff;
  }
}


x86 assembly (clang, -O0):
<tolow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0xe0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     113b <tolow+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     113b <tolow+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
sub    $0xe0,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolow>:
mov    (%rdi),%al
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110e <tolow+0xe>
add    $0x20,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @tolow(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = add nuw nsw i8 %2, 32
store i8 %6, i8* %0
br label %7
7: ; preds = %5, %1
ret void
}
void ARGBMirrorRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBMirrorRow_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TPARM_0(char *);
int /*<<< orphan*/ tc_putp(int /*<<< orphan*/);
void put_mode(char *s) { tc_putp(TPARM_0(s)); }


x86 assembly (clang, -O0):
<put_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <TPARM_0@plt>
mov    %eax,%edi
call   1030 <tc_putp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_mode>:
push   %rax
call   1040 <TPARM_0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <tc_putp@plt>

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

LLVM IR (-O2):
define void @put_mode(i8* %0) {
%2 = tail call i32 @TPARM_0(i8* %0)
%3 = tail call i32 @tc_putp(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponseGeneric(void const *, char *, char *, char *);
void UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(
    const void *UPnPToken) {
  UpnpResponseGeneric(UPnPToken, "urn:schemas-upnp-org:service:AVTransport:1",
                      "SetAVTransportURI", "");
}


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

x86 assembly (clang, -O2):
<UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI>:
lea    0xee9(%rip),%rsi
lea    0xf0d(%rip),%rdx
lea    0xf05(%rip),%rcx
jmp    1030 <UpnpResponseGeneric@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [18 x i8] c"SetAVTransportURI\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @UpnpResponseGeneric(i8* %3, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"urn:schemas-upnp-org:service:AVTransport:1\00"
@.str.1 = [18 x i8] c"SetAVTransportURI\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(i8* %0) {
%2 = tail call i32 @UpnpResponseGeneric(i8* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int errno;
scalar_t__ pipe2(int *, int);
int do_pipe2(int pipefd[2], int flags) {
  if (pipe2(pipefd, flags)) {
    return -errno;
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_pipe2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <pipe2@plt>
cmp    $0x0,%rax
je     1148 <do_pipe2+0x38>
xor    %eax,%eax
mov    0x2ea2(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <do_pipe2+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pipe2>:
push   %rax
call   1030 <pipe2@plt>
mov    0x2ec3(%rip),%rdx
xor    %ecx,%ecx
sub    (%rdx),%ecx
xor    %edx,%edx
test   %rax,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @do_pipe2(i32* %0, i32 %1) {
%3 = tail call i64 @pipe2(i32* %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* @errno
%6 = sub nsw i32 0, %5
%7 = select i1 %4, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
size_t bitmap2_size_internal(size_t *, size_t *, size_t *);
size_t bitmap2_size(size_t bits) {
  size_t len_l0;
  size_t len_l1;
  return bitmap2_size_internal(&bits, &len_l0, &len_l1);
}


x86 assembly (clang, -O0):
<bitmap2_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <bitmap2_size_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap2_size>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <bitmap2_size_internal@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @bitmap2_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = call i64 @bitmap2_size_internal(i64* %2, i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @bitmap2_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = call i64 @bitmap2_size_internal(i64* %2, i64* %3, i64* %4)
ret i64 %7
}
/* Variables and functions */
char **malloc(int);
int /*<<< orphan*/ memcpy(char **, char *, int);
int main() {
  char **ds = {"hello", "world", "every one"};
  char **ds2 = malloc(sizeof("hello world every one") + 1);
  memcpy(ds2, "hello\0world\0every one\0",
         sizeof("hello\0world\0every one\0") + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x17,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x18,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x17,%edi
call   1040 <malloc@plt>
lea    0xece(%rip),%rsi
mov    %rax,%rdi
mov    $0x18,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"hello\00"
@.str.1 = [23 x i8] c"hello\00world\00every one\00\00"
define i32 @main() {
%1 = alloca i8**
%2 = alloca i8**
store i8** bitcast ([6 x i8]* @.str to i8**), i8*** %1
%3 = call i8** @malloc(i32 23)
store i8** %3, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 @memcpy(i8** %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 24)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"hello\00world\00every one\00\00"
define i32 @main() {
%1 = tail call i8** @malloc(i32 23)
%2 = tail call i32 @memcpy(i8** %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 24)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ ssize_t;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
scalar_t__ read(int, char *, int);
scalar_t__ write(int, char *, scalar_t__);
void copy_fd(int in, int out) {
  ssize_t read_cnt;
  char buf[4096];
  while ((read_cnt = read(in, buf, sizeof(buf))) > 0) {
    if (write(out, buf, read_cnt) != read_cnt) {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<copy_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jle    117a <copy_fd+0x5a>
mov    -0x8(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <write@plt>
cmp    -0x10(%rbp),%rax
je     1175 <copy_fd+0x55>
jmp    117a <copy_fd+0x5a>
jmp    1131 <copy_fd+0x11>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_fd>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1008,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rsp,%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%edi
mov    %r15,%rsi
mov    $0x1000,%edx
call   1040 <read@plt>
test   %rax,%rax
jle    116a <copy_fd+0x4a>
mov    %rax,%rbx
mov    %r14d,%edi
mov    %r15,%rsi
mov    %rax,%rdx
call   1030 <write@plt>
cmp    %rbx,%rax
je     1140 <copy_fd+0x20>
add    $0x1008,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @copy_fd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca [4096 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %3
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%10 = call i64 @read(i32 %8, i8* %9, i32 4096)
store i64 %10, i64* %5
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %7
%13 = load i32, i32* %4
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
%15 = load i64, i64* %5
%16 = call i64 @write(i32 %13, i8* %14, i64 %15)
%17 = load i64, i64* %5
%18 = icmp ne i64 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %12
br label %21
20: ; preds = %12
br label %7
21: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @copy_fd(i32 %0, i32 %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %8, %2
%6 = call i64 @read(i32 %0, i8* %4, i32 4096)
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 @write(i32 %1, i8* %4, i64 %6)
%10 = icmp eq i64 %9, %6
br i1 %10, label %5, label %11
11: ; preds = %5, %8
ret void
}
void gtk_image_set_from_image() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_set_from_image() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bin(unsigned n) {
  unsigned i;
  for (i = 1 << 31; i > 0; i = i / 2) {
    (n & i) ? printf("1") : printf("0");
  }
}


x86 assembly (clang, -O0):
<bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1166 <bin+0x56>
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
je     114c <bin+0x3c>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1158 <bin+0x48>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <bin+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x80000000,%ebx
mov    $0x80000000,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %ebx,%eax
and    %r14d,%eax
cmp    $0x1,%eax
mov    $0x31,%edi
sbb    $0x0,%edi
call   1030 <putchar@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1130 <bin+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
define void @bin(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %16
14: ; preds = %7
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
br label %18
18: ; preds = %16
%19 = load i32, i32* %3
%20 = udiv i32 %19, 2
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @bin(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 48, i32 49
%7 = tail call i32 @putchar(i32 %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int clear_dobldobl_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(238, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<clear_dobldobl_data>:
mov    $0xee,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @clear_dobldobl_data() {
%1 = tail call i32 @_ada_use_c2phc(i32 238, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ GroundTruthHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void GroundTruthRequestUpdate() { UAVObjRequestUpdate(GroundTruthHandle()); }


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

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

LLVM IR (-O0):
define void @GroundTruthRequestUpdate() {
%1 = call i32 (...) @GroundTruthHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @GroundTruthRequestUpdate() {
%1 = tail call i32 (...) @GroundTruthHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
void *frame_to_address(unsigned int frame) {
  return (void *)(frame * 0x1000 + 0x1800000);
}


x86 assembly (clang, -O0):
<frame_to_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
add    $0x1800000,%eax
mov    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<frame_to_address>:
shl    $0xc,%edi
lea    0x1800000(%rdi),%eax
ret

LLVM IR (-O0):
define i8* @frame_to_address(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 4096
%5 = add i32 %4, 25165824
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @frame_to_address(i32 %0) {
%2 = shl i32 %0, 12
%3 = add i32 %2, 25165824
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, size_t);
void write_section(unsigned char *dst, const unsigned char *src, size_t len) {
  memcpy(dst, src, len);
}


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

x86 assembly (clang, -O2):
<write_section>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @write_section(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret void
}
void UART_INIT() { return; }


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

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

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

LLVM IR (-O2):
define void @UART_INIT() {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double time_now_double() {
  struct timeval time;
  if (gettimeofday(&time, NULL))
    return 0;
  return (double)time.tv_sec + (double)time.tv_usec * .000001;
}


x86 assembly (clang, -O0):
<time_now_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113c <time_now_double+0x2c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115d <time_now_double+0x4d>
cvtsi2sdq -0x10(%rbp),%xmm1
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_now_double>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
je     112d <time_now_double+0x1d>
xorps  %xmm0,%xmm0
add    $0x18,%rsp
ret
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xebd(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @time_now_double() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store double 0.000000e+00, double* %1
br label %14
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 0x3EB0C6F7A0B5ED8D, double %9)
store double %13, double* %1
br label %14
14: ; preds = %6, %5
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @time_now_double() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
br label %13
13: ; preds = %0, %5
%14 = phi double [ %12, %5 ], [ 0.000000e+00, %0 ]
ret double %14
}
/* Type definitions */
typedef int /*<<< orphan*/ num;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ inttoa(int, char *, int);
int /*<<< orphan*/ putstr(char *);
int strlen(char *);
int iprint_int(int num) {
  char buf[((sizeof(num) * 8 - 1) * 302 / 1000 + 1 + 1)];
  inttoa(num, buf, sizeof(buf));
  putstr(buf);
  return (strlen(buf));
}


x86 assembly (clang, -O0):
<iprint_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xf(%rbp),%rsi
mov    $0xb,%edx
call   1040 <inttoa@plt>
lea    -0xf(%rbp),%rdi
call   1050 <putstr@plt>
lea    -0xf(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iprint_int>:
push   %rbx
sub    $0x10,%rsp
lea    0x5(%rsp),%rbx
mov    %rbx,%rsi
mov    $0xb,%edx
call   1040 <inttoa@plt>
mov    %rbx,%rdi
call   1050 <putstr@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @iprint_int(i32 %0) {
%2 = alloca i32
%3 = alloca [11 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%6 = call i32 @inttoa(i32 %4, i8* %5, i32 11)
%7 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%8 = call i32 @putstr(i8* %7)
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @iprint_int(i32 %0) {
%2 = alloca [11 x i8]
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%4 = call i32 @inttoa(i32 %0, i8* %3, i32 11)
%5 = call i32 @putstr(i8* %3)
%6 = call i32 @strlen(i8* %3)
ret i32 %6
}