	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_mce_kbd_encode
_ir_mce_kbd_encode:                     ## @ir_mce_kbd_encode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%ecx, %eax
	movq	%rdx, %rbx
	movq	%rdx, -16(%rbp)
	movq	_RC_PROTO_MCIR2_KBD@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	jne	LBB0_2
## %bb.1:
	movq	_MCIR2_KEYBOARD_HEADER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_MCIR2_KEYBOARD_NBITS@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_MCIR2_MOUSE_HEADER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_MCIR2_MOUSE_NBITS@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %ecx
	shll	%cl, %r8d
	movq	_MCIR2_HEADER_NBITS@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	orl	%esi, %r8d
	movq	_ir_mce_kbd_timings@GOTPCREL(%rip), %rdx
	leaq	-16(%rbp), %rdi
	movl	%eax, %esi
	callq	_ir_raw_gen_manchester
	movq	-16(%rbp), %rcx
	subq	%rbx, %rcx
	shrq	$2, %rcx
	testl	%eax, %eax
	cmovnsl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_MCIR2_KBD,4,2         ## @RC_PROTO_MCIR2_KBD
	.comm	_MCIR2_KEYBOARD_HEADER,8,3      ## @MCIR2_KEYBOARD_HEADER
	.comm	_MCIR2_KEYBOARD_NBITS,4,2       ## @MCIR2_KEYBOARD_NBITS
	.comm	_MCIR2_HEADER_NBITS,4,2         ## @MCIR2_HEADER_NBITS
	.comm	_MCIR2_MOUSE_HEADER,8,3         ## @MCIR2_MOUSE_HEADER
	.comm	_MCIR2_MOUSE_NBITS,4,2          ## @MCIR2_MOUSE_NBITS
	.comm	_ir_mce_kbd_timings,4,2         ## @ir_mce_kbd_timings
	.no_dead_strip	_ir_mce_kbd_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_mce_kbd_encode
_ir_mce_kbd_encode:                     ; @ir_mce_kbd_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x3
	mov	x19, x2
	str	x2, [sp, #8]
Lloh0:
	adrp	x9, _RC_PROTO_MCIR2_KBD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RC_PROTO_MCIR2_KBD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w0
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _MCIR2_KEYBOARD_HEADER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MCIR2_KEYBOARD_HEADER@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
Lloh6:
	adrp	x9, _MCIR2_KEYBOARD_NBITS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MCIR2_KEYBOARD_NBITS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w10, w10, w9
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x9, _MCIR2_MOUSE_HEADER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MCIR2_MOUSE_HEADER@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _MCIR2_MOUSE_NBITS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MCIR2_MOUSE_NBITS@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x10]
	lsl	w10, w9, w11
	mov	x9, x11
LBB0_3:
Lloh15:
	adrp	x11, _MCIR2_HEADER_NBITS@GOTPAGE
Lloh16:
	ldr	x11, [x11, _MCIR2_HEADER_NBITS@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	add	w3, w11, w9
	orr	w4, w10, w1
Lloh18:
	adrp	x2, _ir_mce_kbd_timings@GOTPAGE
Lloh19:
	ldr	x2, [x2, _ir_mce_kbd_timings@GOTPAGEOFF]
	add	x0, sp, #8
	mov	x1, x8
	bl	_ir_raw_gen_manchester
	ldr	x8, [sp, #8]
	sub	x8, x8, x19
	lsr	x8, x8, #2
	cmp	w0, #0
	csel	w0, w0, w8, lt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_MCIR2_KBD,4,2         ; @RC_PROTO_MCIR2_KBD
	.comm	_MCIR2_KEYBOARD_HEADER,8,3      ; @MCIR2_KEYBOARD_HEADER
	.comm	_MCIR2_KEYBOARD_NBITS,4,2       ; @MCIR2_KEYBOARD_NBITS
	.comm	_MCIR2_HEADER_NBITS,4,2         ; @MCIR2_HEADER_NBITS
	.comm	_MCIR2_MOUSE_HEADER,8,3         ; @MCIR2_MOUSE_HEADER
	.comm	_MCIR2_MOUSE_NBITS,4,2          ; @MCIR2_MOUSE_NBITS
	.comm	_ir_mce_kbd_timings,4,2         ; @ir_mce_kbd_timings
	.no_dead_strip	_ir_mce_kbd_encode
.subsections_via_symbols
