#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char, char);
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
void load(FILE *fo, char input[], int counter) {
  if (strlen(input) > 9)
    fprintf(fo, "b%c0%c ", input[6], input[9]);
  else
    printf("Unable to resolve code written at line %d\n", counter);
  return;
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x9,%eax
jle    117c <load+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x6(%rax),%cl
mov    -0x10(%rbp),%rax
lea    0xe95(%rip),%rsi
movsbl %cl,%edx
movsbl 0x9(%rax),%ecx
call   1050 <fprintf@plt>
jmp    118b <load+0x5b>
mov    -0x14(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
cmp    $0xa,%eax
jl     1165 <load+0x35>
movsbl 0x6(%rbp),%edx
movsbl 0x9(%rbp),%ecx
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fprintf@plt>
lea    0xe9c(%rip),%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"b%c0%c \00"
@.str.1 = [43 x i8] c"Unable to resolve code written at line %d\0A\00"
define void @load(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 @strlen(i8* %7)
%9 = icmp sgt i32 %8, 9
br i1 %9, label %10, label %19
10: ; preds = %3
%11 = load i32*, i32** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 6
%14 = load i8, i8* %13
%15 = load i8*, i8** %5
%16 = getelementptr inbounds i8, i8* %15, i64 9
%17 = load i8, i8* %16
%18 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %14, i8 signext %17)
br label %22
19: ; preds = %3
%20 = load i32, i32* %6
%21 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %19, %10
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"b%c0%c \00"
@.str.1 = [43 x i8] c"Unable to resolve code written at line %d\0A\00"
define void @load(i32* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = icmp sgt i32 %4, 9
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %1, i64 6
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %1, i64 9
%10 = load i8, i8* %9
%11 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 signext %8, i8 signext %10)
br label %14
12: ; preds = %3
%13 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %14
14: ; preds = %12, %6
ret void
}