	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen_74x164_probe
_gen_74x164_probe:                      ## @gen_74x164_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$8, (%rdi)
	callq	_spi_setup
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	leaq	4(%r12), %r15
	leaq	L_.str(%rip), %rsi
	leaq	-36(%rbp), %rdx
	movq	%r15, %rdi
	callq	_device_property_read_u32
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_5:
	movl	-36(%rbp), %esi
	addl	$64, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %r14
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_gpiod_get_optional
	movl	%eax, 56(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	56(%r14), %edi
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	callq	_PTR_ERR
LBB0_3:
	movl	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_9:
	movl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_spi_set_drvdata
	movl	8(%r12), %eax
	movl	%eax, 48(%r14)
	movq	_gen_74x164_direction_output@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_gen_74x164_get_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movq	_gen_74x164_set_value@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_gen_74x164_set_multiple@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movl	$-1, 8(%r14)
	movl	-36(%rbp), %eax
	movl	%eax, (%r14)
	movq	_GEN_74X164_NUMBER_GPIOS@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, 12(%r14)
	movl	$1, 16(%r14)
	movq	%r15, 24(%r14)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	___gen_74x164_write_config
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	addq	$8, %rdi
	movq	%r14, %rsi
	callq	_gpiochip_add_data
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_13
LBB0_12:
	movq	%r12, %rdi
	callq	_mutex_destroy
	jmp	LBB0_4
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"registers-number"

L_.str.1:                               ## @.str.1
	.asciz	"Missing 'registers-number' property.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"enable"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
	.comm	_gen_74x164_direction_output,4,2 ## @gen_74x164_direction_output
	.comm	_gen_74x164_get_value,4,2       ## @gen_74x164_get_value
	.comm	_gen_74x164_set_value,4,2       ## @gen_74x164_set_value
	.comm	_gen_74x164_set_multiple,4,2    ## @gen_74x164_set_multiple
	.comm	_GEN_74X164_NUMBER_GPIOS,4,2    ## @GEN_74X164_NUMBER_GPIOS
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.3:                               ## @.str.3
	.asciz	"Failed writing: %d\n"

	.no_dead_strip	_gen_74x164_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen_74x164_probe
_gen_74x164_probe:                      ; @gen_74x164_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	mov	w8, #8
	str	w8, [x0]
	bl	_spi_setup
	tbnz	w0, #31, LBB0_7
; %bb.1:
	add	x19, x21, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x19
	bl	_device_property_read_u32
	cbz	w0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_8
LBB0_4:
	ldr	w8, [sp, #12]
	add	w1, w8, #64
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x20, x0
Lloh9:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	w0, [x20, #56]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x20, #56]
	cbz	x8, LBB0_10
; %bb.6:
	bl	_PTR_ERR
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_10:
	mov	w22, #1
	mov	w1, #1
	bl	_gpiod_set_value_cansleep
	mov	x0, x21
	mov	x1, x20
	bl	_spi_set_drvdata
	ldr	w8, [x21, #8]
	mov	w9, #-1
	mov	x21, x20
	str	w9, [x21, #8]!
	str	w8, [x20, #48]
Lloh16:
	adrp	x8, _gen_74x164_direction_output@GOTPAGE
Lloh17:
	ldr	x8, [x8, _gen_74x164_direction_output@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _gen_74x164_get_value@GOTPAGE
Lloh20:
	ldr	x9, [x9, _gen_74x164_get_value@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh22:
	adrp	x8, _gen_74x164_set_value@GOTPAGE
Lloh23:
	ldr	x8, [x8, _gen_74x164_set_value@GOTPAGEOFF]
Lloh24:
	adrp	x9, _gen_74x164_set_multiple@GOTPAGE
Lloh25:
	ldr	x9, [x9, _gen_74x164_set_multiple@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #32]
	ldr	w8, [sp, #12]
	str	w8, [x20]
Lloh28:
	adrp	x9, _GEN_74X164_NUMBER_GPIOS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _GEN_74X164_NUMBER_GPIOS@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	mul	w8, w9, w8
	stp	w8, w22, [x20, #12]
	str	x19, [x20, #24]
Lloh31:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	str	w8, [x20, #20]
	add	x23, x20, #4
	mov	x0, x23
	bl	_mutex_init
	mov	x0, x20
	bl	___gen_74x164_write_config
	cbz	w0, LBB0_12
; %bb.11:
	mov	x22, x0
	str	x22, [sp]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_13
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	bl	_gpiochip_add_data
	mov	x22, x0
	cbz	w0, LBB0_8
LBB0_13:
	mov	x0, x23
	bl	_mutex_destroy
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"registers-number"

l_.str.1:                               ; @.str.1
	.asciz	"Missing 'registers-number' property.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"enable"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
	.comm	_gen_74x164_direction_output,4,2 ; @gen_74x164_direction_output
	.comm	_gen_74x164_get_value,4,2       ; @gen_74x164_get_value
	.comm	_gen_74x164_set_value,4,2       ; @gen_74x164_set_value
	.comm	_gen_74x164_set_multiple,4,2    ; @gen_74x164_set_multiple
	.comm	_GEN_74X164_NUMBER_GPIOS,4,2    ; @GEN_74X164_NUMBER_GPIOS
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.3:                               ; @.str.3
	.asciz	"Failed writing: %d\n"

	.no_dead_strip	_gen_74x164_probe
.subsections_via_symbols
