#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*/ branch_offset(int);
int /*<<< orphan*/ const_imm_expr(int);
int /*<<< orphan*/ i_type_inst_free(int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ r_type_inst(int, int, int, int);
void set_le_inst(int op, int rd, int rs, int rt) {
  i_type_inst_free(301, rs, rt, branch_offset(3));
  i_type_inst_free(476, rd, 0, const_imm_expr(1));
  i_type_inst_free(287, 0, 0, branch_offset(2));
  r_type_inst((op == 599 ? 508 : 511), rd, rs, rt);
}


x86 assembly (clang, -O0):
<set_le_inst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    $0x3,%edi
call   1030 <branch_offset@plt>
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    %eax,%ecx
mov    $0x12d,%edi
call   1060 <i_type_inst_free@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1040 <const_imm_expr@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%ecx
mov    $0x1dc,%edi
xor    %edx,%edx
call   1060 <i_type_inst_free@plt>
mov    $0x2,%edi
call   1030 <branch_offset@plt>
mov    %eax,%ecx
mov    $0x11f,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <i_type_inst_free@plt>
mov    -0x4(%rbp),%ecx
mov    $0x1ff,%edi
mov    $0x1fc,%eax
cmp    $0x257,%ecx
cmove  %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1050 <r_type_inst@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_le_inst>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r15d
mov    $0x3,%edi
call   1030 <branch_offset@plt>
mov    $0x12d,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %eax,%ecx
call   1060 <i_type_inst_free@plt>
mov    $0x1,%edi
call   1040 <const_imm_expr@plt>
mov    $0x1dc,%edi
mov    %ebx,%esi
xor    %edx,%edx
mov    %eax,%ecx
call   1060 <i_type_inst_free@plt>
mov    $0x2,%edi
call   1030 <branch_offset@plt>
mov    $0x11f,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    %eax,%ecx
call   1060 <i_type_inst_free@plt>
xor    %eax,%eax
cmp    $0x257,%r15d
setne  %al
lea    (%rax,%rax,2),%edi
or     $0x1fc,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <r_type_inst@plt>

LLVM IR (-O0):
define void @set_le_inst(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %8
%11 = call i32 @branch_offset(i32 3)
%12 = call i32 @i_type_inst_free(i32 301, i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %6
%14 = call i32 @const_imm_expr(i32 1)
%15 = call i32 @i_type_inst_free(i32 476, i32 %13, i32 0, i32 %14)
%16 = call i32 @branch_offset(i32 2)
%17 = call i32 @i_type_inst_free(i32 287, i32 0, i32 0, i32 %16)
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 599
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 508, i32 511
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @r_type_inst(i32 %21, i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @set_le_inst(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @branch_offset(i32 3)
%6 = tail call i32 @i_type_inst_free(i32 301, i32 %2, i32 %3, i32 %5)
%7 = tail call i32 @const_imm_expr(i32 1)
%8 = tail call i32 @i_type_inst_free(i32 476, i32 %1, i32 0, i32 %7)
%9 = tail call i32 @branch_offset(i32 2)
%10 = tail call i32 @i_type_inst_free(i32 287, i32 0, i32 0, i32 %9)
%11 = icmp eq i32 %0, 599
%12 = select i1 %11, i32 508, i32 511
%13 = tail call i32 @r_type_inst(i32 %12, i32 %1, i32 %2, i32 %3)
ret void
}