xunge/DecIR huggingface dataset:
char check_header(char *header) {
  return (header[0] == 'T' && header[1] == 'A' && header[2] == 'G');
}


x86 assembly (clang, -O0):
<check_header>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x54,%ecx
mov    %al,-0x9(%rbp)
jne    1144 <check_header+0x44>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x9(%rbp)
jne    1144 <check_header+0x44>
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x47,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_header>:
cmpb   $0x54,(%rdi)
jne    1113 <check_header+0x13>
cmpb   $0x41,0x1(%rdi)
jne    1113 <check_header+0x13>
cmpb   $0x47,0x2(%rdi)
sete   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define signext i8 @check_header(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 84
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 65
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 71
%12 = zext i1 %11 to i8
br label %13
13: ; preds = %8, %4, %1
%14 = phi i8 [ 0, %4 ], [ 0, %1 ], [ %12, %8 ]
ret i8 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ code;

/* Variables and functions */
int /*<<< orphan*/ __console_write(char const *, int);
void console_teal() {
  static const char code[] = {0x1b, '[', '3', '6', ';', '0', '6', 'm'};
  __console_write(code, sizeof(code));
}


x86 assembly (clang, -O0):
<console_teal>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x8,%esi
call   1030 <__console_write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_teal>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <__console_write@plt>

LLVM IR (-O0):
@console_teal.code = internal constant [8 x i8] c"\1B[36;06m"
define void @console_teal() {
%1 = call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_teal.code, i64 0, i64 0), i32 8)
ret void
}

