	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpio_extcon_probe
_gpio_extcon_probe:                     ## @gpio_extcon_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, %r14
	leaq	4(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_EXTCON_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	_GPIOD_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_gpiod_get
	movl	%eax, 16(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	16(%r12), %edi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	callq	_gpiod_to_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_13
## %bb.6:
	movl	16(%r12), %edi
	callq	_gpiod_is_active_low
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %r13
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_devm_extcon_dev_allocate
	movl	%eax, 12(%r12)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	12(%r12), %esi
	movq	%r15, %rdi
	callq	_devm_extcon_dev_register
	testl	%eax, %eax
	js	LBB0_18
## %bb.15:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %r13
	addq	$8, %r13
	movq	_gpio_extcon_work@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_INIT_DELAYED_WORK
	movq	_gpio_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %r8d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, %r9
	callq	_devm_request_any_context_irq
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r13, %rdi
	callq	_gpio_extcon_work
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_18:
	movl	%eax, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EXTCON_NONE,8,3                ## @EXTCON_NONE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"extcon"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
	.comm	_IRQF_TRIGGER_FALLING,8,3       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_RISING,8,3        ## @IRQF_TRIGGER_RISING
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate extcon device\n"

	.comm	_gpio_irq_handler,4,2           ## @gpio_irq_handler
	.no_dead_strip	_gpio_extcon_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpio_extcon_probe
_gpio_extcon_probe:                     ; @gpio_extcon_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x21, x0, #4
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _EXTCON_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EXTCON_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x8, _GPIOD_IN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GPIOD_IN@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_devm_gpiod_get
	str	w0, [x20, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20, #16]
	cbz	x8, LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
	bl	_gpiod_to_irq
	mov	x22, x0
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.6:
	ldr	w0, [x20, #16]
	bl	_gpiod_is_active_low
Lloh13:
	adrp	x8, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh15:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	x23, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_devm_extcon_dev_allocate
	str	w0, [x20, #12]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.7:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
LBB0_8:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w1, [x20, #12]
	mov	x0, x21
	bl	_devm_extcon_dev_register
	tbnz	w0, #31, LBB0_14
; %bb.12:
	add	x24, x20, #8
Lloh21:
	adrp	x1, _gpio_extcon_work@GOTPAGE
Lloh22:
	ldr	x1, [x1, _gpio_extcon_work@GOTPAGEOFF]
	mov	x0, x24
	bl	_INIT_DELAYED_WORK
Lloh23:
	adrp	x8, _gpio_irq_handler@GOTPAGE
Lloh24:
	ldr	x8, [x8, _gpio_irq_handler@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	ldr	w4, [x19]
	mov	x0, x21
	mov	x1, x22
	mov	x3, x23
	mov	x5, x20
	bl	_devm_request_any_context_irq
	tbnz	w0, #31, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x24
	bl	_gpio_extcon_work
	mov	w22, #0
	b	LBB0_10
LBB0_14:
	mov	x22, x0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EXTCON_NONE,8,3                ; @EXTCON_NONE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"extcon"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
	.comm	_IRQF_TRIGGER_FALLING,8,3       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_TRIGGER_RISING,8,3        ; @IRQF_TRIGGER_RISING
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate extcon device\n"

	.comm	_gpio_irq_handler,4,2           ; @gpio_irq_handler
	.no_dead_strip	_gpio_extcon_probe
.subsections_via_symbols
