	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_rc5_encode
_ir_rc5_encode:                         ## @ir_rc5_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	%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
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdx, -48(%rbp)
	movq	_RC_PROTO_RC5@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %eax
	andl	$63, %eax
	movl	%ebx, %ecx
	andl	$64, %ecx
	shll	$6, %ecx
	shrl	$2, %ebx
	andl	$1984, %ebx                     ## imm = 0x7C0
	orl	%eax, %ebx
	orl	%ecx, %ebx
	xorl	$4096, %ebx                     ## imm = 0x1000
	movq	_RC5_NBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%ecx
	movq	_ir_rc5_timings@GOTPCREL(%rip), %rdx
	jmp	LBB0_7
LBB0_2:
	movq	_RC_PROTO_RC5X_20@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_5
## %bb.3:
	movl	%ebx, %eax
	andl	$63, %eax
	movl	%ebx, %ecx
	shll	$4, %ecx
	andl	$262144, %ecx                   ## imm = 0x40000
	movl	%ebx, %edx
	shrl	$4, %edx
	andl	$126976, %edx                   ## imm = 0x1F000
	orl	%eax, %edx
	orl	%ecx, %edx
	shrl	$2, %ebx
	andl	$4032, %ebx                     ## imm = 0xFC0
	orl	%edx, %ebx
	xorl	$262144, %ebx                   ## imm = 0x40000
	movq	_RC5X_NBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_CHECK_RC5X_NBITS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	subl	%eax, %ecx
	movl	%ebx, %r8d
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %r8d
	movq	_ir_rc5x_timings@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	decl	%eax
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	movl	%eax, %ecx
	callq	_ir_raw_gen_manchester
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_9
## %bb.4:
	movq	-48(%rbp), %rax
	subq	%r14, %rax
	shrq	$2, %rax
	subl	%eax, %r15d
	movq	(%r12), %rdx
	addq	$4, %rdx
	movq	_RC5X_NBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subl	(%r13), %ecx
	jmp	LBB0_7
LBB0_5:
	movq	_RC_PROTO_RC5_SZ@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_10
## %bb.6:
	movq	_RC5_SZ_NBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%ecx
	andl	$12287, %ebx                    ## imm = 0x2FFF
	movq	_ir_rc5_sz_timings@GOTPCREL(%rip), %rdx
LBB0_7:
	leaq	-48(%rbp), %rdi
	movl	%r15d, %esi
	movl	%ebx, %r8d
	callq	_ir_raw_gen_manchester
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movq	-48(%rbp), %rax
	subq	%r14, %rax
	shrq	$2, %rax
	jmp	LBB0_9
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_RC5,4,2               ## @RC_PROTO_RC5
	.comm	_ir_rc5_timings,4,2             ## @ir_rc5_timings
	.comm	_RC5_NBITS,4,2                  ## @RC5_NBITS
	.comm	_RC_PROTO_RC5X_20,4,2           ## @RC_PROTO_RC5X_20
	.comm	_RC5X_NBITS,4,2                 ## @RC5X_NBITS
	.comm	_CHECK_RC5X_NBITS,4,2           ## @CHECK_RC5X_NBITS
	.comm	_ir_rc5x_timings,8,3            ## @ir_rc5x_timings
	.comm	_RC_PROTO_RC5_SZ,4,2            ## @RC_PROTO_RC5_SZ
	.comm	_ir_rc5_sz_timings,4,2          ## @ir_rc5_sz_timings
	.comm	_RC5_SZ_NBITS,4,2               ## @RC5_SZ_NBITS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ir_rc5_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_rc5_encode
