	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loadcfg
_loadcfg:                               ## @loadcfg
	.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
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	$0, -32(%rbp)
	movq	(%rsi), %rbx
	movq	$0, -24(%rbp)
	cmpl	$1, %edi
	jne	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movl	%eax, %r14d
	leaq	-24(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_8
## %bb.10:
	movl	-24(%rbp), %esi
	andl	$-4, %esi
	movl	%esi, -48(%rbp)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, -40(%rbp)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movq	_CHELSIO_T4_LOAD_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_doit
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_warn
	movl	%r14d, %edi
	callq	_close
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_12:
	movq	_CHELSIO_T4_LOAD_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_doit
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	movl	-48(%rbp), %esi
	callq	_munmap
	movl	%r14d, %edi
	callq	_close
LBB0_13:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"loadcfg: incorrect number of arguments."

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"clear"

	.comm	_CHELSIO_T4_LOAD_CFG,4,2        ## @CHELSIO_T4_LOAD_CFG
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.2:                               ## @.str.2
	.asciz	"open(%s)"

	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"fstat"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.4:                               ## @.str.4
	.asciz	"mmap"

	.no_dead_strip	_loadcfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loadcfg
_loadcfg:                               ; @loadcfg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	stp	xzr, xzr, [sp, #24]
	str	xzr, [sp, #40]
	ldr	x20, [x1]
	str	xzr, [sp, #16]
	cmp	w0, #1
	b.ne	LBB0_6
; %bb.1:
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.2:
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_open
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x19, x0
	add	x1, sp, #16
	bl	_fstat
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldr	w8, [sp, #16]
	and	w1, w8, #0xfffffffc
	str	w1, [sp, #24]
Lloh5:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	w0, #0
	mov	x4, x19
	mov	w5, #0
	bl	_mmap
	str	x0, [sp, #32]
Lloh11:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.5:
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_7:
Lloh21:
	adrp	x8, _CHELSIO_T4_LOAD_CFG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CHELSIO_T4_LOAD_CFG@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	add	x1, sp, #24
	bl	_doit
	mov	x20, x0
	b	LBB0_13
LBB0_8:
	str	x20, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_11
LBB0_9:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_warn
	mov	x0, x19
	bl	_close
LBB0_11:
Lloh28:
	adrp	x8, _errno@GOTPAGE
Lloh29:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	b	LBB0_13
LBB0_12:
Lloh31:
	adrp	x8, _CHELSIO_T4_LOAD_CFG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CHELSIO_T4_LOAD_CFG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	add	x1, sp, #24
	bl	_doit
	mov	x20, x0
	ldr	x0, [sp, #32]
	ldr	w1, [sp, #24]
	bl	_munmap
	mov	x0, x19
	bl	_close
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loadcfg: incorrect number of arguments."

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"clear"

	.comm	_CHELSIO_T4_LOAD_CFG,4,2        ; @CHELSIO_T4_LOAD_CFG
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.2:                               ; @.str.2
	.asciz	"open(%s)"

	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"fstat"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.4:                               ; @.str.4
	.asciz	"mmap"

	.no_dead_strip	_loadcfg
.subsections_via_symbols
