	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_hostname
_get_hostname:                          ## @get_hostname
	.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
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.1:
	movl	$47, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movq	%rax, %rbx
	cmpb	$47, 1(%rax)
	jne	LBB0_13
## %bb.3:
	leaq	2(%rbx), %r14
	movq	%r14, %rdi
	movl	$47, %esi
	callq	_os_strchr
	movq	%rax, %r15
	movq	%r14, %rdi
	movl	$58, %esi
	callq	_os_strchr
	testq	%rax, %rax
	movq	%r15, %rcx
	cmovneq	%rax, %rcx
	testq	%r15, %r15
	cmovneq	%r15, %rcx
	cmpq	%r15, %rax
	movq	%rcx, %r12
	cmovbq	%rax, %r12
	testq	%rax, %rax
	cmoveq	%rcx, %r12
	testq	%r15, %r15
	cmoveq	%rcx, %r12
	testq	%r12, %r12
	je	LBB0_8
## %bb.4:
	decq	%r12
	jmp	LBB0_11
LBB0_8:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$0, 1(%rbx,%rax)
	leaq	1(%rax), %rax
	jne	LBB0_9
## %bb.10:
	cmpq	$3, %rax
	adcq	$-1, %rbx
	addq	%rax, %rbx
	movq	%rbx, %r12
LBB0_11:
	subq	%r14, %r12
	leal	2(%r12), %edi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, %rbx
	leaq	1(%r12), %rdx
	movq	%rax, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movb	$0, 1(%rbx,%r12)
	jmp	LBB0_14
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_hostname
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_hostname
_get_hostname:                          ; @get_hostname
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	w1, #47
	bl	_os_strchr
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.2:
	ldrb	w8, [x20, #1]
	cmp	w8, #47
	b.ne	LBB0_9
; %bb.3:
	add	x19, x20, #2
	mov	x0, x19
	mov	w1, #47
	bl	_os_strchr
	mov	x21, x0
	mov	x0, x19
	mov	w1, #58
	bl	_os_strchr
	cmp	x0, #0
	cset	w8, ne
	cmp	x0, x21
	cset	w9, lo
	cmp	x21, #0
	cset	w10, ne
	and	w10, w10, w8
	and	w9, w10, w9
	cset	w10, eq
	and	w8, w10, w8
	orr	w8, w9, w8
	cmp	w8, #0
	csel	x8, x0, x21, ne
	cbnz	x8, LBB0_7
; %bb.4:
	mov	w8, #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x20, x8]
	add	x8, x8, #1
	cbnz	w9, LBB0_5
; %bb.6:
	sub	x9, x8, #1
	cmp	x9, #2
	cset	w9, hi
	sub	x9, x20, x9
	add	x8, x9, x8
LBB0_7:
	sub	x8, x8, #1
	sub	x21, x8, x19
	add	w0, w21, #2
	bl	_os_malloc
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.8:
	add	x21, x21, #1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_os_memcpy
	strb	wzr, [x20, x21]
	b	LBB0_10
LBB0_9:
	mov	x20, #0
LBB0_10:
	mov	x0, x20
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_hostname
.subsections_via_symbols