_ir_rc5_encode:                         ; @ir_rc5_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x3
	mov	x19, x2
	str	x2, [sp, #8]
Lloh0:
	adrp	x8, _RC_PROTO_RC5@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_RC5@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_2
; %bb.1:
	lsr	w8, w1, #6
	lsr	w9, w1, #2
	and	w9, w9, #0x7c0
	bfxil	w9, w1, #0, #6
	bfi	w9, w8, #12, #1
	eor	w4, w9, #0x1000
Lloh3:
	adrp	x8, _RC5_NBITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RC5_NBITS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	sub	w3, w8, #1
Lloh6:
	adrp	x2, _ir_rc5_timings@GOTPAGE
Lloh7:
	ldr	x2, [x2, _ir_rc5_timings@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
Lloh8:
	adrp	x8, _RC_PROTO_RC5X_20@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RC_PROTO_RC5X_20@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_5
; %bb.3:
	lsr	w8, w1, #14
	lsr	w9, w1, #4
	and	w9, w9, #0x1f000
	lsr	w10, w1, #2
	and	w10, w10, #0xfc0
	bfxil	w9, w1, #0, #6
	bfi	w9, w8, #18, #1
	orr	w8, w9, w10
	eor	w21, w8, #0x40000
Lloh11:
	adrp	x22, _RC5X_NBITS@GOTPAGE
Lloh12:
	ldr	x22, [x22, _RC5X_NBITS@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh13:
	adrp	x23, _CHECK_RC5X_NBITS@GOTPAGE
Lloh14:
	ldr	x23, [x23, _CHECK_RC5X_NBITS@GOTPAGEOFF]
	ldr	w9, [x23]
	sub	w8, w8, w9
	lsr	w4, w21, w8
Lloh15:
	adrp	x24, _ir_rc5x_timings@GOTPAGE
Lloh16:
	ldr	x24, [x24, _ir_rc5x_timings@GOTPAGEOFF]
	ldr	x2, [x24]
	sub	w3, w9, #1
	add	x0, sp, #8
	mov	x1, x20
	bl	_ir_raw_gen_manchester
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_10
; %bb.4:
	ldr	x8, [sp, #8]
	sub	x8, x8, x19
	lsr	x8, x8, #2
	sub	w1, w20, w8
	ldr	x8, [x24]
	add	x2, x8, #4
	ldr	w8, [x22]
	ldr	w9, [x23]
	sub	w3, w8, w9
	add	x0, sp, #8
	mov	x4, x21
	bl	_ir_raw_gen_manchester
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_8
	b	LBB0_10
LBB0_5:
Lloh17:
	adrp	x8, _RC_PROTO_RC5_SZ@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RC_PROTO_RC5_SZ@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_9
; %bb.6:
Lloh20:
	adrp	x8, _RC5_SZ_NBITS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RC5_SZ_NBITS@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	sub	w3, w8, #1
	mov	w8, #12287
	and	w4, w1, w8
Lloh23:
	adrp	x2, _ir_rc5_sz_timings@GOTPAGE
Lloh24:
	ldr	x2, [x2, _ir_rc5_sz_timings@GOTPAGEOFF]
LBB0_7:
	add	x0, sp, #8
	mov	x1, x20
	bl	_ir_raw_gen_manchester
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_10
LBB0_8:
	ldr	x8, [sp, #8]
	sub	x8, x8, x19
	lsr	x0, x8, #2
	b	LBB0_10
LBB0_9:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_RC5,4,2               ; @RC_PROTO_RC5
	.comm	_ir_rc5_timings,4,2             ; @ir_rc5_timings
	.comm	_RC5_NBITS,4,2                  ; @RC5_NBITS
	.comm	_RC_PROTO_RC5X_20,4,2           ; @RC_PROTO_RC5X_20
	.comm	_RC5X_NBITS,4,2                 ; @RC5X_NBITS
	.comm	_CHECK_RC5X_NBITS,4,2           ; @CHECK_RC5X_NBITS
	.comm	_ir_rc5x_timings,8,3            ; @ir_rc5x_timings
	.comm	_RC_PROTO_RC5_SZ,4,2            ; @RC_PROTO_RC5_SZ
	.comm	_ir_rc5_sz_timings,4,2          ; @ir_rc5_sz_timings
	.comm	_RC5_SZ_NBITS,4,2               ; @RC5_SZ_NBITS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ir_rc5_encode
.subsections_via_symbols
