#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int prv_test_disass_b();
int prv_test_disass_data();
int prv_test_disass_mtran();
int prv_test_disass_mul();
int prv_test_disass_stran();
int prv_test_disass_swi();
int prv_test_disass(void) {
  int retval;
  printf("arm_test_disass");
  retval = prv_test_disass_data();
  retval |= prv_test_disass_mul();
  retval |= prv_test_disass_swi();
  retval |= prv_test_disass_b();
  retval |= prv_test_disass_stran();
  retval |= prv_test_disass_mtran();
  if (retval == 1)
    printf(": [FAIL]\n");
  else
    printf(": [OK]\n");
  return retval;
}


x86 assembly (clang, -O0):
<prv_test_disass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <prv_test_disass_data@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <prv_test_disass_mul@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <prv_test_disass_swi@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <prv_test_disass_b@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1090 <prv_test_disass_stran@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <prv_test_disass_mtran@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    11ea <prv_test_disass+0x7a>
lea    0xe30(%rip),%rdi
call   1050 <printf@plt>
jmp    11f6 <prv_test_disass+0x86>
lea    0xe29(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_test_disass>:
push   %rbp
push   %r14
push   %rbx
lea    0xe75(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
call   1090 <prv_test_disass_data@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <prv_test_disass_mul@plt>
mov    %eax,%ebp
or     %ebx,%ebp
xor    %eax,%eax
call   1030 <prv_test_disass_swi@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1070 <prv_test_disass_b@plt>
mov    %eax,%ebx
or     %r14d,%ebx
or     %ebp,%ebx
xor    %eax,%eax
call   10a0 <prv_test_disass_stran@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <prv_test_disass_mtran@plt>
mov    %eax,%ebp
or     %r14d,%ebp
or     %ebx,%ebp
cmp    $0x1,%ebp
lea    0xe39(%rip),%rax
lea    0xe2b(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"arm_test_disass\00"
@.str.1 = [10 x i8] c": [FAIL]\0A\00"
@.str.2 = [8 x i8] c": [OK]\0A\00"
define i32 @prv_test_disass() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @prv_test_disass_data()
store i32 %3, i32* %1
%4 = call i32 (...) @prv_test_disass_mul()
%5 = load i32, i32* %1
%6 = or i32 %5, %4
store i32 %6, i32* %1
%7 = call i32 (...) @prv_test_disass_swi()
%8 = load i32, i32* %1
%9 = or i32 %8, %7
store i32 %9, i32* %1
%10 = call i32 (...) @prv_test_disass_b()
%11 = load i32, i32* %1
%12 = or i32 %11, %10
store i32 %12, i32* %1
%13 = call i32 (...) @prv_test_disass_stran()
%14 = load i32, i32* %1
%15 = or i32 %14, %13
store i32 %15, i32* %1
%16 = call i32 (...) @prv_test_disass_mtran()
%17 = load i32, i32* %1
%18 = or i32 %17, %16
store i32 %18, i32* %1
%19 = load i32, i32* %1
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %23
21: ; preds = %0
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %25
23: ; preds = %0
%24 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [16 x i8] c"arm_test_disass\00"
@str = [7 x i8] c": [OK]\00"
@str.3 = [9 x i8] c": [FAIL]\00"
define i32 @prv_test_disass() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @prv_test_disass_data()
%3 = tail call i32 (...) @prv_test_disass_mul()
%4 = or i32 %3, %2
%5 = tail call i32 (...) @prv_test_disass_swi()
%6 = or i32 %4, %5
%7 = tail call i32 (...) @prv_test_disass_b()
%8 = or i32 %6, %7
%9 = tail call i32 (...) @prv_test_disass_stran()
%10 = or i32 %8, %9
%11 = tail call i32 (...) @prv_test_disass_mtran()
%12 = or i32 %10, %11
%13 = icmp eq i32 %12, 1
%14 = select i1 %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0)
%15 = tail call i32 @puts(i8* dereferenceable(1) %14)
ret i32 %12
}