	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function net_get
_net_get:                               ## @net_get
	.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	%edx, %r15d
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	xorl	%eax, %eax
	callq	_getsecs
	movl	%eax, %r13d
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movl	$4, %edx
	movq	%r12, %rcx
	callq	_ub_dev_recv
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi
	leal	1(%rdi), %eax
	cmpl	$1, %eax
	ja	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_getsecs
	subl	%r13d, %eax
	cmpl	%r15d, %eax
	jl	LBB0_1
## %bb.5:
	movl	-44(%rbp), %edi
LBB0_6:
	movl	$-1, %r12d
	testl	%edi, %edi
	jle	LBB0_9
## %bb.7:
	movq	_ETHER_ALIGN@GOTPCREL(%rip), %r13
	addl	(%r13), %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %r15
	movslq	(%r13), %rdi
	addq	%rax, %rdi
	movl	(%rbx), %esi
	movl	-44(%rbp), %edx
	callq	_memcpy
	movq	%r15, (%r14)
	movl	-44(%rbp), %r12d
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf
	movl	$-1, %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"net_get: ub_dev_recv() failed, error=%d\n"

	.comm	_ETHER_ALIGN,4,2                ## @ETHER_ALIGN
	.no_dead_strip	_net_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function net_get
_net_get:                               ; @net_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x22, [x8]
	bl	_getsecs
	mov	x21, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22]
	add	x3, sp, #12
	mov	w2, #4
	bl	_ub_dev_recv
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_8
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	add	w9, w8, #1
	cmp	w9, #1
	b.hi	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_getsecs
	sub	w8, w0, w21
	cmp	w8, w20
	b.lt	LBB0_1
; %bb.4:
	ldr	w8, [sp, #12]
LBB0_5:
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
Lloh0:
	adrp	x21, _ETHER_ALIGN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ETHER_ALIGN@GOTPAGEOFF]
	ldr	w9, [x21]
	add	w0, w9, w8
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.7:
	mov	x20, x0
	ldrsw	x8, [x21]
	add	x0, x0, x8
	ldr	w1, [x22]
	ldr	w2, [sp, #12]
	bl	_memcpy
	str	x20, [x19]
	ldr	w0, [sp, #12]
	b	LBB0_10
LBB0_8:
	str	x0, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
LBB0_9:
	mov	w0, #-1
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"net_get: ub_dev_recv() failed, error=%d\n"

	.comm	_ETHER_ALIGN,4,2                ; @ETHER_ALIGN
	.no_dead_strip	_net_get
.subsections_via_symbols
