xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int main() {
  char s1[50], s2[50];
  strcpy(s1, "Tweedledee ");
  strcpy(s2, "Tweedledum");
  strncat(s1, s2, 7);
  puts(s1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    $0x7,%edx
call   1050 <strncat@plt>
lea    -0x40(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xec2(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x7,%edx
call   1050 <strncat@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Tweedledee \00"
@.str.1 = [11 x i8] c"Tweedledum\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca [50 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%10 = call i32 @strncat(i8* %8, i8* %9, i32 7)
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%12 = call i32 @puts(i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Tweedledee \00"
@.str.1 = [11 x i8] c"Tweedledum\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @strncat(i8* %3, i8* %4, i32 7)
%8 = call i32 @puts(i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wfd_cfg_op_channel_usage(void) {
  printf("Usage : wfd_cfg_op_channel [OperatingChannel]\n");
  printf("If OperatingChannel parameter is provided, 'set' is performed "
         "otherwise 'get' is performed.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wfd_cfg_op_channel_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Usage : wfd_cfg_op_channel [OperatingChannel]\0A\00"
@.str.1 = [93 x i8] c"If OperatingChannel parameter is provided, 'set' is performed otherwise 'get' is performed.\0A\00"
define void @print_wfd_cfg_op_channel_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"Usage : wfd_cfg_op_channel [OperatingChannel]\00"
@str.2 = [92 x i8] c"If OperatingChannel parameter is provided, 'set' is performed otherwise 'get' is performed.\00"
define void @print_wfd_cfg_op_channel_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *strdup(char const *);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
char *xstrdup(const char *str) {
  char *rv = strdup(str);
  char *msg;
  if (rv)
    return rv;
  msg = "mdadm"
        ": memory allocation failure - aborting\n";
  exit(4 + !!write(2, msg, strlen(msg)));
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116e <xstrdup+0x2e>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
lea    0xe8b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
add    $0x4,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
call   1060 <strdup@plt>
test   %rax,%rax
je     114d <xstrdup+0xd>
pop    %rbx
ret
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
mov    $0x5,%edi
sbb    $0x0,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"mdadm: memory allocation failure - aborting\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %3
ret i8* %10
11: ; preds = %1
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8** %4
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
%15 = call i32 @write(i32 2, i8* %12, i32 %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = add nsw i32 4, %19
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@.str = [45 x i8] c"mdadm: memory allocation failure - aborting\0A\00"
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = tail call i32 @strlen(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 4, i32 5
%10 = tail call i32 @exit(i32 %9)
unreachable
}
int ft_find_base(char c, char *base) {
  int count;
  count = 0;
  while (base[count] != '\0') {
    if (c == base[count])
      return (count);
    count++;
  }
  return (-1);
}


x86 assembly (clang, -O0):
<ft_find_base>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115b <ft_find_base+0x5b>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    114d <ft_find_base+0x4d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <ft_find_base+0x62>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <ft_find_base+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_find_base>:
mov    (%rsi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <ft_find_base+0x22>
xor    %ecx,%ecx
nopl   (%rax)
cmp    %dil,%dl
je     1123 <ft_find_base+0x23>
movzbl 0x1(%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_find_base+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_find_base(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %9
%6 = phi i64 [ %10, %9 ], [ 0, %2 ]
%7 = phi i8 [ %12, %9 ], [ %3, %2 ]
%8 = icmp eq i8 %7, %0
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %1, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %16, label %5
14: ; preds = %5
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %9, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %9 ]
ret i32 %17
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t ec_double_sm2(uint64_t R[12], uint64_t S[12]) {
  R[0] = S[2] + S[6];
  return 0;
}


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

x86 assembly (clang, -O2):
<ec_double_sm2>:
mov    0x30(%rsi),%rax
add    0x10(%rsi),%rax
mov    %rax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @ec_double_sm2(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = getelementptr inbounds i64, i64* %5, i64 2
%7 = load i64, i64* %6
%8 = load i64*, i64** %4
%9 = getelementptr inbounds i64, i64* %8, i64 6
%10 = load i64, i64* %9
%11 = add nsw i64 %7, %10
%12 = load i64*, i64** %3
%13 = getelementptr inbounds i64, i64* %12, i64 0
store i64 %11, i64* %13
ret i64 0
}

LLVM IR (-O2):
define i64 @ec_double_sm2(i64* nocapture writeonly %0, i64* nocapture %1) {
%3 = getelementptr inbounds i64, i64* %1, i64 2
%4 = load i64, i64* %3
%5 = getelementptr inbounds i64, i64* %1, i64 6
%6 = load i64, i64* %5
%7 = add nsw i64 %6, %4
store i64 %7, i64* %0
ret i64 0
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_AY_DI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_di(void) {
  m68ki_write_8(EA_AY_DI_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_di>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_DI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_CS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scs_8_di>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_DI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_CS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scs_8_di() {
%1 = call i32 (...) @EA_AY_DI_8()
%2 = call i64 (...) @COND_CS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scs_8_di() {
%1 = tail call i32 (...) @EA_AY_DI_8()
%2 = tail call i64 (...) @COND_CS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello2();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, world!\n");
  hello2();
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <hello2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @hello2()
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @hello2()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int readword(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int mustreadword(FILE *fp) {
  int w;
  w = readword(fp);
  if (w == -1) {
    fprintf(stderr, "Unexpected end of file!\n");
    exit(1);
  }
  return w;
}


x86 assembly (clang, -O0):
<mustreadword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <readword@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1171 <mustreadword+0x41>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mustreadword>:
push   %rax
call   1050 <readword@plt>
cmp    $0xffffffff,%eax
je     113d <mustreadword+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"Unexpected end of file!\0A\00"
define i32 @mustreadword(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @readword(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"Unexpected end of file!\0A\00"
define i32 @mustreadword(i32* %0) {
%2 = tail call i32 @readword(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort_crypto_lib(char *);
void check_valid_symmetric_encrypted_item_size(int size) {
  if (size <= 1 + 32)
    abort_crypto_lib("Illegal size for symmetric encrypted item");
}


x86 assembly (clang, -O0):
<check_valid_symmetric_encrypted_item_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jg     1131 <check_valid_symmetric_encrypted_item_size+0x21>
lea    0xed4(%rip),%rdi
call   1030 <abort_crypto_lib@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_valid_symmetric_encrypted_item_size>:
cmp    $0x21,%edi
jg     1121 <check_valid_symmetric_encrypted_item_size+0x11>
lea    0xee4(%rip),%rdi
jmp    1030 <abort_crypto_lib@plt>
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Illegal size for symmetric encrypted item\00"
define void @check_valid_symmetric_encrypted_item_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 33
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Illegal size for symmetric encrypted item\00"
define void @check_valid_symmetric_encrypted_item_size(i32 %0) {
%2 = icmp slt i32 %0, 34
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i = 3.2f;
  printf("%d\n", i);
  return 0;
}


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)
movl   $0x3,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\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
store i32 3, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_bezier3(float *, float *, float *, float *, float);
__attribute__((always_)) struct vec2 *psvec2_bezier3(struct vec2 *result,
                                                     struct vec2 *a,
                                                     struct vec2 *b,
                                                     struct vec2 *c, float p) {
  vec2_bezier3((float *)result, (float *)a, (float *)b, (float *)c, p);
  return result;
}


x86 assembly (clang, -O0):
<psvec2_bezier3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movss  -0x24(%rbp),%xmm0
call   1030 <vec2_bezier3@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2_bezier3>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_bezier3@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_bezier3(%struct.vec2* %0, %struct.vec2* %1, %struct.vec2* %2, %struct.vec2* %3, float %4) {
%6 = alloca %struct.vec2*
%7 = alloca %struct.vec2*
%8 = alloca %struct.vec2*
%9 = alloca %struct.vec2*
%10 = alloca float
store %struct.vec2* %0, %struct.vec2** %6
store %struct.vec2* %1, %struct.vec2** %7
store %struct.vec2* %2, %struct.vec2** %8
store %struct.vec2* %3, %struct.vec2** %9
store float %4, float* %10
%11 = load %struct.vec2*, %struct.vec2** %6
%12 = bitcast %struct.vec2* %11 to float*
%13 = load %struct.vec2*, %struct.vec2** %7
%14 = bitcast %struct.vec2* %13 to float*
%15 = load %struct.vec2*, %struct.vec2** %8
%16 = bitcast %struct.vec2* %15 to float*
%17 = load %struct.vec2*, %struct.vec2** %9
%18 = bitcast %struct.vec2* %17 to float*
%19 = load float, float* %10
%20 = call i32 @vec2_bezier3(float* %12, float* %14, float* %16, float* %18, float %19)
%21 = load %struct.vec2*, %struct.vec2** %6
ret %struct.vec2* %21
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_bezier3(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2, %struct.vec2* %3, float %4) {
%6 = bitcast %struct.vec2* %0 to float*
%7 = bitcast %struct.vec2* %1 to float*
%8 = bitcast %struct.vec2* %2 to float*
%9 = bitcast %struct.vec2* %3 to float*
%10 = tail call i32 @vec2_bezier3(float* %6, float* %7, float* %8, float* %9, float %4)
ret %struct.vec2* %0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int _wymum(int, int);
uint64_t _wymix(uint64_t A, uint64_t B) { return (A ^ B) ^ _wymum(A, B); }


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

x86 assembly (clang, -O2):
<_wymix>:
push   %rbx
mov    %esi,%ebx
xor    %edi,%ebx
call   1030 <_wymum@plt>
xor    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_wymix(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 = xor i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @_wymum(i32 %8, i32 %9)
%11 = xor i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @_wymix(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = tail call i32 @_wymum(i32 %0, i32 %1)
%5 = xor i32 %3, %4
ret i32 %5
}
int MIN(int a, int b) { return (a < b ? a : b); }


x86 assembly (clang, -O0):
<MIN>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <MIN+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <MIN+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIN>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @MIN(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 slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @MIN(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ucontext_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<swapcontext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapcontext>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @swapcontext(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
int xmlUCSIsCatPf(int code) {
  return ((code == 0xbb) || (code == 0x2019) || (code == 0x201d) ||
          (code == 0x203a));
}


x86 assembly (clang, -O0):
<xmlUCSIsCatPf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xbb,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114a <xmlUCSIsCatPf+0x4a>
mov    $0x1,%al
cmpl   $0x2019,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114a <xmlUCSIsCatPf+0x4a>
mov    $0x1,%al
cmpl   $0x201d,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     114a <xmlUCSIsCatPf+0x4a>
cmpl   $0x203a,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsCatPf>:
mov    $0x1,%eax
cmp    $0xbb,%edi
je     1128 <xmlUCSIsCatPf+0x28>
cmp    $0x2019,%edi
je     1128 <xmlUCSIsCatPf+0x28>
cmp    $0x201d,%edi
je     1128 <xmlUCSIsCatPf+0x28>
xor    %eax,%eax
cmp    $0x203a,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCatPf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 187
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 8217
br i1 %7, label %14, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 8221
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 8250
br label %14
14: ; preds = %11, %8, %5, %1
%15 = phi i1 [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @xmlUCSIsCatPf(i32 %0) {
switch i32 %0, label %2 [
i32 8221, label %5
i32 8217, label %5
i32 187, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 8250
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
void DDI8SetValBit(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Byte,
                   uint16_t ui16Mask, uint16_t ui16Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ;
  ;
  ui32RegOffset = 0x00000300 + (ui32Reg << 1) + (ui32Byte << 1);
  (*((volatile unsigned short *)(ui32Base + ui32RegOffset))) =
      (ui16Mask << 8) | ui16Val;
}


x86 assembly (clang, -O0):
<DDI8SetValBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x300,%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
or     -0x14(%rbp),%eax
mov    %ax,%cx
mov    -0x4(%rbp),%eax
add    -0x18(%rbp),%eax
cltq
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DDI8SetValBit>:
shl    $0x8,%ecx
or     %r8d,%ecx
add    %edx,%esi
lea    (%rdi,%rsi,2),%eax
add    $0x300,%eax
cltq
mov    %cx,(%rax)
ret

LLVM IR (-O0):
define void @DDI8SetValBit(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %7
%13 = shl i32 %12, 1
%14 = add nsw i32 768, %13
%15 = load i32, i32* %8
%16 = shl i32 %15, 1
%17 = add nsw i32 %14, %16
store i32 %17, i32* %11
%18 = load i32, i32* %9
%19 = shl i32 %18, 8
%20 = load i32, i32* %10
%21 = or i32 %19, %20
%22 = trunc i32 %21 to i16
%23 = load i32, i32* %6
%24 = load i32, i32* %11
%25 = add nsw i32 %23, %24
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i16*
store volatile i16 %22, i16* %27
ret void
}

LLVM IR (-O2):
define void @DDI8SetValBit(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 8
%7 = or i32 %6, %4
%8 = trunc i32 %7 to i16
%9 = add i32 %2, %1
%10 = shl i32 %9, 1
%11 = add i32 %0, 768
%12 = add i32 %11, %10
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i16*
store volatile i16 %8, i16* %14
ret void
}
void winSock() {}


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

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

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

LLVM IR (-O2):
define void @winSock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void NOTVALID(void) {
  printf("[ERROR] Reached not valid opcode.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<NOTVALID>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<NOTVALID>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"[ERROR] Reached not valid opcode.\0A\00"
define void @NOTVALID() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [34 x i8] c"[ERROR] Reached not valid opcode.\00"
define void @NOTVALID() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ str_compress(char *);
int main() {
  char str[] = "1111111111111111111geeksforgeeks";
  char str2[] = "AAAABBBCCCCCCDDDEFGHHIJJ";
  printf("InPut: %s\n", str2);
  str_compress(str2);
  printf("output: %s\n", str2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x21,%edx
call   1040 <memcpy@plt>
mov    0xedc(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xed4(%rip),%al
mov    %al,-0x38(%rbp)
lea    -0x50(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1050 <str_compress@plt>
lea    -0x50(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movups 0xedd(%rip),%xmm0
movups %xmm0,0x9(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed6(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <str_compress@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [33 x i8] c"1111111111111111111geeksforgeeks\00"
@__const.main.str2 = [25 x i8] c"AAAABBBCCCCCCDDDEFGHHIJJ\00"
@.str = [11 x i8] c"InPut: %s\0A\00"
@.str.1 = [12 x i8] c"output: %s\0A\00"
define i32 @main() {
%1 = alloca [33 x i8]
%2 = alloca [25 x i8]
%3 = bitcast [33 x i8]* %1 to i8*
%4 = bitcast [25 x i8]* %2 to i8*
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%8 = call i32 @str_compress(i8* %7)
%9 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str2 = [25 x i8] c"AAAABBBCCCCCCDDDEFGHHIJJ\00"
@.str = [11 x i8] c"InPut: %s\0A\00"
@.str.1 = [12 x i8] c"output: %s\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @str_compress(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, long);
void core___core__NativeString___copy_to(char *self, char *p0, long p1, long p2,
                                         long p3) {
  memmove(p0 + p3, self + p2, p1);
RET_LABEL:;
}


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

x86 assembly (clang, -O2):
<core___core__NativeString___copy_to>:
lea    (%rsi,%r8,1),%rax
lea    (%rdi,%rcx,1),%rsi
mov    %rax,%rdi
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @core___core__NativeString___copy_to(i8* %0, i8* %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds i8, i8* %1, i64 %4
%7 = getelementptr inbounds i8, i8* %0, i64 %3
%8 = tail call i32 @memmove(i8* %6, i8* %7, i64 %2)
ret void
}
/* Variables and functions */
int intGreaterThan(void const *, void const *);
int intLessThan(const void *a, const void *b) { return intGreaterThan(b, a); }


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

x86 assembly (clang, -O2):
<intLessThan>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <intGreaterThan@plt>

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

LLVM IR (-O2):
define i32 @intLessThan(i8* %0, i8* %1) {
%3 = tail call i32 @intGreaterThan(i8* %1, i8* %0)
ret i32 %3
}
void X509at_add1_attr_by_txt(void) {}


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

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

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

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

/* Type definitions */
struct TYPE_2__ {
  int join_style;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
void set_XGCValues_join_style(void *_p, int _v) {
  ((XGCValues *)_p)->join_style = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XGCValues_join_style>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XGCValues_join_style(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int iter_range_next(int index, int end) {
  return (end > index) ? ++index : --index;
}


x86 assembly (clang, -O0):
<iter_range_next>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1127 <iter_range_next+0x27>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
jmp    1133 <iter_range_next+0x33>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iter_range_next>:
xor    %eax,%eax
cmp    %edi,%esi
setg   %al
lea    (%rdi,%rax,2),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @iter_range_next(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = add nsw i32 %12, -1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
%15 = phi i32 [ %10, %8 ], [ %13, %11 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @iter_range_next(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 1, i32 -1
%5 = add nsw i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int mocksuspend_acquire_wake_lock(const char *name) {
  printf("mocksuspend acquire wake lock %s\n", name);
  return 0;
}


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

x86 assembly (clang, -O2):
<mocksuspend_acquire_wake_lock>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"mocksuspend acquire wake lock %s\0A\00"
define i32 @mocksuspend_acquire_wake_lock(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"mocksuspend acquire wake lock %s\0A\00"
define i32 @mocksuspend_acquire_wake_lock(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ play_note(int, int, int);
void beep() {
  play_note(200, 32, 100);
  play_note(200, 32, 100);
  play_note(200, 32, 100);
}


x86 assembly (clang, -O0):
<beep>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
call   1030 <play_note@plt>
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
call   1030 <play_note@plt>
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
call   1030 <play_note@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<beep>:
push   %rax
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
call   1030 <play_note@plt>
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
call   1030 <play_note@plt>
mov    $0xc8,%edi
mov    $0x20,%esi
mov    $0x64,%edx
pop    %rax
jmp    1030 <play_note@plt>

LLVM IR (-O0):
define void @beep() {
%1 = call i32 @play_note(i32 200, i32 32, i32 100)
%2 = call i32 @play_note(i32 200, i32 32, i32 100)
%3 = call i32 @play_note(i32 200, i32 32, i32 100)
ret void
}

LLVM IR (-O2):
define void @beep() {
%1 = tail call i32 @play_note(i32 200, i32 32, i32 100)
%2 = tail call i32 @play_note(i32 200, i32 32, i32 100)
%3 = tail call i32 @play_note(i32 200, i32 32, i32 100)
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int shmdt(const void *shmaddr) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @shmdt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @shmdt(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
bool c_isupper(int c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<c_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <c_isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @c_isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @c_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int column(a)
int a;
{ return (a % 9); }


x86 assembly (clang, -O0):
<column>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<column>:
movslq %edi,%rax
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @column(i32 %0) {
%2 = srem i32 %0, 9
ret i32 %2
}
compar(as1, as2) char *as1, *as2;
{
  register char *s1, *s2;
  s1 = as1;
  s2 = as2;
  while (*s1++ == *s2)
    if (*s2++ == 0)
      return (0);
  return (*--s1 - *s2);
}


x86 assembly (clang, -O0):
<compar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl (%rax),%eax
mov    -0x28(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1169 <compar+0x69>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1164 <compar+0x64>
movl   $0x0,-0x4(%rbp)
jmp    1188 <compar+0x88>
jmp    111c <compar+0x1c>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
movsbl -0x1(%rax),%eax
mov    -0x28(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compar>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rdi,%rcx,1),%eax
movsbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <compar+0x27>
add    $0x1,%rcx
test   %al,%al
jne    1110 <compar+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compar(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %10, %9 ]
%5 = phi i8* [ %1, %2 ], [ %11, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = sext i8 %7 to i32
%15 = sext i8 %6 to i32
%16 = sub nsw i32 %15, %14
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ japi_setfontstyle(int, int);
void j_setfontstyle(int arg0, int arg1) { japi_setfontstyle(arg0, arg1); }


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

x86 assembly (clang, -O2):
<j_setfontstyle>:
jmp    1030 <japi_setfontstyle@plt>

LLVM IR (-O0):
define void @j_setfontstyle(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 = call i32 @japi_setfontstyle(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setfontstyle(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setfontstyle(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void secret_DEBUG_LOG(char *message) {
  fprintf(stderr, "DEBUG: %s\n", message);
}


x86 assembly (clang, -O0):
<secret_DEBUG_LOG>:
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):
<secret_DEBUG_LOG>:
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"DEBUG: %s\0A\00"
define void @secret_DEBUG_LOG(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"DEBUG: %s\0A\00"
define void @secret_DEBUG_LOG(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
}