	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_diag_add                   ## -- Begin function qib_diag_add
	.p2align	4, 0x90
_qib_diag_add:                          ## @qib_diag_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_diagpkt_count@GOTPCREL(%rip), %rdi
	callq	_atomic_inc_return
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.1:
	movq	_QIB_DIAGPKT_MINOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	_diagpkt_file_ops@GOTPCREL(%rip), %rdx
	movq	_diagpkt_cdev@GOTPCREL(%rip), %rcx
	movq	_diagpkt_device@GOTPCREL(%rip), %r8
	callq	_qib_cdev_init
	testl	%eax, %eax
	jne	LBB0_3
LBB0_2:
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rdx
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_snprintf
	movq	_QIB_DIAG_MINOR_BASE@GOTPCREL(%rip), %rax
	movl	(%rbx), %edi
	addl	(%rax), %edi
	leaq	8(%rbx), %rcx
	addq	$4, %rbx
	movq	_diag_file_ops@GOTPCREL(%rip), %rdx
	movq	%r14, %rsi
	movq	%rbx, %r8
	callq	_qib_cdev_init
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_diagpkt_count,4,2              ## @diagpkt_count
	.comm	_QIB_DIAGPKT_MINOR,4,2          ## @QIB_DIAGPKT_MINOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ipath_diagpkt"

	.comm	_diagpkt_file_ops,4,2           ## @diagpkt_file_ops
	.comm	_diagpkt_cdev,4,2               ## @diagpkt_cdev
	.comm	_diagpkt_device,4,2             ## @diagpkt_device
L_.str.1:                               ## @.str.1
	.asciz	"ipath_diag%d"

	.comm	_QIB_DIAG_MINOR_BASE,4,2        ## @QIB_DIAG_MINOR_BASE
	.comm	_diag_file_ops,4,2              ## @diag_file_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_diag_add                   ; -- Begin function qib_diag_add
	.p2align	2
_qib_diag_add:                          ; @qib_diag_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x0, _diagpkt_count@GOTPAGE
Lloh4:
	ldr	x0, [x0, _diagpkt_count@GOTPAGEOFF]
	bl	_atomic_inc_return
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _QIB_DIAGPKT_MINOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QIB_DIAGPKT_MINOR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
Lloh10:
	adrp	x2, _diagpkt_file_ops@GOTPAGE
Lloh11:
	ldr	x2, [x2, _diagpkt_file_ops@GOTPAGEOFF]
Lloh12:
	adrp	x3, _diagpkt_cdev@GOTPAGE
Lloh13:
	ldr	x3, [x3, _diagpkt_cdev@GOTPAGEOFF]
Lloh14:
	adrp	x4, _diagpkt_device@GOTPAGE
Lloh15:
	ldr	x4, [x4, _diagpkt_device@GOTPAGEOFF]
	bl	_qib_cdev_init
	cbnz	w0, LBB0_3
LBB0_2:
	mov	x20, x19
	ldr	w3, [x20], #8
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w1, #16
	bl	_snprintf
Lloh18:
	adrp	x8, _QIB_DIAG_MINOR_BASE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _QIB_DIAG_MINOR_BASE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x19], #4
	add	w0, w9, w8
Lloh21:
	adrp	x2, _diag_file_ops@GOTPAGE
Lloh22:
	ldr	x2, [x2, _diag_file_ops@GOTPAGEOFF]
	add	x1, sp, #8
	mov	x3, x20
	mov	x4, x19
	bl	_qib_cdev_init
LBB0_3:
	ldr	x8, [sp, #24]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_diagpkt_count,4,2              ; @diagpkt_count
	.comm	_QIB_DIAGPKT_MINOR,4,2          ; @QIB_DIAGPKT_MINOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ipath_diagpkt"

	.comm	_diagpkt_file_ops,4,2           ; @diagpkt_file_ops
	.comm	_diagpkt_cdev,4,2               ; @diagpkt_cdev
	.comm	_diagpkt_device,4,2             ; @diagpkt_device
l_.str.1:                               ; @.str.1
	.asciz	"ipath_diag%d"

	.comm	_QIB_DIAG_MINOR_BASE,4,2        ; @QIB_DIAG_MINOR_BASE
	.comm	_diag_file_ops,4,2              ; @diag_file_ops
.subsections_via_symbols
