	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_duplicate_dev
_em28xx_duplicate_dev:                  ## @em28xx_duplicate_dev
	.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
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$32, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movq	_em28xx_devused@GOTPCREL(%rip), %r12
	movq	_EM28XX_MAXBOARDS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r13), %esi
	callq	_find_first_zero_bit
	movl	(%r13), %edx
	cmpl	%edx, %eax
	jge	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_test_and_set_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:
	movl	%ebx, (%r15)
	movl	16(%r15), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$28, %esi
	movl	%ebx, %ecx
	callq	_snprintf
	movq	$0, 8(%r15)
	movq	%r15, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	24(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	%r15, %rdi
	callq	_kfree
LBB0_4:
	movq	$0, 8(%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_em28xx_devused,4,2             ## @em28xx_devused
	.comm	_EM28XX_MAXBOARDS,4,2           ## @EM28XX_MAXBOARDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	": Supports only %i em28xx boards.\n"

L_.str.1:                               ## @.str.1
	.asciz	"em28xx #%d"

	.no_dead_strip	_em28xx_duplicate_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_duplicate_dev
_em28xx_duplicate_dev:                  ; @em28xx_duplicate_dev
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_kmemdup
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x22, _em28xx_devused@GOTPAGE
Lloh4:
	ldr	x22, [x22, _em28xx_devused@GOTPAGEOFF]
Lloh5:
	adrp	x23, _EM28XX_MAXBOARDS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _EM28XX_MAXBOARDS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_find_first_zero_bit
	ldr	w2, [x23]
	cmp	w0, w2
	b.ge	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	ldr	w1, [x22]
	bl	_test_and_set_bit
	cbnz	x0, LBB0_2
; %bb.4:
	str	w21, [x20]
	ldr	w0, [x20, #16]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #28
	mov	x3, x21
	bl	_snprintf
	mov	w0, #0
	str	xzr, [x20, #8]
	str	x20, [x19, #8]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x19, #24]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	x0, x20
	bl	_kfree
LBB0_6:
	str	xzr, [x19, #8]
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_em28xx_devused,4,2             ; @em28xx_devused
	.comm	_EM28XX_MAXBOARDS,4,2           ; @EM28XX_MAXBOARDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	": Supports only %i em28xx boards.\n"

l_.str.1:                               ; @.str.1
	.asciz	"em28xx #%d"

	.no_dead_strip	_em28xx_duplicate_dev
.subsections_via_symbols
