#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_purchasing_card_item(const char *line) {
  printf("Purchasing Card Item Line\n\n");
  print_field(line, "F4", 3, 1);
  print_field(line, "F6", 5, 3);
  print_field(line, "F7", 8, 12);
  print_field(line, "F8", 20, 12);
  print_field(line, "F10", 47, 40);
  print_field(line, "F11", 87, 12);
  print_field(line, "F12", 99, 4);
  print_field(line, "F13", 103, 12);
  print_field(line, "F14", 115, 12);
  print_field(line, "F15", 127, 12);
  print_field(line, "F16", 139, 12);
  print_field(line, "F18", 152, 12);
  printf("\n");
}


x86 assembly (clang, -O0):
<do_purchasing_card_item>:
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    0xed9(%rip),%rsi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x5,%edx
mov    $0x3,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xeab(%rip),%rsi
mov    $0x8,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe94(%rip),%rsi
mov    $0x14,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x2f,%edx
mov    $0x28,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
mov    $0x57,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe51(%rip),%rsi
mov    $0x63,%edx
mov    $0x4,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe3b(%rip),%rsi
mov    $0x67,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe25(%rip),%rsi
mov    $0x73,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xe0f(%rip),%rsi
mov    $0x7f,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x8b,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
mov    -0x8(%rbp),%rdi
lea    0xde3(%rip),%rsi
mov    $0x98,%edx
mov    $0xc,%ecx
call   1040 <print_field@plt>
lea    0xda3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_purchasing_card_item>:
push   %rbx
mov    %rdi,%rbx
lea    0xef1(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
mov    $0x1,%ecx
call   1050 <print_field@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
mov    $0x3,%ecx
call   1050 <print_field@plt>
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe77(%rip),%rsi
mov    %rbx,%rdi
mov    $0x14,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe61(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2f,%edx
mov    $0x28,%ecx
call   1050 <print_field@plt>
lea    0xe4c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x57,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe37(%rip),%rsi
mov    %rbx,%rdi
mov    $0x63,%edx
mov    $0x4,%ecx
call   1050 <print_field@plt>
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
mov    $0x67,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xe0d(%rip),%rsi
mov    %rbx,%rdi
mov    $0x73,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xdf8(%rip),%rsi
mov    %rbx,%rdi
mov    $0x7f,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xde3(%rip),%rsi
mov    %rbx,%rdi
mov    $0x8b,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
lea    0xdce(%rip),%rsi
mov    %rbx,%rdi
mov    $0x98,%edx
mov    $0xc,%ecx
call   1050 <print_field@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Purchasing Card Item Line\0A\0A\00"
@.str.1 = [3 x i8] c"F4\00"
@.str.2 = [3 x i8] c"F6\00"
@.str.3 = [3 x i8] c"F7\00"
@.str.4 = [3 x i8] c"F8\00"
@.str.5 = [4 x i8] c"F10\00"
@.str.6 = [4 x i8] c"F11\00"
@.str.7 = [4 x i8] c"F12\00"
@.str.8 = [4 x i8] c"F13\00"
@.str.9 = [4 x i8] c"F14\00"
@.str.10 = [4 x i8] c"F15\00"
@.str.11 = [4 x i8] c"F16\00"
@.str.12 = [4 x i8] c"F18\00"
@.str.13 = [2 x i8] c"\0A\00"
define void @do_purchasing_card_item(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 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 3, 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 5, i32 3)
%8 = load i8*, i8** %2
%9 = call i32 @print_field(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 8, i32 12)
%10 = load i8*, i8** %2
%11 = call i32 @print_field(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 20, i32 12)
%12 = load i8*, i8** %2
%13 = call i32 @print_field(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 47, i32 40)
%14 = load i8*, i8** %2
%15 = call i32 @print_field(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 87, i32 12)
%16 = load i8*, i8** %2
%17 = call i32 @print_field(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 99, i32 4)
%18 = load i8*, i8** %2
%19 = call i32 @print_field(i8* %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 103, i32 12)
%20 = load i8*, i8** %2
%21 = call i32 @print_field(i8* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 115, i32 12)
%22 = load i8*, i8** %2
%23 = call i32 @print_field(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 127, i32 12)
%24 = load i8*, i8** %2
%25 = call i32 @print_field(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 139, i32 12)
%26 = load i8*, i8** %2
%27 = call i32 @print_field(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 152, i32 12)
%28 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"F4\00"
@.str.2 = [3 x i8] c"F6\00"
@.str.3 = [3 x i8] c"F7\00"
@.str.4 = [3 x i8] c"F8\00"
@.str.5 = [4 x i8] c"F10\00"
@.str.6 = [4 x i8] c"F11\00"
@.str.7 = [4 x i8] c"F12\00"
@.str.8 = [4 x i8] c"F13\00"
@.str.9 = [4 x i8] c"F14\00"
@.str.10 = [4 x i8] c"F15\00"
@.str.11 = [4 x i8] c"F16\00"
@.str.12 = [4 x i8] c"F18\00"
@str = [27 x i8] c"Purchasing Card Item Line\0A\00"
define void @do_purchasing_card_item(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 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 3, 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 5, i32 3)
%5 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 8, i32 12)
%6 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 20, i32 12)
%7 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 47, i32 40)
%8 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 87, i32 12)
%9 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 99, i32 4)
%10 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 103, i32 12)
%11 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 115, i32 12)
%12 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 127, i32 12)
%13 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 139, i32 12)
%14 = tail call i32 @print_field(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 152, i32 12)
%15 = tail call i32 @putchar(i32 10)
ret void
}