	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_stdio                   ## -- Begin function create_stdio
	.p2align	4, 0x90
_create_stdio:                          ## @create_stdio
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	_O_RDWR_@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_generic_open
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	callq	_adhoc_fd_create
	movq	%rax, %rbx
	movl	%r12d, %edi
	movl	%r15d, %esi
	callq	_dev_make
	movl	%eax, 16(%rbx)
	movq	_S_IFCHR@GOTPCREL(%rip), %rax
	movq	_S_IRUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 12(%rbx)
	movl	(%r13), %eax
	movl	%eax, 8(%rbx)
	movq	_DEV_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	%r15d, %esi
	movq	%rbx, %rcx
	callq	_dev_open
	testl	%eax, %eax
	js	LBB0_2
LBB0_3:
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_fd_retain
	movq	_current@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
	callq	_fd_retain
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_fd_retain
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx)
	jmp	LBB0_4
LBB0_2:
	movl	%eax, %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR_,4,2                    ## @O_RDWR_
	.comm	_S_IFCHR,4,2                    ## @S_IFCHR
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_DEV_CHAR,4,2                   ## @DEV_CHAR
	.comm	_current,8,3                    ## @current
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_create_stdio                   ; -- Begin function create_stdio
	.p2align	2
_create_stdio:                          ; @create_stdio
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x22, _O_RDWR_@GOTPAGE
Lloh1:
	ldr	x22, [x22, _O_RDWR_@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #0
	bl	_generic_open
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, #0
	bl	_adhoc_fd_create
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_dev_make
Lloh2:
	adrp	x8, _S_IFCHR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_IFCHR@GOTPAGEOFF]
	str	w0, [x19, #16]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _S_IRUSR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _S_IRUSR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x22]
	stp	w9, w8, [x19, #8]
Lloh8:
	adrp	x8, _DEV_CHAR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DEV_CHAR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_dev_open
	tbnz	w0, #31, LBB0_3
LBB0_2:
	str	xzr, [x19]
	mov	x0, x19
	bl	_fd_retain
Lloh11:
	adrp	x20, _current@GOTPAGE
Lloh12:
	ldr	x20, [x20, _current@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	x0, [x8]
	mov	x0, x19
	bl	_fd_retain
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	x0, [x8, #8]
	mov	x0, x19
	bl	_fd_retain
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	x9, [x9]
	str	x8, [x9, #16]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR_,4,2                    ; @O_RDWR_
	.comm	_S_IFCHR,4,2                    ; @S_IFCHR
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_DEV_CHAR,4,2                   ; @DEV_CHAR
	.comm	_current,8,3                    ; @current
.subsections_via_symbols
