	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lh5801_decode                  ## -- Begin function lh5801_decode
	.p2align	4, 0x90
_lh5801_decode:                         ## @lh5801_decode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	(%rsi), %r14d
	xorl	%ecx, %ecx
	cmpl	$253, %r14d
	sete	%cl
	movl	%ecx, %eax
	negl	%eax
	xorl	%esi, %esi
	addl	%edx, %eax
	je	LBB0_25
## %bb.1:
	movq	%rdi, %r15
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_lh5801_insn_descs@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_LENGTH
	movl	$-1, %esi
	testl	%eax, %eax
	je	LBB0_25
## %bb.2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	$8, %r14d
	xorl	%r15d, %r15d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movq	_lh5801_insn_descs@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_LENGTH
	movl	%eax, %eax
	addq	$12, %r14
	cmpq	%rax, %r15
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jae	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%r12,%rsi,4), %r12d
	movq	(%rbx), %rax
	movl	-8(%rax,%r14), %ebx
	movl	-4(%rax,%r14), %ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	(%rax,%r14), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_LH5801_IFMT_REG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ebx, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_lh5801_ifmt_fd_matches
	testl	%eax, %eax
	je	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	andl	%ebx, %r13d
	movq	_LH5801_IFMT_RREG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %ecx
	sarl	$4, %ecx
	andl	$-2147483645, %ecx              ## imm = 0x80000003
	cmpl	$3, %ecx
	je	LBB0_12
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r13d
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	andl	$207, %r12d
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %ecx
	andl	$241, %ecx
	movq	_LH5801_IFMT_COND@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	cmovel	%r12d, %ecx
	movl	%ecx, %eax
	andl	$239, %eax
	movq	_LH5801_IFMT_BCH@GOTPCREL(%rip), %rdx
	testl	%ebx, (%rdx)
	cmovel	%ecx, %eax
	cmpl	-68(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_LH5801_IFMT_VEJ@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	leal	-192(%rax), %ecx
	cmpl	$54, %ecx
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	andl	$1, %eax
	jne	LBB0_12
## %bb.14:
	cmpl	$-1, %r15d
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	$-1, %esi
	jne	LBB0_16
	jmp	LBB0_25
LBB0_13:
	movl	$-1, %esi
	jmp	LBB0_25
LBB0_15:
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
LBB0_16:
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 24(%r13)
	movl	%r15d, (%r13)
	movl	%eax, 4(%r13)
	movl	(%r14,%rax,4), %eax
	movl	%eax, 8(%r13)
	movl	%ebx, %edi
	callq	_LH5801_IFMT_IMMS
	cmpl	$3, %eax
	je	LBB0_21
## %bb.17:
	cmpl	$2, %eax
	je	LBB0_20
## %bb.18:
	cmpl	$1, %eax
	jne	LBB0_24
## %bb.19:
	movq	16(%r13), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_21:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	12(%r14,%rdx,4), %ecx
	movq	16(%r13), %rax
	movl	%ecx, 8(%rax)
	jmp	LBB0_22
LBB0_20:
	movq	16(%r13), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_22:
	movl	8(%r14,%rdx,4), %ecx
	movl	%ecx, 4(%rax)
LBB0_23:
	movl	4(%r14,%rdx,4), %ecx
	movl	%ecx, (%rax)
LBB0_24:
	xorl	%r14d, %r14d
	cmpl	$253, %r12d
	sete	%r14b
	movl	%ebx, %edi
	callq	_LH5801_IFMT_IMMS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r14,%rax), %esi
	incl	%esi
LBB0_25:
	movl	%esi, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lh5801_insn_descs,8,3          ## @lh5801_insn_descs
	.comm	_LH5801_IFMT_REG_MASK,4,2       ## @LH5801_IFMT_REG_MASK
	.comm	_LH5801_IFMT_RREG,4,2           ## @LH5801_IFMT_RREG
	.comm	_LH5801_IFMT_COND,4,2           ## @LH5801_IFMT_COND
	.comm	_LH5801_IFMT_BCH,4,2            ## @LH5801_IFMT_BCH
	.comm	_LH5801_IFMT_VEJ,4,2            ## @LH5801_IFMT_VEJ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lh5801_decode                  ; -- Begin function lh5801_decode
	.p2align	2
