	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_ir_nec_filter
_img_ir_nec_filter:                     ## @img_ir_nec_filter
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movzbl	(%rdi), %r13d
	movzbl	4(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_RC_PROTO_BIT_NEC@GOTPCREL(%rip), %r12
	movq	_RC_PROTO_BIT_NECX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r12), %ebx
	movq	_RC_PROTO_BIT_NEC32@GOTPCREL(%rip), %r15
	orl	(%r15), %ebx
	andl	%edx, %ebx
	movl	%ebx, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	4(%r14), %eax
	orl	(%r14), %eax
	cmpl	$16777216, %eax                 ## imm = 0x1000000
	jae	LBB0_2
## %bb.3:
	testl	$16711680, %eax                 ## imm = 0xFF0000
	je	LBB0_5
## %bb.4:
	movq	_RC_PROTO_BIT_NECX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	(%r15), %ebx
	je	LBB0_7
	jmp	LBB0_8
LBB0_2:
	movl	(%r15), %ebx
LBB0_6:
	cmpl	(%r15), %ebx
	jne	LBB0_8
LBB0_7:
	movsbl	3(%r14), %edi
	callq	_bitrev8
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movsbl	7(%r14), %edi
	callq	_bitrev8
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movswl	2(%r14), %edi
	callq	_bitrev8
	movl	%eax, %ebx
	movswl	6(%r14), %edi
	callq	_bitrev8
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r14), %edi
	sarl	$8, %edi
	callq	_bitrev8
	movl	%eax, %r13d
	movl	4(%r14), %edi
	sarl	$8, %edi
	callq	_bitrev8
	movl	%eax, %r15d
	movl	(%r14), %edi
	callq	_bitrev8
	movl	%eax, %r12d
	movl	4(%r14), %edi
	callq	_bitrev8
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_5:
	movl	(%r12), %ebx
	cmpl	(%r15), %ebx
	je	LBB0_7
LBB0_8:
	movl	(%r14), %eax
	movq	_RC_PROTO_BIT_NECX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_10
## %bb.9:
	movl	%eax, %edx
	shrl	$16, %edx
	movl	4(%r14), %ecx
	movzbl	%ch, %edi
	movzbl	%dl, %esi
	shrl	$16, %ecx
	movzbl	%cl, %edx
	movzbl	%ah, %ebx
	movl	%r13d, %r12d
	xorl	$255, %r12d
	jmp	LBB0_11
LBB0_10:
	movzbl	%ah, %esi
	movzbl	5(%r14), %edx
	movl	%esi, %ebx
	xorl	$255, %ebx
	movl	%r13d, %r12d
	xorl	$255, %r12d
	movl	%edx, %edi
LBB0_11:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %eax
LBB0_12:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	shll	$24, %r12d
	shll	$16, %r13d
	shll	$8, %ebx
	orl	%esi, %ebx
	orl	%r13d, %ebx
	orl	%r12d, %ebx
	movl	%ebx, (%rcx)
	shll	$24, %eax
	shll	$16, %r15d
	shll	$8, %edi
	orl	%edx, %edi
	orl	%r15d, %edi
	orl	%eax, %edi
	movl	%edi, 4(%rcx)
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_BIT_NEC,4,2           ## @RC_PROTO_BIT_NEC
	.comm	_RC_PROTO_BIT_NECX,4,2          ## @RC_PROTO_BIT_NECX
	.comm	_RC_PROTO_BIT_NEC32,4,2         ## @RC_PROTO_BIT_NEC32
	.no_dead_strip	_img_ir_nec_filter
.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_filter
_img_ir_nec_filter:                     ; @img_ir_nec_filter
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x22, x0
	ldrb	w20, [x0]
	ldrb	w21, [x0, #4]
Lloh0:
	adrp	x26, _RC_PROTO_BIT_NEC@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RC_PROTO_BIT_NEC@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh2:
	adrp	x24, _RC_PROTO_BIT_NECX@GOTPAGE
Lloh3:
	ldr	x24, [x24, _RC_PROTO_BIT_NECX@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh4:
	adrp	x25, _RC_PROTO_BIT_NEC32@GOTPAGE
Lloh5:
	ldr	x25, [x25, _RC_PROTO_BIT_NEC32@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w8, w9
	and	w23, w8, w2
	mov	x0, x23
	bl	_is_power_of_2
	cbnz	w0, LBB0_6
; %bb.1:
	ldp	w8, w9, [x22]
	orr	w8, w9, w8
	lsr	w9, w8, #24
	cbnz	w9, LBB0_4
; %bb.2:
	tst	w8, #0xff0000
	b.eq	LBB0_5
; %bb.3:
	ldr	w23, [x24]
	b	LBB0_6
LBB0_4:
	ldr	w23, [x25]
	b	LBB0_6
LBB0_5:
	ldr	w23, [x26]
LBB0_6:
	ldr	w8, [x25]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
	ldrsb	w0, [x22, #3]
	bl	_bitrev8
	mov	x23, x0
	ldrsb	w0, [x22, #7]
	bl	_bitrev8
	mov	x24, x0
	ldrsh	w0, [x22, #2]
	bl	_bitrev8
	mov	x25, x0
	ldrsh	w0, [x22, #6]
	bl	_bitrev8
	mov	x26, x0
	ldr	w8, [x22]
	asr	w0, w8, #8
	bl	_bitrev8
	mov	x20, x0
	ldr	w8, [x22, #4]
	asr	w0, w8, #8
	bl	_bitrev8
	mov	x21, x0
	ldr	w0, [x22]
	bl	_bitrev8
	mov	x27, x0
	ldr	w0, [x22, #4]
	bl	_bitrev8
	b	LBB0_12
LBB0_8:
	ldr	w9, [x24]
	ldr	w8, [x22]
	cmp	w23, w9
	b.ne	LBB0_10
; %bb.9:
	ubfx	w23, w8, #16, #8
	ldr	w9, [x22, #4]
	ubfx	w24, w9, #16, #8
	ubfx	w25, w8, #8, #8
	ubfx	w26, w9, #8, #8
	eor	w27, w20, #0xff
	b	LBB0_11
LBB0_10:
	ubfx	w23, w8, #8, #8
	ldrb	w24, [x22, #5]
	eor	w25, w23, #0xff
	eor	w27, w20, #0xff
	mov	x26, x24
LBB0_11:
	mov	x0, x21
LBB0_12:
	orr	w8, w23, w25, lsl #8
	orr	w8, w8, w20, lsl #16
	orr	w8, w8, w27, lsl #24
	orr	w9, w24, w26, lsl #8
	orr	w9, w9, w21, lsl #16
	orr	w9, w9, w0, lsl #24
	stp	w8, w9, [x19]
	mov	w0, #0
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_BIT_NEC,4,2           ; @RC_PROTO_BIT_NEC
	.comm	_RC_PROTO_BIT_NECX,4,2          ; @RC_PROTO_BIT_NECX
	.comm	_RC_PROTO_BIT_NEC32,4,2         ; @RC_PROTO_BIT_NEC32
	.no_dead_strip	_img_ir_nec_filter
.subsections_via_symbols
