	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface3_spi_probe
_surface3_spi_probe:                    ## @surface3_spi_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$8, (%rdi)
	movq	_SPI_MODE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rdi)
	callq	_spi_setup
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	8(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, (%rax)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_spi_set_drvdata
	movq	%r15, %rdi
	callq	_surface3_spi_get_gpio_config
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_surface3_spi_power
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_surface3_spi_power
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_surface3_spi_power
	movq	%r15, %rdi
	callq	_surface3_spi_create_touch_input
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_surface3_spi_create_pen_input
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	4(%rbx), %esi
	movq	_surface3_spi_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, (%rsp)
	leaq	L_.str(%rip), %r9
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	jmp	LBB0_7
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_MODE_0,4,2                 ## @SPI_MODE_0
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_surface3_spi_irq_handler,4,2   ## @surface3_spi_irq_handler
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Surface3-irq"

	.no_dead_strip	_surface3_spi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface3_spi_probe
_surface3_spi_probe:                    ; @surface3_spi_probe
	.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
	mov	w8, #8
	str	w8, [x0]
Lloh0:
	adrp	x8, _SPI_MODE_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_MODE_0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #12]
	bl	_spi_setup
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
	add	x20, x19, #8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	str	x19, [x0]
	mov	x0, x19
	mov	x1, x21
	bl	_spi_set_drvdata
	mov	x0, x21
	bl	_surface3_spi_get_gpio_config
	cbnz	w0, LBB0_1
; %bb.4:
	mov	x0, x21
	mov	w1, #1
	bl	_surface3_spi_power
	mov	x0, x21
	mov	w1, #0
	bl	_surface3_spi_power
	mov	x0, x21
	mov	w1, #1
	bl	_surface3_spi_power
	mov	x0, x21
	bl	_surface3_spi_create_touch_input
	cbnz	w0, LBB0_1
; %bb.5:
	mov	x0, x21
	bl	_surface3_spi_create_pen_input
	cbnz	w0, LBB0_1
; %bb.6:
	ldr	w1, [x19, #4]
Lloh6:
	adrp	x8, _surface3_spi_irq_handler@GOTPAGE
Lloh7:
	ldr	x8, [x8, _surface3_spi_irq_handler@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x5, l_.str@PAGE
Lloh13:
	add	x5, x5, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, #0
	mov	x6, 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
	b	_devm_request_threaded_irq
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_MODE_0,4,2                 ; @SPI_MODE_0
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_surface3_spi_irq_handler,4,2   ; @surface3_spi_irq_handler
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Surface3-irq"

	.no_dead_strip	_surface3_spi_probe
.subsections_via_symbols
