	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_w32_kill                       ## -- Begin function w32_kill
	.p2align	4, 0x90
_w32_kill:                              ## @w32_kill
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.3:
	movq	_W32_DETTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rdi
	movq	(%rdi), %rcx
	movl	%eax, 4(%rcx)
	movl	%esi, (%rcx)
	callq	_w32dbg_wrap_wait_ret
	movq	(%rbx), %rdi
	movl	$1, %r15d
	movl	$1, %esi
	callq	_TerminateProcess
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	(%rbx), %rdi
	movq	_wait_time@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_WaitForSingleObject
	movq	_WAIT_OBJECT_0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_r_sys_perror
LBB0_6:
	xorl	%r15d, %r15d
LBB0_7:
	movl	(%r14), %edi
	callq	_r_list_purge
	movq	(%rbx), %rdi
	callq	_CloseHandle
	movq	$0, (%rbx)
	jmp	LBB0_8
LBB0_1:
	movq	(%rbx), %rdi
	callq	___is_proc_alive
	movl	$1, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movl	(%r14), %edi
	callq	_r_list_purge
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W32_DETTACH,4,2                ## @W32_DETTACH
	.comm	_wait_time,4,2                  ## @wait_time
	.comm	_WAIT_OBJECT_0,8,3              ## @WAIT_OBJECT_0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w32_kill/WaitForSingleObject"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_w32_kill                       ; -- Begin function w32_kill
	.p2align	2
_w32_kill:                              ; @w32_kill
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	cbz	w3, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _W32_DETTACH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _W32_DETTACH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x0, [x21, #8]
	ldr	x9, [x0]
	stp	w1, w8, [x9]
	bl	_w32dbg_wrap_wait_ret
	ldr	x0, [x21]
	mov	w1, #1
	bl	_TerminateProcess
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x0, [x21]
Lloh3:
	adrp	x8, _wait_time@GOTPAGE
Lloh4:
	ldr	x8, [x8, _wait_time@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_WaitForSingleObject
Lloh6:
	adrp	x8, _WAIT_OBJECT_0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WAIT_OBJECT_0@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	mov	w20, #1
	b	LBB0_8
LBB0_4:
	ldr	x0, [x21]
	bl	___is_proc_alive
	cbz	w0, LBB0_10
; %bb.5:
	mov	w20, #1
	b	LBB0_9
LBB0_6:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_r_sys_perror
LBB0_7:
	mov	w20, #0
LBB0_8:
	ldr	w0, [x19]
	bl	_r_list_purge
	ldr	x0, [x21]
	bl	_CloseHandle
	str	xzr, [x21]
LBB0_9:
	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
LBB0_10:
	ldr	w0, [x19]
	bl	_r_list_purge
	mov	w20, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_W32_DETTACH,4,2                ; @W32_DETTACH
	.comm	_wait_time,4,2                  ; @wait_time
	.comm	_WAIT_OBJECT_0,8,3              ; @WAIT_OBJECT_0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w32_kill/WaitForSingleObject"

.subsections_via_symbols
