	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_afu_irq
_setup_afu_irq:                         ## @setup_afu_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	16(%rsi), %esi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_irq_create_mapping
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	16(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_debug
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_kasprintf
	movq	%rax, 8(%rbx)
	movl	(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_afu_irq_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	movq	%rax, %rcx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	%eax, %r15d
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	$0, 8(%rbx)
	movl	(%rbx), %edi
	callq	_irq_dispose_mapping
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movl	%r15d, %r14d
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	callq	_irq_dispose_mapping
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_6:
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq_create_mapping failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"hw_irq %d mapped to virq %u\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"ocxl-afu-%u"

	.comm	_afu_irq_handler,4,2            ## @afu_irq_handler
L_.str.3:                               ## @.str.3
	.asciz	"request_irq failed: %d\n"

	.no_dead_strip	_setup_afu_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_afu_irq
_setup_afu_irq:                         ; @setup_afu_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	w1, [x1, #16]
	mov	x0, #0
	bl	_irq_create_mapping
	str	w0, [x19]
	cbz	w0, LBB0_4
; %bb.1:
	mov	x2, x0
	ldr	w1, [x19, #16]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_kasprintf
	mov	x3, x0
	str	x0, [x19, #8]
	ldr	w0, [x19]
	cbz	x3, LBB0_5
; %bb.2:
Lloh7:
	adrp	x8, _afu_irq_handler@GOTPAGE
Lloh8:
	ldr	x8, [x8, _afu_irq_handler@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
	cbz	w0, LBB0_7
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
	ldr	w0, [x19]
	bl	_irq_dispose_mapping
	str	x20, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_6
LBB0_5:
	bl	_irq_dispose_mapping
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq_create_mapping failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"hw_irq %d mapped to virq %u\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"ocxl-afu-%u"

	.comm	_afu_irq_handler,4,2            ; @afu_irq_handler
l_.str.3:                               ; @.str.3
	.asciz	"request_irq failed: %d\n"

	.no_dead_strip	_setup_afu_irq
.subsections_via_symbols
