	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function disk_query_disk
_disk_query_disk:                       ## @disk_query_disk
	.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	$160, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r8
	cmpb	$0, (%r8)
	je	LBB0_8
## %bb.2:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	leaq	-160(%rbp), %r14
	movq	%r14, %rdi
	movl	$128, %esi
	callq	_snprintf
	movl	$0, 8(%rbx)
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_HRDBG
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r14d
	movq	_DIOCGMEDIASIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-164(%rbp), %rdx
	movl	%r14d, %edi
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movl	-164(%rbp), %eax
	leal	1023(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$10, %ecx
	movl	%ecx, -164(%rbp)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovgel	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movl	12(%rbx), %edi
	movq	(%rbx), %rsi
	callq	_partition_tbl_handle_disk
	jmp	LBB0_7
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	leaq	-160(%rbp), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_HRDBG
	jmp	LBB0_8
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	leaq	-160(%rbp), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_HRDBG
LBB0_7:
	movl	%r14d, %edi
	callq	_close
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$160, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,8,3                  ## @_PATH_DEV
L_.str.1:                               ## @.str.1
	.asciz	"OPENING device %s"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.2:                               ## @.str.2
	.asciz	"OPEN device %s failed: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_DIOCGMEDIASIZE,4,2             ## @DIOCGMEDIASIZE
L_.str.3:                               ## @.str.3
	.asciz	"DIOCGMEDIASIZE for device %s failed: %s"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_disk_query_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function disk_query_disk
_disk_query_disk:                       ; @disk_query_disk
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x4, [x0]
	ldrb	w8, [x4]
	cbz	w8, LBB0_8
; %bb.2:
Lloh3:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh5:
	ldr	x3, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #24
	mov	w1, #128
	bl	_snprintf
	str	wzr, [x19, #8]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #24
	bl	_HRDBG
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
	add	x0, sp, #24
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
	mov	x20, x0
Lloh16:
	adrp	x8, _DIOCGMEDIASIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DIOCGMEDIASIZE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_ioctl
	tbnz	x0, #63, LBB0_6
; %bb.4:
	ldr	w8, [sp, #20]
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #10
	str	w8, [sp, #20]
Lloh19:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	str	w8, [x19, #8]
	ldr	w0, [x19, #12]
	ldr	x1, [x19]
	bl	_partition_tbl_handle_disk
	b	LBB0_7
LBB0_5:
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #24
	bl	_HRDBG
	b	LBB0_8
LBB0_6:
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #24
	bl	_HRDBG
LBB0_7:
	mov	x0, x20
	bl	_close
LBB0_8:
	ldur	x8, [x29, #-24]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,8,3                  ; @_PATH_DEV
l_.str.1:                               ; @.str.1
	.asciz	"OPENING device %s"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.2:                               ; @.str.2
	.asciz	"OPEN device %s failed: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_DIOCGMEDIASIZE,4,2             ; @DIOCGMEDIASIZE
l_.str.3:                               ; @.str.3
	.asciz	"DIOCGMEDIASIZE for device %s failed: %s"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_disk_query_disk
.subsections_via_symbols
