	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdv_gpio_probe
_sdv_gpio_probe:                        ## @sdv_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_pcim_enable_device
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_5:
	movq	_GPIO_BAR@GOTPCREL(%rip), %r12
	movb	(%r12), %cl
	movl	$1, %esi
	shll	%cl, %esi
	movq	_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_pcim_iomap_regions
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_7:
	movq	%r15, %rdi
	callq	_pcim_iomap_table
	movslq	(%r12), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, 8(%r14)
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-36(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	-36(%rbp), %edi
	movq	_GPMUXCTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	callq	_writel
LBB0_9:
	movq	8(%r14), %rax
	movq	_GPINR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%rax, %rcx
	movq	_GPOUTR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r8
	addq	%rax, %r8
	movq	_GPOER@GOTPCREL(%rip), %rdx
	addq	(%rdx), %rax
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_bgpio_init
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_14:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_SDV_NUM_PUB_GPIOS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r14, %rdx
	callq	_devm_gpiochip_add_data
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sdv_register_irqsupport
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pci_set_drvdata
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_11:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't enable device.\n"

	.comm	_GPIO_BAR,4,2                   ## @GPIO_BAR
	.comm	_DRV_NAME,4,2                   ## @DRV_NAME
L_.str.1:                               ## @.str.1
	.asciz	"can't alloc PCI BAR #%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"intel,muxctl"

	.comm	_GPMUXCTL,8,3                   ## @GPMUXCTL
	.comm	_GPINR,8,3                      ## @GPINR
	.comm	_GPOUTR,8,3                     ## @GPOUTR
	.comm	_GPOER,8,3                      ## @GPOER
	.comm	_SDV_NUM_PUB_GPIOS,4,2          ## @SDV_NUM_PUB_GPIOS
L_.str.3:                               ## @.str.3
	.asciz	"gpiochip_add() failed.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Sodaville GPIO driver registered.\n"

	.no_dead_strip	_sdv_gpio_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdv_gpio_probe
_sdv_gpio_probe:                        ; @sdv_gpio_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_pcim_enable_device
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x22, _GPIO_BAR@GOTPAGE
Lloh9:
	ldr	x22, [x22, _GPIO_BAR@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w9, #1
	lsl	w1, w9, w8
Lloh10:
	adrp	x8, _DRV_NAME@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRV_NAME@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pcim_iomap_regions
	cbz	w0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldr	w8, [x22]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_8:
	mov	x0, x19
	bl	_pcim_iomap_table
	ldrsw	x8, [x22]
	ldr	x8, [x0, x8, lsl #3]
	str	x8, [x20, #8]
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbnz	w0, LBB0_10
; %bb.9:
	ldr	w0, [sp, #12]
	ldr	x8, [x20, #8]
Lloh17:
	adrp	x9, _GPMUXCTL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _GPMUXCTL@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_10:
	ldr	x8, [x20, #8]
Lloh20:
	adrp	x9, _GPINR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _GPINR@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x3, x9, x8
Lloh23:
	adrp	x9, _GPOUTR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _GPOUTR@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x4, x9, x8
Lloh26:
	adrp	x9, _GPOER@GOTPAGE
Lloh27:
	ldr	x9, [x9, _GPOER@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x6, x9, x8
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #4
	mov	x5, #0
	mov	x7, #0
	bl	_bgpio_init
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.11:
Lloh29:
	adrp	x8, _SDV_NUM_PUB_GPIOS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SDV_NUM_PUB_GPIOS@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x20
	bl	_devm_gpiochip_add_data
	tbnz	w0, #31, LBB0_14
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	bl	_sdv_register_irqsupport
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_7
LBB0_14:
	mov	x21, x0
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't enable device.\n"

	.comm	_GPIO_BAR,4,2                   ; @GPIO_BAR
	.comm	_DRV_NAME,4,2                   ; @DRV_NAME
l_.str.1:                               ; @.str.1
	.asciz	"can't alloc PCI BAR #%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"intel,muxctl"

	.comm	_GPMUXCTL,8,3                   ; @GPMUXCTL
	.comm	_GPINR,8,3                      ; @GPINR
	.comm	_GPOUTR,8,3                     ; @GPOUTR
	.comm	_GPOER,8,3                      ; @GPOER
	.comm	_SDV_NUM_PUB_GPIOS,4,2          ; @SDV_NUM_PUB_GPIOS
l_.str.3:                               ; @.str.3
	.asciz	"gpiochip_add() failed.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Sodaville GPIO driver registered.\n"

	.no_dead_strip	_sdv_gpio_probe
.subsections_via_symbols
