xunge/DecIR huggingface dataset:
__attribute__((always_)) void *ERR_PTR(long error) { return (void *)error; }


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

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

LLVM IR (-O0):
define i8* @ERR_PTR(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
define i8* @ERR_PTR(i64 %0) {
%2 = inttoptr i64 %0 to i8*
ret i8* %2
}
/* Type definitions */
struct session_expires {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct session_expires *);
void free_session_expires(struct session_expires *se) {
  if (se)
    free((se));
}


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

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

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

LLVM IR (-O2):
%struct.session_expires = type { i32 }
define void @free_session_expires(%struct.session_expires* %0) {
%2 = icmp eq %struct.session_expires* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.session_expires* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void WF_SpiDisableChipSelect() {
  if (1)
    *(volatile unsigned *)(0xBF800000 + (0x60328)) = 1 << 4;
  else
    *(volatile unsigned *)(0xBF800000 + (0x60324)) = 1 << 4;
}


x86 assembly (clang, -O0):
<WF_SpiDisableChipSelect>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbf860328,%eax
movl   $0x10,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WF_SpiDisableChipSelect>:
mov    $0xbf860328,%eax
movl   $0x10,(%rax)
ret

LLVM IR (-O0):
define void @WF_SpiDisableChipSelect() {
store volatile i32 16, i32* inttoptr (i64 3213230888 to i32*)
ret void
}

LLVM IR (-O2):
define void @WF_SpiDisableChipSelect() {
store volatile i32 16, i32* inttoptr (i64 3213230888 to i32*)
ret void
}
void ARGBQuantizeRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBQuantizeRow_NEON() {
ret void
}
/* Variables and functions */
void retro_set_controller_port_device(unsigned port, unsigned device) {
  (void)port;
  (void)device;
}


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

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

LLVM IR (-O0):
define void @retro_set_controller_port_device(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
ret void
}

LLVM IR (-O2):
define void @retro_set_controller_port_device(i32 %0, i32 %1) {
ret void
}
f(void *p) { p++; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @f(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t getOpcode(uint32_t instruction) {
  uint32_t mask = 0xfc000000;
  uint32_t opcd = mask & instruction;
  opcd = opcd >> 26;
  uint8_t opCode = (int)opcd;
  return opCode;
}


x86 assembly (clang, -O0):
<getOpcode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xfc000000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1a,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getOpcode>:
mov    %edi,%eax
sar    $0x1a,%eax
ret

LLVM IR (-O0):
define i32 @getOpcode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 -67108864, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = and i32 %6, %7
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = ashr i32 %9, 26
store i32 %10, i32* %4
%11 = load i32, i32* %4
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @getOpcode(i32 %0) {
%2 = ashr i32 %0, 26
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_put_mmx(int, int, int /*<<< orphan*/ *,
                              int /*<<< orphan*/ const *, int);
void MC_put_o_8_mmx(uint8_t *dest, const uint8_t *ref, int stride, int height) {
  MC_put_mmx(8, height, dest, ref, stride);
}


x86 assembly (clang, -O0):
<MC_put_o_8_mmx>:
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    -0x18(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x8,%edi
call   1030 <MC_put_mmx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_put_o_8_mmx>:
mov    %edx,%r8d
mov    %rsi,%rax
mov    %rdi,%rdx
mov    $0x8,%edi
mov    %ecx,%esi
mov    %rax,%rcx
jmp    1030 <MC_put_mmx@plt>

LLVM IR (-O0):
define void @MC_put_o_8_mmx(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* %8
%10 = load i32*, i32** %5
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @MC_put_mmx(i32 8, i32 %9, i32* %10, i32* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @MC_put_o_8_mmx(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_put_mmx(i32 8, i32 %3, i32* %0, i32* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int main(int argc, char *argv[]) { raise(SIGPIPE); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@SIGPIPE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @SIGPIPE
%6 = call i32 @raise(i32 %5)
ret i32 0
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGPIPE
%4 = tail call i32 @raise(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printUsage();
int /*<<< orphan*/ printf(char *);
void searchPackage(int argc, char *argv[]) {
  if (argc < 3) {
    printf("No File name given\n");
    printUsage();
  } else {
    printf("Querying DataBase...\n");
    printf("Results:\n	Here is where search results would show\n	IF "
           "THERE WERE ANY!!!!!!!!\n");
  }
}


x86 assembly (clang, -O0):
<searchPackage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    1151 <searchPackage+0x31>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <printUsage@plt>
jmp    1169 <searchPackage+0x49>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchPackage>:
push   %rax
cmp    $0x2,%edi
jg     113a <searchPackage+0x1a>
lea    0xf35(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <printUsage@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"No File name given\0A\00"
@.str.1 = [22 x i8] c"Querying DataBase...\0A\00"
@.str.2 = [78 x i8] c"Results:\0A\09Here is where search results would show\0A\09IF THERE WERE ANY!!!!!!!!\0A\00"
define void @searchPackage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @printUsage()
br label %13
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Querying DataBase...\00"
@str.3 = [77 x i8] c"Results:\0A\09Here is where search results would show\0A\09IF THERE WERE ANY!!!!!!!!\00"
@str.4 = [19 x i8] c"No File name given\00"
define void @searchPackage(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 (...) @printUsage()
br label %10
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.3, i64 0, i64 0))
br label %10
10: ; preds = %7, %4
ret void
}
int esOperador(char c) {
  switch (c) {
  case '+':
  case '-':
  case '*':
  case '/':
  case '^':
    return (1);
    break;
  default:
    return (0);
  }
}


x86 assembly (clang, -O0):
<esOperador>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     1155 <esOperador+0x55>
jmp    1122 <esOperador+0x22>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1155 <esOperador+0x55>
jmp    1133 <esOperador+0x33>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1155 <esOperador+0x55>
jmp    1144 <esOperador+0x44>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
jne    1161 <esOperador+0x61>
jmp    1155 <esOperador+0x55>
movl   $0x1,-0x4(%rbp)
jmp    1168 <esOperador+0x68>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<esOperador>:
add    $0xffffffd6,%edi
cmp    $0x34,%edi
ja     111e <esOperador+0x1e>
mov    $0x1,%eax
movabs $0x1000000000002b,%rcx
bt     %rdi,%rcx
jae    111e <esOperador+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @esOperador(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 47, label %6
i32 94, label %6
]
6: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @esOperador(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 43, label %4
i32 45, label %4
i32 42, label %4
i32 47, label %4
i32 94, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
void os_init(void) {}


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

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

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

LLVM IR (-O2):
define void @os_init() {
ret void
}
char digit_to_char(int digit) {
  if (digit < 10)
    return ('0' + digit);
  else
    return ('A' - 10 + digit);
}


x86 assembly (clang, -O0):
<digit_to_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    111f <digit_to_char+0x1f>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1128 <digit_to_char+0x28>
mov    -0x8(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_to_char>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x37,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @digit_to_char(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 48, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %3
%12 = add nsw i32 55, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %14
14: ; preds = %10, %6
%15 = load i8, i8* %2
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @digit_to_char(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
int ext_cmp_exten_strlen(const char *str) {
  int len;
  len = 0;
  for (;;) {
    while (*str == '-') {
      ++str;
    }
    if (!*str) {
      break;
    }
    ++str;
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<ext_cmp_exten_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
jmp    1114 <ext_cmp_exten_strlen+0x14>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1135 <ext_cmp_exten_strlen+0x35>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <ext_cmp_exten_strlen+0x14>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1147 <ext_cmp_exten_strlen+0x47>
jmp    1161 <ext_cmp_exten_strlen+0x61>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ext_cmp_exten_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext_cmp_exten_strlen>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl -0x1(%rdi),%ecx
cmp    $0x2d,%cl
je     1110 <ext_cmp_exten_strlen+0x10>
test   %cl,%cl
je     1126 <ext_cmp_exten_strlen+0x26>
add    $0x1,%eax
jmp    1110 <ext_cmp_exten_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @ext_cmp_exten_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %11, %10 ]
%4 = phi i32 [ 0, %1 ], [ %12, %10 ]
br label %5
5: ; preds = %8, %2
%6 = phi i8* [ %3, %2 ], [ %9, %8 ]
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 45, label %8
i8 0, label %13
]
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %6, i64 1
br label %5
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = add nuw nsw i32 %4, 1
br label %2
13: ; preds = %5
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a[3];
  a[0] = 5;
  a[1] = 6;
  a[2] = 7;
  printf("a[0] = %d\na[1] = %d\na[2] = %d\n", a[0], a[1], a[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x10(%rbp)
movl   $0x6,-0xc(%rbp)
movl   $0x7,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5,%esi
mov    $0x6,%edx
mov    $0x7,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"a[0] = %d\0Aa[1] = %d\0Aa[2] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5, i32 6, i32 7)
ret i32 0
}
void CopyVertexList(Schema, A, B) struct frvStruct *Schema;
struct Mark *A;
struct Mark *B;
{
  AssignMarkVertexListFirst(B, AccessMarkVertexListFirst(A));
}


x86 assembly (clang, -O0):
<CopyVertexList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <AccessMarkVertexListFirst@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    $0x0,%al
call   1040 <AssignMarkVertexListFirst@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyVertexList>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <AccessMarkVertexListFirst@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <AssignMarkVertexListFirst@plt>

LLVM IR (-O0):
%struct.frvStruct = type opaque
%struct.Mark = type opaque
define void @CopyVertexList(%struct.frvStruct* %0, %struct.Mark* %1, %struct.Mark* %2) {
%4 = alloca %struct.frvStruct*
%5 = alloca %struct.Mark*
%6 = alloca %struct.Mark*
store %struct.frvStruct* %0, %struct.frvStruct** %4
store %struct.Mark* %1, %struct.Mark** %5
store %struct.Mark* %2, %struct.Mark** %6
%7 = load %struct.Mark*, %struct.Mark** %6
%8 = load %struct.Mark*, %struct.Mark** %5
%9 = call i32 (%struct.Mark*, ...) bitcast (i32 (...)* @AccessMarkVertexListFirst to i32 (%struct.Mark*, ...)*)(%struct.Mark* %8)
%10 = call i32 (%struct.Mark*, i32, ...) bitcast (i32 (...)* @AssignMarkVertexListFirst to i32 (%struct.Mark*, i32, ...)*)(%struct.Mark* %7, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.frvStruct = type opaque
%struct.Mark = type opaque
define void @CopyVertexList(%struct.frvStruct* nocapture readnone %0, %struct.Mark* %1, %struct.Mark* %2) {
%4 = tail call i32 (%struct.Mark*, ...) bitcast (i32 (...)* @AccessMarkVertexListFirst to i32 (%struct.Mark*, ...)*)(%struct.Mark* %1)
%5 = tail call i32 (%struct.Mark*, i32, ...) bitcast (i32 (...)* @AssignMarkVertexListFirst to i32 (%struct.Mark*, i32, ...)*)(%struct.Mark* %2, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char const);
int rpiwd_is_number(const char *str) {
  const char *ptr = str;
  while (*ptr) {
    if (!isdigit(*ptr))
      return 0;
    ptr++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<rpiwd_is_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <rpiwd_is_number+0x53>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1152 <rpiwd_is_number+0x42>
movl   $0x0,-0x4(%rbp)
jmp    116a <rpiwd_is_number+0x5a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <rpiwd_is_number+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpiwd_is_number>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <rpiwd_is_number+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <rpiwd_is_number+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <rpiwd_is_number+0x20>
jmp    114b <rpiwd_is_number+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @rpiwd_is_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
void OTHERNAME_new(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @thread_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xdc() {
  Assert_real((isascii(220) == 0),
              "/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_isascii.c",
              1105, ("isascii should be 0 for 0xdc"));
}


x86 assembly (clang, -O0):
<t_isascii_0xdc>:
push   %rbp
mov    %rsp,%rbp
mov    $0xdc,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x451,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xdc>:
push   %rax
mov    $0xdc,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x451,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xdc\00"
define void @t_isascii_0xdc() {
%1 = call i64 @isascii(i32 220)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([29 x i8], [29 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xdc\00"
define void @t_isascii_0xdc() {
%1 = tail call i64 @isascii(i32 220)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1105, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_line(int /*<<< orphan*/, float, float, float, float);
void g2_line_(float *dev, float *x1, float *y1, float *x2, float *y2) {
  g2_line(dtoi(*dev), *x1, *y1, *x2, *y2);
}


x86 assembly (clang, -O0):
<g2_line_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
call   1040 <g2_line@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_line_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r12),%xmm1
movss  (%r15),%xmm2
movss  (%r14),%xmm3
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <g2_line@plt>

LLVM IR (-O0):
define void @g2_line_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = call i32 @dtoi(float %12)
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = load float*, float** %8
%17 = load float, float* %16
%18 = load float*, float** %9
%19 = load float, float* %18
%20 = load float*, float** %10
%21 = load float, float* %20
%22 = call i32 @g2_line(i32 %13, float %15, float %17, float %19, float %21)
ret void
}

LLVM IR (-O2):
define void @g2_line_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = tail call i32 @dtoi(float %6)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = tail call i32 @g2_line(i32 %7, float %8, float %9, float %10, float %11)
ret void
}
float am_froot(float f, int n) {
  long *lp, l;
  lp = (long *)(&f);
  l = *lp;
  l -= 0x3F800000l;
  l >>= (n - 1);
  l += 0x3F800000l;
  *lp = l;
  return f;
}


x86 assembly (clang, -O0):
<am_froot>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x3f800000,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,%ecx
sar    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x3f800000,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @am_froot(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i64
store float %0, float* %3
store i32 %1, i32* %4
%7 = bitcast float* %3 to i64*
store i64* %7, i64** %5
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = sub nsw i64 %10, 1065353216
store i64 %11, i64* %6
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = load i64, i64* %6
%15 = zext i32 %13 to i64
%16 = ashr i64 %14, %15
store i64 %16, i64* %6
%17 = load i64, i64* %6
%18 = add nsw i64 %17, 1065353216
store i64 %18, i64* %6
%19 = load i64, i64* %6
%20 = load i64*, i64** %5
store i64 %19, i64* %20
%21 = load float, float* %3
ret float %21
}

LLVM IR (-O2):
define float @am_froot(float returned %0, i32 %1) {
ret float %0
}
int test_imm_6Aint16_mem(short *val) {
  return ((*val) & (0x6A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Aint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x6a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Aint16_mem>:
testb  $0x6a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Aint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 106
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
void *calloc(unsigned int, unsigned long);
int /*<<< orphan*/ free(void *);
void f1() {
  int i;
  unsigned long j;
  i = j = 10;
  void *ptr = calloc((unsigned)i, j);
  free(ptr);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0xa,-0x10(%rbp)
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rax
mov    $0xa,%esi
mov    $0xa,%edi
call   1040 <calloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @f1() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i8*
store i64 10, i64* %2
store i32 10, i32* %1
%4 = load i32, i32* %1
%5 = load i64, i64* %2
%6 = call i8* @calloc(i32 %4, i64 %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @f1() {
%1 = tail call i8* @calloc(i32 10, i64 10)
%2 = tail call i32 @free(i8* %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_arg1_reg(uint32_t *emmc) {
  uint32_t arg1 = *(emmc + 8 / 4);
  printf("ARG1:-----------------------------------------\n");
  printf("ARG1: 			%#08X\n", arg1);
}


x86 assembly (clang, -O0):
<print_arg1_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arg1_reg>:
push   %rbx
mov    0x8(%rdi),%ebx
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"ARG1:-----------------------------------------\0A\00"
@.str.1 = [16 x i8] c"ARG1: \09\09\09%X\0A\00"
define void @print_arg1_reg(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret void
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"ARG1: \09\09\09%X\0A\00"
@str = [47 x i8] c"ARG1:-----------------------------------------\00"
define void @print_arg1_reg(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
/* Type definitions */
struct rcu_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ local_irq_restore(unsigned long);
void rcu_nocb_unlock_irqrestore(struct rcu_data *rdp, unsigned long flags) {
  local_irq_restore(flags);
}


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

x86 assembly (clang, -O2):
<rcu_nocb_unlock_irqrestore>:
mov    %rsi,%rdi
jmp    1030 <local_irq_restore@plt>

LLVM IR (-O0):
%struct.rcu_data = type { i32 }
define void @rcu_nocb_unlock_irqrestore(%struct.rcu_data* %0, i64 %1) {
%3 = alloca %struct.rcu_data*
%4 = alloca i64
store %struct.rcu_data* %0, %struct.rcu_data** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i32 @local_irq_restore(i64 %5)
ret void
}

LLVM IR (-O2):
%struct.rcu_data = type { i32 }
define void @rcu_nocb_unlock_irqrestore(%struct.rcu_data* nocapture readnone %0, i64 %1) {
%3 = tail call i32 @local_irq_restore(i64 %1)
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t n;
  n = 0;
  while (*s++ != '\0')
    ++n;
  return n;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113c <strlen+0x3c>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
void sort_keylist(struct KeyList *list) { return; }


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

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

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

LLVM IR (-O2):
%struct.KeyList = type opaque
define void @sort_keylist(%struct.KeyList* nocapture %0) {
ret void
}
unsigned int cpumask_first(const struct cpumask *srcp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @cpumask_first(%struct.cpumask* nocapture readnone %0) {
ret i32 0
}
void foo444(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo444(i32 %0) {
ret void
}
int test_imm_4Aint16_reg(short val) {
  return ((val) & (0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Aint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x4a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Aint16_reg>:
test   $0x4a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Aint16_reg(i16 signext %0) {
%2 = and i16 %0, 74
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pipe(int *);
int Mkpipe(int pipefd[]) {
  if (pipe(pipefd) == -1) {
    perror("[Server] pipe");
    exit(-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<Mkpipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1164 <Mkpipe+0x34>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mkpipe>:
push   %rax
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
je     113f <Mkpipe+0xf>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"[Server] pipe\00"
define i32 @Mkpipe(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %1
ret i32 0
}
int INHERENT_fchown() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @INHERENT_fchown() {
ret i32 1
}
/* Variables and functions */
int settings_set_n(char const *, int, char const **, int *, void **, int *);
scalar_t__ strlen(char const *);
int settings_set_ascii(const char *path, const char *name, const char *value) {
  int types = 1;
  int sizes = (int)strlen(value);
  return settings_set_n(path, 1, &name, &types, (void **)&value, &sizes);
}


x86 assembly (clang, -O0):
<settings_set_ascii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
lea    -0x10(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x20(%rbp),%r9
call   1040 <settings_set_n@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settings_set_ascii>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    %rsi,0x18(%rsp)
mov    %rdx,0x10(%rsp)
movl   $0x1,0xc(%rsp)
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %eax,0x8(%rsp)
lea    0x18(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x10(%rsp),%r8
lea    0x8(%rsp),%r9
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <settings_set_n@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @settings_set_ascii(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i32 1, i32* %7
%9 = load i8*, i8** %6
%10 = call i64 @strlen(i8* %9)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %8
%12 = load i8*, i8** %4
%13 = call i32 @settings_set_n(i8* %12, i32 1, i8** %5, i32* %7, i8** %6, i32* %8)
ret i32 %13
}

LLVM IR (-O2):
define i32 @settings_set_ascii(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %1, i8** %4
store i8* %2, i8** %5
%8 = bitcast i32* %6 to i8*
store i32 1, i32* %6
%9 = bitcast i32* %7 to i8*
%10 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = call i32 @settings_set_n(i8* %0, i32 1, i8** %4, i32* %6, i8** %5, i32* %7)
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;
typedef int int32_t;

/* Variables and functions */
int get_dtree_size(int8_t dtree[]) {
  int32_t tdepth;
  tdepth = *(int32_t *)&dtree[0];
  return 1 * sizeof(int32_t) + ((1 << tdepth) - 1) * sizeof(int32_t) +
         (1 << tdepth) * sizeof(float);
}


x86 assembly (clang, -O0):
<get_dtree_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
cltq
shl    $0x2,%rax
add    $0x4,%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dtree_size>:
mov    (%rdi),%cl
mov    $0x8,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @get_dtree_size(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 8, %2
ret i32 %3
}
/* Variables and functions */
int kfork();
int kkfork() { return kfork(); }


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

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

LLVM IR (-O0):
define i32 @kkfork() {
%1 = call i32 (...) @kfork()
ret i32 %1
}

LLVM IR (-O2):
define i32 @kkfork() {
%1 = tail call i32 (...) @kfork()
ret i32 %1
}
/* Variables and functions */
scalar_t__ isSep(char);
void skipSep(char *data, size_t *i) {
  while (isSep(data[*i]))
    (*i)++;
}


x86 assembly (clang, -O0):
<skipSep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isSep@plt>
cmp    $0x0,%rax
je     1151 <skipSep+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1120 <skipSep+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipSep>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%rax
movsbl (%rdi,%rax,1),%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <isSep@plt>
test   %rax,%rax
je     114c <skipSep+0x3c>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%r14,%rax,1),%edi
jmp    1130 <skipSep+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @skipSep(i8* %0, i64* %1) {
%3 = alloca i8*
%4 = alloca i64*
store i8* %0, i8** %3
store i64* %1, i64** %4
br label %5
5: ; preds = %13, %2
%6 = load i8*, i8** %3
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = call i64 @isSep(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %5
%14 = load i64*, i64** %4
%15 = load i64, i64* %14
%16 = add i64 %15, 1
store i64 %16, i64* %14
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @skipSep(i8* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = tail call i64 @isSep(i8 signext %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %2, %8
%9 = load i64, i64* %1
%10 = add i64 %9, 1
store i64 %10, i64* %1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = tail call i64 @isSep(i8 signext %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret void
}
/* Variables and functions */
scalar_t__ printf(char *, int, char *, int);
int main(void) {
  int ret = 0;
  while (1) {
    ret += printf("hello world: %d %%f %s %c\n", ret, "string", (int)'x');
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
lea    0xee4(%rip),%rdx
mov    $0x78,%ecx
call   1030 <printf@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
lea    0xee3(%rip),%r14
lea    0xef7(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    $0x78,%ecx
call   1030 <printf@plt>
add    %ebp,%eax
mov    %eax,%ebp
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [27 x i8] c"hello world: %d %%f %s %c\0A\00"
@.str.1 = [7 x i8] c"string\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = call i64 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 120)
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = add nsw i64 %7, %5
%9 = trunc i64 %8 to i32
store i32 %9, i32* %2
br label %3
}

LLVM IR (-O2):
@.str = [27 x i8] c"hello world: %d %%f %s %c\0A\00"
@.str.1 = [7 x i8] c"string\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i64 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 120)
%4 = trunc i64 %3 to i32
%5 = add i32 %2, %4
br label %1
}