	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_sysfs_afu_add              ## -- Begin function cxl_sysfs_afu_add
	.p2align	4, 0x90
_cxl_sysfs_afu_add:                     ## @cxl_sysfs_afu_add
	.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	%rdi, %r15
	addq	$16, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_INIT_LIST_HEAD
	movq	_afu_attrs@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%r15), %rbx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r15
	cmpq	%rax, %r14
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	_cxl_ops@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%r15), %edi
	movq	_CXL_AFU_ATTRS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	*(%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rsi
	addq	%r15, %rsi
	movq	%rbx, %rdi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r15)
	jne	LBB0_9
	jmp	LBB0_16
LBB0_7:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpq	$0, 8(%r15)
	je	LBB0_16
LBB0_9:
	movq	%r15, %rbx
	addq	$24, %r15
	leaq	40(%rbx), %rdi
	callq	_sysfs_attr_init
	leaq	L_.str(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	_S_IRUGO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	8(%rbx), %rax
	movq	%rax, 32(%rbx)
	movq	_afu_eb_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	leaq	4(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%rbx, %r15
	callq	_device_create_bin_file
	testl	%eax, %eax
	je	LBB0_16
## %bb.10:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
LBB0_11:
	movq	$0, 8(%r15)
	testl	%r14d, %r14d
	jle	LBB0_22
## %bb.12:
	addq	$4, %r15
	movl	%r14d, %ebx
	leaq	-4(,%rbx,4), %r14
	incq	%rbx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	decq	%rbx
	addq	$-4, %r14
	cmpq	$1, %rbx
	jbe	LBB0_22
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	_cxl_ops@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-8(%rax,%rbx,4), %edi
	movq	_CXL_AFU_ATTRS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	*(%rcx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r13), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_device_remove_file
	jmp	LBB0_15
LBB0_16:
	cmpl	$0, (%r15)
	jle	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_cxl_sysfs_afu_new_cr
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	%r12, %rdi
	testq	%rax, %rax
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r14, %rsi
	callq	_list_add
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_18
LBB0_21:
	xorl	%r12d, %r12d
LBB0_22:
	movl	%r12d, %eax
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_cxl_sysfs_afu_remove
	movl	%ebx, %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_afu_attrs,8,3                  ## @afu_attrs
	.comm	_cxl_ops,8,3                    ## @cxl_ops
	.comm	_CXL_AFU_ATTRS,4,2              ## @CXL_AFU_ATTRS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"afu_err_buff"

	.comm	_S_IRUGO,4,2                    ## @S_IRUGO
	.comm	_afu_eb_read,4,2                ## @afu_eb_read
L_.str.1:                               ## @.str.1
	.asciz	"Unable to create eb attr for the afu. Err(%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_sysfs_afu_add              ; -- Begin function cxl_sysfs_afu_add
	.p2align	2
_cxl_sysfs_afu_add:                     ; @cxl_sysfs_afu_add
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	add	x20, x0, #16
	mov	x0, x20
	bl	_INIT_LIST_HEAD
Lloh0:
	adrp	x23, _afu_attrs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _afu_attrs@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x25, #0
	mov	x24, #0
	add	x22, x19, #4
Lloh2:
	adrp	x26, _cxl_ops@GOTPAGE
Lloh3:
	ldr	x26, [x26, _cxl_ops@GOTPAGEOFF]
Lloh4:
	adrp	x27, _CXL_AFU_ATTRS@GOTPAGE
Lloh5:
	ldr	x27, [x27, _CXL_AFU_ATTRS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x25, x25, #4
	cmp	x24, w0, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x26]
	ldr	x9, [x9]
	ldr	w0, [x8, x25]
	ldr	w1, [x27]
	blr	x9
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	add	x1, x8, x25
	mov	x0, x22
	bl	_device_create_file
	cbz	w0, LBB0_2
; %bb.5:
	mov	x21, x0
	b	LBB0_10
LBB0_6:
	mov	w24, #0
LBB0_7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_15
; %bb.8:
	add	x0, x19, #40
	bl	_sysfs_attr_init
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
Lloh8:
	adrp	x9, _S_IRUGO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _S_IRUGO@GOTPAGEOFF]
	str	x8, [x19, #40]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _afu_eb_read@GOTPAGE
Lloh12:
	ldr	x9, [x9, _afu_eb_read@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	mov	x1, x19
	str	w9, [x1, #24]!
	str	w8, [x1, #24]
	ldur	x8, [x1, #-16]
	str	x8, [x1, #8]
	sub	x22, x1, #20
	mov	x0, x22
	bl	_device_create_bin_file
	cbz	w0, LBB0_15
; %bb.9:
	mov	x21, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_dev_err
LBB0_10:
	str	xzr, [x19, #8]
	cmp	w24, #1
	b.lt	LBB0_20
; %bb.11:
	add	x19, x19, #4
	mov	w8, w24
	add	x20, x8, #1
	lsl	x8, x8, #2
	sub	x22, x8, #4
Lloh16:
	adrp	x24, _cxl_ops@GOTPAGE
Lloh17:
	ldr	x24, [x24, _cxl_ops@GOTPAGEOFF]
Lloh18:
	adrp	x25, _CXL_AFU_ATTRS@GOTPAGE
Lloh19:
	ldr	x25, [x25, _CXL_AFU_ATTRS@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	sub	x20, x20, #1
	sub	x22, x22, #4
	cmp	x20, #1
	b.ls	LBB0_20
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	ldr	x9, [x9]
	ldr	w0, [x8, x22]
	ldr	w1, [x25]
	blr	x9
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x19
	bl	_device_remove_file
	b	LBB0_12
LBB0_15:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.16:
	mov	w21, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_cxl_sysfs_afu_new_cr
	mov	x22, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_22
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x22
	mov	x1, x20
	bl	_list_add
	add	w21, w21, #1
	ldr	w8, [x19]
	cmp	w21, w8
	b.lt	LBB0_17
LBB0_19:
	mov	w21, #0
LBB0_20:
	mov	x0, x21
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x19
	bl	_cxl_sysfs_afu_remove
	mov	x0, x20
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_afu_attrs,8,3                  ; @afu_attrs
	.comm	_cxl_ops,8,3                    ; @cxl_ops
	.comm	_CXL_AFU_ATTRS,4,2              ; @CXL_AFU_ATTRS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"afu_err_buff"

	.comm	_S_IRUGO,4,2                    ; @S_IRUGO
	.comm	_afu_eb_read,4,2                ; @afu_eb_read
l_.str.1:                               ; @.str.1
	.asciz	"Unable to create eb attr for the afu. Err(%d)\n"

.subsections_via_symbols
