xunge/DecIR huggingface dataset:
/* Variables and functions */
int unichar_to_gsm7(int);
int unichar_to_gsm7_extend(int);
int unichar_to_gsm7_count(int unicode) {
  int nn;
  nn = unichar_to_gsm7(unicode);
  if (nn >= 0)
    return 1;
  nn = unichar_to_gsm7_extend(unicode);
  if (nn >= 0)
    return 2;
  return 0;
}


x86 assembly (clang, -O0):
<unichar_to_gsm7_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <unichar_to_gsm7@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     114c <unichar_to_gsm7_count+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1174 <unichar_to_gsm7_count+0x54>
mov    -0x8(%rbp),%edi
call   1040 <unichar_to_gsm7_extend@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     116d <unichar_to_gsm7_count+0x4d>
movl   $0x2,-0x4(%rbp)
jmp    1174 <unichar_to_gsm7_count+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unichar_to_gsm7_count>:
push   %rbx
mov    %edi,%ebx
call   1030 <unichar_to_gsm7@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
js     1135 <unichar_to_gsm7_count+0x15>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <unichar_to_gsm7_extend@plt>
shr    $0x1e,%eax
not    %eax
and    $0x2,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @unichar_to_gsm7_count(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @unichar_to_gsm7(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 1, i32* %2
br label %17
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @unichar_to_gsm7_extend(i32 %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 2, i32* %2
br label %17
16: ; preds = %10
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @unichar_to_gsm7_count(i32 %0) {
%2 = tail call i32 @unichar_to_gsm7(i32 %0)
%3 = icmp sgt i32 %2, -1
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @unichar_to_gsm7_extend(i32 %0)
%6 = lshr i32 %5, 30
%7 = and i32 %6, 2
%8 = xor i32 %7, 2
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %10
}
int main() {
  int ok = 1;
  int val = 2;
#pragma acc data copy(val)
  {
#pragma acc parallel present(val)
    { val = 7; }
#pragma acc parallel firstprivate(val) copy(ok)
    {
      ok = val == 7;
      val = 9;
    }
  }
  if (!ok)
    return 1;
  if (val != 7)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x7,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    114c <main+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1169 <main+0x69>
cmpl   $0x7,-0xc(%rbp)
je     1162 <main+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <main+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
int errmsg_(mesg)
char *mesg;
{ return (errmsg(mesg)); }


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

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

LLVM IR (-O0):
define i32 @errmsg_(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @errmsg to i32 (i8*, ...)*)(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @errmsg_(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @errmsg to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
/* Variables and functions */
int ax2ho(double *, double *, int);
int eu2ax(double *, double *, int);
int eu2ho(double *eu, double *ho, int p) {
  double ax[4];
  int trash;
  trash = eu2ax(eu, ax, p);
  trash = ax2ho(ax, ho, p);
  return 1;
}


x86 assembly (clang, -O0):
<eu2ho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <eu2ax@plt>
mov    %eax,-0x44(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <ax2ho@plt>
mov    %eax,-0x44(%rbp)
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eu2ho>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsp,%r15
mov    %r15,%rsi
call   1030 <eu2ax@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <ax2ho@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @eu2ho(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
%7 = alloca [4 x double]
%8 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%9 = load double*, double** %4
%10 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%11 = load i32, i32* %6
%12 = call i32 @eu2ax(double* %9, double* %10, i32 %11)
store i32 %12, i32* %8
%13 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%14 = load double*, double** %5
%15 = load i32, i32* %6
%16 = call i32 @ax2ho(double* %13, double* %14, i32 %15)
store i32 %16, i32* %8
ret i32 1
}

LLVM IR (-O2):
define i32 @eu2ho(double* %0, double* %1, i32 %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%7 = call i32 @eu2ax(double* %0, double* %6, i32 %2)
%8 = call i32 @ax2ho(double* %6, double* %1, i32 %2)
ret i32 1
}
void gtk_about_dialog_get_artists() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_get_artists() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ print_idx_field_unicode(int /*<<< orphan*/, char *,
                                           int /*<<< orphan*/ const *, int);
int decode_internal_manufacturer(uint8_t idx, const uint8_t *ptr, int len) {
  print_idx_field_unicode(idx, "Internal manufacturer", ptr + 2, len - 2);
  return 0;
}


x86 assembly (clang, -O0):
<decode_internal_manufacturer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
mov    -0x14(%rbp),%ecx
sub    $0x2,%ecx
lea    0xec6(%rip),%rsi
call   1030 <print_idx_field_unicode@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_internal_manufacturer>:
push   %rax
lea    0x8(%rsi),%rax
lea    -0x2(%rdx),%ecx
lea    0xee1(%rip),%rsi
mov    %rax,%rdx
call   1030 <print_idx_field_unicode@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Internal manufacturer\00"
define i32 @decode_internal_manufacturer(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 2
%10 = load i32, i32* %6
%11 = sub nsw i32 %10, 2
%12 = call i32 @print_idx_field_unicode(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32* %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Internal manufacturer\00"
define i32 @decode_internal_manufacturer(i32 %0, i32* %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %1, i64 2
%5 = add nsw i32 %2, -2
%6 = tail call i32 @print_idx_field_unicode(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32* %4, i32 %5)
ret i32 0
}
/* Type definitions */
struct board {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ board_done_noalloc(struct board *);
int /*<<< orphan*/ free(struct board *);
void board_done(struct board *board) {
  board_done_noalloc(board);
  free(board);
}


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

x86 assembly (clang, -O2):
<board_done>:
push   %rbx
mov    %rdi,%rbx
call   1040 <board_done_noalloc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.board = type { i32 }
define void @board_done(%struct.board* %0) {
%2 = alloca %struct.board*
store %struct.board* %0, %struct.board** %2
%3 = load %struct.board*, %struct.board** %2
%4 = call i32 @board_done_noalloc(%struct.board* %3)
%5 = load %struct.board*, %struct.board** %2
%6 = call i32 @free(%struct.board* %5)
ret void
}

LLVM IR (-O2):
%struct.board = type { i32 }
define void @board_done(%struct.board* %0) {
%2 = tail call i32 @board_done_noalloc(%struct.board* %0)
%3 = tail call i32 @free(%struct.board* %0)
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ fatal(char *);
void *emalloc(size_t size) {
  void *p;
  if ((p = calloc(1, size)) == NULL)
    fatal("calloc");
  return p;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1154 <emalloc+0x34>
lea    0xeb1(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rbx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1142 <emalloc+0x22>
lea    0xec3(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"calloc\00"
define i8* @emalloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int Accept(int s, struct sockaddr *addr, socklen_t *addrlen) {
  int rc = accept(s, addr, addrlen);
  if (rc < 0) {
    perror("Accept error");
    exit(EXIT_FAILURE);
  }
  return rc;
}


x86 assembly (clang, -O0):
<Accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <accept@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    117a <Accept+0x4a>
lea    0xe99(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Accept>:
push   %rax
call   1040 <accept@plt>
test   %eax,%eax
js     113c <Accept+0xc>
pop    %rcx
ret
lea    0xebd(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [13 x i8] c"Accept error\00"
@EXIT_FAILURE = global i32 0
define i32 @Accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%8 = load i32, i32* %4
%9 = load %struct.sockaddr*, %struct.sockaddr** %5
%10 = load i32*, i32** %6
%11 = call i32 @accept(i32 %8, %struct.sockaddr* %9, i32* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [13 x i8] c"Accept error\00"
@EXIT_FAILURE = global i32 0
define i32 @Accept(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret i32 %4
}
int main() {
  int y = 42;
  return y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 42
}
int encode_GDS_BITARRAY(buf, dchars, size)
char *buf;
unsigned char *dchars;
int size;
{
  int value = 0;
  sscanf(buf, "%x", &value);
  dchars[0] = value / 256;
  dchars[1] = value % 256;
  return 2;
}


x86 assembly (clang, -O0):
<encode_GDS_BITARRAY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xecb(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x18(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    $0x2,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_GDS_BITARRAY>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movl   $0x0,0xc(%rsp)
lea    0xed9(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
mov    0xc(%rsp),%eax
lea    0xff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
mov    %ch,(%rbx)
mov    %al,0x1(%rbx)
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
define i32 @encode_GDS_BITARRAY(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load i8*, i8** %4
%9 = call i32 (i8*, i8*, ...) @sscanf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%10 = load i32, i32* %7
%11 = sdiv i32 %10, 256
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 0
store i8 %12, i8* %14
%15 = load i32, i32* %7
%16 = srem i32 %15, 256
%17 = trunc i32 %16 to i8
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 %17, i8* %19
ret i32 2
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define i32 @encode_GDS_BITARRAY(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%6 = call i32 (i8*, i8*, ...) @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 256
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = trunc i32 %7 to i8
%11 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %10, i8* %11
ret i32 2
}
/* Variables and functions */
int sin(int);
int sin16(int theta) {
  return (int)(sin(theta * (2 * 3.14159265358979323846) / 0x10000) * 0x1000);
}


x86 assembly (clang, -O0):
<sin16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
shl    $0xc,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin16>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xee3(%rip),%xmm0
mulsd  0xee3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
shl    $0xc,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sin16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x401921FB54442D18
%6 = fdiv double %5, 6.553600e+04
%7 = fptosi double %6 to i32
%8 = call i32 @sin(i32 %7)
%9 = mul nsw i32 %8, 4096
ret i32 %9
}

LLVM IR (-O2):
define i32 @sin16(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x401921FB54442D18
%4 = fmul double %3, 0x3EF0000000000000
%5 = fptosi double %4 to i32
%6 = tail call i32 @sin(i32 %5)
%7 = shl nsw i32 %6, 12
ret i32 %7
}
void XkbGetMap() {}


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

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

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

LLVM IR (-O2):
define void @XkbGetMap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int i;
  for (i = 0; i < 5; i++) {
    printf("dwarftest\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%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   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"dwarftest\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 = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"dwarftest\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *strchr(char const *, char);
int nyb(char c) {
  static const char xdigit[] = "0123456789ABCDEF";
  const char *p = strchr(xdigit, c);
  if (p)
    return (p - xdigit);
  return 0;
}


x86 assembly (clang, -O0):
<nyb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <nyb+0x43>
mov    -0x10(%rbp),%rax
lea    0xeb8(%rip),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    115a <nyb+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nyb>:
push   %rbx
mov    %edi,%esi
lea    0xee6(%rip),%rbx
mov    %rbx,%rdi
call   1030 <strchr@plt>
mov    %eax,%edx
sub    %ebx,%edx
xor    %ecx,%ecx
test   %rax,%rax
cmovne %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@nyb.xdigit = internal constant [17 x i8] c"0123456789ABCDEF\00"
define i32 @nyb(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = call i8* @strchr(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @nyb.xdigit, i64 0, i64 0), i8 signext %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = ptrtoint i8* %10 to i64
%12 = sub i64 %11, ptrtoint ([17 x i8]* @nyb.xdigit to i64)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %9
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@nyb.xdigit = internal constant [17 x i8] c"0123456789ABCDEF\00"
define i32 @nyb(i8 signext %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @nyb.xdigit, i64 0, i64 0), i8 signext %0)
%3 = icmp eq i8* %2, null
%4 = ptrtoint i8* %2 to i64
%5 = trunc i64 %4 to i32
%6 = sub i32 %5, ptrtoint ([17 x i8]* @nyb.xdigit to i32)
%7 = select i1 %3, i32 0, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/"
               "heads/master/lib/common/h2o/memory.h"
               ":"
               "310"
               ":"
               "no memory");
  return p;
}


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

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/heads/master/lib/common/h2o/memory.h:310:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/nkmideb/h2o-server/refs/heads/master/lib/common/h2o/memory.h:310:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void *test_anti_range_56(long n) {
  extern void *alloc_anti_range_56(long) __attribute__((alloc_size(1)));
  if (0x7fffffffffffffffL - 1 <= n && n <= 0x7fffffffffffffffL - 1)
    n = 0x7fffffffffffffffL - 1 - 1;
  return alloc_anti_range_56(n);
}


x86 assembly (clang, -O0):
<test_anti_range_56>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    -0x8(%rbp),%rax
jg     1152 <test_anti_range_56+0x42>
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    %rax,-0x8(%rbp)
jg     1152 <test_anti_range_56+0x42>
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_56@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_56>:
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
lea    0x1(%rax),%rcx
cmp    %rcx,%rdi
cmove  %rax,%rdi
jmp    1030 <alloc_anti_range_56@plt>

LLVM IR (-O0):
define i8* @test_anti_range_56(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sle i64 9223372036854775806, %3
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 9223372036854775806
br i1 %7, label %8, label %9
8: ; preds = %5
store i64 9223372036854775805, i64* %2
br label %9
9: ; preds = %8, %5, %1
%10 = load i64, i64* %2
%11 = call i8* @alloc_anti_range_56(i64 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @test_anti_range_56(i64 %0) {
%2 = icmp eq i64 %0, 9223372036854775806
%3 = select i1 %2, i64 9223372036854775805, i64 %0
%4 = tail call i8* @alloc_anti_range_56(i64 %3)
ret i8* %4
}
int mul(int var1, int var2) { return (var1 * var2); }


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

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

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

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
float __attribute__((no)) float_min1(float a, float b) {
  return ((a) < (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<float_min1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <float_min1+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <float_min1+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_min1>:
minss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @float_min1(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
bool ace_fs_is_current_or_parent_directory(const char *dirname) {
  return strcmp(dirname, ".") == 0 || strcmp(dirname, "..") == 0;
}


x86 assembly (clang, -O0):
<ace_fs_is_current_or_parent_directory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeda(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1158 <ace_fs_is_current_or_parent_directory+0x48>
mov    -0x8(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %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):
<ace_fs_is_current_or_parent_directory>:
push   %rbx
mov    %rdi,%rbx
lea    0xee6(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <ace_fs_is_current_or_parent_directory+0x31>
lea    0xed4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
define i32 @ace_fs_is_current_or_parent_directory(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
unsigned int IntToLittleEndian(unsigned int number) {
  unsigned int result;
  *(((char *)&result) + 0) = *(((char *)&number) + 3);
  *(((char *)&result) + 1) = *(((char *)&number) + 2);
  *(((char *)&result) + 2) = *(((char *)&number) + 1);
  *(((char *)&result) + 3) = *(((char *)&number) + 0);
  return result;
}


x86 assembly (clang, -O0):
<IntToLittleEndian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x8(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x7(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IntToLittleEndian>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @IntToLittleEndian(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %2 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 3
%6 = load i8, i8* %5
%7 = bitcast i32* %3 to i8*
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = bitcast i32* %2 to i8*
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = bitcast i32* %3 to i8*
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = bitcast i32* %2 to i8*
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = load i8, i8* %15
%17 = bitcast i32* %3 to i8*
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 %16, i8* %18
%19 = bitcast i32* %2 to i8*
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = bitcast i32* %3 to i8*
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @IntToLittleEndian(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
int _eqfunc(void *self, void *other) {
  int self_int = *(int *)self;
  int other_int = *(int *)other;
  if (self_int > other_int)
    return 1;
  else if (self_int < other_int)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<_eqfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    1136 <_eqfunc+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1155 <_eqfunc+0x55>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114e <_eqfunc+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <_eqfunc+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_eqfunc>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @_eqfunc(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 = icmp sgt i32 %4, %6
%8 = icmp slt i32 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
float sinf(float);
float __glsl_sin(float angle) { return sinf(angle); }


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

x86 assembly (clang, -O2):
<__glsl_sin>:
jmp    1030 <sinf@plt>

LLVM IR (-O0):
define float @__glsl_sin(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sinf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @__glsl_sin(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ libewf_fatal_print(char *);
void ewf_sectors_chunk_free(uint8_t *sectors_chunk) {
  if (sectors_chunk == NULL) {
    libewf_fatal_print("ewf_sectors_chunk_free: invalid sectors_chunk.\n");
  }
  free(sectors_chunk);
}


x86 assembly (clang, -O0):
<ewf_sectors_chunk_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <ewf_sectors_chunk_free+0x23>
lea    0xec2(%rip),%rdi
call   1040 <libewf_fatal_print@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ewf_sectors_chunk_free>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1135 <ewf_sectors_chunk_free+0x15>
lea    0xed0(%rip),%rdi
call   1040 <libewf_fatal_print@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"ewf_sectors_chunk_free: invalid sectors_chunk.\0A\00"
define void @ewf_sectors_chunk_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @libewf_fatal_print(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32*, i32** %2
%9 = call i32 @free(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"ewf_sectors_chunk_free: invalid sectors_chunk.\0A\00"
define void @ewf_sectors_chunk_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @libewf_fatal_print(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @free(i32* %0)
ret void
}
void foo() {
  int i = 0;
  i = 42;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AND_HOST_REG_L(int, int);
int TEST_HOST_REG_L(int dst_reg, int src_reg) {
  AND_HOST_REG_L(dst_reg, src_reg);
  return dst_reg;
}


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

x86 assembly (clang, -O2):
<TEST_HOST_REG_L>:
push   %rbx
mov    %edi,%ebx
call   1030 <AND_HOST_REG_L@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @TEST_HOST_REG_L(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 @AND_HOST_REG_L(i32 %5, i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @TEST_HOST_REG_L(i32 returned %0, i32 %1) {
%3 = tail call i32 @AND_HOST_REG_L(i32 %0, i32 %1)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ call_hooks(int);
int /*<<< orphan*/ raise(int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void fatal_signal_handler(int sig_nr) {
  call_hooks(sig_nr);
  signal(sig_nr, SIG_DFL);
  raise(sig_nr);
}


x86 assembly (clang, -O0):
<fatal_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <call_hooks@plt>
mov    -0x4(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    -0x4(%rbp),%edi
call   1030 <raise@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal_signal_handler>:
push   %rbx
mov    %edi,%ebx
call   1050 <call_hooks@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <signal@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <raise@plt>

LLVM IR (-O0):
@SIG_DFL = global i32 0
define void @fatal_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @call_hooks(i32 %3)
%5 = load i32, i32* %2
%6 = load i32, i32* @SIG_DFL
%7 = call i32 @signal(i32 %5, i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @raise(i32 %8)
ret void
}

LLVM IR (-O2):
@SIG_DFL = global i32 0
define void @fatal_signal_handler(i32 %0) {
%2 = tail call i32 @call_hooks(i32 %0)
%3 = load i32, i32* @SIG_DFL
%4 = tail call i32 @signal(i32 %0, i32 %3)
%5 = tail call i32 @raise(i32 %0)
ret void
}
/* Type definitions */
struct cmd_arg {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ showBridgeCfg();
void cmdShowBridging(int cmdType, struct cmd_arg *pCmdArg) { showBridgeCfg(); }


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

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

LLVM IR (-O0):
%struct.cmd_arg = type { i32 }
define void @cmdShowBridging(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
%5 = call i32 (...) @showBridgeCfg()
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type { i32 }
define void @cmdShowBridging(i32 %0, %struct.cmd_arg* nocapture readnone %1) {
%3 = tail call i32 (...) @showBridgeCfg()
ret void
}
int test_imm_96uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x96 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_96uint64_highword_reg>:
movabs $0x9600000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_96uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 644245094400
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ write_nibbles(int);
void lcd_init() {
  write_nibbles(0x20 | 0x08);
  write_nibbles(0x08);
  write_nibbles(0x01);
  write_nibbles(0x04 | 0x02);
  write_nibbles(0x08 | 0x04);
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
call   1030 <write_nibbles@plt>
mov    $0x8,%edi
call   1030 <write_nibbles@plt>
mov    $0x1,%edi
call   1030 <write_nibbles@plt>
mov    $0x6,%edi
call   1030 <write_nibbles@plt>
mov    $0xc,%edi
call   1030 <write_nibbles@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
push   %rax
mov    $0x28,%edi
call   1030 <write_nibbles@plt>
mov    $0x8,%edi
call   1030 <write_nibbles@plt>
mov    $0x1,%edi
call   1030 <write_nibbles@plt>
mov    $0x6,%edi
call   1030 <write_nibbles@plt>
mov    $0xc,%edi
pop    %rax
jmp    1030 <write_nibbles@plt>

LLVM IR (-O0):
define void @lcd_init() {
%1 = call i32 @write_nibbles(i32 40)
%2 = call i32 @write_nibbles(i32 8)
%3 = call i32 @write_nibbles(i32 1)
%4 = call i32 @write_nibbles(i32 6)
%5 = call i32 @write_nibbles(i32 12)
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
%1 = tail call i32 @write_nibbles(i32 40)
%2 = tail call i32 @write_nibbles(i32 8)
%3 = tail call i32 @write_nibbles(i32 1)
%4 = tail call i32 @write_nibbles(i32 6)
%5 = tail call i32 @write_nibbles(i32 12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int write(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int i2c_send(int fd, uint8_t *buffer, uint8_t num_bytes) {
  return (write(fd, buffer, num_bytes));
}


x86 assembly (clang, -O0):
<i2c_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_send>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @i2c_send(i32 %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i32* %1, i32 %2)
ret i32 %4
}
void alloc_node_tracker_map(void *pgdat) {}


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

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

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

LLVM IR (-O2):
define void @alloc_node_tracker_map(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_del_entry(struct list_head *);
int /*<<< orphan*/ list_add_tail(struct list_head *, struct list_head *);
__attribute__((always_)) void list_move_tail(struct list_head *list,
                                             struct list_head *head) {
  __list_del_entry(list);
  list_add_tail(list, head);
}


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

x86 assembly (clang, -O2):
<list_move_tail>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <__list_del_entry@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <list_add_tail@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @__list_del_entry(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add_tail(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move_tail(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @__list_del_entry(%struct.list_head* %0)
%4 = tail call i32 @list_add_tail(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t add5(uint8_t x, uint8_t y, uint8_t z, uint8_t w, uint8_t v) {
  return x + y + z + w + v;
}


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

x86 assembly (clang, -O2):
<add5>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
add    %r8,%rax
ret

LLVM IR (-O0):
define i64 @add5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = add nsw i64 %11, %12
%14 = load i64, i64* %8
%15 = add nsw i64 %13, %14
%16 = load i64, i64* %9
%17 = add nsw i64 %15, %16
%18 = load i64, i64* %10
%19 = add nsw i64 %17, %18
ret i64 %19
}

LLVM IR (-O2):
define i64 @add5(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = add nsw i64 %1, %0
%7 = add nsw i64 %6, %2
%8 = add nsw i64 %7, %3
%9 = add nsw i64 %8, %4
ret i64 %9
}
int patch_adbg_CheckSystem(void *h) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @patch_adbg_CheckSystem(i8* nocapture readnone %0) {
ret i32 0
}
const char *gettext(const char *msg) { return msg; }


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

x86 assembly (clang, -O2):
<gettext>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @gettext(i8* readnone returned %0) {
ret i8* %0
}