xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ m68ki_exception_1111();
void m68k_op_cpdbcc_32(void) {
  if (0) {

    ;
    return;
  }
  m68ki_exception_1111();
}


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

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

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

LLVM IR (-O2):
define void @m68k_op_cpdbcc_32() {
%1 = tail call i32 (...) @m68ki_exception_1111()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int msgget(int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int Msgget(key_t key, int flag) {
  errno = 0;
  int msgget_s = msgget(key, flag);
  if (msgget_s == -1) {
    perror("msgget faild\n");
    exit(1);
  }
  return msgget_s;
}


x86 assembly (clang, -O0):
<Msgget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2e9b(%rip),%rax
movq   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <msgget@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    117a <Msgget+0x4a>
lea    0xe95(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msgget>:
push   %rax
mov    0x2ea8(%rip),%rax
movq   $0x0,(%rax)
call   1030 <msgget@plt>
cmp    $0xffffffff,%eax
je     114b <Msgget+0x1b>
pop    %rcx
ret
lea    0xeae(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@errno = global i64 0
@.str = [14 x i8] c"msgget faild\0A\00"
define i32 @Msgget(i32 %0, i32 %1) {
store i64 0, i64* @errno
%3 = tail call i32 @msgget(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x25() {
  Assert_real((isodigit(37) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              190, ("isodigit should be 0 for %"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x25>:
push   %rax
mov    $0x25,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xbe,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for %\00"
define void @t_isodigit_0x25() {
%1 = call i64 @isodigit(i32 37)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for %\00"
define void @t_isodigit_0x25() {
%1 = tail call i64 @isodigit(i32 37)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 190, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void tty_navigation_line_up(void) { write(1, "[1F", 4); }


x86 assembly (clang, -O0):
<tty_navigation_line_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_navigation_line_up>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[1F\00"
define void @tty_navigation_line_up() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[1F\00"
define void @tty_navigation_line_up() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc19(void) {
  printf("Executing exitfunc"
         "19"
         ".\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Executing exitfunc19.\0A\00"
define void @exitfunc19() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"Executing exitfunc19.\00"
define void @exitfunc19() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
struct type *CreateType(char *text, struct fieldnode *fields) {
  struct type *newtype;
  struct symbol *newsym;
}


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

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

LLVM IR (-O0):
%struct.type = type opaque
%struct.fieldnode = type opaque
%struct.symbol = type opaque
define %struct.type* @CreateType(i8* %0, %struct.fieldnode* %1) {
%3 = alloca %struct.type*
%4 = alloca i8*
%5 = alloca %struct.fieldnode*
%6 = alloca %struct.type*
%7 = alloca %struct.symbol*
store i8* %0, i8** %4
store %struct.fieldnode* %1, %struct.fieldnode** %5
%8 = load %struct.type*, %struct.type** %3
ret %struct.type* %8
}

LLVM IR (-O2):
%struct.type = type opaque
%struct.fieldnode = type opaque
%struct.symbol = type opaque
define noalias %struct.type* @CreateType(i8* nocapture readnone %0, %struct.fieldnode* nocapture readnone %1) {
ret %struct.type* undef
}
unsigned delay_tick(int count) {
  int i;
  while (count > 0) {
    for (i = 0; i < 100; i++)
      ;
    count--;
  };
  return count;
}


x86 assembly (clang, -O0):
<delay_tick>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1143 <delay_tick+0x43>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1135 <delay_tick+0x35>
jmp    1127 <delay_tick+0x27>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <delay_tick+0x18>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay_tick+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_tick>:
mov    %edi,%eax
sar    $0x1f,%eax
and    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @delay_tick(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
void X509_get_pubkey(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_get_pubkey() {
ret void
}
/* Variables and functions */
double sinh(double);
double csch(double x) { return 1.0 / sinh(x); }


x86 assembly (clang, -O0):
<csch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csch>:
push   %rax
call   1030 <sinh@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @csch(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sinh(double %3)
%5 = fdiv double 1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @csch(double %0) {
%2 = tail call double @sinh(double %0)
%3 = fdiv double 1.000000e+00, %2
ret double %3
}
void _set_destroy(void *p) {}


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

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

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

LLVM IR (-O2):
define void @_set_destroy(i8* nocapture %0) {
ret void
}
char *skip_to_blank(char *s) {
  while (*s != ' ' && *s != '\t' && *s)
    s++;
  return s;
}


x86 assembly (clang, -O0):
<skip_to_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1142 <skip_to_blank+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     1142 <skip_to_blank+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1152 <skip_to_blank+0x52>
jmp    1163 <skip_to_blank+0x63>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_to_blank+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_to_blank>:
mov    %rdi,%rax
movabs $0x100000201,%rcx
jmp    1114 <skip_to_blank+0x14>
nop
add    $0x1,%rax
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1110 <skip_to_blank+0x10>
bt     %rdx,%rcx
jae    1110 <skip_to_blank+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_to_blank(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 32, label %7
i8 9, label %7
i8 0, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
ret i8* %3
}
void w2(void *x, double y) { *(double *)(x + 32766) = y; }


x86 assembly (clang, -O0):
<w2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ffe(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w2>:
movsd  %xmm0,0x7ffe(%rdi)
ret

LLVM IR (-O0):
define void @w2(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32766
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w2(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32766
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fidct_init();
void sbt_init() {
  static int first_pass = 1;
  if (first_pass) {
    fidct_init();
    first_pass = 0;
  }
}


x86 assembly (clang, -O0):
<sbt_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
je     1132 <sbt_init+0x22>
mov    $0x0,%al
call   1030 <fidct_init@plt>
movl   $0x0,0x2ef6(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbt_init>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    1128 <sbt_init+0x18>
xor    %eax,%eax
call   1030 <fidct_init@plt>
movb   $0x1,0x2f04(%rip)
pop    %rax
ret

LLVM IR (-O0):
@sbt_init.first_pass = internal global i32 1
define void @sbt_init() {
%1 = load i32, i32* @sbt_init.first_pass
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @fidct_init()
store i32 0, i32* @sbt_init.first_pass
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@sbt_init.first_pass = internal unnamed_addr global i1 false
define void @sbt_init() {
%1 = load i1, i1* @sbt_init.first_pass
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 (...) @fidct_init()
store i1 true, i1* @sbt_init.first_pass
br label %4
4: ; preds = %2, %0
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strrchr(char *, char);
char *glmDirName(char *path) {
  char *dir;
  char *s;
  dir = (char *)malloc(strlen(path) + 1);
  strcpy(dir, path);
  s = strrchr(dir, '/');
  if (s)
    s[1] = '\0';
  else
    dir[0] = '\0';
  return dir;
}


x86 assembly (clang, -O0):
<glmDirName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     119c <glmDirName+0x5c>
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
jmp    11a3 <glmDirName+0x63>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmDirName>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1050 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
movb   $0x0,(%rcx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @glmDirName(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
%14 = call i8* @strrchr(i8* %13, i8 signext 47)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %1
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8 0, i8* %19
br label %23
20: ; preds = %1
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 0
store i8 0, i8* %22
br label %23
23: ; preds = %20, %17
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @glmDirName(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
%7 = tail call i8* @strrchr(i8* dereferenceable(1) %5, i8 signext 47)
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %5, i8* %9
store i8 0, i8* %10
ret i8* %5
}
int main(int argc, char *argv[]) {
  int i __attribute__((
      custom_attribute_without_args, custom_attribute_with_one_arg(1776),
      custom_attribute_with_one_or_two_args("haberdasher"),
      custom_attribute_with_one_or_two_args("turtle", "bear")));
  return 0;
}


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

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

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void __attribute__((warning(
    "curl_easy_setopt expects a curl_read_callback argument for this option")))
__attribute__((unused)) __attribute__((no))
_curl_easy_setopt_err_read_cb(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_read_cb() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
char *filesize_str(int /*<<< orphan*/);
int /*<<< orphan*/ ht_sum_bw();
char *get_str_bandwidth(void) { return filesize_str(ht_sum_bw()); }


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

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

LLVM IR (-O0):
define i8* @get_str_bandwidth() {
%1 = call i32 (...) @ht_sum_bw()
%2 = call i8* @filesize_str(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define i8* @get_str_bandwidth() {
%1 = tail call i32 (...) @ht_sum_bw()
%2 = tail call i8* @filesize_str(i32 %1)
ret i8* %2
}
void set_pt_pfaa(unsigned long *entry, void *pfaa) {
  *entry &= 0xfffUL;
  *entry |= ((unsigned long)pfaa & (~0xfffUL));
}


x86 assembly (clang, -O0):
<set_pt_pfaa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xfff,%rcx
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rcx
and    $0xfffffffffffff000,%rcx
mov    -0x8(%rbp),%rax
or     (%rax),%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pt_pfaa>:
mov    (%rdi),%rax
and    $0xfff,%eax
and    $0xfffffffffffff000,%rsi
or     %rax,%rsi
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @set_pt_pfaa(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
store i64* %0, i64** %3
store i8* %1, i8** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = and i64 %6, 4095
store i64 %7, i64* %5
%8 = load i8*, i8** %4
%9 = ptrtoint i8* %8 to i64
%10 = and i64 %9, -4096
%11 = load i64*, i64** %3
%12 = load i64, i64* %11
%13 = or i64 %12, %10
store i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
define void @set_pt_pfaa(i64* nocapture %0, i8* %1) {
%3 = load i64, i64* %0
%4 = and i64 %3, 4095
%5 = ptrtoint i8* %1 to i64
%6 = and i64 %5, -4096
%7 = or i64 %4, %6
store i64 %7, i64* %0
ret void
}
/* Variables and functions */
scalar_t__ f(int, int);
int g(void) {
  return f(0xffffffffL, 0xffffffffL) && f(0xffffffffL, 0xffffffffL);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <f@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     114c <g+0x3c>
mov    $0xffffffff,%esi
mov    %esi,%edi
call   1030 <f@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
push   %rax
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <f@plt>
test   %rax,%rax
je     1141 <g+0x31>
mov    $0xffffffff,%edi
mov    $0xffffffff,%esi
call   1030 <f@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 @g() {
%1 = call i64 @f(i32 -1, i32 -1)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 @f(i32 -1, i32 -1)
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @g() {
%1 = tail call i64 @f(i32 -1, i32 -1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @f(i32 -1, i32 -1)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c, x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  c = 0;
  while ((x > 1) && (x < y)) {
    x = x * x;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jle    1155 <main+0x45>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setl   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1165 <main+0x55>
jmp    117d <main+0x6d>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %16, %0
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br label %14
14: ; preds = %10, %7
%15 = phi i1 [ false, %7 ], [ %13, %10 ]
br i1 %15, label %16, label %22
16: ; preds = %14
%17 = load i32, i32* %3
%18 = load i32, i32* %3
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %3
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %7
22: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
double rint(double x) { return (int)(x + 0.5); }


x86 assembly (clang, -O0):
<rint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rint>:
addsd  0xef8(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @rint(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = fptosi double %2 to i32
%4 = sitofp i32 %3 to double
ret double %4
}
int test_imm_DBuint16_mem(unsigned short *val) {
  return ((*val) & (-0xDB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_DBuint16_mem>:
movzwl (%rdi),%eax
test   $0xff25,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DBuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -219
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned short LittleUnsignedShort(unsigned short l) { return l; }


x86 assembly (clang, -O0):
<LittleUnsignedShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LittleUnsignedShort>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @LittleUnsignedShort(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @LittleUnsignedShort(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int om_gsm_power_swap(int);
int om_gsm_power_set(int value) {
  int res = om_gsm_power_swap(value);
  if (res < 0)
    return res;
  return 0;
}


x86 assembly (clang, -O0):
<om_gsm_power_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <om_gsm_power_swap@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    113b <om_gsm_power_set+0x2b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1142 <om_gsm_power_set+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<om_gsm_power_set>:
push   %rax
call   1030 <om_gsm_power_swap@plt>
mov    %eax,%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @om_gsm_power_set(i32 %0) {
%2 = tail call i32 @om_gsm_power_swap(i32 %0)
%3 = icmp slt i32 %2, 0
%4 = select i1 %3, i32 %2, i32 0
ret i32 %4
}
unsigned long kdba_funcptr_value(void *fp) { return (unsigned long)fp; }


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

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

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

LLVM IR (-O2):
define i64 @kdba_funcptr_value(i8* %0) {
%2 = ptrtoint i8* %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ AcctReport(char *);
int /*<<< orphan*/ ConnectDb();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void CurrentMonthReport(char *cPasswd) {
  ConnectDb();
  AcctReport("tRadacct");
  exit(0);
}


x86 assembly (clang, -O0):
<CurrentMonthReport>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <ConnectDb@plt>
lea    0xeb6(%rip),%rdi
call   1040 <AcctReport@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<CurrentMonthReport>:
push   %rax
xor    %eax,%eax
call   1030 <ConnectDb@plt>
lea    0xec1(%rip),%rdi
call   1040 <AcctReport@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"tRadacct\00"
define void @CurrentMonthReport(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @ConnectDb()
%4 = call i32 @AcctReport(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"tRadacct\00"
define void @CurrentMonthReport(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @ConnectDb()
%3 = tail call i32 @AcctReport(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
int main() {
  char buffer[] = {'x', 'y', 'z', '\n', 0};
  int written = fwrite(buffer, sizeof(char), sizeof(buffer), stdout);
  printf("written: %d\n", written);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x5(%rbp),%rdi
mov    0x2e9b(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
mov    $0x5,%edx
call   1040 <fwrite@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0xa7a7978,(%rsp)
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1040 <fwrite@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.buffer = [5 x i8] c"xyz\0A\00"
@stdout = global i32 0
@.str = [13 x i8] c"written: %d\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca i32
%3 = bitcast [5 x i8]* %1 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%5 = load i32, i32* @stdout
%6 = call i32 @fwrite(i8* %4, i32 1, i32 5, i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.buffer = [5 x i8] c"xyz\0A\00"
@stdout = global i32 0
@.str = [13 x i8] c"written: %d\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = call i32 @fwrite(i8* %2, i32 1, i32 5, i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getalleles();
int /*<<< orphan*/ getdata();
void getinput() {
  getalleles();
  getdata();
}


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

x86 assembly (clang, -O2):
<getinput>:
push   %rax
xor    %eax,%eax
call   1040 <getalleles@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getdata@plt>

LLVM IR (-O0):
define void @getinput() {
%1 = call i32 (...) @getalleles()
%2 = call i32 (...) @getdata()
ret void
}

LLVM IR (-O2):
define void @getinput() {
%1 = tail call i32 (...) @getalleles()
%2 = tail call i32 (...) @getdata()
ret void
}
char *strcpy(char *__restrict s1, const char *__restrict s2) {
  register char *s = s1;
  while ((*s++ = *s2++) != 0)
    ;
  return s1;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned writeonly %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(void) {
  int a = 12345;
  char c;
  c = a % 128;
  printf("%c\n", a);
  printf("%c\n", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3039,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%eax
lea    0xec0(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 57)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 57)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ be64toh(int /*<<< orphan*/);
int64_t ld_i64_be(const void *x) { return be64toh(((int64_t *)x)[0]); }


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

x86 assembly (clang, -O2):
<ld_i64_be>:
mov    (%rdi),%edi
jmp    1030 <be64toh@plt>

LLVM IR (-O0):
define i32 @ld_i64_be(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = call i32 @be64toh(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ld_i64_be(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @be64toh(i32 %3)
ret i32 %4
}
extern void vscp_util_init(void) { return; }


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

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

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

LLVM IR (-O2):
define void @vscp_util_init() {
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void dutch_ISO_8859_1_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<dutch_ISO_8859_1_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @dutch_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @dutch_ISO_8859_1_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
int legacy();
int shiny() { return legacy() + 16; }


x86 assembly (clang, -O0):
<shiny>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <legacy@plt>
add    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiny>:
push   %rax
xor    %eax,%eax
call   1030 <legacy@plt>
add    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @shiny() {
%1 = call i32 (...) @legacy()
%2 = add nsw i32 %1, 16
ret i32 %2
}

LLVM IR (-O2):
define i32 @shiny() {
%1 = tail call i32 (...) @legacy()
%2 = add nsw i32 %1, 16
ret i32 %2
}
void emptyString(char *string) { string[0] = '\0'; }


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

x86 assembly (clang, -O2):
<emptyString>:
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @emptyString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %4
ret void
}

LLVM IR (-O2):
define void @emptyString(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret void
}
/* Type definitions */
typedef scalar_t__ pointer;

/* Variables and functions */
int differenceForPointer(int);
void updatePointer(int *field) {
  int pointer = *field;
  if ((((pointer)&3) == 0)) {
    *field = pointer + differenceForPointer(pointer);
  }
}


x86 assembly (clang, -O0):
<updatePointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
jne    114d <updatePointer+0x3d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <differenceForPointer@plt>
mov    -0x10(%rbp),%ecx
add    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<updatePointer>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%ebp
test   $0x3,%bpl
jne    1129 <updatePointer+0x19>
mov    %rdi,%rbx
mov    %ebp,%edi
call   1030 <differenceForPointer@plt>
add    %ebp,%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @updatePointer(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 3
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @differenceForPointer(i32 %2)
%7 = add nsw i32 %6, %2
store i32 %7, i32* %0
br label %8
8: ; preds = %5, %1
ret void
}
float f_leet() { return 1337; }


x86 assembly (clang, -O0):
<f_leet>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_leet>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @f_leet() {
ret float 1.337000e+03
}

LLVM IR (-O2):
define float @f_leet() {
ret float 1.337000e+03
}
void caller_2_1_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_1_1_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ test(int, void **);
int main() {
  void *s[2];
  char *pa;
  int *pb;
  char a[100];
  int b = 34;
  sprintf(a, "group_tab");
  pa = a;
  pb = &b;
  s[0] = pa;
  s[1] = pb;
  test(2, s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x22,-0x94(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x94(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
lea    -0x10(%rbp),%rsi
mov    $0x2,%edi
call   1040 <test@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movl   $0x22,0xc(%rsp)
movabs $0x61745f70756f7267,%rax
5f 74 61
mov    %rax,0x20(%rsp)
movw   $0x62,0x28(%rsp)
lea    0x20(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0xc(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    $0x2,%edi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"group_tab\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca [100 x i8]
%5 = alloca i32
store i32 34, i32* %5
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
store i8* %8, i8** %2
store i32* %5, i32** %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* %9, i8** %10
%11 = load i32*, i32** %3
%12 = bitcast i32* %11 to i8*
%13 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
store i8* %12, i8** %13
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
%15 = call i32 @test(i32 2, i8** %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"group_tab\00"
define i32 @main() {
%1 = alloca [2 x i8*]
%2 = alloca [100 x i8]
%3 = alloca i32
%4 = bitcast [2 x i8*]* %1 to i8*
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = bitcast i32* %3 to i8*
store i32 34, i32* %3
%7 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 0
store i8* %5, i8** %7
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %1, i64 0, i64 1
%9 = bitcast i8** %8 to i32**
store i32* %3, i32** %9
%10 = call i32 @test(i32 2, i8** %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
unsigned long strtoul(const char *restrict str, char **restrict endptr,
                      int base) {
  (void)str;
  (void)endptr;
  (void)base;
  puts("strtoul: not implemented");
  return 0;
}


x86 assembly (clang, -O0):
<strtoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [25 x i8] c"strtoul: not implemented\00"
define i64 @strtoul(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i64 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"strtoul: not implemented\00"
define i64 @strtoul(i8* noalias nocapture readnone %0, i8** noalias nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i64 0
}
INNBBSDhalt() {}


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

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

LLVM IR (-O0):
define i32 @INNBBSDhalt() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @INNBBSDhalt() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ readPWM(int);
void PWM_ISR_1() { readPWM(1); }


x86 assembly (clang, -O0):
<PWM_ISR_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <readPWM@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @PWM_ISR_1() {
%1 = call i32 @readPWM(i32 1)
ret void
}

LLVM IR (-O2):
define void @PWM_ISR_1() {
%1 = tail call i32 @readPWM(i32 1)
ret void
}
/* Variables and functions */
int PAPI_cleanup_eventset(int);
void papif_cleanup_eventset__(int *EventSet, int *check) {
  *check = PAPI_cleanup_eventset(*EventSet);
}


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

x86 assembly (clang, -O2):
<papif_cleanup_eventset__>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_cleanup_eventset@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_cleanup_eventset__(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* %5
%7 = call i32 @PAPI_cleanup_eventset(i32 %6)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @papif_cleanup_eventset__(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_cleanup_eventset(i32 %3)
store i32 %4, i32* %1
ret void
}
void PDMR3CritSectScheduleExitEvent(void) {}


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

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

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

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