xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ wait(int);
void *inject(void *message) {
  char *g_message = (char *)message;
  system("init 0");
  wait(1);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<inject>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1050 <wait@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inject>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%edi
call   1050 <wait@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"init 0\00"
define i8* @inject(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
%6 = call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @wait(i32 1)
%8 = call i32 @pthread_exit(i32* null)
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [7 x i8] c"init 0\00"
define noalias i8* @inject(i8* nocapture readnone %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @wait(i32 1)
%4 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
void exynos5_mif_nocp_resume(void) { return; }


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

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

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

LLVM IR (-O2):
define void @exynos5_mif_nocp_resume() {
ret void
}
int comp_unsigned_int(const void *a, const void *b) {
  if (*(unsigned int *)a == *(unsigned int *)b) {
    return 0;
  } else if (*(unsigned int *)a < *(unsigned int *)b) {
    return -1;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<comp_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    112a <comp_unsigned_int+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    114f <comp_unsigned_int+0x4f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jae    1148 <comp_unsigned_int+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <comp_unsigned_int+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_unsigned_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%eax
setae  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comp_unsigned_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp eq i32 %4, %6
%8 = icmp ult i32 %4, %6
%9 = select i1 %8, i32 -1, i32 1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
void a3bcdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @a3bcdefghijklmnopqrstuvwxzy() {
ret void
}
void rop3_92_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ *D;
  stk2 = T | stk3;
  stk1 = *D ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_92_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_92_1_1>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
xor    %al,%cl
or     %sil,%dl
xor    %cl,%al
and    %dl,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_92_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %9
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8*, i8** %4
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i8, i8* %8
%27 = zext i8 %26 to i32
%28 = xor i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = and i32 %42, %44
%46 = or i32 %39, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = load i8, i8* %6
%51 = zext i8 %50 to i32
%52 = and i32 %49, %51
%53 = or i32 %46, %52
%54 = trunc i32 %53 to i8
%55 = load i8*, i8** %4
store i8 %54, i8* %55
ret void
}

LLVM IR (-O2):
define void @rop3_92_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, %4
%8 = or i8 %2, %1
%9 = xor i8 %8, -1
%10 = and i8 %7, %9
%11 = and i8 %4, %8
%12 = or i8 %11, %10
store i8 %12, i8* %0
ret void
}
/* Type definitions */
struct _Locale_ctype {
  int dummy;
};

/* Variables and functions */
int toupper(int);
int _Locale_toupper(struct _Locale_ctype *lctype __attribute__((__unused__)),
                    int c) {
  return toupper(c);
}


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

x86 assembly (clang, -O2):
<_Locale_toupper>:
mov    %esi,%edi
jmp    1030 <toupper@plt>

LLVM IR (-O0):
%struct._Locale_ctype = type { i32 }
define i32 @_Locale_toupper(%struct._Locale_ctype* %0, i32 %1) {
%3 = alloca %struct._Locale_ctype*
%4 = alloca i32
store %struct._Locale_ctype* %0, %struct._Locale_ctype** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @toupper(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct._Locale_ctype = type { i32 }
define i32 @_Locale_toupper(%struct._Locale_ctype* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @toupper(i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int extension2(char *input, int inputLen, char *output, int outputMaxLen) {
  sprintf(output, "extension2 computation failed");
  return -1;
}


x86 assembly (clang, -O0):
<extension2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extension2>:
movups 0xf07(%rip),%xmm0
movups %xmm0,0xe(%rdx)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"extension2 computation failed\00"
define i32 @extension2(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %7
%10 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [30 x i8] c"extension2 computation failed\00"
define i32 @extension2(i8* nocapture readnone %0, i32 %1, i8* nocapture writeonly %2, i32 %3) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(30) %2, i8* align 1 dereferenceable(30) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i64 30, i1 false)
ret i32 -1
}
int fun1314() { return 1314; }


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

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

LLVM IR (-O0):
define i32 @fun1314() {
ret i32 1314
}

LLVM IR (-O2):
define i32 @fun1314() {
ret i32 1314
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_test_failed() { fputs("...[ ]", stdout); }


x86 assembly (clang, -O0):
<print_test_failed>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_test_failed>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"...[ ]\00"
@stdout = global i32 0
define void @print_test_failed() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"...[ ]\00"
@stdout = global i32 0
define void @print_test_failed() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
double floating_point_message2_signal2_decode(float value) {
  return ((double)value);
}


x86 assembly (clang, -O0):
<floating_point_message2_signal2_decode>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floating_point_message2_signal2_decode>:
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @floating_point_message2_signal2_decode(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
ret double %4
}

LLVM IR (-O2):
define double @floating_point_message2_signal2_decode(float %0) {
%2 = fpext float %0 to double
ret double %2
}
/* Variables and functions */
int sysauth(char *, char *);
int main(int argc, char **argv) {
  int ret = sysauth(argv[1], argv[2]);
  return (ret);
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <sysauth@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
jmp    1030 <sysauth@plt>

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
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @sysauth(i8* %9, i8* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @sysauth(i8* %4, i8* %6)
ret i32 %7
}
/* Variables and functions */
int simple_printf(char *, int);
int main(int argc, char *argv[]) {
  int ret;
  ret = simple_printf("hello%d\n", 1);
  simple_printf("%d\n", ret);
  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)
lea    0xed3(%rip),%rdi
mov    $0x1,%esi
call   1030 <simple_printf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <simple_printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ c2_addr_write(int /*<<< orphan*/);
int /*<<< orphan*/ c2_data_write(int /*<<< orphan*/, int);
void reg_write(uint8_t addr, uint8_t value) {
  c2_addr_write(addr);
  c2_data_write(value, 1);
}


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

x86 assembly (clang, -O2):
<reg_write>:
push   %rbx
mov    %esi,%ebx
call   1030 <c2_addr_write@plt>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <c2_data_write@plt>

LLVM IR (-O0):
define void @reg_write(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 = call i32 @c2_addr_write(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @c2_data_write(i32 %7, i32 1)
ret void
}

LLVM IR (-O2):
define void @reg_write(i32 %0, i32 %1) {
%3 = tail call i32 @c2_addr_write(i32 %0)
%4 = tail call i32 @c2_data_write(i32 %1, i32 1)
ret void
}
/* Type definitions */
struct MSIM_OPT_Option {
  int dummy;
};

/* Variables and functions */
int getopt_internal(int, char **, char const *, struct MSIM_OPT_Option const *,
                    int *, int);
int MSIM_OPT_Getopt_long(int nargc, char **nargv, const char *options,
                         const struct MSIM_OPT_Option *long_options, int *idx) {
  return (getopt_internal(nargc, nargv, options, long_options, idx, 0x01));
}


x86 assembly (clang, -O0):
<MSIM_OPT_Getopt_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
call   1030 <getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MSIM_OPT_Getopt_long>:
mov    $0x1,%r9d
jmp    1030 <getopt_internal@plt>

LLVM IR (-O0):
%struct.MSIM_OPT_Option = type { i32 }
define i32 @MSIM_OPT_Getopt_long(i32 %0, i8** %1, i8* %2, %struct.MSIM_OPT_Option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.MSIM_OPT_Option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.MSIM_OPT_Option* %3, %struct.MSIM_OPT_Option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.MSIM_OPT_Option*, %struct.MSIM_OPT_Option** %9
%15 = load i32*, i32** %10
%16 = call i32 @getopt_internal(i32 %11, i8** %12, i8* %13, %struct.MSIM_OPT_Option* %14, i32* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.MSIM_OPT_Option = type { i32 }
define i32 @MSIM_OPT_Getopt_long(i32 %0, i8** %1, i8* %2, %struct.MSIM_OPT_Option* %3, i32* %4) {
%6 = tail call i32 @getopt_internal(i32 %0, i8** %1, i8* %2, %struct.MSIM_OPT_Option* %3, i32* %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int main() {
  printf("Running ps with system\n");
  system("ps ax");
  printf("Done.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <system@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <system@plt>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Running ps with system\0A\00"
@.str.1 = [6 x i8] c"ps ax\00"
@.str.2 = [7 x i8] c"Done.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"ps ax\00"
@str = [23 x i8] c"Running ps with system\00"
@str.3 = [6 x i8] c"Done.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
int wide_is_ascii(short *s) {
  int i;
  for (i = 0; s[i] != 0; i++)
    if (s[i] < 32 || s[i] > 255)
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<wide_is_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cmp    $0x0,%eax
je     116f <wide_is_ascii+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cmp    $0x20,%eax
jl     1150 <wide_is_ascii+0x50>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movswl (%rax,%rcx,2),%eax
cmp    $0xff,%eax
jle    115c <wide_is_ascii+0x5c>
movl   $0x0,-0x4(%rbp)
jmp    1176 <wide_is_ascii+0x76>
jmp    1161 <wide_is_ascii+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <wide_is_ascii+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wide_is_ascii>:
movzwl (%rdi),%ecx
mov    $0x1,%eax
test   %cx,%cx
je     113d <wide_is_ascii+0x3d>
add    $0x2,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0xffffff00,%ecx
movzwl %cx,%ecx
cmp    $0xff1f,%ecx
jbe    113e <wide_is_ascii+0x3e>
movzwl (%rdi),%ecx
add    $0x2,%rdi
test   %cx,%cx
jne    1120 <wide_is_ascii+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @wide_is_ascii(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i16, i16* %0, i64 %13
%6 = load i16, i16* %5
%7 = icmp eq i16 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i16 [ %6, %4 ], [ %2, %1 ]
%11 = add i16 %10, -256
%12 = icmp ult i16 %11, -224
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void as_abort(char *message) {
  write(1, "as: ", 4);
  write(1, message, strlen(message));
  write(1, "\n", 1);
  exit(1);
}


x86 assembly (clang, -O0):
<as_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
lea    0xeb8(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    0xe86(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<as_abort>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xe9d(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"as: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @as_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @write(i32 1, i8* %4, i32 %6)
%8 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"as: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @as_abort(i8* %0) {
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 1, i8* %0, i32 %3)
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
%6 = tail call i32 @exit(i32 1)
unreachable
}
int diminuto_ipcl_is_unnamed(const char *pathp) {
  return ((pathp != (const char *)0) && (pathp[0] == '\0'));
}


x86 assembly (clang, -O0):
<diminuto_ipcl_is_unnamed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1128 <diminuto_ipcl_is_unnamed+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diminuto_ipcl_is_unnamed>:
xor    %eax,%eax
test   %rdi,%rdi
je     110d <diminuto_ipcl_is_unnamed+0xd>
cmpb   $0x0,(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @diminuto_ipcl_is_unnamed(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xd6() {
  Assert_real((isdigit(214) == 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_isdigit.c",
              1075, ("isdigit should be 0 for 0xd6"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xd6>:
push   %rax
mov    $0xd6,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x433,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xd6\00"
define void @t_isdigit_0xd6() {
%1 = tail call i64 @isdigit(i32 214)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1075, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ open(char const *, int /*<<< orphan*/, int /*<<< orphan*/);
FILE *fopen(const char *path, const char *mode) {
  return ((FILE *)open(path, 0, 0));
}


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

x86 assembly (clang, -O2):
<fopen>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32* @fopen(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i64 @open(i8* %0, i32 0, i32 0)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
void position(char maze[23][30], int numbers_player[3], int player) {
  int i, j;
  i = numbers_player[0];
  j = numbers_player[1];
  maze[i][j] = player;
}


x86 assembly (clang, -O0):
<position>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x1e,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<position>:
movslq (%rsi),%rax
movslq 0x4(%rsi),%rcx
mov    %rax,%rsi
shl    $0x5,%rsi
sub    %rax,%rsi
sub    %rax,%rsi
add    %rdi,%rsi
mov    %dl,(%rcx,%rsi,1)
ret

LLVM IR (-O0):
define void @position([30 x i8]* %0, i32* %1, i32 %2) {
%4 = alloca [30 x i8]*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store [30 x i8]* %0, [30 x i8]** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
store i32 %11, i32* %7
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
store i32 %14, i32* %8
%15 = load i32, i32* %6
%16 = trunc i32 %15 to i8
%17 = load [30 x i8]*, [30 x i8]** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [30 x i8], [30 x i8]* %17, i64 %19
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [30 x i8], [30 x i8]* %20, i64 0, i64 %22
store i8 %16, i8* %23
ret void
}

LLVM IR (-O2):
define void @position([30 x i8]* nocapture writeonly %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = trunc i32 %2 to i8
%8 = sext i32 %4 to i64
%9 = sext i32 %6 to i64
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 %8, i64 %9
store i8 %7, i8* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CounterToLocalTimeC__1__Counter__overflow();
int /*<<< orphan*/ TransformAlarmC__1__Counter__overflow();
void TransformCounterC__1__Counter__overflow(void) {
  CounterToLocalTimeC__1__Counter__overflow();
  TransformAlarmC__1__Counter__overflow();
}


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

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

LLVM IR (-O0):
define void @TransformCounterC__1__Counter__overflow() {
%1 = call i32 (...) @CounterToLocalTimeC__1__Counter__overflow()
%2 = call i32 (...) @TransformAlarmC__1__Counter__overflow()
ret void
}

LLVM IR (-O2):
define void @TransformCounterC__1__Counter__overflow() {
%1 = tail call i32 (...) @CounterToLocalTimeC__1__Counter__overflow()
%2 = tail call i32 (...) @TransformAlarmC__1__Counter__overflow()
ret void
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_AY_PI_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_pi(void) {
  m68ki_write_8(EA_AY_PI_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PI_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <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_pi>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PI_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <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_pi() {
%1 = call i32 (...) @EA_AY_PI_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_pi() {
%1 = tail call i32 (...) @EA_AY_PI_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*/ abort();
int *foo_const(int *);
void test_const(void) {
  int i;
  int *p = &i;
  int *q_const = foo_const(p);
  *p = 1;
  *q_const = 2;
  if (*p != 2)
    abort();
}


x86 assembly (clang, -O0):
<test_const>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <foo_const@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x2,(%rax)
je     1165 <test_const+0x45>
mov    $0x0,%al
call   1040 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_const>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <foo_const@plt>
movl   $0x1,0x4(%rsp)
movl   $0x2,(%rax)
cmpl   $0x2,0x4(%rsp)
jne    1142 <test_const+0x22>
pop    %rax
ret
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define void @test_const() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32* @foo_const(i32* %1)
store i32 1, i32* %1
store i32 2, i32* %3
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 2
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FH_DU();
int /*<<< orphan*/ init();
int /*<<< orphan*/ interface();
int main(void) {
  unsigned int i;
  for (i = 0; i < 134; i++) {
    init();
    interface();
    FH_DU();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x86,-0x8(%rbp)
jae    1176 <main+0x46>
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <interface@plt>
mov    $0x0,%al
call   1050 <FH_DU@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x86,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
call   1030 <interface@plt>
xor    %eax,%eax
call   1050 <FH_DU@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 134
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = call i32 (...) @init()
%8 = call i32 (...) @interface()
%9 = call i32 (...) @FH_DU()
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @interface()
%5 = tail call i32 (...) @FH_DU()
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 134
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
unsigned int AURAE_sqrti2(unsigned int sq2) {
  unsigned int sq1 = 1;
  while (sq1 < sq2) {
    sq1 = sq1 << 1;
    sq2 = sq2 >> 1;
  }
  sq1 = (sq1 + sq2) >> 1;
  return sq1;
}


x86 assembly (clang, -O0):
<AURAE_sqrti2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1131 <AURAE_sqrti2+0x31>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <AURAE_sqrti2+0xe>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AURAE_sqrti2>:
mov    %edi,%eax
mov    $0x1,%ecx
cmp    $0x2,%edi
jb     1128 <AURAE_sqrti2+0x28>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %ecx,%ecx
shr    %eax
cmp    %eax,%ecx
jb     1120 <AURAE_sqrti2+0x20>
add    %ecx,%eax
shr    %eax
ret

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

LLVM IR (-O2):
define i32 @AURAE_sqrti2(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = shl i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ult i32 %6, %7
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = phi i32 [ 1, %1 ], [ %6, %3 ]
%12 = add i32 %11, %10
%13 = lshr i32 %12, 1
ret i32 %13
}
void pb_ini() {}


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

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

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

LLVM IR (-O2):
define void @pb_ini() {
ret void
}
unsigned short LittleShort(unsigned short x) { return x; }


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

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

LLVM IR (-O0):
define zeroext i16 @LittleShort(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 @LittleShort(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void test_memcpy_warn(char *d) { memcpy(d, d + 2, 3); }


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

x86 assembly (clang, -O2):
<test_memcpy_warn>:
lea    0x2(%rdi),%rsi
mov    $0x3,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @test_memcpy_warn(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 2
%3 = tail call i32 @memcpy(i8* %0, i8* %2, i32 3)
ret void
}
int main(void) {
  int c = 0;
  enum a;
  typedef enum a b;
  enum a {
    d,
  };
  b a;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int f_esquerdo(int N) { return (2 * N) + 1; }


x86 assembly (clang, -O0):
<f_esquerdo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_esquerdo>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @f_esquerdo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @f_esquerdo(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void *realloc(void *, size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *xrealloc(void *p, size_t len) {
  if ((p = realloc(p, len)) == NULL)
    die("realloc: %s\n", strerror(errno));
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1177 <xrealloc+0x47>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1040 <die@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <xrealloc+0x2a>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"realloc: %s\0A\00"
@errno = global i32 0
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @errno
%7 = tail call i32 @strerror(i32 %6)
%8 = tail call i32 @die(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *buf;
  buf = malloc(size);
  if (buf == NULL) {
    fprintf(stderr, "It is not enough memory");
    exit(1);
  }
  return buf;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xmalloc+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"It is not enough memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"It is not enough memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
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 ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ io_loop_remove_fd(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void end_conn(int fd) {
  shutdown(fd, SHUT_RDWR);
  close(fd);
  io_loop_remove_fd(fd);
}


x86 assembly (clang, -O0):
<end_conn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    -0x4(%rbp),%edi
call   1050 <io_loop_remove_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_conn>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
call   1040 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <io_loop_remove_fd@plt>

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define void @end_conn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @io_loop_remove_fd(i32 %8)
ret void
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define void @end_conn(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
%5 = tail call i32 @io_loop_remove_fd(i32 %0)
ret void
}