#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 */
struct hle_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ is_task(struct hle_t *);
int /*<<< orphan*/ non_task_dispatching(struct hle_t *);
int /*<<< orphan*/ normal_task_dispatching(struct hle_t *);
int /*<<< orphan*/ rsp_break(struct hle_t *, int);
int /*<<< orphan*/ try_fast_task_dispatching(struct hle_t *);
void hle_execute(struct hle_t *hle) {
  if (is_task(hle)) {
    if (!try_fast_task_dispatching(hle))
      normal_task_dispatching(hle);
    rsp_break(hle, 0x200);
  } else {
    non_task_dispatching(hle);
    rsp_break(hle, 0);
  }
}


x86 assembly (clang, -O0):
<hle_execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <is_task@plt>
cmp    $0x0,%rax
je     119d <hle_execute+0x4d>
mov    -0x8(%rbp),%rdi
call   1060 <try_fast_task_dispatching@plt>
cmp    $0x0,%eax
jne    118a <hle_execute+0x3a>
mov    -0x8(%rbp),%rdi
call   1070 <normal_task_dispatching@plt>
mov    -0x8(%rbp),%rdi
mov    $0x200,%esi
call   1040 <rsp_break@plt>
jmp    11b1 <hle_execute+0x61>
mov    -0x8(%rbp),%rdi
call   1030 <non_task_dispatching@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <rsp_break@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hle_execute>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1050 <is_task@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     117b <hle_execute+0x2b>
call   1060 <try_fast_task_dispatching@plt>
mov    $0x200,%ebp
test   %eax,%eax
jne    1182 <hle_execute+0x32>
mov    %rbx,%rdi
call   1070 <normal_task_dispatching@plt>
jmp    1182 <hle_execute+0x32>
call   1030 <non_task_dispatching@plt>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <rsp_break@plt>

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @hle_execute(%struct.hle_t* %0) {
%2 = alloca %struct.hle_t*
store %struct.hle_t* %0, %struct.hle_t** %2
%3 = load %struct.hle_t*, %struct.hle_t** %2
%4 = call i64 @is_task(%struct.hle_t* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load %struct.hle_t*, %struct.hle_t** %2
%8 = call i32 @try_fast_task_dispatching(%struct.hle_t* %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = load %struct.hle_t*, %struct.hle_t** %2
%12 = call i32 @normal_task_dispatching(%struct.hle_t* %11)
br label %13
13: ; preds = %10, %6
%14 = load %struct.hle_t*, %struct.hle_t** %2
%15 = call i32 @rsp_break(%struct.hle_t* %14, i32 512)
br label %21
16: ; preds = %1
%17 = load %struct.hle_t*, %struct.hle_t** %2
%18 = call i32 @non_task_dispatching(%struct.hle_t* %17)
%19 = load %struct.hle_t*, %struct.hle_t** %2
%20 = call i32 @rsp_break(%struct.hle_t* %19, i32 0)
br label %21
21: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @hle_execute(%struct.hle_t* %0) {
%2 = tail call i64 @is_task(%struct.hle_t* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @try_fast_task_dispatching(%struct.hle_t* %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i32 @normal_task_dispatching(%struct.hle_t* %0)
br label %11
9: ; preds = %1
%10 = tail call i32 @non_task_dispatching(%struct.hle_t* %0)
br label %11
11: ; preds = %4, %7, %9
%12 = phi i32 [ 0, %9 ], [ 512, %7 ], [ 512, %4 ]
%13 = tail call i32 @rsp_break(%struct.hle_t* %0, i32 %12)
ret void
}