#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 *, char *);
int /*<<< orphan*/ trio_snprintf(char *, int, char *, char *);
int /*<<< orphan*/ trio_sscanf(char *, char const *, char *);
int VerifyScanningOneString(const char *file, int line, const char *expected,
                            const char *format, char *original) {
  char string[512];
  char data[512];
  trio_snprintf(data, sizeof(data), "%s", original);
  string[0] = 0;
  trio_sscanf(data, format, string);
  return Verify(file, line, expected, "%s", string);
}


x86 assembly (clang, -O0):
<VerifyScanningOneString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x200,%esi
lea    0xe9b(%rip),%rdx
call   1030 <trio_snprintf@plt>
movb   $0x0,-0x230(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x230(%rbp),%rdx
call   1040 <trio_sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    -0x230(%rbp),%r8
lea    0xe5f(%rip),%rcx
call   1050 <Verify@plt>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifyScanningOneString>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x408,%rsp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbp
lea    0xeac(%rip),%rdx
lea    0x200(%rsp),%r13
mov    %r13,%rdi
mov    $0x200,%esi
mov    %r8,%rcx
call   1030 <trio_snprintf@plt>
movb   $0x0,(%rsp)
mov    %rsp,%r12
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <trio_sscanf@plt>
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r14,%rdx
lea    0xe6f(%rip),%rcx
mov    %r12,%r8
call   1050 <Verify@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @VerifyScanningOneString(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca [512 x i8]
%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 i8* %4, i8** %10
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%14 = load i8*, i8** %10
%15 = call i32 @trio_snprintf(i8* %13, i32 512, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
store i8 0, i8* %16
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %12, i64 0, i64 0
%18 = load i8*, i8** %9
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%20 = call i32 @trio_sscanf(i8* %17, i8* %18, i8* %19)
%21 = load i8*, i8** %6
%22 = load i32, i32* %7
%23 = load i8*, i8** %8
%24 = getelementptr inbounds [512 x i8], [512 x i8]* %11, i64 0, i64 0
%25 = call i32 @Verify(i8* %21, i32 %22, i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %24)
ret i32 %25
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @VerifyScanningOneString(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca [512 x i8]
%7 = alloca [512 x i8]
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = call i32 @trio_snprintf(i8* %9, i32 512, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8 0, i8* %8
%11 = call i32 @trio_sscanf(i8* %9, i8* %3, i8* %8)
%12 = call i32 @Verify(i8* %0, i32 %1, i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 %12
}