	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_interface_request_mode_switch ## -- Begin function gb_interface_request_mode_switch
	.p2align	4, 0x90
_gb_interface_request_mode_switch:      ## @gb_interface_request_mode_switch
	.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, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpl	$0, (%rbx)
	je	LBB0_1
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_1:
	movl	$1, (%rbx)
	leaq	16(%rbx), %rdi
	callq	_reinit_completion
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_get_device
	movq	_system_long_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$12, %rbx
	movq	%rbx, %rsi
	callq	_queue_work
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_2
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r15, %rdi
	callq	_put_device
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_system_long_wq,4,2             ## @system_long_wq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_interface_request_mode_switch ; -- Begin function gb_interface_request_mode_switch
	.p2align	2
_gb_interface_request_mode_switch:      ; @gb_interface_request_mode_switch
	.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	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cbz	w8, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	mov	w8, #1
	mov	x21, x20
	str	w8, [x21], #12
	add	x0, x20, #16
	bl	_reinit_completion
	add	x20, x20, #8
	mov	x0, x20
	bl	_get_device
Lloh3:
	adrp	x8, _system_long_wq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _system_long_wq@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_queue_work
	cbz	w0, LBB0_5
; %bb.3:
	mov	w20, #0
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	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_5:
	mov	x0, x20
	bl	_put_device
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_system_long_wq,4,2             ; @system_long_wq
.subsections_via_symbols
