	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_ir_nec_scancode
_img_ir_nec_scancode:                   ## @img_ir_nec_scancode
	.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
	cmpl	$32, %edi
	je	LBB0_4
## %bb.1:
	testl	%edi, %edi
	jne	LBB0_3
## %bb.2:
	movq	_IMG_IR_REPEATCODE@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	%rcx, %r14
	movl	%esi, %ebx
	movzbl	%bl, %edi
	movzbl	%bh, %eax
	movl	%esi, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %r15d
	shrl	$24, %ebx
	movl	%r15d, %ecx
	xorl	%ebx, %ecx
	cmpl	$255, %ecx
	jne	LBB0_5
## %bb.6:
	movl	%eax, %ecx
	xorl	%edi, %ecx
	cmpl	$255, %ecx
	jne	LBB0_7
## %bb.8:
	shll	$8, %edi
	orl	%r15d, %edi
	movq	_RC_PROTO_NEC@GOTPCREL(%rip), %rcx
	movl	%edi, %eax
	jmp	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %r13d
	callq	_bitrev8
	movl	%eax, %r12d
	shll	$24, %r12d
	movl	%r13d, %edi
	callq	_bitrev8
	movl	%eax, %r13d
	shll	$16, %r13d
	orl	%r12d, %r13d
	movl	%r15d, %edi
	callq	_bitrev8
	movl	%eax, %r15d
	shll	$8, %r15d
	orl	%r13d, %r15d
	movl	%ebx, %edi
	callq	_bitrev8
	orl	%r15d, %eax
	movq	_RC_PROTO_NEC32@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_7:
	shll	$16, %edi
	shll	$8, %eax
	orl	%edi, %eax
	orl	%r15d, %eax
	movq	_RC_PROTO_NECX@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	%eax, (%r14)
	movl	(%rcx), %eax
	movl	%eax, 4(%r14)
	movq	_IMG_IR_SCANCODE@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMG_IR_REPEATCODE,4,2          ## @IMG_IR_REPEATCODE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RC_PROTO_NEC32,4,2             ## @RC_PROTO_NEC32
	.comm	_RC_PROTO_NECX,4,2              ## @RC_PROTO_NECX
	.comm	_RC_PROTO_NEC,4,2               ## @RC_PROTO_NEC
	.comm	_IMG_IR_SCANCODE,4,2            ## @IMG_IR_SCANCODE
	.no_dead_strip	_img_ir_nec_scancode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function img_ir_nec_scancode
_img_ir_nec_scancode:                   ; @img_ir_nec_scancode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cmp	w0, #32
	b.eq	LBB0_3
; %bb.1:
	cbnz	w0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _IMG_IR_REPEATCODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMG_IR_REPEATCODE@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	mov	x19, x3
	and	w0, w1, #0xff
	ubfx	w22, w1, #8, #8
	ubfx	w20, w1, #16, #8
	lsr	w21, w1, #24
	eor	w8, w20, w21
	cmp	w8, #255
	b.ne	LBB0_6
; %bb.4:
	eor	w8, w22, w0
	mov	x9, x20
	bfi	w9, w0, #8, #8
Lloh2:
	adrp	x10, _RC_PROTO_NEC@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RC_PROTO_NEC@GOTPAGEOFF]
	lsl	w11, w0, #16
	bfi	w11, w22, #8, #8
	orr	w11, w11, w20
Lloh4:
	adrp	x12, _RC_PROTO_NECX@GOTPAGE
Lloh5:
	ldr	x12, [x12, _RC_PROTO_NECX@GOTPAGEOFF]
	cmp	w8, #255
	csel	w8, w9, w11, eq
	csel	x9, x10, x12, eq
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_6:
	bl	_bitrev8
	mov	x23, x0
	mov	x0, x22
	bl	_bitrev8
	lsl	w8, w0, #16
	orr	w22, w8, w23, lsl #24
	mov	x0, x20
	bl	_bitrev8
	orr	w20, w22, w0, lsl #8
	mov	x0, x21
	bl	_bitrev8
	orr	w8, w20, w0
Lloh9:
	adrp	x9, _RC_PROTO_NEC32@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RC_PROTO_NEC32@GOTPAGEOFF]
LBB0_7:
	str	w8, [x19]
	ldr	w8, [x9]
	str	w8, [x19, #4]
Lloh11:
	adrp	x8, _IMG_IR_SCANCODE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IMG_IR_SCANCODE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IMG_IR_REPEATCODE,4,2          ; @IMG_IR_REPEATCODE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RC_PROTO_NEC32,4,2             ; @RC_PROTO_NEC32
	.comm	_RC_PROTO_NECX,4,2              ; @RC_PROTO_NECX
	.comm	_RC_PROTO_NEC,4,2               ; @RC_PROTO_NEC
	.comm	_IMG_IR_SCANCODE,4,2            ; @IMG_IR_SCANCODE
	.no_dead_strip	_img_ir_nec_scancode
.subsections_via_symbols
