	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp23s08_probe_one
_mcp23s08_probe_one:                    ## @mcp23s08_probe_one
	.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
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_spi_get_drvdata
	movq	(%rax), %rax
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rbx
	leaq	80(%rbx), %rdi
	callq	_mutex_init
	movq	%r15, 72(%rbx)
	leal	(%r14,%r14), %eax
	orl	$64, %eax
	movl	%eax, (%rbx)
	leaq	L_.str(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_mcp23s08_direction_input@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	_mcp23s08_get@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%rbx)
	movq	_mcp23s08_direction_output@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_mcp23s08_set@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_mcp23s08_dbg_show@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movl	%r13d, 24(%rbx)
	movabsq	$4294967304, %rax               ## imm = 0x100000008
	movq	%rax, 28(%rbx)
	movq	%r15, 40(%rbx)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_MCP_IOCON@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mcp23s08_read
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_13
## %bb.1:
	movq	_IOCON_SEQOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IOCON_HAEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%r13d, %eax
	jne	LBB0_3
## %bb.2:
	movl	%edx, %ecx
	andl	%r13d, %ecx
	jne	LBB0_4
LBB0_3:
	notl	%eax
	andl	%eax, %r13d
	orl	%r13d, %edx
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mcp23s08_write
	testl	%eax, %eax
	js	LBB0_12
LBB0_4:
	movq	_MCP_GPPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_mcp23s08_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	8(%rbx), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %ecx
	callq	_mcp23s08_read_regs
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movq	8(%rbx), %rax
	movq	_MCP_IPOL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_7
## %bb.9:
	movq	$0, (%rax,%rdx,8)
	movq	_MCP_GPINTEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rax,%rdx,8)
	jne	LBB0_10
	jmp	LBB0_11
LBB0_7:
	movq	_MCP_GPINTEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_8
LBB0_10:
	leaq	(%rax,%rdx,8), %rdx
	movq	$0, (%rdx)
LBB0_11:
	movl	(%rbx), %edx
	movl	%edx, -64(%rbp)
	movq	(%rcx), %rcx
	movl	%ecx, -60(%rbp)
	leaq	-56(%rbp), %rdi
	leaq	(%rax,%rcx,8), %rsi
	movl	$14, %edx
	callq	_memcpy
	movq	72(%rbx), %rdi
	leaq	-64(%rbp), %rsi
	movl	$16, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_spi_write_then_read
	testl	%eax, %eax
	js	LBB0_12
LBB0_8:
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_gpiochip_add
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_14
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %r13d
LBB0_13:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_dev_dbg
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mcp23s08"

	.comm	_mcp23s08_direction_input,4,2   ## @mcp23s08_direction_input
	.comm	_mcp23s08_get,4,2               ## @mcp23s08_get
	.comm	_mcp23s08_direction_output,4,2  ## @mcp23s08_direction_output
	.comm	_mcp23s08_set,4,2               ## @mcp23s08_set
	.comm	_mcp23s08_dbg_show,4,2          ## @mcp23s08_dbg_show
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_MCP_IOCON,4,2                  ## @MCP_IOCON
	.comm	_IOCON_SEQOP,4,2                ## @IOCON_SEQOP
	.comm	_IOCON_HAEN,4,2                 ## @IOCON_HAEN
	.comm	_MCP_GPPU,4,2                   ## @MCP_GPPU
	.comm	_MCP_IPOL,8,3                   ## @MCP_IPOL
	.comm	_MCP_GPINTEN,8,3                ## @MCP_GPINTEN
L_.str.1:                               ## @.str.1
	.asciz	"can't setup chip %d, --> %d\n"

	.no_dead_strip	_mcp23s08_probe_one
