xunge/DecIR huggingface dataset:
int sm_header_sequence_convert(char *cmd_header, int num) {
  int i = 0;
  char *p_int;
  p_int = cmd_header;
  while (i < num) {
    sequence_convert_int(p_int);
    p_int += 4;
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<sm_header_sequence_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <sm_header_sequence_convert+0x4f>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <sequence_convert_int@plt>
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <sm_header_sequence_convert+0x1e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sm_header_sequence_convert>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    1133 <sm_header_sequence_convert+0x23>
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <sequence_convert_int@plt>
add    $0x4,%rbx
add    $0xffffffff,%ebp
jne    1120 <sm_header_sequence_convert+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @sm_header_sequence_convert(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = phi i32 [ %9, %4 ], [ 0, %2 ]
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @sequence_convert_int to i32 (i8*, ...)*)(i8* %5)
%8 = getelementptr inbounds i8, i8* %5, i64 4
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, %1
br i1 %10, label %11, label %4
11: ; preds = %4, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int mode(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int array[] = {65, 84, 95, 75, 82, 79, 82, 72, 84, 94, 86, 90, 84};
  int nArray = sizeof(array) / sizeof(array[0]);
  printf("Mode is %d.\n", mode(array, nArray));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
movl   $0xd,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1050 <mode@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xd,%esi
call   1040 <mode@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [13 x i32] [i32 65, i32 84, i32 95, i32 75, i32 82, i32 79, i32 82, i32 72, i32 84, i32 94, i32 86, i32 90, i32 84]
@.str = [13 x i8] c"Mode is %d.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [13 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [13 x i32]* %6 to i8*
store i32 13, i32* %7
%9 = getelementptr inbounds [13 x i32], [13 x i32]* %6, i64 0, i64 0
%10 = load i32, i32* %7
%11 = call i32 @mode(i32* %9, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [13 x i32] [i32 65, i32 84, i32 95, i32 75, i32 82, i32 79, i32 82, i32 72, i32 84, i32 94, i32 86, i32 90, i32 84]
@.str = [13 x i8] c"Mode is %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x i32]
%4 = bitcast [13 x i32]* %3 to i8*
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 0
%6 = call i32 @mode(i32* %5, i32 13)
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
int main() {
  int c, b;
  c / b;
  unsigned a, d;
  a / d;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sdiv i32 %6, %7
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = udiv i32 %9, %10
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void die(char *reason) {
  fprintf(stderr, reason);
  fflush(stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rdi,%rsi
mov    0x2ea5(%rip),%rbx
mov    (%rbx),%edi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;
typedef int lrr;

/* Variables and functions */
void rtcp_xr_dlrr_set_lrr(uint8_t *p_rtcp_xr_dlrr, uint32_t lrr) {
  p_rtcp_xr_dlrr[8] = (lrr >> 24) & 0xff;
  p_rtcp_xr_dlrr[9] = (lrr >> 16) & 0xff;
  p_rtcp_xr_dlrr[10] = (lrr >> 8) & 0xff;
  p_rtcp_xr_dlrr[11] = (lrr)&0xff;
}


x86 assembly (clang, -O0):
<rtcp_xr_dlrr_set_lrr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtcp_xr_dlrr_set_lrr>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,0x20(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x24(%rdi)
mov    %edx,0x28(%rdi)
mov    %esi,0x2c(%rdi)
ret

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

LLVM IR (-O2):
define void @rtcp_xr_dlrr_set_lrr(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %3, i32* %4
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %6, i32* %7
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 10
store i32 %9, i32* %10
%11 = and i32 %1, 255
%12 = getelementptr inbounds i32, i32* %0, i64 11
store i32 %11, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libws_test_HEADLINE(char *);
int TEST_ws_get_uri(int argc, char **argv) {
  libws_test_HEADLINE("TEST_ws_get_uri");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"TEST_ws_get_uri\00"
define i32 @TEST_ws_get_uri(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @libws_test_HEADLINE(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"TEST_ws_get_uri\00"
define i32 @TEST_ws_get_uri(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @libws_test_HEADLINE(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned int get_dec_len(unsigned int num) {
  unsigned int ret;
  for (ret = 0; (num /= 10) != 0; ret++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<get_dec_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1139 <get_dec_len+0x39>
jmp    112b <get_dec_len+0x2b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <get_dec_len+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dec_len>:
xor    %eax,%eax
cmp    $0xa,%edi
jb     1124 <get_dec_len+0x24>
xor    %eax,%eax
mov    $0xcccccccd,%ecx
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1110 <get_dec_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_dec_len(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add i32 %4, 1
%8 = icmp ult i32 %5, 100
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels16uc(int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/,
                                          int /*<<< orphan*/, int);
void bfin_put_pixels16_y2(uint8_t *block, const uint8_t *pixels,
                          ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels16uc(block, pixels, pixels + line_size, line_size,
                         line_size, h);
}


x86 assembly (clang, -O0):
<bfin_put_pixels16_y2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <ff_bfin_put_pixels16uc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfin_put_pixels16_y2>:
mov    %ecx,%r9d
movslq %edx,%rcx
lea    (%rsi,%rcx,4),%rdx
mov    %ecx,%r8d
jmp    1030 <ff_bfin_put_pixels16uc@plt>

LLVM IR (-O0):
define void @bfin_put_pixels16_y2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %7
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @ff_bfin_put_pixels16uc(i32* %9, i32* %10, i32* %14, i32 %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @bfin_put_pixels16_y2(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %1, i64 %5
%7 = tail call i32 @ff_bfin_put_pixels16uc(i32* %0, i32* %1, i32* %6, i32 %2, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
scalar_t__ size_multiply_overflow(size_t, size_t);
__attribute__((alloc_size(2, 3))) void *reallocarray(void *p, size_t need,
                                                     size_t size) {
  if (size_multiply_overflow(size, need))
    return NULL;
  return realloc(p, size * need);
}


x86 assembly (clang, -O0):
<reallocarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <size_multiply_overflow@plt>
cmp    $0x0,%rax
je     1158 <reallocarray+0x38>
movq   $0x0,-0x8(%rbp)
jmp    116e <reallocarray+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
imul   -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocarray>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <size_multiply_overflow@plt>
test   %rax,%rax
je     1143 <reallocarray+0x23>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
imul   %r15,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <realloc@plt>

LLVM IR (-O0):
define i8* @reallocarray(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %7
%9 = load i64, i64* %6
%10 = call i64 @size_multiply_overflow(i64 %8, i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %3
store i8* null, i8** %4
br label %19
13: ; preds = %3
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = load i64, i64* %6
%17 = mul i64 %15, %16
%18 = call i8* @realloc(i8* %14, i64 %17)
store i8* %18, i8** %4
br label %19
19: ; preds = %13, %12
%20 = load i8*, i8** %4
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @reallocarray(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i64 @size_multiply_overflow(i64 %2, i64 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = mul i64 %2, %1
%8 = tail call i8* @realloc(i8* %0, i64 %7)
br label %9
9: ; preds = %3, %6
%10 = phi i8* [ %8, %6 ], [ null, %3 ]
ret i8* %10
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, int);
int /*<<< orphan*/ stderr;
char *strerror(int);
scalar_t__ unlink(char *);
void remove_pid_file(char *pid_file) {
  if (unlink(pid_file) < 0) {
    fprintf(stderr, "Couldn't unlink %s: %s (%d)\n", pid_file, strerror(errno),
            errno);
  }
}


x86 assembly (clang, -O0):
<remove_pid_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
cmp    $0x0,%rax
jge    1191 <remove_pid_file+0x61>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
mov    0x2e56(%rip),%rax
mov    (%rax),%r8d
lea    0xe74(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_pid_file>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <unlink@plt>
test   %rax,%rax
js     1146 <remove_pid_file+0x16>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x2e93(%rip),%rax
mov    (%rax),%ebp
mov    0x2e82(%rip),%r14
mov    (%r14),%edi
call   1050 <strerror@plt>
mov    (%r14),%r8d
lea    0xe98(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Couldn't unlink %s: %s (%d)\0A\00"
@errno = global i32 0
define void @remove_pid_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @unlink(i8* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %2
%9 = load i32, i32* @errno
%10 = call i8* @strerror(i32 %9)
%11 = load i32, i32* @errno
%12 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %10, i32 %11)
br label %13
13: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Couldn't unlink %s: %s (%d)\0A\00"
@errno = global i32 0
define void @remove_pid_file(i8* %0) {
%2 = tail call i64 @unlink(i8* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = load i32, i32* @errno
%7 = tail call i8* @strerror(i32 %6)
%8 = load i32, i32* @errno
%9 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %7, i32 %8)
br label %10
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("usage: csv2f64 <input.csv> <output.data>\n"); }


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"usage: csv2f64 <input.csv> <output.data>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [41 x i8] c"usage: csv2f64 <input.csv> <output.data>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int CHAR_BIT;
char unpack_char(int stored_integer, int byte_to_get) {
  int size = byte_to_get * CHAR_BIT;
  unsigned mask = 255;
  mask <<= size;
  return ((stored_integer & mask) >> size);
}


x86 assembly (clang, -O0):
<unpack_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2ecc(%rip),%rcx
imul   (%rcx),%eax
mov    %eax,-0xc(%rbp)
movl   $0xff,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shr    %cl,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_char>:
mov    %esi,%ecx
mov    0x2ed7(%rip),%rax
imul   (%rax),%ecx
mov    $0xff,%eax
shl    %cl,%eax
and    %edi,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define signext i8 @unpack_char(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* @CHAR_BIT
%9 = mul nsw i32 %7, %8
store i32 %9, i32* %5
store i32 255, i32* %6
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = shl i32 %11, %10
store i32 %12, i32* %6
%13 = load i32, i32* %3
%14 = load i32, i32* %6
%15 = and i32 %13, %14
%16 = load i32, i32* %5
%17 = lshr i32 %15, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define signext i8 @unpack_char(i32 %0, i32 %1) {
%3 = load i32, i32* @CHAR_BIT
%4 = mul nsw i32 %3, %1
%5 = shl i32 255, %4
%6 = and i32 %5, %0
%7 = lshr i32 %6, %4
%8 = trunc i32 %7 to i8
ret i8 %8
}
void XSharpPCFDestroyImage(void *image) {}


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

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

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

LLVM IR (-O2):
define void @XSharpPCFDestroyImage(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct signalfd_siginfo {
  scalar_t__ ssi_signo;
};
typedef int ssize_t;

/* Variables and functions */
scalar_t__ SIGWINCH;
int read(int, struct signalfd_siginfo *, int);
int /*<<< orphan*/ set_display_nr_hdrs();
void do_winch(int fd) {
  struct signalfd_siginfo fdsi;
  ssize_t s;
  s = read(fd, &fdsi, sizeof(struct signalfd_siginfo));
  if (s != sizeof(struct signalfd_siginfo))
    return;
  if (fdsi.ssi_signo != SIGWINCH)
    return;
  set_display_nr_hdrs();
}


x86 assembly (clang, -O0):
<do_winch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1040 <read@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x8,%rax
je     1152 <do_winch+0x32>
jmp    1172 <do_winch+0x52>
mov    -0x10(%rbp),%rax
mov    0x2e8b(%rip),%rcx
cmp    (%rcx),%rax
je     116b <do_winch+0x4b>
jmp    1172 <do_winch+0x52>
mov    $0x0,%al
call   1030 <set_display_nr_hdrs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_winch>:
push   %rax
mov    %rsp,%rsi
mov    $0x8,%edx
call   1040 <read@plt>
cmp    $0x8,%eax
jne    114b <do_winch+0x2b>
mov    (%rsp),%rax
mov    0x2eaa(%rip),%rcx
cmp    (%rcx),%rax
jne    114b <do_winch+0x2b>
xor    %eax,%eax
pop    %rcx
jmp    1030 <set_display_nr_hdrs@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.signalfd_siginfo = type { i64 }
@SIGWINCH = global i64 0
define void @do_winch(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.signalfd_siginfo
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @read(i32 %5, %struct.signalfd_siginfo* %3, i32 8)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp ne i64 %8, 8
br i1 %9, label %10, label %11
10: ; preds = %1
br label %19
11: ; preds = %1
%12 = getelementptr inbounds %struct.signalfd_siginfo, %struct.signalfd_siginfo* %3, i32 0, i32 0
%13 = load i64, i64* %12
%14 = load i64, i64* @SIGWINCH
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %11
br label %19
17: ; preds = %11
%18 = call i32 (...) @set_display_nr_hdrs()
br label %19
19: ; preds = %17, %16, %10
ret void
}

LLVM IR (-O2):
%struct.signalfd_siginfo = type { i64 }
@SIGWINCH = global i64 0
define void @do_winch(i32 %0) {
%2 = alloca %struct.signalfd_siginfo
%3 = bitcast %struct.signalfd_siginfo* %2 to i8*
%4 = call i32 @read(i32 %0, %struct.signalfd_siginfo* %2, i32 8)
%5 = icmp eq i32 %4, 8
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = getelementptr inbounds %struct.signalfd_siginfo, %struct.signalfd_siginfo* %2, i64 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* @SIGWINCH
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = tail call i32 (...) @set_display_nr_hdrs()
br label %13
13: ; preds = %6, %1, %11
ret void
}
/* Variables and functions */
int bar(int);
int foo(int a, int b) { return (bar(a) - b); }


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

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %esi,%ebx
call   1030 <bar@plt>
sub    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(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 = call i32 @bar(i32 %5)
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = tail call i32 @bar(i32 %0)
%4 = sub nsw i32 %3, %1
ret i32 %4
}
void inc_zcache_pers_zpages(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_pers_zpages() {
ret void
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ __lock;
};
struct TYPE_5__ {
  TYPE_1__ __data;
};
typedef TYPE_2__ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock_noassert(pthread_mutex_t *mutex) {
__ESBMC_HIDE:
  ((*mutex).__data.__lock) = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pthread_mutex_unlock_noassert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_mutex_unlock_noassert>:
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64 }
define i32 @pthread_mutex_unlock_noassert(%struct.TYPE_5__* %0) {
%2 = alloca %struct.TYPE_5__*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %2
br label %3
3: ; preds = %1
%4 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%5 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
store i64 0, i64* %6
ret i32 0
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64 }
define i32 @pthread_mutex_unlock_noassert(%struct.TYPE_5__* nocapture writeonly %0) {
%2 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 0
store i64 0, i64* %2
ret i32 0
}
void av_add_index_entry() {}


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

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

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

LLVM IR (-O2):
define void @av_add_index_entry() {
ret void
}
int test_dequeueing() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @test_dequeueing() {
ret i32 1
}
double identity(const double x) { return x; }


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

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

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

LLVM IR (-O2):
define double @identity(double returned %0) {
ret double %0
}
/* Variables and functions */
char *xstrdup(char *);
char *cf_string(char *val) { return xstrdup(val); }


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

x86 assembly (clang, -O2):
<cf_string>:
jmp    1030 <xstrdup@plt>

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

LLVM IR (-O2):
define i8* @cf_string(i8* %0) {
%2 = tail call i8* @xstrdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ hex2str(char *, char *, int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ memfrob(char *, int);
int strlen(char *);
char *unfrobstr(char *src) {
  int slen = strlen(src) / 2;
  char *retval = (char *)malloc(slen + 1);
  hex2str(retval, src, 0);
  memfrob(retval, slen);
  return (retval);
}


x86 assembly (clang, -O0):
<unfrobstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1060 <hex2str@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <memfrob@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unfrobstr>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
lea    0x1(%rbx),%edi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1060 <hex2str@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <memfrob@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @unfrobstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sdiv i32 %6, 2
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
%10 = call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %2
%14 = call i32 @hex2str(i8* %12, i8* %13, i32 0)
%15 = load i8*, i8** %4
%16 = load i32, i32* %3
%17 = call i32 @memfrob(i8* %15, i32 %16)
%18 = load i8*, i8** %4
ret i8* %18
}

LLVM IR (-O2):
define i8* @unfrobstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sdiv i32 %2, 2
%4 = add nsw i32 %3, 1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @hex2str(i8* %6, i8* %0, i32 0)
%8 = tail call i32 @memfrob(i8* %6, i32 %3)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void printchar(unsigned char *c) { printf("%c", *c); }


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

x86 assembly (clang, -O2):
<printchar>:
movzbl (%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printchar(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ circular_queue_push(unsigned char);
unsigned char inb(int);
void keyboard_irq(void) {
  static int extended_key = 0;
  unsigned char scancode;
  scancode = inb(0x60);
  if (scancode == 224) {
    extended_key = 0x80;
    return;
  } else if ((scancode & 0x80) == 0) {
    circular_queue_push(scancode | extended_key);
  }
  extended_key = 0;
}


x86 assembly (clang, -O0):
<keyboard_irq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60,%edi
call   1030 <inb@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xe0,%eax
jne    1153 <keyboard_irq+0x33>
movl   $0x80,0x2ee6(%rip)
jmp    1186 <keyboard_irq+0x66>
movzbl -0x1(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1177 <keyboard_irq+0x57>
movzbl -0x1(%rbp),%eax
or     0x2ec5(%rip),%eax
movzbl %al,%edi
call   1040 <circular_queue_push@plt>
jmp    117c <keyboard_irq+0x5c>
movl   $0x0,0x2eae(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard_irq>:
push   %rbx
mov    $0x60,%edi
call   1030 <inb@plt>
mov    %eax,%ebx
test   %al,%al
js     1144 <keyboard_irq+0x24>
mov    0x2efd(%rip),%al
shl    $0x7,%al
or     %bl,%al
movzbl %al,%edi
call   1040 <circular_queue_push@plt>
cmp    $0xe0,%bl
sete   0x2ee6(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@keyboard_irq.extended_key = internal global i32 0
define void @keyboard_irq() {
%1 = alloca i8
%2 = call zeroext i8 @inb(i32 96)
store i8 %2, i8* %1
%3 = load i8, i8* %1
%4 = zext i8 %3 to i32
%5 = icmp eq i32 %4, 224
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 128, i32* @keyboard_irq.extended_key
br label %21
7: ; preds = %0
%8 = load i8, i8* %1
%9 = zext i8 %8 to i32
%10 = and i32 %9, 128
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = load i8, i8* %1
%14 = zext i8 %13 to i32
%15 = load i32, i32* @keyboard_irq.extended_key
%16 = or i32 %14, %15
%17 = trunc i32 %16 to i8
%18 = call i32 @circular_queue_push(i8 zeroext %17)
br label %19
19: ; preds = %12, %7
br label %20
20: ; preds = %19
store i32 0, i32* @keyboard_irq.extended_key
br label %21
21: ; preds = %20, %6
ret void
}

LLVM IR (-O2):
@keyboard_irq.extended_key = internal unnamed_addr global i1 false
define void @keyboard_irq() {
%1 = tail call zeroext i8 @inb(i32 96)
%2 = icmp sgt i8 %1, -1
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = load i1, i1* @keyboard_irq.extended_key
%5 = select i1 %4, i8 -128, i8 0
%6 = or i8 %5, %1
%7 = tail call i32 @circular_queue_push(i8 zeroext %6)
br label %8
8: ; preds = %3, %0
%9 = icmp eq i8 %1, -32
store i1 %9, i1* @keyboard_irq.extended_key
ret void
}
mvdnwind(f, n) int f, n;
{ return (mvupwind(f, -n)); }


x86 assembly (clang, -O0):
<mvdnwind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
mov    $0x0,%al
call   1030 <mvupwind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvdnwind>:
neg    %esi
xor    %eax,%eax
jmp    1030 <mvupwind@plt>

LLVM IR (-O0):
define i32 @mvdnwind(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 0, %6
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @mvupwind to i32 (i32, i32, ...)*)(i32 %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @mvdnwind(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @mvupwind to i32 (i32, i32, ...)*)(i32 %0, i32 %3)
ret i32 %4
}
/* Variables and functions */
int symlinkat(char const *, int, char const *);
__attribute__((__weak__, __always___)) int
softboundmpx_symlinkat(const char *oldpath, int newdirfd, const char *newpath) {
  return symlinkat(oldpath, newdirfd, newpath);
}


x86 assembly (clang, -O0):
<softboundmpx_symlinkat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <symlinkat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx_symlinkat>:
jmp    1030 <symlinkat@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_symlinkat(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @symlinkat(i8* %0, i32 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ is_tag_name(char const);
char *skip_tag_name(const char *s, int sz) {
  while (sz > 0 && is_tag_name(*s)) {
    s++;
    sz--;
  }
  return (char *)s;
}


x86 assembly (clang, -O0):
<skip_tag_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    1144 <skip_tag_name+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_tag_name@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1154 <skip_tag_name+0x44>
jmp    116e <skip_tag_name+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <skip_tag_name+0xf>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_tag_name>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %esi,%esi
jle    1139 <skip_tag_name+0x29>
mov    %esi,%ebp
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
call   1030 <is_tag_name@plt>
test   %rax,%rax
je     1139 <skip_tag_name+0x29>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1120 <skip_tag_name+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @skip_tag_name(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %10
%5 = phi i32 [ %12, %10 ], [ %1, %2 ]
%6 = phi i8* [ %11, %10 ], [ %0, %2 ]
%7 = load i8, i8* %6
%8 = tail call i64 @is_tag_name(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nsw i32 %5, -1
%13 = icmp sgt i32 %5, 1
br i1 %13, label %4, label %14
14: ; preds = %4, %10, %2
%15 = phi i8* [ %0, %2 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
/* Variables and functions */
void *_p_alloc(int);
int /*<<< orphan*/ _p_alloc_free(void *);
int /*<<< orphan*/ b_copyl(void *, int, void *);
void *alloc_re(void *x, int m, int n) {
  void *y = _p_alloc(n);
  if (!y)
    return NULL;
  b_copyl(y, m, x);
  _p_alloc_free(x);
  return y;
}


x86 assembly (clang, -O0):
<alloc_re>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1030 <_p_alloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1166 <alloc_re+0x36>
movq   $0x0,-0x8(%rbp)
jmp    1187 <alloc_re+0x57>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <b_copyl@plt>
mov    -0x10(%rbp),%rdi
call   1050 <_p_alloc_free@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_re>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %edx,%edi
call   1030 <_p_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115d <alloc_re+0x2d>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1040 <b_copyl@plt>
mov    %r14,%rdi
call   1050 <_p_alloc_free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @alloc_re(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @_p_alloc(i32 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @b_copyl(i8* %4, i32 %1, i8* %0)
%8 = tail call i32 @_p_alloc_free(i8* %0)
br label %9
9: ; preds = %3, %6
ret i8* %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_close_solution_output_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(138, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<solcon_close_solution_output_file>:
mov    $0x8a,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @solcon_close_solution_output_file() {
%1 = tail call i32 @_ada_use_c2phc(i32 138, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ wprintf(char *, ...);
int main() {
  setlocale(LC_ALL, "");
  wchar_t wt = L'张';
  wprintf(L"%c\n", wt);
  wchar_t wts[] = L"哈哈哈";
  wprintf(L"%s\n", wts);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <setlocale@plt>
movl   $0x5f20,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <setlocale@plt>
lea    0xec4(%rip),%rdi
mov    $0x5f20,%esi
xor    %eax,%eax
call   1030 <wprintf@plt>
movaps 0xedd(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeb6(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <wprintf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i32] [i32 37, i32 99, i32 10, i32 0]
@__const.main.wts = [4 x i32] [i32 21704, i32 21704, i32 21704, i32 0]
@.str.2 = [4 x i32] [i32 37, i32 115, i32 10, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i32]
store i32 0, i32* %1
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 24352, i32* %2
%6 = load i32, i32* %2
%7 = call i32 (i8*, ...) @wprintf(i8* bitcast ([4 x i32]* @.str.1 to i8*), i32 %6)
%8 = bitcast [4 x i32]* %3 to i8*
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @wprintf(i8* bitcast ([4 x i32]* @.str.2 to i8*), i32* %9)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [4 x i32] [i32 37, i32 99, i32 10, i32 0]
@__const.main.wts = [4 x i32] [i32 21704, i32 21704, i32 21704, i32 0]
@.str.2 = [4 x i32] [i32 37, i32 115, i32 10, i32 0]
define i32 @main() {
%1 = alloca [4 x i32]
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([4 x i32]* @.str.1 to i8*), i32 24352)
%5 = bitcast [4 x i32]* %1 to i8*
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%7 = call i32 (i8*, ...) @wprintf(i8* bitcast ([4 x i32]* @.str.2 to i8*), i32* %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_ss(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_load_ss(float *);
int /*<<< orphan*/ _mm_store_ss(float *, int /*<<< orphan*/);
uint32_t determ_add_float(uint32_t a, uint32_t b) {
  uint32_t r;
  _mm_store_ss((float *)&r,
               _mm_add_ss(_mm_load_ss((float *)&a), _mm_load_ss((float *)&b)));
  return r;
}


x86 assembly (clang, -O0):
<determ_add_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x4(%rbp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <_mm_load_ss@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm_add_ss@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <_mm_store_ss@plt>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determ_add_float>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x8(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %eax,%ebx
lea    0x8(%rsp),%rdi
call   1050 <_mm_load_ss@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_add_ss@plt>
lea    0x4(%rsp),%rdi
mov    %eax,%esi
call   1030 <_mm_store_ss@plt>
mov    0x4(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @determ_add_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast i32* %5 to float*
%7 = bitcast i32* %3 to float*
%8 = call i32 @_mm_load_ss(float* %7)
%9 = bitcast i32* %4 to float*
%10 = call i32 @_mm_load_ss(float* %9)
%11 = call i32 @_mm_add_ss(i32 %8, i32 %10)
%12 = call i32 @_mm_store_ss(float* %6, i32 %11)
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @determ_add_float(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = bitcast i32* %5 to i8*
%7 = bitcast i32* %5 to float*
%8 = bitcast i32* %3 to float*
%9 = call i32 @_mm_load_ss(float* %8)
%10 = bitcast i32* %4 to float*
%11 = call i32 @_mm_load_ss(float* %10)
%12 = call i32 @_mm_add_ss(i32 %9, i32 %11)
%13 = call i32 @_mm_store_ss(float* %7, i32 %12)
%14 = load i32, i32* %5
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void aligned_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<aligned_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}