void NFFGetString(struct _IO_FILE$link5 *dfile, char *string) {
  char data[100l];
  fscanf(dfile, "%s", (const void *)data);
  signed int return_value_NFFstringcmp$1;
  return_value_NFFstringcmp$1 = NFFstringcmp(data, string);
  if (!(return_value_NFFstringcmp$1 == 0)) {
    printf("parse: Expected %s, got %s \n", string, (const void *)data);
    printf("Rendering terminated. \n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<NFFGetString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0xe9e(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <NFFstringcmp@plt>
mov    %eax,-0x84(%rbp)
cmpl   $0x0,-0x84(%rbp)
je     11b9 <NFFGetString+0x79>
mov    -0x10(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NFFGetString>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r14
lea    0xe9f(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <NFFstringcmp@plt>
test   %eax,%eax
jne    1187 <NFFGetString+0x37>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe75(%rip),%rdi
mov    %rsp,%rdx
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7e(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%"struct._IO_FILE$link5" = type opaque
@.str = [3 x i8] c"%s\00"
@.str.1 = [29 x i8] c"parse: Expected %s, got %s \0A\00"
@.str.2 = [24 x i8] c"Rendering terminated. \0A\00"
define void @NFFGetString(%"struct._IO_FILE$link5"* %0, i8* %1) {
%3 = alloca %"struct._IO_FILE$link5"*
%4 = alloca i8*
%5 = alloca [100 x i8]
%6 = alloca i32
store %"struct._IO_FILE$link5"* %0, %"struct._IO_FILE$link5"** %3
store i8* %1, i8** %4
%7 = load %"struct._IO_FILE$link5"*, %"struct._IO_FILE$link5"** %3
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%9 = call i32 (%"struct._IO_FILE$link5"*, i8*, i8*, ...) bitcast (i32 (...)* @fscanf to i32 (%"struct._IO_FILE$link5"*, i8*, i8*, ...)*)(%"struct._IO_FILE$link5"* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @NFFstringcmp to i32 (i8*, i8*, ...)*)(i8* %10, i8* %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
unreachable
20: ; preds = %2
ret void
}

LLVM IR (-O2):
%"struct._IO_FILE$link5" = type opaque
@.str = [3 x i8] c"%s\00"
@.str.1 = [29 x i8] c"parse: Expected %s, got %s \0A\00"
@str = [23 x i8] c"Rendering terminated. \00"
define void @NFFGetString(%"struct._IO_FILE$link5"* %0, i8* %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 (%"struct._IO_FILE$link5"*, i8*, i8*, ...) bitcast (i32 (...)* @fscanf to i32 (%"struct._IO_FILE$link5"*, i8*, i8*, ...)*)(%"struct._IO_FILE$link5"* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @NFFstringcmp to i32 (i8*, i8*, ...)*)(i8* %4, i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %4)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
unreachable
11: ; preds = %2
ret void
}