	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpart_bootfile_read
_gpart_bootfile_read:                   ## @gpart_bootfile_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-56(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	movl	-48(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_6:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	jle	LBB0_9
## %bb.7:
	cmpq	%rcx, %rbx
	jle	LBB0_9
## %bb.8:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_9:
	movq	%rbx, (%r15)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_11:
	movq	(%r15), %rbx
	movq	%rbx, %rdi
	callq	_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_err
	movq	(%r15), %rbx
LBB0_13:
	movl	%r12d, %edi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_read
	cmpq	(%r15), %rax
	je	LBB0_15
## %bb.14:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_15:
	movl	%r12d, %edi
	callq	_close
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"%s: not a regular file"

L_.str.2:                               ## @.str.2
	.asciz	"%s: empty file"

L_.str.3:                               ## @.str.3
	.asciz	"%s: file too big (%zu limit)"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.no_dead_strip	_gpart_bootfile_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpart_bootfile_read
_gpart_bootfile_read:                   ; @gpart_bootfile_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	add	x1, sp, #16
	bl	_stat
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	ldr	w0, [sp, #24]
	bl	_S_ISREG
	cbz	w0, LBB0_14
; %bb.3:
	ldr	x21, [sp, #16]
	cbz	x21, LBB0_15
LBB0_4:
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.5:
	cmp	x21, x8
	b.le	LBB0_7
; %bb.6:
Lloh5:
	adrp	x9, _EXIT_FAILURE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EXIT_FAILURE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_errx
LBB0_7:
	str	x21, [x20]
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh13:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_9:
	ldr	x23, [x20]
	mov	x0, x23
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_err
	ldr	x23, [x20]
LBB0_11:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_read
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
Lloh21:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_13:
	mov	x0, x21
	bl	_close
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_14:
Lloh26:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_errx
	ldr	x21, [sp, #16]
	cbnz	x21, LBB0_4
LBB0_15:
Lloh31:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_errx
	b	LBB0_4
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"%s: not a regular file"

l_.str.2:                               ; @.str.2
	.asciz	"%s: empty file"

l_.str.3:                               ; @.str.3
	.asciz	"%s: file too big (%zu limit)"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.no_dead_strip	_gpart_bootfile_read
.subsections_via_symbols