.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 mcp23s08_probe_one
lCPI0_0:
	.long	8                               ; 0x8
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mcp23s08_probe_one:                    ; @mcp23s08_probe_one
	.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	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_spi_get_drvdata
	ldr	x8, [x0]
	ldr	x22, [x8, w19, uxtw #3]
	add	x0, x22, #80
	bl	_mutex_init
	str	x20, [x22, #72]
	lsl	w8, w19, #1
	orr	w8, w8, #0x40
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
	str	w8, [x22]
	mov	x21, x22
	str	x9, [x21, #16]!
Lloh5:
	adrp	x8, _mcp23s08_direction_input@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mcp23s08_direction_input@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x22, #64]
Lloh8:
	adrp	x8, _mcp23s08_get@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mcp23s08_get@GOTPAGEOFF]
Lloh10:
	adrp	x9, _mcp23s08_direction_output@GOTPAGE
Lloh11:
	ldr	x9, [x9, _mcp23s08_direction_output@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #56]
Lloh14:
	adrp	x8, _mcp23s08_set@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mcp23s08_set@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _mcp23s08_dbg_show@GOTPAGE
Lloh18:
	ldr	x9, [x9, _mcp23s08_dbg_show@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #48]
	str	w24, [x22, #24]
Lloh20:
	adrp	x8, lCPI0_0@PAGE
Lloh21:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x22, #28]
Lloh22:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
	str	x20, [x22, #40]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x22, #36]
Lloh25:
	adrp	x25, _MCP_IOCON@GOTPAGE
Lloh26:
	ldr	x25, [x25, _MCP_IOCON@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_mcp23s08_read
	mov	x24, x0
	tbnz	w0, #31, LBB0_13
; %bb.1:
Lloh27:
	adrp	x8, _IOCON_SEQOP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IOCON_SEQOP@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _IOCON_HAEN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IOCON_HAEN@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w8, w24
	b.ne	LBB0_3
; %bb.2:
	and	w10, w9, w24
	cbnz	w10, LBB0_4
LBB0_3:
	bic	w8, w24, w8
	orr	w2, w9, w8
	ldr	w1, [x25]
	mov	x0, x22
	bl	_mcp23s08_write
	tbnz	w0, #31, LBB0_12
LBB0_4:
Lloh33:
	adrp	x8, _MCP_GPPU@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MCP_GPPU@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x23
	bl	_mcp23s08_write
	tbnz	w0, #31, LBB0_12
; %bb.5:
	ldr	x2, [x22, #8]
	mov	x0, x22
	mov	w1, #0
	mov	w3, #8
	bl	_mcp23s08_read_regs
	tbnz	w0, #31, LBB0_12
; %bb.6:
	ldr	x8, [x22, #8]
Lloh36:
	adrp	x9, _MCP_IPOL@GOTPAGE
Lloh37:
	ldr	x9, [x9, _MCP_IPOL@GOTPAGEOFF]
	ldr	x10, [x9]
	ldr	x11, [x8, x10, lsl #3]
	cbz	x11, LBB0_8
; %bb.7:
	str	xzr, [x8, x10, lsl #3]
Lloh38:
	adrp	x10, _MCP_GPINTEN@GOTPAGE
Lloh39:
	ldr	x10, [x10, _MCP_GPINTEN@GOTPAGEOFF]
Lloh40:
	ldr	x10, [x10]
	add	x10, x8, x10, lsl #3
	ldr	x11, [x10]
	cbnz	x11, LBB0_9
	b	LBB0_10
LBB0_8:
Lloh41:
	adrp	x10, _MCP_GPINTEN@GOTPAGE
Lloh42:
	ldr	x10, [x10, _MCP_GPINTEN@GOTPAGEOFF]
Lloh43:
	ldr	x10, [x10]
	add	x10, x8, x10, lsl #3
	ldr	x11, [x10]
	cbz	x11, LBB0_11
LBB0_9:
	str	xzr, [x10]
LBB0_10:
	ldr	w10, [x22]
	ldr	x9, [x9]
	stp	w10, w9, [sp, #8]
	add	x10, sp, #8
	add	x0, x10, #8
	add	x1, x8, x9, lsl #3
	mov	w2, #14
	bl	_memcpy
	ldr	x0, [x22, #72]
	add	x1, sp, #8
	mov	w2, #16
	mov	x3, #0
	mov	w4, #0
	bl	_spi_write_then_read
	tbnz	w0, #31, LBB0_12
LBB0_11:
	mov	x0, x21
	bl	_gpiochip_add
	mov	x24, x0
	tbz	w0, #31, LBB0_14
	b	LBB0_13
LBB0_12:
	mov	x24, x0
LBB0_13:
Lloh44:
	adrp	x1, l_.str.1@PAGE
Lloh45:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x24
	bl	_dev_dbg
LBB0_14:
	ldr	x8, [sp, #24]
Lloh46:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh47:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x24
	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:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdrp	Lloh20, Lloh22
	.loh AdrpLdr	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mcp23s08"

	.comm	_mcp23s08_direction_input,4,2   ; @mcp23s08_direction_input
	.comm	_mcp23s08_get,4,2               ; @mcp23s08_get
	.comm	_mcp23s08_direction_output,4,2  ; @mcp23s08_direction_output
	.comm	_mcp23s08_set,4,2               ; @mcp23s08_set
	.comm	_mcp23s08_dbg_show,4,2          ; @mcp23s08_dbg_show
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_MCP_IOCON,4,2                  ; @MCP_IOCON
	.comm	_IOCON_SEQOP,4,2                ; @IOCON_SEQOP
	.comm	_IOCON_HAEN,4,2                 ; @IOCON_HAEN
	.comm	_MCP_GPPU,4,2                   ; @MCP_GPPU
	.comm	_MCP_IPOL,8,3                   ; @MCP_IPOL
	.comm	_MCP_GPINTEN,8,3                ; @MCP_GPINTEN
l_.str.1:                               ; @.str.1
	.asciz	"can't setup chip %d, --> %d\n"

	.no_dead_strip	_mcp23s08_probe_one
.subsections_via_symbols
