	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adp5520_gpio_probe
_adp5520_gpio_probe:                    ## @adp5520_gpio_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	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	_ID_ADP5520@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r12
	movl	(%r15), %eax
	movl	%eax, 44(%r12)
	movq	_ADP5520_MAXGPIOS@GOTPCREL(%rip), %r8
	movl	(%r8), %esi
	testl	%esi, %esi
	jle	LBB0_14
## %bb.9:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incl	%ecx
	cmpl	%esi, %ecx
	jge	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movl	$1, %edi
	shll	%cl, %edi
	btl	%ecx, %edx
	jae	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rdx
	movslq	%eax, %rsi
	incl	%eax
	movl	%edi, (%rdx,%rsi,4)
	movl	(%r8), %esi
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	testl	%eax, %eax
	jle	LBB0_14
## %bb.15:
	movq	_adp5520_gpio_direction_input@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r12)
	movq	_adp5520_gpio_direction_output@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%r12)
	movq	_adp5520_gpio_get_value@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r12)
	movq	_adp5520_gpio_set_value@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r12)
	movl	$1, 8(%r12)
	movl	8(%rbx), %ecx
	movl	%ecx, 24(%r12)
	movl	%eax, 12(%r12)
	movl	12(%r14), %eax
	movl	%eax, 20(%r12)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	movl	44(%r12), %edi
	movq	_ADP5520_GPIO_CFG_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	callq	_adp5520_clr_bits
	movl	%eax, %r13d
	movl	(%rbx), %ecx
	movq	_ADP5520_GPIO_C3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	movq	_ADP5520_C3_MODE@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	cmovel	%eax, %edx
	movq	_ADP5520_GPIO_R3@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	_ADP5520_R3_MODE@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmovel	%ecx, %eax
	orb	%dl, %al
	je	LBB0_17
## %bb.16:
	movl	44(%r12), %edi
	movq	_ADP5520_LED_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movzbl	%al, %edx
	callq	_adp5520_set_bits
	movl	%eax, %r13d
LBB0_17:
	movl	44(%r12), %edi
	movq	_ADP5520_GPIO_PULLUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	4(%rbx), %edx
	callq	_adp5520_set_bits
	movl	%eax, %ebx
	orl	%r13d, %ebx
	je	LBB0_19
## %bb.18:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_21
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_19:
	movq	%r12, %rsi
	addq	$8, %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_devm_gpiochip_add_data
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ID_ADP5520,8,3                 ## @ID_ADP5520
L_.str.1:                               ## @.str.1
	.asciz	"only ADP5520 supports GPIO\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ADP5520_MAXGPIOS,4,2           ## @ADP5520_MAXGPIOS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_adp5520_gpio_direction_input,4,2 ## @adp5520_gpio_direction_input
	.comm	_adp5520_gpio_direction_output,4,2 ## @adp5520_gpio_direction_output
	.comm	_adp5520_gpio_get_value,4,2     ## @adp5520_gpio_get_value
	.comm	_adp5520_gpio_set_value,4,2     ## @adp5520_gpio_set_value
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_ADP5520_GPIO_CFG_1,4,2         ## @ADP5520_GPIO_CFG_1
	.comm	_ADP5520_GPIO_C3,4,2            ## @ADP5520_GPIO_C3
	.comm	_ADP5520_C3_MODE,1,0            ## @ADP5520_C3_MODE
	.comm	_ADP5520_GPIO_R3,4,2            ## @ADP5520_GPIO_R3
	.comm	_ADP5520_R3_MODE,1,0            ## @ADP5520_R3_MODE
	.comm	_ADP5520_LED_CONTROL,4,2        ## @ADP5520_LED_CONTROL
	.comm	_ADP5520_GPIO_PULLUP,4,2        ## @ADP5520_GPIO_PULLUP
L_.str.2:                               ## @.str.2
	.asciz	"failed to write\n"

	.no_dead_strip	_adp5520_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adp5520_gpio_probe
_adp5520_gpio_probe:                    ; @adp5520_gpio_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	x20, x0, #8
	mov	x0, x20
	bl	_dev_get_platdata
	cbz	x0, LBB0_8
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _ID_ADP5520@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ID_ADP5520@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_19
; %bb.3:
	mov	x21, x0
	ldr	w8, [x20]
	str	w8, [x0, #44]
Lloh6:
	adrp	x9, _ADP5520_MAXGPIOS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADP5520_MAXGPIOS@GOTPAGEOFF]
	ldr	w11, [x9]
	cmp	w11, #1
	b.lt	LBB0_18
