	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htcpld_register_chip_gpio
_htcpld_register_chip_gpio:             ## @htcpld_register_chip_gpio
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_dev_get_platdata
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_platform_get_drvdata
	movq	(%rax), %rbx
	movslq	%r14d, %rax
	leaq	(%rax,%rax,8), %r14
	shlq	$4, %r14
	leaq	(%rbx,%r14), %rdi
	movq	(%r12), %rcx
	shlq	$4, %rax
	leaq	(%rcx,%rax), %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdx
	movq	%rdx, (%rbx,%r14)
	movq	%r15, 64(%rbx,%r14)
	movq	_THIS_MODULE@GOTPCREL(%rip), %r8
	movq	(%r8), %rsi
	movq	%rsi, 56(%rbx,%r14)
	movq	_htcpld_chip_get@GOTPCREL(%rip), %r9
	movq	(%r9), %rdx
	movq	%rdx, 48(%rbx,%r14)
	movq	_htcpld_chip_set@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 40(%rbx,%r14)
	movq	$0, 32(%rbx,%r14)
	movq	_htcpld_direction_output@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 24(%rbx,%r14)
	movl	12(%rcx,%rax), %edx
	movl	%edx, 12(%rbx,%r14)
	movl	4(%rcx,%rax), %esi
	movl	%esi, 8(%rbx,%r14)
	leaq	L_.str.1(%rip), %rdx
	movq	%rdx, 72(%rbx,%r14)
	movq	%r15, 136(%rbx,%r14)
	movq	(%r8), %rdx
	movq	%rdx, 128(%rbx,%r14)
	movq	(%r9), %rdx
	movq	%rdx, 120(%rbx,%r14)
	movq	$0, 112(%rbx,%r14)
	movq	_htcpld_direction_input@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 104(%rbx,%r14)
	movq	$0, 96(%rbx,%r14)
	movq	_htcpld_chip_to_irq@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 88(%rbx,%r14)
	movl	8(%rcx,%rax), %eax
	movl	%eax, 84(%rbx,%r14)
	movl	%esi, 80(%rbx,%r14)
	movq	%rdi, %r12
	movq	%rdi, %rsi
	callq	_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	callq	_dev_warn
	jmp	LBB0_5
LBB0_2:
	leaq	(%rbx,%r14), %rdi
	addq	$72, %rdi
	movq	%r12, %rsi
	callq	_gpiochip_add_data
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	callq	_dev_warn
	movq	%r12, %rdi
	callq	_gpiochip_remove
	jmp	LBB0_5
LBB0_3:
	xorl	%r13d, %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"htcpld-out"

	.comm	_THIS_MODULE,8,3                ## @THIS_MODULE
	.comm	_htcpld_chip_get,8,3            ## @htcpld_chip_get
	.comm	_htcpld_chip_set,8,3            ## @htcpld_chip_set
	.comm	_htcpld_direction_output,8,3    ## @htcpld_direction_output
L_.str.1:                               ## @.str.1
	.asciz	"htcpld-in"

	.comm	_htcpld_direction_input,8,3     ## @htcpld_direction_input
	.comm	_htcpld_chip_to_irq,4,2         ## @htcpld_chip_to_irq
L_.str.2:                               ## @.str.2
	.asciz	"Unable to register output GPIOs for 0x%x: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unable to register input GPIOs for 0x%x: %d\n"

	.no_dead_strip	_htcpld_register_chip_gpio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htcpld_register_chip_gpio
_htcpld_register_chip_gpio:             ; @htcpld_register_chip_gpio
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	bl	_dev_get_platdata
	mov	x22, x0
	mov	x0, x19
	bl	_platform_get_drvdata
	ldr	x8, [x0]
	mov	w9, #144
	smaddl	x20, w21, w9, x8
	ldr	x8, [x22]
	add	x23, x8, w21, sxtw #4
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
	str	x19, [x20, #64]
Lloh2:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x20, #56]
Lloh4:
	adrp	x9, _htcpld_chip_get@GOTPAGE
Lloh5:
	ldr	x9, [x9, _htcpld_chip_get@GOTPAGEOFF]
	ldr	x10, [x9]
	str	x10, [x20, #48]
Lloh6:
	adrp	x10, _htcpld_chip_set@GOTPAGE
Lloh7:
	ldr	x10, [x10, _htcpld_chip_set@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	stp	xzr, x10, [x20, #32]
Lloh9:
	adrp	x10, _htcpld_direction_output@GOTPAGE
Lloh10:
	ldr	x10, [x10, _htcpld_direction_output@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	str	x10, [x20, #24]
	ldr	w10, [x23, #12]
	str	w10, [x20, #12]
Lloh12:
	adrp	x10, l_.str.1@PAGE
Lloh13:
	add	x10, x10, l_.str.1@PAGEOFF
	mov	x22, x20
	str	x10, [x22, #72]!
	str	x19, [x20, #136]
	ldr	x8, [x8]
	str	x8, [x20, #128]
	ldr	x8, [x9]
	stp	xzr, x8, [x20, #112]
Lloh14:
	adrp	x8, _htcpld_direction_input@GOTPAGE
Lloh15:
	ldr	x8, [x8, _htcpld_direction_input@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	stp	xzr, x8, [x20, #96]
	ldur	d0, [x23, #4]
	str	s0, [x20, #8]
Lloh17:
	adrp	x8, _htcpld_chip_to_irq@GOTPAGE
Lloh18:
	ldr	x8, [x8, _htcpld_chip_to_irq@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20, #88]
	str	d0, [x20, #80]
	mov	x0, x20
	mov	x1, x20
	bl	_gpiochip_add_data
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w2, [x23]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_dev_warn
	b	LBB0_4
LBB0_2:
	mov	x0, x22
	mov	x1, x20
	bl	_gpiochip_add_data
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w2, [x23]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_dev_warn
	mov	x0, x20
	bl	_gpiochip_remove
LBB0_4:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htcpld-out"

	.comm	_THIS_MODULE,8,3                ; @THIS_MODULE
	.comm	_htcpld_chip_get,8,3            ; @htcpld_chip_get
	.comm	_htcpld_chip_set,8,3            ; @htcpld_chip_set
	.comm	_htcpld_direction_output,8,3    ; @htcpld_direction_output
l_.str.1:                               ; @.str.1
	.asciz	"htcpld-in"

	.comm	_htcpld_direction_input,8,3     ; @htcpld_direction_input
	.comm	_htcpld_chip_to_irq,4,2         ; @htcpld_chip_to_irq
l_.str.2:                               ; @.str.2
	.asciz	"Unable to register output GPIOs for 0x%x: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unable to register input GPIOs for 0x%x: %d\n"

	.no_dead_strip	_htcpld_register_chip_gpio
.subsections_via_symbols
