	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_input_init              ## -- Begin function mantis_input_init
	.p2align	4, 0x90
_mantis_input_init:                     ## @mantis_input_init
	.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
	movq	_RC_DRIVER_SCANCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rc_allocate_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	36(%r14), %edi
	movq	40(%r14), %rax
	movq	(%rax), %rcx
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movl	32(%r14), %r15d
	movq	8(%r14), %rdi
	callq	_pci_name
	leaq	L_.str.2(%rip), %rdx
	movl	%r15d, %edi
	movl	$4, %esi
	movq	%rax, %rcx
	callq	_snprintf
	movl	36(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 32(%rbx)
	movq	_BUS_PCI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	28(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	24(%r14), %eax
	movl	%eax, 20(%rbx)
	movl	$1, 16(%rbx)
	movq	_MODULE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	16(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_RC_MAP_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, 8(%rbx)
	movq	8(%r14), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_rc_register_device
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%rbx, %rdi
	callq	_rc_free_device
	jmp	LBB0_7
LBB0_1:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movq	%rbx, (%r14)
	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	_RC_DRIVER_SCANCODE,4,2         ## @RC_DRIVER_SCANCODE
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Remote device allocation failed"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Mantis %s IR receiver"

L_.str.2:                               ## @.str.2
	.asciz	"pci-%s/ir0"

	.comm	_BUS_PCI,4,2                    ## @BUS_PCI
	.comm	_MODULE_NAME,4,2                ## @MODULE_NAME
	.comm	_RC_MAP_EMPTY,4,2               ## @RC_MAP_EMPTY
L_.str.3:                               ## @.str.3
	.asciz	"IR device registration failed, ret = %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_input_init              ; -- Begin function mantis_input_init
	.p2align	2
_mantis_input_init:                     ; @mantis_input_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
Lloh0:
	adrp	x8, _RC_DRIVER_SCANCODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC_DRIVER_SCANCODE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rc_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20, #36]
	ldr	x8, [x20, #40]
	ldr	x3, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #4
	bl	_snprintf
	ldr	w21, [x20, #32]
	ldr	x0, [x20, #8]
	bl	_pci_name
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str.2@PAGE
Lloh6:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	w1, #4
	bl	_snprintf
	ldr	d0, [x20, #32]
	str	d0, [x19, #32]
Lloh7:
	adrp	x8, _BUS_PCI@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BUS_PCI@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	ldr	d0, [x20, #24]
	stur	d0, [x19, #20]
	mov	w8, #1
Lloh10:
	adrp	x9, _RC_MAP_EMPTY@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RC_MAP_EMPTY@GOTPAGEOFF]
	str	w8, [x19, #16]
Lloh12:
	ldr	w8, [x9]
	ldp	x10, x9, [x20, #8]
	cmp	x9, #0
	csel	x8, x8, x9, eq
Lloh13:
	adrp	x9, _MODULE_NAME@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MODULE_NAME@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #8]
	str	x10, [x19]
	mov	x0, x19
	bl	_rc_register_device
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
Lloh16:
	adrp	x8, _MANTIS_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MANTIS_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	bl	_rc_free_device
	b	LBB0_5
LBB0_3:
Lloh21:
	adrp	x8, _MANTIS_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MANTIS_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x2, l_.str@PAGE
Lloh25:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	str	x19, [x20]
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_DRIVER_SCANCODE,4,2         ; @RC_DRIVER_SCANCODE
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Remote device allocation failed"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Mantis %s IR receiver"

l_.str.2:                               ; @.str.2
	.asciz	"pci-%s/ir0"

	.comm	_BUS_PCI,4,2                    ; @BUS_PCI
	.comm	_MODULE_NAME,4,2                ; @MODULE_NAME
	.comm	_RC_MAP_EMPTY,4,2               ; @RC_MAP_EMPTY
l_.str.3:                               ; @.str.3
	.asciz	"IR device registration failed, ret = %d"

.subsections_via_symbols
