	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_device_register_sysfs  ## -- Begin function mlx4_ib_device_register_sysfs
	.p2align	4, 0x90
_mlx4_ib_device_register_sysfs:         ## @mlx4_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	32(%rdi), %edi
	callq	_mlx4_is_master
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	callq	_kobject_get
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_kobject_create_and_add
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rdi
	callq	_kobject_get
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_kobject_create_and_add
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	cmpl	$0, (%r15)
	jle	LBB0_10
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_add_port_entries
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	(%r15), %ebx
	jl	LBB0_8
LBB0_10:
	movq	%r15, %rdi
	callq	_register_pkey_tree
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_14
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_13
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %r12d
LBB0_11:
	movq	24(%r15), %rdi
	callq	_kobject_put
LBB0_12:
	movq	16(%r15), %rdi
	callq	_kobject_put
LBB0_13:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	callq	_kobject_put
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_err
	movl	%r12d, %r14d
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iov"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"ports"

L_.str.2:                               ## @.str.2
	.asciz	"mlx4_ib_device_register_sysfs error (%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_device_register_sysfs  ; -- Begin function mlx4_ib_device_register_sysfs
	.p2align	2
_mlx4_ib_device_register_sysfs:         ; @mlx4_ib_device_register_sysfs
	.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	x19, x0
	ldr	w0, [x0, #32]
	bl	_mlx4_is_master
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_kobject_get
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kobject_create_and_add
	str	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.2:
	bl	_kobject_get
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_kobject_create_and_add
	str	x0, [x19, #24]
	cbz	x0, LBB0_10
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	mov	x0, x19
	mov	x1, x21
	bl	_add_port_entries
	cbnz	w0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	cmp	w21, w8
	b.lt	LBB0_5
LBB0_7:
	mov	x0, x19
	bl	_register_pkey_tree
	mov	x20, x0
	cbnz	w0, LBB0_12
	b	LBB0_15
LBB0_8:
	mov	w20, #0
	b	LBB0_15
LBB0_9:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_14
LBB0_10:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_11:
	mov	x20, x0
LBB0_12:
	ldr	x0, [x19, #24]
	bl	_kobject_put
LBB0_13:
	ldr	x0, [x19, #16]
	bl	_kobject_put
LBB0_14:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	bl	_kobject_put
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_pr_err
LBB0_15:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iov"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"ports"

l_.str.2:                               ; @.str.2
	.asciz	"mlx4_ib_device_register_sysfs error (%d)\n"

.subsections_via_symbols
