	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkbuffer
_mkbuffer:                              ## @mkbuffer
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_BUFSIZ@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	%r14d, %edi
	callq	_malloc
	movq	%rax, %r15
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%r15, %r15
	setne	%al
	testq	%rbx, %rbx
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%r12, 16(%rbx)
	movq	%r15, (%rbx)
	movq	_mf_filebuffers@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
	movq	%rbx, (%rax)
	movq	%r12, %rdi
	callq	_fileno
	cmpl	$2, %eax
	jne	LBB0_2
## %bb.1:
	movq	__IONBF@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	%r12, %rdi
	callq	_fileno
	movl	%eax, %edi
	callq	_isatty
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:
	movq	__IOFBF@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	__IOLBF@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rcx
	callq	_setvbuf
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFSIZ,8,3                     ## @BUFSIZ
	.comm	_mf_filebuffers,8,3             ## @mf_filebuffers
	.comm	__IONBF,4,2                     ## @_IONBF
	.comm	__IOLBF,4,2                     ## @_IOLBF
	.comm	__IOFBF,4,2                     ## @_IOFBF
	.no_dead_strip	_mkbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkbuffer
_mkbuffer:                              ; @mkbuffer
	.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, x0
Lloh0:
	adrp	x8, _BUFSIZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUFSIZ@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	x0, x19
	bl	_malloc
	mov	x21, x0
	mov	w0, #24
	bl	_malloc
	mov	x22, x0
	cmp	x21, #0
	ccmp	x0, #0, #4, ne
	cset	w0, ne
	bl	_assert
	str	x21, [x22]
Lloh3:
	adrp	x8, _mf_filebuffers@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mf_filebuffers@GOTPAGEOFF]
	ldr	x9, [x8]
	stp	x9, x20, [x22, #8]
	str	x22, [x8]
	mov	x0, x20
	bl	_fileno
	cmp	w0, #2
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, __IONBF@GOTPAGE
Lloh6:
	ldr	x8, [x8, __IONBF@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_fileno
	bl	_isatty
Lloh7:
	adrp	x8, __IOLBF@GOTPAGE
Lloh8:
	ldr	x8, [x8, __IOLBF@GOTPAGEOFF]
Lloh9:
	adrp	x9, __IOFBF@GOTPAGE
Lloh10:
	ldr	x9, [x9, __IOFBF@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_3:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x19
	bl	_setvbuf
	cmp	w0, #0
	cset	w0, eq
	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
	b	_assert
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFSIZ,8,3                     ; @BUFSIZ
	.comm	_mf_filebuffers,8,3             ; @mf_filebuffers
	.comm	__IONBF,4,2                     ; @_IONBF
	.comm	__IOLBF,4,2                     ; @_IOLBF
	.comm	__IOFBF,4,2                     ; @_IOFBF
	.no_dead_strip	_mkbuffer
.subsections_via_symbols
