	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface3_button_probe
_surface3_button_probe:                 ## @surface3_button_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, %r15
	callq	_ACPI_COMPANION
	movl	%eax, %edi
	callq	_acpi_device_bid
	movl	%eax, %r14d
	movq	_SURFACE_BUTTON_OBJ_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strlen
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_1
LBB0_14:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_gpiod_count
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_i2c_set_clientdata
	movq	_BUTTON_TYPES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.6:
	xorl	%ebx, %ebx
	movq	_surface3_button_surface3@GOTPCREL(%rip), %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	movq	%r13, (%rax,%rbx,8)
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	_BUTTON_TYPES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	xorl	%edx, %edx
	testq	%rbx, %rbx
	sete	%dl
	movq	%r15, %rdi
	callq	_surface3_button_device_create
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	je	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_surface3_button_remove
	jmp	LBB0_16
LBB0_2:
	movl	%eax, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	jmp	LBB0_16
LBB0_12:
	movq	(%r14), %rax
	xorl	%r13d, %r13d
	cmpq	$0, (%rax)
	jne	LBB0_16
## %bb.13:
	cmpq	$0, 8(%rax)
	jne	LBB0_16
	jmp	LBB0_14
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_SURFACE_BUTTON_OBJ_NAME,4,2    ## @SURFACE_BUTTON_OBJ_NAME
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no GPIO attached, ignoring...\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BUTTON_TYPES,4,2               ## @BUTTON_TYPES
	.comm	_surface3_button_surface3,4,2   ## @surface3_button_surface3
	.no_dead_strip	_surface3_button_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface3_button_probe
_surface3_button_probe:                 ; @surface3_button_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
	bl	_ACPI_COMPANION
	bl	_acpi_device_bid
	mov	x20, x0
Lloh0:
	adrp	x8, _SURFACE_BUTTON_OBJ_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SURFACE_BUTTON_OBJ_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_strncmp
	cbz	x0, LBB0_4
LBB0_1:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	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_4:
	mov	x0, x19
	mov	x1, #0
	bl	_gpiod_count
	tbnz	w0, #31, LBB0_13
; %bb.5:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_17
; %bb.6:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_set_clientdata
Lloh8:
	adrp	x22, _BUTTON_TYPES@GOTPAGE
Lloh9:
	ldr	x22, [x22, _BUTTON_TYPES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.7:
	mov	x23, #0
Lloh10:
	adrp	x24, _surface3_button_surface3@GOTPAGE
Lloh11:
	ldr	x24, [x24, _surface3_button_surface3@GOTPAGEOFF]
Lloh12:
	adrp	x25, _ENODEV@GOTPAGE
Lloh13:
	ldr	x25, [x25, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20]
	str	x21, [x8, x23, lsl #3]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	cmp	x23, #0
	cset	w2, eq
	mov	x0, x19
	bl	_surface3_button_device_create
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x21
	bl	_PTR_ERR
	ldr	w8, [x25]
	cmn	w0, w8
	b.eq	LBB0_9
; %bb.12:
	mov	x21, x0
	mov	x0, x19
	bl	_surface3_button_remove
	b	LBB0_3
LBB0_13:
	mov	x21, x0
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_3
LBB0_14:
	ldr	x8, [x20]
	ldr	x9, [x8]
	cbnz	x9, LBB0_16
; %bb.15:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_1
LBB0_16:
	mov	w21, #0
	b	LBB0_3
LBB0_17:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SURFACE_BUTTON_OBJ_NAME,4,2    ; @SURFACE_BUTTON_OBJ_NAME
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no GPIO attached, ignoring...\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BUTTON_TYPES,4,2               ; @BUTTON_TYPES
	.comm	_surface3_button_surface3,4,2   ; @surface3_button_surface3
	.no_dead_strip	_surface3_button_probe
.subsections_via_symbols
