	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_ir_sony_filter
_img_ir_sony_filter:                    ## @img_ir_sony_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, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	movl	4(%rdi), %r13d
	movl	%eax, %r12d
	shrl	$16, %r12d
	movl	%r13d, %r15d
	shrl	$16, %r15d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	shrl	$8, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	shrl	$8, %r13d
	movzbl	%r13b, %r14d
	movq	_RC_PROTO_BIT_SONY12@GOTPCREL(%rip), %rcx
	movq	_RC_PROTO_BIT_SONY15@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%rcx), %ebx
	movq	_RC_PROTO_BIT_SONY20@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	andl	%edx, %ebx
	movl	%ebx, %edi
	callq	_is_power_of_2
	movq	_RC_PROTO_BIT_SONY20@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_RC_PROTO_BIT_SONY12@GOTPCREL(%rip), %rdx
	testl	%r14d, -52(%rbp)                ## 4-byte Folded Reload
	je	LBB0_3
## %bb.2:
	movl	(%rcx), %ebx
	cmpl	(%rcx), %ebx
	je	LBB0_7
	jmp	LBB0_10
LBB0_3:
	movl	%r12d, %eax
	andl	%r15d, %eax
	testb	$-32, %al
	je	LBB0_5
## %bb.4:
	movq	_RC_PROTO_BIT_SONY15@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	cmpl	(%rcx), %ebx
	jne	LBB0_10
LBB0_7:
	movl	%r12d, %eax
	andl	%r15d, %eax
	testb	$-32, %al
	je	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_9:
	andl	$31, %r15d
	movl	$20, %r8d
	xorl	%edx, %edx
	jmp	LBB0_13
LBB0_5:
	movl	(%rdx), %ebx
	cmpl	(%rcx), %ebx
	je	LBB0_7
LBB0_10:
	movzbl	%r15b, %eax
	movq	_RC_PROTO_BIT_SONY15@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_12
## %bb.11:
	movl	$15, %r8d
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_12:
	shrl	$5, %eax
	orl	$248, %eax
	movl	%eax, %r14d
	andl	%r13d, %r14d
	andl	$31, %r15d
	xorl	%r8d, %r8d
	movb	$1, %dl
LBB0_13:
	movl	%r15d, %eax
LBB0_14:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movzbl	-52(%rbp), %esi                 ## 1-byte Folded Reload
	andl	$127, %ecx
	andl	$127, %ebx
	andl	%eax, %r12d
	andl	%r14d, %esi
	shll	$7, %r12d
	orl	%ecx, %r12d
	shll	$15, %esi
	orl	%r12d, %esi
	movl	%esi, (%rdi)
	shll	$7, %eax
	orl	%ebx, %eax
	shll	$15, %r14d
	orl	%eax, %r14d
	movl	%r14d, 4(%rdi)
	xorl	%eax, %eax
	testb	%dl, %dl
	jne	LBB0_16
## %bb.15:
	movl	%r8d, 8(%rdi)
	movl	%r8d, 12(%rdi)
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_BIT_SONY12,4,2        ## @RC_PROTO_BIT_SONY12
	.comm	_RC_PROTO_BIT_SONY15,4,2        ## @RC_PROTO_BIT_SONY15
	.comm	_RC_PROTO_BIT_SONY20,4,2        ## @RC_PROTO_BIT_SONY20
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_img_ir_sony_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_sony_filter
_img_ir_sony_filter:                    ; @img_ir_sony_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
	ldp	w21, w23, [x0]
	lsr	w22, w21, #16
	lsr	w25, w23, #16
	ubfx	w24, w23, #8, #8
Lloh0:
	adrp	x28, _RC_PROTO_BIT_SONY12@GOTPAGE
Lloh1:
	ldr	x28, [x28, _RC_PROTO_BIT_SONY12@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh2:
	adrp	x26, _RC_PROTO_BIT_SONY15@GOTPAGE
Lloh3:
	ldr	x26, [x26, _RC_PROTO_BIT_SONY15@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w8, w9, w8
Lloh4:
	adrp	x27, _RC_PROTO_BIT_SONY20@GOTPAGE
Lloh5:
	ldr	x27, [x27, _RC_PROTO_BIT_SONY20@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w8, w8, w9
	and	w20, w8, w2
	mov	x0, x20
	bl	_is_power_of_2
	cbnz	w0, LBB0_6
; %bb.1:
	lsr	w8, w21, #8
	tst	w24, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w20, [x27]
	b	LBB0_6
LBB0_3:
	and	w8, w22, w25
	tst	w8, #0xe0
	b.eq	LBB0_5
; %bb.4:
	ldr	w20, [x26]
	b	LBB0_6
LBB0_5:
	ldr	w20, [x28]
LBB0_6:
	ldr	w8, [x27]
	cmp	w20, w8
	b.ne	LBB0_9
; %bb.7:
	and	w8, w22, w25
	tst	w8, #0xe0
	b.eq	LBB0_12
; %bb.8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_9:
	ubfx	w9, w23, #16, #8
	ldr	w8, [x26]
	cmp	w20, w8
	b.ne	LBB0_11
; %bb.10:
	mov	w24, #0
	mov	w10, #0
	mov	w8, #15
	b	LBB0_13
LBB0_11:
	mov	w8, #0
	lsr	w10, w23, #8
	lsr	w9, w9, #5
	orr	w9, w9, #0xf8
	and	w24, w9, w10
	ubfx	w9, w23, #16, #5
	mov	w10, #1
	b	LBB0_13
LBB0_12:
	mov	w10, #0
	ubfx	w9, w23, #16, #5
	mov	w8, #20
LBB0_13:
	ubfx	w11, w21, #8, #8
	and	w12, w21, #0x7f
	and	w13, w23, #0x7f
	and	w14, w9, w22
	and	w11, w11, w24
	bfi	w12, w14, #7, #8
	bfi	w12, w11, #15, #8
	bfi	w13, w9, #7, #8
	bfi	w13, w24, #15, #8
	stp	w12, w13, [x19]
	mov	w0, #0
	tbnz	w10, #0, LBB0_15
; %bb.14:
	stp	w8, w8, [x19, #8]
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_BIT_SONY12,4,2        ; @RC_PROTO_BIT_SONY12
	.comm	_RC_PROTO_BIT_SONY15,4,2        ; @RC_PROTO_BIT_SONY15
	.comm	_RC_PROTO_BIT_SONY20,4,2        ; @RC_PROTO_BIT_SONY20
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_img_ir_sony_filter
.subsections_via_symbols
