	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_ir_sony_scancode
_img_ir_sony_scancode:                  ## @img_ir_sony_scancode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$20, %edi
	je	LBB0_9
## %bb.1:
	cmpl	$15, %edi
	je	LBB0_7
## %bb.2:
	cmpl	$12, %edi
	jne	LBB0_4
## %bb.3:
	movq	_RC_PROTO_BIT_SONY12@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.5:
	movl	%esi, %eax
	shrl	$7, %eax
	andl	$31, %eax
	movq	_RC_PROTO_SONY12@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_9:
	movq	_RC_PROTO_BIT_SONY20@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.10:
	movl	%esi, %eax
	shrl	$7, %eax
	andl	$31, %eax
	movq	_RC_PROTO_SONY20@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 4(%rcx)
	movl	%esi, %edx
	shrl	$4, %edx
	andl	$65280, %edx                    ## imm = 0xFF00
	jmp	LBB0_11
LBB0_7:
	movq	_RC_PROTO_BIT_SONY15@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.8:
	movl	%esi, %eax
	shrl	$7, %eax
	movzbl	%al, %eax
	movq	_RC_PROTO_SONY15@GOTPCREL(%rip), %rdx
LBB0_6:
	movl	(%rdx), %edx
	movl	%edx, 4(%rcx)
	xorl	%edx, %edx
LBB0_11:
	andl	$127, %esi
	shll	$16, %eax
	orl	%edx, %eax
	orl	%esi, %eax
	movl	%eax, (%rcx)
	movq	_IMG_IR_SCANCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_PROTO_BIT_SONY12,4,2        ## @RC_PROTO_BIT_SONY12
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RC_PROTO_SONY12,4,2            ## @RC_PROTO_SONY12
	.comm	_RC_PROTO_BIT_SONY15,4,2        ## @RC_PROTO_BIT_SONY15
	.comm	_RC_PROTO_SONY15,4,2            ## @RC_PROTO_SONY15
	.comm	_RC_PROTO_BIT_SONY20,4,2        ## @RC_PROTO_BIT_SONY20
	.comm	_RC_PROTO_SONY20,4,2            ## @RC_PROTO_SONY20
	.comm	_IMG_IR_SCANCODE,4,2            ## @IMG_IR_SCANCODE
	.no_dead_strip	_img_ir_sony_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_sony_scancode
_img_ir_sony_scancode:                  ; @img_ir_sony_scancode
	.cfi_startproc
; %bb.0:
	cmp	w0, #20
	b.eq	LBB0_5
; %bb.1:
	cmp	w0, #15
	b.eq	LBB0_7
; %bb.2:
	cmp	w0, #12
	b.ne	LBB0_11
; %bb.3:
Lloh0:
	adrp	x8, _RC_PROTO_BIT_SONY12@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_PROTO_BIT_SONY12@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_11
; %bb.4:
	mov	w9, #0
	ubfx	w8, w1, #7, #5
Lloh3:
	adrp	x10, _RC_PROTO_SONY12@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RC_PROTO_SONY12@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _RC_PROTO_BIT_SONY20@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RC_PROTO_BIT_SONY20@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_11
; %bb.6:
	ubfx	w8, w1, #7, #5
Lloh8:
	adrp	x9, _RC_PROTO_SONY20@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RC_PROTO_SONY20@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	str	w9, [x3, #4]
	lsr	w9, w1, #4
	and	w9, w9, #0xff00
	b	LBB0_10
LBB0_7:
Lloh11:
	adrp	x8, _RC_PROTO_BIT_SONY15@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RC_PROTO_BIT_SONY15@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_11
; %bb.8:
	mov	w9, #0
	ubfx	w8, w1, #7, #8
Lloh14:
	adrp	x10, _RC_PROTO_SONY15@GOTPAGE
Lloh15:
	ldr	x10, [x10, _RC_PROTO_SONY15@GOTPAGEOFF]
LBB0_9:
	ldr	w10, [x10]
	str	w10, [x3, #4]
LBB0_10:
	and	w10, w1, #0x7f
	bfi	w9, w8, #16, #8
	orr	w8, w9, w10
	str	w8, [x3]
Lloh16:
	adrp	x8, _IMG_IR_SCANCODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IMG_IR_SCANCODE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ret
LBB0_11:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_PROTO_BIT_SONY12,4,2        ; @RC_PROTO_BIT_SONY12
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RC_PROTO_SONY12,4,2            ; @RC_PROTO_SONY12
	.comm	_RC_PROTO_BIT_SONY15,4,2        ; @RC_PROTO_BIT_SONY15
	.comm	_RC_PROTO_SONY15,4,2            ; @RC_PROTO_SONY15
	.comm	_RC_PROTO_BIT_SONY20,4,2        ; @RC_PROTO_BIT_SONY20
	.comm	_RC_PROTO_SONY20,4,2            ; @RC_PROTO_SONY20
	.comm	_IMG_IR_SCANCODE,4,2            ; @IMG_IR_SCANCODE
	.no_dead_strip	_img_ir_sony_scancode
.subsections_via_symbols
