	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_url_normalize_path         ## -- Begin function h2o_url_normalize_path
	.p2align	4, 0x90
_h2o_url_normalize_path:                ## @h2o_url_normalize_path
	.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
	movq	_SIZE_MAX@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, (%rcx)
	movq	$0, (%r8)
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r14
	cmpb	$47, (%rsi)
	jne	LBB0_12
## %bb.2:
	leaq	(%r14,%r15), %rax
	movq	%r14, %rbx
	cmpq	$2, %r15
	jl	LBB0_11
## %bb.3:
	leaq	1(%r14), %rbx
	movb	$47, %dl
	cmpb	$47, %dl
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:
	cmpb	$37, %dl
	je	LBB0_12
## %bb.5:
	cmpb	$63, %dl
	jne	LBB0_7
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_6:
	cmpb	$46, (%rbx)
	je	LBB0_12
LBB0_7:
	leaq	1(%rbx), %rsi
	cmpq	%rax, %rsi
	jae	LBB0_11
## %bb.8:
	movb	(%rbx), %dl
	movq	%rsi, %rbx
	cmpb	$47, %dl
	jne	LBB0_4
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	cmpb	$63, (%rbx)
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %rbx
	jb	LBB0_9
	jmp	LBB0_22
LBB0_12:
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_rebuild_path
	movq	%rax, %r12
	movl	%edx, %ebx
	testl	%edx, %edx
	je	LBB0_18
## %bb.13:
	cmpb	$47, (%r12)
	jne	LBB0_18
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	callq	_H2O_STRLIT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_h2o_strstr
	cmpq	(%r13), %rax
	jne	LBB0_18
## %bb.15:
	cmpl	$3, %ebx
	jl	LBB0_24
## %bb.16:
	movl	%ebx, %eax
	leaq	(%r12,%rax), %rdi
	addq	$-3, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_18
LBB0_24:
	movq	%r12, %r14
	jmp	LBB0_23
LBB0_18:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	movq	%r12, %r8
	callq	_h2o_error_printf
LBB0_19:
	leaq	L_.str(%rip), %rdi
	movl	$1, %esi
	callq	_h2o_iovec_init
	movq	%rax, %r14
	movl	%edx, %ebx
	jmp	LBB0_23
LBB0_20:
	decq	%rbx
LBB0_21:
	movq	%rbx, %rax
	subq	%r14, %rax
	movq	%rax, (%rcx)
LBB0_22:
	subl	%r14d, %ebx
LBB0_23:
	movq	%r14, %rax
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"/../"

L_.str.2:                               ## @.str.2
	.asciz	"/.."

L_.str.3:                               ## @.str.3
	.asciz	"failed to normalize path: `%.*s` => `%.*s`\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_url_normalize_path         ; -- Begin function h2o_url_normalize_path
	.p2align	2
_h2o_url_normalize_path:                ; @h2o_url_normalize_path
	.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
	str	xzr, [x4]
Lloh0:
	adrp	x23, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SIZE_MAX@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x3]
	cbz	x2, LBB0_16
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	ldrb	w8, [x1]
	cmp	w8, #47
	b.ne	LBB0_10
; %bb.2:
	add	x9, x19, x20
	mov	x8, x19
	cmp	x20, #2
	b.lt	LBB0_18
; %bb.3:
	mov	x10, #0
	mov	w11, #47
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x19, x10
	and	w11, w11, #0xff
	cmp	w11, #47
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w11, #37
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w11, #63
	b.ne	LBB0_8
	b	LBB0_24
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w11, [x8, #1]
	cmp	w11, #46
	b.eq	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x11, x19, x10
	add	x12, x11, #2
	cmp	x12, x9
	b.hs	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrb	w11, [x8, #1]
	add	x10, x10, #1
	b	LBB0_4
LBB0_10:
	mov	x1, x19
	mov	x2, x20
	bl	_rebuild_path
	mov	x21, x0
	mov	x22, x1
	cbz	w22, LBB0_15
; %bb.11:
	ldrb	w8, [x21]
	cmp	w8, #47
	b.ne	LBB0_15
; %bb.12:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_H2O_STRLIT
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_h2o_strstr
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.13:
	and	x23, x22, #0xffffffff00000000
	cmp	w22, #3
	b.lt	LBB0_26
; %bb.14:
	add	x8, x21, w22, sxtw
	sub	x0, x8, #3
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #3
	bl	_memcmp
	cbnz	x0, LBB0_26
LBB0_15:
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	mov	x4, x21
	bl	_h2o_error_printf
LBB0_16:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #1
	bl	_h2o_iovec_init
	mov	x21, x0
	mov	x22, x1
	and	x23, x1, #0xffffffff00000000
	b	LBB0_26
LBB0_17:
	add	x8, x11, #1
LBB0_18:
	cmp	x8, x9
	b.hs	LBB0_25
; %bb.19:
	add	x9, x19, x20
	sub	x9, x9, x8
	add	x9, x8, x9
	neg	x10, x8
	neg	x11, x19
	sub	x12, x20, x8
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w13, [x8]
	cmp	w13, #63
	b.eq	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x8, #1
	sub	x10, x10, #1
	sub	x12, x12, #1
	cmp	x11, x12
	b.ne	LBB0_20
; %bb.22:
	mov	x8, x9
	b	LBB0_25
LBB0_23:
	neg	x8, x10
	add	x9, x19, x10
	neg	x9, x9
	str	x9, [x3]
	b	LBB0_25
LBB0_24:
	add	x8, x19, x10
	str	x10, [x3]
LBB0_25:
	mov	x23, #0
	sub	x22, x8, x19
	mov	x21, x19
LBB0_26:
	and	x8, x22, #0xffffffff
	orr	x1, x23, x8
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"/../"

l_.str.2:                               ; @.str.2
	.asciz	"/.."

l_.str.3:                               ; @.str.3
	.asciz	"failed to normalize path: `%.*s` => `%.*s`\n"

.subsections_via_symbols
