	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getsize
_getsize:                               ## @getsize
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_DIRECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_opendev
	movl	%eax, %r15d
	leaq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	callq	_err
LBB0_2:
	movl	-40(%rbp), %ebx
	movl	%ebx, %edi
	callq	_S_ISREG
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	%ebx, %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movl	%r15d, %edi
	callq	_close
	movl	-36(%rbp), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%ebx, %edi
	callq	_S_ISCHR
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	%ebx, %edi
	callq	_S_ISBLK
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_EX_DATAERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_errx
LBB0_8:
	movq	_DIOCGMEDIASIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movl	%r15d, %edi
	callq	_ioctl
	testq	%rax, %rax
	jns	LBB0_10
## %bb.9:
	movq	_EX_UNAVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	callq	_err
LBB0_10:
	movl	%r15d, %edi
	callq	_close
	movl	-28(%rbp), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_DIRECT,4,2                   ## @O_DIRECT
	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fstat failed: %s"

	.comm	_EX_DATAERR,4,2                 ## @EX_DATAERR
L_.str.1:                               ## @.str.1
	.asciz	"invalid type of the file (not regular, directory nor special device): %s"

	.comm	_DIOCGMEDIASIZE,4,2             ## @DIOCGMEDIASIZE
	.comm	_EX_UNAVAILABLE,4,2             ## @EX_UNAVAILABLE
L_.str.2:                               ## @.str.2
	.asciz	"ioctl(DIOCGMEDIASIZE) failed, probably not a disk: %s"

	.no_dead_strip	_getsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getsize
_getsize:                               ; @getsize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_DIRECT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_DIRECT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_opendev
	mov	x20, x0
	add	x1, sp, #8
	bl	_fstat
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_2:
	ldr	w21, [sp, #8]
	mov	x0, x21
	bl	_S_ISREG
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_S_ISDIR
	cbz	x0, LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_close
	ldr	w0, [sp, #12]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	mov	x0, x21
	bl	_S_ISCHR
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x21
	bl	_S_ISBLK
	cbnz	w0, LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _EX_DATAERR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EX_DATAERR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_errx
LBB0_9:
Lloh16:
	adrp	x8, _DIOCGMEDIASIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DIOCGMEDIASIZE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x20
	bl	_ioctl
	tbz	x0, #63, LBB0_11
; %bb.10:
Lloh19:
	adrp	x8, _EX_UNAVAILABLE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EX_UNAVAILABLE@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_11:
	mov	x0, x20
	bl	_close
	ldr	w0, [sp, #4]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_DIRECT,4,2                   ; @O_DIRECT
	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fstat failed: %s"

	.comm	_EX_DATAERR,4,2                 ; @EX_DATAERR
l_.str.1:                               ; @.str.1
	.asciz	"invalid type of the file (not regular, directory nor special device): %s"

	.comm	_DIOCGMEDIASIZE,4,2             ; @DIOCGMEDIASIZE
	.comm	_EX_UNAVAILABLE,4,2             ; @EX_UNAVAILABLE
l_.str.2:                               ; @.str.2
	.asciz	"ioctl(DIOCGMEDIASIZE) failed, probably not a disk: %s"

	.no_dead_strip	_getsize
.subsections_via_symbols
