	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htcpld_setup_chips
_htcpld_setup_chips:                    ## @htcpld_setup_chips
	.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
	movq	%rdi, %r15
	callq	_dev_get_platdata
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %esi
	movl	%esi, (%rax)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	cmpl	$0, (%rbx)
	jle	LBB0_13
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	12(%rcx,%r14), %edx
	movl	%edx, 36(%rax,%r12)
	movl	%edx, 32(%rax,%r12)
	movq	$0, 24(%rax,%r12)
	movq	%r15, 16(%rax,%r12)
	movl	8(%rcx,%r14), %edx
	movl	%edx, 12(%rax,%r12)
	movl	4(%rcx,%r14), %ecx
	movl	%ecx, 8(%rax,%r12)
	leaq	(%rax,%r12), %rdi
	addq	$4, %rdi
	movq	_htcpld_chip_set_ni@GOTPCREL(%rip), %rsi
	callq	_INIT_WORK
	movq	16(%rbx), %rdi
	addq	%r12, %rdi
	callq	_spin_lock_init
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_htcpld_setup_chip_irq
	testl	%eax, %eax
	jne	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_htcpld_register_chip_i2c
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_htcpld_register_chip_gpio
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_htcpld_unregister_chip_i2c
	jmp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r14), %edx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jge	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rax
	addq	$16, %r14
	addq	$40, %r12
	jmp	LBB0_3
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_htcpld_chip_set_ni,4,2         ## @htcpld_chip_set_ni
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Registered chip at 0x%x\n"

	.no_dead_strip	_htcpld_setup_chips
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htcpld_setup_chips
_htcpld_setup_chips:                    ; @htcpld_setup_chips
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_dev_get_platdata
	mov	x20, x0
	mov	x0, x19
	bl	_platform_get_drvdata
	mov	x21, x0
	ldr	w1, [x20]
	str	w1, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x21, #16]
	cbz	x0, LBB0_12
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.2:
	mov	x25, #0
	mov	x22, #0
	mov	w26, #36
Lloh3:
	adrp	x23, _htcpld_chip_set_ni@GOTPAGE
Lloh4:
	ldr	x23, [x23, _htcpld_chip_set_ni@GOTPAGEOFF]
Lloh5:
	adrp	x24, l_.str@PAGE
Lloh6:
	add	x24, x24, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x25
	ldr	w9, [x8, #12]
	add	x10, x0, x26
	stp	w9, w9, [x10, #-4]
	stur	xzr, [x10, #-12]
	stur	x19, [x10, #-20]
	ldur	d0, [x8, #4]
	stur	d0, [x10, #-28]
	sub	x0, x10, #32
	mov	x1, x23
	bl	_INIT_WORK
	ldr	x8, [x21, #16]
	add	x8, x8, x26
	sub	x0, x8, #36
	bl	_spin_lock_init
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_htcpld_setup_chip_irq
	cbnz	w0, LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_htcpld_register_chip_i2c
	cbnz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_htcpld_register_chip_gpio
	cbz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_htcpld_unregister_chip_i2c
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	ldr	w2, [x8, x25]
	mov	x0, x19
	mov	x1, x24
	bl	_dev_info
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x21, #16]
	add	x25, x25, #16
	add	x26, x26, #40
	b	LBB0_3
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_htcpld_chip_set_ni,4,2         ; @htcpld_chip_set_ni
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Registered chip at 0x%x\n"

	.no_dead_strip	_htcpld_setup_chips
.subsections_via_symbols
