	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function olpc_apsp_probe
_olpc_apsp_probe:                       ## @olpc_apsp_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r12, 8(%rax)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 32(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.12:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movl	32(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r14)
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movl	(%r13), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, %r15
	movq	_SERIO_8042_XL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movq	_olpc_apsp_write@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	movq	_olpc_apsp_open@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	movq	_olpc_apsp_close@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, 24(%r15)
	movq	%r14, 16(%r15)
	movq	%r12, 8(%r15)
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r15, 24(%r14)
	movq	%r15, %rdi
	callq	_serio_register_port
	movl	(%r13), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	movq	_SERIO_8042@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	movq	_olpc_apsp_write@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r13)
	movq	_olpc_apsp_open@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r13)
	movq	(%rbx), %rax
	movq	%rax, 24(%r13)
	movq	%r14, 16(%r13)
	movq	%r12, 8(%r13)
	movl	4(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r13, 16(%r14)
	movq	%r13, %rdi
	callq	_serio_register_port
	movl	(%r14), %edi
	movq	_olpc_apsp_rx@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	leaq	L_.str.6(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %ebx
	callq	_dev_err
	movq	%r13, %rdi
	callq	_serio_unregister_port
                                        ## kill: def $ebx killed $ebx def $rbx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rax, %rbx
	jmp	LBB0_11
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	%r15, %rdi
	callq	_serio_unregister_port
	jmp	LBB0_11
LBB0_13:
	movq	8(%r14), %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str.7(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_dbg
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map WTM registers\n"

	.comm	_SERIO_8042_XL,4,2              ## @SERIO_8042_XL
	.comm	_olpc_apsp_write,8,3            ## @olpc_apsp_write
	.comm	_olpc_apsp_open,8,3             ## @olpc_apsp_open
	.comm	_olpc_apsp_close,8,3            ## @olpc_apsp_close
L_.str.1:                               ## @.str.1
	.asciz	"sp keyboard"

L_.str.2:                               ## @.str.2
	.asciz	"sp/serio0"

	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
L_.str.3:                               ## @.str.3
	.asciz	"sp touchpad"

L_.str.4:                               ## @.str.4
	.asciz	"sp/serio1"

	.comm	_olpc_apsp_rx,4,2               ## @olpc_apsp_rx
L_.str.5:                               ## @.str.5
	.asciz	"olpc-apsp"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to request IRQ\n"

L_.str.7:                               ## @.str.7
	.asciz	"probed successfully.\n"

	.no_dead_strip	_olpc_apsp_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function olpc_apsp_probe
_olpc_apsp_probe:                       ; @olpc_apsp_probe
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #8]
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #32]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20]
	tbnz	x0, #63, LBB0_10
; %bb.4:
	ldr	w1, [x22]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
Lloh7:
	adrp	x8, _SERIO_8042_XL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERIO_8042_XL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x0, #48]
Lloh10:
	adrp	x23, _olpc_apsp_write@GOTPAGE
Lloh11:
	ldr	x23, [x23, _olpc_apsp_write@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x0, #40]
Lloh12:
	adrp	x24, _olpc_apsp_open@GOTPAGE
Lloh13:
	ldr	x24, [x24, _olpc_apsp_open@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh14:
	adrp	x25, _olpc_apsp_close@GOTPAGE
Lloh15:
	ldr	x25, [x25, _olpc_apsp_close@GOTPAGEOFF]
	ldr	x9, [x25]
	stp	x9, x8, [x0, #24]
	stp	x19, x20, [x0, #8]
	ldr	w0, [x0, #4]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [x21]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	str	x21, [x20, #24]
	mov	x0, x21
	bl	_serio_register_port
	ldr	w1, [x22]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.6:
	mov	x22, x0
Lloh20:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x0, #48]
	ldr	x10, [x23]
	ldr	x8, [x24]
	ldr	x9, [x25]
	stp	x8, x10, [x0, #32]
	stp	x20, x9, [x0, #16]
	str	x19, [x0, #8]
	ldr	w0, [x0, #4]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [x22]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	str	x22, [x20, #16]
	mov	x0, x22
	bl	_serio_register_port
	ldr	w0, [x20]
Lloh27:
	adrp	x8, _olpc_apsp_rx@GOTPAGE
Lloh28:
	ldr	x8, [x8, _olpc_apsp_rx@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x3, l_.str.5@PAGE
Lloh31:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	mov	x23, x0
	cbz	w0, LBB0_13
; %bb.7:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x22
	bl	_serio_unregister_port
	b	LBB0_12
LBB0_8:
Lloh34:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x23, x0
	b	LBB0_9
LBB0_11:
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_12:
	mov	x0, x21
	bl	_serio_unregister_port
	b	LBB0_9
LBB0_13:
	ldr	x0, [x20, #8]
	mov	w1, #1
	bl	_device_init_wakeup
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh40:
	adrp	x1, l_.str.7@PAGE
Lloh41:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map WTM registers\n"

	.comm	_SERIO_8042_XL,4,2              ; @SERIO_8042_XL
	.comm	_olpc_apsp_write,8,3            ; @olpc_apsp_write
	.comm	_olpc_apsp_open,8,3             ; @olpc_apsp_open
	.comm	_olpc_apsp_close,8,3            ; @olpc_apsp_close
l_.str.1:                               ; @.str.1
	.asciz	"sp keyboard"

l_.str.2:                               ; @.str.2
	.asciz	"sp/serio0"

	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
l_.str.3:                               ; @.str.3
	.asciz	"sp touchpad"

l_.str.4:                               ; @.str.4
	.asciz	"sp/serio1"

	.comm	_olpc_apsp_rx,4,2               ; @olpc_apsp_rx
l_.str.5:                               ; @.str.5
	.asciz	"olpc-apsp"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to request IRQ\n"

l_.str.7:                               ; @.str.7
	.asciz	"probed successfully.\n"

	.no_dead_strip	_olpc_apsp_probe
.subsections_via_symbols
