	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbsm_gpio_setup
_sbsm_gpio_setup:                       ## @sbsm_gpio_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	leaq	4(%r12), %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_device_property_present
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	_SBSM_CMD_BATSYSSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sbsm_read_word
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movl	%eax, (%rbx)
	movq	_SBSM_CMD_BATSYSSTATECONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sbsm_read_word
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	leaq	16(%rbx), %rsi
	movl	%eax, 4(%rbx)
	movq	_sbsm_gpio_get_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_sbsm_gpio_direction_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, 16(%rbx)
	movq	_SBSM_MAX_BATS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	(%r12), %eax
	movl	%eax, 40(%rbx)
	movq	%r15, 32(%rbx)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_devm_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movl	%ebx, %r14d
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio-controller"

	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ## @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ## @SBSM_CMD_BATSYSSTATECONT
	.comm	_sbsm_gpio_get_value,4,2        ## @sbsm_gpio_get_value
	.comm	_sbsm_gpio_direction_input,4,2  ## @sbsm_gpio_direction_input
	.comm	_SBSM_MAX_BATS,4,2              ## @SBSM_MAX_BATS
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.1:                               ## @.str.1
	.asciz	"devm_gpiochip_add_data failed: %d\n"

	.no_dead_strip	_sbsm_gpio_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sbsm_gpio_setup
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sbsm_gpio_setup:                       ; @sbsm_gpio_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	x21, [x0, #8]
	add	x19, x21, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_property_present
	cbz	w0, LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, _SBSM_CMD_BATSYSSTATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_sbsm_read_word
	mov	x22, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
	str	w22, [x20]
Lloh5:
	adrp	x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_sbsm_read_word
	mov	x22, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:
	add	x1, x20, #16
	str	w22, [x20, #4]
Lloh8:
	adrp	x8, _sbsm_gpio_get_value@GOTPAGE
Lloh9:
	ldr	x8, [x8, _sbsm_gpio_get_value@GOTPAGEOFF]
Lloh10:
	adrp	x9, _sbsm_gpio_direction_input@GOTPAGE
Lloh11:
	ldr	x9, [x9, _sbsm_gpio_direction_input@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #48]
Lloh14:
	adrp	x8, lCPI0_0@PAGE
Lloh15:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #16]
Lloh16:
	adrp	x8, _SBSM_MAX_BATS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SBSM_MAX_BATS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x21]
	stp	w9, w8, [x20, #40]
	str	x19, [x20, #32]
Lloh19:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	mov	x0, x19
	mov	x2, x20
	bl	_devm_gpiochip_add_data
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.4:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdrp	Lloh14, Lloh16
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio-controller"

	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ; @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ; @SBSM_CMD_BATSYSSTATECONT
	.comm	_sbsm_gpio_get_value,4,2        ; @sbsm_gpio_get_value
	.comm	_sbsm_gpio_direction_input,4,2  ; @sbsm_gpio_direction_input
	.comm	_SBSM_MAX_BATS,4,2              ; @SBSM_MAX_BATS
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.1:                               ; @.str.1
	.asciz	"devm_gpiochip_add_data failed: %d\n"

	.no_dead_strip	_sbsm_gpio_setup
.subsections_via_symbols
