	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_device_register_sysfs       ## -- Begin function ib_device_register_sysfs
	.p2align	4, 0x90
_ib_device_register_sysfs:              ## @ib_device_register_sysfs
	.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	%rsi, %r15
	movq	%rdi, %r12
	leaq	28(%rdi), %r14
	movl	20(%rdi), %edx
	movl	24(%rdi), %eax
	movl	%eax, 32(%rdi)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_set_name
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.1:
	movq	%r14, %rdi
	callq	_device_add
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_ib_class_attributes@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r14, %rdi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r15
	jl	LBB0_5
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_kobject_create_and_add
	movl	%eax, 16(%r12)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	callq	_rdma_cap_ib_switch
	testq	%rax, %rax
	je	LBB0_10
## %bb.18:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_add_port
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
	jmp	LBB0_15
LBB0_6:
	movl	%eax, %ebx
	jmp	LBB0_20
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movq	%r12, %rdi
	callq	_free_port_list_attributes
LBB0_20:
	movq	%r14, %rdi
	callq	_device_unregister
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	cmpl	$0, (%r12)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_15
## %bb.11:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incl	%r13d
	movq	%r12, %rdi
	movl	%r13d, %esi
	movq	%r15, %rdx
	callq	_add_port
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	(%r12), %r13d
	jl	LBB0_13
LBB0_15:
	cmpq	$0, 8(%r12)
	je	LBB0_16
## %bb.17:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_setup_hw_stats
	jmp	LBB0_21
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_14:
	movl	%eax, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_ib_class_attributes,8,3        ## @ib_class_attributes
L_.str.1:                               ## @.str.1
	.asciz	"ports"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_device_register_sysfs       ; -- Begin function ib_device_register_sysfs
	.p2align	2
_ib_device_register_sysfs:              ; @ib_device_register_sysfs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	add	x19, x0, #28
	ldp	w2, w8, [x0, #20]
	str	w8, [x0, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_set_name
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.1:
	mov	x0, x19
	bl	_device_add
	mov	x22, x0
	cbnz	w0, LBB0_20
; %bb.2:
Lloh2:
	adrp	x23, _ib_class_attributes@GOTPAGE
Lloh3:
	ldr	x23, [x23, _ib_class_attributes@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x24, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x19
	bl	_device_create_file
	cbnz	w0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	x24, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_kobject_create_and_add
	str	w0, [x20, #16]
	cbz	w0, LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_rdma_cap_ib_switch
	cbz	x0, LBB0_13
; %bb.8:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_add_port
	mov	x22, x0
	cbnz	w0, LBB0_11
	b	LBB0_17
LBB0_9:
	mov	x22, x0
	b	LBB0_12
LBB0_10:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x20
	bl	_free_port_list_attributes
LBB0_12:
	mov	x0, x19
	bl	_device_unregister
	b	LBB0_20
LBB0_13:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.14:
	mov	w23, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w23, w23, #1
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_add_port
	cbnz	w0, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x20]
	cmp	w23, w8
	b.lt	LBB0_15
LBB0_17:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_setup_hw_stats
LBB0_19:
	mov	w22, #0
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	x22, x0
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_ib_class_attributes,8,3        ; @ib_class_attributes
l_.str.1:                               ; @.str.1
	.asciz	"ports"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
