	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_ibdiag_config             ## -- Begin function read_ibdiag_config
	.p2align	4, 0x90
_read_ibdiag_config:                    ## @read_ibdiag_config
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-1088(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_26
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_26
## %bb.2:
	movq	%rax, %r12
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%rax, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_25
## %bb.3:
	leaq	L_.str.1(%rip), %r14
	leaq	-1072(%rbp), %r15
	leaq	-1080(%rbp), %rbx
	jmp	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_ibd_ca@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_strdup
	movq	%rax, (%rbx)
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %r14
	leaq	-1080(%rbp), %rbx
LBB0_24:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	$1024, %esi                     ## imm = 0x400
	movq	%r12, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_25
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_strtok_r
	testq	%rax, %rax
	je	LBB0_24
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$35, (%rax)
	je	LBB0_24
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_strtok_r
	movq	%r14, %rsi
	movq	%rax, %r14
	xorl	%edi, %edi
	movq	%rbx, %rdx
	callq	_strtok_r
	movq	%rax, %r13
	leaq	L_.str.3(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.4(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.5(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.6(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.7(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.8(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.9(%rip), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_strncmp
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %r14
	leaq	-1080(%rbp), %rbx
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_strdup
	movq	_ibd_nd_format@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_24
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_ibd_ca_port@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_ibd_timeout@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_val_str_true
	movq	_IBND_CONFIG_MLX_EPI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %r14
	leaq	-1080(%rbp), %rbx
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_ibd_ibnetdisc_flags@GOTPCREL(%rip), %rax
	orl	%ecx, (%rax)
	jmp	LBB0_24
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoull
	movq	_ibd_mkey@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoull
	movq	_ibd_sakey@GOTPCREL(%rip), %rcx
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, (%rcx)
	jmp	LBB0_11
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	notl	%ecx
	movq	_ibd_ibnetdisc_flags@GOTPCREL(%rip), %rax
	andl	%ecx, (%rax)
	jmp	LBB0_24
LBB0_25:
	movq	%r12, %rdi
	callq	_fclose
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

L_.str.1:                               ## @.str.1
	.asciz	"\n"

L_.str.2:                               ## @.str.2
	.asciz	"="

L_.str.3:                               ## @.str.3
	.asciz	"CA"

	.comm	_ibd_ca,8,3                     ## @ibd_ca
L_.str.4:                               ## @.str.4
	.asciz	"Port"

	.comm	_ibd_ca_port,8,3                ## @ibd_ca_port
L_.str.5:                               ## @.str.5
	.asciz	"timeout"

	.comm	_ibd_timeout,8,3                ## @ibd_timeout
L_.str.6:                               ## @.str.6
	.asciz	"MLX_EPI"

	.comm	_IBND_CONFIG_MLX_EPI,4,2        ## @IBND_CONFIG_MLX_EPI
	.comm	_ibd_ibnetdisc_flags,4,2        ## @ibd_ibnetdisc_flags
L_.str.7:                               ## @.str.7
	.asciz	"m_key"

	.comm	_ibd_mkey,8,3                   ## @ibd_mkey
L_.str.8:                               ## @.str.8
	.asciz	"sa_key"

	.comm	_ibd_sakey,8,3                  ## @ibd_sakey
L_.str.9:                               ## @.str.9
	.asciz	"nd_format"

	.comm	_ibd_nd_format,8,3              ## @ibd_nd_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_ibdiag_config             ; -- Begin function read_ibdiag_config
	.p2align	2
_read_ibdiag_config:                    ; @read_ibdiag_config
	.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
	sub	sp, sp, #1056
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	mov	x1, sp
	bl	_stat
	cbnz	x0, LBB0_26
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_26
; %bb.2:
	mov	x19, x0
	add	x0, sp, #16
	mov	w1, #1024
	mov	x2, x19
	bl	_fgets
	cbz	x0, LBB0_25
; %bb.3:
Lloh5:
	adrp	x20, l_.str.1@PAGE
Lloh6:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh7:
	adrp	x21, l_.str.2@PAGE
Lloh8:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh9:
	adrp	x22, l_.str.3@PAGE
Lloh10:
	add	x22, x22, l_.str.3@PAGEOFF
Lloh11:
	adrp	x26, _ibd_ca@GOTPAGE
Lloh12:
	ldr	x26, [x26, _ibd_ca@GOTPAGEOFF]
Lloh13:
	adrp	x23, l_.str.4@PAGE
Lloh14:
	add	x23, x23, l_.str.4@PAGEOFF
Lloh15:
	adrp	x24, l_.str.5@PAGE
Lloh16:
	add	x24, x24, l_.str.5@PAGEOFF
Lloh17:
	adrp	x25, l_.str.6@PAGE
Lloh18:
	add	x25, x25, l_.str.6@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x26]
	bl	_free
	mov	x0, x28
	bl	_strdup
	str	x0, [x26]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #16
	mov	w1, #1024
	mov	x2, x19
	bl	_fgets
	cbz	x0, LBB0_25
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #16
	add	x2, sp, #8
	mov	x1, x20
	bl	_strtok_r
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x0]
	cmp	w8, #35
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x2, sp, #8
	mov	x1, x21
	bl	_strtok_r
	mov	x27, x0
	add	x2, sp, #8
	mov	x0, #0
	mov	x1, x20
	bl	_strtok_r
	mov	x28, x0
	mov	x0, x22
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x22
	bl	_strncmp
	cbz	x0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x23
	bl	_strncmp
	cbz	x0, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x24
	bl	_strncmp
	cbz	x0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x25
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	bl	_strncmp
	cbz	x0, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x24
	mov	x24, x26
	mov	x26, x25
Lloh19:
	adrp	x25, l_.str.7@PAGE
Lloh20:
	add	x25, x25, l_.str.7@PAGEOFF
	mov	x0, x25
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	bl	_strncmp
	cbz	x0, LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh21:
	adrp	x25, l_.str.8@PAGE
Lloh22:
	add	x25, x25, l_.str.8@PAGEOFF
	mov	x0, x25
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	bl	_strncmp
	cbz	x0, LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh23:
	adrp	x25, l_.str.9@PAGE
Lloh24:
	add	x25, x25, l_.str.9@PAGEOFF
	mov	x0, x25
	bl	_strlen
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	bl	_strncmp
	mov	x25, x26
	mov	x26, x24
	mov	x24, x21
Lloh25:
	adrp	x21, l_.str.2@PAGE
Lloh26:
	add	x21, x21, l_.str.2@PAGEOFF
	cbnz	x0, LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	bl	_strdup
Lloh27:
	adrp	x8, _ibd_nd_format@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ibd_nd_format@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
Lloh29:
	adrp	x8, _ibd_ca_port@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ibd_ca_port@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
Lloh31:
	adrp	x8, _ibd_timeout@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ibd_timeout@GOTPAGEOFF]
LBB0_18:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x0, [x8]
	b	LBB0_5
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	bl	_val_str_true
Lloh33:
	adrp	x8, _IBND_CONFIG_MLX_EPI@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IBND_CONFIG_MLX_EPI@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x10, _ibd_ibnetdisc_flags@GOTPAGE
Lloh37:
	ldr	x10, [x10, _ibd_ibnetdisc_flags@GOTPAGEOFF]
	cbz	x0, LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x10]
	orr	w8, w9, w8
	str	w8, [x10]
	b	LBB0_5
LBB0_21:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	mov	w1, #0
	mov	w2, #0
	bl	_strtoull
Lloh38:
	adrp	x8, _ibd_mkey@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ibd_mkey@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	mov	w1, #0
	mov	w2, #0
	bl	_strtoull
Lloh40:
	adrp	x8, _ibd_sakey@GOTPAGE
Lloh41:
	ldr	x8, [x8, _ibd_sakey@GOTPAGEOFF]
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x0, [x8]
	mov	x25, x26
	mov	x26, x24
	mov	x24, x21
Lloh42:
	adrp	x21, l_.str.2@PAGE
Lloh43:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_24:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x10]
	bic	w8, w9, w8
	str	w8, [x10]
	b	LBB0_5
LBB0_25:
	mov	x0, x19
	bl	_fclose
LBB0_26:
	ldur	x8, [x29, #-96]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.27:
	add	sp, sp, #1056
	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_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.asciz	"\n"

l_.str.2:                               ; @.str.2
	.asciz	"="

l_.str.3:                               ; @.str.3
	.asciz	"CA"

	.comm	_ibd_ca,8,3                     ; @ibd_ca
l_.str.4:                               ; @.str.4
	.asciz	"Port"

	.comm	_ibd_ca_port,8,3                ; @ibd_ca_port
l_.str.5:                               ; @.str.5
	.asciz	"timeout"

	.comm	_ibd_timeout,8,3                ; @ibd_timeout
l_.str.6:                               ; @.str.6
	.asciz	"MLX_EPI"

	.comm	_IBND_CONFIG_MLX_EPI,4,2        ; @IBND_CONFIG_MLX_EPI
	.comm	_ibd_ibnetdisc_flags,4,2        ; @ibd_ibnetdisc_flags
l_.str.7:                               ; @.str.7
	.asciz	"m_key"

	.comm	_ibd_mkey,8,3                   ; @ibd_mkey
l_.str.8:                               ; @.str.8
	.asciz	"sa_key"

	.comm	_ibd_sakey,8,3                  ; @ibd_sakey
l_.str.9:                               ; @.str.9
	.asciz	"nd_format"

	.comm	_ibd_nd_format,8,3              ; @ibd_nd_format
.subsections_via_symbols
