	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpio_charger_probe
_gpio_charger_probe:                    ## @gpio_charger_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	16(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	testq	%r13, %r13
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_9
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r12
	movq	_GPIOD_IN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_gpiod_get
	movq	%rax, 24(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	cmpq	$0, (%r14)
	je	LBB0_10
LBB0_5:
	movq	24(%r12), %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	movq	24(%r12), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_32
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%r12), %rdi
	jmp	LBB0_19
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_32
LBB0_9:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_32
LBB0_10:
	movl	24(%r13), %edi
	callq	_gpio_is_valid
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movq	_GPIOF_IN@GOTPCREL(%rip), %rax
	movq	32(%r13), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.12:
	movq	_GPIOF_ACTIVE_LOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
LBB0_13:
	orq	(%rax), %rbx
	movl	24(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_dev_name
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_devm_gpio_request_one
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_29
LBB0_15:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_32
LBB0_16:
	movl	24(%r13), %edi
	callq	_gpio_to_desc
	movq	%rax, 24(%r12)
	movq	_GPIOD_IN@GOTPCREL(%rip), %rbx
LBB0_17:
	movl	(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	8(%r12), %rdi
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_20:
	movq	%r12, %rbx
	addq	$40, %rbx
	movq	_gpio_charger_properties@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 64(%r12)
	callq	_ARRAY_SIZE
	movl	%eax, 40(%r12)
	cmpq	$0, 8(%r12)
	jne	LBB0_22
## %bb.21:
	decl	%eax
	movl	%eax, (%rbx)
LBB0_22:
	movq	_gpio_charger_get_property@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r12)
	movq	(%r14), %rax
	movq	%rax, -64(%rbp)
	movq	%r12, -72(%rbp)
	testq	%r13, %r13
	je	LBB0_24
## %bb.23:
	movq	16(%r13), %rcx
	movq	%rcx, 48(%r12)
	movl	4(%r13), %edx
	movl	8(%r13), %eax
	movl	%edx, -76(%rbp)
	movl	(%r13), %edx
	movl	%edx, -80(%rbp)
	jmp	LBB0_25
LBB0_24:
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	%r14, %rdi
	callq	_gpio_charger_get_type
	movq	48(%r12), %rcx
LBB0_25:
	movl	%eax, 56(%r12)
	testq	%rcx, %rcx
	jne	LBB0_27
## %bb.26:
	movq	(%r15), %rax
	movq	%rax, 48(%r12)
LBB0_27:
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_power_supply_register
	movq	%rax, 16(%r12)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	16(%r12), %rsi
	testq	%rax, %rax
	je	LBB0_31
## %bb.28:
	movq	%rsi, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
LBB0_29:
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_32
LBB0_31:
	movq	24(%r12), %rdx
	movq	%r14, %rdi
	callq	_gpio_charger_get_irq
	movq	%rax, 32(%r12)
	movq	8(%r12), %rdx
	movq	16(%r12), %rsi
	movq	%r14, %rdi
	callq	_gpio_charger_get_irq
	movl	%eax, (%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%ebx, %ebx
LBB0_32:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No platform data\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.1:                               ## @.str.1
	.asciz	"Invalid gpio pin in pdata\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPIOF_IN,8,3                   ## @GPIOF_IN
	.comm	_GPIOF_ACTIVE_LOW,8,3           ## @GPIOF_ACTIVE_LOW
L_.str.2:                               ## @.str.2
	.asciz	"Failed to request gpio pin: %d\n"

	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.3:                               ## @.str.3
	.asciz	"error getting GPIO descriptor\n"

L_.str.4:                               ## @.str.4
	.asciz	"charge-status"

	.comm	_gpio_charger_properties,4,2    ## @gpio_charger_properties
	.comm	_gpio_charger_get_property,4,2  ## @gpio_charger_get_property
L_.str.5:                               ## @.str.5
	.asciz	"Failed to register power supply: %d\n"

	.no_dead_strip	_gpio_charger_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpio_charger_probe
_gpio_charger_probe:                    ; @gpio_charger_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x0
	ldr	x24, [x0, #16]
	add	x19, x0, #8
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	cbnz	x24, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
LBB0_2:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
Lloh3:
	adrp	x25, _GPIOD_IN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _GPIOD_IN@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, #0
	bl	_devm_gpiod_get
	str	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
LBB0_5:
	ldr	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.6:
	ldr	x0, [x20, #24]
	bl	_PTR_ERR
	mov	x22, x0
Lloh5:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_15
; %bb.7:
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #24]
	b	LBB0_19
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ENOENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	ldr	w0, [x24, #24]
	bl	_gpio_is_valid
	cbz	w0, LBB0_13
; %bb.11:
Lloh16:
	adrp	x8, _GPIOF_IN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GPIOF_IN@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _GPIOF_ACTIVE_LOW@GOTPAGE
Lloh20:
	ldr	x9, [x9, _GPIOF_ACTIVE_LOW@GOTPAGEOFF]
	ldr	x10, [x24, #32]
Lloh21:
	ldr	x9, [x9]
	cmp	x10, #0
	csel	x9, xzr, x9, eq
	orr	x22, x9, x8
	ldr	w23, [x24, #24]
	mov	x0, x19
	bl	_dev_name
	mov	x3, x0
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_devm_gpio_request_one
	cbz	w0, LBB0_16
; %bb.12:
	mov	x22, x0
	str	x22, [sp]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_15
LBB0_13:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh26:
	adrp	x8, _EINVAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
	ldr	w0, [x24, #24]
	bl	_gpio_to_desc
	str	x0, [x20, #24]
LBB0_17:
	ldr	w2, [x25]
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.18:
	ldr	x0, [x20, #8]
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_PTR_ERR
LBB0_20:
Lloh30:
	adrp	x8, _gpio_charger_properties@GOTPAGE
Lloh31:
	ldr	x8, [x8, _gpio_charger_properties@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	str	w0, [x20, #64]
	bl	_ARRAY_SIZE
	mov	x22, x20
	str	w0, [x22, #40]!
	ldur	x8, [x22, #-32]
	cbnz	x8, LBB0_22
; %bb.21:
	sub	w8, w0, #1
	str	w8, [x22]
LBB0_22:
Lloh33:
	adrp	x8, _gpio_charger_get_property@GOTPAGE
Lloh34:
	ldr	x8, [x8, _gpio_charger_get_property@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	str	w8, [x20, #60]
	ldr	x8, [x19]
	stp	x20, x8, [sp, #16]
	cbz	x24, LBB0_27
; %bb.23:
	ldr	x8, [x24, #16]
	str	x8, [x20, #48]
	ldr	w0, [x24, #8]
	ldr	d0, [x24]
	str	d0, [sp, #8]
	str	w0, [x20, #56]
	cbnz	x8, LBB0_25
LBB0_24:
	ldr	x8, [x21]
	str	x8, [x20, #48]
LBB0_25:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_devm_power_supply_register
	str	x0, [x20, #16]
	bl	_IS_ERR
	ldr	x1, [x20, #16]
	cbz	x0, LBB0_28
; %bb.26:
	mov	x0, x1
	bl	_PTR_ERR
	mov	x22, x0
	str	x22, [sp]
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_15
LBB0_27:
	ldr	x8, [x8]
	str	x8, [x20, #48]
	mov	x0, x19
	bl	_gpio_charger_get_type
	ldr	x8, [x20, #48]
	str	w0, [x20, #56]
	cbnz	x8, LBB0_25
	b	LBB0_24
LBB0_28:
	ldr	x2, [x20, #24]
	mov	x0, x19
	bl	_gpio_charger_get_irq
	str	x0, [x20, #32]
	ldp	x2, x1, [x20, #8]
	mov	x0, x19
	bl	_gpio_charger_get_irq
	str	w0, [x20]
	mov	x0, x21
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	mov	w22, #0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No platform data\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.1:                               ; @.str.1
	.asciz	"Invalid gpio pin in pdata\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPIOF_IN,8,3                   ; @GPIOF_IN
	.comm	_GPIOF_ACTIVE_LOW,8,3           ; @GPIOF_ACTIVE_LOW
l_.str.2:                               ; @.str.2
	.asciz	"Failed to request gpio pin: %d\n"

	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.3:                               ; @.str.3
	.asciz	"error getting GPIO descriptor\n"

l_.str.4:                               ; @.str.4
	.asciz	"charge-status"

	.comm	_gpio_charger_properties,4,2    ; @gpio_charger_properties
	.comm	_gpio_charger_get_property,4,2  ; @gpio_charger_get_property
l_.str.5:                               ; @.str.5
	.asciz	"Failed to register power supply: %d\n"

	.no_dead_strip	_gpio_charger_probe
.subsections_via_symbols
