	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbcir_parse_nec
_wbcir_parse_nec:                       ## @wbcir_parse_nec
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_get_bits
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_1
LBB0_3:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_get_bits
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_6:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_get_bits
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	cmpl	$0, 16(%rbx)
	je	LBB0_8
## %bb.9:
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wbcir_keydown                  ## TAILCALL
LBB0_11:
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_get_bits
	testq	%rax, %rax
	jne	LBB0_4
## %bb.12:
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, %rdi
	callq	_bitrev8
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, %rdi
	callq	_bitrev8
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, %rdi
	callq	_bitrev8
	movl	%eax, %r13d
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_get_bits
	movq	%rax, %rdi
	callq	_bitrev8
	cmpq	$0, 8(%rbx)
	je	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_5
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_14:
	notl	%eax
	cmpl	%eax, %r13d
	jne	LBB0_15
## %bb.16:
	movl	%r12d, %eax
	notl	%eax
	shll	$8, %r12d
	xorl	%ecx, %ecx
	cmpl	%eax, %r15d
	cmovel	%ecx, %r12d
	orl	%r15d, %r12d
	movl	%r12d, %r15d
	shll	$8, %r15d
	orl	%r13d, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	xorl	%edx, %edx
	cmpl	$0, 4(%rbx)
	sete	%dl
	movq	%rbx, %rdi
	movl	%r15d, %esi
	jmp	LBB0_10
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NEC - Invalid leader space\n"

L_.str.1:                               ## @.str.1
	.asciz	"NEC - Stray repeat message\n"

L_.str.2:                               ## @.str.2
	.asciz	"IR-NEC repeat s %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"NEC - Invalid message\n"

L_.str.4:                               ## @.str.4
	.asciz	"NEC - Command bytes mismatch\n"

L_.str.5:                               ## @.str.5
	.asciz	"IR-NEC ad %u cm %u s %u\n"

	.no_dead_strip	_wbcir_parse_nec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbcir_parse_nec
_wbcir_parse_nec:                       ; @wbcir_parse_nec
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_get_bits
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_1
LBB0_3:
	mov	x0, x19
	mov	w1, #4
	bl	_get_bits
	cbz	x0, LBB0_6
LBB0_4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_dev_dbg
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_get_bits
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_13
; %bb.8:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldp	w1, w2, [x19]
	mov	x0, x19
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_wbcir_keydown
LBB0_10:
	mov	x0, x19
	mov	w1, #3
	bl	_get_bits
	cbnz	x0, LBB0_4
; %bb.11:
	mov	x0, x19
	mov	w1, #8
	bl	_get_bits
	bl	_bitrev8
	mov	x21, x0
	mov	x0, x19
	mov	w1, #8
	bl	_get_bits
	bl	_bitrev8
	mov	x22, x0
	mov	x0, x19
	mov	w1, #8
	bl	_get_bits
	bl	_bitrev8
	mov	x23, x0
	mov	x0, x19
	mov	w1, #8
	bl	_get_bits
	bl	_bitrev8
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
; %bb.12:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_13:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_14:
	mvn	w8, w0
	cmp	w23, w8
	b.ne	LBB0_16
; %bb.15:
	mvn	w8, w22
	lsl	w9, w22, #8
	cmp	w21, w8
	csel	w8, wzr, w9, eq
	orr	w8, w8, w21
	orr	w21, w23, w8, lsl #8
	stp	x8, x23, [sp]
	str	x21, [sp, #16]
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w2, eq
	mov	x0, x19
	mov	x1, x21
	b	LBB0_9
LBB0_16:
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NEC - Invalid leader space\n"

l_.str.1:                               ; @.str.1
	.asciz	"NEC - Stray repeat message\n"

l_.str.2:                               ; @.str.2
	.asciz	"IR-NEC repeat s %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"NEC - Invalid message\n"

l_.str.4:                               ; @.str.4
	.asciz	"NEC - Command bytes mismatch\n"

l_.str.5:                               ; @.str.5
	.asciz	"IR-NEC ad %u cm %u s %u\n"

	.no_dead_strip	_wbcir_parse_nec
.subsections_via_symbols
