unsigned int GetScene(struct _IO_FILE$link6 *dfile, void *scene) {
  char objtype[80l];
  signed int return_value_fscanf$1;
  return_value_fscanf$1 = fscanf(dfile, "%s", (const void *)objtype);
  if (!(return_value_fscanf$1 == 1))
    return (unsigned int)8;
  signed int return_value_stringcmp$3;
  return_value_stringcmp$3 = stringcmp$link93(objtype, "MATERIAL");
  if (return_value_stringcmp$3 == 0) {
    unsigned int return_value_GetMaterial$2;
    return_value_GetMaterial$2 = GetMaterial(dfile, scene);
    return return_value_GetMaterial$2;
  }
  signed int return_value_stringcmp$5;
  return_value_stringcmp$5 = stringcmp$link93(objtype, "OBJECT");
  if (return_value_stringcmp$5 == 0) {
    unsigned int return_value_GetObject$4;
    return_value_GetObject$4 = GetObject$link86(dfile, scene);
    return return_value_GetObject$4;
  }
  printf("Found bad token: %s expected an object type\n",
         (const void *)objtype);
  return (unsigned int)4;
}


x86 assembly (clang, -O0):
<GetScene>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xe8e(%rip),%rsi
mov    $0x0,%al
call   1040 <fscanf@plt>
mov    %eax,-0x74(%rbp)
cmpl   $0x1,-0x74(%rbp)
je     1192 <GetScene+0x42>
movl   $0x8,-0x4(%rbp)
jmp    1229 <GetScene+0xd9>
lea    -0x70(%rbp),%rdi
lea    0xe66(%rip),%rsi
mov    $0x0,%al
call   1050 <stringcmp$link93@plt>
mov    %eax,-0x78(%rbp)
cmpl   $0x0,-0x78(%rbp)
jne    11ce <GetScene+0x7e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1070 <GetMaterial@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <GetScene+0xd9>
lea    -0x70(%rbp),%rdi
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1050 <stringcmp$link93@plt>
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
jne    1210 <GetScene+0xc0>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1060 <GetObject$link86@plt>
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1229 <GetScene+0xd9>
lea    -0x70(%rbp),%rsi
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetScene>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xe9c(%rip),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1040 <fscanf@plt>
mov    %eax,%ecx
mov    $0x8,%eax
cmp    $0x1,%ecx
jne    11d8 <GetScene+0x88>
lea    0xe82(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <stringcmp$link93@plt>
test   %eax,%eax
je     11bc <GetScene+0x6c>
lea    0xe76(%rip),%rsi
mov    %rsp,%rdi
xor    %eax,%eax
call   1050 <stringcmp$link93@plt>
test   %eax,%eax
je     11cb <GetScene+0x7b>
lea    0xe68(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x4,%eax
jmp    11d8 <GetScene+0x88>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <GetMaterial@plt>
jmp    11d8 <GetScene+0x88>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <GetObject$link86@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%"struct._IO_FILE$link6" = type opaque
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"MATERIAL\00"
@.str.2 = [7 x i8] c"OBJECT\00"
@.str.3 = [45 x i8] c"Found bad token: %s expected an object type\0A\00"
define i32 @GetScene(%"struct._IO_FILE$link6"* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %"struct._IO_FILE$link6"*
%5 = alloca i8*
%6 = alloca [80 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %"struct._IO_FILE$link6"* %0, %"struct._IO_FILE$link6"** %4
store i8* %1, i8** %5
%12 = load %"struct._IO_FILE$link6"*, %"struct._IO_FILE$link6"** %4
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%14 = call i32 (%"struct._IO_FILE$link6"*, i8*, i8*, ...) bitcast (i32 (...)* @fscanf to i32 (%"struct._IO_FILE$link6"*, i8*, i8*, ...)*)(%"struct._IO_FILE$link6"* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, 1
br i1 %16, label %18, label %17
17: ; preds = %2
store i32 8, i32* %3
br label %41
18: ; preds = %2
%19 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%20 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @"stringcmp$link93" to i32 (i8*, i8*, ...)*)(i8* %19, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 %20, i32* %8
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load %"struct._IO_FILE$link6"*, %"struct._IO_FILE$link6"** %4
%25 = load i8*, i8** %5
%26 = call i32 (%"struct._IO_FILE$link6"*, i8*, ...) bitcast (i32 (...)* @GetMaterial to i32 (%"struct._IO_FILE$link6"*, i8*, ...)*)(%"struct._IO_FILE$link6"* %24, i8* %25)
store i32 %26, i32* %9
%27 = load i32, i32* %9
store i32 %27, i32* %3
br label %41
28: ; preds = %18
%29 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%30 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @"stringcmp$link93" to i32 (i8*, i8*, ...)*)(i8* %29, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 %30, i32* %10
%31 = load i32, i32* %10
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %28
%34 = load %"struct._IO_FILE$link6"*, %"struct._IO_FILE$link6"** %4
%35 = load i8*, i8** %5
%36 = call i32 (%"struct._IO_FILE$link6"*, i8*, ...) bitcast (i32 (...)* @"GetObject$link86" to i32 (%"struct._IO_FILE$link6"*, i8*, ...)*)(%"struct._IO_FILE$link6"* %34, i8* %35)
store i32 %36, i32* %11
%37 = load i32, i32* %11
store i32 %37, i32* %3
br label %41
38: ; preds = %28
%39 = getelementptr inbounds [80 x i8], [80 x i8]* %6, i64 0, i64 0
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %39)
store i32 4, i32* %3
br label %41
41: ; preds = %38, %33, %23, %17
%42 = load i32, i32* %3
ret i32 %42
}

LLVM IR (-O2):
%"struct._IO_FILE$link6" = type opaque
@.str = [3 x i8] c"%s\00"
@.str.1 = [9 x i8] c"MATERIAL\00"
@.str.2 = [7 x i8] c"OBJECT\00"
@.str.3 = [45 x i8] c"Found bad token: %s expected an object type\0A\00"
define i32 @GetScene(%"struct._IO_FILE$link6"* %0, i8* %1) {
%3 = alloca [80 x i8]
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%5 = call i32 (%"struct._IO_FILE$link6"*, i8*, i8*, ...) bitcast (i32 (...)* @fscanf to i32 (%"struct._IO_FILE$link6"*, i8*, i8*, ...)*)(%"struct._IO_FILE$link6"* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @"stringcmp$link93" to i32 (i8*, i8*, ...)*)(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (%"struct._IO_FILE$link6"*, i8*, ...) bitcast (i32 (...)* @GetMaterial to i32 (%"struct._IO_FILE$link6"*, i8*, ...)*)(%"struct._IO_FILE$link6"* %0, i8* %1)
br label %19
12: ; preds = %7
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @"stringcmp$link93" to i32 (i8*, i8*, ...)*)(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (%"struct._IO_FILE$link6"*, i8*, ...) bitcast (i32 (...)* @"GetObject$link86" to i32 (%"struct._IO_FILE$link6"*, i8*, ...)*)(%"struct._IO_FILE$link6"* %0, i8* %1)
br label %19
17: ; preds = %12
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i8* %4)
br label %19
19: ; preds = %10, %17, %15, %2
%20 = phi i32 [ 8, %2 ], [ %11, %10 ], [ %16, %15 ], [ 4, %17 ]
ret i32 %20
}