xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcopy(char *, char *);
int main() {
  char *str1 = "my name is conor";
  char *str2 = "my name is patri";
  strcopy(str1, str2);
  printf("%s", str2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcopy@plt>
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xee2(%rip),%rbx
mov    %rbx,%rsi
call   1040 <strcopy@plt>
lea    0xee4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"my name is conor\00"
@.str.1 = [17 x i8] c"my name is patri\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strcopy(i8* %3, i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"my name is conor\00"
@.str.1 = [17 x i8] c"my name is patri\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @strcopy(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ini__trim_left(char *);
char *ini__trim_right(int /*<<< orphan*/);
char *ini__trim(char *str) { return ini__trim_right(ini__trim_left(str)); }


x86 assembly (clang, -O0):
<ini__trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ini__trim_left@plt>
mov    %eax,%edi
call   1030 <ini__trim_right@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini__trim>:
push   %rax
call   1040 <ini__trim_left@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ini__trim_right@plt>

LLVM IR (-O0):
define i8* @ini__trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ini__trim_left(i8* %3)
%5 = call i8* @ini__trim_right(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @ini__trim(i8* %0) {
%2 = tail call i32 @ini__trim_left(i8* %0)
%3 = tail call i8* @ini__trim_right(i32 %2)
ret i8* %3
}
void TOSH_MAKE_PW4_OUTPUT() { ; }


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

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

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

LLVM IR (-O2):
define void @TOSH_MAKE_PW4_OUTPUT() {
ret void
}
unsigned long lwz(unsigned char rd, unsigned short d, unsigned char ra) {
  return (32 << 26) | (rd << 21) | (ra << 16) | d;
}


x86 assembly (clang, -O0):
<lwz>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %si,%cx
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cx,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x15,%eax
or     $0x80000000,%eax
movzbl -0x5(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzwl -0x4(%rbp),%ecx
or     %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwz>:
shl    $0x15,%edi
shl    $0x10,%edx
or     %esi,%edi
or     %edx,%edi
or     $0x80000000,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @lwz(i8 zeroext %0, i16 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i16
%6 = alloca i8
store i8 %0, i8* %4
store i16 %1, i16* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 21
%10 = or i32 -2147483648, %9
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 16
%14 = or i32 %10, %13
%15 = load i16, i16* %5
%16 = zext i16 %15 to i32
%17 = or i32 %14, %16
%18 = sext i32 %17 to i64
ret i64 %18
}

LLVM IR (-O2):
define i64 @lwz(i8 zeroext %0, i16 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %0 to i32
%5 = shl nuw nsw i32 %4, 21
%6 = zext i8 %2 to i32
%7 = shl nuw nsw i32 %6, 16
%8 = zext i16 %1 to i32
%9 = or i32 %5, %8
%10 = or i32 %9, %7
%11 = or i32 %10, -2147483648
%12 = sext i32 %11 to i64
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void lcd_goto(unsigned char mesto) { putchar('\n'); }


x86 assembly (clang, -O0):
<lcd_goto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_goto>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @lcd_goto(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @lcd_goto(i8 zeroext %0) {
%2 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int main(void) {
  int *p = malloc(sizeof(int));
  *p = 5;
  free(p);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
store i32 5, i32* %1
%2 = tail call i32 @free(i32* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct riku_devfs_node {
  int dummy;
};

/* Variables and functions */
int initramfs_write(struct riku_devfs_node *self, const char *buf,
                    uint32_t count) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.riku_devfs_node = type { i32 }
define i32 @initramfs_write(%struct.riku_devfs_node* %0, i8* %1, i32 %2) {
%4 = alloca %struct.riku_devfs_node*
%5 = alloca i8*
%6 = alloca i32
store %struct.riku_devfs_node* %0, %struct.riku_devfs_node** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.riku_devfs_node = type { i32 }
define i32 @initramfs_write(%struct.riku_devfs_node* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err_exit(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void *malloc(size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p == NULL && size != 0)
    err_exit("malloc failed: %s", strerror(errno));
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <xmalloc+0x4b>
cmpq   $0x0,-0x8(%rbp)
je     117b <xmalloc+0x4b>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe8a(%rip),%rdi
call   1040 <err_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1165 <xmalloc+0x35>
test   %r14,%r14
jne    1165 <xmalloc+0x35>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <err_exit@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"malloc failed: %s\00"
@errno = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %15
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* @errno
%13 = call i32 @strerror(i32 %12)
%14 = call i32 @err_exit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %8, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [18 x i8] c"malloc failed: %s\00"
@errno = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = tail call i32 @strerror(i32 %7)
%9 = tail call i32 @err_exit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %6, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_TYPE_UNSPEC;
int bpf_create_map(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int /*<<< orphan*/);
int create_map(void) {
  long long key, value = 0;
  int map_fd;
  map_fd =
      bpf_create_map(BPF_MAP_TYPE_UNSPEC, sizeof(key), sizeof(value), 1024);
  if (map_fd < 0) {
    printf("failed to create map '%s'\n", strerror(errno));
  }
  return map_fd;
}


x86 assembly (clang, -O0):
<create_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x10(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%edx
mov    $0x400,%ecx
mov    %edx,%esi
call   1040 <bpf_create_map@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1184 <create_map+0x54>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %rax,%rsi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_map>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%esi
mov    $0x8,%edx
mov    $0x400,%ecx
call   1040 <bpf_create_map@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1171 <create_map+0x41>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@BPF_MAP_TYPE_UNSPEC = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
store i64 0, i64* %2
%4 = load i32, i32* @BPF_MAP_TYPE_UNSPEC
%5 = call i32 @bpf_create_map(i32 %4, i32 8, i32 8, i32 1024)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = load i32, i32* @errno
%10 = call i8* @strerror(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %0
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@BPF_MAP_TYPE_UNSPEC = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map() {
%1 = load i32, i32* @BPF_MAP_TYPE_UNSPEC
%2 = tail call i32 @bpf_create_map(i32 %1, i32 8, i32 8, i32 1024)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char str[20];
  printf("before_text_with_more_than_one_characters\rgeeksforgeeks");
  printf("\nabcd");
  printf("\bsi");
  printf("%d", (13 & 1));
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [56 x i8] c"before_text_with_more_than_one_characters\0Dgeeksforgeeks\00"
@.str.1 = [6 x i8] c"\0Aabcd\00"
@.str.2 = [4 x i8] c"\08si\00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret i32 1
}

LLVM IR (-O2):
@.str = [56 x i8] c"before_text_with_more_than_one_characters\0Dgeeksforgeeks\00"
@.str.1 = [6 x i8] c"\0Aabcd\00"
@.str.2 = [4 x i8] c"\08si\00"
@.str.3 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 1)
ret i32 1
}
/* Variables and functions */
int close(int);
int qSocketClose(int sockfd) { return close(sockfd); }


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

x86 assembly (clang, -O2):
<qSocketClose>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @qSocketClose(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EVIOCRMFF;
int ioctl(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int ffmemless_erase_effect(int effect_id, int device_file) {
  if (ioctl(device_file, EVIOCRMFF, effect_id) == -1) {
    perror("Vibra erase effect");
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<ffmemless_erase_effect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1163 <ffmemless_erase_effect+0x43>
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <ffmemless_erase_effect+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffmemless_erase_effect>:
push   %rax
mov    %esi,%eax
mov    %edi,%edx
mov    0x2eac(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <ioctl@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     1140 <ffmemless_erase_effect+0x20>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EVIOCRMFF = global i32 0
@.str = [19 x i8] c"Vibra erase effect\00"
define i32 @ffmemless_erase_effect(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* @EVIOCRMFF
%8 = load i32, i32* %4
%9 = call i32 @ioctl(i32 %6, i32 %7, i32 %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@EVIOCRMFF = global i32 0
@.str = [19 x i8] c"Vibra erase effect\00"
define i32 @ffmemless_erase_effect(i32 %0, i32 %1) {
%3 = load i32, i32* @EVIOCRMFF
%4 = tail call i32 @ioctl(i32 %1, i32 %3, i32 %0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
char ipc_read_one(int fd) {
  char resp;
  if (fd < 0)
    return 0;
  if (read(fd, &resp, 1) != 1) {
    perror("read");
    return 0;
  }
  return resp;
}


x86 assembly (clang, -O0):
<ipc_read_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    113e <ipc_read_one+0x1e>
movb   $0x0,-0x1(%rbp)
jmp    1173 <ipc_read_one+0x53>
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
je     116d <ipc_read_one+0x4d>
lea    0xea1(%rip),%rdi
call   1040 <perror@plt>
movb   $0x0,-0x1(%rbp)
jmp    1173 <ipc_read_one+0x53>
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipc_read_one>:
push   %rax
test   %edi,%edi
js     114b <ipc_read_one+0x2b>
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    113f <ipc_read_one+0x1f>
mov    0x7(%rsp),%al
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"read\00"
define signext i8 @ipc_read_one(i32 %0) {
%2 = alloca i8
%3 = icmp slt i32 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = call i32 @read(i32 %0, i8* %2, i32 1)
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %4
%10 = load i8, i8* %2
br label %11
11: ; preds = %1, %9, %7
%12 = phi i8 [ 0, %7 ], [ %10, %9 ], [ 0, %1 ]
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
void __DSVERIFIER_assume(int expression) { __VERIFIER_assume(expression); }


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

x86 assembly (clang, -O2):
<__DSVERIFIER_assume>:
jmp    1030 <__VERIFIER_assume@plt>

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

LLVM IR (-O2):
define void @__DSVERIFIER_assume(i32 %0) {
%2 = tail call i32 @__VERIFIER_assume(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ modular_power(int, int, int);
int get_right_side_result(int a, int b, int module, int x) {
  int result = 0;
  result += modular_power(x, 3, module);
  result += (a * x);
  result += b;
  result = result % module;
  return result;
}


x86 assembly (clang, -O0):
<get_right_side_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    $0x3,%esi
call   1030 <modular_power@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_right_side_result>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%r15d
mov    %esi,%r14d
mov    %edi,%ebp
mov    %ecx,%edi
mov    $0x3,%esi
call   1030 <modular_power@plt>
imul   %ebx,%ebp
add    %r14d,%ebp
add    %ebp,%eax
cltd
idiv   %r15d
mov    %edx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_right_side_result(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 0, i32* %9
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = call i64 @modular_power(i32 %10, i32 3, i32 %11)
%13 = load i32, i32* %9
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %9
%17 = load i32, i32* %5
%18 = load i32, i32* %8
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %9
%21 = add nsw i32 %20, %19
store i32 %21, i32* %9
%22 = load i32, i32* %6
%23 = load i32, i32* %9
%24 = add nsw i32 %23, %22
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = load i32, i32* %7
%27 = srem i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %9
ret i32 %28
}

LLVM IR (-O2):
define i32 @get_right_side_result(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i64 @modular_power(i32 %3, i32 3, i32 %2)
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %3, %0
%8 = add i32 %7, %1
%9 = add i32 %8, %6
%10 = srem i32 %9, %2
ret i32 %10
}
int test_imm_9Duint16_reg(unsigned short val) {
  return ((val) & (-0x9D << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Duint16_reg>:
test   $0xff63,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Duint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -157
%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_9Duint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -157
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *get_input_line(int /*<<< orphan*/);
int /*<<< orphan*/ player_command(char *);
int /*<<< orphan*/ stdin;
handle_the_player() {
  char *player_line;
  while ((player_line = get_input_line(stdin)) != 0)
    player_command(player_line);
}


x86 assembly (clang, -O0):
<handle_the_player>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <get_input_line@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1152 <handle_the_player+0x32>
mov    -0x10(%rbp),%rdi
call   1030 <player_command@plt>
jmp    1128 <handle_the_player+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_the_player>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edi
call   1040 <get_input_line@plt>
test   %rax,%rax
je     1146 <handle_the_player+0x26>
mov    %rax,%rdi
call   1030 <player_command@plt>
jmp    1130 <handle_the_player+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @handle_the_player() {
%1 = alloca i32
%2 = alloca i8*
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* @stdin
%5 = call i8* @get_input_line(i32 %4)
store i8* %5, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = call i32 @player_command(i8* %8)
br label %3
10: ; preds = %3
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @handle_the_player() {
%1 = load i32, i32* @stdin
%2 = tail call i8* @get_input_line(i32 %1)
%3 = icmp eq i8* %2, null
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i8* [ %8, %4 ], [ %2, %0 ]
%6 = tail call i32 @player_command(i8* %5)
%7 = load i32, i32* @stdin
%8 = tail call i8* @get_input_line(i32 %7)
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ yield();
void changer() {
  printf("\n>>> on change de contexte !!! <<<\n");
  yield();
}


x86 assembly (clang, -O0):
<changer>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <yield@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<changer>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <yield@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"\0A>>> on change de contexte !!! <<<\0A\00"
define void @changer() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @yield()
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"\0A>>> on change de contexte !!! <<<\00"
define void @changer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @yield()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned long long);
int main() {
  unsigned long long n = 1;
  int i;
  for (i = 1; i <= 64; i++) {
    n = n << 1;
    printf("2^%d -> %llu \n", i, n);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jg     1165 <main+0x55>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112e <main+0x1e>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebx
mov    $0x1,%ebp
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
add    %rbx,%rbx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x41,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"2^%d -> %llu \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i64 1, i64* %2
store i32 1, i32* %3
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 64
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i64, i64* %2
%9 = shl i64 %8, 1
store i64 %9, i64* %2
%10 = load i32, i32* %3
%11 = load i64, i64* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i64 %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"2^%d -> %llu \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = phi i64 [ 1, %0 ], [ %4, %1 ]
%4 = shl i64 %3, 1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2, i64 %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 65
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_config_save(int);
int /*<<< orphan*/ roadmap_preferences_ok(char const *, void *);
void roadmap_preferences_force(const char *name, void *data) {
  roadmap_preferences_ok(name, data);
  roadmap_config_save(1);
}


x86 assembly (clang, -O0):
<roadmap_preferences_force>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <roadmap_preferences_ok@plt>
mov    $0x1,%edi
call   1040 <roadmap_config_save@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_preferences_force>:
push   %rax
call   1030 <roadmap_preferences_ok@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <roadmap_config_save@plt>

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

LLVM IR (-O2):
define void @roadmap_preferences_force(i8* %0, i8* %1) {
%3 = tail call i32 @roadmap_preferences_ok(i8* %0, i8* %1)
%4 = tail call i32 @roadmap_config_save(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void logerr(const char *str) { fprintf(stderr, "ERROR: %s\n", str); }


x86 assembly (clang, -O0):
<logerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logerr>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @logerr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @logerr(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
char *config_deblank(char *str) {
  char *out = str;
  char *put = str;
  for (; *str != '\0'; ++str) {
    if (*str != ' ' && *str != '\n')
      *put++ = *str;
  }
  *put = '\0';
  return out;
}


x86 assembly (clang, -O0):
<config_deblank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1175 <config_deblank+0x75>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     115f <config_deblank+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     115f <config_deblank+0x5f>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1164 <config_deblank+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <config_deblank+0x18>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_deblank>:
mov    %rdi,%rax
mov    %rdi,%rdx
mov    %rdi,%rsi
jmp    1114 <config_deblank+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
movzbl (%rdx),%ecx
cmp    $0xa,%cl
je     1110 <config_deblank+0x10>
cmp    $0x20,%cl
je     1110 <config_deblank+0x10>
test   %cl,%cl
je     112d <config_deblank+0x2d>
mov    %cl,(%rsi)
add    $0x1,%rsi
jmp    1110 <config_deblank+0x10>
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define i8* @config_deblank(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %2
store i8* %6, i8** %4
br label %7
7: ; preds = %28, %1
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %31
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 32
br i1 %16, label %17, label %27
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 10
br i1 %21, label %22, label %27
22: ; preds = %17
%23 = load i8*, i8** %2
%24 = load i8, i8* %23
%25 = load i8*, i8** %4
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %4
store i8 %24, i8* %25
br label %27
27: ; preds = %22, %17, %12
br label %28
28: ; preds = %27
%29 = load i8*, i8** %2
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %2
br label %7
31: ; preds = %7
%32 = load i8*, i8** %4
store i8 0, i8* %32
%33 = load i8*, i8** %3
ret i8* %33
}

LLVM IR (-O2):
define i8* @config_deblank(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 32, label %8
i8 10, label %8
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %5, i8* %4
br label %8
8: ; preds = %2, %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
store i8 0, i8* %4
ret i8* %0
}
void c2i_ASN1_OBJECT(void) {}


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

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

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

LLVM IR (-O2):
define void @c2i_ASN1_OBJECT() {
ret void
}
int binop_s32(int x, int y) {
  int a;
  a = a + x;
  a = a / y;
  a = a * x;
  a = a - y;
  return a;
}


x86 assembly (clang, -O0):
<binop_s32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<binop_s32>:
mov    %esi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @binop_s32(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
ret i32 %3
}
/* Variables and functions */
double exp2(double);
__attribute__((__weak__, __always___)) double softboundmpx_exp2(double x) {
  return exp2(x);
}


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

x86 assembly (clang, -O2):
<softboundmpx_exp2>:
jmp    1030 <exp2@plt>

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

LLVM IR (-O2):
define weak double @softboundmpx_exp2(double %0) {
%2 = tail call double @exp2(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ AuxMagSensorHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void AuxMagSensorLogging() { UAVObjLogging(AuxMagSensorHandle()); }


x86 assembly (clang, -O0):
<AuxMagSensorLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <AuxMagSensorHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AuxMagSensorLogging>:
push   %rax
xor    %eax,%eax
call   1040 <AuxMagSensorHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @AuxMagSensorLogging() {
%1 = call i32 (...) @AuxMagSensorHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AuxMagSensorLogging() {
%1 = tail call i32 (...) @AuxMagSensorHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Variables and functions */
char *__builtin_strncpy(char *, char const *, size_t);
char *strncpy(char *dest, char const *src, size_t cnt) {
  return __builtin_strncpy(dest, src, cnt);
}


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

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

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

LLVM IR (-O2):
define noalias i8* @strncpy(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
br label %4
4: ; preds = %4, %3
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ kpchar(unsigned char);
void kprints(unsigned char *s) {
  int index = 0;
  while (s[index] != 0) {
    kpchar(s[index]);
    index++;
  }
}


x86 assembly (clang, -O0):
<kprints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <kprints+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <kpchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <kprints+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kprints>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <kprints+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movzbl %al,%edi
call   1030 <kpchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <kprints+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kprints(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @kpchar(i8 zeroext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int another_file(int b) { return 5; }


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

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

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

LLVM IR (-O2):
define i32 @another_file(i32 %0) {
ret i32 5
}
void enable_fp_exceptions() {}


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

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

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

LLVM IR (-O2):
define void @enable_fp_exceptions() {
ret void
}
/* Variables and functions */
scalar_t__ isdigit(unsigned char volatile);
int t_isdigit(char ch) {
  volatile char xc = ch;
  volatile unsigned char xuc = ch;
  return isdigit(xc) && isdigit(xuc);
}


x86 assembly (clang, -O0):
<t_isdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%al
movzbl %al,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x4(%rbp)
je     115c <t_isdigit+0x4c>
mov    -0x3(%rbp),%al
movzbl %al,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %dil,0x6(%rsp)
movzbl 0x7(%rsp),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1141 <t_isdigit+0x31>
movzbl 0x6(%rsp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @t_isdigit(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
%5 = load i8, i8* %2
store volatile i8 %5, i8* %3
%6 = load i8, i8* %2
store volatile i8 %6, i8* %4
%7 = load volatile i8, i8* %3
%8 = call i64 @isdigit(i8 zeroext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load volatile i8, i8* %4
%12 = call i64 @isdigit(i8 zeroext %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %1
%15 = phi i1 [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @t_isdigit(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store volatile i8 %0, i8* %2
store volatile i8 %0, i8* %3
%4 = load volatile i8, i8* %2
%5 = tail call i64 @isdigit(i8 zeroext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load volatile i8, i8* %3
%9 = tail call i64 @isdigit(i8 zeroext %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %7, %1
%13 = phi i32 [ 0, %1 ], [ %11, %7 ]
ret i32 %13
}
void literal_string2_Good() {
  int a[1];
  char s[] = "hello";
  for (int i = 0; i < 5; i++) {
    if (s[i] > 'o') {
      a[s[i]] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<literal_string2_Good>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xef0(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1160 <literal_string2_Good+0x60>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x6f,%eax
jle    114d <literal_string2_Good+0x4d>
movslq -0x10(%rbp),%rax
movsbq -0xa(%rbp,%rax,1),%rax
movl   $0x0,-0x4(%rbp,%rax,4)
jmp    1152 <literal_string2_Good+0x52>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111f <literal_string2_Good+0x1f>
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.literal_string2_Good.s = [6 x i8] c"hello\00"
define void @literal_string2_Good() {
%1 = alloca [1 x i32]
%2 = alloca [6 x i8]
%3 = alloca i32
%4 = bitcast [6 x i8]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %23, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %26
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 111
br i1 %14, label %15, label %22
15: ; preds = %8
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i64
%21 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 %20
store i32 0, i32* %21
br label %22
22: ; preds = %15, %8
br label %23
23: ; preds = %22
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %5
26: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @literal_string2_Good() {
ret void
}
/* Variables and functions */
void *calloc(unsigned long, int);
int /*<<< orphan*/ free(void *);
void f4(int i) {
  unsigned long j;
  j = 10;
  if (i < 0) {
    void *ptr = calloc(j, i);
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0xa,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1156 <f4+0x36>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
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):
<f4>:
test   %edi,%edi
js     1125 <f4+0x5>
ret
push   %rax
mov    %edi,%esi
mov    $0xa,%edi
call   1040 <calloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @f4(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i8*
store i32 %0, i32* %2
store i64 10, i64* %3
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i64, i64* %3
%9 = load i32, i32* %2
%10 = call i8* @calloc(i64 %8, i32 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @free(i8* %11)
br label %13
13: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @f4(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i8* @calloc(i64 10, i32 %0)
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
float debuginator__lerp(float a, float b, float t) {
  return a * (1 - t) + b * t;
}


x86 assembly (clang, -O0):
<debuginator__lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm2
subss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<debuginator__lerp>:
movss  0xef8(%rip),%xmm3
subss  %xmm2,%xmm3
mulss  %xmm2,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @debuginator__lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fsub float 1.000000e+00, %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = call float @llvm.fmuladd.f32(float %7, float %9, float %12)
ret float %13
}

LLVM IR (-O2):
define float @debuginator__lerp(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %2
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %5)
ret float %6
}