	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loadboot
_loadboot:                              ## @loadboot
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	(%rsi), %r15
	movq	$0, -72(%rbp)
	cmpl	$3, %edi
	je	LBB0_3
## %bb.1:
	cmpl	$1, %edi
	jne	LBB0_11
## %bb.2:
	movl	$0, -64(%rbp)
	xorl	%eax, %eax
LBB0_9:
	movq	%rax, -56(%rbp)
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_14
## %bb.16:
	movl	%eax, %r14d
	leaq	-72(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_17
## %bb.19:
	movl	-72(%rbp), %esi
	movl	%esi, -40(%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, -48(%rbp)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_18
LBB0_3:
	movq	%rsi, %rbx
	movq	8(%rsi), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_12
## %bb.6:
	movl	$1, -64(%rbp)
	jmp	LBB0_7
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	callq	_warnx
	jmp	LBB0_12
LBB0_10:
	movq	_CHELSIO_T4_LOAD_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_doit
	movl	%eax, %ebx
	jmp	LBB0_22
LBB0_4:
	movl	$0, -64(%rbp)
LBB0_7:
	movq	16(%rbx), %rdi
	leaq	-80(%rbp), %rsi
	xorl	%edx, %edx
	callq	_str_to_number
	cmpb	$0, (%rax)
	je	LBB0_8
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_22
LBB0_14:
	leaq	L_.str.4(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_warn
	jmp	LBB0_15
LBB0_8:
	movq	-80(%rbp), %rax
	jmp	LBB0_9
LBB0_17:
	leaq	L_.str.5(%rip), %rdi
LBB0_18:
	xorl	%eax, %eax
	callq	_warn
	movl	%r14d, %edi
	callq	_close
LBB0_15:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_22
LBB0_21:
	movq	_CHELSIO_T4_LOAD_BOOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_doit
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	movl	-40(%rbp), %esi
	callq	_munmap
	movl	%r14d, %edi
	callq	_close
LBB0_22:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pf"

L_.str.1:                               ## @.str.1
	.asciz	"offset"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"loadboot: incorrect number of arguments."

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

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

	.comm	_errno,4,2                      ## @errno
L_.str.5:                               ## @.str.5
	.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.6:                               ## @.str.6
	.asciz	"mmap"

	.no_dead_strip	_loadboot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loadboot
_loadboot:                              ; @loadboot
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	ldr	x19, [x1]
	str	xzr, [sp, #8]
	cmp	w0, #3
	b.eq	LBB0_8
; %bb.1:
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.2:
	mov	x8, #0
	str	wzr, [sp, #16]
LBB0_3:
	str	x8, [sp, #24]
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.4:
Lloh2:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	tbnz	w0, #31, LBB0_16
; %bb.5:
	mov	x20, x0
	add	x1, sp, #8
	bl	_fstat
	tbnz	x0, #63, LBB0_18
; %bb.6:
	ldr	w1, [sp, #8]
	str	w1, [sp, #40]
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, x20
	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_21
; %bb.7:
Lloh14:
	adrp	x0, l_.str.6@PAGE
Lloh15:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_19
LBB0_8:
	mov	x20, x1
	ldr	x0, [x1, #8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.9:
	ldr	x0, [x20, #8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_15
; %bb.10:
	mov	w8, #1
	str	w8, [sp, #16]
	b	LBB0_14
LBB0_11:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warnx
	b	LBB0_15
LBB0_12:
Lloh22:
	adrp	x8, _CHELSIO_T4_LOAD_BOOT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CHELSIO_T4_LOAD_BOOT@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_doit
	mov	x19, x0
	b	LBB0_22
LBB0_13:
	str	wzr, [sp, #16]
LBB0_14:
	ldr	x0, [x20, #16]
	sub	x1, x29, #24
	mov	x2, #0
	bl	_str_to_number
	ldrb	w8, [x0]
	cbz	w8, LBB0_17
LBB0_15:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w19, [x8]
	b	LBB0_22
LBB0_16:
	str	x19, [sp]
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
	b	LBB0_20
LBB0_17:
	ldur	x8, [x29, #-24]
	b	LBB0_3
LBB0_18:
Lloh30:
	adrp	x0, l_.str.5@PAGE
Lloh31:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_19:
	bl	_warn
	mov	x0, x20
	bl	_close
LBB0_20:
Lloh32:
	adrp	x8, _errno@GOTPAGE
Lloh33:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh34:
	ldr	w19, [x8]
	b	LBB0_22
LBB0_21:
Lloh35:
	adrp	x8, _CHELSIO_T4_LOAD_BOOT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CHELSIO_T4_LOAD_BOOT@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_doit
	mov	x19, x0
	ldr	x0, [sp, #32]
	ldr	w1, [sp, #40]
	bl	_munmap
	mov	x0, x20
	bl	_close
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	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 AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pf"

l_.str.1:                               ; @.str.1
	.asciz	"offset"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"loadboot: incorrect number of arguments."

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

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

	.comm	_errno,4,2                      ; @errno
l_.str.5:                               ; @.str.5
	.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.6:                               ; @.str.6
	.asciz	"mmap"

	.no_dead_strip	_loadboot
.subsections_via_symbols
