	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_source_new                     ## -- Begin function source_new
	.p2align	4, 0x90
_source_new:                            ## @source_new
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r15d
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	cmpb	$47, (%rbx)
	jne	LBB0_4
LBB0_2:
	xorl	%r13d, %r13d
	movq	%rbx, %r14
	jmp	LBB0_8
LBB0_4:
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leal	(%r14,%rax), %edx
	addl	$2, %edx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.5:
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_strcpy
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %eax
	cmpb	$47, (%r14,%rax)
	je	LBB0_7
## %bb.6:
	movl	%ecx, %eax
	incl	%ecx
	movb	$47, (%r14,%rax)
LBB0_7:
	movl	%ecx, %eax
	movq	%r14, %rdi
	addq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	movq	%r14, %r13
LBB0_8:
	movq	_rb_module@GOTPCREL(%rip), %rax
	movq	%r12, (%rax)
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_source_find
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_20
LBB0_10:
	movq	%r13, %rbx
	movq	%r14, %rdi
	callq	_strlen
	movslq	%eax, %r13
	incq	%r13
	movl	8(%r12), %r15d
	leal	(%r15,%r13), %esi
	movl	12(%r12), %edi
	movq	(%r12), %rax
	cmpl	%edi, %esi
	jl	LBB0_17
## %bb.11:
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	addl	%edi, %edi
	addl	$256, %esi                      ## imm = 0x100
	andl	$-256, %esi
	callq	_max
	movl	%eax, 12(%r12)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	(%r12), %rdx
	movl	12(%r12), %ecx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapReAlloc
	testq	%rax, %rax
	je	LBB0_15
LBB0_16:
	movq	%rax, (%r12)
	movl	8(%r12), %r15d
LBB0_17:
	movslq	%r15d, %rdi
	addq	%rax, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movslq	8(%r12), %rax
	addq	%r13, %rax
	movl	%eax, 8(%r12)
	movq	(%r12), %rcx
	movb	$0, (%rcx,%rax)
	leaq	20(%r12), %rdi
	movl	$8, %esi
	callq	_pool_alloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	%r15d, (%rax)
	addq	$16, %r12
	addq	$4, %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_wine_rb_put
	jmp	LBB0_19
LBB0_12:
	addl	$256, %esi                      ## imm = 0x100
	andl	$-256, %esi
	movl	%esi, 12(%r12)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	12(%r12), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	jne	LBB0_16
LBB0_15:
	movl	$-1, %r15d
LBB0_19:
	movq	%rbx, %r13
LBB0_20:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
LBB0_21:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rb_module,8,3                  ## @rb_module
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_source_new                     ; -- Begin function source_new
	.p2align	2
_source_new:                            ; @source_new
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x2, LBB0_16
; %bb.1:
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	cbz	x1, LBB0_3
; %bb.2:
	ldrb	w8, [x22]
	cmp	w8, #47
	b.ne	LBB0_4
LBB0_3:
	mov	x21, #0
	mov	x20, x22
	b	LBB0_8
LBB0_4:
	mov	x0, x23
	bl	_strlen
	mov	x21, x0
	bl	_GetProcessHeap
	mov	x20, x0
	mov	x0, x22
	bl	_strlen
	add	w8, w21, w0
	add	w2, w8, #2
	mov	x0, x20
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_16
; %bb.5:
	mov	x20, x0
	mov	x1, x23
	bl	_strcpy
	sub	w8, w21, #1
	ldrb	w8, [x20, w8, uxtw]
	cmp	w8, #47
	b.eq	LBB0_7
; %bb.6:
	mov	w8, #47
	strb	w8, [x20, w21, uxtw]
	add	w21, w21, #1
LBB0_7:
	add	x0, x20, w21, uxtw
	mov	x1, x22
	bl	_strcpy
	mov	x21, x20
LBB0_8:
Lloh0:
	adrp	x8, _rb_module@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rb_module@GOTPAGEOFF]
Lloh2:
	str	x19, [x8]
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_source_find
	mov	x22, x0
	cmn	w0, #1
	b.ne	LBB0_19
LBB0_10:
	mov	x0, x20
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x23, x8, #1
	ldp	w22, w9, [x19, #8]
	ldr	x0, [x19]
	add	w8, w22, w23
	cmp	w8, w9
	b.lt	LBB0_14
; %bb.11:
	cbz	x0, LBB0_17
; %bb.12:
	lsl	w0, w9, #1
	add	w8, w8, #256
	and	w1, w8, #0xffffff00
	bl	_max
	str	w0, [x19, #12]
	bl	_GetProcessHeap
	ldr	x2, [x19]
	ldr	w3, [x19, #12]
	mov	w1, #0
	bl	_HeapReAlloc
	cbz	x0, LBB0_18
LBB0_13:
	str	x0, [x19]
	ldr	w22, [x19, #8]
LBB0_14:
	add	x0, x0, w22, sxtw
	mov	x1, x20
	mov	x2, x23
	bl	_memcpy
	ldrsw	x8, [x19, #8]
	add	x8, x8, x23
	str	w8, [x19, #8]
	ldr	x9, [x19]
	strb	wzr, [x9, x8]
	add	x0, x19, #20
	mov	w1, #8
	bl	_pool_alloc
	cbz	x0, LBB0_19
; %bb.15:
	mov	x2, x0
	str	w22, [x2], #4
	add	x0, x19, #16
	mov	x1, x20
	bl	_wine_rb_put
	b	LBB0_19
LBB0_16:
	mov	w22, #-1
	b	LBB0_20
LBB0_17:
	add	w8, w8, #256
	and	w8, w8, #0xffffff00
	str	w8, [x19, #12]
	bl	_GetProcessHeap
	ldr	w2, [x19, #12]
	mov	w1, #0
	bl	_HeapAlloc
	cbnz	x0, LBB0_13
LBB0_18:
	mov	w22, #-1
LBB0_19:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapFree
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_rb_module,8,3                  ; @rb_module
.subsections_via_symbols
