xunge/DecIR huggingface dataset:
void i2d_X509_CRL(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_CRL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mew_debug_die();
int /*<<< orphan*/ mew_debug_print(char const *);
void mew_debug_die_with_message(const char *message) {
  mew_debug_print(message);
  mew_debug_die();
}


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

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

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

LLVM IR (-O2):
define void @mew_debug_die_with_message(i8* %0) {
%2 = tail call i32 @mew_debug_print(i8* %0)
%3 = tail call i32 (...) @mew_debug_die()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *);
void hwbug(void *hwdesc) { printf("[HARDWARE BUG] %r", hwdesc); }


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

x86 assembly (clang, -O2):
<hwbug>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"[HARDWARE BUG] %r\00"
define void @hwbug(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int /*<<< orphan*/ ASN1_TFLG_NDEF;
int asn1_item_flags_i2d(int /*<<< orphan*/ *, unsigned char **,
                        int /*<<< orphan*/ const *, int /*<<< orphan*/);
int ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,
                       const ASN1_ITEM *it) {
  return asn1_item_flags_i2d(val, out, it, ASN1_TFLG_NDEF);
}


x86 assembly (clang, -O0):
<ASN1_item_ndef_i2d>:
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
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
call   1030 <asn1_item_flags_i2d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_item_ndef_i2d>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <asn1_item_flags_i2d@plt>

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

LLVM IR (-O2):
@ASN1_TFLG_NDEF = global i32 0
define i32 @ASN1_item_ndef_i2d(i32* %0, i8** %1, i32* %2) {
%4 = load i32, i32* @ASN1_TFLG_NDEF
%5 = tail call i32 @asn1_item_flags_i2d(i32* %0, i8** %1, i32* %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ error_exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void perror_exit(int error_num, const char *message) {
  fprintf(stderr, "%s", message);
  error_exit(error_num);
}


x86 assembly (clang, -O0):
<perror_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1030 <error_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perror_exit>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1040 <fprintf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <error_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @perror_exit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @error_exit(i32 %8)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @perror_exit(i32 %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @error_exit(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rfftb1(int, float *, float *, float *, int *);
void rfftb(int n, float r[], float wsave[]) {
  if (n == 1)
    return;
  rfftb1(n, r, wsave, wsave + n, (int *)(wsave + 2 * n));
}


x86 assembly (clang, -O0):
<rfftb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <rfftb+0x22>
jmp    1164 <rfftb+0x54>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%r8
call   1030 <rfftb1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfftb>:
cmp    $0x1,%edi
jne    1116 <rfftb+0x6>
ret
movslq %edi,%rax
lea    (%rdx,%rax,4),%rcx
lea    (%rdi,%rdi,1),%eax
cltq
lea    (%rdx,%rax,4),%r8
jmp    1030 <rfftb1@plt>

LLVM IR (-O0):
define void @rfftb(i32 %0, float* %1, float* %2) {
%4 = alloca i32
%5 = alloca float*
%6 = alloca float*
store i32 %0, i32* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %3
br label %25
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load float*, float** %5
%13 = load float*, float** %6
%14 = load float*, float** %6
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float*, float** %6
%19 = load i32, i32* %4
%20 = mul nsw i32 2, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds float, float* %18, i64 %21
%23 = bitcast float* %22 to i32*
%24 = call i32 @rfftb1(i32 %11, float* %12, float* %13, float* %17, i32* %23)
br label %25
25: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @rfftb(i32 %0, float* %1, float* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds float, float* %2, i64 %6
%8 = shl nsw i32 %0, 1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds float, float* %2, i64 %9
%11 = bitcast float* %10 to i32*
%12 = tail call i32 @rfftb1(i32 %0, float* %1, float* %2, float* %7, i32* %11)
br label %13
13: ; preds = %3, %5
ret void
}
void *array_o_dummy_copy(void *obj) { return obj; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_aspect_frame_set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ o_ld(int);
int /*<<< orphan*/ o_s(char *);
int /*<<< orphan*/ printv(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void faild(char *str, int d) {
  printv("ERR: %% failed with: %%\n", o_s(str), o_ld(d));
  exit(1);
}


x86 assembly (clang, -O0):
<faild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <o_s@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <o_ld@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe91(%rip),%rdi
call   1030 <printv@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<faild>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <o_s@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1050 <o_ld@plt>
lea    0xea6(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printv@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"ERR: %% failed with: %%\0A\00"
define void @faild(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @o_s(i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @o_ld(i32 %7)
%9 = call i32 @printv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"ERR: %% failed with: %%\0A\00"
define void @faild(i8* %0, i32 %1) {
%3 = tail call i32 @o_s(i8* %0)
%4 = tail call i32 @o_ld(i32 %1)
%5 = tail call i32 @printv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void h264nal_set_ref(uint8_t *p_h264nal, uint8_t ref) {
  p_h264nal[3] &= 0x1f;
  p_h264nal[3] |= ref << 5;
}


x86 assembly (clang, -O0):
<h264nal_set_ref>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0x1f,%ecx
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%ecx
shl    $0x5,%ecx
mov    -0x8(%rbp),%rax
or     0xc(%rax),%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264nal_set_ref>:
mov    0xc(%rdi),%eax
and    $0x1f,%eax
shl    $0x5,%esi
or     %eax,%esi
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @h264nal_set_ref(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 = getelementptr inbounds i32, i32* %5, i64 3
%7 = load i32, i32* %6
%8 = and i32 %7, 31
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = shl i32 %9, 5
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 3
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @h264nal_set_ref(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = load i32, i32* %3
%5 = and i32 %4, 31
%6 = shl i32 %1, 5
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Type definitions */
struct external {
  int dummy;
};

/* Variables and functions */
uintptr_t tag_leaf(struct external *n) { return (uintptr_t)n; }


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

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

LLVM IR (-O0):
%struct.external = type { i32 }
define i64 @tag_leaf(%struct.external* %0) {
%2 = alloca %struct.external*
store %struct.external* %0, %struct.external** %2
%3 = load %struct.external*, %struct.external** %2
%4 = ptrtoint %struct.external* %3 to i64
ret i64 %4
}

LLVM IR (-O2):
%struct.external = type { i32 }
define i64 @tag_leaf(%struct.external* %0) {
%2 = ptrtoint %struct.external* %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ ksft_test_result_error(char *);
scalar_t__ setns(int, int);
int switch_ns(int fd) {
  if (setns(fd, 0x00000080))
    return ({
      ksft_test_result_error("setns()"
                             ": %m"
                             "\n");
      -1;
    });
  return 0;
}


x86 assembly (clang, -O0):
<switch_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x80,%esi
call   1030 <setns@plt>
cmp    $0x0,%rax
je     1160 <switch_ns+0x40>
lea    0xeb7(%rip),%rdi
call   1040 <ksft_test_result_error@plt>
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1167 <switch_ns+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_ns>:
push   %rax
mov    $0x80,%esi
call   1030 <setns@plt>
test   %rax,%rax
je     1143 <switch_ns+0x23>
lea    0xec9(%rip),%rdi
call   1040 <ksft_test_result_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"setns(): %m\0A\00"
define i32 @switch_ns(i32 %0) {
%2 = tail call i64 @setns(i32 %0, i32 128)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @ksft_test_result_error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ ft_isalpha(int);
scalar_t__ ft_isdigit(int);
int ft_isalnum(int c) { return (ft_isdigit(c) || ft_isalpha(c)); }


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <ft_isalnum+0x37>
mov    -0x4(%rbp),%edi
call   1040 <ft_isalpha@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
push   %rbx
mov    %edi,%ebx
call   1030 <ft_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <ft_isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <ft_isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ft_isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @ft_isalpha(i32 %7)
%9 = icmp ne 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):
define i32 @ft_isalnum(i32 %0) {
%2 = tail call i64 @ft_isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @ft_isalpha(i32 %0)
%6 = icmp ne 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
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *xstrdup(char const *);
void xstrset(char **dst, const char *str) {
  free(*dst);
  *dst = (str == 0) ? 0 : xstrdup(str);
}


x86 assembly (clang, -O0):
<xstrset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
jne    1152 <xstrset+0x32>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    115f <xstrset+0x3f>
mov    -0x10(%rbp),%rdi
call   1040 <xstrdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrset>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
call   1030 <free@plt>
test   %rbx,%rbx
je     1141 <xstrset+0x21>
mov    %rbx,%rdi
call   1040 <xstrdup@plt>
jmp    1143 <xstrset+0x23>
xor    %eax,%eax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @xstrset(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** %5
%7 = call i32 @free(i8* %6)
%8 = load i8*, i8** %4
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
br label %14
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = call i8* @xstrdup(i8* %12)
br label %14
14: ; preds = %11, %10
%15 = phi i8* [ null, %10 ], [ %13, %11 ]
%16 = load i8**, i8*** %3
store i8* %15, i8** %16
ret void
}

LLVM IR (-O2):
define void @xstrset(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @free(i8* %3)
%5 = icmp eq i8* %1, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i8* @xstrdup(i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ null, %2 ]
store i8* %9, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(int, char);
void kputc(char c) { uart_putc((0x10009000), c); }


x86 assembly (clang, -O0):
<kputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x10009000,%edi
movsbl -0x1(%rbp),%esi
call   1030 <uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kputc>:
mov    %edi,%esi
mov    $0x10009000,%edi
jmp    1030 <uart_putc@plt>

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

LLVM IR (-O2):
define void @kputc(i8 signext %0) {
%2 = tail call i32 @uart_putc(i32 268472320, i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void checkArgument(int argc) {
  if (argc != 2) {
    printf("Argument error\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<checkArgument>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     114b <checkArgument+0x2b>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkArgument>:
cmp    $0x2,%edi
jne    1126 <checkArgument+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Argument error\0A\00"
define void @checkArgument(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Argument error\00"
define void @checkArgument(i32 %0) {
%2 = icmp eq i32 %0, 2
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *cmio_fl2c(const double x __attribute__((unused))) {
  fputs("cmio_fl2c not implemented.\n", stderr);
  return NULL;
}


x86 assembly (clang, -O0):
<cmio_fl2c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
lea    0xed3(%rip),%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmio_fl2c>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"cmio_fl2c not implemented.\0A\00"
@stderr = global i32 0
define i8* @cmio_fl2c(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}

LLVM IR (-O2):
@.str = [28 x i8] c"cmio_fl2c not implemented.\0A\00"
@stderr = global i32 0
define noalias i8* @cmio_fl2c(double %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* null
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t load32(const void *in) {
  const uint8_t *p = (const uint8_t *)in;
  return ((uint32_t)p[0] << 0) | ((uint32_t)p[1] << 8) |
         ((uint32_t)p[2] << 16) | ((uint32_t)p[3] << 24);
}


x86 assembly (clang, -O0):
<load32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load32>:
mov    0x8(%rdi),%ecx
mov    0x10(%rdi),%edx
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%edx
mov    0x18(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @load32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 8
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 8
%10 = or i32 %9, %4
%11 = getelementptr inbounds i8, i8* %0, i64 16
%12 = bitcast i8* %11 to i64*
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 16
%16 = or i32 %10, %15
%17 = getelementptr inbounds i8, i8* %0, i64 24
%18 = bitcast i8* %17 to i64*
%19 = load i64, i64* %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 24
%22 = or i32 %16, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main(void) {
  f(5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 5)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
__attribute__((regparm(0)))
wchar_t *(_win_wcscat)(wchar_t *dest, const wchar_t *src) {
  wchar_t *d;
  d = dest;
  while (*d)
    d++;
  while ((*d++ = *src++))
    ;
  return dest;
}


x86 assembly (clang, -O0):
<_win_wcscat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1133 <_win_wcscat+0x33>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <_win_wcscat+0x14>
jmp    1138 <_win_wcscat+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x8,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     116b <_win_wcscat+0x6b>
jmp    1138 <_win_wcscat+0x38>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_win_wcscat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpq   $0x0,(%rcx)
lea    0x8(%rcx),%rcx
jne    1110 <_win_wcscat+0x10>
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rsi,%rdx,1),%rdi
mov    %rdi,-0x8(%rcx,%rdx,1)
add    $0x8,%rdx
test   %rdi,%rdi
jne    1120 <_win_wcscat+0x20>
ret

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

LLVM IR (-O2):
define i64* @_win_wcscat(i64* returned %0, i64* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64* [ %0, %2 ], [ %7, %3 ]
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i64, i64* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i64* [ %11, %8 ], [ %1, %3 ]
%10 = phi i64* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i64, i64* %9, i64 1
%12 = load i64, i64* %9
%13 = getelementptr inbounds i64, i64* %10, i64 1
store i64 %12, i64* %10
%14 = icmp eq i64 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i64* %0
}
int main(argc, argv)
int argc;
char **argv;
{
  1 ? 0 : debug_never(1, "Start");
  growheap(0);
  syminit();
  etreeinit();
  ifinit();
  predefine();
  openio(argc, argv);
  codeinit();
  typeinit();
  program();
  finishup();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   10b0 <growheap@plt>
mov    $0x0,%al
call   1060 <syminit@plt>
mov    $0x0,%al
call   1030 <etreeinit@plt>
mov    $0x0,%al
call   1090 <ifinit@plt>
mov    $0x0,%al
call   10c0 <predefine@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <openio@plt>
mov    $0x0,%al
call   1050 <codeinit@plt>
mov    $0x0,%al
call   10a0 <typeinit@plt>
mov    $0x0,%al
call   1080 <program@plt>
mov    $0x0,%al
call   1070 <finishup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
xor    %eax,%eax
call   10b0 <growheap@plt>
xor    %eax,%eax
call   1060 <syminit@plt>
xor    %eax,%eax
call   1030 <etreeinit@plt>
xor    %eax,%eax
call   1090 <ifinit@plt>
xor    %eax,%eax
call   10c0 <predefine@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <openio@plt>
xor    %eax,%eax
call   1050 <codeinit@plt>
xor    %eax,%eax
call   10a0 <typeinit@plt>
xor    %eax,%eax
call   1080 <program@plt>
xor    %eax,%eax
call   1070 <finishup@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i32, ...) bitcast (i32 (...)* @growheap to i32 (i32, ...)*)(i32 0)
%7 = call i32 (...) @syminit()
%8 = call i32 (...) @etreeinit()
%9 = call i32 (...) @ifinit()
%10 = call i32 (...) @predefine()
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @openio to i32 (i32, i8**, ...)*)(i32 %11, i8** %12)
%14 = call i32 (...) @codeinit()
%15 = call i32 (...) @typeinit()
%16 = call i32 (...) @program()
%17 = call i32 (...) @finishup()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @growheap to i32 (i32, ...)*)(i32 0)
%4 = tail call i32 (...) @syminit()
%5 = tail call i32 (...) @etreeinit()
%6 = tail call i32 (...) @ifinit()
%7 = tail call i32 (...) @predefine()
%8 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @openio to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%9 = tail call i32 (...) @codeinit()
%10 = tail call i32 (...) @typeinit()
%11 = tail call i32 (...) @program()
%12 = tail call i32 (...) @finishup()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eee();
void fff() { eee(); }


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

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

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

LLVM IR (-O2):
define void @fff() {
%1 = tail call i32 (...) @eee()
ret void
}
void ERR_peek_error_line(void) {}


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

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

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

LLVM IR (-O2):
define void @ERR_peek_error_line() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_ParameterMustHaveHighLevelType(long p_position) {
  _Error(p_position, "Inappropriate type for parameter");
}


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

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

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

LLVM IR (-O2):
@.str = [33 x i8] c"Inappropriate type for parameter\00"
define void @Error_ParameterMustHaveHighLevelType(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_error(char *, unsigned long long const,
                               unsigned long long const);
int values_not_equal_display_error(const unsigned long long left,
                                   const unsigned long long right) {
  const int not_equal = left != right;
  if (!not_equal) {
    print_error("                "
                "%llx"
                " == "
                "%llx"
                "\n",
                left, right);
  }
  return not_equal;
}


x86 assembly (clang, -O0):
<values_not_equal_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1151 <values_not_equal_display_error+0x41>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb4(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<values_not_equal_display_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmp    %rsi,%rdi
jne    1131 <values_not_equal_display_error+0x21>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
call   1030 <print_error@plt>
xor    %eax,%eax
cmp    %r14,%rbx
setne  %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [30 x i8] c" %llx == %llx\0A\00"
define i32 @values_not_equal_display_error(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = icmp ne i64 %6, %7
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = call i32 @print_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %14)
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [30 x i8] c" %llx == %llx\0A\00"
define i32 @values_not_equal_display_error(i64 %0, i64 %1) {
%3 = icmp ne i64 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @print_error(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %0)
br label %6
6: ; preds = %4, %2
%7 = zext i1 %3 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ se_search_tests();
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  fprintf(stderr, "\n");
  se_search_tests();
  fprintf(stderr, "\n");
  return (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <se_search_tests@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%edi
lea    0xecb(%rip),%rbx
mov    %rbx,%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <se_search_tests@plt>
mov    (%r14),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @se_search_tests()
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @se_search_tests()
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
unsigned long long initHeap() {
  unsigned long long new_space = 0x0;
  asm volatile("mov $4096, %edx");
  asm volatile("mov $10, %eax");
  asm volatile("syscall");
  asm volatile("nop" : "=d"(new_space));
  return new_space;
}


x86 assembly (clang, -O0):
<initHeap>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    $0x1000,%edx
mov    $0xa,%eax
syscall
nop
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<initHeap>:
mov    $0x1000,%edx
mov    $0xa,%eax
syscall
nop
mov    %rdx,%rax
ret

LLVM IR (-O0):
define i64 @initHeap() {
%1 = alloca i64
store i64 0, i64* %1
%2 = call i64 asm sideeffect "nop", "={dx},~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @initHeap() {
tail call void asm sideeffect "mov $$4096, %edx", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "mov $$10, %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "syscall", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i64 asm sideeffect "nop", "={dx},~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
/* Variables and functions */
scalar_t__ isupper(char);
int isVariable(char x) {
  if (isupper(x))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isVariable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113d <isVariable+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <isVariable+0x34>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isVariable>:
push   %rax
call   1030 <isupper@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isVariable(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isupper(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @isVariable(i8 signext %0) {
%2 = tail call i64 @isupper(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int tiger_eq_string_string(char *s1, char *s2) {
  return (strcmp(s1, s2) == 0 ? 1 : 0);
}


x86 assembly (clang, -O0):
<tiger_eq_string_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiger_eq_string_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tiger_eq_string_string(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @tiger_eq_string_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ PAC9685PwmOn();
void pwmOn() { PAC9685PwmOn(); }


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

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

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

LLVM IR (-O2):
define void @pwmOn() {
%1 = tail call i32 (...) @PAC9685PwmOn()
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ close(int);
int open(char *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  close(1);
  int fd = open("tmp", O_RDWR | O_CREAT, 0644);
  printf("fd:%d\n", fd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <close@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
mov    0x2e9f(%rip),%rax
or     (%rax),%esi
lea    0xe9e(%rip),%rdi
mov    $0x1a4,%edx
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <close@plt>
mov    0x2e9e(%rip),%rax
mov    0x2eaf(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xeac(%rip),%rdi
mov    $0x1a4,%edx
call   1050 <open@plt>
lea    0xe9f(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"tmp\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str.1 = [7 x i8] c"fd:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @close(i32 1)
%4 = load i32, i32* @O_RDWR
%5 = load i32, i32* @O_CREAT
%6 = or i32 %4, %5
%7 = call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6, i32 420)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"tmp\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
@.str.1 = [7 x i8] c"fd:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @close(i32 1)
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_CREAT
%4 = or i32 %3, %2
%5 = tail call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4, i32 420)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int funci() { return 1; }


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

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

LLVM IR (-O0):
define i32 @funci() {
ret i32 1
}

LLVM IR (-O2):
define i32 @funci() {
ret i32 1
}
void joystickb_report_driver_all(char *s, unsigned size) { *s = 0; }


x86 assembly (clang, -O0):
<joystickb_report_driver_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<joystickb_report_driver_all>:
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @joystickb_report_driver_all(i8* nocapture writeonly %0, i32 %1) {
store i8 0, i8* %0
ret void
}
__attribute__((__pure__)) const char *getqzname(const char *strp,
                                                const int delim) {
  int c;
  while ((c = *strp) != '\0' && c != delim)
    ++strp;
  return strp;
}


x86 assembly (clang, -O0):
<getqzname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    %ecx,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     112f <getqzname+0x2f>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    113f <getqzname+0x3f>
jmp    1150 <getqzname+0x50>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <getqzname+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getqzname>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <getqzname+0x20>
cmp    %esi,%ecx
jne    1110 <getqzname+0x10>
ret

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

LLVM IR (-O2):
define i8* @getqzname(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i8 %5, 0
%8 = icmp ne i32 %6, %1
%9 = and i1 %7, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %3, label %11
11: ; preds = %3
ret i8* %4
}
struct work *wqueue_add_work(const struct work *w) {}


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

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

LLVM IR (-O0):
%struct.work = type opaque
define %struct.work* @wqueue_add_work(%struct.work* %0) {
%2 = alloca %struct.work*
%3 = alloca %struct.work*
store %struct.work* %0, %struct.work** %3
%4 = load %struct.work*, %struct.work** %2
ret %struct.work* %4
}

LLVM IR (-O2):
%struct.work = type opaque
define noalias %struct.work* @wqueue_add_work(%struct.work* nocapture readnone %0) {
ret %struct.work* undef
}
long double fabsl(long double x) {
  __asm__("fabs" : "+t"(x));
  return x;
}


x86 assembly (clang, -O0):
<fabsl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fabs
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabsl>:
fldt   0x8(%rsp)
fabs
ret

LLVM IR (-O0):
define x86_fp80 @fabsl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 asm "fabs", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %3)
store x86_fp80 %4, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @fabsl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm "fabs", "={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int f124(int *);
int f125(int *p) { return f124(p); }


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

x86 assembly (clang, -O2):
<f125>:
jmp    1030 <f124@plt>

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

LLVM IR (-O2):
define i32 @f125(i32* %0) {
%2 = tail call i32 @f124(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _SCOTCHintRandReset();
void SCOTCH_randomReset() { _SCOTCHintRandReset(); }


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

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

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

LLVM IR (-O2):
define void @SCOTCH_randomReset() {
%1 = tail call i32 (...) @_SCOTCHintRandReset()
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
pid_t __getpid(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @__getpid() {
ret i32 1
}

LLVM IR (-O2):
define i32 @__getpid() {
ret i32 1
}
void XAllocSizeHints() {}


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

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

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

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