	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pisosr_gpio_probe
_pisosr_gpio_probe:                     ## @pisosr_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_spi_set_drvdata
	leaq	8(%rbx), %r15
	movq	_template_chip@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, 16(%rbx)
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_of_property_read_u16
	movq	%r14, 40(%rbx)
	movl	8(%rbx), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, (%rbx)
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_devm_kzalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get_optional
	movl	%eax, 28(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	28(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_8
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_gpiochip_add_data
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	%r15d, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_template_chip,16,3             ## @template_chip
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ngpios"

L_.str.1:                               ## @.str.1
	.asciz	"load"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.2:                               ## @.str.2
	.asciz	"Unable to allocate load GPIO\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to register gpiochip\n"

	.no_dead_strip	_pisosr_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pisosr_gpio_probe
_pisosr_gpio_probe:                     ; @pisosr_gpio_probe
	.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	x19, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_spi_set_drvdata
Lloh2:
	adrp	x8, _template_chip@GOTPAGE
Lloh3:
	ldr	x8, [x8, _template_chip@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	mov	x21, x20
	str	x8, [x21, #8]!
	str	x19, [x20, #16]
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_of_property_read_u16
	str	x19, [x20, #40]
	ldr	w0, [x21]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mov	x1, x0
	str	w0, [x20]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_devm_kzalloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_5
; %bb.2:
Lloh7:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	w0, [x20, #28]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x20, #28]
	bl	_PTR_ERR
	mov	x20, x0
Lloh12:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_10
; %bb.4:
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
	add	x0, x20, #24
	bl	_mutex_init
	mov	x0, x21
	mov	x1, x20
	bl	_gpiochip_add_data
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	w20, #0
	b	LBB0_10
LBB0_8:
	mov	x20, x0
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_err
LBB0_10:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_template_chip,16,3             ; @template_chip
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ngpios"

l_.str.1:                               ; @.str.1
	.asciz	"load"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.2:                               ; @.str.2
	.asciz	"Unable to allocate load GPIO\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to register gpiochip\n"

	.no_dead_strip	_pisosr_gpio_probe
.subsections_via_symbols
