	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2_gpio_probe
_ps2_gpio_probe:                        ## @ps2_gpio_probe
	.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	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$56, %esi
	callq	_devm_kzalloc
	movq	%rax, %r12
	movl	(%rbx), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r14
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.5:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ps2_gpio_get_props
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.6:
	movl	52(%r12), %edi
	callq	_gpiod_cansleep
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	48(%r12), %edi
	callq	_gpiod_cansleep
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_3:
	subl	(%rax), %ebx
LBB0_4:
	movq	%r14, %rdi
	callq	_kfree
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %ebx
	movl	%eax, (%r12)
	testl	%eax, %eax
	js	LBB0_4
## %bb.10:
	movq	_ps2_gpio_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_NO_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %r9
	callq	_devm_request_irq
	movl	(%r12), %edx
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_12:
	movl	%edx, %edi
	callq	_disable_irq
	movq	_SERIO_8042@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_ps2_gpio_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_ps2_gpio_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	40(%r12), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_ps2_gpio_write@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_14:
	movq	%rax, 24(%r14)
	movq	%r12, 16(%r14)
	movq	%r15, 8(%r14)
	movl	4(%r14), %ebx
	movq	%r15, %rdi
	callq	_dev_name
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_strlcpy
	movl	(%r14), %ebx
	movq	%r15, %rdi
	callq	_dev_name
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r14, 32(%r12)
	movq	%r15, 24(%r12)
	movq	_PS2_MODE_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movl	$1, 4(%r12)
	leaq	16(%r12), %rdi
	movq	_ps2_gpio_tx_work_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	leaq	12(%r12), %rdi
	callq	_init_completion
	movq	%r12, %rdi
	addq	$8, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_serio_register_port
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIO data or clk are connected via slow bus\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ps2_gpio_irq,4,2               ## @ps2_gpio_irq
	.comm	_IRQF_NO_THREAD,4,2             ## @IRQF_NO_THREAD
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
L_.str.1:                               ## @.str.1
	.asciz	"failed to request irq %d: %d\n"

	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
	.comm	_ps2_gpio_open,4,2              ## @ps2_gpio_open
	.comm	_ps2_gpio_close,4,2             ## @ps2_gpio_close
	.comm	_ps2_gpio_write,8,3             ## @ps2_gpio_write
	.comm	_PS2_MODE_RX,4,2                ## @PS2_MODE_RX
	.comm	_ps2_gpio_tx_work_fn,4,2        ## @ps2_gpio_tx_work_fn
	.no_dead_strip	_ps2_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2_gpio_probe
_ps2_gpio_probe:                        ; @ps2_gpio_probe
	.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	x19, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x19, [x19, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	w1, #56
	bl	_devm_kzalloc
	mov	x21, x0
	ldr	w1, [x19]
	mov	w0, #48
	bl	_kzalloc
	mov	x19, x0
	cmp	x21, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	mov	x1, x21
	bl	_ps2_gpio_get_props
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w0, [x21, #52]
	bl	_gpiod_cansleep
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x21, #48]
	bl	_gpiod_cansleep
	cbz	x0, LBB0_9
LBB0_5:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x19
	bl	_kfree
LBB0_8:
	mov	x0, x22
	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
LBB0_9:
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	mov	x22, x0
	str	w0, [x21]
	tbnz	w0, #31, LBB0_7
; %bb.10:
Lloh8:
	adrp	x8, _ps2_gpio_irq@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ps2_gpio_irq@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _IRQF_NO_THREAD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IRQF_NO_THREAD@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	x5, x21
	bl	_devm_request_irq
	mov	x22, x0
	ldr	w0, [x21]
	cbz	w22, LBB0_12
; %bb.11:
	stp	x0, x22, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_7
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_disable_irq
Lloh19:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #40]
Lloh22:
	adrp	x8, _ps2_gpio_open@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ps2_gpio_open@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _ps2_gpio_close@GOTPAGE
Lloh26:
	ldr	x9, [x9, _ps2_gpio_close@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #32]
	ldr	x8, [x21, #40]
Lloh28:
	adrp	x9, _ps2_gpio_write@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ps2_gpio_write@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x8, xzr, x9, eq
	stp	x21, x8, [x19, #16]
	str	x20, [x19, #8]
	ldr	w22, [x19, #4]
	mov	x0, x20
	bl	_dev_name
	mov	x1, x0
	mov	x0, x22
	mov	w2, #4
	bl	_strlcpy
	ldr	w22, [x19]
	mov	x0, x20
	bl	_dev_name
	mov	x1, x0
	mov	x0, x22
	mov	w2, #4
	bl	_strlcpy
	stp	x20, x19, [x21, #24]
Lloh31:
	adrp	x8, _PS2_MODE_RX@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PS2_MODE_RX@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x21, #20]
	mov	w8, #1
	str	w8, [x21, #4]
	add	x0, x21, #16
Lloh34:
	adrp	x8, _ps2_gpio_tx_work_fn@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ps2_gpio_tx_work_fn@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x0, x21, #12
	bl	_init_completion
	add	x0, x21, #8
	bl	_mutex_init
	mov	x0, x19
	bl	_serio_register_port
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	w22, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO data or clk are connected via slow bus\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ps2_gpio_irq,4,2               ; @ps2_gpio_irq
	.comm	_IRQF_NO_THREAD,4,2             ; @IRQF_NO_THREAD
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
l_.str.1:                               ; @.str.1
	.asciz	"failed to request irq %d: %d\n"

	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
	.comm	_ps2_gpio_open,4,2              ; @ps2_gpio_open
	.comm	_ps2_gpio_close,4,2             ; @ps2_gpio_close
	.comm	_ps2_gpio_write,8,3             ; @ps2_gpio_write
	.comm	_PS2_MODE_RX,4,2                ; @PS2_MODE_RX
	.comm	_ps2_gpio_tx_work_fn,4,2        ; @ps2_gpio_tx_work_fn
	.no_dead_strip	_ps2_gpio_probe
.subsections_via_symbols