LLVM IR (-O2):
@console_teal.code = internal constant [8 x i8] c"\1B[36;06m"
define void @console_teal() {
%1 = tail call i32 @__console_write(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @console_teal.code, i64 0, i64 0), i32 8)
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
void clear_flushed_tls(struct task_struct *task) {}


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

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

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @clear_flushed_tls(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @clear_flushed_tls(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint16_t FP16_MAKE(bool sign, int exp, uint32_t fract) {
  assert(exp >= 0 && exp <= 0x1f);
  assert(fract < 0x400);
  return sign << 15 | exp << 10 | fract;
}


x86 assembly (clang, -O0):
<FP16_MAKE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     113a <FP16_MAKE+0x2a>
cmpl   $0x1f,-0x8(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x400,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
shl    $0xf,%eax
mov    -0x8(%rbp),%ecx
shl    $0xa,%ecx
or     %ecx,%eax
or     -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP16_MAKE>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x20,%esi
setb   %dil
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x400,%r14d
setl   %dil
call   1030 <assert@plt>
shl    $0xf,%ebx
shl    $0xa,%ebp
or     %ebx,%ebp
or     %r14d,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @FP16_MAKE(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp sle i32 %10, 31
br label %12
12: ; preds = %9, %3
%13 = phi i1 [ false, %3 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 1024
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32, i32* %4
%21 = shl i32 %20, 15
%22 = load i32, i32* %5
%23 = shl i32 %22, 10
%24 = or i32 %21, %23
%25 = load i32, i32* %6
%26 = or i32 %24, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @FP16_MAKE(i32 %0, i32 %1, i32 %2) {
%4 = icmp ult i32 %1, 32
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp slt i32 %2, 1024
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = shl i32 %0, 15
%11 = shl i32 %1, 10
%12 = or i32 %11, %10
%13 = or i32 %12, %2
ret i32 %13
}
int *set_bit(int *bitset, char n) {
  register int mask = 1;
  (*bitset) |= (mask << n);
  return (bitset);
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movsbl -0x9(%rbp),%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
mov    %esi,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %rdi,%rax
or     %edx,(%rdi)
ret

LLVM IR (-O0):
define i32* @set_bit(i32* %0, i8 signext %1) {
%3 = alloca i32*
%4 = alloca i8
%5 = alloca i32
store i32* %0, i32** %3
store i8 %1, i8* %4
store i32 1, i32* %5
%6 = load i32, i32* %5
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = shl i32 %6, %8
%10 = load i32*, i32** %3
%11 = load i32, i32* %10
%12 = or i32 %11, %9
store i32 %12, i32* %10
%13 = load i32*, i32** %3
ret i32* %13
}

LLVM IR (-O2):
define i32* @set_bit(i32* returned %0, i8 signext %1) {
%3 = zext i8 %1 to i32
%4 = shl nuw i32 1, %3
%5 = load i32, i32* %0
%6 = or i32 %5, %4
store i32 %6, i32* %0
ret i32* %0
}
/* Variables and functions */
int /*<<< orphan*/ dlclose(void *);
void dbgsysUnloadLibrary(void *handle) { (void)dlclose(handle); }


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

x86 assembly (clang, -O2):
<dbgsysUnloadLibrary>:
jmp    1030 <dlclose@plt>

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

LLVM IR (-O2):
define void @dbgsysUnloadLibrary(i8* %0) {
%2 = tail call i32 @dlclose(i8* %0)
ret void
}
/* Variables and functions */
int left_child(int);
char *test_left_child() {
  do {
    if (!(left_child(0) == 1))
      return "left child of 0 is 1";
  } while (0);
  do {
    if (!(left_child(1) == 3))
      return "left child of 1 is 3";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_left_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <left_child@plt>
cmp    $0x1,%eax
je     1138 <test_left_child+0x28>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <test_left_child+0x62>
jmp    113d <test_left_child+0x2d>
jmp    1142 <test_left_child+0x32>
mov    $0x1,%edi
call   1030 <left_child@plt>
cmp    $0x3,%eax
je     1165 <test_left_child+0x55>
lea    0xeb9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1172 <test_left_child+0x62>
jmp    116a <test_left_child+0x5a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_left_child>:
push   %rax
xor    %edi,%edi
call   1030 <left_child@plt>
cmp    $0x1,%eax
jne    113b <test_left_child+0x2b>
mov    $0x1,%edi
call   1030 <left_child@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
lea    0xee0(%rip),%rcx
cmovne %rcx,%rax
pop    %rcx
ret
lea    0xebe(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"left child of 0 is 1\00"
@.str.1 = [21 x i8] c"left child of 1 is 3\00"
define i8* @test_left_child() {
%1 = alloca i8*
br label %2
2: ; preds = %0
%3 = call i32 @left_child(i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %6, label %5
5: ; preds = %2
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8** %1
br label %14
6: ; preds = %2
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = call i32 @left_child(i32 1)
%10 = icmp eq i32 %9, 3
br i1 %10, label %12, label %11
11: ; preds = %8
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %14
12: ; preds = %8
br label %13
13: ; preds = %12
store i8* null, i8** %1
br label %14
14: ; preds = %13, %11, %5
%15 = load i8*, i8** %1
ret i8* %15
}

LLVM IR (-O2):
@.str = [21 x i8] c"left child of 0 is 1\00"
@.str.1 = [21 x i8] c"left child of 1 is 3\00"
define i8* @test_left_child() {
%1 = tail call i32 @left_child(i32 0)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @left_child(i32 1)
%5 = icmp eq i32 %4, 3
%6 = select i1 %5, i8* null, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0)
br label %7
7: ; preds = %3, %0
%8 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), %0 ], [ %6, %3 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *cmd) {
  fprintf(stderr,
          "Syntax: %s <command>, where <command> is:\n  init <size>\n  put "
          "<value>\n  get\n  length\n  dump\n",
          cmd);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Syntax: %s <command>, where <command> is:\0A init <size>\0A put <value>\0A get\0A length\0A dump\0A\00"
define void @usage(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* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Syntax: %s <command>, where <command> is:\0A init <size>\0A put <value>\0A get\0A length\0A dump\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert_dbl_not_equal_(char *, int, double, double, double);
void test_dbl_not_equal_pass() {
  assert_dbl_not_equal_("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/"
                        "assertive/refs/heads/master/test/pass_test.c",
                        42, (1.0), (1.15), (0.1));
}


x86 assembly (clang, -O0):
<test_dbl_not_equal_pass>:
push   %rbp
mov    %rsp,%rbp
lea    0xefd(%rip),%rdi
mov    $0x2a,%esi
movsd  0xed8(%rip),%xmm0
movsd  0xed8(%rip),%xmm1
movsd  0xed8(%rip),%xmm2
call   1030 <assert_dbl_not_equal_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dbl_not_equal_pass>:
lea    0xf01(%rip),%rdi
movsd  0xee1(%rip),%xmm0
movsd  0xee1(%rip),%xmm1
movsd  0xee1(%rip),%xmm2
mov    $0x2a,%esi
jmp    1030 <assert_dbl_not_equal_@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_dbl_not_equal_pass() {
%1 = call i32 @assert_dbl_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 42, double 1.000000e+00, double 1.150000e+00, double 1.000000e-01)
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
define void @test_dbl_not_equal_pass() {
%1 = tail call i32 @assert_dbl_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 42, double 1.000000e+00, double 1.150000e+00, double 1.000000e-01)
ret void
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ map_state;
};
typedef TYPE_1__ XWindowAttributes;
typedef int /*<<< orphan*/ XID;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
scalar_t__ IsViewable;
int /*<<< orphan*/ XGetWindowAttributes(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, TYPE_1__ *);
int is_window_visible(Display *d, XID window) {
  XWindowAttributes xwa;
  if (!XGetWindowAttributes(d, window, &xwa))
    return 0;
  return xwa.map_state == IsViewable;
}


x86 assembly (clang, -O0):
<is_window_visible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x20(%rbp),%rdx
call   1030 <XGetWindowAttributes@plt>
cmp    $0x0,%eax
jne    1144 <is_window_visible+0x34>
movl   $0x0,-0x4(%rbp)
jmp    115d <is_window_visible+0x4d>
mov    -0x20(%rbp),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_window_visible>:
push   %rax
mov    %rsp,%rdx
call   1030 <XGetWindowAttributes@plt>
test   %eax,%eax
setne  %al
mov    (%rsp),%rcx
mov    0x2eb7(%rip),%rdx
cmp    (%rdx),%rcx
sete   %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
@IsViewable = global i64 0
define i32 @is_window_visible(i32* %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = bitcast %struct.TYPE_3__* %3 to i8*
%5 = call i32 @XGetWindowAttributes(i32* %0, i32 %1, %struct.TYPE_3__* %3)
%6 = icmp ne i32 %5, 0
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i64 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* @IsViewable
%10 = icmp eq i64 %8, %9
%11 = select i1 %6, i1 %10, i1 false
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void zraiseNameNotDefined(const char *name) {
  printf("Error: Name \"%s\" is not defined.\n", name);
}


x86 assembly (clang, -O0):
<zraiseNameNotDefined>:
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):
<zraiseNameNotDefined>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Error: Name \22%s\22 is not defined.\0A\00"
define void @zraiseNameNotDefined(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Error: Name \22%s\22 is not defined.\0A\00"
define void @zraiseNameNotDefined(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void delay_us(unsigned us) { (void)us; }


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

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

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

LLVM IR (-O2):
define void @delay_us(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_get_volume_func() {
  printf("NOT IMPLEMENTED:"
         "pa_get_volume_func"
         "\n");
}


x86 assembly (clang, -O0):
<pa_get_volume_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_get_volume_func\0A\00"
define i32 @pa_get_volume_func() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_get_volume_func\00"
define i32 @pa_get_volume_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int oc_storage_config(const char *store) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @oc_storage_config(i8* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
scalar_t__ _mm_extract_epi16(int /*<<< orphan*/, int);
long long int foo16(__m128i x) { return (short)_mm_extract_epi16(x, 3); }


x86 assembly (clang, -O0):
<foo16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <_mm_extract_epi16@plt>
movswq %ax,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo16>:
push   %rax
mov    $0x3,%esi
call   1030 <_mm_extract_epi16@plt>
movswq %ax,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @foo16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @_mm_extract_epi16(i32 %3, i32 3)
%5 = trunc i64 %4 to i16
%6 = sext i16 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @foo16(i32 %0) {
%2 = tail call i64 @_mm_extract_epi16(i32 %0, i32 3)
%3 = shl i64 %2, 48
%4 = ashr exact i64 %3, 48
ret i64 %4
}
long double sinl(long double x) { return __builtin_sinl(x); }


x86 assembly (clang, -O0):
<sinl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sinl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinl>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
jae    1125 <sinl+0x25>
flds   0xeec(%rip)
fucomip %st(1),%st
fstp   %st(0)
fldz
jae    1125 <sinl+0x25>
fstp   %st(0)
fldz
ret
fstp   %st(0)
nopw   0x0(%rax,%rax,1)
jmp    1130 <sinl+0x30>

LLVM IR (-O0):
define x86_fp80 @sinl(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 @sinl(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @sinl(x86_fp80 %0) {
%2 = fcmp oeq x86_fp80 %0, 0xKFFFF8000000000000000
%3 = fcmp oeq x86_fp80 %0, 0xK7FFF8000000000000000
%4 = or i1 %3, %2
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
ret x86_fp80 undef
}
int _checkfill(unsigned char *buf, unsigned char fill, int size) {
  (void)&_checkfill;
  while (size-- > 0)
    if (buf[size] != fill)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<_checkfill>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
jle    114e <_checkfill+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movzbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     1149 <_checkfill+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1155 <_checkfill+0x55>
jmp    1111 <_checkfill+0x11>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_checkfill>:
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1125 <_checkfill+0x25>
lea    -0x1(%rax),%rcx
cmp    %sil,-0x1(%rdi,%rax,1)
mov    %rcx,%rax
je     1110 <_checkfill+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @_checkfill(i8* nocapture %0, i8 zeroext %1, i32 %2) {
%4 = zext i32 %2 to i64
br label %5
5: ; preds = %10, %3
%6 = phi i64 [ %7, %10 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = trunc i64 %6 to i32
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %0, i64 %7
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %1
br i1 %13, label %5, label %14
14: ; preds = %5, %10
%15 = phi i32 [ 0, %10 ], [ 1, %5 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_opp(uintptr_t, uintptr_t);
void fiat_p224_opp(uint32_t out1[7], const uint32_t arg1[7]) {
  internal_fiat_p224_opp((uintptr_t)out1, (uintptr_t)arg1);
}


x86 assembly (clang, -O0):
<fiat_p224_opp>:
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 <internal_fiat_p224_opp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fiat_p224_opp>:
jmp    1030 <internal_fiat_p224_opp@plt>

LLVM IR (-O0):
define void @fiat_p224_opp(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p224_opp(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_opp(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p224_opp(i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x2f() {
  Assert_real((ispunct(47)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              240, ("ispunct should be 1 for /"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x2f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1030 <ispunct@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xf0,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x2f>:
push   %rax
mov    $0x2f,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xf0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for /\00"
define void @t_ispunct_0x2f() {
%1 = call i32 @ispunct(i32 47)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 240, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for /\00"
define void @t_ispunct_0x2f() {
%1 = tail call i32 @ispunct(i32 47)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 240, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ main();
void _start(void) {
  main();
  exit(0);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <main@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
push   %rax
xor    %eax,%eax
call   1030 <main@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @main()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @main()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strcmp(char *, char *);
void strcmp_diff_length_0() {
  char *x = "12345";
  char *y = "234";
  clang_analyzer_eval(strcmp(x, y) == -1);
}


x86 assembly (clang, -O0):
<strcmp_diff_length_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp_diff_length_0>:
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"234\00"
define void @strcmp_diff_length_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcmp(i8* %3, i8* %4)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
define void @strcmp_diff_length_0() {
%1 = tail call i32 @clang_analyzer_eval(i32 1)
ret void
}
void XtGetKeysymTable() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo729() {
ret void
}
void *changeReplicationId(void) { return (void *)0; }


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

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

LLVM IR (-O0):
define i8* @changeReplicationId() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @changeReplicationId() {
ret i8* null
}
int f() {
  int i;
  int c;
  i = 0;
  c = 0;
  while (i < 100) {
    if (i % 4 == 0)
      c = c + 1;
    if (i % 4 == 1)
      c = c + 100;
    if (i % 4 == 2)
      c = c + 10000;
    else
      c = c + 1000000;
    i = i + 1;
  }
  return c;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1193 <f+0x93>
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1139 <f+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1156 <f+0x56>
mov    -0x8(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x2,%edx
jne    117a <f+0x7a>
mov    -0x8(%rbp),%eax
add    $0x2710,%eax
mov    %eax,-0x8(%rbp)
jmp    1185 <f+0x85>
mov    -0x8(%rbp),%eax
add    $0xf4240,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <f+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %30, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %33
6: ; preds = %3
%7 = load i32, i32* %1
%8 = srem i32 %7, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %6
%14 = load i32, i32* %1
%15 = srem i32 %14, 4
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 100
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %13
%21 = load i32, i32* %1
%22 = srem i32 %21, 4
%23 = icmp eq i32 %22, 2
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 10000
store i32 %26, i32* %2
br label %30
27: ; preds = %20
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1000000
store i32 %29, i32* %2
br label %30
30: ; preds = %27, %24
%31 = load i32, i32* %1
%32 = add nsw i32 %31, 1
store i32 %32, i32* %1
br label %3
33: ; preds = %3
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @f() {
ret i32 75252525
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void swap(int a, int b) {
  int temp = a;
  a = b;
  b = temp;
  printf("\nValue after swap, a: %d, b: %d", a, b);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0AValue after swap, a: %d, b: %d\00"
define void @swap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
store i32 %7, i32* %3
%8 = load i32, i32* %5
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AValue after swap, a: %d, b: %d\00"
define void @swap(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void copy_string(char *str, void *val) { strncpy((char *)val, str, 256); }


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

x86 assembly (clang, -O2):
<copy_string>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
mov    $0x100,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define void @copy_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** %4
%6 = load i8*, i8** %3
%7 = call i32 @strncpy(i8* %5, i8* %6, i32 256)
ret void
}

LLVM IR (-O2):
define void @copy_string(i8* %0, i8* %1) {
%3 = tail call i32 @strncpy(i8* %1, i8* %0, i32 256)
ret void
}
void rop3_186_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = T & stk3;
  stk1 = *D | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_186_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_186_1_0>:
mov    %esi,%eax
not    %al
and    %al,%dl
mov    (%rdi),%cl
or     %cl,%dl
and    %sil,%cl
and    %al,%dl
or     %cl,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_186_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8*, i8** %4
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = and i32 %35, %37
%39 = or i32 %32, %38
%40 = trunc i32 %39 to i8
%41 = load i8*, i8** %4
store i8 %40, i8* %41
ret void
}

LLVM IR (-O2):
define void @rop3_186_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, -1
%5 = and i8 %4, %2
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = and i8 %6, %1
%9 = and i8 %7, %4
%10 = or i8 %9, %8
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void deleteStr(const char *p) {
  if (p)
    free((void *)p);
  p = NULL;
}


x86 assembly (clang, -O0):
<deleteStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <deleteStr+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteStr>:
test   %rdi,%rdi
je     111a <deleteStr+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @deleteStr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
store i8* null, i8** %2
ret void
}

LLVM IR (-O2):
define void @deleteStr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, int *);
int /*<<< orphan*/ stdin;
int be_elojeles_egesz() {
  int ret;
  fscanf(stdin, "%d", &ret);
  return ret;
}


x86 assembly (clang, -O0):
<be_elojeles_egesz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
lea    -0x4(%rbp),%rdx
call   1030 <fscanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_elojeles_egesz>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <fscanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @be_elojeles_egesz() {
%1 = alloca i32
%2 = load i32, i32* @stdin
%3 = call i32 @fscanf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%d\00"
define i32 @be_elojeles_egesz() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* @stdin
%4 = call i32 @fscanf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Type definitions */
struct btf_type {
  int dummy;
};

/* Variables and functions */
scalar_t__ BTF_KIND_VOLATILE;
scalar_t__ btf_kind(struct btf_type const *);
bool btf_is_volatile(const struct btf_type *t) {
  return btf_kind(t) == BTF_KIND_VOLATILE;
}


x86 assembly (clang, -O0):
<btf_is_volatile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <btf_kind@plt>
mov    0x2ebc(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btf_is_volatile>:
push   %rax
call   1030 <btf_kind@plt>
mov    0x2ecb(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.btf_type = type { i32 }
@BTF_KIND_VOLATILE = global i64 0
define i32 @btf_is_volatile(%struct.btf_type* %0) {
%2 = alloca %struct.btf_type*
store %struct.btf_type* %0, %struct.btf_type** %2
%3 = load %struct.btf_type*, %struct.btf_type** %2
%4 = call i64 @btf_kind(%struct.btf_type* %3)
%5 = load i64, i64* @BTF_KIND_VOLATILE
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.btf_type = type { i32 }
@BTF_KIND_VOLATILE = global i64 0
define i32 @btf_is_volatile(%struct.btf_type* %0) {
%2 = tail call i64 @btf_kind(%struct.btf_type* %0)
%3 = load i64, i64* @BTF_KIND_VOLATILE
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
long long int a(int n) {
  long long int ans = 1;
  ans *= n * (n + 1) * ((2 * n) + 1);
  ans /= 6;
  return ans;
}


x86 assembly (clang, -O0):
<a>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x6,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a>:
lea    0x1(%rdi),%eax
imul   %edi,%eax
lea    (%rdi,%rdi,1),%ecx
add    $0x1,%ecx
imul   %eax,%ecx
movslq %ecx,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @a(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 1, i64* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
%7 = mul nsw i32 %4, %6
%8 = load i32, i32* %2
%9 = mul nsw i32 2, %8
%10 = add nsw i32 %9, 1
%11 = mul nsw i32 %7, %10
%12 = sext i32 %11 to i64
%13 = load i64, i64* %3
%14 = mul nsw i64 %13, %12
store i64 %14, i64* %3
%15 = load i64, i64* %3
%16 = sdiv i64 %15, 6
store i64 %16, i64* %3
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @a(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = shl nsw i32 %0, 1
%5 = or i32 %4, 1
%6 = mul nsw i32 %3, %5
%7 = sdiv i32 %6, 6
%8 = sext i32 %7 to i64
ret i64 %8
}
void gtk_menu_get_accel_group() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_get_accel_group() {
ret void
}
/* Variables and functions */
int F(int);
int /*<<< orphan*/ printf(char *, int);
main() {
  printf("F(5) = %d\n", 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>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <F@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"F(5) = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @F(i32 5)
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"F(5) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @F(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
struct config_node const *find_config_tree_node(struct cmd_context *cmd,
                                                char const *path) {
  void *__cil_tmp3;
  {
    {
      __cil_tmp3 = (void *)0;
      return ((struct config_node const *)__cil_tmp3);
    }
  }
}


x86 assembly (clang, -O0):
<find_config_tree_node>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.config_node = type opaque
%struct.cmd_context = type opaque
define %struct.config_node* @find_config_tree_node(%struct.cmd_context* %0, i8* %1) {
%3 = alloca %struct.cmd_context*
%4 = alloca i8*
%5 = alloca i8*
store %struct.cmd_context* %0, %struct.cmd_context** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load i8*, i8** %5
%7 = bitcast i8* %6 to %struct.config_node*
ret %struct.config_node* %7
}

LLVM IR (-O2):
%struct.config_node = type opaque
%struct.cmd_context = type opaque
define noalias %struct.config_node* @find_config_tree_node(%struct.cmd_context* nocapture readnone %0, i8* nocapture readnone %1) {
ret %struct.config_node* null
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ INT16_MAX;
int /*<<< orphan*/ INT16_MIN;
int /*<<< orphan*/ xsd_integer_value(char const *, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int16_t xsd_int16_value(const char *literal) {
  return (int16_t)xsd_integer_value(literal, INT16_MIN, INT16_MAX);
}


x86 assembly (clang, -O0):
<xsd_int16_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
call   1030 <xsd_integer_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xsd_int16_value>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
jmp    1030 <xsd_integer_value@plt>

LLVM IR (-O0):
@INT16_MIN = global i32 0
@INT16_MAX = global i32 0
define i32 @xsd_int16_value(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @INT16_MIN
%5 = load i32, i32* @INT16_MAX
%6 = call i32 @xsd_integer_value(i8* %3, i32 %4, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
@INT16_MIN = global i32 0
@INT16_MAX = global i32 0
define i32 @xsd_int16_value(i8* %0) {
%2 = load i32, i32* @INT16_MIN
%3 = load i32, i32* @INT16_MAX
%4 = tail call i32 @xsd_integer_value(i8* %0, i32 %2, i32 %3)
ret i32 %4
}
void dbr_finalize() {}


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

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

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

LLVM IR (-O2):
define void @dbr_finalize() {
ret void
}
/* Variables and functions */
int iscntl(int, int);
int issync() { return iscntl((-2), 9); }


x86 assembly (clang, -O0):
<issync>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffe,%edi
mov    $0x9,%esi
call   1030 <iscntl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<issync>:
mov    $0xfffffffe,%edi
mov    $0x9,%esi
jmp    1030 <iscntl@plt>

LLVM IR (-O0):
define i32 @issync() {
%1 = call i32 @iscntl(i32 -2, i32 9)
ret i32 %1
}

LLVM IR (-O2):
define i32 @issync() {
%1 = tail call i32 @iscntl(i32 -2, i32 9)
ret i32 %1
}
__typeof__(strncpy(1, 1, 1)) test_strncpy_171(void) { return strncpy(1, 1, 1); }


x86 assembly (clang, -O0):
<test_strncpy_171>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1030 <strncpy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_strncpy_171>:
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @test_strncpy_171() {
%1 = call i8* @strncpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* %1
}

LLVM IR (-O2):
define i8* @test_strncpy_171() {
%1 = tail call i8* @strncpy(i8* inttoptr (i64 1 to i8*), i8* inttoptr (i64 1 to i8*), i64 1)
ret i8* inttoptr (i64 1 to i8*)
}