xunge/DecIR huggingface dataset:
/* Variables and functions */
int EINTR;
int errno;
int __set_errno(int error) {
  if (error == -1)
    error = EINTR;
  errno = error;
  return (error);
}


x86 assembly (clang, -O0):
<__set_errno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    111d <__set_errno+0x1d>
mov    0x2ec0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    0x2eb9(%rip),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_errno>:
mov    %edi,%eax
cmp    $0xffffffff,%edi
jne    1110 <__set_errno+0x10>
mov    0x2eca(%rip),%rax
mov    (%rax),%eax
mov    0x2ec9(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@EINTR = global i32 0
@errno = global i32 0
define i32 @__set_errno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* @EINTR
store i32 %6, i32* %2
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
store i32 %8, i32* @errno
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@EINTR = global i32 0
@errno = global i32 0
define i32 @__set_errno(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = load i32, i32* @EINTR
%4 = select i1 %2, i32 %3, i32 %0
store i32 %4, i32* @errno
ret i32 %4
}
/* Variables and functions */
int any_match(char **, char **, char, char);
int sb_match(char **buffer, char **speech) {
  return any_match(buffer, speech, '[', ']');
}


x86 assembly (clang, -O0):
<sb_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5b,%edx
mov    $0x5d,%ecx
call   1030 <any_match@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sb_match>:
mov    $0x5b,%edx
mov    $0x5d,%ecx
jmp    1030 <any_match@plt>

LLVM IR (-O0):
define i32 @sb_match(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %3
%6 = load i8**, i8*** %4
%7 = call i32 @any_match(i8** %5, i8** %6, i8 signext 91, i8 signext 93)
ret i32 %7
}

LLVM IR (-O2):
define i32 @sb_match(i8** %0, i8** %1) {
%3 = tail call i32 @any_match(i8** %0, i8** %1, i8 signext 91, i8 signext 93)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ EndsWithCVC(char *);
int WordSize(char *);
int RemoveAnE(char *word) {
  return ((1 == WordSize(word)) && !EndsWithCVC(word));
}


x86 assembly (clang, -O0):
<RemoveAnE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <WordSize@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %edx,%ecx
mov    %al,-0x9(%rbp)
jne    115d <RemoveAnE+0x3d>
mov    -0x8(%rbp),%rdi
call   1040 <EndsWithCVC@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RemoveAnE>:
push   %rbx
mov    %rdi,%rbx
call   1030 <WordSize@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
jne    1143 <RemoveAnE+0x23>
mov    %rbx,%rdi
call   1040 <EndsWithCVC@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @RemoveAnE(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @WordSize(i8* %3)
%5 = icmp eq i32 1, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @EndsWithCVC(i8* %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @RemoveAnE(i8* %0) {
%2 = tail call i32 @WordSize(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @EndsWithCVC(i8* %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
char *mgGetHint(char *hint) { return ""; }


x86 assembly (clang, -O0):
<mgGetHint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @mgGetHint(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int read_whitney(int, unsigned long *);
int PL_is_tv_on(void) {
  int err;
  unsigned long tvctl;
  err = read_whitney(0x60018, &tvctl);
  if (err)
    return 0;
  return (tvctl & 0x80000000) ? 1 : 0;
}


x86 assembly (clang, -O0):
<PL_is_tv_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60018,%edi
lea    -0x10(%rbp),%rsi
call   1030 <read_whitney@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113f <PL_is_tv_on+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    115e <PL_is_tv_on+0x4e>
movabs $0x80000000,%rdx
and    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PL_is_tv_on>:
push   %rax
mov    %rsp,%rsi
mov    $0x60018,%edi
call   1030 <read_whitney@plt>
mov    (%rsp),%edx
shr    $0x1f,%edx
xor    %ecx,%ecx
test   %eax,%eax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PL_is_tv_on() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = call i32 @read_whitney(i32 393240, i64* %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %14
8: ; preds = %0
%9 = load i64, i64* %3
%10 = and i64 %9, 2147483648
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
store i32 %13, i32* %1
br label %14
14: ; preds = %8, %7
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @PL_is_tv_on() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @read_whitney(i32 393240, i64* %1)
%4 = icmp eq i32 %3, 0
%5 = load i64, i64* %1
%6 = trunc i64 %5 to i32
%7 = lshr i32 %6, 31
%8 = select i1 %4, i32 %7, i32 0
ret i32 %8
}
/* Variables and functions */
int __uportsys_listen(int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
int listen(int sd, int backlog) {
  return __uportsys_listen(sd, backlog, &errno);
}


x86 assembly (clang, -O0):
<listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eb5(%rip),%rdx
call   1030 <__uportsys_listen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listen>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <__uportsys_listen@plt>

LLVM IR (-O0):
@errno = global i32 0
define i32 @listen(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @__uportsys_listen(i32 %5, i32 %6, i32* @errno)
ret i32 %7
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @listen(i32 %0, i32 %1) {
%3 = tail call i32 @__uportsys_listen(i32 %0, i32 %1, i32* @errno)
ret i32 %3
}
void setsocket(long newsocket) {}


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

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

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

LLVM IR (-O2):
define void @setsocket(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf(" %d = %c \n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c" %d = %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
int test_28(int a, int b, int c, int d) { return a >= 0 == b >= 0 ? c : d; }


x86 assembly (clang, -O0):
<test_28>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x0,-0x8(%rbp)
setge  %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
jne    113c <test_28+0x3c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <test_28+0x42>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_28>:
mov    %edx,%eax
xor    %esi,%edi
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_28(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
%11 = zext i1 %10 to i32
%12 = load i32, i32* %6
%13 = icmp sge i32 %12, 0
%14 = zext i1 %13 to i32
%15 = icmp eq i32 %11, %14
br i1 %15, label %16, label %18
16: ; preds = %4
%17 = load i32, i32* %7
br label %20
18: ; preds = %4
%19 = load i32, i32* %8
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @test_28(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = xor i32 %1, %0
%6 = icmp sgt i32 %5, -1
%7 = select i1 %6, i32 %2, i32 %3
ret i32 %7
}
int comp_thandle(void *ref_data, void *new_data) {
  return ((*(int *)(ref_data)) - (*(int *)(new_data)));
}


x86 assembly (clang, -O0):
<comp_thandle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_thandle>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @comp_thandle(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @comp_thandle(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_pascal_comments() {
  test_parser_verify_parse(test_parser_sourcefile("pascal", " //comment"),
                           "pascal", "", "//comment", 0);
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t listxattr(const char *__path, char *__list, size_t __size) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<listxattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<listxattr>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @listxattr(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 i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @listxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ drv_LW_ABP_send(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void drv_LW_ABP_reset(void) {
  char cmd[] = "lcd init\r\n";
  drv_LW_ABP_send(cmd, strlen(cmd));
}


x86 assembly (clang, -O0):
<drv_LW_ABP_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xb(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xb(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <drv_LW_ABP_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_LW_ABP_reset>:
push   %rbx
sub    $0x10,%rsp
movabs $0x74696e692064636c,%rax
6e 69 74
mov    %rax,(%rsp)
movl   $0xa0d74,0x7(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <drv_LW_ABP_send@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.drv_LW_ABP_reset.cmd = [11 x i8] c"lcd init\0D\0A\00"
define void @drv_LW_ABP_reset() {
%1 = alloca [11 x i8]
%2 = bitcast [11 x i8]* %1 to i8*
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @drv_LW_ABP_send(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
@__const.drv_LW_ABP_reset.cmd = [11 x i8] c"lcd init\0D\0A\00"
define void @drv_LW_ABP_reset() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @drv_LW_ABP_send(i8* %2, i32 %3)
ret void
}
void ff_hevc_put_hevc_bi_epel_v32_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v32_12_sse4() {
ret void
}
double dIdentity(void) { return (double)(0.0f); }


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

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

LLVM IR (-O0):
define double @dIdentity() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @dIdentity() {
ret double 0.000000e+00
}
unsigned int f57(unsigned int x, int y) {
  return (x << ((-y) & (8 * sizeof(unsigned int) - 1))) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f57>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
and    $0x1f,%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f57>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f57(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 = sub nsw i32 0, %6
%8 = sext i32 %7 to i64
%9 = and i64 %8, 31
%10 = trunc i64 %9 to i32
%11 = shl i32 %5, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = lshr i32 %12, %13
%15 = xor i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f57(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = and i32 %3, 31
%5 = shl i32 %0, %4
%6 = lshr i32 %0, %1
%7 = xor i32 %5, %6
ret i32 %7
}
unsigned char clamp_byte(int x) {
  return (unsigned char)((x) < 0 ? (0) : ((x) > 255 ? 255 : (x)));
}


x86 assembly (clang, -O0):
<clamp_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111b <clamp_byte+0x1b>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <clamp_byte+0x41>
cmpl   $0xff,-0x4(%rbp)
jle    1135 <clamp_byte+0x35>
mov    $0xff,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <clamp_byte+0x3b>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_byte>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @clamp_byte(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
%6 = trunc i32 %5 to i8
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ cpu_trap(int);
void i_undefined(void) { cpu_trap(6); }


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

x86 assembly (clang, -O2):
<i_undefined>:
mov    $0x6,%edi
jmp    1030 <cpu_trap@plt>

LLVM IR (-O0):
define void @i_undefined() {
%1 = call i32 @cpu_trap(i32 6)
ret void
}

LLVM IR (-O2):
define void @i_undefined() {
%1 = tail call i32 @cpu_trap(i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_line(char *);
int main(void) {
  print_line("ABCDE");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"ABCDE\00"
define i32 @main() {
%1 = tail call i32 @print_line(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprint_decimal(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_decimal(int decimal) { fprint_decimal(decimal, stdout); }


x86 assembly (clang, -O0):
<print_decimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <fprint_decimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_decimal>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fprint_decimal@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @print_decimal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @fprint_decimal(i32 %3, i32 %4)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @print_decimal(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprint_decimal(i32 %0, i32 %2)
ret void
}
const char *fe_warp_affine_doc() { return "affine :== < w' = a * x + b >"; }


x86 assembly (clang, -O0):
<fe_warp_affine_doc>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"affine :== < w' = a * x + b >\00"
define i8* @fe_warp_affine_doc() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [30 x i8] c"affine :== < w' = a * x + b >\00"
define i8* @fe_warp_affine_doc() {
ret i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void strncmp() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @strncmp() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}
int HelpItem46(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @HelpItem46() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem46() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IF_fct_2(char);
void IF_div(void) { IF_fct_2('/'); }


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

x86 assembly (clang, -O2):
<IF_div>:
mov    $0x2f,%edi
jmp    1030 <IF_fct_2@plt>

LLVM IR (-O0):
define void @IF_div() {
%1 = call i32 @IF_fct_2(i8 signext 47)
ret void
}

LLVM IR (-O2):
define void @IF_div() {
%1 = tail call i32 @IF_fct_2(i8 signext 47)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ skip_to(char **, char *);
void skip_to_blank(char **data) { skip_to(data, " \t"); }


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

x86 assembly (clang, -O2):
<skip_to_blank>:
lea    0xee9(%rip),%rsi
jmp    1030 <skip_to@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
define void @skip_to_blank(i8** %0) {
%2 = tail call i32 @skip_to(i8** %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ keys(unsigned char, int /*<<< orphan*/, int /*<<< orphan*/);
void menu(int value) { keys((unsigned char)value, 0, 0); }


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
movzbl %al,%edi
mov    %edx,%esi
call   1030 <keys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
movzbl %dil,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <keys@plt>

LLVM IR (-O0):
define void @menu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @keys(i8 zeroext %4, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @menu(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @keys(i8 zeroext %2, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) { printf("usage: run-test [-h|--help] <test>...\n"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"usage: run-test [-h|--help] <test>...\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"usage: run-test [-h|--help] <test>...\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t dt_parse_iso_zone_basic(char const *, size_t, int *);
size_t dt_parse_iso_zone_extended(char const *, size_t, int *);
size_t dt_parse_iso_zone(const char *str, size_t len, int *offset) {
  if (len < 3 || str[3] == ':')
    return dt_parse_iso_zone_extended(str, len, offset);
  else
    return dt_parse_iso_zone_basic(str, len, offset);
}


x86 assembly (clang, -O0):
<dt_parse_iso_zone>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x3,-0x18(%rbp)
jb     1150 <dt_parse_iso_zone+0x30>
mov    -0x10(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x3a,%eax
jne    116a <dt_parse_iso_zone+0x4a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <dt_parse_iso_zone_extended@plt>
mov    %rax,-0x8(%rbp)
jmp    117f <dt_parse_iso_zone+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <dt_parse_iso_zone_basic@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt_parse_iso_zone>:
cmp    $0x3,%rsi
jb     112c <dt_parse_iso_zone+0xc>
cmpb   $0x3a,0x3(%rdi)
jne    1131 <dt_parse_iso_zone+0x11>
jmp    1040 <dt_parse_iso_zone_extended@plt>
jmp    1030 <dt_parse_iso_zone_basic@plt>

LLVM IR (-O0):
define i64 @dt_parse_iso_zone(i8* %0, i64 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
%8 = load i64, i64* %6
%9 = icmp ult i64 %8, 3
br i1 %9, label %16, label %10
10: ; preds = %3
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 58
br i1 %15, label %16, label %21
16: ; preds = %10, %3
%17 = load i8*, i8** %5
%18 = load i64, i64* %6
%19 = load i32*, i32** %7
%20 = call i64 @dt_parse_iso_zone_extended(i8* %17, i64 %18, i32* %19)
store i64 %20, i64* %4
br label %26
21: ; preds = %10
%22 = load i8*, i8** %5
%23 = load i64, i64* %6
%24 = load i32*, i32** %7
%25 = call i64 @dt_parse_iso_zone_basic(i8* %22, i64 %23, i32* %24)
store i64 %25, i64* %4
br label %26
26: ; preds = %21, %16
%27 = load i64, i64* %4
ret i64 %27
}

LLVM IR (-O2):
define i64 @dt_parse_iso_zone(i8* %0, i64 %1, i32* %2) {
%4 = icmp ult i64 %1, 3
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %0, i64 3
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 58
br i1 %8, label %9, label %11
9: ; preds = %5, %3
%10 = tail call i64 @dt_parse_iso_zone_extended(i8* %0, i64 %1, i32* %2)
br label %13
11: ; preds = %5
%12 = tail call i64 @dt_parse_iso_zone_basic(i8* %0, i64 %1, i32* %2)
br label %13
13: ; preds = %11, %9
%14 = phi i64 [ %10, %9 ], [ %12, %11 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_immediate2(void) { output_with_tab("ldx "); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"ldx \00"
define void @gen_immediate2() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int sync_wait(int, int);
scalar_t__ sync_wake(int, int);
int sync_barrier(int fd, int seq) {
  if (sync_wake(fd, seq))
    return -1;
  return sync_wait(fd, seq + 1);
}


x86 assembly (clang, -O0):
<sync_barrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <sync_wake@plt>
cmp    $0x0,%rax
je     114f <sync_barrier+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <sync_barrier+0x40>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <sync_wait@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sync_barrier>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <sync_wake@plt>
test   %rax,%rax
je     113d <sync_barrier+0x1d>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
add    $0x1,%ebx
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <sync_wait@plt>

LLVM IR (-O0):
define i32 @sync_barrier(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 @sync_wake(i32 %6, i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %16
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = call i32 @sync_wait(i32 %12, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @sync_barrier(i32 %0, i32 %1) {
%3 = tail call i64 @sync_wake(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = add nsw i32 %1, 1
%7 = tail call i32 @sync_wait(i32 %0, i32 %6)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ bm_rule_print_help();
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf(
      "usage:\n"
      "    blogc-make [-h] [-v] [-D] [-V] [-f FILE] [RULE ...]\n"
      "               - A simple build tool for blogc.\n"
      "\n"
      "positional arguments:\n"
      "    RULE             build rule(s) to run. can include comma-separated\n"
      "                     key-value pairs of rule arguments in the format\n"
      "                     RULE:arg1=value1,arg2=value2,... (default: all)\n"
      "\n"
      "optional arguments:\n"
      "    -h               show this help message and exit\n"
      "    -v               show version and exit\n"
      "    -D               build for development environment\n"
      "    -V               be verbose when executing commands\n"
      "    -f FILE          read FILE as blogcfile\n");
  bm_rule_print_help();
}


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

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <bm_rule_print_help@plt>

LLVM IR (-O0):
@.str = [616 x i8] c"usage:\0A blogc-make [-h] [-v] [-D] [-V] [-f FILE] [RULE ...]\0A - A simple build tool for blogc.\0A\0Apositional arguments:\0A RULE build rule(s) to run. can include comma-separated\0A key-value pairs of rule arguments in the format\0A RULE:arg1=value1,arg2=value2,... (default: all)\0A\0Aoptional arguments:\0A -h show this help message and exit\0A -v show version and exit\0A -D build for development environment\0A -V be verbose when executing commands\0A -f FILE read FILE as blogcfile\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([616 x i8], [616 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @bm_rule_print_help()
ret void
}

LLVM IR (-O2):
@str = [615 x i8] c"usage:\0A blogc-make [-h] [-v] [-D] [-V] [-f FILE] [RULE ...]\0A - A simple build tool for blogc.\0A\0Apositional arguments:\0A RULE build rule(s) to run. can include comma-separated\0A key-value pairs of rule arguments in the format\0A RULE:arg1=value1,arg2=value2,... (default: all)\0A\0Aoptional arguments:\0A -h show this help message and exit\0A -v show version and exit\0A -D build for development environment\0A -V be verbose when executing commands\0A -f FILE read FILE as blogcfile\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([615 x i8], [615 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @bm_rule_print_help()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t __wcsxfrm_l(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, size_t,
                   int /*<<< orphan*/);
size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n) {
  return __wcsxfrm_l(dest, src, n, 0);
}


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

x86 assembly (clang, -O2):
<wcsxfrm>:
xor    %ecx,%ecx
jmp    1030 <__wcsxfrm_l@plt>

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

LLVM IR (-O2):
define i64 @wcsxfrm(i32* noalias %0, i32* noalias %1, i64 %2) {
%4 = tail call i64 @__wcsxfrm_l(i32* %0, i32* %1, i64 %2, i32 0)
ret i64 %4
}
int test(signed char anim_col) {
  if (anim_col >= 31) {
    return 1;
  } else if (anim_col <= -15) {
    return -2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x1f,%eax
jl     1123 <test+0x23>
movl   $0x1,-0x4(%rbp)
jmp    1148 <test+0x48>
movsbl -0x5(%rbp),%eax
cmp    $0xfffffff1,%eax
jg     113c <test+0x3c>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1148 <test+0x48>
jmp    1141 <test+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
xor    %eax,%eax
cmp    $0xf2,%dil
setge  %al
cmp    $0x1f,%dil
lea    -0x2(%rax,%rax,1),%ecx
mov    $0x1,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 31
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %15
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, -15
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 -2, i32* %2
br label %15
13: ; preds = %8
br label %14
14: ; preds = %13
store i32 0, i32* %2
br label %15
15: ; preds = %14, %12, %7
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @test(i8 signext %0) {
%2 = icmp sgt i8 %0, 30
%3 = icmp slt i8 %0, -14
%4 = select i1 %3, i32 -2, i32 0
%5 = select i1 %2, i32 1, i32 %4
ret i32 %5
}
void d2i_X509_ALGORS(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_X509_ALGORS() {
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_oidcheckfunc(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_oidcheckfunc() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_oidcheckfunc() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
int bin_to_dec(int binary[8]) {
  int counter = 1;
  int dec;
  dec = binary[0] * 2;
  for (; counter < 7; counter++) {
    dec = (dec + binary[counter]) * 2;
  }
  dec = dec + binary[7];
  return dec;
}


x86 assembly (clang, -O0):
<bin_to_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7,-0xc(%rbp)
jge    1147 <bin_to_dec+0x47>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111b <bin_to_dec+0x1b>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
add    0x1c(%rcx),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin_to_dec>:
mov    (%rdi),%eax
add    %eax,%eax
add    0x4(%rdi),%eax
add    %eax,%eax
add    0x8(%rdi),%eax
add    %eax,%eax
add    0xc(%rdi),%eax
add    %eax,%eax
add    0x10(%rdi),%eax
add    %eax,%eax
add    0x14(%rdi),%eax
add    %eax,%eax
add    0x18(%rdi),%eax
add    %eax,%eax
add    0x1c(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bin_to_dec(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl nsw i32 %2, 1
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = add nsw i32 %5, %3
%7 = shl nsw i32 %6, 1
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %7
%11 = shl nsw i32 %10, 1
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = add nsw i32 %13, %11
%15 = shl nsw i32 %14, 1
%16 = getelementptr inbounds i32, i32* %0, i64 4
%17 = load i32, i32* %16
%18 = add nsw i32 %17, %15
%19 = shl nsw i32 %18, 1
%20 = getelementptr inbounds i32, i32* %0, i64 5
%21 = load i32, i32* %20
%22 = add nsw i32 %21, %19
%23 = shl nsw i32 %22, 1
%24 = getelementptr inbounds i32, i32* %0, i64 6
%25 = load i32, i32* %24
%26 = add nsw i32 %25, %23
%27 = shl nsw i32 %26, 1
%28 = getelementptr inbounds i32, i32* %0, i64 7
%29 = load i32, i32* %28
%30 = add nsw i32 %29, %27
ret i32 %30
}
/* Variables and functions */
int /*<<< orphan*/ mcurses_hline(int, char);
int /*<<< orphan*/ mcurses_vline(int, char);
int mcurses_border(char c) {
  mcurses_hline(0, c);
  mcurses_hline(15, c);
  mcurses_vline(0, c);
  mcurses_vline(15, c);
}


x86 assembly (clang, -O0):
<mcurses_border>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
xor    %edi,%edi
movsbl -0x5(%rbp),%esi
call   1030 <mcurses_hline@plt>
mov    $0xf,%edi
movsbl -0x5(%rbp),%esi
call   1030 <mcurses_hline@plt>
xor    %edi,%edi
movsbl -0x5(%rbp),%esi
call   1040 <mcurses_vline@plt>
mov    $0xf,%edi
movsbl -0x5(%rbp),%esi
call   1040 <mcurses_vline@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcurses_border>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
mov    %ebx,%esi
call   1030 <mcurses_hline@plt>
mov    $0xf,%edi
mov    %ebx,%esi
call   1030 <mcurses_hline@plt>
xor    %edi,%edi
mov    %ebx,%esi
call   1040 <mcurses_vline@plt>
mov    $0xf,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <mcurses_vline@plt>

LLVM IR (-O0):
define i32 @mcurses_border(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i32 @mcurses_hline(i32 0, i8 signext %4)
%6 = load i8, i8* %3
%7 = call i32 @mcurses_hline(i32 15, i8 signext %6)
%8 = load i8, i8* %3
%9 = call i32 @mcurses_vline(i32 0, i8 signext %8)
%10 = load i8, i8* %3
%11 = call i32 @mcurses_vline(i32 15, i8 signext %10)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @mcurses_border(i8 signext %0) {
%2 = tail call i32 @mcurses_hline(i32 0, i8 signext %0)
%3 = tail call i32 @mcurses_hline(i32 15, i8 signext %0)
%4 = tail call i32 @mcurses_vline(i32 0, i8 signext %0)
%5 = tail call i32 @mcurses_vline(i32 15, i8 signext %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ execSysCall(int, char *, int /*<<< orphan*/,
                               int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void getCpuVendor() {
  char vendor[13];
  execSysCall(0x24, vendor, 0, 0);
  vendor[12] = '\0';
  printf("%s\n", vendor);
}


x86 assembly (clang, -O0):
<getCpuVendor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xd(%rbp),%rsi
mov    $0x24,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1040 <execSysCall@plt>
movb   $0x0,-0x1(%rbp)
lea    -0xd(%rbp),%rsi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCpuVendor>:
push   %rbx
sub    $0x10,%rsp
lea    0x3(%rsp),%rbx
mov    $0x24,%edi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <execSysCall@plt>
movb   $0x0,0xf(%rsp)
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @getCpuVendor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @execSysCall(i32 36, i8* %2, i32 0, i32 0)
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 12
store i8 0, i8* %4
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @getCpuVendor() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @execSysCall(i32 36, i8* %2, i32 0, i32 0)
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 12
store i8 0, i8* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void user_hello_part2() { printf("Hello from part2\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"Hello from part2\00"
define void @user_hello_part2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
int main() {
  int a = 2;
  int b = 4;
  int c = 2;
  while (a) {
    a *= 3;
    for (c = -10; c < 0; c++) {
      a *= b;
    }
    b *= 5;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1166 <main+0x66>
imul   $0x3,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0xfffffff6,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    115a <main+0x5a>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <main+0x38>
imul   $0x5,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <main+0x20>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}