	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_img_ir_probe_hw                ## -- Begin function img_ir_probe_hw
	.p2align	4, 0x90
_img_ir_probe_hw:                       ## @img_ir_probe_hw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_img_ir_init_decoders
	movq	%r14, %rdi
	callq	_img_ir_probe_hw_caps
	leaq	28(%r14), %rdi
	movq	_img_ir_end_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	leaq	24(%r14), %rdi
	movq	_img_ir_suspend_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movl	(%r14), %edi
	callq	_IS_ERR
	movl	%eax, %ecx
	movl	$32768, %eax                    ## imm = 0x8000
	testl	%ecx, %ecx
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	callq	_clk_get_rate
LBB0_2:
	movl	%eax, 8(%r14)
	movq	_RC_DRIVER_SCANCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rc_allocate_device
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%r14, 32(%rax)
	movq	_RC_MAP_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, %rdi
	callq	_img_ir_allowed_protos
	movl	%eax, 20(%rbx)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%rbx)
	movq	_img_ir_set_normal_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_img_ir_set_wakeup_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_rc_register_device
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_img_ir_set_decoder
	movq	$0, 16(%r14)
	movq	%rbx, %rdi
	callq	_rc_free_device
	jmp	LBB0_7
LBB0_3:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movq	_img_ir_change_protocol@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	4(%r14), %edi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%r15d, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_img_ir_end_timer,4,2           ## @img_ir_end_timer
	.comm	_img_ir_suspend_timer,4,2       ## @img_ir_suspend_timer
	.comm	_RC_DRIVER_SCANCODE,4,2         ## @RC_DRIVER_SCANCODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot allocate input device\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RC_MAP_EMPTY,4,2               ## @RC_MAP_EMPTY
L_.str.1:                               ## @.str.1
	.asciz	"IMG Infrared Decoder"

	.comm	_img_ir_set_normal_filter,4,2   ## @img_ir_set_normal_filter
	.comm	_img_ir_set_wakeup_filter,4,2   ## @img_ir_set_wakeup_filter
L_.str.2:                               ## @.str.2
	.asciz	"failed to register IR input device\n"

	.comm	_img_ir_change_protocol,4,2     ## @img_ir_change_protocol
	.comm	_img_ir_clk_notify,4,2          ## @img_ir_clk_notify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_img_ir_probe_hw                ; -- Begin function img_ir_probe_hw
	.p2align	2
_img_ir_probe_hw:                       ; @img_ir_probe_hw
	.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
	mov	x19, x0
	bl	_img_ir_init_decoders
	mov	x0, x19
	bl	_img_ir_probe_hw_caps
	add	x0, x19, #28
Lloh0:
	adrp	x8, _img_ir_end_timer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _img_ir_end_timer@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	add	x0, x19, #24
Lloh3:
	adrp	x8, _img_ir_suspend_timer@GOTPAGE
Lloh4:
	ldr	x8, [x8, _img_ir_suspend_timer@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	ldr	w0, [x19]
	bl	_IS_ERR
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #32768
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
	bl	_clk_get_rate
LBB0_3:
	str	w0, [x19, #8]
Lloh6:
	adrp	x8, _RC_DRIVER_SCANCODE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RC_DRIVER_SCANCODE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_rc_allocate_device
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
	str	x19, [x0, #32]
Lloh9:
	adrp	x8, _RC_MAP_EMPTY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RC_MAP_EMPTY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	mov	x0, x19
	bl	_img_ir_allowed_protos
	str	w0, [x20, #20]
Lloh12:
	adrp	x8, l_.str.1@PAGE
Lloh13:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x20]
Lloh14:
	adrp	x8, _img_ir_set_normal_filter@GOTPAGE
Lloh15:
	ldr	x8, [x8, _img_ir_set_normal_filter@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _img_ir_set_wakeup_filter@GOTPAGE
Lloh18:
	ldr	x9, [x9, _img_ir_set_wakeup_filter@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #12]
	mov	x0, x20
	bl	_rc_register_device
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	ldr	w0, [x19, #4]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	bl	_img_ir_set_decoder
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_rc_free_device
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19, #4]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_7:
Lloh27:
	adrp	x8, _img_ir_change_protocol@GOTPAGE
Lloh28:
	ldr	x8, [x8, _img_ir_change_protocol@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_device_init_wakeup
LBB0_8:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_img_ir_end_timer,4,2           ; @img_ir_end_timer
	.comm	_img_ir_suspend_timer,4,2       ; @img_ir_suspend_timer
	.comm	_RC_DRIVER_SCANCODE,4,2         ; @RC_DRIVER_SCANCODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot allocate input device\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RC_MAP_EMPTY,4,2               ; @RC_MAP_EMPTY
l_.str.1:                               ; @.str.1
	.asciz	"IMG Infrared Decoder"

	.comm	_img_ir_set_normal_filter,4,2   ; @img_ir_set_normal_filter
	.comm	_img_ir_set_wakeup_filter,4,2   ; @img_ir_set_wakeup_filter
l_.str.2:                               ; @.str.2
	.asciz	"failed to register IR input device\n"

	.comm	_img_ir_change_protocol,4,2     ; @img_ir_change_protocol
	.comm	_img_ir_clk_notify,4,2          ; @img_ir_clk_notify
.subsections_via_symbols
