	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_img_ir_remove_raw              ## -- Begin function img_ir_remove_raw
	.p2align	4, 0x90
_img_ir_remove_raw:                     ## @img_ir_remove_raw
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	callq	_spin_lock_irq
	movq	$0, 16(%rbx)
	movq	_IMG_IR_IRQ_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_img_ir_read
	movq	_IMG_IR_IRQ_EDGE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_img_ir_write
	movq	_IMG_IR_IRQ_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_img_ir_write
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
	movq	%r14, %rdi
	callq	_rc_unregister_device
	addq	$8, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_del_timer_sync                 ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMG_IR_IRQ_ENABLE,4,2          ## @IMG_IR_IRQ_ENABLE
	.comm	_IMG_IR_IRQ_EDGE,4,2            ## @IMG_IR_IRQ_EDGE
	.comm	_IMG_IR_IRQ_CLEAR,4,2           ## @IMG_IR_IRQ_CLEAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_img_ir_remove_raw              ; -- Begin function img_ir_remove_raw
	.p2align	2
_img_ir_remove_raw:                     ; @img_ir_remove_raw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0, #16]
	cbz	x20, LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_spin_lock_irq
	str	xzr, [x19, #16]
Lloh0:
	adrp	x21, _IMG_IR_IRQ_ENABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IMG_IR_IRQ_ENABLE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_img_ir_read
Lloh2:
	adrp	x22, _IMG_IR_IRQ_EDGE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IMG_IR_IRQ_EDGE@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	bl	_img_ir_write
Lloh4:
	adrp	x8, _IMG_IR_IRQ_CLEAR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IMG_IR_IRQ_CLEAR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_img_ir_write
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x20
	bl	_rc_unregister_device
	add	x0, x19, #8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_del_timer_sync
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IMG_IR_IRQ_ENABLE,4,2          ; @IMG_IR_IRQ_ENABLE
	.comm	_IMG_IR_IRQ_EDGE,4,2            ; @IMG_IR_IRQ_EDGE
	.comm	_IMG_IR_IRQ_CLEAR,4,2           ; @IMG_IR_IRQ_CLEAR
.subsections_via_symbols
