	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tcc_open_bf                    ## -- Begin function tcc_open_bf
	.p2align	4, 0x90
_tcc_open_bf:                           ## @tcc_open_bf
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	%edx, %edi
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_IO_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_2:
	addl	$64, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	48(%rax), %rax
	movq	%rax, 56(%rbx)
	movslq	%r12d, %rcx
	leaq	(%rax,%rcx,4), %rdx
	movq	%rdx, 40(%rbx)
	movq	_CH_EOB@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rax,%rcx,4)
	movl	32(%rbx), %edi
	movl	$4, %esi
	movq	%r15, %rdx
	callq	_pstrcpy
	movl	$1, (%rbx)
	movq	$0, 24(%rbx)
	movl	(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	$-1, 4(%rbx)
	movq	_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
	movq	%rbx, (%rax)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_BUF_SIZE,4,2                ## @IO_BUF_SIZE
	.comm	_CH_EOB,4,2                     ## @CH_EOB
	.comm	_file,8,3                       ## @file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tcc_open_bf
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_tcc_open_bf
	.p2align	2
_tcc_open_bf:                           ; @tcc_open_bf
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _IO_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_BUF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w8, w8, w2, eq
	add	w0, w8, #64
	bl	_malloc
	mov	x22, x0
	ldr	x8, [x0, #48]
	str	x8, [x0, #56]
	sbfiz	x9, x19, #2, #32
	add	x10, x8, x9
	str	x10, [x0, #40]
Lloh3:
	adrp	x10, _CH_EOB@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CH_EOB@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	str	w10, [x8, x9]
	ldr	w0, [x0, #32]
	mov	w1, #4
	mov	x2, x20
	bl	_pstrcpy
	str	xzr, [x22, #24]
	ldr	w8, [x21]
	str	w8, [x22, #16]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x22]
Lloh8:
	adrp	x8, _file@GOTPAGE
Lloh9:
	ldr	x8, [x8, _file@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x22, #8]
	str	x22, [x8]
	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	Lloh8, Lloh9
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_BUF_SIZE,4,2                ; @IO_BUF_SIZE
	.comm	_CH_EOB,4,2                     ; @CH_EOB
	.comm	_file,8,3                       ; @file
.subsections_via_symbols
