	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wbcir_parse_rc6
_wbcir_parse_rc6:                       ## @wbcir_parse_rc6
	.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	$24, %rsp
	.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
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_1
LBB0_3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_get_bits
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_get_bits
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	cmpl	$21, %eax
	je	LBB0_9
## %bb.10:
	cmpl	$41, %eax
	jne	LBB0_25
## %bb.11:
	movl	$6, %r13d
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_9:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r13d, %r13d
LBB0_12:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_get_bits
	cmpl	$3, %eax
	je	LBB0_19
## %bb.13:
	movl	%eax, %r15d
	cmpl	$12, %eax
	jne	LBB0_14
## %bb.17:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_16
## %bb.18:
	xorl	%r12d, %r12d
	movl	$1, %r15d
	jmp	LBB0_22
LBB0_25:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_19:
	xorl	%r15d, %r15d
	movl	$0, %r12d
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_20
	jmp	LBB0_22
LBB0_14:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_22
## %bb.15:
	testl	%r15d, %r15d
	je	LBB0_20
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_5
LBB0_20:
	movq	%rbx, %rdi
	callq	_wbcir_rc6cells_to_byte
	movl	%eax, %r12d
	xorl	%r15d, %r15d
	testb	$-128, %r12b
	je	LBB0_22
## %bb.21:
	shll	$8, %r12d
	movq	%rbx, %rdi
	callq	_wbcir_rc6cells_to_byte
	orl	%eax, %r12d
LBB0_22:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_wbcir_rc6cells_to_byte
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_wbcir_rc6cells_to_byte
	cmpq	$0, (%rbx)
	je	LBB0_24
## %bb.23:
	leaq	L_.str.5(%rip), %rsi
LBB0_5:
	movq	%r14, %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_24:
	movl	%r13d, %edx
	andl	$127, %edx
	movl	%r13d, %ecx
	sarl	$7, %ecx
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	cmovel	%r13d, %edx
	cmovnel	%ecx, %r15d
	movl	%edx, %ecx
	shll	$8, %ecx
	movl	%r12d, %r13d
	shll	$16, %r13d
	orl	%eax, %r13d
	orl	%ecx, %r13d
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	movl	%r12d, %r8d
	movl	%r15d, %r9d
	xorl	%eax, %eax
	pushq	%r13
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_dev_dbg
	addq	$16, %rsp
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wbcir_keydown                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RC6 - Invalid leader space\n"

L_.str.1:                               ## @.str.1
	.asciz	"RC6 - Invalid start bit\n"

L_.str.2:                               ## @.str.2
	.asciz	"RC6 - Invalid mode\n"

L_.str.3:                               ## @.str.3
	.asciz	"RC6 - Toggle bit error\n"

L_.str.4:                               ## @.str.4
	.asciz	"RC6B - Not Supported\n"

L_.str.5:                               ## @.str.5
	.asciz	"RC6 - Cell error(s)\n"

L_.str.6:                               ## @.str.6
	.asciz	"IR-RC6 ad 0x%02X cm 0x%02X cu 0x%04X toggle %u mode %u scan 0x%08X\n"

	.no_dead_strip	_wbcir_parse_rc6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wbcir_parse_rc6
_wbcir_parse_rc6:                       ; @wbcir_parse_rc6
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x1
	mov	x19, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_get_bits
	cbz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_1
LBB0_3:
	mov	x0, x20
	mov	w1, #1
	bl	_get_bits
	cbz	w0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_27
LBB0_5:
	mov	x0, x20
	mov	w1, #2
	bl	_get_bits
	cmp	w0, #2
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x20
	mov	w1, #6
	bl	_get_bits
	cmp	w0, #21
	b.eq	LBB0_10
; %bb.7:
	cmp	w0, #41
	b.ne	LBB0_15
; %bb.8:
	mov	w24, #6
	mov	w25, #1
	b	LBB0_11
LBB0_9:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_27
LBB0_10:
	mov	w25, #0
	mov	w24, #0
LBB0_11:
	mov	x0, x20
	mov	w1, #4
	bl	_get_bits
	cmp	w0, #3
	b.eq	LBB0_16
; %bb.12:
	mov	x21, x0
	cmp	w0, #12
	b.ne	LBB0_18
; %bb.13:
	tbnz	w25, #0, LBB0_20
; %bb.14:
	mov	w22, #0
	mov	w21, #1
	b	LBB0_25
LBB0_15:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_27
LBB0_16:
	tbnz	w25, #0, LBB0_21
; %bb.17:
	mov	w21, #0
	mov	w22, #0
	b	LBB0_25
LBB0_18:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	tbz	w25, #0, LBB0_23
; %bb.19:
	cbz	w21, LBB0_21
LBB0_20:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_27
LBB0_21:
	mov	x0, x20
	bl	_wbcir_rc6cells_to_byte
	mov	x22, x0
	tbnz	w0, #7, LBB0_24
; %bb.22:
	mov	w21, #0
	b	LBB0_25
LBB0_23:
	mov	w22, #0
	b	LBB0_25
LBB0_24:
	mov	x0, x20
	bl	_wbcir_rc6cells_to_byte
	mov	w21, #0
	orr	w22, w0, w22, lsl #8
LBB0_25:
	mov	x0, x20
	bl	_wbcir_rc6cells_to_byte
	mov	x23, x0
	mov	x0, x20
	bl	_wbcir_rc6cells_to_byte
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20]
	cbz	x8, LBB0_28
; %bb.26:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_27:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_dev_dbg
LBB0_28:
	and	w8, w23, #0x7f
	cmp	w25, #0
	csel	w8, w8, w23, ne
	asr	w9, w23, #7
	csel	w21, w9, w21, ne
	orr	w9, w0, w22, lsl #16
	orr	w23, w9, w8, lsl #8
	stp	x22, x21, [sp, #16]
	stp	x8, x0, [sp]
	stp	x24, x23, [sp, #32]
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_wbcir_keydown
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RC6 - Invalid leader space\n"

l_.str.1:                               ; @.str.1
	.asciz	"RC6 - Invalid start bit\n"

l_.str.2:                               ; @.str.2
	.asciz	"RC6 - Invalid mode\n"

l_.str.3:                               ; @.str.3
	.asciz	"RC6 - Toggle bit error\n"

l_.str.4:                               ; @.str.4
	.asciz	"RC6B - Not Supported\n"

l_.str.5:                               ; @.str.5
	.asciz	"RC6 - Cell error(s)\n"

l_.str.6:                               ; @.str.6
	.asciz	"IR-RC6 ad 0x%02X cm 0x%02X cu 0x%04X toggle %u mode %u scan 0x%08X\n"

	.no_dead_strip	_wbcir_parse_rc6
.subsections_via_symbols
