	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sync_kloop_worker
_sync_kloop_worker:                     ## @sync_kloop_worker
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_printf
	movq	(%rbx), %rsi
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	callq	_nmreq_hdr_init
	movq	_NETMAP_REQ_SYNC_KLOOP_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	leaq	-24(%rbp), %rdi
	movq	%rdi, -48(%rbp)
	movq	24(%rbx), %rax
	movq	%rax, -40(%rbp)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$500, -24(%rbp)                 ## imm = 0x1F4
	movl	16(%rbx), %edi
	movq	_NIOCCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_ioctl
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_1
LBB0_2:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_sem_post
LBB0_4:
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.6:
	movq	_THRET_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_THRET_FAILURE@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rdi
	callq	_pthread_exit
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Testing NETMAP_REQ_SYNC_KLOOP_START on '%s'\n"

	.comm	_NETMAP_REQ_SYNC_KLOOP_START,4,2 ## @NETMAP_REQ_SYNC_KLOOP_START
	.comm	_NIOCCTRL,4,2                   ## @NIOCCTRL
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(/dev/netmap, NIOCCTRL, SYNC_KLOOP_START)"

	.comm	_THRET_FAILURE,8,3              ## @THRET_FAILURE
	.comm	_THRET_SUCCESS,8,3              ## @THRET_SUCCESS
	.no_dead_strip	_sync_kloop_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sync_kloop_worker
_sync_kloop_worker:                     ; @sync_kloop_worker
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
	ldr	x1, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	ldr	x1, [x19]
	mov	x0, sp
	bl	_nmreq_hdr_init
Lloh2:
	adrp	x8, _NETMAP_REQ_SYNC_KLOOP_START@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NETMAP_REQ_SYNC_KLOOP_START@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x8, sp, #24
	ldr	x9, [x19, #24]
	stp	x8, x9, [sp]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w8, #500
	str	w8, [sp, #24]
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x8, _NIOCCTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NIOCCTRL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
LBB0_2:
	bl	_sem_post
LBB0_3:
Lloh8:
	adrp	x8, _THRET_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _THRET_FAILURE@GOTPAGEOFF]
Lloh10:
	adrp	x9, _THRET_SUCCESS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _THRET_SUCCESS@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	x0, [x8]
	bl	_pthread_exit
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	ldr	x0, [x19, #8]
	cbnz	x0, LBB0_2
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Testing NETMAP_REQ_SYNC_KLOOP_START on '%s'\n"

	.comm	_NETMAP_REQ_SYNC_KLOOP_START,4,2 ; @NETMAP_REQ_SYNC_KLOOP_START
	.comm	_NIOCCTRL,4,2                   ; @NIOCCTRL
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(/dev/netmap, NIOCCTRL, SYNC_KLOOP_START)"

	.comm	_THRET_FAILURE,8,3              ; @THRET_FAILURE
	.comm	_THRET_SUCCESS,8,3              ; @THRET_SUCCESS
	.no_dead_strip	_sync_kloop_worker
.subsections_via_symbols
