	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_with_trace                ## -- Begin function open_with_trace
	.p2align	4, 0x90
_open_with_trace:                       ## @open_with_trace
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_prepare_to_trace
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_open
	movl	%eax, %r15d
	movq	_procfs_trace@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_24
## %bb.1:
	movq	_info_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_procfs_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.3:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
LBB0_5:
	movq	(%rbx), %rdi
	movq	_procfs_file@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_stdout@GOTPCREL(%rip), %rax
	testq	%rbx, %rbx
	jne	LBB0_7
## %bb.6:
	movq	(%rax), %rbx
LBB0_7:
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_safe_strerror
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_22
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_13
## %bb.10:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	jne	LBB0_12
## %bb.11:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_21
LBB0_13:
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_17
## %bb.14:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	jne	LBB0_16
## %bb.15:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_21
LBB0_17:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_22
## %bb.18:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	jne	LBB0_20
## %bb.19:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_20:
	leaq	L_.str.5(%rip), %rsi
LBB0_21:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
LBB0_22:
	movq	(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:
	callq	_fflush
LBB0_24:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_procfs_trace,8,3               ## @procfs_trace
	.comm	_info_verbose,8,3               ## @info_verbose
	.comm	_procfs_file,8,3                ## @procfs_file
	.comm	_stdout,8,3                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s:%d -- "

L_.str.1:                               ## @.str.1
	.asciz	"[open FAILED! (%s) line %d]\\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d = open (%s, "

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.3:                               ## @.str.3
	.asciz	"O_RDONLY) %d\n"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
L_.str.4:                               ## @.str.4
	.asciz	"O_WRONLY) %d\n"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.5:                               ## @.str.5
	.asciz	"O_RDWR)   %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_open_with_trace                ; -- Begin function open_with_trace
	.p2align	2
_open_with_trace:                       ; @open_with_trace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	bl	_prepare_to_trace
Lloh0:
	adrp	x26, _errno@GOTPAGE
Lloh1:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
	str	xzr, [x26]
	mov	x0, x22
	mov	x1, x21
	bl	_open
	mov	x19, x0
Lloh2:
	adrp	x8, _procfs_trace@GOTPAGE
Lloh3:
	ldr	x8, [x8, _procfs_trace@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.1:
Lloh5:
	adrp	x8, _info_verbose@GOTPAGE
Lloh6:
	ldr	x8, [x8, _info_verbose@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x24, _procfs_file@GOTPAGE
Lloh9:
	ldr	x24, [x24, _procfs_file@GOTPAGEOFF]
Lloh10:
	adrp	x25, _stdout@GOTPAGE
Lloh11:
	ldr	x25, [x25, _stdout@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	csel	x0, x9, x8, eq
	stp	x23, x20, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_3:
	ldr	x0, [x26]
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	csel	x23, x9, x8, eq
	cbz	x0, LBB0_5
; %bb.4:
	bl	_safe_strerror
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x0, x20, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	b	LBB0_11
LBB0_5:
	stp	x19, x22, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_fprintf
Lloh18:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	csel	x0, x9, x8, eq
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_7:
Lloh23:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	csel	x0, x9, x8, eq
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh28:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_12
; %bb.10:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, #0
	csel	x0, x9, x8, eq
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_11:
	bl	_fprintf
LBB0_12:
	ldr	x0, [x24]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_fflush
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_procfs_trace,8,3               ; @procfs_trace
	.comm	_info_verbose,8,3               ; @info_verbose
	.comm	_procfs_file,8,3                ; @procfs_file
	.comm	_stdout,8,3                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s:%d -- "

l_.str.1:                               ; @.str.1
	.asciz	"[open FAILED! (%s) line %d]\\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d = open (%s, "

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.3:                               ; @.str.3
	.asciz	"O_RDONLY) %d\n"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
l_.str.4:                               ; @.str.4
	.asciz	"O_WRONLY) %d\n"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.5:                               ; @.str.5
	.asciz	"O_RDWR)   %d\n"

.subsections_via_symbols
