	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bttv_sub_add_device            ## -- Begin function bttv_sub_add_device
	.p2align	4, 0x90
_bttv_sub_add_device:                   ## @bttv_sub_add_device
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%r14, 32(%rax)
	movq	8(%r14), %rax
	movq	%r13, %r15
	addq	$8, %r15
	movq	%rax, 24(%r13)
	movq	_bttv_sub_bus_type@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r13)
	movq	_release_sub_device@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_dev_set_name
	movq	%r15, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_put_device
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movl	4(%r14), %ebx
	movq	%r15, %rdi
	callq	_dev_name
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pr_info
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_list_add_tail
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	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	_bttv_sub_bus_type,4,2          ## @bttv_sub_bus_type
	.comm	_release_sub_device,4,2         ## @release_sub_device
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

L_.str.1:                               ## @.str.1
	.asciz	"%d: add subdevice \"%s\"\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bttv_sub_add_device            ; -- Begin function bttv_sub_add_device
	.p2align	2
_bttv_sub_add_device:                   ; @bttv_sub_add_device
	.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	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _release_sub_device@GOTPAGE
Lloh4:
	ldr	x8, [x8, _release_sub_device@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x21, x0
	str	w8, [x21, #8]!
	str	x19, [x21, #24]
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _bttv_sub_bus_type@GOTPAGE
Lloh7:
	ldr	x9, [x9, _bttv_sub_bus_type@GOTPAGEOFF]
	stp	x9, x8, [x21, #8]
	ldr	w3, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_dev_set_name
	mov	x0, x21
	bl	_device_register
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	bl	_put_device
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_4:
	ldr	w22, [x19, #4]
	mov	x0, x21
	bl	_dev_name
	mov	x2, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_pr_info
	mov	x0, x20
	mov	x1, x19
	bl	_list_add_tail
	mov	w22, #0
LBB0_5:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_bttv_sub_bus_type,4,2          ; @bttv_sub_bus_type
	.comm	_release_sub_device,4,2         ; @release_sub_device
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

l_.str.1:                               ; @.str.1
	.asciz	"%d: add subdevice \"%s\"\n"

.subsections_via_symbols