_lh5801_decode:                         ; @lh5801_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w19, [x1]
	cmp	w19, #253
	cset	w20, eq
	csetm	w8, eq
	cmn	w8, w2
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_21
LBB0_2:
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x25, _lh5801_insn_descs@GOTPAGE
Lloh1:
	ldr	x25, [x25, _lh5801_insn_descs@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_LENGTH
	cbz	w0, LBB0_15
; %bb.3:
	str	x22, [sp]                       ; 8-byte Folded Spill
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	mov	x26, #0
	mov	x24, #0
	add	x23, x21, w20, uxtw #2
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	x0, [x25]
	bl	_ARRAY_LENGTH
	add	x26, x26, #12
	cmp	x24, w0, uxtw
	b.hs	LBB0_15
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w28, [x23]
	ldr	x8, [x25]
	add	x8, x8, x26
	ldp	w21, w19, [x8]
	ldr	w22, [x8, #8]
Lloh2:
	adrp	x8, _LH5801_IFMT_REG_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LH5801_IFMT_REG_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w27, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_lh5801_ifmt_fd_matches
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w8, w27, w21
Lloh5:
	adrp	x9, _LH5801_IFMT_RREG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LH5801_IFMT_RREG@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	asr	w10, w28, #4
	and	w10, w10, #0x80000003
	ccmp	w10, #3, #0, eq
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w10, #207
	and	w10, w28, w10
	cmp	w8, w9
	csel	w8, w10, w28, eq
Lloh8:
	adrp	x9, _LH5801_IFMT_COND@GOTPAGE
Lloh9:
	ldr	x9, [x9, _LH5801_IFMT_COND@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mov	w10, #241
	and	w10, w8, w10
	tst	w9, w21
	csel	w8, w8, w10, eq
Lloh11:
	adrp	x9, _LH5801_IFMT_BCH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LH5801_IFMT_BCH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mov	w10, #239
	and	w10, w8, w10
	tst	w9, w21
	csel	w8, w8, w10, eq
	cmp	w8, w19
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x9, _LH5801_IFMT_VEJ@GOTPAGE
Lloh15:
	ldr	x9, [x9, _LH5801_IFMT_VEJ@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w21
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	and	w9, w8, #0x1
	sub	w8, w8, #192
	cmp	w8, #54
	ccmp	w9, #0, #0, ls
	b.ne	LBB0_4
; %bb.10:
	cmn	w24, #1
	b.eq	LBB0_15
LBB0_11:
	ldr	x19, [sp]                       ; 8-byte Folded Reload
	str	w22, [x19, #24]
	stp	w24, w20, [x19]
	ldr	w8, [x23]
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_LH5801_IFMT_IMMS
	cmp	w0, #3
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	b.eq	LBB0_16
; %bb.12:
	cmp	w0, #2
	b.eq	LBB0_17
; %bb.13:
	cmp	w0, #1
	b.ne	LBB0_20
; %bb.14:
	ldr	x8, [x19, #16]
	b	LBB0_19
LBB0_15:
	mov	w0, #-1
	b	LBB0_21
LBB0_16:
	ldr	w9, [x23, #12]
	ldr	x8, [x19, #16]
	str	w9, [x8, #8]
	b	LBB0_18
LBB0_17:
	ldr	x8, [x19, #16]
LBB0_18:
	ldr	w9, [x23, #8]
	str	w9, [x8, #4]
LBB0_19:
	ldr	w9, [x23, #4]
	str	w9, [x8]
LBB0_20:
	cmp	w10, #253
	mov	w8, #1
	cinc	w19, w8, eq
	mov	x0, x21
	bl	_LH5801_IFMT_IMMS
	add	w0, w0, w19
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_lh5801_insn_descs,8,3          ; @lh5801_insn_descs
	.comm	_LH5801_IFMT_REG_MASK,4,2       ; @LH5801_IFMT_REG_MASK
	.comm	_LH5801_IFMT_RREG,4,2           ; @LH5801_IFMT_RREG
	.comm	_LH5801_IFMT_COND,4,2           ; @LH5801_IFMT_COND
	.comm	_LH5801_IFMT_BCH,4,2            ; @LH5801_IFMT_BCH
	.comm	_LH5801_IFMT_VEJ,4,2            ; @LH5801_IFMT_VEJ
.subsections_via_symbols
