	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ams_delta_serio_init
_ams_delta_serio_init:                  ## @ams_delta_serio_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r15
	movl	(%r14), %eax
	movl	%eax, 12(%r15)
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_regulator_get
	movl	%eax, 8(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	8(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	movl	(%rax), %eax
	addl	%r15d, %eax
	cmovnel	%r15d, %ebx
	jmp	LBB0_12
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_13
## %bb.6:
	movq	_ams_delta_serio_interrupt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_14
## %bb.7:
	movl	(%r12), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %rbx
	movq	%rax, (%r15)
	movq	_SERIO_8042@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_ams_delta_serio_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_ams_delta_serio_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movl	(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	24(%rbx), %r12d
	movq	%r14, %rdi
	callq	_dev_name
	movl	%r12d, %edi
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	%rbx, %r12
	addq	$8, %r12
	movq	%r14, 8(%rbx)
	movq	%r15, 16(%rbx)
	movq	%rbx, %rdi
	callq	_serio_register_port
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movl	(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_14:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vcc"

L_.str.1:                               ## @.str.1
	.asciz	"regulator request failed (%d)\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ams_delta_serio_interrupt,4,2  ## @ams_delta_serio_interrupt
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
L_.str.2:                               ## @.str.2
	.asciz	"IRQ request failed (%d)\n"

	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
	.comm	_ams_delta_serio_open,4,2       ## @ams_delta_serio_open
	.comm	_ams_delta_serio_close,4,2      ## @ams_delta_serio_close
L_.str.3:                               ## @.str.3
	.asciz	"AMS DELTA keyboard adapter"

L_.str.4:                               ## @.str.4
	.asciz	"%s\n"

	.no_dead_strip	_ams_delta_serio_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ams_delta_serio_init
_ams_delta_serio_init:                  ; @ams_delta_serio_init
	.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
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19]
	str	w8, [x0, #12]
	cbz	w8, LBB0_4
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_regulator_get
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #8]
	bl	_PTR_ERR
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EPROBE_DEFER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EPROBE_DEFER@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmn	w20, w8
	csneg	w21, w20, w9, ne
	b	LBB0_11
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_12
; %bb.6:
	mov	x1, x0
Lloh14:
	adrp	x8, _ams_delta_serio_interrupt@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ams_delta_serio_interrupt@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
Lloh20:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x5, x20
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_13
; %bb.7:
	ldr	w1, [x22]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.8:
	mov	x21, x0
Lloh23:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
	str	x0, [x20]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x0, #36]
Lloh26:
	adrp	x8, _ams_delta_serio_open@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ams_delta_serio_open@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _ams_delta_serio_close@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ams_delta_serio_close@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #28]
	ldr	w0, [x0]
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	ldr	w22, [x21, #24]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	mov	x0, x22
	mov	w2, #4
	bl	_strlcpy
	mov	x22, x21
	str	x19, [x22, #8]!
	str	x20, [x21, #16]
	mov	x0, x21
	bl	_serio_register_port
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	ldr	w2, [x21]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_dev_info
	mov	w21, #0
	b	LBB0_11
LBB0_9:
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	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
LBB0_12:
Lloh38:
	adrp	x8, _ENXIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
	mov	x21, x0
Lloh40:
	adrp	x1, l_.str.2@PAGE
Lloh41:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vcc"

l_.str.1:                               ; @.str.1
	.asciz	"regulator request failed (%d)\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ams_delta_serio_interrupt,4,2  ; @ams_delta_serio_interrupt
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
l_.str.2:                               ; @.str.2
	.asciz	"IRQ request failed (%d)\n"

	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
	.comm	_ams_delta_serio_open,4,2       ; @ams_delta_serio_open
	.comm	_ams_delta_serio_close,4,2      ; @ams_delta_serio_close
l_.str.3:                               ; @.str.3
	.asciz	"AMS DELTA keyboard adapter"

l_.str.4:                               ; @.str.4
	.asciz	"%s\n"

	.no_dead_strip	_ams_delta_serio_init
.subsections_via_symbols
