	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_bind
_http_bind:                             ## @http_bind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edx, %eax
	movq	%rsi, %rbx
	movq	(%rsi), %rdx
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_evhttp_bind_socket_with_handle
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	callq	_evhttp_bind_socket_with_handle
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_event_errx
	xorl	%eax, %eax
LBB0_5:
	movq	%rax, %rdi
	callq	_evhttp_bound_socket_get_fd
	movl	%eax, %edi
	callq	_regress_get_socket_port
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movl	%eax, %eax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"::1"

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

L_.str.2:                               ## @.str.2
	.asciz	"Could not start web server"

	.no_dead_strip	_http_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_bind
_http_bind:                             ; @http_bind
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x8, x2
	mov	x19, x1
	ldr	x2, [x1]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_evhttp_bind_socket_with_handle
	cbnz	x0, LBB0_4
	b	LBB0_6
LBB0_2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_evhttp_bind_socket_with_handle
	cbnz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_event_errx
	mov	x0, #0
LBB0_4:
	bl	_evhttp_bound_socket_get_fd
	bl	_regress_get_socket_port
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	mov	w8, w8
	str	x8, [x19]
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"::1"

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

l_.str.2:                               ; @.str.2
	.asciz	"Could not start web server"

	.no_dead_strip	_http_bind
.subsections_via_symbols
