	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_battery_init_irq
_cpcap_battery_init_irq:                ## @cpcap_battery_init_irq
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdx, %rsi
	callq	_platform_get_irq_byname
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movl	4(%r14), %edi
	movq	_cpcap_battery_irq_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, (%rsp)
	movl	%ebx, %esi
	xorl	%edx, %edx
	movq	%r15, %r9
	callq	_devm_request_threaded_irq
	movl	4(%r14), %edi
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movl	%eax, %ecx
	callq	_dev_err
	movl	%r12d, %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movq	%r15, (%rax)
	movl	%ebx, 8(%rax)
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$6, %edx
	callq	_strncmp
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	$6, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	_CPCAP_BATTERY_IRQ_ACTION_POWEROFF@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
LBB0_10:
	addq	$12, %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_list_add
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cpcap_battery_irq_thread,4,2   ## @cpcap_battery_irq_thread
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get irq %s: %i\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"lowbph"

	.comm	_CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW,4,2 ## @CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW
L_.str.2:                               ## @.str.2
	.asciz	"lowbpl"

	.comm	_CPCAP_BATTERY_IRQ_ACTION_POWEROFF,4,2 ## @CPCAP_BATTERY_IRQ_ACTION_POWEROFF
	.no_dead_strip	_cpcap_battery_init_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_battery_init_irq
_cpcap_battery_init_irq:                ; @cpcap_battery_init_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x19, x1
	mov	x1, x2
	bl	_platform_get_irq_byname
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x8, _cpcap_battery_irq_thread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpcap_battery_irq_thread@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x1, x21
	mov	x2, #0
	mov	x5, x20
	mov	x6, x19
	bl	_devm_request_threaded_irq
	mov	x22, x0
	ldr	w0, [x19, #4]
	cbz	w22, LBB0_3
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x22
	bl	_dev_err
	mov	x21, x22
	b	LBB0_11
LBB0_3:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x22, x0
	str	x20, [x0]
	str	w21, [x0, #8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #6
	bl	_strncmp
	cbz	w0, LBB0_8
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #6
	bl	_strncmp
	cbnz	w0, LBB0_10
; %bb.6:
Lloh15:
	adrp	x8, _CPCAP_BATTERY_IRQ_ACTION_POWEROFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CPCAP_BATTERY_IRQ_ACTION_POWEROFF@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_8:
Lloh20:
	adrp	x8, _CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	str	w8, [x22, #16]
LBB0_10:
	add	x0, x22, #12
	mov	x1, x19
	bl	_list_add
	mov	w21, #0
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_cpcap_battery_irq_thread,4,2   ; @cpcap_battery_irq_thread
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get irq %s: %i\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"lowbph"

	.comm	_CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW,4,2 ; @CPCAP_BATTERY_IRQ_ACTION_BATTERY_LOW
l_.str.2:                               ; @.str.2
	.asciz	"lowbpl"

	.comm	_CPCAP_BATTERY_IRQ_ACTION_POWEROFF,4,2 ; @CPCAP_BATTERY_IRQ_ACTION_POWEROFF
	.no_dead_strip	_cpcap_battery_init_irq
.subsections_via_symbols
