	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function soc_button_probe
_soc_button_probe:                      ## @soc_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, %r13
	callq	_acpi_device_get_match_data
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r13, %rdi
	callq	*%rax
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_24
LBB0_3:
	movq	8(%r14), %r15
	testq	%r15, %r15
	jne	LBB0_6
LBB0_4:
	movq	%r13, %rdi
	callq	_soc_button_get_button_info
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_gpiod_count
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:
	movq	%r13, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	_BUTTON_TYPES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.9:
	xorl	%r12d, %r12d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rbx, (%rax,%r12,8)
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r12
	movq	_BUTTON_TYPES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	testq	%r12, %r12
	sete	%dl
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_soc_button_device_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_11
## %bb.14:
	movq	%r13, %rdi
	callq	_soc_button_remove
	jmp	LBB0_24
LBB0_15:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_dbg
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_16:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_18
## %bb.17:
	cmpq	$0, 8(%rax)
	je	LBB0_25
LBB0_18:
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r14)
	jne	LBB0_24
LBB0_20:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_devm_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_22:
	xorl	%ebx, %ebx
LBB0_23:
	subl	(%rax), %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no GPIO attached, ignoring...\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BUTTON_TYPES,4,2               ## @BUTTON_TYPES
	.no_dead_strip	_soc_button_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function soc_button_probe
_soc_button_probe:                      ; @soc_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_device_get_match_data
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	blr	x8
	mov	x23, x0
	cbnz	w0, LBB0_25
LBB0_3:
	ldr	x21, [x20, #8]
	cbnz	x21, LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_soc_button_get_button_info
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	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
	b	_PTR_ERR
LBB0_6:
	mov	x0, x19
	mov	x1, #0
	bl	_gpiod_count
	tbnz	w0, #31, LBB0_15
; %bb.7:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_23
; %bb.8:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_platform_set_drvdata
Lloh3:
	adrp	x24, _BUTTON_TYPES@GOTPAGE
Lloh4:
	ldr	x24, [x24, _BUTTON_TYPES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.9:
	mov	x25, #0
Lloh5:
	adrp	x26, _ENODEV@GOTPAGE
Lloh6:
	ldr	x26, [x26, _ENODEV@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x22]
	str	x23, [x8, x25, lsl #3]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x24]
	cmp	x25, x8
	b.ge	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	cmp	x25, #0
	cset	w2, eq
	mov	x0, x19
	mov	x1, x21
	bl	_soc_button_device_create
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x23
	bl	_PTR_ERR
	ldr	w8, [x26]
	cmn	w0, w8
	b.eq	LBB0_11
; %bb.14:
	mov	x23, x0
	mov	x0, x19
	bl	_soc_button_remove
	b	LBB0_25
LBB0_15:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
LBB0_16:
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_24
LBB0_17:
	ldr	x8, [x22]
	ldr	x9, [x8]
	cbnz	x9, LBB0_19
; %bb.18:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_16
LBB0_19:
	cbz	x20, LBB0_21
; %bb.20:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_22
LBB0_21:
	mov	x0, x19
	mov	x1, x21
	bl	_devm_kfree
LBB0_22:
	mov	w23, #0
	b	LBB0_25
LBB0_23:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_25:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no GPIO attached, ignoring...\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BUTTON_TYPES,4,2               ; @BUTTON_TYPES
	.no_dead_strip	_soc_button_probe
.subsections_via_symbols
