	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g_device_path_open
_g_device_path_open:                    ## @g_device_path_open
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movl	$-1, (%r14)
LBB0_2:
	testl	%r15d, %r15d
	jne	LBB0_4
## %bb.3:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_strdup
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_12
LBB0_7:
	movl	%r12d, %edi
	callq	_g_sectorsize
	cmpl	$-1, %eax
	je	LBB0_16
## %bb.8:
	testq	%r14, %r14
	je	LBB0_17
## %bb.9:
	movl	%r12d, (%r14)
	jmp	LBB0_18
LBB0_10:
	cmpb	$47, (%rbx)
	je	LBB0_11
## %bb.13:
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdi
	movq	%rbx, %rcx
	callq	_asprintf
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.14:
	testl	%r15d, %r15d
	jne	LBB0_21
## %bb.15:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_12:
	movl	%r12d, %edi
	callq	_close
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_16:
	movq	-40(%rbp), %rdi
	callq	_free
	movl	%r12d, %edi
	callq	_close
	movq	_EFTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_17:
	movl	%r12d, %edi
	callq	_close
LBB0_18:
	movq	-40(%rbp), %rax
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %esi
	callq	_open
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.23:
	movq	-40(%rbp), %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,4,2                  ## @_PATH_DEV
	.comm	_EFTYPE,4,2                     ## @EFTYPE
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_g_device_path_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g_device_path_open
_g_device_path_open:                    ; @g_device_path_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	w8, #-1
	str	w8, [x19]
LBB0_2:
Lloh0:
	adrp	x23, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _O_RDWR@GOTPAGEOFF]
Lloh2:
	adrp	x24, _O_RDONLY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _O_RDONLY@GOTPAGEOFF]
	cmp	w21, #0
	csel	x8, x24, x23, eq
	ldr	w1, [x8]
	mov	x0, x22
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
	mov	x20, x0
	mov	x0, x22
	bl	_strdup
	str	x0, [sp, #8]
	cbz	x0, LBB0_9
LBB0_4:
	mov	x0, x20
	bl	_g_sectorsize
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.5:
	cbz	x19, LBB0_14
; %bb.6:
	str	w20, [x19]
	b	LBB0_15
LBB0_7:
	ldrb	w8, [x22]
	cmp	w8, #47
	b.ne	LBB0_10
; %bb.8:
	mov	x0, #0
	b	LBB0_16
LBB0_9:
	mov	x0, x20
	bl	_close
	mov	x0, #0
	b	LBB0_16
LBB0_10:
Lloh4:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	x3, x22
	bl	_asprintf
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_16
; %bb.11:
	cmp	w21, #0
	csel	x8, x24, x23, eq
	ldr	w1, [x8]
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.12:
	ldr	x0, [sp, #8]
	bl	_free
	mov	x0, #0
	b	LBB0_16
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_free
	mov	x0, x20
	bl	_close
	mov	x0, #0
Lloh9:
	adrp	x8, _EFTYPE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFTYPE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	b	LBB0_16
LBB0_14:
	mov	x0, x20
	bl	_close
LBB0_15:
	ldr	x0, [sp, #8]
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	__PATH_DEV,4,2                  ; @_PATH_DEV
	.comm	_EFTYPE,4,2                     ; @EFTYPE
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_g_device_path_open
.subsections_via_symbols
