xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test_cert_login();
int main() {
  test_cert_login();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_cert_login@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_cert_login()
ret i32 0
}
const char *RC4_options(void) { return "rc4(ptr,int)"; }


x86 assembly (clang, -O0):
<RC4_options>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RC4_options>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"rc4(ptr,int)\00"
define i8* @RC4_options() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [13 x i8] c"rc4(ptr,int)\00"
define i8* @RC4_options() {
ret i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_spaces(const char *str) {
  while (isspace(*str))
    ++str;
  return (char *)str;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <skip_spaces+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_spaces+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_spaces(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ towerOfHanoi(int, char, char, char);
int main() {
  int n;
  printf("%s\n", "Enter number of disks");
  scanf("%d", &n);
  towerOfHanoi(n, 'A', 'C', 'B');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x41,%esi
mov    $0x43,%edx
mov    $0x42,%ecx
call   1040 <towerOfHanoi@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec5(%rip),%rsi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    $0x41,%esi
mov    $0x43,%edx
mov    $0x42,%ecx
call   1040 <towerOfHanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [22 x i8] c"Enter number of disks\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @towerOfHanoi(i32 %5, i8 signext 65, i8 signext 67, i8 signext 66)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [22 x i8] c"Enter number of disks\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @towerOfHanoi(i32 %5, i8 signext 65, i8 signext 67, i8 signext 66)
ret i32 0
}
void DEF_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<DEF_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DEF_IRQHandler+0x9>
jmp    1109 <DEF_IRQHandler+0x9>

x86 assembly (clang, -O2):
<DEF_IRQHandler>:
jmp    1100 <DEF_IRQHandler>

LLVM IR (-O0):
define void @DEF_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DEF_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int pil_do_ramdump(struct pil_desc *desc, void *ramdump_dev) { return 0; }


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

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

LLVM IR (-O0):
%struct.pil_desc = type opaque
define i32 @pil_do_ramdump(%struct.pil_desc* %0, i8* %1) {
%3 = alloca %struct.pil_desc*
%4 = alloca i8*
store %struct.pil_desc* %0, %struct.pil_desc** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.pil_desc = type opaque
define i32 @pil_do_ramdump(%struct.pil_desc* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int sdeco_d_get_int16();
int sdeco_d_get_int32(void) {
  int h, val;
  h = sdeco_d_get_int16();
  if (h < 0)
    return 0x80000000;
  val = (h << 16);
  h = sdeco_d_get_int16();
  if (h < 0)
    return 0x80000000;
  return val + h;
}


x86 assembly (clang, -O0):
<sdeco_d_get_int32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <sdeco_d_get_int16@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1138 <sdeco_d_get_int32+0x28>
movl   $0x80000000,-0x4(%rbp)
jmp    116a <sdeco_d_get_int32+0x5a>
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <sdeco_d_get_int16@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1161 <sdeco_d_get_int32+0x51>
movl   $0x80000000,-0x4(%rbp)
jmp    116a <sdeco_d_get_int32+0x5a>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdeco_d_get_int32>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <sdeco_d_get_int16@plt>
mov    $0x80000000,%ebx
test   %eax,%eax
js     1137 <sdeco_d_get_int32+0x27>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <sdeco_d_get_int16@plt>
test   %eax,%eax
js     1137 <sdeco_d_get_int32+0x27>
shl    $0x10,%ebp
add    %ebp,%eax
mov    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @sdeco_d_get_int32() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @sdeco_d_get_int16()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 -2147483648, i32* %1
br label %19
8: ; preds = %0
%9 = load i32, i32* %2
%10 = shl i32 %9, 16
store i32 %10, i32* %3
%11 = call i32 (...) @sdeco_d_get_int16()
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 -2147483648, i32* %1
br label %19
15: ; preds = %8
%16 = load i32, i32* %3
%17 = load i32, i32* %2
%18 = add nsw i32 %16, %17
store i32 %18, i32* %1
br label %19
19: ; preds = %15, %14, %7
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
define i32 @sdeco_d_get_int32() {
%1 = tail call i32 (...) @sdeco_d_get_int16()
%2 = icmp slt i32 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 (...) @sdeco_d_get_int16()
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = shl i32 %1, 16
%8 = add nsw i32 %4, %7
br label %9
9: ; preds = %3, %0, %6
%10 = phi i32 [ %8, %6 ], [ -2147483648, %0 ], [ -2147483648, %3 ]
ret i32 %10
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_oflag;
};

/* Variables and functions */
int /*<<< orphan*/ ONLCR;
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ tcgetattr(int, struct termios *);
int tcsetattr(int, int /*<<< orphan*/, struct termios *);
int setup_slave(int fd) {
  struct termios tio;
  tcgetattr(fd, &tio);
  tio.c_oflag &= ~ONLCR;
  return tcsetattr(fd, TCSANOW, &tio);
}


x86 assembly (clang, -O0):
<setup_slave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <tcgetattr@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_slave>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <tcgetattr@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%eax
not    %eax
and    %eax,(%rsp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   1040 <tcsetattr@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@ONLCR = global i32 0
@TCSANOW = global i32 0
define i32 @setup_slave(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.termios
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @tcgetattr(i32 %4, %struct.termios* %3)
%6 = load i32, i32* @ONLCR
%7 = xor i32 %6, -1
%8 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%9 = load i32, i32* %8
%10 = and i32 %9, %7
store i32 %10, i32* %8
%11 = load i32, i32* %2
%12 = load i32, i32* @TCSANOW
%13 = call i32 @tcsetattr(i32 %11, i32 %12, %struct.termios* %3)
ret i32 %13
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@ONLCR = global i32 0
@TCSANOW = global i32 0
define i32 @setup_slave(i32 %0) {
%2 = alloca %struct.termios
%3 = bitcast %struct.termios* %2 to i8*
%4 = call i32 @tcgetattr(i32 %0, %struct.termios* %2)
%5 = load i32, i32* @ONLCR
%6 = xor i32 %5, -1
%7 = getelementptr inbounds %struct.termios, %struct.termios* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = and i32 %8, %6
store i32 %9, i32* %7
%10 = load i32, i32* @TCSANOW
%11 = call i32 @tcsetattr(i32 %0, i32 %10, %struct.termios* %2)
ret i32 %11
}
_Bool Int__GT_(int x, int y) { return x > y; }


x86 assembly (clang, -O0):
<Int__GT_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int__GT_>:
cmp    %esi,%edi
setg   %al
ret

LLVM IR (-O0):
define zeroext i1 @Int__GT_(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @Int__GT_(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
ret i1 %3
}
/* Variables and functions */
char *strchr(char const *, int);
char *my_strchr(const char *s, int c) { return strchr(s, c); }


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

x86 assembly (clang, -O2):
<my_strchr>:
jmp    1030 <strchr@plt>

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

LLVM IR (-O2):
define i8* @my_strchr(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P20__set();
void ReverseGPIOP__0__In__set(void) { HplMcs51GeneralIOC__P20__set(); }


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__0__In__set() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P20__set()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ random();
void *rand_key_voidp(int nonrepeat, int pos) {
  char *r = 0;
  r += random();
  r += pos - ((long)r % nonrepeat);
  return (void *)r;
}


x86 assembly (clang, -O0):
<rand_key_voidp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
cqto
idiv   %rcx
mov    -0x18(%rbp),%rax
sub    %rdx,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_key_voidp>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
movslq %eax,%rcx
movslq %ebp,%rsi
movslq %ebx,%rdi
mov    %rcx,%rdx
or     %rdi,%rdx
shr    $0x20,%rdx
je     113d <rand_key_voidp+0x2d>
mov    %rcx,%rax
cqto
idiv   %rdi
jmp    1141 <rand_key_voidp+0x31>
xor    %edx,%edx
div    %ebx
sub    %rdx,%rsi
add    %rsi,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @rand_key_voidp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%6 = call i32 (...) @random()
%7 = load i8*, i8** %5
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %5
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = load i8*, i8** %5
%13 = ptrtoint i8* %12 to i64
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = srem i64 %13, %15
%17 = sub nsw i64 %11, %16
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 %17
store i8* %19, i8** %5
%20 = load i8*, i8** %5
ret i8* %20
}

LLVM IR (-O2):
define noalias i8* @rand_key_voidp(i32 %0, i32 %1) {
%3 = tail call i32 (...) @random()
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* null, i64 %4
%6 = sext i32 %1 to i64
%7 = ptrtoint i8* %5 to i64
%8 = sext i32 %0 to i64
%9 = srem i64 %7, %8
%10 = sub nsw i64 %6, %9
%11 = getelementptr inbounds i8, i8* %5, i64 %10
ret i8* %11
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
  int /*<<< orphan*/ st_gid;
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ fs_config(char const *, int /*<<< orphan*/,
                             int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
void fix_stat(const char *path, struct stat *s) {
  fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode);
}


x86 assembly (clang, -O0):
<fix_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <S_ISDIR@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
mov    -0x10(%rbp),%rcx
add    $0x4,%rcx
mov    -0x10(%rbp),%r8
call   1030 <fs_config@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_stat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%edi
call   1040 <S_ISDIR@plt>
lea    0x8(%rbx),%rdx
lea    0x4(%rbx),%rcx
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fs_config@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32 }
define void @fix_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
%10 = load %struct.stat*, %struct.stat** %4
%11 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 2
%12 = load %struct.stat*, %struct.stat** %4
%13 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 1
%14 = load %struct.stat*, %struct.stat** %4
%15 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%16 = call i32 @fs_config(i8* %5, i32 %9, i32* %11, i32* %13, i32* %15)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32 }
define void @fix_stat(i8* %0, %struct.stat* %1) {
%3 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 @S_ISDIR(i32 %4)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%7 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%8 = tail call i32 @fs_config(i8* %0, i32 %5, i32* %6, i32* %7, i32* %3)
ret void
}
void i2d_X509_AUX(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_AUX() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
char UART_InChar(void) {
  while (((*((volatile uint32_t *)0x4000C018)) & 0x00000010) != 0)
    ;
  return ((char)((*((volatile uint32_t *)0x4000C000)) & 0xFF));
}


x86 assembly (clang, -O0):
<UART_InChar>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UART_InChar+0x9>
mov    $0x4000c018,%eax
mov    (%rax),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1121 <UART_InChar+0x21>
jmp    1109 <UART_InChar+0x9>
mov    $0x4000c000,%eax
mov    (%rax),%eax
and    $0xff,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_InChar>:
testl  $0x10,0x4000c018
jne    1100 <UART_InChar>
mov    0x4000c000,%eax
ret

LLVM IR (-O0):
define signext i8 @UART_InChar() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i32, i32* inttoptr (i64 1073791000 to i32*)
%3 = and i32 %2, 16
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load volatile i32, i32* inttoptr (i64 1073790976 to i32*)
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @UART_InChar() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1073791000 to i32*)
%3 = and i32 %2, 16
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
%6 = load volatile i32, i32* inttoptr (i64 1073790976 to i32*)
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Variables and functions */
int _positive_solver_check(double **, double *, double *, int, double, int);
bool symm_positive_solver_check(double **A, double *x, double *b, int n,
                                double eps) {
  bool is_symm = true;
  if (0 < eps)
    eps = 0.001;
  return _positive_solver_check(A, x, b, n, eps, is_symm);
}


x86 assembly (clang, -O0):
<symm_positive_solver_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movsd  %xmm0,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1152 <symm_positive_solver_check+0x42>
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movsd  -0x28(%rbp),%xmm0
mov    -0x2c(%rbp),%r8d
call   1030 <_positive_solver_check@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symm_positive_solver_check>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xedf(%rip),%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
mov    $0x1,%r8d
jmp    1030 <_positive_solver_check@plt>

LLVM IR (-O0):
define i32 @symm_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %4) {
%6 = alloca double**
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca i32
store double** %0, double*** %6
store double* %1, double** %7
store double* %2, double** %8
store i32 %3, i32* %9
store double %4, double* %10
store i32 1, i32* %11
%12 = load double, double* %10
%13 = fcmp olt double 0.000000e+00, %12
br i1 %13, label %14, label %15
14: ; preds = %5
store double 1.000000e-03, double* %10
br label %15
15: ; preds = %14, %5
%16 = load double**, double*** %6
%17 = load double*, double** %7
%18 = load double*, double** %8
%19 = load i32, i32* %9
%20 = load double, double* %10
%21 = load i32, i32* %11
%22 = call i32 @_positive_solver_check(double** %16, double* %17, double* %18, i32 %19, double %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @symm_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %4) {
%6 = fcmp ogt double %4, 0.000000e+00
%7 = select i1 %6, double 1.000000e-03, double %4
%8 = tail call i32 @_positive_solver_check(double** %0, double* %1, double* %2, i32 %3, double %7, i32 1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void DisposePtr(char *thisPtr) { free(thisPtr); }


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

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

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

LLVM IR (-O2):
define void @DisposePtr(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char *corpus_malloc(size_t);
char *strcpy(char *, char const *);
size_t strlen(char const *);
char *corpus_strdup(const char *s1) {
  size_t n = strlen(s1);
  char *s;
  if (!(s = corpus_malloc(n + 1))) {
    return NULL;
  }
  return strcpy(s, s1);
}


x86 assembly (clang, -O0):
<corpus_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1050 <corpus_malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1171 <corpus_strdup+0x41>
movq   $0x0,-0x8(%rbp)
jmp    1182 <corpus_strdup+0x52>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<corpus_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <corpus_malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <corpus_strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @corpus_strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @corpus_malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i8* @strcpy(i8* %4, i8* dereferenceable(1) %0)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
/* Variables and functions */
int get_stnodep_value();
__attribute__((visibility("default"))) int get_ststdep_value(void) {
  return get_stnodep_value();
}


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

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

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

LLVM IR (-O2):
define i32 @get_ststdep_value() {
%1 = tail call i32 (...) @get_stnodep_value()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
char *malloc(int);
char *sm_alloc(int n) {
  char *p;
  p = malloc(n);
  if (p == NULL)
    error("out of memory\n");
  return (p);
}


x86 assembly (clang, -O0):
<sm_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <sm_alloc+0x2e>
lea    0xeb7(%rip),%rdi
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @sm_alloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @error(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ __glLightModelfv_size(int /*<<< orphan*/);
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glLightModeliv_size(GLenum e) {
  return __glLightModelfv_size(e);
}


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

x86 assembly (clang, -O2):
<__glLightModeliv_size>:
jmp    1030 <__glLightModelfv_size@plt>

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

LLVM IR (-O2):
define hidden i32 @__glLightModeliv_size(i32 %0) {
%2 = tail call i32 @__glLightModelfv_size(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f1();
int f2();
int f3();
int f4();
main() {
  if ((f1() & f2() & f3() & f4()) != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <f1@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <f2@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <f3@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <f4@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x1,%eax
je     11b9 <main+0x59>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <f1@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <f2@plt>
mov    %eax,%ebp
and    %ebx,%ebp
xor    %eax,%eax
call   1050 <f3@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <f4@plt>
and    %ebx,%eax
and    %ebp,%eax
cmp    $0x1,%eax
jne    1197 <main+0x37>
xor    %edi,%edi
call   1070 <exit@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f1()
%3 = call i32 (...) @f2()
%4 = and i32 %2, %3
%5 = call i32 (...) @f3()
%6 = and i32 %4, %5
%7 = call i32 (...) @f4()
%8 = and i32 %6, %7
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f1()
%2 = tail call i32 (...) @f2()
%3 = and i32 %2, %1
%4 = tail call i32 (...) @f3()
%5 = and i32 %3, %4
%6 = tail call i32 (...) @f4()
%7 = and i32 %5, %6
%8 = icmp eq i32 %7, 1
br i1 %8, label %11, label %9
9: ; preds = %0
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %0
%12 = tail call i32 @exit(i32 0)
unreachable
}
void RTCrc64Start(void) {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @avcodec_descriptor_get_by_name() {
ret void
}
unsigned short int f45(unsigned short int x, unsigned int y) {
  return (x >> y) | (x << ((-y) & (8 * sizeof(unsigned short) - 1)));
}


x86 assembly (clang, -O0):
<f45>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
mov    %ecx,%ecx
and    $0xf,%rcx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f45>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
and    $0xf,%cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f45(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = sub i32 0, %11
%13 = zext i32 %12 to i64
%14 = and i64 %13, 15
%15 = trunc i64 %14 to i32
%16 = shl i32 %10, %15
%17 = or i32 %8, %16
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @f45(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = lshr i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %5, 15
%7 = shl nuw nsw i32 %3, %6
%8 = or i32 %7, %4
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, int *);
int main() {
  int k;
  FILE *fin;
  fin = fopen("input", "r");
  fscanf(fin, "%d", &k);
  fclose(fin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea7(%rip),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb6(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rax,%rdi
call   1040 <fscanf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%7 = load i32*, i32** %3
%8 = call i32 @fclose(i32* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"input\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @fscanf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%5 = call i32 @fclose(i32* %3)
ret i32 0
}
/* Variables and functions */
double UINT32_MAX;
double xor128();
double genrand_real1(void) { return xor128() * (1.0 / UINT32_MAX); }


x86 assembly (clang, -O0):
<genrand_real1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <xor128@plt>
movsd  0xedd(%rip),%xmm1
mov    0x2ece(%rip),%rax
divsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real1>:
push   %rax
xor    %eax,%eax
call   1030 <xor128@plt>
mov    0x2ed9(%rip),%rax
movsd  0xed9(%rip),%xmm1
divsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@UINT32_MAX = global double 0.000000e+00
define double @genrand_real1() {
%1 = call double (...) @xor128()
%2 = load double, double* @UINT32_MAX
%3 = fdiv double 1.000000e+00, %2
%4 = fmul double %1, %3
ret double %4
}

LLVM IR (-O2):
@UINT32_MAX = global double 0.000000e+00
define double @genrand_real1() {
%1 = tail call double (...) @xor128()
%2 = load double, double* @UINT32_MAX
%3 = fdiv double 1.000000e+00, %2
%4 = fmul double %1, %3
ret double %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
void *get_XColormapEvent_display(void *_p) {
  return (void *)((XColormapEvent *)_p)->display;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XColormapEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XColormapEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
double __aeabi_dmul(double x, double y) { return 0.0; }


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

x86 assembly (clang, -O2):
<__aeabi_dmul>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @__aeabi_dmul(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @__aeabi_dmul(double %0, double %1) {
ret double 0.000000e+00
}
void EEPROM_Stop(void) {}


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

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

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

LLVM IR (-O2):
define void @EEPROM_Stop() {
ret void
}
void deallocate_frame(struct frame *frame) {}


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

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

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

LLVM IR (-O2):
%struct.frame = type opaque
define void @deallocate_frame(%struct.frame* nocapture %0) {
ret void
}
/* Variables and functions */
int dlist_test(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  srand(time(NULL));
  printf("running dlist (doubly-linked list) test... (for best results run in "
         "valgrind!)\n");
  int failure_count = dlist_test(0);
  printf("dlist (doubly-linked list) test complete; %i failures\n",
         failure_count);
  return failure_count;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <dlist_test@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <dlist_test@plt>
mov    %eax,%ebx
lea    0xe85(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [80 x i8] c"running dlist (doubly-linked list) test... (for best results run in valgrind!)\0A\00"
@.str.1 = [55 x i8] c"dlist (doubly-linked list) test complete; %i failures\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @time(i32* null)
%8 = call i32 @srand(i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @dlist_test(i32 0)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@.str.1 = [55 x i8] c"dlist (doubly-linked list) test complete; %i failures\0A\00"
@str = [79 x i8] c"running dlist (doubly-linked list) test... (for best results run in valgrind!)\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @dlist_test(i32 0)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ handle_CONT(int /*<<< orphan*/);
int gen_CONT() { handle_CONT(0); }


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

x86 assembly (clang, -O2):
<gen_CONT>:
xor    %edi,%edi
jmp    1030 <handle_CONT@plt>

LLVM IR (-O0):
define i32 @gen_CONT() {
%1 = alloca i32
%2 = call i32 @handle_CONT(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @gen_CONT() {
%1 = tail call i32 @handle_CONT(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ gmx_rmsf(int, char **);
int main(int argc, char *argv[]) {
  gmx_rmsf(argc, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_rmsf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_rmsf(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
double sqrt(double);
double Double_sqrt(double x) { return sqrt(x); }


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

x86 assembly (clang, -O2):
<Double_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <Double_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @Double_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x96() {
  Assert_real((islower(150) == 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_islower.c",
              755, ("islower should be 0 for 0x96"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x96>:
push   %rax
mov    $0x96,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f3,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x96\00"
define void @t_islower_0x96() {
%1 = call i64 @islower(i32 150)
%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 755, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x96\00"
define void @t_islower_0x96() {
%1 = tail call i64 @islower(i32 150)
%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 755, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int *malloc(int);
int *my_malloc() {
  int *p = malloc(12);
  return p;
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_malloc>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @my_malloc() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
ret i32* %3
}

LLVM IR (-O2):
define noalias i32* @my_malloc() {
%1 = tail call i32* @malloc(i32 12)
ret i32* %1
}
/* Variables and functions */
int rand();
int RandomBool(void) { return rand() % 2; }


x86 assembly (clang, -O0):
<RandomBool>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomBool>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @RandomBool() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @RandomBool() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}
void StringCopy(char *to, char *from) {
  for (; (*to = *from) != 0; ++from, ++to)
    ;
}


x86 assembly (clang, -O0):
<StringCopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1146 <StringCopy+0x46>
jmp    1129 <StringCopy+0x29>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <StringCopy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringCopy>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     111f <StringCopy+0x1f>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <StringCopy+0x10>
ret

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

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