; %bb.4:
	mov	w8, #0
	mov	w10, #0
	mov	w12, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w10, w10, #1
	cmp	w10, w11
	b.ge	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x22]
	lsl	w13, w12, w10
	tst	w14, w13
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x11, [x21]
	str	w13, [x11, w8, sxtw #2]
	add	w8, w8, #1
	ldr	w11, [x9]
	b	LBB0_5
LBB0_8:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	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_13:
	cmp	w8, #0
	b.le	LBB0_18
; %bb.14:
	mov	w9, #1
	mov	x23, x21
	str	w9, [x23, #8]!
Lloh14:
	adrp	x9, _adp5520_gpio_direction_input@GOTPAGE
Lloh15:
	ldr	x9, [x9, _adp5520_gpio_direction_input@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _adp5520_gpio_direction_output@GOTPAGE
Lloh18:
	ldr	x10, [x10, _adp5520_gpio_direction_output@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	stp	w10, w9, [x23, #28]
Lloh20:
	adrp	x9, _adp5520_gpio_get_value@GOTPAGE
Lloh21:
	ldr	x9, [x9, _adp5520_gpio_get_value@GOTPAGEOFF]
Lloh22:
	adrp	x10, _adp5520_gpio_set_value@GOTPAGE
Lloh23:
	ldr	x10, [x10, _adp5520_gpio_set_value@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	ldr	w10, [x10]
	stp	w10, w9, [x23, #20]
	ldr	w9, [x22, #8]
	ldr	w10, [x19, #12]
	stp	w10, w9, [x23, #12]
Lloh26:
	adrp	x9, _THIS_MODULE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _THIS_MODULE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w8, w9, [x23, #4]
	ldr	w0, [x23, #36]
Lloh29:
	adrp	x8, _ADP5520_GPIO_CFG_1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ADP5520_GPIO_CFG_1@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	w2, [x22]
	bl	_adp5520_clr_bits
	ldr	w8, [x22]
Lloh32:
	adrp	x9, _ADP5520_GPIO_C3@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ADP5520_GPIO_C3@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
Lloh35:
	adrp	x10, _ADP5520_C3_MODE@GOTPAGE
Lloh36:
	ldr	x10, [x10, _ADP5520_C3_MODE@GOTPAGEOFF]
	ldrb	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh37:
	adrp	x10, _ADP5520_GPIO_R3@GOTPAGE
Lloh38:
	ldr	x10, [x10, _ADP5520_GPIO_R3@GOTPAGEOFF]
Lloh39:
	adrp	x11, _ADP5520_R3_MODE@GOTPAGE
Lloh40:
	ldr	x11, [x11, _ADP5520_R3_MODE@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	ldrb	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w8, w8, w9
	tst	w8, #0xff
	b.eq	LBB0_16
; %bb.15:
	ldr	w0, [x21, #44]
Lloh42:
	adrp	x9, _ADP5520_LED_CONTROL@GOTPAGE
Lloh43:
	ldr	x9, [x9, _ADP5520_LED_CONTROL@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x9]
	and	w2, w8, #0xff
	bl	_adp5520_set_bits
LBB0_16:
	mov	x24, x0
	ldr	w0, [x21, #44]
Lloh45:
	adrp	x8, _ADP5520_GPIO_PULLUP@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ADP5520_GPIO_PULLUP@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	ldrb	w2, [x22, #4]
	bl	_adp5520_set_bits
	orr	w22, w0, w24
	cbz	w22, LBB0_20
; %bb.17:
Lloh48:
	adrp	x1, l_.str.2@PAGE
Lloh49:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_18:
Lloh50:
	adrp	x8, _EINVAL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_19:
Lloh52:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh53:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_20:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_devm_gpiochip_add_data
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.21:
	mov	x0, x19
	mov	x1, x21
	bl	_platform_set_drvdata
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh41
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing platform data\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ID_ADP5520,8,3                 ; @ID_ADP5520
l_.str.1:                               ; @.str.1
	.asciz	"only ADP5520 supports GPIO\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ADP5520_MAXGPIOS,4,2           ; @ADP5520_MAXGPIOS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_adp5520_gpio_direction_input,4,2 ; @adp5520_gpio_direction_input
	.comm	_adp5520_gpio_direction_output,4,2 ; @adp5520_gpio_direction_output
	.comm	_adp5520_gpio_get_value,4,2     ; @adp5520_gpio_get_value
	.comm	_adp5520_gpio_set_value,4,2     ; @adp5520_gpio_set_value
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_ADP5520_GPIO_CFG_1,4,2         ; @ADP5520_GPIO_CFG_1
	.comm	_ADP5520_GPIO_C3,4,2            ; @ADP5520_GPIO_C3
	.comm	_ADP5520_C3_MODE,1,0            ; @ADP5520_C3_MODE
	.comm	_ADP5520_GPIO_R3,4,2            ; @ADP5520_GPIO_R3
	.comm	_ADP5520_R3_MODE,1,0            ; @ADP5520_R3_MODE
	.comm	_ADP5520_LED_CONTROL,4,2        ; @ADP5520_LED_CONTROL
	.comm	_ADP5520_GPIO_PULLUP,4,2        ; @ADP5520_GPIO_PULLUP
l_.str.2:                               ; @.str.2
	.asciz	"failed to write\n"

	.no_dead_strip	_adp5520_gpio_probe
.subsections_via_symbols
