	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pulse8_connect
_pulse8_connect:                        ## @pulse8_connect
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	_CEC_CAP_DEFAULTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_CEC_CAP_PHYS_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CEC_CAP_MONITOR_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$0, -48(%rbp)
	movq	_CEC_PHYS_ADDR_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	orl	%r13d, %ebx
	orl	%r15d, %ebx
	movq	%r14, 56(%rax)
	movq	%r14, %rdi
	callq	_dev_name
	movq	_pulse8_cec_adap_ops@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	movl	$1, %r8d
	callq	_cec_allocate_adapter
	movq	%rax, 8(%r12)
	movq	%rax, %rdi
	callq	_PTR_ERR_OR_ZERO
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r14, 32(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_serio_set_drvdata
	leaq	48(%r12), %rdi
	movq	_pulse8_irq_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	44(%r12), %rdi
	callq	_mutex_init
	leaq	40(%r12), %rdi
	callq	_mutex_init
	movl	$0, (%r12)
	movq	%r14, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_serio_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_pulse8_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_8:
	movq	%r14, %rdi
	callq	_serio_close
LBB0_9:
	movq	8(%r12), %rdi
	callq	_cec_delete_adapter
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_serio_set_drvdata
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	movl	%eax, %ebx
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	8(%r12), %rdi
	movq	%r14, %rsi
	callq	_cec_register_adapter
	testl	%eax, %eax
	js	LBB0_7
## %bb.11:
	movq	8(%r12), %rax
	movq	%rax, 32(%r12)
	movq	_persistent_config@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.12:
	cmpq	$0, 24(%r12)
	je	LBB0_15
## %bb.13:
	movl	-52(%rbp), %edx
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_pulse8_apply_persistent_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.14:
	movl	$1, 4(%r12)
LBB0_15:
	addq	$16, %r12
	movq	_pulse8_ping_eeprom_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_DELAYED_WORK
	movq	_PING_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_schedule_delayed_work
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_CEC_CAP_DEFAULTS,4,2           ## @CEC_CAP_DEFAULTS
	.comm	_CEC_CAP_PHYS_ADDR,4,2          ## @CEC_CAP_PHYS_ADDR
	.comm	_CEC_CAP_MONITOR_ALL,4,2        ## @CEC_CAP_MONITOR_ALL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CEC_PHYS_ADDR_INVALID,4,2      ## @CEC_PHYS_ADDR_INVALID
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_pulse8_cec_adap_ops,4,2        ## @pulse8_cec_adap_ops
	.comm	_pulse8_irq_work_handler,4,2    ## @pulse8_irq_work_handler
	.comm	_persistent_config,8,3          ## @persistent_config
	.comm	_pulse8_ping_eeprom_work_handler,4,2 ## @pulse8_ping_eeprom_work_handler
	.comm	_PING_PERIOD,4,2                ## @PING_PERIOD
	.no_dead_strip	_pulse8_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pulse8_connect
_pulse8_connect:                        ; @pulse8_connect
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CEC_CAP_DEFAULTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CEC_CAP_DEFAULTS@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _CEC_CAP_PHYS_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CEC_CAP_PHYS_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _CEC_CAP_MONITOR_ALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CEC_CAP_MONITOR_ALL@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x8, _CEC_PHYS_ADDR_INVALID@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CEC_PHYS_ADDR_INVALID@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w8, wzr, [sp, #4]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	orr	w8, w23, w22
	orr	w22, w8, w24
	str	x19, [x0, #56]
	mov	x0, x19
	bl	_dev_name
	mov	x2, x0
Lloh15:
	adrp	x0, _pulse8_cec_adap_ops@GOTPAGE
Lloh16:
	ldr	x0, [x0, _pulse8_cec_adap_ops@GOTPAGEOFF]
	mov	x1, x20
	mov	x3, x22
	mov	w4, #1
	bl	_cec_allocate_adapter
	str	x0, [x20, #8]
	bl	_PTR_ERR_OR_ZERO
	tbnz	w0, #31, LBB0_7
; %bb.2:
	str	x19, [x20, #32]
	mov	x0, x19
	mov	x1, x20
	bl	_serio_set_drvdata
	add	x0, x20, #48
Lloh17:
	adrp	x8, _pulse8_irq_work_handler@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pulse8_irq_work_handler@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x20, #44
	bl	_mutex_init
	add	x0, x20, #40
	bl	_mutex_init
	str	wzr, [x20]
	mov	x0, x19
	mov	x1, x21
	bl	_serio_open
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x0, x20
	mov	x1, x19
	bl	_pulse8_setup
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_4:
	mov	x0, x19
	bl	_serio_close
LBB0_5:
	ldr	x0, [x20, #8]
	bl	_cec_delete_adapter
	mov	x0, x19
	mov	x1, #0
	bl	_serio_set_drvdata
	b	LBB0_8
LBB0_6:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	x0, x20
	bl	_kfree
LBB0_9:
	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_10:
	ldr	x0, [x20, #8]
	mov	x1, x19
	bl	_cec_register_adapter
	tbnz	w0, #31, LBB0_16
; %bb.11:
	ldr	x8, [x20, #8]
	str	x8, [x20, #32]
Lloh23:
	adrp	x8, _persistent_config@GOTPAGE
Lloh24:
	ldr	x8, [x8, _persistent_config@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cbz	x8, LBB0_15
; %bb.12:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_15
; %bb.13:
	ldr	w2, [sp, #4]
	add	x1, sp, #8
	mov	x0, x20
	bl	_pulse8_apply_persistent_config
	mov	x22, x0
	cbnz	w0, LBB0_4
; %bb.14:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_15:
	add	x19, x20, #16
Lloh26:
	adrp	x8, _pulse8_ping_eeprom_work_handler@GOTPAGE
Lloh27:
	ldr	x8, [x8, _pulse8_ping_eeprom_work_handler@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_DELAYED_WORK
Lloh29:
	adrp	x8, _PING_PERIOD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PING_PERIOD@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_schedule_delayed_work
	mov	w22, #0
	b	LBB0_9
LBB0_16:
	mov	x22, x0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CEC_CAP_DEFAULTS,4,2           ; @CEC_CAP_DEFAULTS
	.comm	_CEC_CAP_PHYS_ADDR,4,2          ; @CEC_CAP_PHYS_ADDR
	.comm	_CEC_CAP_MONITOR_ALL,4,2        ; @CEC_CAP_MONITOR_ALL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CEC_PHYS_ADDR_INVALID,4,2      ; @CEC_PHYS_ADDR_INVALID
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_pulse8_cec_adap_ops,4,2        ; @pulse8_cec_adap_ops
	.comm	_pulse8_irq_work_handler,4,2    ; @pulse8_irq_work_handler
	.comm	_persistent_config,8,3          ; @persistent_config
	.comm	_pulse8_ping_eeprom_work_handler,4,2 ; @pulse8_ping_eeprom_work_handler
	.comm	_PING_PERIOD,4,2                ; @PING_PERIOD
	.no_dead_strip	_pulse8_connect
.subsections_via_symbols
