	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sem_wait                   ## -- Begin function sys_sem_wait
	.p2align	4, 0x90
_sys_sem_wait:                          ## @sys_sem_wait
	.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
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_sys_arch_timeouts
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	_MEMP_SYS_TIMEOUT@GOTPCREL(%rip), %r12
	movq	_SYS_DEBUG@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_sys_arch_timeouts
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_sys_arch_sem_wait
	movq	_SYS_ARCH_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rsi
	movq	24(%rsi), %rax
	movq	%rax, (%rbx)
	movq	8(%rsi), %rbx
	movq	16(%rsi), %r15
	movl	(%r12), %edi
	callq	_memp_free
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_LWIP_DEBUGF
	movq	%rbx, %rdi
	callq	*%r15
	jmp	LBB0_7
LBB0_8:
	movl	%r14d, %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sys_arch_sem_wait              ## TAILCALL
LBB0_9:
	movq	(%rbx), %rcx
	movq	(%rcx), %rdx
	subq	%rax, %rdx
	jge	LBB0_10
## %bb.11:
	movq	$0, (%rcx)
	jmp	LBB0_12
LBB0_10:
	movq	%rdx, (%rcx)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_ARCH_TIMEOUT,8,3           ## @SYS_ARCH_TIMEOUT
	.comm	_MEMP_SYS_TIMEOUT,4,2           ## @MEMP_SYS_TIMEOUT
	.comm	_SYS_DEBUG,4,2                  ## @SYS_DEBUG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_sem_wait                   ; -- Begin function sys_sem_wait
	.p2align	2
_sys_sem_wait:                          ; @sys_sem_wait
	.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
	mov	x19, x0
	bl	_sys_arch_timeouts
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _SYS_ARCH_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SYS_ARCH_TIMEOUT@GOTPAGEOFF]
Lloh2:
	adrp	x22, _MEMP_SYS_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MEMP_SYS_TIMEOUT@GOTPAGEOFF]
Lloh4:
	adrp	x23, _SYS_DEBUG@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SYS_DEBUG@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_sys_arch_timeouts
	mov	x20, x0
	cbz	x0, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x8]
	cmp	x1, #1
	b.lt	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_sys_arch_sem_wait
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x20]
	ldr	x8, [x1, #24]
	str	x8, [x20]
	ldp	x20, x24, [x1, #8]
	ldr	w0, [x22]
	bl	_memp_free
	cbz	x24, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x23]
	mov	x1, x20
	bl	_LWIP_DEBUGF
	mov	x0, x20
	blr	x24
	b	LBB0_2
LBB0_8:
	mov	x0, x19
	mov	x1, #0
	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
	b	_sys_arch_sem_wait
LBB0_9:
	ldr	x8, [x20]
	ldr	x9, [x8]
	subs	x9, x9, x0
	b.ge	LBB0_11
; %bb.10:
	str	xzr, [x8]
	b	LBB0_12
LBB0_11:
	str	x9, [x8]
LBB0_12:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_ARCH_TIMEOUT,8,3           ; @SYS_ARCH_TIMEOUT
	.comm	_MEMP_SYS_TIMEOUT,4,2           ; @MEMP_SYS_TIMEOUT
	.comm	_SYS_DEBUG,4,2                  ; @SYS_DEBUG
.subsections_via_symbols
