#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int Verify(char const *, int, char const *, char const *, double);
int /*<<< orphan*/ trio_snprintf(char *, int, char const *, double);
int /*<<< orphan*/ trio_sscanf(char *, char const *, double *);
int VerifyScanningOneDouble(const char *file, int line, const char *expected,
                            const char *format, double original) {
  double number;
  char data[512];
  trio_snprintf(data, sizeof(data), format, original);
  trio_sscanf(data, format, &number);
  return Verify(file, line, expected, format, number);
}


x86 assembly (clang, -O0):
<VerifyScanningOneDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
lea    -0x230(%rbp),%rdi
mov    -0x20(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
mov    $0x200,%esi
call   1030 <trio_snprintf@plt>
lea    -0x230(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <trio_sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x30(%rbp),%xmm0
call   1050 <Verify@plt>
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifyScanningOneDouble>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x210,%rsp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbp
lea    0x10(%rsp),%r12
mov    %r12,%rdi
mov    $0x200,%esi
mov    %rcx,%rdx
call   1030 <trio_snprintf@plt>
lea    0x8(%rsp),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <trio_sscanf@plt>
movsd  0x8(%rsp),%xmm0
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <Verify@plt>
add    $0x210,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @VerifyScanningOneDouble(i8* %0, i32 %1, i8* %2, i8* %3, double %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca double
%11 = alloca double
%12 = alloca [512 x i8]
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store double %4, double* %10
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%14 = load i8*, i8** %9
%15 = load double, double* %10
%16 = call i32 @trio_snprintf(i8* %13, i32 512, i8* %14, double %15)
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%18 = load i8*, i8** %9
%19 = call i32 @trio_sscanf(i8* %17, i8* %18, double* %11)
%20 = load i8*, i8** %6
%21 = load i32, i32* %7
%22 = load i8*, i8** %8
%23 = load i8*, i8** %9
%24 = load double, double* %11
%25 = call i32 @Verify(i8* %20, i32 %21, i8* %22, i8* %23, double %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @VerifyScanningOneDouble(i8* %0, i32 %1, i8* %2, i8* %3, double %4) {
%6 = alloca double
%7 = alloca [512 x i8]
%8 = bitcast double* %6 to i8*
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = call i32 @trio_snprintf(i8* %9, i32 512, i8* %3, double %4)
%11 = call i32 @trio_sscanf(i8* %9, i8* %3, double* %6)
%12 = load double, double* %6
%13 = call i32 @Verify(i8* %0, i32 %1, i8* %2, i8* %3, double %12)
ret i32 %13
}