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

/* Variables and functions */
int /*<<< orphan*/ print_field(char const *, char *, int, int);
int /*<<< orphan*/ printf(char *);
void do_main_record(const char *line) {
  printf("Main Record Line\n\n");
  print_field(line, "F3", 2, 1);
  print_field(line, "F5", 4, 1);
  print_field(line, "F15", 72, 12);
  print_field(line, "F18", 136, 300);
  printf("\n");
}


x86 assembly (clang, -O0):
<do_main_record>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
mov    $0x48,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
mov    $0x88,%edx
mov    $0x12c,%ecx
call   1040 <print_field@plt>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_main_record>:
push   %rbx
mov    %rdi,%rbx
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1050 <print_field@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
mov    $0x1,%ecx
call   1050 <print_field@plt>
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x48,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe78(%rip),%rsi
mov    %rbx,%rdi
mov    $0x88,%edx
mov    $0x12c,%ecx
call   1050 <print_field@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Main Record Line\0A\0A\00"
@.str.1 = [3 x i8] c"F3\00"
@.str.2 = [3 x i8] c"F5\00"
@.str.3 = [4 x i8] c"F15\00"
@.str.4 = [4 x i8] c"F18\00"
@.str.5 = [2 x i8] c"\0A\00"
define void @do_main_record(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @print_field(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%6 = load i8*, i8** %2
%7 = call i32 @print_field(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 1)
%8 = load i8*, i8** %2
%9 = call i32 @print_field(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 72, i32 12)
%10 = load i8*, i8** %2
%11 = call i32 @print_field(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 136, i32 300)
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"F3\00"
@.str.2 = [3 x i8] c"F5\00"
@.str.3 = [4 x i8] c"F15\00"
@.str.4 = [4 x i8] c"F18\00"
@str = [18 x i8] c"Main Record Line\0A\00"
define void @do_main_record(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 1)
%4 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 1)
%5 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 72, i32 12)
%6 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 136, i32 300)
%7 = tail call i32 @putchar(i32 10)
ret void
}